:root {
  color-scheme: dark;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  --bg-primary: #0f1117;
  --bg-secondary: #1a1d27;
  --bg-card: #20232e;
  --bg-hover: #2a2d3a;
  --border: #2e3147;
  --accent: #6c63ff;
  --accent-hover: #5a52e0;
  --accent-glow: rgba(108, 99, 255, 0.18);
  --text-primary: #f0f2ff;
  --text-secondary: #8b91b0;
  --text-muted: #555a75;
  --success: #22c55e;
  --warning: #f59e0b;
  --danger: #ef4444;
  --info: #3b82f6;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --shadow-card: 0 2px 16px rgba(0, 0, 0, 0.35);
  --shadow-elevated: 0 8px 40px rgba(0, 0, 0, 0.55);
  --font-sans: Inter, "Segoe UI", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", "Fira Code", monospace;
  --sidebar-width: 220px;
  --ink: var(--text-primary);
  --muted: var(--text-secondary);
  --line: var(--border);
  --panel: var(--bg-card);
  --canvas: var(--bg-primary);
  --brand: var(--accent);
  --brand-dark: var(--accent-hover);
  --warn: var(--warning);
  --soft: var(--bg-secondary);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--canvas);
  color: var(--ink);
}

body[data-role-theme="owner"] {
  --canvas: #0f1117;
  --brand: #6c63ff;
  --brand-dark: #5a52e0;
  --soft: #1a1d27;
  --line: #2e3147;
}

body[data-role-theme="garv"],
body[data-role-theme="grav"] {
  --canvas: #0f1117;
  --brand: #3b82f6;
  --brand-dark: #2563eb;
  --soft: #1a1d27;
  --line: #2e3147;
}

body[data-role-theme="preeti"] {
  --canvas: #0f1117;
  --brand: #3b82f6;
  --brand-dark: #2563eb;
  --soft: #1a1d27;
  --line: #2e3147;
}

body[data-role-theme="jignesh"] {
  --canvas: #0f1117;
  --brand: #3b82f6;
  --brand-dark: #2563eb;
  --soft: #1a1d27;
  --line: #2e3147;
}

body[data-ui-theme="light"] {
  color-scheme: light;
  --bg-primary: #f6f8fc;
  --bg-secondary: #eef2f8;
  --bg-card: #ffffff;
  --bg-hover: #e8eef7;
  --border: #d5dceb;
  --text-primary: #111827;
  --text-secondary: #526077;
  --text-muted: #78839a;
  --canvas: #f6f8fc;
  --panel: #ffffff;
  --soft: #eef2f8;
  --ink: #111827;
  --muted: #526077;
  --line: #d5dceb;
  --shadow-card: 0 8px 26px rgba(15, 23, 42, 0.08);
}

.is-hidden {
  display: none !important;
}

[hidden] {
  display: none !important;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0;
}

.topbar,
.section-head,
.task-meta,
.task-actions {
  display: flex;
  align-items: center;
}

.task-meta,
.task-actions {
  flex-wrap: wrap;
  min-width: 0;
}

.topbar {
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--brand);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1;
}

h2 {
  margin-bottom: 16px;
  font-size: 1.15rem;
}

.role-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.role-tab {
  min-width: 96px;
  border: 0;
  border-right: 1px solid var(--line);
  background: transparent;
  padding: 10px 14px;
  color: var(--muted);
  font-weight: 800;
}

.role-tab:last-child {
  border-right: 0;
}

.role-tab.active {
  background: var(--brand);
  color: white;
}

.notice {
  margin-bottom: 18px;
  border: 1px solid #efd3b9;
  border-radius: 8px;
  background: #fff7ed;
  padding: 12px 14px;
  color: var(--warn);
  line-height: 1.45;
}

.layout {
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 18px;
}

.panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 18px;
  box-shadow: 0 16px 36px rgba(23, 33, 31, 0.06);
}

.filter-bar {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  align-items: end;
  margin-bottom: 16px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
}

.attendance-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(360px, 0.9fr);
  gap: 18px;
  align-items: start;
}

.system-center {
  margin-bottom: 18px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(255, 255, 255, 0.78)),
    linear-gradient(135deg, var(--soft), #fff);
}

.system-health-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.system-tile {
  display: grid;
  gap: 5px;
  min-height: 108px;
  align-content: start;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 12px;
}

.system-tile span {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
}

.system-tile strong {
  color: var(--brand-dark);
  font-size: 1.3rem;
  line-height: 1.05;
}

.system-tile small {
  color: var(--muted);
  overflow-wrap: anywhere;
}

.advanced-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
  gap: 16px;
}

.connection-matrix {
  display: grid;
  gap: 10px;
}

.connection-row {
  display: grid;
  grid-template-columns: minmax(160px, 0.75fr) minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  border: 1px solid var(--line);
  border-left: 4px solid #9aa4af;
  border-radius: 8px;
  background: #fff;
  padding: 12px;
}

.connection-row.connected {
  border-left-color: #16713b;
}

.connection-row.partial {
  border-left-color: var(--warn);
}

.connection-row strong,
.connection-row span {
  display: block;
}

.connection-row > div > span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.connection-checks {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.connection-checks span {
  border-radius: 999px;
  padding: 5px 8px;
  font-size: 0.76rem;
  font-weight: 900;
}

.task-form {
  display: grid;
  gap: 14px;
}

label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfb;
  color: var(--ink);
  padding: 11px 12px;
  outline: none;
}

textarea {
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(19, 111, 99, 0.12);
}

.primary,
.secondary,
.danger {
  min-height: 42px;
  border: 0;
  border-radius: 8px;
  padding: 10px 14px;
  font-weight: 800;
}

.primary {
  background: var(--brand);
  color: white;
}

.primary:hover {
  background: var(--brand-dark);
}

.secondary {
  background: var(--soft);
  color: var(--brand-dark);
}

.danger {
  background: #fae5e3;
  color: var(--danger);
}

.section-head {
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.section-head h2 {
  margin-bottom: 0;
}

#memberFilter {
  max-width: 170px;
}

.task-list {
  display: grid;
  gap: 12px;
}

.task-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fcfdfc;
  padding: 15px;
}

.task-card h3 {
  margin-bottom: 8px;
  font-size: 1rem;
}

.task-meta {
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.pill {
  border-radius: 999px;
  background: #edf1ef;
  color: var(--muted);
  padding: 5px 9px;
  font-size: 0.78rem;
  font-weight: 800;
}

.pill.status-submitted {
  background: #fff1db;
  color: #8a4c0d;
}

.pill.status-approved {
  background: #e5f7eb;
  color: #196b37;
}

.pill.status-rejected {
  background: #fae5e3;
  color: var(--danger);
}

.protected-brief {
  position: relative;
  margin-bottom: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--ink);
  padding: 12px;
  line-height: 1.5;
  user-select: text;
  -webkit-user-select: text;
}

.protected-brief::after {
  content: none;
}

.submission {
  margin: 12px 0;
  border-left: 3px solid var(--brand);
  padding-left: 12px;
  color: var(--muted);
  line-height: 1.45;
}

.submit-box {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.task-actions {
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.empty-state {
  border: 1px dashed var(--line);
  border-radius: 8px;
  padding: 32px 18px;
  text-align: center;
  color: var(--muted);
}

.empty-state h3 {
  color: var(--ink);
}

@media (max-width: 820px) {
  .shell {
    width: min(100% - 20px, 1180px);
    padding-top: 18px;
  }

  .topbar,
  .section-head {
    align-items: stretch;
    flex-direction: column;
  }

  .layout {
    grid-template-columns: 1fr;
  }

  .team-pie-wrap {
    grid-template-columns: 1fr;
  }

  #memberFilter {
    max-width: none;
  }
}

.app-shell {
  display: grid;
  grid-template-columns: 292px minmax(0, 1fr);
  min-height: 100vh;
}

.side-nav {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
  height: 100vh;
  border-right: 1px solid var(--line);
  background: #101816;
  color: #f8fffc;
  padding: 22px;
  overflow: hidden;
}

.brand-lock,
.session-tools,
.panel-head,
.field-row,
.audit-row {
  display: flex;
  align-items: center;
}

.brand-lock {
  gap: 12px;
  flex: 0 0 auto;
  margin-bottom: 10px;
}

.brand-lock p,
.secure-device p {
  margin-bottom: 2px;
}

.brand-lock p {
  color: #afc7c1;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.brand-mark {
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  border-radius: 8px;
  background: #05060a;
  border: 1px solid rgba(255, 255, 255, 0.12);
  overflow: hidden;
  padding: 4px;
}

.brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 6px;
}

.logo-light {
  display: none;
}

.nav-list {
  display: grid;
  gap: 8px;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding-right: 4px;
  scrollbar-width: thin;
}

.nav-item {
  width: 100%;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: #dce7e3;
  padding: 12px 13px;
  text-align: left;
  font-weight: 800;
}

.nav-item:hover,
.nav-item.active {
  border-color: rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.1);
  color: white;
}

.secure-device {
  position: static;
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  padding: 12px;
}

.secure-device p {
  color: #b6cbc5;
  font-size: 0.78rem;
  line-height: 1.4;
}

.status-dot {
  width: 10px;
  height: 10px;
  margin-top: 5px;
  border-radius: 999px;
  background: #26d06f;
  box-shadow: 0 0 0 5px rgba(38, 208, 111, 0.16);
}

.workspace {
  min-width: 0;
  padding: 24px;
}

.workspace .topbar {
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}

.session-tools {
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
  max-width: min(100%, 760px);
}

.current-user {
  display: grid;
  gap: 3px;
  min-width: 188px;
  max-width: 260px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  color: #111827;
  padding: 9px 11px;
}

.current-user strong {
  color: #111827;
  font-weight: 900;
}

.current-user span {
  color: #475569;
  font-size: 0.78rem;
  overflow-wrap: anywhere;
}

.login-screen {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 18px;
  background:
    linear-gradient(135deg, rgba(19, 111, 99, 0.08), rgba(54, 87, 168, 0.07)),
    var(--canvas);
}

.login-card {
  display: grid;
  width: min(100%, 460px);
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: #111827;
  box-shadow: 0 24px 60px rgba(20, 32, 29, 0.12);
  padding: 22px;
}

.login-logo-wrap {
  display: grid;
  place-items: center;
  width: 96px;
  height: 96px;
  margin: 0 auto 4px;
  border: 1px solid #d5dceb;
  border-radius: 8px;
  background: #ffffff;
  padding: 8px;
  overflow: hidden;
}

.login-logo-wrap img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 6px;
}

.login-card h1 {
  font-size: 2rem;
  color: #111827;
}

.login-card .eyebrow,
.login-card label,
.login-card .login-note,
.login-card .credential-help {
  color: #334155;
}

.login-card input,
.login-card select,
.login-card textarea {
  background: #f8fafc !important;
  color: #111827 !important;
  border-color: #cbd5e1;
}

.login-mode-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.login-mode {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbfa;
  padding: 11px;
  color: var(--muted);
  font-weight: 900;
  cursor: pointer;
}

.login-mode.active {
  background: var(--brand-dark);
  color: #fff;
  border-color: var(--brand-dark);
}

.login-note,
.credential-help {
  color: var(--muted);
  line-height: 1.45;
}

.credential-help {
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: #fbfdfc;
  padding: 11px;
  font-size: 0.85rem;
}

.login-error {
  min-height: 20px;
  color: var(--danger);
  font-weight: 800;
}

.face-box {
  display: grid;
  gap: 10px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: #fbfdfc;
  padding: 12px;
}

.face-box span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.85rem;
}

.face-box video {
  width: 100%;
  min-height: 150px;
  border-radius: 8px;
  background: #101816;
}

.face-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
}

.face-login-btn {
  min-height: 48px;
}

.apk-only[hidden],
body[data-secure-shell="false"] .apk-only {
  display: none !important;
}

.select-label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
  min-width: 150px;
}

#employeeSearchWrap {
  min-width: 210px;
}

.security-banner {
  margin-bottom: 18px;
  border: 1px solid #e6d0ae;
  border-radius: 8px;
  background: #fff8ed;
  padding: 12px 14px;
  color: #7c430d;
  line-height: 1.45;
}

.notification-bell {
  position: relative;
}

.notification-bell span {
  display: inline-grid;
  min-width: 22px;
  min-height: 22px;
  place-items: center;
  margin-left: 6px;
  border-radius: 999px;
  background: var(--danger);
  color: #fff;
  font-size: 0.72rem;
}

.header-notifications {
  position: sticky;
  top: 8px;
  z-index: 4;
  display: grid;
  gap: 8px;
  margin: -6px 0 14px auto;
  width: min(100%, 420px);
  max-height: 360px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 20px 46px rgba(20, 32, 29, 0.14);
  padding: 10px;
}

.header-notifications[hidden] {
  display: none;
}

.session-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  align-items: center;
  margin: -4px 0 14px;
  border: 1px solid #b8ded2;
  border-radius: 8px;
  background: #e8f7f2;
  color: #154f43;
  padding: 9px 12px;
  font-size: 0.86rem;
}

