﻿:root {
  --app-bg: #eef1f4;
  --card-bg: #ffffff;
  --ink: #1f2937;
  --muted: #6b7280;
  --line: #e3e8ee;
  --brand: #1178a6;
  --brand-soft: #e1f4fb;
  --brand-strong: #0b5b80;
  --rail-w: 264px;
  --top-h: 58px;
}

body.app-shell {
  font-family: "Manrope", "Segoe UI", sans-serif;
  min-height: 100vh;
  color: var(--ink);
  background: var(--app-bg);
}

/* ===================== Casca social ===================== */
.kahu-top {
  position: sticky;
  top: 0;
  z-index: 1030;
  height: var(--top-h);
  background: #fff;
  border-bottom: 1px solid var(--line);
}

.kahu-top-inner {
  height: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 18px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.kahu-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: -0.2px;
  color: var(--brand-strong);
  text-decoration: none;
}

.kahu-logo {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 1.05rem;
  background: linear-gradient(135deg, var(--brand), var(--brand-strong));
}

.kahu-top-tabs {
  display: flex;
  gap: 6px;
  margin: 0 auto;
}

.kahu-top-tab {
  width: 74px;
  height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-size: 1.25rem;
  color: #6c8595;
  text-decoration: none;
  transition: all 0.15s ease;
}

.kahu-top-tab:hover {
  background: #f0f5f8;
  color: var(--brand-strong);
}

.kahu-top-tab.active {
  color: var(--brand);
  background: var(--brand-soft);
}

.kahu-bell-btn {
  position: relative;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  color: #4a6472;
  font-size: 1.3rem;
  text-decoration: none;
  transition: all 0.15s ease;
}

.kahu-bell-btn:hover { background: #f0f5f8; color: var(--brand-strong); }

.kahu-bell-badge {
  position: absolute;
  top: 4px;
  right: 4px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: #d1495b;
  color: #fff;
  font-size: 0.68rem;
  font-weight: 800;
  display: grid;
  place-items: center;
  border: 2px solid #fff;
}

.kahu-notif-menu {
  width: 340px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 18px 40px rgba(16, 56, 77, 0.16);
  overflow: hidden;
}

.kahu-notif-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  font-weight: 800;
  color: #1f3d4c;
}

.kahu-notif-readall {
  border: 0;
  background: transparent;
  color: var(--brand);
  font-weight: 700;
  font-size: 0.82rem;
  cursor: pointer;
  padding: 0;
}

.kahu-notif-readall:hover { color: var(--brand-strong); }

.kahu-notif-list { max-height: 380px; overflow-y: auto; }

.kahu-notif-item {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 11px 14px;
  text-decoration: none;
  color: #2b3c45;
  border-bottom: 1px solid #f0f4f6;
}

