/* V49 local visual refresh */
:root {
  --ink: #18233a;
  --muted: #69758a;
  --line: #e4e9f2;
  --canvas: #f3f6fb;
  --card: #ffffff;
  --indigo: #4b5ed7;
  --indigo-dark: #3849bd;
  --indigo-pale: #eef1ff;
  --teal: #0b9489;
  --shadow: 0 10px 30px rgba(31, 46, 83, .065);
  --shadow-hover: 0 18px 42px rgba(31, 46, 83, .105);
}

html { scroll-behavior: smooth; }
body {
  min-width: 320px;
  background-color: var(--canvas);
  background-image:
    radial-gradient(circle at 78% 2%, rgba(88, 109, 224, .07), transparent 24%),
    radial-gradient(circle at 24% 82%, rgba(16, 163, 148, .045), transparent 23%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
button, input, select, textarea { -webkit-tap-highlight-color: transparent; }
button:focus, input:focus, select:focus, textarea:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(75, 94, 215, .13);
}
button:active:not(:disabled) { transform: translateY(1px) scale(.99); }
button:disabled { cursor: not-allowed; opacity: .55; }

.sidebar {
  width: 264px;
  flex-basis: 264px;
  padding: 27px 18px 20px;
  overflow-y: auto;
  background:
    radial-gradient(circle at 8% 0%, rgba(107, 124, 245, .24), transparent 31%),
    linear-gradient(180deg, #1c294a 0%, #17223d 58%, #111a30 100%);
  border-right: 1px solid rgba(255, 255, 255, .055);
  box-shadow: 12px 0 38px rgba(23, 34, 61, .08);
}
.brand-lockup { padding: 3px 11px 2px; }
.brand-mark {
  width: 39px;
  height: 39px;
  border-radius: 12px;
  background: linear-gradient(145deg, #7181f5, #4a5bd2);
  box-shadow: 0 10px 24px rgba(48, 65, 174, .42), inset 0 1px 0 rgba(255, 255, 255, .24);
}
.brand-lockup h1 { font-size: 18px; font-weight: 700; }
.brand-lockup .eyebrow { color: #a8b4d9; letter-spacing: .15em; }
.main-nav { gap: 6px; margin-top: 39px; }
.nav-item {
  position: relative;
  min-height: 45px;
  padding: 11px 13px;
  overflow: hidden;
  color: #abb7d6;
  border: 1px solid transparent;
  border-radius: 11px;
  transition: color .18s ease, background-color .18s ease, border-color .18s ease, transform .18s ease, box-shadow .18s ease;
}
.nav-item:hover {
  color: #fff;
  background: rgba(255, 255, 255, .075);
  border-color: rgba(255, 255, 255, .055);
  transform: translateX(2px);
}
.nav-item.active {
  color: #fff;
  background: linear-gradient(110deg, #5265df, #4658cf);
  border-color: rgba(255, 255, 255, .12);
  box-shadow: 0 9px 22px rgba(18, 29, 95, .34);
}
.nav-item.active::before {
  content: "";
  position: absolute;
  top: 10px;
  bottom: 10px;
  left: 0;
  width: 3px;
  border-radius: 0 4px 4px 0;
  background: #8ce3d8;
}
.nav-icon {
  width: 27px;
  color: #c4cdef;
  font-size: 18px;
  text-align: center;
}
.nav-item.active .nav-icon { color: #fff; }
.sidebar-footer { padding-top: 18px; }
.utility-button {
  min-height: 36px;
  border-radius: 9px;
  transition: color .18s ease, border-color .18s ease, background-color .18s ease;
}
.utility-button:hover { background: rgba(255, 255, 255, .06); }
.status-dot { animation: statusPulse 2.4s ease-in-out infinite; }

.main-content {
  max-width: 1720px;
  padding: 0 42px 54px;
}
.topbar {
  position: sticky;
  z-index: 10;
  top: 0;
  min-height: 92px;
  margin: 0 -10px;
  padding: 0 10px;
  border-bottom-color: rgba(218, 224, 236, .82);
  background: rgba(243, 246, 251, .92);
  box-shadow: 0 7px 18px rgba(31, 46, 83, .025);
  backdrop-filter: blur(14px);
}
.local-mode-banner:not([hidden]) ~ .app-shell .topbar { top: 29px; }
.topbar h2 { color: #15213a; font-size: 26px; font-weight: 700; letter-spacing: -.02em; }
.language-switch {
  border: 1px solid #e1e6ef;
  border-radius: 10px;
  background: #e9edf5;
}
.lang-button { min-width: 35px; padding: 6px 9px; border-radius: 7px; }
.lang-button.active { color: #3346bc; box-shadow: 0 2px 7px rgba(34, 47, 82, .11); }
.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 11px;
  background: linear-gradient(145deg, #6575e7, #4052c3);
  box-shadow: 0 7px 15px rgba(68, 84, 196, .22);
}
.logout-button { border-radius: 7px; padding: 7px; transition: color .16s ease, background-color .16s ease; }
.logout-button:hover { background: #fff0ee; }

.view { padding-top: 31px; }
.view.active-view { animation: viewEnter .24s ease-out both; }
.section-topline {
  min-height: 58px;
  align-items: center;
  margin-bottom: 22px;
}
.section-topline h3 { color: #18243d; font-size: 20px; font-weight: 700; letter-spacing: -.012em; }
.section-topline > div > p:not(.section-label) { max-width: 720px; line-height: 1.6; }
.section-label { color: #6f7fd1; font-weight: 700; letter-spacing: .14em; }

.welcome-panel {
  min-height: 172px;
  padding: 29px 40px;
  border: 1px solid rgba(255, 255, 255, .17);
  border-radius: 19px;
  background:
    radial-gradient(circle at 78% 14%, rgba(142, 226, 215, .19), transparent 23%),
    linear-gradient(115deg, #3545af 0%, #5266df 57%, #596fe9 100%);
  box-shadow: 0 18px 42px rgba(54, 70, 176, .22);
}
.welcome-panel::after {
  content: "";
  position: absolute;
  width: 240px;
  height: 240px;
  right: -90px;
  top: -135px;
  border: 1px solid rgba(255, 255, 255, .13);
  border-radius: 50%;
}
.welcome-panel h3 { font-size: 27px; font-weight: 700; }
.welcome-copy { color: #e7eaff; line-height: 1.6; }

.metric-grid { gap: 18px; margin: 23px 0; }
.metric-card, .panel, .analysis-card {
  border-color: rgba(224, 230, 240, .95);
  border-radius: 15px;
  box-shadow: var(--shadow);
}
.metric-card {
  min-height: 150px;
  overflow: hidden;
  padding: 22px;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.metric-card::after {
  content: "";
  position: absolute;
  right: -32px;
  bottom: -52px;
  width: 105px;
  height: 105px;
  border-radius: 50%;
  background: rgba(75, 94, 215, .035);
}
.metric-card:hover {
  transform: translateY(-3px);
  border-color: #d9e0ef;
  box-shadow: var(--shadow-hover);
}
.metric-card strong { color: #17233c; font-size: 31px; }
.metric-icon { width: 35px; height: 35px; border-radius: 10px; }
.panel { padding: 23px 24px; }
.panel-heading { gap: 16px; margin-bottom: 19px; }
.panel-heading h3 { color: #1a2640; font-size: 18px; font-weight: 700; letter-spacing: -.01em; }
.panel-action-group { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 9px; }

.primary-button, .secondary-button, .text-button {
  min-height: 38px;
  border-radius: 9px;
  transition: color .17s ease, background-color .17s ease, border-color .17s ease, box-shadow .17s ease, transform .17s ease;
}
.primary-button {
  background: linear-gradient(110deg, #5265dc, #4355c9);
  box-shadow: 0 7px 16px rgba(67, 85, 201, .21);
}
.primary-button:hover {
  background: linear-gradient(110deg, #4759cf, #3749b7);
  box-shadow: 0 10px 22px rgba(55, 72, 187, .25);
}
.secondary-button {
  color: #42506a;
  border: 1px solid #e0e5ee;
  background: #f5f7fa;
}
.secondary-button:hover { border-color: #d6dce8; background: #edf1f6; }
.text-button { min-height: 30px; padding: 5px 2px; }
.text-button:hover { color: var(--indigo-dark); }
.close-button { transition: color .16s ease, background-color .16s ease, transform .16s ease; }
.close-button:hover { color: #344054; background: #e8ebf1; transform: rotate(4deg); }

.filter-bar {
  min-height: 64px;
  flex-wrap: wrap;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid #e3e8f1;
  border-radius: 13px;
  background: rgba(255, 255, 255, .82);
  box-shadow: 0 7px 20px rgba(31, 46, 83, .035);
}
.search-box {
  min-height: 40px;
  border-color: #dce2ec;
  border-radius: 9px;
  transition: border-color .17s ease, box-shadow .17s ease, background-color .17s ease;
}
.search-box:focus-within {
  border-color: #7585e4;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(75, 94, 215, .1);
}
.select-filter select, .date-filter input, .month-filter input,
.modal input, .modal select, .modal textarea,
.attendance-settings-form input, .attendance-inline-form input,
.attendance-inline-form select, .attendance-inline-form textarea {
  border-color: #dce2ec;
  border-radius: 9px;
  transition: border-color .17s ease, box-shadow .17s ease, background-color .17s ease;
}
.select-filter select:hover, .date-filter input:hover, .month-filter input:hover,
.modal input:hover, .modal select:hover, .modal textarea:hover { border-color: #cbd3e1; }
.record-count {
  margin-left: auto;
  padding: 6px 9px;
  border-radius: 7px;
  color: #536179;
  background: #f0f3f8;
  font-weight: 600;
}

.table-panel { padding: 10px 10px 7px; overflow: hidden; }
.table-wrap {
  max-width: 100%;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  -webkit-overflow-scrolling: touch;
}
.table-wrap::-webkit-scrollbar, .reminder-list::-webkit-scrollbar,
.sidebar::-webkit-scrollbar, .modal-card::-webkit-scrollbar { width: 8px; height: 8px; }
.table-wrap::-webkit-scrollbar-track, .reminder-list::-webkit-scrollbar-track,
.sidebar::-webkit-scrollbar-track, .modal-card::-webkit-scrollbar-track { background: transparent; }
.table-wrap::-webkit-scrollbar-thumb, .reminder-list::-webkit-scrollbar-thumb,
.modal-card::-webkit-scrollbar-thumb { border: 2px solid transparent; border-radius: 999px; background: #cbd3e1; background-clip: padding-box; }
.sidebar::-webkit-scrollbar-thumb { border: 2px solid transparent; border-radius: 999px; background: rgba(255, 255, 255, .2); background-clip: padding-box; }
th {
  height: 43px;
  padding-top: 10px;
  padding-bottom: 10px;
  color: #738097;
  background: #f8f9fc;
  font-weight: 700;
  letter-spacing: .015em;
}
td {
  height: 49px;
  border-bottom-color: #edf0f5;
  transition: background-color .14s ease;
}
tbody tr:nth-child(even) td { background: #fcfdff; }
tbody tr:hover td { background: #f5f7ff; }
.table-wrap thead th {
  position: sticky;
  z-index: 2;
  top: 0;
  box-shadow: inset 0 -1px 0 #e4e8f0;
}
.table-actions { align-items: center; }
.action-button { padding: 5px 3px; border-radius: 5px; transition: color .16s ease, background-color .16s ease; }
.action-button:hover { background: #eef1ff; }
.action-button.danger:hover { background: #fff0ee; }
.list-pagination {
  min-height: 55px;
  margin-top: 3px;
  padding: 11px 12px 6px;
}
.list-pagination button { border: 1px solid #e0e5ee; }

.ranking-list { gap: 14px; }
.rank-row {
  padding: 4px 2px;
  border-radius: 8px;
  transition: background-color .15s ease;
}
.rank-row:hover { background: #f8f9fd; }
.rank-track { height: 9px; }
.rank-fill { box-shadow: 0 2px 7px rgba(73, 91, 211, .24); }
.reminder {
  margin: 0 -5px;
  padding: 6px 5px 15px;
  border-radius: 9px;
  transition: background-color .15s ease;
}
.reminder:hover { background: #fafbfe; }
.reminder-badge { border-radius: 9px; }

.modal { background: rgba(20, 29, 52, .5); backdrop-filter: blur(5px); }
.modal.open .modal-card { animation: modalEnter .22s ease-out both; }
.modal-card {
  border: 1px solid rgba(255, 255, 255, .75);
  border-radius: 17px;
  box-shadow: 0 30px 90px rgba(20, 29, 52, .29);
}
.modal-heading { align-items: center; }
.modal-heading h3 { color: #18243d; font-size: 20px; }
.modal .form-actions { box-shadow: 0 -8px 18px rgba(29, 42, 73, .035); }
.toast {
  right: 22px;
  bottom: 22px;
  min-width: 210px;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 11px;
  box-shadow: 0 16px 38px rgba(18, 28, 55, .27);
}
.local-mode-banner {
  background: linear-gradient(90deg, #ffe08b, #ffd368);
  box-shadow: 0 3px 12px rgba(150, 103, 0, .11);
}

.attendance-summary-grid article, .attendance-clock-grid > div {
  border-radius: 12px;
  transition: transform .18s ease, box-shadow .18s ease;
}
.attendance-summary-grid article:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}
.attendance-calendar-day { border-radius: 10px; transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease; }
.attendance-calendar-day:not(.is-empty):hover { z-index: 1; transform: translateY(-2px); box-shadow: 0 9px 19px rgba(31, 46, 83, .09); }
.weekly-goal-flag { border-radius: 15px; box-shadow: 0 8px 18px rgba(31, 46, 83, .055); }
.analysis-card { transition: transform .18s ease, box-shadow .18s ease; }
.analysis-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-hover); }
.leaflet-map { border-radius: 12px; }

@keyframes viewEnter {
  from { opacity: 0; transform: translateY(7px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes modalEnter {
  from { opacity: 0; transform: translateY(12px) scale(.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes statusPulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(99, 197, 168, .13); }
  50% { box-shadow: 0 0 0 6px rgba(99, 197, 168, .045); }
}

@media (max-width: 1060px) {
  .sidebar { width: 222px; flex-basis: 222px; }
  .main-content { padding-right: 25px; padding-left: 25px; }
}

@media (max-width: 720px) {
  body { background-attachment: scroll; }
  .sidebar {
    position: sticky;
    z-index: 12;
    top: 0;
    width: 100%;
    height: auto;
    min-height: 0;
    padding: 13px 14px 10px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(18, 28, 52, .18);
  }
  .local-mode-banner:not([hidden]) ~ .app-shell .sidebar { top: 29px; padding-top: 13px; }
  .brand-lockup { padding: 0 3px; }
  .brand-mark { width: 34px; height: 34px; border-radius: 10px; }
  .brand-lockup h1 { font-size: 15px; }
  .main-nav {
    display: flex;
    grid-template-columns: none;
    gap: 6px;
    margin-top: 11px;
    padding: 1px 1px 4px;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    -webkit-overflow-scrolling: touch;
  }
  .main-nav::-webkit-scrollbar { display: none; }
  .nav-item {
    flex: 0 0 auto;
    min-width: 86px;
    min-height: 39px;
    padding: 8px 10px;
    font-size: 10px;
    white-space: nowrap;
  }
  .nav-item:hover { transform: none; }
  .nav-icon { display: inline-block; width: 20px; margin: 0 3px 0 0; font-size: 15px; }
  .nav-item.active::before { top: auto; right: 13px; bottom: 0; left: 13px; width: auto; height: 2px; border-radius: 4px 4px 0 0; }
  .main-content { padding: 0 14px 32px; }
  .topbar {
    position: relative;
    top: auto;
    min-height: 76px;
    margin: 0;
    padding: 0 1px;
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;
  }
  .topbar h2 { font-size: 20px; }
  .user-menu { padding-left: 8px; }
  .user-avatar { width: 32px; height: 32px; }
  .view { padding-top: 22px; }
  .section-topline { min-height: 0; align-items: flex-start; flex-wrap: wrap; }
  .section-topline h3 { font-size: 19px; }
  .section-topline > button, .section-topline > .primary-button { min-height: 41px; }
  .welcome-panel { min-height: 154px; padding: 24px 22px; border-radius: 16px; }
  .welcome-panel h3 { font-size: 21px; }
  .welcome-panel::after { display: none; }
  .metric-card, .panel, .analysis-card { border-radius: 13px; }
  .panel { padding: 18px 15px; }
  .panel-heading { align-items: flex-start; flex-wrap: wrap; }
  .panel-action-group { width: 100%; justify-content: stretch; }
  .panel-action-group button { flex: 1 1 auto; min-height: 41px; }
  .filter-bar { padding: 10px; }
  .record-count { margin-left: 0; }
  .table-panel { padding: 7px 7px 6px; }
  th, td { padding-right: 11px; padding-left: 11px; }
  .modal-card { border-radius: 14px; }
  .toast { right: 12px; bottom: 12px; left: 12px; min-width: 0; text-align: center; }
}

@media (max-width: 440px) {
  .metric-grid, .analysis-cards { grid-template-columns: 1fr; }
  .metric-card { min-height: 118px; }
  .topbar-right { gap: 5px; }
  .language-switch { flex: 0 0 auto; }
  .lang-button { min-width: 31px; padding: 5px 6px; }
  .weekly-goal-flag { grid-template-columns: 40px minmax(0, 1fr); gap: 11px; }
  .goal-flag-rate { grid-column: 2; font-size: 23px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
  }
}

/* V50 local futuristic art direction */
:root {
  --ink: #13213d;
  --muted: #64728b;
  --line: #dfe7f3;
  --canvas: #eef3fa;
  --card: #ffffff;
  --indigo: #3157d5;
  --indigo-dark: #2142b4;
  --indigo-pale: #eaf0ff;
  --teal: #00a89b;
  --tech-blue: #4f7cff;
  --tech-cyan: #00c8c0;
  --tech-navy: #08152f;
  --tech-violet: #735dff;
  --shadow: 0 14px 38px rgba(28, 48, 91, .075);
  --shadow-hover: 0 22px 54px rgba(28, 48, 91, .14);
}

body {
  position: relative;
  background-color: #eef3fa;
  background-image:
    radial-gradient(circle at 87% 8%, rgba(74, 110, 238, .13), transparent 26%),
    radial-gradient(circle at 18% 88%, rgba(0, 188, 177, .09), transparent 25%),
    linear-gradient(145deg, #f5f8fc 0%, #edf3fb 55%, #f7f9fc 100%);
}
body::before {
  content: "";
  position: fixed;
  z-index: 0;
  inset: 0;
  pointer-events: none;
  opacity: .34;
  background-image:
    linear-gradient(rgba(72, 102, 175, .075) 1px, transparent 1px),
    linear-gradient(90deg, rgba(72, 102, 175, .075) 1px, transparent 1px);
  background-size: 34px 34px;
  -webkit-mask-image: linear-gradient(to bottom, rgba(0, 0, 0, .65), transparent 78%);
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, .65), transparent 78%);
}
.app-shell, .login-screen { position: relative; z-index: 1; }

.sidebar {
  background:
    linear-gradient(135deg, rgba(82, 112, 255, .2) 0, transparent 30%),
    radial-gradient(circle at 78% 78%, rgba(0, 207, 194, .12), transparent 28%),
    linear-gradient(180deg, #0c1b38 0%, #08152f 60%, #061027 100%);
  border-right-color: rgba(114, 143, 227, .18);
  box-shadow: 14px 0 48px rgba(5, 17, 42, .16);
}
.sidebar::before {
  content: "";
  position: absolute;
  inset: 0 0 0 auto;
  width: 1px;
  pointer-events: none;
  background: linear-gradient(to bottom, transparent, rgba(0, 210, 203, .72) 42%, rgba(87, 113, 255, .58) 70%, transparent);
}
.brand-lockup { position: relative; }
.brand-lockup::after {
  content: "SYSTEM ONLINE";
  position: absolute;
  top: 48px;
  left: 12px;
  color: rgba(129, 224, 217, .7);
  font: 600 7px/1 Outfit, sans-serif;
  letter-spacing: .18em;
}
.brand-mark {
  width: 41px;
  height: 41px;
  border: 1px solid rgba(156, 238, 232, .5);
  border-radius: 0;
  background: linear-gradient(145deg, #5577f0, #2e4ec0 65%, #00a99d);
  clip-path: polygon(24% 0, 76% 0, 100% 24%, 100% 76%, 76% 100%, 24% 100%, 0 76%, 0 24%);
  box-shadow: 0 0 0 4px rgba(70, 101, 222, .1), 0 0 27px rgba(37, 115, 239, .45);
}
.brand-lockup h1 { text-shadow: 0 0 18px rgba(139, 166, 255, .2); }
.main-nav { margin-top: 55px; }
.nav-item {
  border-radius: 8px;
  color: #a5b6d8;
  letter-spacing: .012em;
}
.nav-item::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: -55%;
  width: 35%;
  pointer-events: none;
  opacity: 0;
  transform: skewX(-22deg);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .16), transparent);
}
.nav-item:hover {
  color: #eef7ff;
  border-color: rgba(109, 140, 223, .16);
  background: linear-gradient(90deg, rgba(77, 108, 212, .16), rgba(0, 184, 174, .055));
}
.nav-item.active {
  border-color: rgba(111, 171, 255, .34);
  background: linear-gradient(105deg, rgba(57, 91, 215, .96), rgba(44, 78, 185, .92) 58%, rgba(0, 153, 148, .82));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .15), 0 9px 25px rgba(13, 39, 132, .42), 0 0 18px rgba(45, 112, 236, .16);
}
.nav-item.active::after {
  opacity: 1;
  animation: techNavSweep 3.8s ease-in-out infinite;
}
.nav-item.active::before { background: #6effed; box-shadow: 0 0 12px #51dcd2; }
.nav-icon { color: #88a4df; text-shadow: 0 0 11px rgba(93, 136, 238, .44); }
.nav-item.active .nav-icon { color: #c5fff9; }
.sync-status { color: #a7b9d9; }
.status-dot {
  background: #44eedc;
  box-shadow: 0 0 0 3px rgba(68, 238, 220, .12), 0 0 14px rgba(68, 238, 220, .5);
}
.utility-button {
  color: #acbddc;
  border-color: rgba(123, 148, 211, .21);
  background: rgba(24, 43, 81, .34);
}
.utility-button:hover {
  color: #ecffff;
  border-color: rgba(79, 218, 208, .38);
  background: rgba(48, 74, 132, .34);
  box-shadow: inset 0 0 18px rgba(0, 205, 194, .055);
}

.topbar {
  border-bottom-color: rgba(151, 170, 207, .24);
  background:
    linear-gradient(90deg, rgba(246, 249, 253, .9), rgba(238, 245, 252, .92)),
    rgba(243, 247, 252, .94);
}
.topbar::after {
  content: "";
  position: absolute;
  right: 10px;
  bottom: -1px;
  left: 10px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(70, 102, 215, .36) 26%, rgba(0, 188, 178, .45) 72%, transparent);
}
.topbar .eyebrow { color: #4472d8; }
.topbar h2 { text-shadow: 0 7px 24px rgba(41, 70, 144, .08); }
.language-switch {
  border-color: #d2dcef;
  background: linear-gradient(145deg, #e4eaf5, #f0f3f8);
}
.lang-button.active {
  color: #fff;
  background: linear-gradient(110deg, #4668dd, #3154c5);
  box-shadow: 0 4px 11px rgba(45, 75, 184, .23);
}
.user-avatar {
  border: 1px solid rgba(0, 195, 184, .3);
  background: linear-gradient(145deg, #4668dd, #3154c5 58%, #00a89b);
  box-shadow: 0 0 0 3px rgba(64, 103, 220, .08), 0 8px 18px rgba(35, 67, 171, .24);
}

.section-label {
  display: flex;
  align-items: center;
  color: #3d67ce;
  font-size: 9px;
  letter-spacing: .18em;
}
.section-label::before {
  content: "";
  flex: 0 0 16px;
  width: 16px;
  height: 2px;
  margin-right: 7px;
  border-radius: 4px;
  background: linear-gradient(90deg, #4f74ed, #00bcb1);
  box-shadow: 0 0 7px rgba(0, 188, 177, .34);
}
.section-topline h3, .panel-heading h3 {
  letter-spacing: -.018em;
  text-shadow: 0 8px 24px rgba(38, 66, 132, .07);
}

.welcome-panel {
  border-color: rgba(128, 181, 255, .34);
  border-radius: 17px;
  background:
    linear-gradient(rgba(127, 167, 255, .09) 1px, transparent 1px),
    linear-gradient(90deg, rgba(127, 167, 255, .09) 1px, transparent 1px),
    radial-gradient(circle at 75% 12%, rgba(53, 235, 221, .22), transparent 24%),
    linear-gradient(112deg, #152d70 0%, #294fc0 52%, #167caa 100%);
  background-size: 26px 26px, 26px 26px, auto, auto;
  box-shadow: 0 22px 54px rgba(31, 71, 172, .28), inset 0 1px 0 rgba(255, 255, 255, .18);
}
.welcome-panel::before {
  content: "";
  position: absolute;
  z-index: 0;
  top: 0;
  bottom: 0;
  left: -25%;
  width: 18%;
  pointer-events: none;
  transform: skewX(-18deg);
  background: linear-gradient(90deg, transparent, rgba(147, 255, 247, .12), transparent);
  animation: techHeroSweep 6.5s ease-in-out infinite;
}
.welcome-panel::after {
  width: 250px;
  height: 250px;
  top: -145px;
  right: -80px;
  border-color: rgba(126, 243, 235, .22);
  box-shadow: 0 0 0 32px rgba(91, 176, 238, .035), 0 0 0 65px rgba(91, 176, 238, .022);
}
.welcome-panel .section-label { color: #8efff5; }
.welcome-panel .section-label::before { background: #82fff3; box-shadow: 0 0 10px #56e6da; }
.welcome-panel h3 { position: relative; z-index: 1; text-shadow: 0 0 24px rgba(126, 216, 255, .2); }
.welcome-copy { position: relative; z-index: 1; }
.progress-ornament { filter: drop-shadow(0 0 10px rgba(138, 238, 229, .22)); }

.metric-card, .panel, .analysis-card {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, .98), rgba(249, 252, 255, .96)),
    #fff;
  border-color: rgba(185, 200, 226, .55);
  box-shadow: 0 13px 35px rgba(30, 50, 91, .07), inset 0 1px 0 rgba(255, 255, 255, .85);
}
.panel {
  position: relative;
}
.panel::before {
  content: "";
  position: absolute;
  z-index: 0;
  top: -1px;
  right: 26px;
  left: 26px;
  height: 2px;
  pointer-events: none;
  opacity: .64;
  background: linear-gradient(90deg, transparent, #6689f4 28%, #10c8bd 68%, transparent);
}
.panel::after {
  content: "";
  position: absolute;
  right: 8px;
  bottom: 8px;
  width: 15px;
  height: 15px;
  pointer-events: none;
  opacity: .36;
  border-right: 1px solid #4a70dc;
  border-bottom: 1px solid #0bb3a9;
}
.metric-card::before {
  content: "";
  position: absolute;
  top: 0;
  right: 18px;
  left: 18px;
  height: 2px;
  border-radius: 0 0 5px 5px;
  background: linear-gradient(90deg, transparent, #5379ec, #00b8ae, transparent);
}
.metric-card::after {
  right: -35px;
  bottom: -54px;
  border: 1px solid rgba(71, 107, 218, .12);
  background:
    linear-gradient(rgba(70, 105, 207, .09) 1px, transparent 1px),
    linear-gradient(90deg, rgba(70, 105, 207, .09) 1px, transparent 1px);
  background-size: 12px 12px;
}
.metric-card:hover, .analysis-card:hover {
  border-color: rgba(82, 116, 221, .4);
  box-shadow: 0 22px 52px rgba(30, 54, 112, .14), 0 0 0 1px rgba(0, 190, 180, .06);
}
.metric-card strong, .analysis-card strong {
  color: #10264d;
  text-shadow: 0 5px 20px rgba(47, 87, 183, .1);
}
.metric-icon {
  border: 1px solid rgba(83, 119, 225, .16);
  box-shadow: 0 6px 16px rgba(52, 84, 182, .1), inset 0 0 12px rgba(255, 255, 255, .52);
}
.metric-icon.teal { box-shadow: 0 6px 16px rgba(0, 158, 148, .11), 0 0 12px rgba(0, 198, 188, .06); }

.primary-button {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(88, 137, 255, .36);
  background: linear-gradient(110deg, #345ad2 0%, #4d6fe0 56%, #178fba 100%);
  box-shadow: 0 8px 19px rgba(43, 75, 182, .23), inset 0 1px 0 rgba(255, 255, 255, .18);
}
.primary-button::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: -55%;
  width: 35%;
  pointer-events: none;
  transform: skewX(-20deg);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .22), transparent);
  transition: left .5s ease;
}
.primary-button:hover {
  border-color: rgba(87, 223, 213, .38);
  background: linear-gradient(110deg, #294fc8 0%, #3d62d5 53%, #008e92 100%);
  box-shadow: 0 12px 26px rgba(35, 69, 172, .28), 0 0 16px rgba(0, 190, 180, .08);
}
.primary-button:hover::after { left: 120%; }
.secondary-button {
  color: #324e86;
  border-color: #d2ddef;
  background: linear-gradient(145deg, #f9fbfe, #edf2f9);
}
.secondary-button:hover {
  color: #2145a7;
  border-color: #b7c9eb;
  background: #edf3fc;
  box-shadow: 0 6px 15px rgba(49, 81, 152, .08);
}
.text-button { color: #365ed0; }
.text-button:hover { color: #008e88; text-shadow: 0 0 12px rgba(0, 174, 165, .16); }

.filter-bar {
  border-color: rgba(178, 195, 224, .61);
  background:
    linear-gradient(90deg, rgba(246, 249, 254, .95), rgba(251, 253, 255, .95)),
    #fff;
  box-shadow: 0 10px 26px rgba(28, 51, 99, .055), inset 3px 0 0 rgba(69, 100, 211, .5);
}
.search-box, .select-filter select, .date-filter input, .month-filter input {
  border-color: #ced9ea;
  background-color: rgba(255, 255, 255, .92);
}
.search-box:focus-within {
  border-color: #5577dc;
  box-shadow: 0 0 0 3px rgba(63, 97, 211, .1), 0 0 16px rgba(0, 183, 174, .05);
}
.record-count {
  color: #36528b;
  border: 1px solid #d9e3f2;
  background: linear-gradient(145deg, #edf2fa, #f9fbfd);
}

th {
  color: #506487;
  background:
    linear-gradient(180deg, #f3f7fc, #edf3fa),
    #f4f7fb;
  border-bottom-color: #d7e1f0;
  text-transform: none;
}
.table-wrap thead th { box-shadow: inset 0 -1px 0 #d9e2ef, inset 0 2px 0 rgba(75, 107, 215, .08); }
td { color: #2b3d5b; }
tbody tr:nth-child(even) td { background: rgba(246, 249, 253, .68); }
tbody tr:hover td {
  color: #1e365f;
  background: linear-gradient(90deg, rgba(233, 240, 255, .82), rgba(237, 250, 248, .72));
}
.num-cell { color: #213e77; }
.insurance-num { color: #008e85; text-shadow: 0 0 12px rgba(0, 158, 148, .09); }
.brand-pill, .role-pill, .status-pill, .goal-status-pill, .attendance-status-pill {
  border: 1px solid rgba(77, 107, 208, .1);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .6);
}
.action-button { color: #315bcd; }
.action-button:hover { color: #163fae; box-shadow: 0 0 12px rgba(55, 91, 203, .09); }

.modal {
  background:
    linear-gradient(rgba(26, 42, 79, .2) 1px, transparent 1px),
    linear-gradient(90deg, rgba(26, 42, 79, .2) 1px, transparent 1px),
    rgba(5, 14, 34, .64);
  background-size: 32px 32px, 32px 32px, auto;
}
.modal-card {
  border-color: rgba(126, 164, 237, .42);
  background: linear-gradient(145deg, rgba(255, 255, 255, .99), rgba(246, 250, 255, .99));
  box-shadow: 0 35px 100px rgba(4, 13, 33, .38), 0 0 0 1px rgba(68, 115, 221, .08), 0 0 36px rgba(0, 189, 179, .07);
}
.modal-heading {
  position: relative;
  border-bottom-color: #dce5f2;
  box-shadow: 0 1px 0 rgba(255, 255, 255, .8);
}
.modal-heading::before {
  content: "";
  position: absolute;
  top: 0;
  left: 25px;
  width: 74px;
  height: 2px;
  background: linear-gradient(90deg, #4b70e0, #00b7ad);
}
.modal input:focus, .modal select:focus, .modal textarea:focus,
.attendance-settings-form input:focus, .attendance-inline-form input:focus,
.attendance-inline-form select:focus, .attendance-inline-form textarea:focus {
  border-color: #5376d9;
  box-shadow: 0 0 0 3px rgba(63, 97, 211, .1), 0 0 17px rgba(0, 183, 174, .045);
}
.toast {
  color: #edffff;
  border-color: rgba(96, 218, 210, .22);
  background: linear-gradient(105deg, #11244d, #17376a 60%, #086c70);
  box-shadow: 0 18px 44px rgba(6, 19, 48, .33), 0 0 18px rgba(0, 196, 185, .12);
}

.login-screen {
  background:
    linear-gradient(rgba(93, 126, 211, .095) 1px, transparent 1px),
    linear-gradient(90deg, rgba(93, 126, 211, .095) 1px, transparent 1px),
    radial-gradient(circle at 18% 18%, rgba(58, 91, 217, .5), transparent 26%),
    radial-gradient(circle at 82% 79%, rgba(0, 188, 178, .23), transparent 29%),
    linear-gradient(145deg, #061027, #102652 52%, #07162f);
  background-size: 38px 38px, 38px 38px, auto, auto, auto;
}
.login-screen::before, .login-screen::after { border-color: rgba(95, 225, 215, .12); }
.login-card {
  border-color: rgba(115, 171, 242, .45);
  box-shadow: 0 40px 110px rgba(2, 10, 28, .58), 0 0 34px rgba(47, 102, 224, .16);
}
.login-card::before {
  height: 2px;
  background: linear-gradient(90deg, transparent, #547cff 22%, #30e1d4 72%, transparent);
  box-shadow: 0 0 14px rgba(48, 225, 212, .28);
}
.login-card-top {
  color: #fff;
  border-bottom-color: rgba(140, 176, 240, .2);
  background:
    linear-gradient(90deg, rgba(84, 120, 231, .18), rgba(0, 179, 169, .08)),
    #10234a;
}
.login-card-top .eyebrow { color: #8eb4ec; }
.login-card-top h1 { color: #fff; }
.login-form-panel {
  background:
    linear-gradient(rgba(76, 110, 189, .035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(76, 110, 189, .035) 1px, transparent 1px),
    #fff;
  background-size: 24px 24px, 24px 24px, auto;
}
.login-shield {
  border: 1px solid rgba(97, 229, 218, .32);
  background: linear-gradient(145deg, #4969d9, #3153bc 56%, #00a99d);
  box-shadow: 0 0 0 4px rgba(67, 101, 216, .08), 0 9px 22px rgba(42, 73, 178, .23);
}
.login-kicker { color: #315ed1; letter-spacing: .18em; }
.login-card input {
  border-color: #d4deed;
  background: rgba(249, 251, 255, .94);
}
.login-card input:focus {
  border-color: #4e74dc;
  box-shadow: 0 0 0 4px rgba(63, 97, 211, .1), 0 0 18px rgba(0, 183, 174, .05);
}
.login-card .login-lang-button {
  color: #b6c5e0;
  background: rgba(255, 255, 255, .08);
}
.login-card .login-lang-button.active {
  color: #edffff;
  background: linear-gradient(110deg, #4969d9, #087f8b);
  box-shadow: 0 0 14px rgba(0, 190, 180, .13);
}

.rank-fill, .report-progress-track span, .goal-progress-track span {
  box-shadow: 0 0 12px rgba(64, 100, 224, .22);
}
.sales-trend-chart svg, .promoter-daily-chart svg, .analysis-scroll-chart svg {
  filter: drop-shadow(0 5px 10px rgba(40, 74, 156, .035));
}
.chart-line-phone, .promoter-chart-line { filter: drop-shadow(0 0 3px rgba(66, 99, 216, .23)); }
.chart-line-insurance { filter: drop-shadow(0 0 3px rgba(0, 168, 155, .26)); }
.leaflet-map {
  border: 1px solid rgba(142, 166, 212, .48);
  box-shadow: inset 0 0 30px rgba(32, 66, 135, .05), 0 10px 25px rgba(29, 49, 92, .08);
}
.attendance-calendar-day.is-today {
  border-color: #4a70dc;
  box-shadow: inset 0 0 0 1px #4a70dc, 0 0 16px rgba(64, 104, 220, .12);
  background: linear-gradient(145deg, #eef3ff, #edfaf8);
}
.weekly-goal-flag { position: relative; overflow: hidden; }
.weekly-goal-flag::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 62px;
  height: 62px;
  opacity: .1;
  background:
    linear-gradient(rgba(49, 87, 213, .6) 1px, transparent 1px),
    linear-gradient(90deg, rgba(49, 87, 213, .6) 1px, transparent 1px);
  background-size: 10px 10px;
}
.local-mode-banner {
  color: #0f3159;
  border-bottom-color: rgba(64, 123, 183, .22);
  background: linear-gradient(90deg, #73e8dc, #a2d7f5 48%, #88a8ff);
  box-shadow: 0 4px 16px rgba(15, 55, 105, .15);
  letter-spacing: .08em;
}

@keyframes techNavSweep {
  0%, 55% { left: -55%; }
  78%, 100% { left: 130%; }
}
@keyframes techHeroSweep {
  0%, 48% { left: -25%; opacity: 0; }
  55% { opacity: 1; }
  78%, 100% { left: 115%; opacity: 0; }
}

@media (max-width: 720px) {
  body::before { background-size: 26px 26px; opacity: .25; }
  .sidebar {
    background:
      linear-gradient(105deg, rgba(64, 91, 205, .22), transparent 28%),
      linear-gradient(100deg, #0b1a36, #0c2043 58%, #083444);
  }
  .sidebar::before {
    top: auto;
    right: 0;
    bottom: 0;
    left: 0;
    width: auto;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(0, 218, 207, .7), rgba(89, 117, 255, .62), transparent);
  }
  .brand-lockup::after { display: none; }
  .main-nav { margin-top: 11px; }
  .nav-item.active { box-shadow: 0 7px 17px rgba(10, 35, 119, .33); }
  .topbar::after { right: 0; left: 0; }
  .welcome-panel { background-size: 22px 22px, 22px 22px, auto, auto; }
  .panel::before { right: 16px; left: 16px; }
}

/* V51 local theme comparison controls */
.theme-switch, .login-theme-switch {
  display: flex;
  align-items: center;
  gap: 3px;
  padding: 3px;
  border: 1px solid #d2dcef;
  border-radius: 10px;
  background: linear-gradient(145deg, #e4eaf5, #f4f6fa);
}
.theme-button {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 5px 8px;
  border: 0;
  border-radius: 7px;
  color: #65738c;
  background: transparent;
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
  transition: color .18s ease, background-color .18s ease, box-shadow .18s ease, transform .18s ease;
}
.theme-button > span:first-child { font-size: 13px; line-height: 1; }
.theme-button:hover { color: #294db5; background: rgba(255, 255, 255, .58); }
.theme-button.active {
  color: #efffff;
  background: linear-gradient(110deg, #4668dd, #3154c5 58%, #008f91);
  box-shadow: 0 4px 11px rgba(45, 75, 184, .23);
}
.login-header-controls {
  display: grid;
  justify-items: end;
  gap: 7px;
}
.login-theme-switch {
  border-color: rgba(137, 169, 225, .24);
  background: rgba(255, 255, 255, .07);
}
.login-theme-switch .theme-button { color: #b6c6e3; }
.login-theme-switch .theme-button:hover { color: #fff; background: rgba(255, 255, 255, .09); }
.login-theme-switch .theme-button.active {
  color: #efffff;
  background: linear-gradient(110deg, #4969d9, #087f8b);
}

/* V51 cozy anime theme: original petals, clouds, stars and paper textures */
body[data-theme="cozy"] {
  --ink: #493b57;
  --muted: #82728a;
  --line: #eadfe8;
  --canvas: #fff7f2;
  --card: #fffdfb;
  --indigo: #a468c0;
  --indigo-dark: #8754a4;
  --indigo-pale: #f3eafb;
  --teal: #50a99b;
  --amber: #eaa25d;
  --coral: #e87883;
  --shadow: 0 13px 34px rgba(123, 79, 117, .085);
  --shadow-hover: 0 22px 50px rgba(123, 79, 117, .14);
  background-color: #fff8f2;
  background-image:
    radial-gradient(ellipse at 8% 10%, rgba(255, 255, 255, .95) 0 3.2%, transparent 3.5%),
    radial-gradient(ellipse at 12% 12%, rgba(255, 255, 255, .86) 0 4.2%, transparent 4.5%),
    radial-gradient(ellipse at 89% 8%, rgba(255, 221, 229, .72) 0 2.5%, transparent 2.8%),
    radial-gradient(ellipse at 93% 12%, rgba(230, 216, 250, .62) 0 3.2%, transparent 3.5%),
    radial-gradient(circle at 18% 88%, rgba(255, 206, 175, .27), transparent 26%),
    radial-gradient(circle at 82% 84%, rgba(184, 224, 211, .25), transparent 24%),
    linear-gradient(145deg, #fffaf6 0%, #fff2f3 48%, #f8f2ff 100%);
  background-attachment: fixed;
}
body[data-theme="cozy"]::before {
  opacity: .58;
  background-image:
    radial-gradient(ellipse at center, rgba(232, 129, 151, .18) 0 22%, transparent 25%),
    radial-gradient(ellipse at center, rgba(168, 122, 201, .12) 0 20%, transparent 24%),
    radial-gradient(circle, rgba(255, 255, 255, .92) 0 2px, transparent 3px),
    linear-gradient(115deg, transparent 46%, rgba(229, 155, 174, .055) 47%, rgba(229, 155, 174, .055) 49%, transparent 50%);
  background-position: 0 0, 38px 46px, 18px 25px, 0 0;
  background-size: 82px 96px, 112px 128px, 74px 74px, 160px 160px;
  -webkit-mask-image: linear-gradient(to bottom, rgba(0, 0, 0, .82), rgba(0, 0, 0, .25) 82%, transparent);
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, .82), rgba(0, 0, 0, .25) 82%, transparent);
}
body[data-theme="cozy"]::after {
  content: "✦   ｡˚   ✿";
  position: fixed;
  z-index: 0;
  right: 4vw;
  bottom: 3vh;
  pointer-events: none;
  color: rgba(207, 126, 161, .19);
  font: 700 28px/1 Outfit, "Noto Sans SC", sans-serif;
  letter-spacing: .5em;
  transform: rotate(-8deg);
  animation: cozyFloat 5.8s ease-in-out infinite;
}

body[data-theme="cozy"] .sidebar {
  color: #5b435d;
  border-right-color: rgba(207, 151, 181, .25);
  background:
    radial-gradient(circle at 12% 7%, rgba(255, 255, 255, .86) 0 4%, transparent 4.3%),
    radial-gradient(circle at 20% 10%, rgba(255, 255, 255, .7) 0 6%, transparent 6.3%),
    radial-gradient(ellipse at 88% 90%, rgba(179, 223, 211, .3), transparent 30%),
    linear-gradient(180deg, #fff3f6 0%, #f9eaf5 55%, #eee9fb 100%);
  box-shadow: 12px 0 36px rgba(112, 72, 114, .1);
}
body[data-theme="cozy"] .sidebar::before {
  background: linear-gradient(to bottom, transparent, rgba(231, 129, 153, .55) 34%, rgba(150, 114, 195, .42) 69%, transparent);
}
body[data-theme="cozy"] .brand-mark {
  color: #fff;
  border-color: rgba(255, 255, 255, .72);
  border-radius: 15px 15px 15px 5px;
  background:
    radial-gradient(circle at 30% 24%, rgba(255, 255, 255, .38), transparent 18%),
    linear-gradient(145deg, #f09a9f, #d783ad 55%, #a687d2);
  clip-path: none;
  box-shadow: 0 8px 20px rgba(184, 100, 143, .24), 0 0 0 4px rgba(255, 255, 255, .5);
}
body[data-theme="cozy"] .brand-lockup .eyebrow { color: #9d7391; }
body[data-theme="cozy"] .brand-lockup h1 {
  color: #513d58;
  text-shadow: 0 5px 16px rgba(176, 113, 149, .12);
}
body[data-theme="cozy"] .brand-lockup::after {
  content: "HAPPY WORKDAY";
  color: rgba(182, 107, 144, .68);
}
body[data-theme="cozy"] .nav-item {
  color: #876f88;
  border-radius: 13px;
}
body[data-theme="cozy"] .nav-icon {
  color: #b48bac;
  text-shadow: none;
}
body[data-theme="cozy"] .nav-item:hover {
  color: #654d6c;
  border-color: rgba(218, 164, 190, .25);
  background: linear-gradient(90deg, rgba(255, 255, 255, .72), rgba(255, 233, 239, .55));
}
body[data-theme="cozy"] .nav-item.active {
  color: #fff;
  border-color: rgba(255, 255, 255, .52);
  background:
    radial-gradient(circle at 88% 20%, rgba(255, 255, 255, .25), transparent 24%),
    linear-gradient(108deg, #e98b96, #c87fb0 57%, #9f87cf);
  box-shadow: 0 9px 22px rgba(177, 97, 142, .23), inset 0 1px 0 rgba(255, 255, 255, .28);
}
body[data-theme="cozy"] .nav-item.active::before {
  background: #fff1b8;
  box-shadow: 0 0 12px rgba(255, 235, 155, .8);
}
body[data-theme="cozy"] .nav-item.active::after {
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .28), transparent);
}
body[data-theme="cozy"] .nav-item.active .nav-icon { color: #fff8d8; }
body[data-theme="cozy"] .sync-status { color: #8e748d; }
body[data-theme="cozy"] .status-dot {
  background: #65b9a8;
  box-shadow: 0 0 0 3px rgba(101, 185, 168, .14), 0 0 12px rgba(101, 185, 168, .32);
}
body[data-theme="cozy"] .utility-button {
  color: #826a83;
  border-color: rgba(190, 143, 175, .25);
  background: rgba(255, 255, 255, .46);
}
body[data-theme="cozy"] .utility-button:hover {
  color: #714d68;
  border-color: rgba(206, 126, 164, .38);
  background: rgba(255, 255, 255, .76);
  box-shadow: 0 7px 16px rgba(145, 91, 132, .08);
}
body[data-theme="cozy"] .sidebar-footer { border-top-color: rgba(176, 126, 165, .17); }

body[data-theme="cozy"] .topbar {
  border-bottom-color: rgba(207, 171, 197, .28);
  background:
    radial-gradient(circle at 92% 8%, rgba(255, 225, 230, .7), transparent 25%),
    linear-gradient(90deg, rgba(255, 249, 246, .92), rgba(251, 243, 255, .92));
}
body[data-theme="cozy"] .topbar::after {
  background: linear-gradient(90deg, transparent, rgba(228, 132, 155, .44) 30%, rgba(144, 188, 177, .42) 72%, transparent);
}
body[data-theme="cozy"] .topbar .eyebrow { color: #c06f91; }
body[data-theme="cozy"] .topbar h2 { color: #4d3b56; }
body[data-theme="cozy"] .language-switch,
body[data-theme="cozy"] .theme-switch {
  border-color: #ead9e4;
  background:
    radial-gradient(circle at 85% 18%, rgba(255, 255, 255, .9), transparent 28%),
    linear-gradient(145deg, #f8eaf1, #f3ecfa);
}
body[data-theme="cozy"] .lang-button { color: #8d7089; }
body[data-theme="cozy"] .lang-button.active,
body[data-theme="cozy"] .theme-button.active {
  color: #fff;
  background:
    radial-gradient(circle at 82% 20%, rgba(255, 255, 255, .25), transparent 24%),
    linear-gradient(110deg, #e48391, #c276ac 60%, #9c83cb);
  box-shadow: 0 4px 11px rgba(176, 96, 143, .2);
}
body[data-theme="cozy"] .theme-button { color: #8c7189; }
body[data-theme="cozy"] .theme-button:hover { color: #744e6a; background: rgba(255, 255, 255, .62); }
body[data-theme="cozy"] .user-avatar {
  border-color: rgba(255, 255, 255, .78);
  background:
    radial-gradient(circle at 28% 20%, rgba(255, 255, 255, .34), transparent 20%),
    linear-gradient(145deg, #ed9197, #ca7caf 58%, #79b6aa);
  box-shadow: 0 0 0 3px rgba(229, 146, 168, .09), 0 8px 18px rgba(175, 95, 141, .2);
}

body[data-theme="cozy"] .section-label {
  color: #c36f91;
  letter-spacing: .15em;
}
body[data-theme="cozy"] .section-label::before {
  width: 18px;
  height: 6px;
  border-radius: 50% 50% 45% 45%;
  background:
    radial-gradient(circle at 30% 50%, #ee8998 0 35%, transparent 38%),
    radial-gradient(circle at 70% 50%, #ca7caf 0 35%, transparent 38%);
  box-shadow: none;
}
body[data-theme="cozy"] .section-topline h3,
body[data-theme="cozy"] .panel-heading h3 { color: #4f3d58; text-shadow: 0 7px 20px rgba(169, 103, 145, .08); }

body[data-theme="cozy"] .welcome-panel {
  color: #fff;
  border-color: rgba(255, 255, 255, .58);
  border-radius: 23px 23px 23px 9px;
  background:
    radial-gradient(ellipse at 7% 8%, rgba(255, 255, 255, .68) 0 6%, transparent 6.5%),
    radial-gradient(ellipse at 13% 10%, rgba(255, 255, 255, .58) 0 8%, transparent 8.5%),
    radial-gradient(circle at 82% 25%, rgba(255, 241, 184, .45) 0 2.2%, transparent 2.5%),
    radial-gradient(circle at 88% 42%, rgba(255, 255, 255, .38) 0 1.2%, transparent 1.5%),
    linear-gradient(125deg, rgba(238, 138, 146, .95), rgba(199, 127, 181, .94) 52%, rgba(119, 187, 176, .94)),
    linear-gradient(145deg, #ef9098, #b98acb);
  background-size: auto, auto, auto, auto, auto, auto;
  box-shadow: 0 21px 46px rgba(180, 100, 143, .23), inset 0 1px 0 rgba(255, 255, 255, .35);
}
body[data-theme="cozy"] .welcome-panel::before {
  content: "✦  ｡˚  ✿  ˚｡  ✦";
  z-index: 0;
  top: 26px;
  right: 30px;
  bottom: auto;
  left: auto;
  width: auto;
  color: rgba(255, 255, 255, .55);
  background: none;
  font: 700 19px/1 Outfit, "Noto Sans SC", sans-serif;
  letter-spacing: .28em;
  transform: none;
  animation: cozyTwinkle 4.8s ease-in-out infinite;
}
body[data-theme="cozy"] .welcome-panel::after {
  top: auto;
  right: -30px;
  bottom: -95px;
  width: 220px;
  height: 150px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, .16);
  box-shadow: -85px 12px 0 rgba(255, 255, 255, .11), -155px 34px 0 rgba(255, 255, 255, .08);
}
body[data-theme="cozy"] .welcome-panel .section-label { color: #fff5c9; }
body[data-theme="cozy"] .welcome-panel .section-label::before {
  background:
    radial-gradient(circle at 30% 50%, #fff0a7 0 35%, transparent 38%),
    radial-gradient(circle at 70% 50%, #fff 0 35%, transparent 38%);
}
body[data-theme="cozy"] .welcome-panel h3 { color: #fff; text-shadow: 0 3px 18px rgba(111, 56, 103, .16); }
body[data-theme="cozy"] .welcome-copy { color: #fff8fc; }
body[data-theme="cozy"] .progress-ornament {
  opacity: .28;
  filter: drop-shadow(0 0 9px rgba(255, 255, 255, .2));
}

body[data-theme="cozy"] .metric-card,
body[data-theme="cozy"] .panel,
body[data-theme="cozy"] .analysis-card {
  border-color: rgba(226, 205, 222, .76);
  border-radius: 19px 19px 19px 8px;
  background:
    radial-gradient(circle at 95% 3%, rgba(248, 214, 225, .37), transparent 18%),
    radial-gradient(circle at 3% 98%, rgba(211, 234, 224, .28), transparent 18%),
    linear-gradient(145deg, rgba(255, 255, 255, .98), rgba(255, 250, 248, .97));
  box-shadow: 0 13px 35px rgba(125, 81, 118, .08), inset 0 1px 0 rgba(255, 255, 255, .92);
}
body[data-theme="cozy"] .panel::before {
  height: 3px;
  opacity: .68;
  background: linear-gradient(90deg, transparent, #ef9ca5 24%, #c996c8 57%, #8ec8ba 78%, transparent);
}
body[data-theme="cozy"] .panel::after {
  width: 19px;
  height: 19px;
  border-right-color: #daa0bc;
  border-bottom-color: #91c3b6;
  border-radius: 0 0 8px 0;
}
body[data-theme="cozy"] .metric-card::before {
  height: 3px;
  background: linear-gradient(90deg, transparent, #ef9ca5, #c996c8, #8ec8ba, transparent);
}
body[data-theme="cozy"] .metric-card::after {
  border-color: rgba(222, 151, 181, .14);
  border-radius: 48% 52% 58% 42%;
  background:
    radial-gradient(circle, rgba(232, 132, 157, .15) 0 2px, transparent 3px),
    linear-gradient(145deg, rgba(246, 218, 226, .28), rgba(215, 235, 226, .2));
  background-size: 13px 13px, auto;
  transform: rotate(12deg);
}
body[data-theme="cozy"] .metric-card:hover,
body[data-theme="cozy"] .analysis-card:hover {
  border-color: rgba(217, 154, 184, .56);
  box-shadow: 0 22px 50px rgba(142, 86, 127, .14), 0 0 0 1px rgba(255, 255, 255, .65);
}
body[data-theme="cozy"] .metric-card strong,
body[data-theme="cozy"] .analysis-card strong { color: #59415f; text-shadow: 0 5px 18px rgba(171, 105, 144, .09); }
body[data-theme="cozy"] .metric-icon {
  border-color: rgba(218, 164, 190, .18);
  border-radius: 13px 13px 13px 5px;
  box-shadow: 0 6px 15px rgba(158, 102, 144, .09), inset 0 1px 0 rgba(255, 255, 255, .75);
}

body[data-theme="cozy"] .primary-button {
  border-color: rgba(255, 255, 255, .44);
  border-radius: 12px 12px 12px 5px;
  background:
    radial-gradient(circle at 86% 18%, rgba(255, 255, 255, .25), transparent 24%),
    linear-gradient(110deg, #e78490, #c878ac 58%, #9c86ca);
  box-shadow: 0 8px 18px rgba(180, 97, 142, .22), inset 0 1px 0 rgba(255, 255, 255, .24);
}
body[data-theme="cozy"] .primary-button:hover {
  border-color: rgba(255, 255, 255, .7);
  background:
    radial-gradient(circle at 80% 20%, rgba(255, 255, 255, .3), transparent 26%),
    linear-gradient(110deg, #df7786, #ba6fa4 58%, #8c78bb);
  box-shadow: 0 12px 25px rgba(173, 88, 133, .27);
}
body[data-theme="cozy"] .secondary-button {
  color: #765b75;
  border-color: #e8d7e2;
  border-radius: 11px 11px 11px 5px;
  background:
    radial-gradient(circle at 86% 18%, rgba(255, 255, 255, .9), transparent 28%),
    linear-gradient(145deg, #fffaf8, #f6eaf2);
}
body[data-theme="cozy"] .secondary-button:hover {
  color: #9d5576;
  border-color: #dbb9cc;
  background: #fff3f6;
  box-shadow: 0 6px 15px rgba(152, 94, 135, .08);
}
body[data-theme="cozy"] .text-button { color: #b65f86; }
body[data-theme="cozy"] .text-button:hover { color: #5c9d91; text-shadow: 0 0 11px rgba(86, 172, 158, .13); }

body[data-theme="cozy"] .filter-bar {
  border-color: rgba(226, 202, 219, .72);
  border-radius: 16px 16px 16px 7px;
  background:
    radial-gradient(circle at 94% 20%, rgba(255, 222, 230, .42), transparent 18%),
    linear-gradient(90deg, rgba(255, 252, 249, .96), rgba(251, 245, 255, .95));
  box-shadow: 0 10px 25px rgba(125, 81, 118, .055), inset 4px 0 0 rgba(225, 132, 158, .55);
}
body[data-theme="cozy"] .search-box,
body[data-theme="cozy"] .select-filter select,
body[data-theme="cozy"] .date-filter input,
body[data-theme="cozy"] .month-filter input {
  color: #665168;
  border-color: #e5d6e0;
  background:
    radial-gradient(circle at 92% 18%, rgba(246, 219, 228, .34), transparent 22%),
    rgba(255, 255, 255, .92);
}
body[data-theme="cozy"] .search-box:focus-within {
  border-color: #d393b4;
  box-shadow: 0 0 0 3px rgba(214, 131, 170, .11), 0 0 15px rgba(107, 183, 169, .05);
}
body[data-theme="cozy"] .record-count {
  color: #80627c;
  border-color: #eadbe5;
  background:
    radial-gradient(circle at 85% 20%, rgba(255, 255, 255, .9), transparent 24%),
    linear-gradient(145deg, #f7eaf1, #f1edf8);
}

body[data-theme="cozy"] th {
  color: #775f77;
  background:
    radial-gradient(circle at 94% 12%, rgba(255, 255, 255, .8), transparent 18%),
    linear-gradient(180deg, #fbf0f5, #f6ecf5);
  border-bottom-color: #eadbe5;
}
body[data-theme="cozy"] .table-wrap thead th {
  box-shadow: inset 0 -1px 0 #eadbe5, inset 0 2px 0 rgba(226, 137, 164, .08);
}
body[data-theme="cozy"] td { color: #594b61; border-bottom-color: #f0e7ed; }
body[data-theme="cozy"] tbody tr:nth-child(even) td { background: rgba(255, 250, 248, .66); }
body[data-theme="cozy"] tbody tr:hover td {
  color: #5f4362;
  background:
    linear-gradient(90deg, rgba(255, 235, 241, .76), rgba(241, 236, 251, .67) 58%, rgba(234, 248, 243, .64));
}
body[data-theme="cozy"] .num-cell { color: #745177; }
body[data-theme="cozy"] .insurance-num { color: #478f83; text-shadow: 0 0 10px rgba(80, 169, 155, .08); }
body[data-theme="cozy"] .brand-pill,
body[data-theme="cozy"] .role-pill,
body[data-theme="cozy"] .status-pill,
body[data-theme="cozy"] .goal-status-pill,
body[data-theme="cozy"] .attendance-status-pill {
  border-color: rgba(210, 157, 184, .14);
  border-radius: 8px 8px 8px 4px;
}
body[data-theme="cozy"] .action-button { color: #ae5d82; }
body[data-theme="cozy"] .action-button:hover { color: #8f466a; background: #fff0f5; box-shadow: 0 0 11px rgba(179, 91, 132, .08); }

body[data-theme="cozy"] .modal {
  background:
    radial-gradient(ellipse at 12% 14%, rgba(255, 255, 255, .23) 0 4%, transparent 4.4%),
    radial-gradient(ellipse at 18% 15%, rgba(255, 255, 255, .17) 0 6%, transparent 6.4%),
    radial-gradient(circle at 84% 82%, rgba(214, 158, 191, .15), transparent 24%),
    rgba(76, 53, 81, .56);
}
body[data-theme="cozy"] .modal-card {
  border-color: rgba(232, 192, 214, .72);
  border-radius: 22px 22px 22px 9px;
  background:
    radial-gradient(circle at 96% 2%, rgba(248, 213, 225, .42), transparent 18%),
    radial-gradient(circle at 3% 98%, rgba(211, 235, 226, .28), transparent 18%),
    linear-gradient(145deg, rgba(255, 255, 255, .99), rgba(255, 249, 248, .99));
  box-shadow: 0 35px 95px rgba(69, 41, 70, .32), 0 0 0 1px rgba(255, 255, 255, .65);
}
body[data-theme="cozy"] .modal-heading { border-bottom-color: #eddee7; }
body[data-theme="cozy"] .modal-heading::before { background: linear-gradient(90deg, #ed8d9c, #c986bb, #83baad); }
body[data-theme="cozy"] .modal-heading h3 { color: #59425b; }
body[data-theme="cozy"] .modal input,
body[data-theme="cozy"] .modal select,
body[data-theme="cozy"] .modal textarea,
body[data-theme="cozy"] .attendance-settings-form input,
body[data-theme="cozy"] .attendance-inline-form input,
body[data-theme="cozy"] .attendance-inline-form select,
body[data-theme="cozy"] .attendance-inline-form textarea {
  color: #614f64;
  border-color: #e5d6e0;
  background:
    radial-gradient(circle at 95% 10%, rgba(246, 218, 229, .28), transparent 20%),
    #fff;
}
body[data-theme="cozy"] .modal input:focus,
body[data-theme="cozy"] .modal select:focus,
body[data-theme="cozy"] .modal textarea:focus,
body[data-theme="cozy"] .attendance-settings-form input:focus,
body[data-theme="cozy"] .attendance-inline-form input:focus,
body[data-theme="cozy"] .attendance-inline-form select:focus,
body[data-theme="cozy"] .attendance-inline-form textarea:focus {
  border-color: #d18daf;
  box-shadow: 0 0 0 3px rgba(213, 132, 171, .11), 0 0 16px rgba(91, 178, 162, .05);
}
body[data-theme="cozy"] .toast {
  color: #fff;
  border-color: rgba(255, 255, 255, .3);
  background:
    radial-gradient(circle at 88% 18%, rgba(255, 255, 255, .22), transparent 22%),
    linear-gradient(105deg, #9a5b82, #b96f94 55%, #5c9e94);
  box-shadow: 0 18px 42px rgba(95, 51, 81, .28);
}

body[data-theme="cozy"] .login-screen {
  background:
    radial-gradient(ellipse at 8% 10%, rgba(255, 255, 255, .85) 0 5%, transparent 5.4%),
    radial-gradient(ellipse at 14% 11%, rgba(255, 255, 255, .67) 0 8%, transparent 8.4%),
    radial-gradient(ellipse at 86% 16%, rgba(255, 255, 255, .72) 0 5%, transparent 5.4%),
    radial-gradient(ellipse at 91% 18%, rgba(255, 255, 255, .58) 0 7%, transparent 7.4%),
    radial-gradient(circle at 18% 82%, rgba(255, 206, 177, .43), transparent 28%),
    radial-gradient(circle at 83% 81%, rgba(179, 222, 210, .4), transparent 29%),
    linear-gradient(145deg, #f7c9d5, #d9c8ed 52%, #b9ded6);
}
body[data-theme="cozy"] .login-screen::before,
body[data-theme="cozy"] .login-screen::after { border-color: rgba(255, 255, 255, .26); }
body[data-theme="cozy"] .login-card {
  border-color: rgba(255, 255, 255, .73);
  border-radius: 25px 25px 25px 10px;
  box-shadow: 0 38px 95px rgba(98, 61, 96, .3), 0 0 0 5px rgba(255, 255, 255, .12);
}
body[data-theme="cozy"] .login-card::before {
  height: 3px;
  background: linear-gradient(90deg, transparent, #ef939e 22%, #c488bd 58%, #83bfae 78%, transparent);
  box-shadow: none;
}
body[data-theme="cozy"] .login-card-top {
  color: #5a435d;
  border-bottom-color: rgba(225, 192, 211, .55);
  background:
    radial-gradient(circle at 88% 15%, rgba(255, 255, 255, .84), transparent 22%),
    linear-gradient(135deg, #fff5f6, #f6eafa 58%, #eef8f4);
}
body[data-theme="cozy"] .login-card-top .eyebrow { color: #bd7293; }
body[data-theme="cozy"] .login-card-top h1 { color: #59425b; }
body[data-theme="cozy"] .login-theme-switch {
  border-color: #ead6e3;
  background:
    radial-gradient(circle at 90% 15%, rgba(255, 255, 255, .82), transparent 22%),
    rgba(246, 233, 242, .72);
}
body[data-theme="cozy"] .login-theme-switch .theme-button { color: #8e7089; }
body[data-theme="cozy"] .login-theme-switch .theme-button:hover { color: #704e6a; background: rgba(255, 255, 255, .7); }
body[data-theme="cozy"] .login-theme-switch .theme-button.active {
  color: #fff;
  background:
    radial-gradient(circle at 85% 18%, rgba(255, 255, 255, .26), transparent 24%),
    linear-gradient(110deg, #e48391, #c276ac 60%, #7eaea3);
}
body[data-theme="cozy"] .login-card .login-lang-button {
  color: #92768d;
  background: rgba(245, 231, 240, .76);
}
body[data-theme="cozy"] .login-card .login-lang-button.active {
  color: #fff;
  background: linear-gradient(110deg, #de7d8b, #b76ca0);
  box-shadow: 0 4px 10px rgba(175, 95, 140, .17);
}
body[data-theme="cozy"] .login-form-panel {
  background:
    radial-gradient(circle, rgba(226, 156, 181, .09) 0 2px, transparent 3px),
    radial-gradient(circle at 95% 5%, rgba(244, 209, 220, .38), transparent 18%),
    linear-gradient(145deg, #fff, #fffaf8);
  background-position: 0 0, 0 0, 0 0;
  background-size: 27px 27px, auto, auto;
}
body[data-theme="cozy"] .login-shield {
  border-color: rgba(255, 255, 255, .72);
  border-radius: 14px 14px 14px 5px;
  background:
    radial-gradient(circle at 28% 20%, rgba(255, 255, 255, .32), transparent 20%),
    linear-gradient(145deg, #ed9098, #c477aa 58%, #70aa9e);
  box-shadow: 0 0 0 4px rgba(228, 144, 168, .08), 0 9px 20px rgba(172, 91, 135, .2);
}
body[data-theme="cozy"] .login-kicker { color: #c16b8f; }
body[data-theme="cozy"] .login-card .login-form-panel h2 { color: #543f58; }
body[data-theme="cozy"] .login-card input {
  border-color: #e5d5df;
  background:
    radial-gradient(circle at 95% 12%, rgba(246, 216, 227, .32), transparent 20%),
    #fffcfb;
}
body[data-theme="cozy"] .login-card input:focus {
  border-color: #d28daf;
  box-shadow: 0 0 0 4px rgba(213, 132, 171, .11), 0 0 16px rgba(94, 176, 161, .05);
}

body[data-theme="cozy"] .rank-fill,
body[data-theme="cozy"] .report-progress-track span,
body[data-theme="cozy"] .goal-progress-track span {
  background: linear-gradient(90deg, #e68898, #bd7aaf 58%, #6fb0a3);
  box-shadow: 0 0 11px rgba(195, 113, 164, .18);
}
body[data-theme="cozy"] .chart-line-phone { stroke: #b778af; filter: drop-shadow(0 0 3px rgba(183, 120, 175, .2)); }
body[data-theme="cozy"] .chart-line-insurance { stroke: #5aa99c; filter: drop-shadow(0 0 3px rgba(90, 169, 156, .22)); }
body[data-theme="cozy"] .chart-dot-phone { stroke: #b778af; }
body[data-theme="cozy"] .chart-dot-insurance { stroke: #5aa99c; }
body[data-theme="cozy"] .leaflet-map {
  border-color: rgba(218, 183, 205, .58);
  border-radius: 17px 17px 17px 7px;
  box-shadow: inset 0 0 25px rgba(149, 97, 139, .04), 0 10px 23px rgba(120, 78, 114, .08);
}
body[data-theme="cozy"] .attendance-calendar-day {
  border-radius: 12px 12px 12px 5px;
  background:
    radial-gradient(circle at 90% 10%, rgba(242, 209, 222, .27), transparent 24%),
    #fffaf8;
}
body[data-theme="cozy"] .attendance-calendar-day.is-today {
  border-color: #d188aa;
  box-shadow: inset 0 0 0 1px #d188aa, 0 0 15px rgba(199, 120, 165, .11);
  background: linear-gradient(145deg, #fff0f5, #eff9f5);
}
body[data-theme="cozy"] .weekly-goal-flag::after {
  opacity: .13;
  background:
    radial-gradient(ellipse at center, rgba(224, 128, 158, .7) 0 24%, transparent 27%),
    radial-gradient(circle, rgba(255, 255, 255, .9) 0 2px, transparent 3px);
  background-size: 18px 22px, 26px 26px;
}
body[data-theme="cozy"] .local-mode-banner {
  color: #68465f;
  border-bottom-color: rgba(204, 136, 169, .25);
  background:
    radial-gradient(circle at 10% 20%, rgba(255, 255, 255, .55), transparent 12%),
    radial-gradient(circle at 90% 20%, rgba(255, 255, 255, .45), transparent 12%),
    linear-gradient(90deg, #ffd3dc, #ead4f4 48%, #c8e8df);
  box-shadow: 0 4px 14px rgba(125, 75, 111, .12);
}

@keyframes cozyFloat {
  0%, 100% { transform: translateY(0) rotate(-8deg); }
  50% { transform: translateY(-8px) rotate(-5deg); }
}
@keyframes cozyTwinkle {
  0%, 100% { opacity: .5; transform: translateY(0); }
  50% { opacity: .86; transform: translateY(-5px); }
}

@media (max-width: 720px) {
  .theme-switch { flex: 0 0 auto; }
  .theme-switch .theme-button { width: 33px; padding: 5px; }
  .theme-switch .theme-button > span:last-child { display: none; }
  .login-card-top { align-items: flex-start; }
  .login-header-controls { gap: 6px; }
  .login-theme-switch .theme-button { padding: 5px 6px; }
  .topbar { gap: 8px; padding-top: 10px; padding-bottom: 10px; }
  .topbar-right { width: 100%; flex-wrap: wrap; }
  .user-menu { margin-left: auto; }
  body[data-theme="cozy"] { background-attachment: scroll; }
  body[data-theme="cozy"]::before { background-size: 68px 80px, 96px 108px, 58px 58px, 135px 135px; }
  body[data-theme="cozy"] .sidebar {
    background:
      radial-gradient(circle at 12% 10%, rgba(255, 255, 255, .75) 0 5%, transparent 5.4%),
      radial-gradient(circle at 87% 80%, rgba(189, 229, 218, .3), transparent 22%),
      linear-gradient(105deg, #fff1f4, #f6e8f6 60%, #e7f3ef);
  }
  body[data-theme="cozy"] .sidebar::before {
    background: linear-gradient(90deg, transparent, rgba(231, 129, 153, .58), rgba(132, 186, 173, .52), transparent);
  }
  body[data-theme="cozy"] .welcome-panel { border-radius: 19px 19px 19px 8px; }
  body[data-theme="cozy"] .welcome-panel::before { right: 18px; font-size: 14px; }
}

@media (max-width: 440px) {
  .login-card-top { display: grid; gap: 16px; }
  .login-header-controls { width: 100%; display: flex; align-items: center; justify-content: space-between; }
  .login-theme-switch .theme-button > span:last-child { display: none; }
  #quick-report-button { flex: 1 1 120px; }
}

/* V52 admin theme: floating rounded header */
.topbar {
  top: 14px;
  min-height: 84px;
  margin: 14px 0 0;
  padding: 0 20px;
  overflow: hidden;
  border: 1px solid rgba(158, 177, 214, .38);
  border-radius: 18px;
  background:
    radial-gradient(circle at 92% 10%, rgba(119, 171, 245, .11), transparent 22%),
    linear-gradient(105deg, rgba(250, 252, 255, .96), rgba(241, 247, 253, .96));
  box-shadow: 0 12px 30px rgba(28, 48, 91, .085), inset 0 1px 0 rgba(255, 255, 255, .9);
}
.topbar::before {
  content: "";
  position: absolute;
  top: 0;
  right: 22px;
  left: 22px;
  height: 2px;
  pointer-events: none;
  opacity: .7;
  background: linear-gradient(90deg, transparent, #6689f4 28%, #10c8bd 68%, transparent);
}
.topbar::after {
  right: 20px;
  bottom: 0;
  left: 20px;
}
.local-mode-banner:not([hidden]) ~ .app-shell .topbar { top: 43px; }
body[data-theme="cozy"] .topbar {
  border-color: rgba(222, 183, 208, .58);
  border-radius: 22px 22px 22px 10px;
  background:
    radial-gradient(circle at 94% 12%, rgba(255, 220, 230, .58), transparent 21%),
    radial-gradient(circle at 5% 90%, rgba(213, 237, 228, .35), transparent 19%),
    linear-gradient(105deg, rgba(255, 252, 249, .97), rgba(250, 242, 253, .97));
  box-shadow: 0 12px 30px rgba(126, 79, 119, .095), inset 0 1px 0 rgba(255, 255, 255, .92);
}
body[data-theme="cozy"] .topbar::before {
  background: linear-gradient(90deg, transparent, #ef9ca5 24%, #c996c8 57%, #8ec8ba 78%, transparent);
}

@media (max-width: 720px) {
  .topbar {
    top: auto;
    margin-top: 10px;
    padding: 13px 14px;
    overflow: visible;
    border-radius: 16px;
  }
  .local-mode-banner:not([hidden]) ~ .app-shell .topbar { top: auto; }
  body[data-theme="cozy"] .topbar { border-radius: 18px 18px 18px 8px; }
}

/* V53 supervisor KPI slider theme accents */
.supervisor-coverage-target[type="range"]::-webkit-slider-runnable-track {
  background: linear-gradient(to right, #4e73ff 0%, #13c8c1 var(--coverage-progress), rgba(145, 166, 202, .27) var(--coverage-progress), rgba(145, 166, 202, .27) 100%);
}
.supervisor-coverage-target[type="range"]::-webkit-slider-thumb,
.supervisor-coverage-target[type="range"]::-moz-range-thumb {
  background: linear-gradient(145deg, #4e73ff, #13c8c1);
}
.supervisor-coverage-target[type="range"]::-moz-range-progress {
  background: linear-gradient(90deg, #4e73ff, #13c8c1);
}
.coverage-slider-value {
  border-color: rgba(91, 122, 210, .26);
  background: rgba(236, 244, 255, .78);
  color: #2f4c9c;
}
body[data-theme="cozy"] .supervisor-coverage-target[type="range"]::-webkit-slider-runnable-track {
  background: linear-gradient(to right, #e37f9a 0%, #a990d2 var(--coverage-progress), rgba(217, 205, 220, .5) var(--coverage-progress), rgba(217, 205, 220, .5) 100%);
}
body[data-theme="cozy"] .supervisor-coverage-target[type="range"]::-webkit-slider-thumb,
body[data-theme="cozy"] .supervisor-coverage-target[type="range"]::-moz-range-thumb {
  background: linear-gradient(145deg, #e37f9a, #9acabb);
}
body[data-theme="cozy"] .supervisor-coverage-target[type="range"]::-moz-range-progress {
  background: linear-gradient(90deg, #e37f9a, #a990d2);
}
body[data-theme="cozy"] .coverage-slider-value {
  border-color: rgba(207, 138, 176, .34);
  background: rgba(255, 242, 248, .84);
  color: #9d4e74;
}