.session-strip[hidden] {
  display: none;
}

.session-strip em {
  margin-left: auto;
  color: #7c430d;
  font-style: normal;
  font-weight: 900;
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.metric-card,
.record-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 18px 48px rgba(20, 32, 29, 0.08);
}

.metric-card {
  padding: 16px;
}

.metric-card span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.metric-card strong {
  display: block;
  margin-top: 8px;
  font-size: 2rem;
}

.split-grid,
.terminal-grid,
.content-calendar-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  gap: 18px;
}

.terminal-grid {
  grid-template-columns: minmax(0, 1.08fr) minmax(340px, 0.92fr);
}

.content-calendar-layout {
  grid-template-columns: minmax(320px, 0.8fr) minmax(0, 1.2fr);
}

body[data-role-theme="owner"] .content-calendar-layout {
  grid-template-columns: minmax(360px, 0.78fr) minmax(0, 1.22fr);
}

body[data-role-theme="jignesh"] .content-calendar-layout {
  grid-template-columns: minmax(0, 1.05fr) minmax(360px, 0.95fr);
}

.content-calendar-list {
  max-height: calc(100vh - 190px);
  overflow: auto;
}

.calendar-occurrences {
  display: grid;
  gap: 10px;
  max-height: 560px;
  overflow: auto;
  padding-right: 4px;
}

.content-calendar-form-actions {
  position: sticky;
  top: 74px;
  z-index: 3;
  padding: 10px 0;
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.calendar-occurrences-head,
.content-calendar-group-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.calendar-occurrences-head span,
.content-calendar-group-head span {
  color: var(--text-secondary);
  font-size: 0.84rem;
  font-weight: 800;
}

.calendar-occurrence-row {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr);
  gap: 10px;
  align-items: stretch;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-secondary);
}

.calendar-occurrence-row:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.calendar-occurrence-row textarea {
  min-height: 132px;
}

.calendar-instruction-fields {
  display: grid;
  gap: 10px;
}

.calendar-mini-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.calendar-mini-grid span {
  display: grid;
  gap: 6px;
  color: var(--text-secondary);
  font-size: 0.78rem;
  font-weight: 800;
}

.calendar-date-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.calendar-date-meta span {
  padding: 4px 7px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text-secondary);
  font-size: 0.72rem;
  font-weight: 800;
}

.content-calendar-groups {
  display: grid;
  gap: 14px;
}

.content-calendar-group {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-card);
  color: var(--text-primary);
}

.calendar-date-sections {
  display: grid;
  gap: 10px;
}

.calendar-date-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-secondary);
  color: var(--text-primary);
}

.calendar-date-section p {
  margin: 6px 0 0;
  color: var(--text-primary);
  white-space: pre-wrap;
}

.calendar-festivals-list {
  display: grid;
  gap: 8px;
}

.calendar-section-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  margin: 6px 0;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
}

.calendar-section-head strong {
  font-size: 0.95rem;
}

.calendar-section-head span {
  font-size: 0.78rem;
  opacity: 0.85;
}

.calendar-section-head.past-head {
  background: var(--text-secondary);
}

.analytics-grid {
  display: grid;
  gap: 16px;
}

.analytics-employee-card {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg-card);
}

.analytics-employee-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

.analytics-employee-head h3 {
  margin: 0;
  font-size: 1rem;
}

.analytics-scores {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 8px;
}

.analytics-score-box {
  display: grid;
  gap: 2px;
  padding: 10px;
  border-radius: 8px;
  background: var(--bg-secondary);
  text-align: center;
}

.analytics-score-box .score-value {
  font-size: 1.3rem;
  font-weight: 700;
}

.analytics-score-box .score-label {
  font-size: 0.72rem;
  color: var(--text-secondary);
}

.salary-up {
  color: #22c55e;
}

.salary-down {
  color: #ef4444;
}

.analytics-daily-log {
  display: grid;
  gap: 4px;
  max-height: 200px;
  overflow-y: auto;
}

.analytics-day-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.82rem;
  background: var(--bg-secondary);
}

.festival-tile {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-secondary);
}

.festival-tile.festival-this-month {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 8%, var(--bg-card));
}

.festival-date {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--text-secondary);
  white-space: nowrap;
  min-width: 88px;
}

.festival-name {
  flex: 1;
  font-size: 0.92rem;
}

.pill-accent {
  background: var(--accent);
  color: #fff;
}

.database-viewer {
  max-height: 420px;
  overflow: auto;
  margin-top: 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #080a0f;
  color: #d9f99d;
  padding: 14px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  line-height: 1.45;
}

.sheet-table {
  min-width: 980px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-card);
}

.sheet-row {
  display: grid;
  grid-template-columns: 120px 110px minmax(180px, 1fr) minmax(260px, 1.45fr) 120px 150px;
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--border);
  background: transparent;
  color: var(--text-primary);
  padding: 0;
  text-align: left;
}

.sheet-row:last-child {
  border-bottom: 0;
}

.sheet-row span {
  min-width: 0;
  padding: 10px 12px;
  border-right: 1px solid var(--border);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sheet-row span:last-child {
  border-right: 0;
}

.sheet-actions {
  display: flex;
  gap: 6px;
  align-items: center;
}

.sheet-actions .secondary-btn,
.sheet-actions .danger-btn {
  min-height: 30px;
  padding: 6px 9px;
  font-size: 0.75rem;
}

.sheet-head {
  background: var(--bg-secondary);
  color: var(--text-secondary);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.content-calendar-row {
  cursor: pointer;
}

.content-calendar-row:hover {
  background: var(--bg-hover);
}

.working-line,
.calendar-tile.working {
  background: #e8f7f0;
  color: #16713b;
  font-weight: 900;
}

.panel-head {
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}

.form-grid,
.stack-list,
.team-grid,
.audit-list,
.command-list,
.performance-grid {
  display: grid;
  gap: 12px;
}

.performance-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.performance-score {
  display: block;
  margin: 6px 0 10px;
  color: var(--brand);
  font-size: 2.2rem;
}

.field-row {
  gap: 12px;
}

.field-row label {
  flex: 1;
}

.check-row {
  display: flex;
  align-items: center;
  gap: 9px;
}

.check-row input {
  width: auto;
}

.primary-btn,
.secondary-btn,
.ghost-btn,
.danger-btn {
  min-height: 41px;
  border: 0;
  border-radius: 8px;
  padding: 10px 13px;
  font-weight: 900;
}

.primary-btn {
  background: var(--brand);
  color: white;
}

.primary-btn:hover {
  background: var(--brand-dark);
}

.secondary-btn {
  background: var(--soft);
  color: var(--brand-dark);
}

.ghost-btn {
  border: 1px solid var(--line);
  background: white;
  color: #111827;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-icon {
  display: inline-grid;
  width: 18px;
  height: 18px;
  place-items: center;
  flex: 0 0 auto;
}

.btn-icon svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.notification-bell {
  color: #111827;
}

#notificationBell,
#themeToggle {
  width: 46px;
  min-width: 46px;
  padding: 10px;
}

.notification-bell #notificationCount {
  display: inline-grid;
  min-width: 22px;
  height: 22px;
  place-items: center;
  border-radius: 999px;
  background: var(--danger);
  color: #ffffff;
  font-size: 0.78rem;
  font-weight: 900;
  padding: 0 6px;
}

#notificationBell #notificationCount {
  position: absolute;
  transform: translate(14px, -13px);
}

#notificationBell,
#themeToggle {
  position: relative;
}

.danger-btn {
  background: #fae7e5;
  color: var(--danger);
}

.record-card {
  padding: 14px;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  cursor: default;
}

.record-card[data-action],
.metric-card,
.nav-item,
.calendar-tile,
.file-pill {
  cursor: pointer;
}

.notification-card.is-unread {
  border-color: color-mix(in srgb, var(--brand) 60%, var(--line));
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--brand) 35%, transparent);
}

.notification-card.is-read {
  opacity: 0.76;
}

.daily-submission-list {
  display: grid;
  gap: 7px;
  margin: 10px 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
}

.daily-submission-list strong {
  color: var(--ink);
}

.daily-submission-list .mini-row {
  display: grid;
  grid-template-columns: 92px 132px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
  padding: 7px 0;
  border-bottom: 1px solid color-mix(in srgb, var(--line) 68%, transparent);
}

.daily-submission-list .mini-row:last-child {
  border-bottom: 0;
}

.task-card-clean {
  display: grid;
  gap: 14px;
}

.task-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.task-card-head h3 {
  margin: 4px 0 0;
  font-size: 1.12rem;
  line-height: 1.25;
}

.employee-task-card {
  gap: 16px;
  padding: 18px;
}

.task-info-strip {
  gap: 8px;
}

.task-description-card {
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px solid color-mix(in srgb, var(--brand) 24%, var(--line));
  border-radius: 8px;
  background: color-mix(in srgb, var(--panel) 88%, var(--soft));
  color: var(--ink);
}

.task-description-card strong {
  color: var(--muted);
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0;
}

.task-description-card p {
  margin: 0;
  color: var(--ink);
  font-size: 0.98rem;
  line-height: 1.65;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.cycle-badge {
  display: inline-flex;
  max-width: 100%;
  padding: 5px 8px;
  border-radius: 8px;
  background: color-mix(in srgb, var(--brand) 16%, var(--soft));
  color: var(--ink);
  font-size: 0.74rem;
  font-weight: 800;
}

.file-download-list {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
}

.file-download-list strong {
  color: var(--ink);
}

.file-download-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 10px;
  align-items: center;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: var(--panel);
  text-decoration: none;
}

.file-download-item span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.file-download-item small {
  color: var(--muted);
}

.file-download-item b {
  color: var(--brand);
}

.danger-btn,
.logout-modal,
.present-toast,
.credential-help {
  color: #111827;
}

.compact-list {
  max-height: 420px;
  overflow: auto;
}

.compact-card {
  padding: 12px;
}

.owner-attendance-form {
  margin-bottom: 18px;
}

.permission-form {
  margin-top: 18px;
  border-top: 1px solid var(--line);
  padding-top: 16px;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.attendance-calendar {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin-bottom: 14px;
}

.calendar-month-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--brand-dark);
  color: #fff;
}

.calendar-month-head span {
  font-size: 0.84rem;
  font-weight: 800;
  opacity: 0.84;
}

.calendar-weekdays,
.calendar-month-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
}

.calendar-weekdays span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  text-align: center;
}

.attendance-day {
  display: grid;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  min-height: 132px;
  padding: 10px;
  align-content: start;
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.attendance-day:hover {
  border-color: var(--brand);
  box-shadow: 0 10px 22px rgba(23, 33, 31, 0.1);
  transform: translateY(-1px);
}

.attendance-day.selected {
  border-color: var(--brand);
  box-shadow: inset 0 0 0 2px var(--brand);
}

.attendance-day h3 {
  margin-bottom: 0;
  font-size: 0.9rem;
  color: var(--brand-dark);
}

.calendar-blank {
  background: transparent;
  border-color: transparent;
}

.attendance-day.holiday {
  background: #e4f7ec;
}

.calendar-line {
  display: grid;
  gap: 3px;
  border-radius: 8px;
  background: var(--soft);
  padding: 8px;
  font-size: 0.85rem;
}

.calendar-line span {
  display: inline-flex;
  width: fit-content;
  border-radius: 999px;
  padding: 3px 7px;
  font-size: 0.74rem;
  font-weight: 900;
}

.calendar-line small {
  color: var(--muted);
  line-height: 1.35;
}

.break-line {
  background: #fff1dd;
  color: var(--warn);
  font-weight: 900;
}

.holiday-line {
  background: #dff3e8;
  color: #16713b;
  font-weight: 900;
}

.leave-line,
.pill.leave {
  background: #e8e3f7;
  color: #553a93;
  font-weight: 900;
}

.attendance-detail-panel {
  position: sticky;
  top: 18px;
}

.day-detail-box {
  display: grid;
  gap: 12px;
}

.date-detail-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
  padding: 12px;
}

.date-detail-head strong {
  color: var(--brand-dark);
  font-size: 1.2rem;
}

.day-person-card {
  border-left: 4px solid var(--brand);
}