.kahu-notif-item:hover { background: #f6fafc; }
.kahu-notif-item.unread { background: #eef7fc; }
.kahu-notif-item.unread:hover { background: #e5f2fb; }

.kahu-notif-icon {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: var(--brand-soft);
  color: var(--brand-strong);
  font-size: 1rem;
}

.kahu-notif-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.kahu-notif-text { font-size: 0.86rem; line-height: 1.35; color: #22404f; }
.kahu-notif-time { font-size: 0.72rem; color: #8298a5; }

.kahu-notif-empty {
  padding: 26px 14px;
  text-align: center;
  color: #8298a5;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.kahu-notif-empty i { font-size: 1.6rem; color: #b7c6cf; }

.kahu-notif-all {
  display: block;
  text-align: center;
  padding: 11px;
  font-weight: 700;
  color: var(--brand);
  text-decoration: none;
  border-top: 1px solid var(--line);
}

.kahu-notif-all:hover { background: #f6fafc; color: var(--brand-strong); }

.kahu-toast-wrap {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 1080;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 340px;
}

.kahu-toast {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #fff;
  border: 1px solid var(--line);
  border-left: 4px solid var(--brand);
  border-radius: 12px;
  padding: 12px 14px;
  box-shadow: 0 14px 34px rgba(16, 56, 77, 0.18);
  text-decoration: none;
  color: #22404f;
  transform: translateX(120%);
  opacity: 0;
  transition: all 0.3s ease;
}

.kahu-toast.show { transform: translateX(0); opacity: 1; }
.kahu-toast-text { font-size: 0.86rem; line-height: 1.35; }

.kahu-user-name {
  font-weight: 700;
  color: #24404e;
  line-height: 1;
  display: block;
  font-size: 0.9rem;
}

.kahu-role-chip {
  font-size: 0.72rem;
  color: #6b8493;
  font-weight: 600;
}

.kahu-layout {
  max-width: 1400px;
  margin: 0 auto;
  padding: 20px 18px 60px;
  display: grid;
  grid-template-columns: var(--rail-w) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.kahu-rail {
  position: sticky;
  top: calc(var(--top-h) + 20px);
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.rail-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.rail-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0.6rem 0.8rem;
  border-radius: 12px;
  color: #33505f;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.14s ease;
}

.rail-link i {
  font-size: 1.15rem;
  width: 22px;
  text-align: center;
  color: #6b8493;
}

.rail-link:hover {
  background: #e7eef2;
  color: #0d3f57;
}

.rail-link.active {
  background: var(--brand-soft);
  color: var(--brand-strong);
}

.rail-link.active i {
  color: var(--brand);
}

.rail-tag {
  margin-left: auto;
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #93a6b1;
  background: #eef2f5;
  border-radius: 999px;
  padding: 2px 7px;
}

.rail-badge {
  margin-left: auto;
  min-width: 20px;
  text-align: center;
  font-size: 0.72rem;
  font-weight: 800;
  color: #fff;
  background: #d8922a;
  border-radius: 999px;
  padding: 1px 7px;
}

.rail-section {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 12px;
}

.rail-section-title {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 800;
  color: #93a6b1;
  padding: 2px 6px 8px;
}

.rail-pets {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.rail-pet {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 8px;
  border-radius: 10px;
  text-decoration: none;
  color: #2c4b5a;
  font-weight: 600;
}

.rail-pet:hover {
  background: #eef4f7;
}

.rail-pet-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rail-pet-more,
.rail-empty {
  display: block;
  padding: 6px 8px;
  font-size: 0.85rem;
  color: #6b8493;
  text-decoration: none;
}

.rail-pet-more:hover {
  color: var(--brand);
}

.kahu-main {
  min-width: 0;
}

.kahu-guest {
  min-height: calc(100vh - var(--top-h));
  display: grid;
  place-items: center;
  padding: 32px 16px;
}

/* ===================== Avatares ===================== */
.avatar {
  --sz: 44px;
  width: var(--sz);
  height: var(--sz);
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  overflow: hidden;
  font-weight: 800;
  font-size: calc(var(--sz) * 0.36);
  color: #fff;
  flex: 0 0 auto;
  text-transform: uppercase;
  line-height: 1;
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.avatar-sm { --sz: 34px; }
.avatar-lg { --sz: 92px; }

.accent-blue   { background: #2f7fbf; }
.accent-teal   { background: #159b86; }
.accent-green  { background: #4f9d3f; }
.accent-amber  { background: #d8922a; }
.accent-purple { background: #7a5cd0; }
.accent-pink   { background: #cf5285; }
.accent-slate  { background: #64798a; }

/* ===================== Feed / posts ===================== */
.feed-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 22px;
  align-items: start;
}

.feed-col { min-width: 0; }

.feed-side {
  position: sticky;
  top: calc(var(--top-h) + 20px);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.kcard {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
}

.kcard-pad { padding: 16px 18px; }

.composer {
  padding: 14px 16px;
  margin-bottom: 20px;
}

.composer-row {
  display: flex;
  gap: 12px;
  align-items: center;
}

.composer-input {
  flex: 1;
  border: 0;
  background: #eef2f5;
  border-radius: 999px;
  padding: 0.62rem 1rem;
  color: #2c4b5a;
}

.composer-input:focus {
  outline: none;
  background: #e7eef2;
}

.composer-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.composer-chip {
  border: 1px solid var(--line);
  background: #fff;
  color: #4a6472;
  border-radius: 999px;
  padding: 0.32rem 0.8rem;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.composer-chip:hover,
.composer-chip.active {
  background: var(--brand-soft);
  border-color: rgba(17, 120, 166, 0.35);
  color: var(--brand-strong);
}

.post {
  margin-bottom: 18px;
  overflow: hidden;
}

.post-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px 10px;
}

.post-author {
  font-weight: 700;
  color: #21404f;
  line-height: 1.15;
}

.post-author a { color: inherit; text-decoration: none; }
.post-author a:hover { color: var(--brand); }

.post-meta {
  font-size: 0.8rem;
  color: #8298a5;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.role-badge {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 1px 8px;
  border-radius: 999px;
}

.role-badge.vet { background: #dff3ee; color: #0c6a55; }
.role-badge.tutor { background: #e4eefb; color: #1c5a9e; }
.role-badge.system { background: #eceff2; color: #55707e; }

.post-kind {
  margin-left: auto;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 1rem;
}

.post-body { padding: 0 16px 12px; }
.post-text { white-space: pre-wrap; color: #2b3c45; margin: 0; }

.post-media {
  margin-top: 10px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--line);
}

.post-media img { width: 100%; display: block; }

.post-databox {
  margin-top: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  background: #f8fbfc;
}

.data-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  margin: 2px 4px 2px 0;
}

.pill-blue   { background: #e4eefb; color: #1c5a9e; }
.pill-amber  { background: #fbeed6; color: #8a5a10; }
.pill-green  { background: #e5f2dc; color: #3d6d18; }
.pill-red    { background: #fbe3e3; color: #9e2c2c; }
.pill-teal   { background: #dff3ee; color: #0c6a55; }

.post-foot {
  display: flex;
  gap: 4px;
  padding: 6px 10px;
  border-top: 1px solid var(--line);
}

.post-act {
  flex: 1;
  border: 0;
  background: transparent;
  color: #5c7481;
  font-weight: 600;
  font-size: 0.9rem;
  padding: 0.5rem;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  text-decoration: none;
}

.post-act:hover { background: #f0f5f7; color: var(--brand-strong); }
.post-act.liked { color: #d1495b; }

.post-comments {
  padding: 10px 16px 14px;
  border-top: 1px solid var(--line);
  background: #fafcfd;
}

.comment {
  display: flex;
  gap: 10px;
  margin-bottom: 10px;
}

.comment-bubble {
  background: #eef2f5;
  border-radius: 14px;
  padding: 8px 12px;
  flex: 1;
}

.comment-author { font-weight: 700; font-size: 0.82rem; color: #24404e; }
.comment-text { margin: 0; font-size: 0.9rem; color: #2b3c45; white-space: pre-wrap; }

.comment-form { display: flex; gap: 10px; align-items: center; margin-top: 6px; }
.comment-form input {
  flex: 1;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.45rem 0.9rem;
}

/* ===================== Perfil do pet ===================== */
.profile-cover {
  height: 150px;
  border-radius: 18px 18px 0 0;
  background: linear-gradient(120deg, #1a86b4, #0d5c80);
}

.profile-head {
  background: #fff;
  border: 1px solid var(--line);
  border-top: 0;
  border-radius: 0 0 18px 18px;
  padding: 0 22px 6px;
  margin-bottom: 18px;
}

.profile-id {
  display: flex;
  align-items: flex-end;
  gap: 18px;
  margin-top: -46px;
}

.profile-avatar {
  border: 4px solid #fff;
  background: #fff;
}

.profile-name { font-size: 1.6rem; font-weight: 800; color: #1f3d4c; margin: 0; }
.profile-sub { color: #6b8493; font-weight: 600; }

.profile-bio { color: #3a5563; margin-top: 6px; max-width: 620px; }
.profile-followers { padding: 8px 22px 0; color: #6b8493; font-size: 0.88rem; font-weight: 600; }

.vac-badge {
  font-size: 0.68rem;
  font-weight: 800;
  padding: 1px 8px;
  border-radius: 999px;
  margin-left: 6px;
  vertical-align: middle;
}
.vac-ok { background: #dff3ee; color: #0c6a55; }
.vac-soon { background: #fbeed6; color: #8a5a10; }
.vac-overdue { background: #fbe3e3; color: #9e2c2c; }

.explore-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 14px;
}
.explore-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  text-align: center;
}
.explore-cover { height: 66px; background: linear-gradient(120deg, #1a86b4, #0d5c80); background-size: cover; background-position: center; }
.explore-body { padding: 0 14px 14px; margin-top: -28px; }
.explore-card .avatar { margin: 0 auto 8px; border: 3px solid #fff; }

.agenda-day {
  display: flex;
  gap: 14px;
  padding: 12px 4px;
  border-bottom: 1px solid var(--line);
  align-items: center;
}
.agenda-date {
  flex: 0 0 54px;
  text-align: center;
  border-radius: 10px;
  background: var(--brand-soft);
  color: var(--brand-strong);
  padding: 6px 0;
  font-weight: 800;
  line-height: 1.1;
}
.agenda-date .d { font-size: 1.2rem; }
.agenda-date .m { font-size: 0.68rem; text-transform: uppercase; }
.agenda-date.overdue { background: #fbe3e3; color: #9e2c2c; }

.profile-actions { margin-left: auto; display: flex; gap: 8px; padding-bottom: 8px; flex-wrap: wrap; }

.pet-edit-preview { position: relative; padding-bottom: 26px; }
.pet-edit-cover {
  height: 130px;
  border-radius: 14px;
  background: linear-gradient(120deg, #1a86b4, #0d5c80);
  background-size: cover;
  background-position: center;
}
.pet-edit-avatar { position: absolute; left: 18px; bottom: -20px; border: 4px solid #fff; }

.profile-tabs {
  display: flex;
  gap: 4px;
  margin-top: 14px;
  overflow-x: auto;
}

.profile-tab {
  padding: 0.7rem 1rem;
  font-weight: 700;
  color: #5c7481;
  text-decoration: none;
  border-bottom: 3px solid transparent;
  white-space: nowrap;
}

.profile-tab:hover { color: var(--brand-strong); }
.profile-tab.active { color: var(--brand); border-bottom-color: var(--brand); }

.health-metric {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.health-metric:last-child { border-bottom: 0; }
.health-metric .label { color: #6b8493; font-size: 0.85rem; font-weight: 600; }
.health-metric .value { font-size: 1.15rem; font-weight: 800; color: #24404e; }

.share-code {
  font-family: "Manrope", monospace;
  font-weight: 800;
  font-size: 1.35rem;
  letter-spacing: 0.18em;
  text-align: center;
  color: var(--brand-strong);
  background: var(--brand-soft);
  border: 1px dashed rgba(17, 120, 166, 0.45);
  border-radius: 12px;
  padding: 12px;
  user-select: all;
}

.album-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
}

.album-item {
  aspect-ratio: 1;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--line);
}

.album-item img { width: 100%; height: 100%; object-fit: cover; display: block; }

.record-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 4px;
  border-bottom: 1px solid var(--line);
}

.record-row:last-child { border-bottom: 0; }
.record-title { font-weight: 700; color: #24404e; }
.record-sub { font-size: 0.82rem; color: #8298a5; }

.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.section-title h2 { font-size: 1.05rem; font-weight: 800; color: #1f3d4c; margin: 0; }

.empty-state {
  text-align: center;
  padding: 34px 16px;
  color: #8298a5;
}

.empty-state i { font-size: 2rem; display: block; margin-bottom: 8px; color: #b7c6cf; }

.onboarding-step {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px;
  display: flex;
  gap: 14px;
  background: #f8fbfc;
}

details.onboarding-step {
  display: block;
}

.onboarding-step summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 12px;
}

.onboarding-step summary::-webkit-details-marker { display: none; }

.onboarding-step-number {
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-weight: 800;
  color: #fff;
  background: var(--brand);
}

.onboarding-step-body {
  flex: 1;
  min-width: 0;
}

.onboarding-step-body-with-summary {
  padding-left: 42px;
  padding-top: 12px;
}

.onboarding-step h3 {
  font-size: 1rem;
  font-weight: 800;
  margin: 0 0 2px;
  color: #1f3d4c;
}

.onboarding-step p {
  font-size: 0.86rem;
  color: #6b8493;
  margin: 0 0 12px;
}

.onboarding-summary-text {
  font-weight: 800;
  color: #1f3d4c;
}

.onboarding-summary-text small {
  color: #8298a5;
  font-weight: 600;
}

.pet-list-item {
  border-bottom: 1px solid var(--line);
  padding-bottom: 12px;
  margin-bottom: 12px;
}

.pet-list-item:last-child {
  border-bottom: 0;
  padding-bottom: 0;
  margin-bottom: 0;
}

.pet-invite-mini {
  padding: 0 4px 2px 46px;
}

.share-code-inline {
  font-family: "Manrope", monospace;
  letter-spacing: 0.08em;
  color: var(--brand-strong);
}

/* ===================== Auth (login/register) ===================== */
.auth-card {
  width: 100%;
  max-width: 440px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 30px;
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.5rem;
  color: var(--brand-strong);
  justify-content: center;
  margin-bottom: 6px;
}

@media (max-width: 992px) {
  .kahu-layout { grid-template-columns: 1fr; }
  .kahu-rail { position: static; flex-direction: row; flex-wrap: wrap; }
  .kahu-rail .rail-nav { flex-direction: row; flex-wrap: wrap; }
  .rail-section { flex: 1 1 240px; }
  .feed-grid { grid-template-columns: 1fr; }
  .feed-side { position: static; order: -1; }
}

.app-navbar {
  border-bottom: 1px solid rgba(17, 120, 166, 0.18);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(8px);
  position: sticky;
  top: 0;
  z-index: 1030;
}

.app-navbar .navbar-brand {
  letter-spacing: 0.2px;
  color: #124059;
}

.app-link {
  border-radius: 999px;
  margin-right: 0.35rem;
  padding: 0.45rem 0.85rem;
  color: #2c4f62;
  transition: all 0.2s ease;
}

.app-link:hover,
.app-link.active {
  color: #083a53;
  background: var(--brand-soft);
}

.app-user {
  align-self: center;
  color: #345565;
  font-weight: 600;
}

.btn-app-primary {
  border: 0;
  color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--brand-strong));
  box-shadow: 0 8px 22px rgba(17, 120, 166, 0.24);
}

.btn-app-primary:hover {
  color: #fff;
  filter: brightness(0.97);
}

.btn-app-outline {
  border: 1px solid rgba(17, 120, 166, 0.5);
  color: #0f5f82;
  background: #fff;
}

.btn-app-outline:hover {
  background: var(--brand-soft);
  color: #0d4f6d;
}

.app-main {
  max-width: 1780px;
}

.app-card,
.card {
  border: 1px solid rgba(184, 208, 222, 0.58);
  border-radius: 1rem;
  background: var(--card-bg);
  box-shadow: 0 14px 30px rgba(16, 56, 77, 0.08);
}

.card-counter .h4 {
  font-weight: 800;
}

.catalog-chip {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.6rem;
  padding: 0.8rem 0.95rem;
  border-radius: 0.95rem;
  text-decoration: none;
  color: #1d4155;
  border: 1px solid rgba(153, 186, 203, 0.7);
  background: #fff;
  font-weight: 700;
  transition: all 0.15s ease;
}

.catalog-chip span {
  background: #edf5f8;
  border: 1px solid #d8e6ee;
  border-radius: 999px;
  padding: 0.1rem 0.55rem;
  font-size: 0.85rem;
}

.catalog-chip:hover,
.catalog-chip.active {
  color: #083a53;
  border-color: rgba(17, 120, 166, 0.45);
  background: linear-gradient(180deg, #fbfeff, #edf8fd);
}

.catalog-grid {
  border: 1px solid var(--line);
  border-radius: 0.8rem;
  max-height: 62vh;
  overflow: auto;
  background: #fff;
}

.catalog-grid thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #f4fafd;
  border-bottom: 1px solid var(--line);
}

.catalog-grid tbody tr {
  transition: background 0.12s ease;
}

.catalog-row-link {
  text-decoration: none;
  color: #10455f;
  font-weight: 600;
}

.catalog-row-link:hover {
  color: #0a6a92;
}

.catalog-tabs {
  border-bottom: 1px solid var(--line);
  gap: 0.2rem;
  overflow-x: auto;
  white-space: nowrap;
  flex-wrap: nowrap;
  padding-bottom: 0.2rem;
}

.catalog-tabs .nav-link {
  border: 1px solid transparent;
  color: #446472;
  border-radius: 0.6rem;
  font-weight: 600;
  padding: 0.42rem 0.72rem;
}

.catalog-tabs .nav-link.active,
.catalog-tabs .nav-link:hover {
  color: #0f5d80;
  border-color: rgba(17, 120, 166, 0.24);
  background: var(--brand-soft);
}

.table td,
.table th {
  vertical-align: middle;
}

.attendance-tabs .btn {
  border-radius: 999px;
}

.attendance-block {
  border: 1px solid rgba(153, 186, 203, 0.5);
  border-radius: 0.85rem;
  padding: 0.85rem;
  background: linear-gradient(180deg, #ffffff, #f8fcff);
}

.accordion-item {
  border: 1px solid rgba(153, 186, 203, 0.45);
  border-radius: 0.75rem;
  overflow: hidden;
}

.accordion-button {
  font-weight: 700;
  color: #1d4f67;
  background: #f3f9fc;
}

.accordion-button:not(.collapsed) {
  color: #083f58;
  background: #e5f4fb;
}

.accordion-button:focus {
  box-shadow: none;
}

.schedule-week-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(140px, 1fr));
  gap: 0.55rem;
}

.schedule-day {
  border: 1px solid rgba(153, 186, 203, 0.45);
  border-radius: 0.8rem;
  background: #fbfeff;
  min-height: 130px;
}

.schedule-day-title {
  padding: 0.45rem 0.6rem;
  border-bottom: 1px solid rgba(153, 186, 203, 0.35);
  font-size: 0.82rem;
  font-weight: 800;
  color: #1b5067;
}

.schedule-day-body {
  padding: 0.55rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.schedule-pill {
  display: block;
  text-decoration: none;
  color: #0f4b66;
  background: #eef7fc;
  border: 1px solid #d5e8f2;
  border-radius: 0.55rem;
  padding: 0.32rem 0.45rem;
  font-size: 0.78rem;
}

.schedule-pill:hover {
  color: #073f58;
  border-color: #8ec2dc;
  background: #e3f3fc;
}

.exam-stat-card {
  border: 1px solid rgba(153, 186, 203, 0.5);
  border-radius: 0.75rem;
  background: linear-gradient(180deg, #ffffff, #f4fafd);
  padding: 0.65rem 0.75rem;
}

.exam-stat-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #5b7380;
}

.exam-stat-value {
  font-size: 1.25rem;
  font-weight: 800;
}

.exam-panel-summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  font-weight: 700;
  color: #0f4a63;
}

.exam-panel-summary::-webkit-details-marker {
  display: none;
}

.attendance-block > details[open] .exam-panel-summary,
details[open].attendance-block .exam-panel-summary {
  margin-bottom: 0.25rem;
}

.exam-compare-picker {
  max-height: 200px;
  overflow: auto;
  border: 1px solid rgba(153, 186, 203, 0.5);
  border-radius: 0.6rem;
  padding: 0.5rem;
  background: #f7fbfe;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.35rem;
}

.exam-compare-option {
  display: flex;
  gap: 0.45rem;
  align-items: flex-start;
  font-size: 0.85rem;
  color: #173e52;
}

.exam-compare-option input[type="checkbox"] {
  width: auto;
  margin-top: 0.1rem;
}

.exam-badge {
  border-radius: 999px;
  padding: 0.2rem 0.6rem;
  border: 1px solid transparent;
}

.exam-status-high {
  background: rgba(210, 54, 72, 0.16);
  color: #7b1020;
  border-color: rgba(210, 54, 72, 0.28);
}

.exam-status-normal {
  background: rgba(33, 139, 89, 0.16);
  color: #0f5f34;
  border-color: rgba(33, 139, 89, 0.26);
}

.exam-status-low {
  background: rgba(33, 110, 196, 0.16);
  color: #0d4682;
  border-color: rgba(33, 110, 196, 0.26);
}

.exam-status-unknown {
  background: rgba(107, 114, 128, 0.15);
  color: #495468;
  border-color: rgba(107, 114, 128, 0.25);
}

.exam-comparison td,
.exam-comparison th {
  white-space: nowrap;
}

.exam-detail-table th,
.exam-detail-table td {
  white-space: nowrap;
}

.exam-trend-better {
  background: rgba(33, 139, 89, 0.16);
  color: #0f5f34;
  border-color: rgba(33, 139, 89, 0.26);
}

.exam-trend-worse {
  background: rgba(210, 54, 72, 0.16);
  color: #7b1020;
  border-color: rgba(210, 54, 72, 0.28);
}

.exam-trend-stable {
  background: rgba(107, 114, 128, 0.15);
  color: #495468;
  border-color: rgba(107, 114, 128, 0.25);
}

.exam-trend-unknown {
  background: rgba(107, 114, 128, 0.15);
  color: #495468;
  border-color: rgba(107, 114, 128, 0.25);
}

.exam-comparison td.exam-trend-better {
  background-color: rgba(33, 139, 89, 0.16) !important;
  color: #0f5f34 !important;
  font-weight: 600;
}

.exam-comparison td.exam-trend-worse {
  background-color: rgba(210, 54, 72, 0.16) !important;
  color: #7b1020 !important;
  font-weight: 600;
}

.exam-comparison td.exam-trend-stable,
.exam-comparison td.exam-trend-unknown {
  background-color: rgba(107, 114, 128, 0.15) !important;
  color: #495468 !important;
  font-weight: 600;
}

input,
select,
textarea {
  width: 100%;
}

@media (max-width: 992px) {
  .catalog-grid {
    max-height: 44vh;
  }

  .schedule-week-grid {
    grid-template-columns: repeat(2, minmax(140px, 1fr));
  }
}

@media print {
  .app-navbar,
  .alert,
  .attendance-tabs,
  .btn,
  form {
    display: none !important;
  }

  body.app-shell {
    background: #fff !important;
  }

  .card,
  .attendance-block {
    box-shadow: none !important;
    border-color: #b7c5ce !important;
  }

  .col-xl-4,
  .col-xl-5 {
    display: none !important;
  }

  .col-xl-7,
  .col-xl-8 {
    flex: 0 0 100% !important;
    max-width: 100% !important;
  }

  .table td,
  .table th {
    font-size: 11px;
  }
}