.calendar-tile {
  display: grid;
  gap: 5px;
  min-height: 104px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.calendar-tile.approved {
  background: #e4f7ec;
  border-color: rgba(22, 113, 59, 0.22);
}

.calendar-tile strong {
  color: var(--brand-dark);
}

.calendar-tile small {
  color: var(--muted);
  font-weight: 800;
}

.history-details {
  margin-top: 12px;
}

.history-details summary {
  cursor: pointer;
  color: var(--brand-dark);
  font-weight: 900;
}

.mini-history {
  display: grid;
  gap: 8px;
  margin: 12px 0;
}

.mini-row {
  display: grid;
  grid-template-columns: minmax(92px, 1fr) 78px minmax(0, 1.3fr) 34px 34px 34px;
  gap: 8px;
  align-items: center;
  padding: 8px;
  border-radius: 8px;
  background: var(--soft);
}

.mini-row button {
  min-height: 30px;
  padding: 6px;
}

.inline-attendance-calendar {
  display: grid;
  grid-template-columns: repeat(7, minmax(24px, 1fr));
  gap: 6px;
  margin: 12px 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.inline-weekday,
.inline-day {
  min-height: 28px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  font-size: 0.76rem;
  font-weight: 900;
}

.inline-weekday {
  color: var(--muted);
}

.inline-day {
  background: var(--soft);
}

.inline-day.empty {
  background: transparent;
}

.chat-list {
  display: grid;
  gap: 12px;
  max-height: 560px;
  overflow: auto;
}

.chat-bubble {
  width: min(82%, 640px);
  padding: 12px 14px;
  border-radius: 8px;
  background: var(--soft);
  border: 1px solid var(--line);
  color: var(--ink);
}

.chat-bubble.mine {
  justify-self: end;
  background: #e4f7ec;
  border-color: rgba(22, 113, 59, 0.18);
  color: #0f3b25;
}

.chat-bubble p {
  margin: 6px 0;
  color: inherit;
}

.chat-bubble span {
  color: var(--muted);
  font-size: 0.82rem;
}

.chat-bubble.mine span {
  color: #256c49;
}

.pill.approved {
  background: #e4f7ec;
  color: #16713b;
}

.owner-task-management {
  grid-template-columns: 1fr;
}

.present,
.pill.present {
  background: #e4f7ec;
  color: #16713b;
}

.late,
.pill.late {
  background: #fff1dd;
  color: var(--warn);
}

.absent,
.pill.absent {
  background: #fae7e5;
  color: var(--danger);
}

.pending,
.pill.pending {
  background: #eceff3;
  color: #5d6670;
}

.pill.submitted {
  background: #fff1dd;
  color: var(--warn);
}

.pill.rejected,
.pill.critical {
  background: #fae7e5;
  color: var(--danger);
}

.pill.high {
  background: #fff1dd;
  color: var(--warn);
}

.secure-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: #e4f7ec;
  color: #16713b;
  padding: 5px 9px;
  font-size: 0.76rem;
  font-weight: 900;
}

.protected-viewer {
  position: relative;
  overflow: visible;
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--ink);
  padding: 13px;
  line-height: 1.55;
  user-select: text;
  -webkit-user-select: text;
}

.protected-viewer::after {
  content: none;
}

.protected-viewer::before {
  content: none;
}

.submission-box {
  margin-top: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--soft) 72%, transparent);
}

.session-lock-note {
  border: 1px solid #e6d0ae;
  border-radius: 8px;
  background: #fff8ed;
  color: #7c430d;
  padding: 10px;
  font-weight: 900;
}

.protection-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.protection-grid div {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdfc;
  padding: 13px;
}

.protection-grid span {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.4;
}

.safe-terminal,
.command-output {
  overflow: auto;
  border-radius: 8px;
  background: #0d1513;
  color: #e9fff8;
  font-family: "Cascadia Code", "SFMono-Regular", Consolas, monospace;
  font-size: 0.85rem;
}

.safe-terminal {
  min-height: 230px;
  margin-top: 14px;
  padding: 13px;
}

.terminal-line {
  margin-bottom: 8px;
  white-space: pre-wrap;
}

.terminal-line.muted {
  color: #9fb5af;
}

.command-output {
  min-height: 260px;
  max-width: 100%;
  max-height: 360px;
  margin: 0;
  padding: 13px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.ai-preview-frame {
  width: 100%;
  min-height: 360px;
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.terminal-result-panel {
  margin: 12px 0;
}

.terminal-owner-section {
  display: grid;
  gap: 10px;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-secondary);
}

.terminal-owner-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--text-primary);
}

.terminal-owner-head span {
  color: var(--text-secondary);
  font-size: 0.82rem;
  font-weight: 800;
}

.terminal-owner-proof span {
  font-family: var(--font-mono);
  white-space: pre-wrap;
}

.terminal-activity-card {
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  background: var(--bg-card);
}

.ai-activity-list {
  display: grid;
  gap: 10px;
  min-width: 0;
  max-width: 100%;
}

.ai-activity-row {
  display: grid;
  gap: 8px;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-card);
  padding: 11px 12px;
}

.ai-activity-row-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
}

.ai-activity-row-head span,
.ai-file-line {
  color: var(--text-secondary);
  font-size: 0.78rem;
  font-weight: 800;
}

.ai-command-line,
.ai-activity-summary {
  margin: 0;
  max-width: 100%;
  overflow: hidden;
  overflow-wrap: anywhere;
  display: -webkit-box;
  -webkit-box-orient: vertical;
}

.ai-command-line {
  -webkit-line-clamp: 2;
  color: var(--text-primary);
  font-weight: 800;
}

.ai-activity-summary {
  -webkit-line-clamp: 3;
  color: var(--text-secondary);
  line-height: 1.45;
}

.compact-meta {
  flex-wrap: wrap;
  gap: 6px;
}

.terminal-live-result {
  background: #111827;
  border-color: rgba(124, 58, 237, 0.42);
}

.terminal-preview-frame {
  min-height: 320px;
}

.terminal-command-form {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  margin: 12px 0;
  padding: 10px;
  border: 1px solid rgba(217, 249, 157, 0.22);
  border-radius: 8px;
  background: #080a0f;
  color: #d9f99d;
  font-family: var(--font-mono);
}

.terminal-command-form input {
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: #e9fff8;
  font: inherit;
}

.terminal-command-form input::placeholder {
  color: #789188;
}

.diff-block {
  overflow: auto;
  max-width: 100%;
  max-height: 220px;
  margin: 12px 0 0;
  border-radius: 8px;
  background: #101816;
  color: #e8fff8;
  padding: 12px;
  font-family: "Cascadia Code", "SFMono-Regular", Consolas, monospace;
  font-size: 0.82rem;
  line-height: 1.5;
}

.workspace-proof {
  display: grid;
  gap: 5px;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  margin-top: 12px;
  border: 1px solid #b7d8ce;
  border-radius: 8px;
  background: #edf8f4;
  color: var(--brand-dark);
  padding: 11px 12px;
}

.workspace-proof span,
.workspace-proof small {
  color: var(--muted);
  overflow-wrap: anywhere;
}

.security-tools {
  margin-top: 18px;
}

.apk-build-box {
  display: grid;
  gap: 10px;
}

.mini-output {
  overflow: auto;
  min-height: 160px;
  margin: 0;
  border-radius: 8px;
  background: #101816;
  color: #e8fff8;
  padding: 12px;
  white-space: pre-wrap;
  font-family: "Cascadia Code", "SFMono-Regular", Consolas, monospace;
  font-size: 0.82rem;
}

.secure-lock-box {
  display: grid;
  gap: 7px;
  margin-top: 12px;
  border: 1px solid #e6d0ae;
  border-radius: 8px;
  background: #fff8ed;
  color: #7c430d;
  padding: 14px;
  line-height: 1.45;
}

.secure-lock-box span {
  color: #8a5a23;
}

.secure-locked-card {
  background:
    repeating-linear-gradient(135deg, rgba(14, 111, 97, 0.04) 0 10px, rgba(14, 111, 97, 0.08) 10px 20px),
    #ffffff;
}

.capture-guard [data-protected="true"] {
  color: transparent;
  text-shadow: none;
}

.capture-guard [data-protected="true"]::before {
  content: "Protected content hidden while capture risk is detected";
  display: block;
  color: #7c430d;
  font-weight: 900;
}

.blur-lock-overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: none;
  place-items: center;
  background: rgba(11, 18, 16, 0.86);
  color: white;
  text-align: center;
}

.blur-lock-overlay strong,
.blur-lock-overlay span {
  display: block;
}

.blur-lock-overlay strong {
  font-size: clamp(1.8rem, 4vw, 3.2rem);
}

.blur-lock-overlay span {
  margin-top: 8px;
  color: #c8d8d2;
}

.blur-lock-overlay button {
  margin-top: 18px;
  justify-self: center;
}

.capture-guard .blur-lock-overlay,
.offline-lock .blur-lock-overlay {
  display: grid;
}

.audit-row {
  align-items: flex-start;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  padding: 10px 0;
}

.audit-row:last-child {
  border-bottom: 0;
}

.audit-row time {
  min-width: 154px;
  color: var(--muted);
  font-size: 0.8rem;
}

.audit-row strong {
  display: block;
  margin-bottom: 3px;
}

.audit-row span {
  color: var(--muted);
}

@media (max-width: 1060px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .side-nav {
    position: static;
    height: auto;
  }

  .secure-device {
    position: static;
    margin-top: 18px;
  }

  .metric-grid,
  .split-grid,
  .terminal-grid,
  .content-calendar-layout,
  .performance-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  :root {
    --mobile-nav-height: 64px;
  }

  body {
    overflow-x: hidden;
  }

  .workspace {
    padding: 10px 10px calc(var(--mobile-nav-height) + 14px);
  }

  .workspace .topbar,
  .session-tools,
  .field-row,
  .panel-head {
    align-items: stretch;
    flex-direction: column;
  }

  .app-shell {
    display: block;
    min-height: 100dvh;
  }

  .side-nav {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 20;
    height: auto;
    border-right: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    padding: 7px 8px calc(7px + env(safe-area-inset-bottom));
    box-shadow: 0 -12px 28px rgba(8, 13, 12, 0.22);
  }

  .brand-lock {
    display: none;
  }

  .nav-list {
    display: grid;
    grid-auto-columns: minmax(78px, 1fr);
    grid-auto-flow: column;
    gap: 5px;
    overflow-x: auto;
    padding-bottom: 1px;
    scrollbar-width: none;
    scroll-snap-type: x mandatory;
  }

  .nav-list::-webkit-scrollbar {
    display: none;
  }

  .nav-item {
    width: auto;
    min-height: 48px;
    padding: 7px 8px;
    text-align: center;
    font-size: 0.72rem;
    line-height: 1.15;
    white-space: normal;
    scroll-snap-align: start;
  }

  .secure-device {
    display: none;
  }

  h1 {
    font-size: 1.45rem;
    line-height: 1.1;
  }

  h2 {
    margin-bottom: 10px;
    font-size: 1.02rem;
  }

  .workspace .topbar {
    gap: 9px;
    margin-bottom: 10px;
  }

  .session-tools {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    width: 100%;
  }

  .current-user {
    grid-column: 1 / -1;
    min-width: 0;
    padding: 7px 9px;
  }

  .select-label {
    font-size: 0.74rem;
  }

  input,
  select,
  textarea {
    min-height: 40px;
    padding: 9px 10px;
    font-size: 0.9rem;
  }

  .ghost-btn[data-action="logout"] {
    grid-column: 1 / -1;
  }

  .security-banner {
    margin-bottom: 12px;
    padding: 10px 11px;
    font-size: 0.86rem;
  }

  .panel {
    padding: 11px;
    box-shadow: 0 10px 24px rgba(23, 33, 31, 0.06);
  }

  .panel-head {
    gap: 8px;
    margin-bottom: 12px;
  }

  .metric-grid,
  .split-grid,
  .terminal-grid,
  .content-calendar-layout,
  .performance-grid {
    gap: 10px;
  }

  .metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-bottom: 10px;
  }

  .metric-card,
  .record-card {
    box-shadow: none;
  }

  .metric-card {
    padding: 12px;
  }

  .metric-card strong,
  .performance-score {
    font-size: 1.45rem;
  }

  .record-card {
    padding: 11px;
  }

  .calendar-occurrence-row,
  .calendar-date-section {
    grid-template-columns: 1fr;
  }

  .record-card h3 {
    margin-bottom: 6px;
    font-size: 0.96rem;
    line-height: 1.2;
  }

  .record-card p {
    margin-bottom: 9px;
    font-size: 0.88rem;
    line-height: 1.45;
  }

  .daily-submission-list .mini-row {
    grid-template-columns: 1fr;
  }

  .task-card-head,
  .file-download-item {
    grid-template-columns: 1fr;
    flex-direction: column;
  }

  .task-meta,
  .task-actions {
    gap: 6px;
  }

  .primary-btn,
  .secondary-btn,
  .ghost-btn,
  .danger-btn {
    width: 100%;
    min-height: 40px;
  }

  .pill,
  .secure-pill {
    max-width: 100%;
    padding: 4px 7px;
    font-size: 0.7rem;
    overflow-wrap: anywhere;
  }

  .form-grid,
  .stack-list,
  .team-grid,
  .audit-list,
  .command-list,
  .performance-grid {
    gap: 10px;
  }

  .protected-viewer,
  .secure-lock-box,
  .diff-block,
  .command-output,
  .mini-output,
  .safe-terminal {
    font-size: 0.82rem;
  }

  .protected-viewer::before {
    inset: -70%;
    font-size: 1rem;
    line-height: 2.2;
  }

  .audit-row {
    display: grid;
    gap: 5px;
  }

  .audit-row time {
    min-width: 0;
  }

  .login-screen {
    align-items: start;
    padding: 12px;
  }

  .login-card {
    padding: 16px;
  }

.login-card h1 {
    font-size: 1.55rem;
    line-height: 1.12;
  }
}

/* Header notifications should overlay from header, not push page content. */
.header-notifications {
  position: fixed !important;
  top: 76px !important;
  right: 18px !important;
  left: auto !important;
  z-index: 120 !important;
  width: min(420px, calc(100vw - 24px)) !important;
  max-height: min(70dvh, 460px) !important;
  margin: 0 !important;
  overflow: auto !important;
}

@media (min-width: 681px) {
  .header-notifications {
    top: 74px !important;
    right: 24px !important;
  }
}

@media (max-width: 680px) {
  .header-notifications {
    top: calc(env(safe-area-inset-top, 0px) + 74px) !important;
    right: 10px !important;
    left: 10px !important;
    width: auto !important;
    max-height: min(68dvh, 480px) !important;
  }
}

.hidden-unless-owner[hidden] {
  display: none;
}

.present-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--success, #16a34a);
  color: #fff;
  padding: 14px 22px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 9999;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.22);
  opacity: 0;
  transition: opacity 0.3s ease, transform 0.3s ease;
  font-size: 0.95rem;
  min-width: 260px;
  pointer-events: none;
}

.present-toast.toast-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.present-toast p,
.logout-modal p {
  margin: 4px 0 0;
}

.toast-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
  font-weight: 800;
}

.logout-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(5, 8, 15, 0.72);
  opacity: 0;
  transition: opacity 0.24s ease;
}

.logout-modal-overlay.modal-visible {
  opacity: 1;
}

.logout-modal {
  width: min(420px, 100%);
  padding: 26px;
  border: 1px solid var(--border, rgba(255, 255, 255, 0.12));
  border-radius: 16px;
  background: var(--panel, #fff);
  color: var(--text, #111827);
  text-align: center;
  box-shadow: 0 20px 70px rgba(0, 0, 0, 0.35);
}

.logout-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 52px;
  height: 52px;
  margin-bottom: 12px;
  padding: 0 14px;
  border-radius: 999px;
  background: rgba(108, 99, 255, 0.16);
  color: var(--accent, #6c63ff);
  font-weight: 800;
}

.app-shell {
  background: var(--bg-primary);
}

.side-nav {
  width: var(--sidebar-width);
  background: rgba(26, 29, 39, 0.96);
  border-right: 1px solid var(--border);
}

.brand-mark {
  background: radial-gradient(circle at 34% 24%, #f6c85f 0 28%, var(--accent) 29% 100%);
  border-radius: 12px;
  box-shadow: 0 0 0 5px var(--accent-glow);
  color: #101820;
}

.nav-item {
  border-radius: 999px;
  transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.nav-item.active {
  background: linear-gradient(135deg, var(--accent), var(--accent-hover));
  color: #fff;
  box-shadow: 0 0 24px var(--accent-glow);
}

.topbar {
  min-height: 56px;
  background: rgba(15, 17, 23, 0.78);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(12px);
}

.panel,
.record-card,
.metric-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
}

input,
select,
textarea {
  background: #151824;
  color: var(--text-primary);
  border-color: var(--border);
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  box-shadow: 0 0 0 3px var(--accent-glow);
  border-color: var(--accent);
}

.primary-btn {
  background: linear-gradient(135deg, var(--accent), var(--accent-hover));
  border-radius: var(--radius-sm);
}

.secondary-btn,
.ghost-btn {
  border-radius: var(--radius-sm);
}

.safe-terminal,
.command-output {
  position: relative;
  background: #080a0f;
  color: #d9f99d;
  font-family: var(--font-mono);
}

.safe-terminal::before,
.command-output::before {
  content: "";
  display: block;
  width: 42px;
  height: 10px;
  margin-bottom: 10px;
  background:
    radial-gradient(circle at 5px 5px, #ef4444 0 4px, transparent 5px),
    radial-gradient(circle at 21px 5px, #f59e0b 0 4px, transparent 5px),
    radial-gradient(circle at 37px 5px, #22c55e 0 4px, transparent 5px);
}

#aiFiles {
  border: 1px dashed var(--accent);
  padding: 18px;
  border-radius: var(--radius-md);
  background: rgba(108, 99, 255, 0.08);
}

.activity-feed,
.analytics-charts {
  display: grid;
  gap: 12px;
}

.activity-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: start;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-secondary);
}

.activity-dot {
  width: 10px;
  height: 10px;
  margin-top: 5px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 0 6px var(--accent-glow);
}

.activity-row p {
  margin: 4px 0 0;
  color: var(--text-secondary);
}

.chart-panel svg {
  width: 100%;
  max-height: 260px;
  height: auto;
}

.team-performance-panel {
  min-height: 0;
}

.team-pie-wrap {
  display: grid;
  grid-template-columns: minmax(280px, 520px);
  justify-content: center;
  gap: 0;
  align-items: center;
  padding: 4px 0 20px;
  min-height: 430px;
}

.team-pie-chart {
  width: min(100%, 500px);
  max-height: 500px;
  overflow: visible;
  justify-self: center;
  filter: drop-shadow(0 24px 34px rgba(0, 0, 0, 0.34));
}

.team-pie-shadow {
  fill: rgba(0, 0, 0, 0.3);
  filter: blur(10px);
}

.team-pie-slice {
  cursor: help;
  transform-origin: 150px 150px;
  animation: pieFloat3d 4.2s ease-in-out infinite;
  animation-delay: calc(var(--slice-index) * -0.55s);
  transition: transform 0.18s ease, filter 0.18s ease;
}

.team-pie-slice:hover,
.team-pie-slice:focus {
  transform: translateY(-8px) scale(1.045);
  filter: brightness(1.08) saturate(1.05);
  outline: none;
}

.team-pie-side {
  opacity: 0.98;
  filter: brightness(0.82);
}

.team-pie-top {
  stroke: rgba(255, 255, 255, 0.24);
  stroke-width: 1.2;
}

.team-pie-percent {
  fill: white;
  font-size: 33px;
  font-weight: 950;
  pointer-events: none;
  paint-order: stroke;
  stroke: rgba(15, 17, 23, 0.24);
  stroke-width: 4px;
}

@keyframes pieFloat3d {
  0%, 100% { transform: translateY(0) rotate(0.01deg); }
  50% { transform: translateY(-7px) rotate(0.01deg); }
}

.chart-track {
  fill: var(--bg-secondary);
}

.chart-bar {
  fill: var(--accent);
}

.chart-label {
  fill: var(--text-secondary);
  font-size: 11px;
}

.donut-track,
.donut-value {
  fill: none;
  stroke-width: 18;
}

.donut-track {
  stroke: var(--bg-secondary);
}

.donut-value {
  stroke: var(--success);
  transform: rotate(-90deg);
  transform-origin: 80px 80px;
}

.donut-number {
  fill: var(--text-primary);
  font-size: 28px;
  font-weight: 800;
}

.upload-progress {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--bg-secondary);
}

.upload-progress span {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--success));
  transition: width 0.2s ease;
}

.upload-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.preview-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 220px;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-secondary);
  overflow-wrap: anywhere;
}

.preview-item img {
  width: 42px;
  height: 42px;
  object-fit: cover;
  border-radius: 6px;
}

.attendance-day.present,
.pill.present {
  border-color: rgba(34, 197, 94, 0.7);
}

@media (max-width: 768px) {
  .side-nav {
    position: fixed;
    inset: auto 0 0;
    z-index: 20;
    width: 100%;
    height: auto;
    border-right: 0;
    border-top: 1px solid var(--border);
  }

  .brand-lock,
  .secure-device {
    display: none;
  }

  .nav-list {
    display: grid;
    grid-auto-columns: minmax(82px, 1fr);
    grid-auto-flow: column;
    gap: 6px;
    padding: 8px;
    overflow-x: auto;
  }

  .nav-item:nth-of-type(n + 6) {
    display: block;
  }

  .workspace {
    padding-bottom: 86px;
  }
}

body[data-ui-theme="light"] .topbar {
  background: rgba(246, 248, 252, 0.88);
}

body[data-ui-theme="light"] .side-nav {
  background: #ffffff;
  color: var(--text-primary);
}

body[data-ui-theme="light"] .brand-mark,
body[data-ui-theme="light"] .login-logo-wrap {
  background: #ffffff;
  border-color: #d5dceb;
}

body[data-ui-theme="light"] .logo-dark {
  display: none;
}

body[data-ui-theme="light"] .logo-light {
  display: block;
}

body:not([data-ui-theme="light"]) .brand-mark,
body:not([data-ui-theme="light"]) .login-logo-wrap {
  background: #05060a;
  border-color: rgba(255, 255, 255, 0.14);
}

body[data-ui-theme="light"] .brand-lock p,
body[data-ui-theme="light"] .secure-device p {
  color: #526077;
}

body[data-ui-theme="light"] .brand-lock strong,
body[data-ui-theme="light"] .secure-device strong {
  color: #111827;
}

body[data-ui-theme="light"] .nav-item {
  color: var(--text-secondary);
}

body[data-ui-theme="light"] .nav-item:hover {
  border-color: #d9d7ff;
  background: #f0efff;
  color: #111827;
}

body[data-ui-theme="light"] .nav-item.active {
  border-color: transparent;
  background: var(--brand);
  color: #ffffff;
}

body[data-ui-theme="light"] .secure-device,
body[data-ui-theme="light"] .current-user,
body[data-ui-theme="light"] .header-notifications,
body[data-ui-theme="light"] .attendance-day,
body[data-ui-theme="light"] .calendar-tile,
body[data-ui-theme="light"] .inline-attendance-calendar {
  background: #ffffff;
}

body[data-ui-theme="light"] input,
body[data-ui-theme="light"] select,
body[data-ui-theme="light"] textarea {
  background: #ffffff;
  color: var(--text-primary);
}

body[data-ui-theme="light"] .ghost-btn {
  background: #ffffff;
}

body:not([data-ui-theme="light"]) .ghost-btn {
  background: #f8fafc;
  color: #111827;
  border-color: #d5dceb;
}

@media (max-width: 680px) {
  :root {
    --mobile-nav-height: 72px;
  }

  html,
  body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
  }

  .app-shell {
    width: 100%;
    min-width: 0;
  }

  .workspace {
    width: 100%;
    min-width: 0;
    padding: 8px 8px calc(var(--mobile-nav-height) + 18px);
  }

  .topbar {
    position: sticky;
    top: 0;
    z-index: 12;
    padding: 9px 0;
    min-height: 0;
  }

  .session-tools {
    grid-template-columns: 1fr;
  }

  .side-nav {
    width: 100%;
    padding: 6px 7px calc(6px + env(safe-area-inset-bottom));
  }

  .nav-list {
    grid-auto-columns: minmax(64px, 78px);
    gap: 5px;
    padding: 0;
  }

  .nav-item {
    min-height: 48px;
    padding: 6px 5px;
    border-radius: 8px;
    font-size: 0.66rem;
    line-height: 1.08;
  }

  .panel {
    width: 100%;
    min-width: 0;
    padding: 10px;
    border-radius: 8px;
  }

  .content-calendar-layout,
  .attendance-layout,
  .split-grid,
  .terminal-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 10px;
  }

  .field-row,
  .owner-attendance-form,
  .form-grid {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  .field-row label,
  .form-grid label {
    min-width: 0;
  }

  input,
  select,
  textarea {
    width: 100%;
    min-width: 0;
    font-size: 0.88rem;
  }

  .content-calendar-form-actions {
    position: static;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
    padding: 8px 0;
    background: transparent;
  }

  .calendar-occurrences {
    max-height: none;
    overflow: visible;
    padding-right: 0;
  }

  .calendar-occurrences-head,
  .content-calendar-group-head,
  .calendar-date-section,
  .activity-row {
    grid-template-columns: minmax(0, 1fr);
    align-items: stretch;
  }

  .calendar-occurrences-head,
  .content-calendar-group-head {
    display: grid;
  }

  .calendar-occurrence-row {
    grid-template-columns: minmax(0, 1fr);
    padding: 9px;
  }

  .calendar-occurrence-row input[type="date"] {
    min-height: 48px;
    font-weight: 800;
  }

  .calendar-occurrence-row textarea {
    min-height: 150px;
  }

  .calendar-mini-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .calendar-instruction-fields {
    gap: 9px;
  }

  .content-calendar-list {
    max-height: none;
    overflow: visible;
  }

  .content-calendar-group {
    padding: 10px;
  }

  .task-meta,
  .task-actions,
  .sheet-actions,
  .content-calendar-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    width: 100%;
  }

  .attendance-calendar {
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .calendar-weekdays,
  .calendar-month-grid {
    min-width: 420px;
  }

  .attendance-day {
    min-height: 78px;
    padding: 7px;
  }

  .attendance-detail-panel {
    position: static;
  }

  .present-toast {
    right: 10px;
    bottom: calc(var(--mobile-nav-height) + 12px);
    left: 10px;
    min-width: 0;
    transform: translateY(16px);
  }

  .present-toast.toast-visible {
    transform: translateY(0);
  }
}

body[data-ui-theme="light"] .panel,
body[data-ui-theme="light"] .record-card,
body[data-ui-theme="light"] .compact-card,
body[data-ui-theme="light"] .sheet-row,
body[data-ui-theme="light"] .content-calendar-group,
body[data-ui-theme="light"] .calendar-date-section,
body[data-ui-theme="light"] .calendar-occurrence-row,
body[data-ui-theme="light"] .day-detail-box,
body[data-ui-theme="light"] .empty-state,
body[data-ui-theme="light"] .notification-panel,
body[data-ui-theme="light"] .task-card,
body[data-ui-theme="light"] .chat-bubble {
  background: #ffffff;
  color: #111827;
}

body[data-ui-theme="light"] .sheet-row:hover,
body[data-ui-theme="light"] .record-card:hover,
body[data-ui-theme="light"] .calendar-tile:hover,
body[data-ui-theme="light"] .attendance-day:hover,
body[data-ui-theme="light"] .calendar-date-section:hover,
body[data-ui-theme="light"] .content-calendar-group:hover,
body[data-ui-theme="light"] .chat-bubble:hover {
  background: #eef2f8;
  color: #111827;
}

body[data-ui-theme="light"] .chat-bubble.mine {
  background: #e4f7ec;
  color: #0f3b25;
}

body[data-ui-theme="light"] .content-calendar-form-actions {
  background: #ffffff;
}

body[data-ui-theme="light"] .pill,
body[data-ui-theme="light"] .secure-pill,
body[data-ui-theme="light"] .secondary-btn,
body[data-ui-theme="light"] .ghost-btn {
  color: #111827;
}

body[data-ui-theme="light"] .primary-btn,
body[data-ui-theme="light"] .danger-btn,
body[data-ui-theme="light"] .nav-item.active {
  color: #ffffff;
}

body[data-ui-theme="dark"] input,
body[data-ui-theme="dark"] select,
body[data-ui-theme="dark"] textarea,
body:not([data-ui-theme="light"]) input,
body:not([data-ui-theme="light"]) select,
body:not([data-ui-theme="light"]) textarea {
  background: #171a24;
  color: #f0f2ff;
}

body[data-ui-theme="dark"] option,
body:not([data-ui-theme="light"]) option {
  background: #171a24;
  color: #f0f2ff;
}

input:-webkit-autofill,
textarea:-webkit-autofill,
select:-webkit-autofill {
  -webkit-text-fill-color: var(--ink);
  transition: background-color 9999s ease-in-out 0s;
}

/* Professional 2026 refresh: clean app shell shared by web and APK. */
:root {
  color-scheme: light;
  --bg-primary: #f6f7f9;
  --bg-secondary: #eef2f4;
  --bg-card: #ffffff;
  --bg-hover: #f1f5f4;
  --border: #d8e0df;
  --accent: #0f766e;
  --accent-hover: #115e59;
  --accent-glow: rgba(15, 118, 110, 0.16);
  --text-primary: #17201f;
  --text-secondary: #5f6f6c;
  --text-muted: #81908d;
  --success: #16865a;
  --warning: #b7791f;
  --danger: #c2413b;
  --info: #2563eb;
  --radius-sm: 8px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --shadow-card: 0 1px 2px rgba(15, 23, 42, 0.06), 0 12px 28px rgba(15, 23, 42, 0.07);
  --shadow-elevated: 0 20px 48px rgba(15, 23, 42, 0.16);
  --sidebar-width: 248px;
  --canvas: var(--bg-primary);
  --panel: var(--bg-card);
  --soft: var(--bg-secondary);
  --line: var(--border);
  --brand: var(--accent);
  --brand-dark: var(--accent-hover);
  --ink: var(--text-primary);
  --muted: var(--text-secondary);
}

body,
body[data-ui-theme="light"],
body[data-role-theme="owner"],
body[data-role-theme="garv"],
body[data-role-theme="grav"],
body[data-role-theme="preeti"],
body[data-role-theme="jignesh"] {
  --canvas: #f6f7f9;
  --panel: #ffffff;
  --soft: #eef2f4;
  --line: #d8e0df;
  --brand: #0f766e;
  --brand-dark: #115e59;
  --ink: #17201f;
  --muted: #5f6f6c;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(246, 247, 249, 0.98) 320px),
    var(--canvas);
  color: var(--ink);
}

body[data-ui-theme="dark"] {
  color-scheme: dark;
  --bg-primary: #111818;
  --bg-secondary: #172120;
  --bg-card: #1d2927;
  --bg-hover: #263331;
  --border: #32423f;
  --accent: #2dd4bf;
  --accent-hover: #5eead4;
  --accent-glow: rgba(45, 212, 191, 0.14);
  --text-primary: #eef8f6;
  --text-secondary: #a7bab6;
  --text-muted: #71847f;
  --canvas: #111818;
  --panel: #1d2927;
  --soft: #172120;
  --line: #32423f;
  --brand: #2dd4bf;
  --brand-dark: #5eead4;
  --ink: #eef8f6;
  --muted: #a7bab6;
  background: #111818;
}

body[data-ui-theme="dark"] .topbar,
body[data-ui-theme="dark"] .side-nav,
body[data-ui-theme="dark"] .login-card,
body[data-ui-theme="dark"] .panel,
body[data-ui-theme="dark"] .record-card,
body[data-ui-theme="dark"] .metric-card,
body[data-ui-theme="dark"] .compact-card,
body[data-ui-theme="dark"] .content-calendar-group,
body[data-ui-theme="dark"] .calendar-date-section,
body[data-ui-theme="dark"] .notification-panel,
body[data-ui-theme="dark"] .task-card,
body[data-ui-theme="dark"] .chat-bubble {
  background: var(--panel);
  color: var(--ink);
  border-color: var(--line);
}

.app-shell {
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
  background: transparent;
}

.side-nav {
  width: var(--sidebar-width);
  gap: 18px;
  border-right: 1px solid var(--line);
  background: #ffffff;
  color: var(--ink);
  box-shadow: 1px 0 0 rgba(15, 23, 42, 0.02);
}

.brand-lock {
  margin: 0;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.brand-lock p,
.secure-device p {
  color: var(--muted);
}

.brand-lock strong,
.secure-device strong {
  color: var(--ink);
}

.brand-mark,
body:not([data-ui-theme="light"]) .brand-mark,
body[data-ui-theme="light"] .brand-mark,
.login-logo-wrap,
body:not([data-ui-theme="light"]) .login-logo-wrap,
body[data-ui-theme="light"] .login-logo-wrap {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: none;
}

.nav-list {
  gap: 6px;
}

.nav-item {
  border-radius: 8px;
  color: #52635f;
  padding: 11px 12px;
  font-weight: 850;
}

.nav-item:hover {
  border-color: #cbd8d6;
  background: #f2f7f6;
  color: #17201f;
  transform: none;
}

.nav-item.active,
body[data-ui-theme="light"] .nav-item.active,
body[data-ui-theme="dark"] .nav-item.active {
  border-color: #0f766e;
  background: #0f766e;
  color: #ffffff;
  box-shadow: none;
}

.secure-device {
  border-color: var(--line);
  background: #f7faf9;
}

.workspace {
  padding: 22px;
}

.workspace .topbar,
.topbar {
  min-height: 64px;
  margin: -22px -22px 22px;
  padding: 16px 22px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.88);
  color: var(--ink);
  backdrop-filter: blur(14px);
}

.topbar h1,
.workspace h1 {
  color: var(--ink);
  letter-spacing: 0;
}

.eyebrow {
  color: #0f766e;
  letter-spacing: 0.04em;
}

.panel,
.record-card,
.metric-card,
.compact-card,
.sheet-row,
.content-calendar-group,
.calendar-date-section,
.calendar-occurrence-row,
.day-detail-box,
.empty-state,
.notification-panel,
.task-card,
.chat-bubble,
.current-user {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--ink);
  box-shadow: var(--shadow-card);
}

.panel {
  padding: 18px;
}

.panel-head {
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.metric-card strong,
.performance-score {
  color: var(--ink);
}

input,
select,
textarea,
body[data-ui-theme="light"] input,
body[data-ui-theme="light"] select,
body[data-ui-theme="light"] textarea {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff !important;
  color: var(--ink) !important;
  box-shadow: none;
}

body[data-ui-theme="dark"] input,
body[data-ui-theme="dark"] select,
body[data-ui-theme="dark"] textarea {
  background: #16211f !important;
  color: var(--ink) !important;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.primary-btn,
.secondary-btn,
.ghost-btn,
.danger-btn,
.login-mode {
  border-radius: 8px;
  font-weight: 850;
}

.primary-btn {
  border-color: var(--brand);
  background: var(--brand);
  color: #ffffff;
  box-shadow: none;
}

.primary-btn:hover {
  background: var(--brand-dark);
}

.secondary-btn,
.ghost-btn,
body:not([data-ui-theme="light"]) .ghost-btn,
body[data-ui-theme="light"] .ghost-btn {
  border: 1px solid var(--line);
  background: #ffffff;
  color: var(--ink);
}

.secondary-btn:hover,
.ghost-btn:hover {
  border-color: var(--brand);
  background: #f2f7f6;
}

.danger-btn {
  background: #c2413b;
  color: #ffffff;
}

.pill,
.secure-pill {
  border: 1px solid #d4dfdd;
  border-radius: 999px;
  background: #f7faf9;
  color: #36534e;
}

.login-screen {
  background:
    linear-gradient(180deg, #f7faf9, #eef4f3);
}

.login-card {
  width: min(100%, 440px);
  border-color: #d8e0df;
  background: #ffffff;
  box-shadow: 0 24px 80px rgba(15, 23, 42, 0.14);
}

.login-card h1 {
  color: var(--ink);
  font-size: 1.82rem;
}

.login-mode.active {
  border-color: var(--brand);
  background: var(--brand);
}

.face-box,
.credential-help {
  border-color: #d8e0df;
  background: #f7faf9;
}

.safe-terminal,
.command-output,
.mini-output,
.terminal-result-panel {
  border: 1px solid #22302e;
  border-radius: 8px;
  background: #0b1110;
  color: #dff7ed;
  box-shadow: none;
}

.safe-terminal::before,
.command-output::before {
  opacity: 0.72;
}

.terminal-line {
  color: #dff7ed;
}

.terminal-line.muted {
  color: #8fb3aa;
}

.terminal-command-form {
  align-items: stretch;
}

.workspace-proof {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7faf9;
}

.ai-preview-frame,
.terminal-preview-frame {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.header-notifications,
.notification-panel {
  border-color: var(--line);
}

.record-card:hover,
.sheet-row:hover,
.calendar-tile:hover,
.attendance-day:hover,
.content-calendar-group:hover {
  background: #fbfdfc;
}

body[data-ui-theme="dark"] .side-nav {
  background: #151f1e;
}

body[data-ui-theme="dark"] .workspace .topbar,
body[data-ui-theme="dark"] .topbar {
  background: rgba(21, 31, 30, 0.9);
}

body[data-ui-theme="dark"] .secure-device,
body[data-ui-theme="dark"] .workspace-proof,
body[data-ui-theme="dark"] .face-box,
body[data-ui-theme="dark"] .credential-help {
  background: #172120;
}

body[data-ui-theme="dark"] .secondary-btn,
body[data-ui-theme="dark"] .ghost-btn,
body[data-ui-theme="dark"] .pill,
body[data-ui-theme="dark"] .secure-pill {
  background: #172120;
  color: var(--ink);
  border-color: var(--line);
}

@media (max-width: 1060px) {
  .workspace .topbar,
  .topbar {
    margin: 0 0 16px;
  }
}

@media (max-width: 680px) {
  :root {
    --mobile-nav-height: 74px;
  }

  .workspace {
    padding: 10px 10px calc(var(--mobile-nav-height) + 16px);
  }

  .workspace .topbar,
  .topbar {
    margin: -10px -10px 12px;
    padding: 10px;
    border-radius: 0;
  }

  .panel {
    padding: 12px;
  }

  .side-nav {
    border-top: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 -10px 28px rgba(15, 23, 42, 0.12);
  }

  body[data-ui-theme="dark"] .side-nav {
    background: rgba(21, 31, 30, 0.96);
  }

  .nav-list {
    grid-auto-columns: minmax(76px, 98px);
    gap: 6px;
  }

  .nav-item {
    min-height: 50px;
    padding: 7px 6px;
    border-radius: 8px;
    font-size: 0.68rem;
  }

  .login-card {
    box-shadow: 0 14px 40px rgba(15, 23, 42, 0.12);
  }

  .metric-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

.mobile-app-header {
  display: none;
}

@media (max-width: 680px) {
  :root {
    --mobile-app-header-height: 66px;
    --mobile-app-gap: 12px;
    --mobile-safe-top: env(safe-area-inset-top, 0px);
  }

  .app-shell {
    padding-top: calc(var(--mobile-safe-top) + var(--mobile-app-header-height) + var(--mobile-app-gap)) !important;
  }

  .workspace {
    padding: 0 10px 18px !important;
  }

  .workspace .topbar,
  .topbar {
    position: fixed !important;
    top: var(--mobile-safe-top) !important;
    right: 0 !important;
    left: 0 !important;
    z-index: 90;
    display: block !important;
    min-height: var(--mobile-app-header-height) !important;
    height: var(--mobile-app-header-height) !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-bottom: 1px solid #e5e7ef !important;
    border-radius: 0 !important;
    background: #ffffff !important;
    box-shadow: 0 4px 18px rgba(15, 23, 42, 0.08) !important;
    overflow: visible;
  }

  body[data-ui-theme="dark"] .workspace .topbar,
  body[data-ui-theme="dark"] .topbar {
    background: #1a1d27 !important;
    border-bottom-color: #2e3147 !important;
  }

  .mobile-app-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    height: var(--mobile-app-header-height);
    padding: 8px 14px;
  }

  .mobile-brand-mark {
    display: inline-flex;
    align-items: center;
    min-width: 0;
    width: min(58vw, 214px);
    height: 48px;
  }

  .mobile-brand-mark img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: left center;
  }

  body[data-ui-theme="light"] .mobile-brand-mark .logo-dark,
  body:not([data-ui-theme="light"]) .mobile-brand-mark .logo-light {
    display: none;
  }

  body[data-ui-theme="light"] .mobile-brand-mark .logo-light,
  body:not([data-ui-theme="light"]) .mobile-brand-mark .logo-dark {
    display: block;
  }

  .mobile-header-actions {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 5px;
    flex: 0 0 auto;
  }

  .mobile-icon-btn,
  .mobile-menu-btn,
  .mobile-logout-btn {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 34px !important;
    min-width: 34px !important;
    height: 34px !important;
    min-height: 34px !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 8px !important;
    background: transparent !important;
    color: #111827 !important;
    box-shadow: none !important;
  }

  body[data-ui-theme="dark"] .mobile-icon-btn,
  body[data-ui-theme="dark"] .mobile-menu-btn,
  body[data-ui-theme="dark"] .mobile-logout-btn {
    color: #f0f2ff !important;
  }

  .mobile-icon-btn svg {
    width: 19px;
    height: 19px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
  }

  .mobile-logout-btn {
    width: auto !important;
    min-width: 40px !important;
    padding: 0 5px !important;
    font-size: 0.66rem !important;
    font-weight: 900;
  }

  .mobile-menu-btn {
    flex-direction: column;
    gap: 4px;
  }

  .mobile-menu-btn span {
    display: block;
    width: 18px;
    height: 2px;
    border-radius: 999px;
    background: currentColor;
  }

  .topbar-title,
  .topbar > .session-tools {
    display: none !important;
  }

  .side-nav {
    position: fixed !important;
    top: calc(var(--mobile-safe-top) + var(--mobile-app-header-height) + 8px) !important;
    right: 10px !important;
    bottom: auto !important;
    left: 10px !important;
    z-index: 88;
    display: block !important;
    width: auto !important;
    max-height: min(72dvh, 560px);
    height: auto !important;
    padding: 10px !important;
    border: 1px solid #d9deea !important;
    border-radius: 12px !important;
    background: #ffffff !important;
    box-shadow: 0 20px 54px rgba(15, 23, 42, 0.24) !important;
    overflow-y: auto !important;
    transform: translateY(-10px) scale(0.98);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.18s ease, transform 0.18s ease;
  }

  body.mobile-nav-open .side-nav {
    transform: translateY(0) scale(1);
    opacity: 1;
    pointer-events: auto;
  }

  body[data-ui-theme="dark"] .side-nav {
    background: #1a1d27 !important;
    border-color: #2e3147 !important;
  }

  .side-nav .brand-lock {
    display: none !important;
  }

  .side-nav .secure-device {
    display: none !important;
  }

  .nav-list {
    display: grid !important;
    grid-auto-flow: row !important;
    grid-auto-columns: unset !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px !important;
    height: auto !important;
    padding: 0 !important;
    overflow: visible !important;
  }

  .nav-item {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 100% !important;
    min-height: 42px !important;
    height: auto !important;
    padding: 8px 6px !important;
    border-radius: 8px !important;
    font-size: 0.74rem !important;
    line-height: 1.12 !important;
    text-align: center;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .header-notifications {
    position: fixed;
    top: calc(var(--mobile-safe-top) + var(--mobile-app-header-height) + 8px);
    right: 10px;
    left: 10px;
    z-index: 92;
    max-height: min(70dvh, 520px);
    overflow: auto;
  }

  .view.active,
  .panel,
  .record-card,
  .metric-card,
  .task-card,
  .compact-card,
  .content-calendar-group,
  .calendar-date-section,
  .terminal-grid,
  .split-grid,
  .form-grid {
    max-width: 100%;
    min-width: 0;
  }
}

/* Final readable logo-matched dark theme + non-overlap sticky headers. */
body[data-ui-theme="dark"] {
  color-scheme: dark;
  --accent: #f5b301;
  --accent-hover: #ffd166;
  --accent-glow: rgba(245, 179, 1, 0.22);
  --brand: #f5b301;
  --brand-dark: #ffd166;
  --canvas: #0b1220;
  --panel: #111827;
  --soft: #162033;
  --line: #314059;
  --ink: #f8fafc;
  --muted: #cbd5e1;
  --bg-primary: #0b1220;
  --bg-secondary: #162033;
  --bg-card: #111827;
  --border: #314059;
  --text-primary: #f8fafc;
  --text-secondary: #cbd5e1;
  background:
    linear-gradient(180deg, #111827 0, #0b1220 260px, #0b1220 100%);
  color: #f8fafc;
}

body[data-ui-theme="dark"] .side-nav,
body[data-ui-theme="dark"] .workspace .topbar,
body[data-ui-theme="dark"] .topbar,
body[data-ui-theme="dark"] .login-card,
body[data-ui-theme="dark"] .panel,
body[data-ui-theme="dark"] .record-card,
body[data-ui-theme="dark"] .metric-card,
body[data-ui-theme="dark"] .compact-card,
body[data-ui-theme="dark"] .sheet-row,
body[data-ui-theme="dark"] .content-calendar-group,
body[data-ui-theme="dark"] .calendar-date-section,
body[data-ui-theme="dark"] .calendar-occurrence-row,
body[data-ui-theme="dark"] .day-detail-box,
body[data-ui-theme="dark"] .empty-state,
body[data-ui-theme="dark"] .notification-panel,
body[data-ui-theme="dark"] .task-card,
body[data-ui-theme="dark"] .chat-bubble,
body[data-ui-theme="dark"] .current-user {
  border-color: #314059 !important;
  background: #111827 !important;
  color: #f8fafc !important;
}

body[data-ui-theme="dark"] .workspace .topbar,
body[data-ui-theme="dark"] .topbar,
body[data-ui-theme="dark"] .side-nav {
  background: #0f172a !important;
}

body[data-ui-theme="dark"] h1,
body[data-ui-theme="dark"] h2,
body[data-ui-theme="dark"] h3,
body[data-ui-theme="dark"] strong,
body[data-ui-theme="dark"] label,
body[data-ui-theme="dark"] .current-user strong,
body[data-ui-theme="dark"] .brand-lock strong,
body[data-ui-theme="dark"] .secure-device strong,
body[data-ui-theme="dark"] .workspace .topbar h1,
body[data-ui-theme="dark"] .topbar h1 {
  color: #f8fafc !important;
}

body[data-ui-theme="dark"] p,
body[data-ui-theme="dark"] small,
body[data-ui-theme="dark"] span,
body[data-ui-theme="dark"] .login-note,
body[data-ui-theme="dark"] .credential-help,
body[data-ui-theme="dark"] .current-user span,
body[data-ui-theme="dark"] .brand-lock p,
body[data-ui-theme="dark"] .secure-device p,
body[data-ui-theme="dark"] .record-card p {
  color: #cbd5e1;
}

body[data-ui-theme="dark"] .eyebrow,
body[data-ui-theme="dark"] .login-card .eyebrow {
  color: #ffd166 !important;
}

body[data-ui-theme="dark"] .primary-btn,
body[data-ui-theme="dark"] .login-mode.active,
body[data-ui-theme="dark"] .nav-item.active {
  border-color: #f5b301 !important;
  background: #f5b301 !important;
  color: #111827 !important;
}

body[data-ui-theme="dark"] .secondary-btn,
body[data-ui-theme="dark"] .ghost-btn,
body[data-ui-theme="dark"] .login-mode,
body[data-ui-theme="dark"] .pill,
body[data-ui-theme="dark"] .secure-pill {
  border-color: #314059 !important;
  background: #162033 !important;
  color: #f8fafc !important;
}

body[data-ui-theme="dark"] .secondary-btn:hover,
body[data-ui-theme="dark"] .ghost-btn:hover,
body[data-ui-theme="dark"] .nav-item:hover {
  border-color: #f5b301 !important;
  background: #1e293b !important;
  color: #ffd166 !important;
}

body[data-ui-theme="dark"] input,
body[data-ui-theme="dark"] select,
body[data-ui-theme="dark"] textarea {
  border-color: #40506b !important;
  background: #0b1220 !important;
  color: #f8fafc !important;
}

body[data-ui-theme="dark"] input::placeholder,
body[data-ui-theme="dark"] textarea::placeholder {
  color: #94a3b8 !important;
}

body[data-ui-theme="dark"] .face-box,
body[data-ui-theme="dark"] .credential-help,
body[data-ui-theme="dark"] .workspace-proof,
body[data-ui-theme="dark"] .secure-device {
  border-color: #314059 !important;
  background: #162033 !important;
}

body[data-ui-theme="dark"] .safe-terminal,
body[data-ui-theme="dark"] .command-output,
body[data-ui-theme="dark"] .mini-output,
body[data-ui-theme="dark"] .terminal-result-panel {
  border-color: #40506b !important;
  background: #050914 !important;
  color: #e2f8d8 !important;
}

body[data-ui-theme="dark"] .terminal-line,
body[data-ui-theme="dark"] .terminal-line.muted {
  color: #e2f8d8 !important;
}

@media (min-width: 681px) {
  .workspace {
    padding: 0 24px 24px !important;
  }

  .workspace .topbar,
  .topbar {
    position: sticky !important;
    top: 0;
    z-index: 58;
    display: flex !important;
    min-height: 62px;
    margin: 0 -24px 22px !important;
    padding: 12px 24px !important;
    border-radius: 0 !important;
    border-top: 0 !important;
    border-right: 0 !important;
    border-left: 0 !important;
    border-bottom: 1px solid var(--line) !important;
    background: rgba(255, 255, 255, 0.94) !important;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
    backdrop-filter: blur(14px);
  }

  body[data-ui-theme="dark"] .workspace .topbar,
  body[data-ui-theme="dark"] .topbar {
    background: rgba(15, 23, 42, 0.96) !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
  }

  .topbar-title {
    display: block;
    min-width: 0;
  }

  .mobile-app-header {
    display: none !important;
  }
}

@media (max-width: 680px) {
  .app-shell {
    padding-top: calc(var(--mobile-safe-top) + var(--mobile-app-header-height) + 12px) !important;
  }

  .workspace .topbar,
  .topbar {
    background: #ffffff !important;
  }

  body[data-ui-theme="dark"] .workspace .topbar,
  body[data-ui-theme="dark"] .topbar,
  body[data-ui-theme="dark"] .side-nav {
    background: #0f172a !important;
    color: #f8fafc !important;
  }

  body[data-ui-theme="dark"] .mobile-icon-btn,
  body[data-ui-theme="dark"] .mobile-menu-btn,
  body[data-ui-theme="dark"] .mobile-logout-btn {
    color: #ffd166 !important;
    background: transparent !important;
  }

  body[data-ui-theme="dark"] .mobile-menu-btn span {
    background: #ffd166;
  }

  body[data-ui-theme="dark"] .side-nav {
    border-color: #314059 !important;
    box-shadow: 0 20px 54px rgba(0, 0, 0, 0.42) !important;
  }
}

/* Final mobile no-overlap and full menu/card fit pass. */
@media (max-width: 680px) {
  :root {
    --mobile-safe-top: env(safe-area-inset-top, 0px);
    --mobile-app-header-height: 66px;
  }

  html,
  body {
    width: 100%;
    overflow-x: hidden !important;
  }

  .app-shell {
    padding-top: 0 !important;
    overflow-x: hidden !important;
  }

  .workspace {
    padding: 0 10px 18px !important;
    overflow-x: hidden !important;
  }

  .workspace .topbar,
  .topbar {
    position: sticky !important;
    top: var(--mobile-safe-top) !important;
    right: auto !important;
    left: auto !important;
    z-index: 90 !important;
    display: block !important;
    width: calc(100% + 20px) !important;
    min-height: var(--mobile-app-header-height) !important;
    height: var(--mobile-app-header-height) !important;
    margin: 0 -10px 12px !important;
    padding: 0 !important;
    border: 0 !important;
    border-bottom: 1px solid #e5e7ef !important;
    border-radius: 0 !important;
    background: #ffffff !important;
    box-shadow: 0 4px 18px rgba(15, 23, 42, 0.08) !important;
    overflow: visible !important;
  }

  body[data-ui-theme="dark"] .workspace .topbar,
  body[data-ui-theme="dark"] .topbar {
    border-bottom-color: #314059 !important;
    background: #0f172a !important;
  }

  .mobile-app-header {
    display: flex !important;
    height: var(--mobile-app-header-height) !important;
  }

  .mobile-brand-mark {
    width: min(56vw, 214px) !important;
    max-width: 214px !important;
  }

  .mobile-header-actions {
    gap: 3px !important;
  }

  .mobile-icon-btn,
  .mobile-menu-btn {
    width: 32px !important;
    min-width: 32px !important;
    height: 32px !important;
    min-height: 32px !important;
  }

  .mobile-logout-btn {
    width: auto !important;
    min-width: 38px !important;
    height: 32px !important;
    min-height: 32px !important;
    padding: 0 4px !important;
    font-size: 0.64rem !important;
  }

  .topbar-title,
  .topbar > .session-tools {
    display: none !important;
  }

  .side-nav {
    position: fixed !important;
    top: calc(var(--mobile-safe-top) + var(--mobile-app-header-height) + 8px) !important;
    right: 10px !important;
    bottom: auto !important;
    left: 10px !important;
    z-index: 88 !important;
    width: auto !important;
    height: auto !important;
    max-height: calc(100dvh - var(--mobile-safe-top) - var(--mobile-app-header-height) - 24px) !important;
    padding: 10px !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-8px);
  }

  body.mobile-nav-open .side-nav {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }

  .nav-list {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    grid-auto-flow: row !important;
    grid-auto-columns: auto !important;
    gap: 7px !important;
    width: 100% !important;
    height: auto !important;
    padding: 0 !important;
    overflow: visible !important;
  }

  .nav-item {
    justify-content: flex-start !important;
    width: 100% !important;
    min-height: 42px !important;
    height: auto !important;
    padding: 10px 12px !important;
    font-size: 0.82rem !important;
    line-height: 1.1 !important;
    text-align: left !important;
    white-space: nowrap !important;
    overflow: visible !important;
    text-overflow: clip !important;
  }

  .view.active,
  .panel,
  .record-card,
  .metric-card,
  .task-card,
  .compact-card,
  .day-person-card,
  .terminal-activity-card,
  .performance-card,
  .system-center,
  .attendance-layout,
  .split-grid,
  .terminal-grid,
  .form-grid,
  .stack-list,
  .compact-list {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    overflow-x: hidden !important;
  }

  .metric-grid,
  #employeeDashboardMetrics {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 10px !important;
  }

  .metric-card,
  .record-card {
    padding: 11px !important;
  }

  .metric-card strong {
    font-size: 1.35rem !important;
    line-height: 1.1 !important;
  }

  .attendance-calendar {
    width: 100% !important;
    overflow-x: hidden !important;
    padding-bottom: 0 !important;
  }

  .calendar-weekdays,
  .calendar-month-grid {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    grid-template-columns: repeat(7, minmax(0, 1fr)) !important;
    gap: 4px !important;
  }

  .calendar-weekdays span {
    min-width: 0 !important;
    padding: 4px 0 !important;
    font-size: 0.58rem !important;
    text-align: center !important;
  }

  .attendance-day {
    min-width: 0 !important;
    min-height: 58px !important;
    padding: 5px 3px !important;
    overflow: hidden !important;
  }

  .attendance-day h3 {
    font-size: 0.76rem !important;
    line-height: 1 !important;
  }

  .calendar-line,
  .attendance-day span,
  .attendance-day small {
    font-size: 0.54rem !important;
    line-height: 1.08 !important;
    overflow-wrap: anywhere !important;
  }

  .task-meta,
  .task-actions,
  .record-card p,
  .record-card h3,
  .workspace-proof,
  .workspace-proof span,
  .workspace-proof small,
  .pill,
  .secure-pill,
  .mini-row {
    max-width: 100% !important;
    min-width: 0 !important;
    white-space: normal !important;
    overflow-wrap: anywhere !important;
    word-break: break-word !important;
  }
}

@media (max-width: 680px) {
  *,
  *::before,
  *::after {
    max-width: 100%;
  }

  .login-screen {
    min-height: 100dvh;
    padding: max(10px, env(safe-area-inset-top)) 10px max(10px, env(safe-area-inset-bottom));
    place-items: start center;
    overflow-y: auto;
  }

  .login-card {
    width: 100%;
    gap: 11px;
    padding: 14px;
  }

  .login-logo-wrap {
    width: 76px;
    height: 76px;
  }

  .face-box {
    padding: 10px;
  }

  .face-box video[hidden] {
    display: none;
  }

  .face-login-btn {
    width: 100%;
    min-height: 48px;
    font-size: 0.95rem;
  }

  .app-shell {
    display: block;
    min-height: 100dvh;
    overflow-x: hidden;
  }

  .workspace {
    padding: 8px 8px calc(var(--mobile-nav-height, 72px) + 18px);
    overflow-x: hidden;
  }

  .workspace .topbar {
    border-bottom: 0;
    background: transparent;
  }

  .session-tools,
  .panel-head,
  .field-row,
  .task-card-head,
  .terminal-owner-head,
  .workspace-proof,
  .activity-row,
  .file-download-item,
  .mini-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) !important;
    align-items: stretch;
  }

  .current-user,
  .select-label,
  .panel,
  .record-card,
  .metric-card,
  .task-card,
  .compact-card,
  .terminal-result-panel,
  .safe-terminal,
  .command-output,
  .mini-output {
    width: 100%;
    min-width: 0;
  }

  .metric-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }

  .team-pie-wrap {
    min-height: 0;
    grid-template-columns: minmax(0, 1fr);
  }

  .team-pie-chart {
    width: min(100%, 320px);
  }

  .terminal-command-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
  }

  .safe-terminal,
  .command-output,
  .mini-output,
  .terminal-result-panel,
  .workspace-proof span,
  .workspace-proof small,
  .terminal-line,
  .task-meta,
  .pill,
  .secure-pill,
  .record-card p,
  .record-card h3 {
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  .safe-terminal,
  .command-output {
    max-height: 48dvh;
    overflow: auto;
  }

  .terminal-preview-frame,
  .ai-preview-frame {
    height: 56dvh;
    min-height: 360px;
  }

  .task-actions,
  .content-calendar-actions,
  .sheet-actions {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  .primary-btn,
  .secondary-btn,
  .ghost-btn,
  .danger-btn {
    min-width: 0;
    white-space: normal;
  }

  .side-nav {
    max-width: none;
    overflow: hidden;
  }

  .nav-list {
    grid-auto-columns: minmax(72px, 96px);
    overscroll-behavior-x: contain;
  }

  .nav-item {
    overflow-wrap: anywhere;
  }
}

@media (max-width: 680px) {
  .workspace {
    padding: 10px 10px calc(var(--mobile-nav-height, 74px) + 16px);
  }

  .workspace .topbar,
  .topbar {
    margin: -10px -10px 12px;
    padding: 10px;
    border-bottom: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.92);
  }

  body[data-ui-theme="dark"] .workspace .topbar,
  body[data-ui-theme="dark"] .topbar {
    background: rgba(21, 31, 30, 0.92);
  }

  .metric-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Final APK/mobile polish: purple theme, sticky compact header, top mobile nav. */
:root,
body,
body[data-ui-theme="light"],
body[data-role-theme="owner"],
body[data-role-theme="garv"],
body[data-role-theme="grav"],
body[data-role-theme="preeti"],
body[data-role-theme="jignesh"] {
  --accent: #6c63ff;
  --accent-hover: #5a52e0;
  --accent-glow: rgba(108, 99, 255, 0.18);
  --brand: #6c63ff;
  --brand-dark: #5a52e0;
  --canvas: #f7f8fc;
  --panel: #ffffff;
  --soft: #eef1f7;
  --line: #d9deea;
  --ink: #151824;
  --muted: #5d6477;
  --bg-primary: #f7f8fc;
  --bg-secondary: #eef1f7;
  --bg-card: #ffffff;
  --border: #d9deea;
  --text-primary: #151824;
  --text-secondary: #5d6477;
}

body {
  background: linear-gradient(180deg, #ffffff 0, #f7f8fc 280px, #f7f8fc 100%);
}

.eyebrow,
.login-card .eyebrow {
  color: #5a52e0;
}

.primary-btn,
.login-mode.active,
.nav-item.active,
body[data-ui-theme="light"] .nav-item.active,
body[data-ui-theme="dark"] .nav-item.active {
  border-color: #6c63ff;
  background: #6c63ff;
  color: #ffffff;
}

.primary-btn:hover {
  background: #5a52e0;
}

.secondary-btn:hover,
.ghost-btn:hover {
  border-color: #6c63ff;
  background: #f3f2ff;
}

.pill,
.secure-pill {
  border-color: #dddafe;
  background: #f6f5ff;
  color: #373064;
}

.login-screen {
  background: linear-gradient(180deg, #ffffff, #f1f2fa);
}

.face-box,
.credential-help,
.workspace-proof,
.secure-device {
  border-color: #d9deea;
  background: #f8f9fd;
}

body[data-ui-theme="dark"] {
  --accent: #8b82ff;
  --accent-hover: #a9a3ff;
  --accent-glow: rgba(139, 130, 255, 0.2);
  --brand: #8b82ff;
  --brand-dark: #a9a3ff;
}

@media (max-width: 680px) {
  :root {
    --mobile-nav-height: 52px;
    --mobile-header-height: 58px;
    --mobile-top-space: max(10px, env(safe-area-inset-top));
  }

  html,
  body {
    background: #f7f8fc;
    overflow-x: hidden;
  }

  .login-screen {
    padding-top: calc(var(--mobile-top-space) + 8px);
  }

  .app-shell {
    display: block;
    min-height: 100dvh;
    padding-top: calc(var(--mobile-top-space) + var(--mobile-nav-height) + var(--mobile-header-height) + 12px);
    background: #f7f8fc;
  }

  .side-nav {
    position: fixed !important;
    top: var(--mobile-top-space) !important;
    right: 10px !important;
    bottom: auto !important;
    left: 10px !important;
    z-index: 70;
    width: auto !important;
    height: var(--mobile-nav-height) !important;
    max-width: none;
    min-height: 0;
    border: 1px solid rgba(217, 222, 234, 0.94);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.96) !important;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.12);
    padding: 5px;
    overflow: hidden;
    backdrop-filter: blur(14px);
  }

  body[data-ui-theme="dark"] .side-nav {
    background: rgba(26, 29, 39, 0.96) !important;
    border-color: rgba(255, 255, 255, 0.12);
  }

  .side-nav .brand-lock,
  .side-nav .secure-device {
    display: none !important;
  }

  .nav-list {
    display: grid !important;
    grid-auto-flow: column;
    grid-auto-columns: minmax(78px, 106px);
    gap: 5px;
    height: 100%;
    padding: 0 2px 2px;
    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
    scroll-snap-type: x proximity;
  }

  .nav-list::-webkit-scrollbar {
    display: none;
  }

  .nav-item {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: auto;
    min-width: 0;
    min-height: 40px;
    height: 40px;
    border-radius: 9px;
    padding: 5px 7px;
    font-size: 0.68rem;
    line-height: 1.08;
    text-align: center;
    white-space: normal;
    overflow-wrap: anywhere;
    scroll-snap-align: start;
  }

  .workspace {
    width: 100%;
    min-width: 0;
    padding: 0 10px 16px;
    overflow-x: hidden;
  }

  .workspace .topbar,
  .topbar {
    position: fixed !important;
    top: calc(var(--mobile-top-space) + var(--mobile-nav-height) + 8px);
    right: 10px;
    left: 10px;
    z-index: 65;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px;
    min-height: var(--mobile-header-height);
    margin: 0 !important;
    padding: 8px 9px;
    border: 1px solid rgba(217, 222, 234, 0.94);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.96) !important;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.1);
    backdrop-filter: blur(14px);
  }

  body[data-ui-theme="dark"] .workspace .topbar,
  body[data-ui-theme="dark"] .topbar {
    background: rgba(26, 29, 39, 0.96) !important;
    border-color: rgba(255, 255, 255, 0.12);
  }

  .topbar > div:first-child {
    min-width: 0;
  }

  .workspace .topbar .eyebrow,
  .topbar .eyebrow {
    display: none;
  }

  .workspace .topbar h1,
  .topbar h1 {
    margin: 0;
    font-size: 1rem;
    line-height: 1.08;
    overflow: hidden;
    color: var(--ink);
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .session-tools {
    display: flex !important;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: flex-end;
    gap: 5px;
    width: auto;
    max-width: 54vw;
    min-width: 0;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
  }

  .session-tools::-webkit-scrollbar {
    display: none;
  }

  .current-user {
    width: auto;
    min-width: 104px;
    max-width: 132px;
    padding: 5px 7px;
    box-shadow: none;
  }

  .current-user strong {
    font-size: 0.72rem;
    line-height: 1.05;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .current-user span {
    font-size: 0.62rem;
    line-height: 1.05;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .select-label,
  #employeeSearchWrap {
    display: none !important;
  }

  .notification-bell,
  #themeToggle,
  .ghost-btn[data-action="logout"] {
    flex: 0 0 auto;
    width: 36px !important;
    min-width: 36px;
    max-width: 36px;
    min-height: 36px;
    height: 36px;
    padding: 0;
    border-radius: 9px;
    font-size: 0;
  }

  .notification-bell #notificationCount {
    font-size: 0.68rem;
  }

  .ghost-btn[data-action="logout"]::before {
    content: "Log";
    font-size: 0.68rem;
    font-weight: 900;
  }

  .panel,
  .record-card,
  .metric-card,
  .task-card,
  .compact-card,
  .notification-panel,
  .chat-bubble {
    border-radius: 10px;
  }

  .panel:first-of-type,
  .view.active > :first-child {
    margin-top: 0;
  }

  .metric-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
  }
}

/* 2026-07-04 final no-overlap pass: full menu, fixed header, boxed attendance. */
.workspace {
  min-width: 0;
  overflow-x: hidden;
}

.view {
  scroll-margin-top: 130px;
}

.header-notifications {
  position: fixed;
  top: 82px;
  right: 18px;
  z-index: 140;
  width: min(420px, calc(100vw - 24px));
  max-height: min(72vh, 620px);
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 22px 54px rgba(15, 23, 42, 0.18);
}

.session-strip {
  position: sticky;
  top: 0;
  z-index: 45;
  margin: 0 0 14px;
}

.attendance-detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.attendance-info-box {
  display: grid;
  gap: 5px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
  padding: 10px;
}

.attendance-info-box small {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.attendance-info-box strong {
  min-width: 0;
  color: var(--ink);
  font-size: 0.88rem;
  line-height: 1.28;
  overflow-wrap: anywhere;
}

.attendance-info-box.present,
.attendance-info-box.approved {
  border-color: rgba(34, 197, 94, 0.35);
  background: rgba(34, 197, 94, 0.1);
}

.attendance-info-box.late,
.attendance-info-box.pending,
.attendance-info-box.submitted {
  border-color: rgba(245, 158, 11, 0.35);
  background: rgba(245, 158, 11, 0.1);
}

.attendance-info-box.absent,
.attendance-info-box.rejected {
  border-color: rgba(239, 68, 68, 0.35);
  background: rgba(239, 68, 68, 0.1);
}

.attendance-map-actions {
  margin-top: 12px;
}

.attendance-record-card,
.day-person-card,
.notification-card,
.metric-card,
.record-card,
.panel {
  min-width: 0;
  overflow: hidden;
}

.task-meta .pill,
.pill {
  max-width: 100%;
  min-width: 0;
  white-space: normal;
  overflow-wrap: anywhere;
}

.face-box video {
  display: block;
  width: 100%;
  max-height: 240px;
  border-radius: 8px;
  background: #0f172a;
  object-fit: cover;
}

body[data-ui-theme="dark"] .system-tile,
body[data-ui-theme="dark"] .connection-row,
body[data-ui-theme="dark"] .attendance-info-box,
body[data-ui-theme="dark"] .calendar-date-section,
body[data-ui-theme="dark"] .day-detail-box,
body[data-ui-theme="dark"] .empty-state {
  background: #ffffff;
  color: #151824;
}

body[data-ui-theme="dark"] .system-tile *,
body[data-ui-theme="dark"] .connection-row *,
body[data-ui-theme="dark"] .attendance-info-box *,
body[data-ui-theme="dark"] .calendar-date-section *,
body[data-ui-theme="dark"] .day-detail-box *,
body[data-ui-theme="dark"] .empty-state * {
  color: #151824;
}

@media (min-width: 681px) {
  .app-shell {
    grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
  }

  .side-nav {
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
  }

  .workspace {
    padding-top: 18px;
  }

  .workspace .topbar,
  .topbar {
    position: sticky;
    top: 0;
    z-index: 80;
    margin-bottom: 16px;
    background: rgba(247, 248, 252, 0.96);
    backdrop-filter: blur(14px);
  }

  body[data-ui-theme="dark"] .workspace .topbar,
  body[data-ui-theme="dark"] .topbar {
    background: rgba(26, 29, 39, 0.96);
  }

  .attendance-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .attendance-calendar {
    min-width: 0;
  }
}

@media (max-width: 680px) {
  :root {
    --mobile-nav-height: 58px;
    --mobile-header-height: 68px;
    --mobile-top-space: max(12px, env(safe-area-inset-top));
  }

  html,
  body {
    width: 100%;
    overflow-x: hidden;
  }

  .app-shell {
    padding-top: calc(var(--mobile-top-space) + var(--mobile-nav-height) + var(--mobile-header-height) + 18px) !important;
  }

  .side-nav {
    top: var(--mobile-top-space) !important;
    right: 8px !important;
    left: 8px !important;
    z-index: 110 !important;
    height: var(--mobile-nav-height) !important;
    padding: 6px !important;
    overflow: hidden !important;
  }

  .nav-list {
    display: flex !important;
    flex-wrap: nowrap !important;
    align-items: stretch;
    gap: 6px !important;
    height: 100%;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    padding-bottom: 2px !important;
    scroll-snap-type: x proximity;
  }

  .nav-item {
    flex: 0 0 auto !important;
    width: auto !important;
    min-width: max-content !important;
    max-width: none !important;
    height: 44px !important;
    min-height: 44px !important;
    padding: 0 12px !important;
    white-space: nowrap !important;
    overflow: visible !important;
    text-overflow: clip !important;
    font-size: 0.74rem !important;
    line-height: 1 !important;
  }

  .workspace .topbar,
  .topbar {
    top: calc(var(--mobile-top-space) + var(--mobile-nav-height) + 8px) !important;
    right: 8px !important;
    left: 8px !important;
    z-index: 100 !important;
    min-height: var(--mobile-header-height) !important;
    height: auto !important;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
    gap: 8px !important;
    padding: 9px !important;
  }

  .mobile-app-header {
    display: none !important;
  }

  .topbar-title {
    min-width: 0;
  }

  .workspace .topbar h1,
  .topbar h1 {
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: clip !important;
    font-size: 0.98rem !important;
    line-height: 1.16 !important;
  }

  .session-tools {
    max-width: 50vw !important;
  }

  .current-user {
    min-width: 118px !important;
    max-width: 146px !important;
  }

  .workspace {
    padding: 0 10px 18px !important;
  }

  .view.active {
    display: grid;
    gap: 12px;
  }

  .header-notifications {
    top: calc(var(--mobile-top-space) + var(--mobile-nav-height) + var(--mobile-header-height) + 18px) !important;
    right: 8px !important;
    left: 8px !important;
    width: auto !important;
    max-height: calc(100dvh - var(--mobile-top-space) - var(--mobile-nav-height) - var(--mobile-header-height) - 34px) !important;
    z-index: 130 !important;
  }

  .session-strip {
    position: relative !important;
    top: auto !important;
    margin: 0 0 12px !important;
  }

  .panel {
    padding: 13px !important;
  }

  .panel-head {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
    align-items: start;
  }

  .task-actions {
    width: 100%;
  }

  .task-actions > button,
  .task-actions > a {
    flex: 1 1 128px;
    justify-content: center;
  }

  .attendance-layout {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 12px !important;
  }

  .attendance-calendar {
    display: grid !important;
    gap: 8px !important;
  }

  .calendar-month-head {
    display: grid !important;
    grid-template-columns: auto minmax(0, 1fr) auto auto;
    gap: 6px !important;
  }

  .calendar-month-head strong {
    align-self: center;
    min-width: 0;
    overflow-wrap: anywhere;
    text-align: center;
  }

  .calendar-month-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
  }

  .attendance-day {
    min-height: 118px !important;
    padding: 9px !important;
  }

  .attendance-detail-grid {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 8px;
  }

  .attendance-info-box {
    padding: 9px;
  }

  .attendance-info-box strong {
    font-size: 0.84rem;
  }

  .record-card h3,
  .compact-card h3,
  .notification-card h3 {
    line-height: 1.25;
    overflow-wrap: anywhere;
  }

  .notification-card p,
  .record-card p {
    line-height: 1.4;
    overflow-wrap: anywhere;
  }
}

/* Aurafam mobile/app final pass: content stays below header/menu and white panels stay readable in dark mode. */
body[data-ui-theme="dark"] .system-tile,
body[data-ui-theme="dark"] .connection-row,
body[data-ui-theme="dark"] .attendance-info-box,
body[data-ui-theme="dark"] .calendar-date-section,
body[data-ui-theme="dark"] .calendar-occurrence-row,
body[data-ui-theme="dark"] .day-detail-box,
body[data-ui-theme="dark"] .empty-state,
body[data-ui-theme="dark"] .attendance-day,
body[data-ui-theme="dark"] .inline-attendance-calendar,
body[data-ui-theme="dark"] .sheet-row,
body[data-ui-theme="dark"] .file-download-item,
body[data-ui-theme="dark"] .mini-row {
  background: #ffffff !important;
  color: #111827 !important;
  border-color: rgba(17, 24, 39, 0.16) !important;
}

body[data-ui-theme="dark"] .system-tile *,
body[data-ui-theme="dark"] .connection-row *,
body[data-ui-theme="dark"] .attendance-info-box *,
body[data-ui-theme="dark"] .calendar-date-section *,
body[data-ui-theme="dark"] .calendar-occurrence-row *,
body[data-ui-theme="dark"] .day-detail-box *,
body[data-ui-theme="dark"] .empty-state *,
body[data-ui-theme="dark"] .attendance-day *,
body[data-ui-theme="dark"] .inline-attendance-calendar *,
body[data-ui-theme="dark"] .sheet-row *,
body[data-ui-theme="dark"] .file-download-item *,
body[data-ui-theme="dark"] .mini-row * {
  color: #111827 !important;
}

@media (max-width: 680px) {
  :root {
    --mobile-safe-top: max(10px, env(safe-area-inset-top));
    --mobile-app-header-height: 66px;
    --mobile-menu-height: 56px;
    --mobile-content-top: calc(var(--mobile-safe-top) + var(--mobile-app-header-height) + var(--mobile-menu-height) + 22px);
  }

  .app-shell {
    display: block !important;
    padding-top: var(--mobile-content-top) !important;
  }

  .workspace {
    padding: 0 10px 18px !important;
  }

  .workspace .topbar,
  .topbar {
    position: fixed !important;
    top: var(--mobile-safe-top) !important;
    right: 8px !important;
    left: 8px !important;
    z-index: 130 !important;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    min-height: var(--mobile-app-header-height) !important;
    padding: 8px 10px !important;
  }

  .mobile-app-header {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 8px !important;
    height: 48px !important;
    min-width: 0 !important;
  }

  .mobile-brand-mark {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex: 0 0 auto !important;
    width: 112px !important;
    height: 42px !important;
    overflow: hidden !important;
  }

  .mobile-brand-mark img {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
  }

  .topbar-title,
  .session-tools {
    display: none !important;
  }

  .mobile-header-actions {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 6px !important;
    min-width: 0 !important;
  }

  .mobile-icon-btn,
  .mobile-menu-btn,
  .mobile-logout-btn {
    flex: 0 0 auto !important;
    width: 38px !important;
    min-width: 38px !important;
    height: 38px !important;
    min-height: 38px !important;
    padding: 0 !important;
    border-radius: 8px !important;
  }

  .mobile-logout-btn {
    width: auto !important;
    min-width: 58px !important;
    padding: 0 9px !important;
    font-size: 0.72rem !important;
  }

  .mobile-menu-btn {
    display: inline-grid !important;
    place-items: center !important;
  }

  .mobile-menu-btn span {
    display: block !important;
    width: 18px !important;
    height: 2px !important;
    margin: 2px 0 !important;
    background: currentColor !important;
    border-radius: 999px !important;
  }

  .side-nav {
    position: fixed !important;
    top: calc(var(--mobile-safe-top) + var(--mobile-app-header-height) + 8px) !important;
    right: 8px !important;
    left: 8px !important;
    z-index: 125 !important;
    height: var(--mobile-menu-height) !important;
    max-height: var(--mobile-menu-height) !important;
    padding: 6px !important;
    overflow: hidden !important;
  }

  body.mobile-nav-open .side-nav {
    height: min(72dvh, 520px) !important;
    max-height: min(72dvh, 520px) !important;
    overflow-y: auto !important;
  }

  .side-nav .brand-lock,
  .side-nav .secure-device {
    display: none !important;
  }

  .nav-list {
    display: flex !important;
    flex-wrap: nowrap !important;
    align-items: stretch !important;
    gap: 6px !important;
    height: 100% !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    padding: 0 0 3px !important;
  }

  body.mobile-nav-open .nav-list {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    height: auto !important;
    overflow: visible !important;
  }

  .nav-item {
    min-width: max-content !important;
    height: 42px !important;
    min-height: 42px !important;
    padding: 0 12px !important;
    white-space: nowrap !important;
  }

  body.mobile-nav-open .nav-item {
    min-width: 0 !important;
    width: 100% !important;
    justify-content: center !important;
    white-space: normal !important;
  }

  .header-notifications {
    top: var(--mobile-content-top) !important;
  }

  .view.active {
    display: grid !important;
    gap: 12px !important;
  }
}
