:root {
  --bg-top: #dce8ef;
  --bg-mid: #e8eef2;
  --bg-bottom: #f4f6f8;
  --ink: #1a2332;
  --ink-muted: #5a6a7a;
  --line: rgba(26, 35, 50, 0.12);
  --surface: rgba(255, 255, 255, 0.72);
  --surface-solid: #ffffff;
  --teal: #0f766e;
  --teal-deep: #0a5c56;
  --clay: #c2410c;
  --clay-deep: #9a3412;
  --ok: #15803d;
  --warn: #a16207;
  --shadow: 0 18px 50px rgba(26, 35, 50, 0.08);
  --radius: 18px;
  --font-display: "DM Sans", "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", "Consolas", monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: var(--font-display);
  color: var(--ink);
  background:
    radial-gradient(1200px 600px at 10% -10%, #c5d9e6 0%, transparent 55%),
    radial-gradient(900px 500px at 100% 0%, #b8d0c8 0%, transparent 50%),
    linear-gradient(180deg, var(--bg-top), var(--bg-mid) 45%, var(--bg-bottom));
  background-attachment: fixed;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.35;
  background-image:
    linear-gradient(rgba(26, 35, 50, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(26, 35, 50, 0.04) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 80%);
}

a {
  color: var(--teal-deep);
  text-decoration: none;
}

button,
input,
select {
  font: inherit;
}

.shell {
  position: relative;
  z-index: 1;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  padding: 1.25rem clamp(1rem, 4vw, 2rem) 2rem;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin: 0 0 1.35rem;
  padding: 0.7rem 1rem;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(26, 35, 50, 0.1);
  border-radius: 14px;
  box-shadow: 0 8px 24px rgba(26, 35, 50, 0.05);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.brand {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  flex-shrink: 0;
}

.brand-mark {
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-muted);
  font-weight: 600;
}

.brand-name {
  font-size: 1.12rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex: 1;
  min-width: 0;
  justify-content: flex-end;
}

.topbar-actions > .staff-nav {
  flex: 1 1 auto;
  min-width: 0;
  margin-right: 0.15rem;
}

.topbar-actions > .btn {
  flex-shrink: 0;
  border-radius: 10px;
  padding: 0.48rem 0.85rem;
  font-size: 0.84rem;
}

.topbar-actions > .btn.fullscreen-toggle,
.topbar-actions > .btn#export-btn,
.topbar-actions > .btn#signout {
  border-color: rgba(26, 35, 50, 0.14);
  background: #fff;
}

.btn {
  appearance: none;
  border: none;
  cursor: pointer;
  border-radius: 999px;
  padding: 0.7rem 1.2rem;
  font-weight: 600;
  transition: transform 0.15s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.btn:active {
  transform: scale(0.98);
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

.btn-ghost {
  background: transparent;
  color: var(--ink-muted);
  border: 1px solid var(--line);
}

.btn-ghost:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.5);
  color: var(--ink);
}

.btn-primary {
  background: var(--teal);
  color: #fff;
  box-shadow: 0 10px 24px rgba(15, 118, 110, 0.28);
}

.btn-primary:hover:not(:disabled) {
  background: var(--teal-deep);
}

.btn-out {
  background: var(--clay);
  color: #fff;
  box-shadow: 0 10px 24px rgba(194, 65, 12, 0.28);
}

.btn-out:hover:not(:disabled) {
  background: var(--clay-deep);
}

.btn-xl {
  width: min(100%, 360px);
  padding: 1.15rem 1.5rem;
  font-size: 1.15rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-radius: 16px;
}

.main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.panel {
  width: min(100%, 460px);
  background: var(--surface);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.65);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: clamp(1.5rem, 4vw, 2.25rem);
  animation: rise 0.55s ease both;
}

.panel-wide {
  width: min(100%, 920px);
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-title {
  margin: 0 0 0.4rem;
  font-size: clamp(1.8rem, 5vw, 2.4rem);
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.hero-sub {
  margin: 0 0 1.75rem;
  color: var(--ink-muted);
  font-size: 1rem;
  line-height: 1.45;
}

.page-widgets {
  margin: 0 0 1.35rem;
}

.page-head + .page-widgets,
.admin-header + .page-widgets,
.hero-title + .page-widgets,
.hero-sub + .page-widgets {
  margin-top: 0;
}

.hero-sub.tight,
.page-head .hero-sub {
  margin-bottom: 0.85rem;
}

.form-block {
  margin: 0 0 1.5rem;
  padding: 1.15rem 1.15rem 1.25rem;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.55);
}

.form-block .section-title {
  margin-top: 0;
}

.list-block {
  margin-top: 0.25rem;
  padding-top: 1.25rem;
  border-top: 2px solid var(--line);
}

.list-block .section-title {
  margin-top: 0;
}

.list-block .timeline {
  margin-top: 0.75rem;
}

.content-tabs {
  display: flex;
  gap: 0.45rem;
  margin: 0 0 1.15rem;
  padding: 0.3rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.45);
}

.content-tab {
  flex: 1;
  border: 0;
  border-radius: 10px;
  padding: 0.7rem 0.9rem;
  background: transparent;
  color: var(--ink-muted);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.content-tab:hover {
  color: var(--ink);
  background: rgba(15, 118, 110, 0.06);
}

.content-tab.active {
  color: #fff;
  background: var(--teal);
}

.tab-panel[hidden] {
  display: none !important;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  margin-bottom: 1.1rem;
}

.field[hidden] {
  display: none !important;
}

.field label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink-muted);
}

.field input,
.field select {
  width: 100%;
  border: 1px solid var(--line);
  background: var(--surface-solid);
  border-radius: 12px;
  padding: 0.9rem 1rem;
  color: var(--ink);
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.field input:focus,
.field select:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.15);
}

.field input {
  letter-spacing: 0.12em;
  font-family: var(--font-mono);
  font-size: 1.05rem;
}

.hint {
  margin: 0.75rem 0 0;
  font-size: 0.82rem;
  color: var(--ink-muted);
}

.error {
  margin: 0 0 1rem;
  padding: 0.75rem 0.9rem;
  border-radius: 12px;
  background: rgba(194, 65, 12, 0.08);
  color: var(--clay-deep);
  font-size: 0.9rem;
  display: none;
}

.error.show {
  display: block;
  animation: rise 0.3s ease both;
}

.greeting {
  text-align: center;
  margin-bottom: 1.25rem;
}

.greeting-label {
  margin: 0;
  color: var(--ink-muted);
  font-size: 0.95rem;
}

.greeting-name {
  margin: 0.2rem 0 0;
  font-size: clamp(1.9rem, 5vw, 2.6rem);
  letter-spacing: -0.03em;
  font-weight: 700;
  animation: rise 0.5s ease both;
}

.staff-meta {
  margin: 0.45rem 0 0;
  color: var(--ink-muted);
  font-size: 0.95rem;
}

.clock-wrap {
  text-align: center;
  margin-bottom: 1.25rem;
}

.clock-date {
  margin: 0;
  color: var(--ink-muted);
  font-size: 0.95rem;
}

.clock-time {
  margin: 0.15rem 0 0;
  font-family: var(--font-mono);
  font-size: clamp(2.2rem, 8vw, 3.2rem);
  font-weight: 500;
  letter-spacing: 0.04em;
  animation: tickSoft 1s ease infinite alternate;
}

@keyframes tickSoft {
  from {
    opacity: 0.92;
  }
  to {
    opacity: 1;
  }
}

.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0 auto 1.5rem;
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid var(--line);
  font-size: 0.88rem;
  color: var(--ink-muted);
}

.status-dot {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: var(--warn);
}

.status-chip.ready .status-dot {
  background: var(--teal);
}

.status-chip.onsite .status-dot {
  background: var(--ok);
  box-shadow: 0 0 0 4px rgba(21, 128, 61, 0.15);
}

.status-chip.break .status-dot {
  background: var(--warn);
}

.status-chip.done .status-dot {
  background: var(--ink-muted);
}

.timeline-session {
  margin-bottom: 0.85rem;
}

.timeline-session:last-child {
  margin-bottom: 0;
}

.timeline-session-title {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--ink-muted);
  margin-bottom: 0.2rem;
}

.action-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 1.75rem;
}

.action-wrap .btn {
  animation: rise 0.45s ease both;
}

.done-message {
  text-align: center;
  padding: 1rem 1.1rem;
  border-radius: 14px;
  background: rgba(21, 128, 61, 0.08);
  color: var(--ok);
  font-weight: 600;
  margin-bottom: 1.75rem;
}

.timeline {
  border-top: 1px solid var(--line);
  padding-top: 1.1rem;
}

.timeline h3 {
  margin: 0 0 0.85rem;
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.timeline-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 0.45rem 0;
  font-size: 0.98rem;
}

.timeline-row span:last-child {
  font-family: var(--font-mono);
  letter-spacing: 0.04em;
}

.timeline-row .empty {
  color: var(--ink-muted);
}

.office-day-notes {
  margin-top: 1rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--line);
}

.office-note-hint {
  margin: 0 0 0.55rem;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-muted);
  font-weight: 700;
}

.office-note {
  margin: 0 0 0.4rem;
  padding: 0.55rem 0.75rem;
  border-radius: 12px;
  font-size: 0.92rem;
  font-weight: 700;
}

.office-note-warn,
.att-tone-warn {
  color: #9a3412;
  background: rgba(234, 88, 12, 0.12);
}

.office-note-bad,
.att-tone-bad {
  color: #991b1b;
  background: rgba(220, 38, 38, 0.12);
}

.office-note-ok {
  color: var(--ok);
  background: rgba(21, 128, 61, 0.1);
}

td.att-tone-warn,
td.att-tone-bad {
  font-weight: 700;
}

.att-sub {
  margin-top: 0.2rem;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.25;
  background: transparent;
}

#report-foot td {
  padding-top: 0.85rem;
  padding-bottom: 0.85rem;
  border-top: 2px solid var(--line);
  background: rgba(255, 255, 255, 0.72);
  font-weight: 700;
}

.att-foot-label {
  text-align: right;
  color: var(--ink-muted);
  font-size: 0.86rem;
  letter-spacing: 0.02em;
}

.flash {
  position: fixed;
  left: 50%;
  bottom: 1.5rem;
  transform: translateX(-50%) translateY(20px);
  background: var(--ink);
  color: #fff;
  padding: 0.8rem 1.2rem;
  border-radius: 999px;
  font-size: 0.9rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
  z-index: 50;
}

.flash.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.toast-host {
  position: fixed;
  top: 1.1rem;
  right: 1.1rem;
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  width: min(22rem, calc(100vw - 1.5rem));
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.65rem;
  align-items: start;
  padding: 0.85rem 0.9rem;
  border-radius: 14px;
  background: var(--surface-solid);
  color: var(--ink);
  border: 1px solid var(--line);
  box-shadow: 0 14px 36px rgba(26, 35, 50, 0.14);
  transform: translateX(1.1rem);
  opacity: 0;
  transition: opacity 0.22s ease, transform 0.22s ease;
}

.toast.show {
  opacity: 1;
  transform: translateX(0);
}

.toast-icon {
  width: 1.55rem;
  height: 1.55rem;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1;
  flex-shrink: 0;
  margin-top: 0.05rem;
}

.toast-body {
  min-width: 0;
}

.toast-title {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  margin: 0 0 0.15rem;
  color: var(--ink-muted);
}

.toast-message {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.35;
  word-break: break-word;
}

.toast-close {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--ink-muted);
  cursor: pointer;
  font-size: 1.05rem;
  line-height: 1;
  padding: 0.1rem 0.25rem;
  border-radius: 6px;
}

.toast-close:hover {
  color: var(--ink);
  background: rgba(26, 35, 50, 0.06);
}

.toast-success {
  border-color: rgba(21, 128, 61, 0.28);
  background: linear-gradient(180deg, #f3faf5, #ffffff);
}

.toast-success .toast-icon {
  background: rgba(21, 128, 61, 0.14);
  color: var(--ok);
}

.toast-success .toast-title {
  color: var(--ok);
}

.toast-error {
  border-color: rgba(194, 65, 12, 0.3);
  background: linear-gradient(180deg, #fff7f3, #ffffff);
}

.toast-error .toast-icon {
  background: rgba(194, 65, 12, 0.12);
  color: var(--clay-deep);
}

.toast-error .toast-title {
  color: var(--clay-deep);
}

.toast-info {
  border-color: rgba(15, 118, 110, 0.28);
  background: linear-gradient(180deg, #f2faf9, #ffffff);
}

.toast-info .toast-icon {
  background: rgba(15, 118, 110, 0.12);
  color: var(--teal-deep);
}

.toast-info .toast-title {
  color: var(--teal-deep);
}

.toast-warn {
  border-color: rgba(161, 98, 7, 0.3);
  background: linear-gradient(180deg, #fffbeb, #ffffff);
}

.toast-warn .toast-icon {
  background: rgba(161, 98, 7, 0.14);
  color: var(--warn);
}

.toast-warn .toast-title {
  color: var(--warn);
}

.api-status {
  position: fixed;
  left: 0.85rem;
  bottom: 0.85rem;
  z-index: 90;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink-muted);
  box-shadow: 0 8px 22px rgba(26, 35, 50, 0.08);
  pointer-events: none;
}

.api-status::before {
  content: "";
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: var(--ink-muted);
}

.api-status.ok {
  color: var(--ok);
  border-color: rgba(21, 128, 61, 0.25);
}

.api-status.ok::before {
  background: var(--ok);
}

.api-status.bad {
  color: var(--clay-deep);
  border-color: rgba(194, 65, 12, 0.28);
}

.api-status.bad::before {
  background: var(--clay);
}

@media (max-width: 640px) {
  .toast-host {
    top: auto;
    bottom: 1rem;
    left: 0.75rem;
    right: 0.75rem;
    width: auto;
  }

  .toast {
    transform: translateY(0.8rem);
  }

  .toast.show {
    transform: translateY(0);
  }

  .api-status {
    left: 0.5rem;
    bottom: 0.5rem;
    font-size: 0.7rem;
  }
}

.admin-header {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.admin-header h1 {
  margin: 0;
  font-size: clamp(1.5rem, 3vw, 2rem);
  letter-spacing: -0.02em;
}

.filters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0.85rem;
  margin-bottom: 1.25rem;
}

.filters .field {
  margin: 0;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.65);
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 560px;
}

.panel-wide .table-wrap table {
  min-width: 860px;
}

th,
td {
  padding: 0.85rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--line);
  font-size: 0.92rem;
}

th {
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-muted);
  background: rgba(255, 255, 255, 0.5);
}

td.mono {
  font-family: var(--font-mono);
  letter-spacing: 0.03em;
}

tr:last-child td {
  border-bottom: none;
}

.empty-state {
  text-align: center;
  padding: 2rem 1rem;
  color: var(--ink-muted);
}

.summary-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.stat {
  flex: 1 1 140px;
  background: rgba(255, 255, 255, 0.65);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0.9rem 1rem;
}

.stat-label {
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.stat-value {
  margin-top: 0.25rem;
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.demo-keys {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px dashed var(--line);
  font-size: 0.8rem;
  color: var(--ink-muted);
}

.demo-keys code {
  font-family: var(--font-mono);
  background: rgba(255, 255, 255, 0.7);
  padding: 0.1rem 0.35rem;
  border-radius: 6px;
}

/* HRMS dashboard */
.brand-logo {
  display: block;
  height: 48px;
  width: auto;
  max-width: min(280px, 70vw);
  object-fit: contain;
}

.brand-logo-lg {
  height: auto;
  width: min(300px, 78vw);
  max-height: 110px;
  margin: 0 auto;
}

.login-brand-block {
  text-align: center;
  margin-bottom: 1.25rem;
}

.login-product {
  margin: 0.65rem 0 0;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
}

/* Login: mix of Lead glass (peach/coral) + HRMS (teal) */
body.login-mix {
  --mix-teal: #0f766e;
  --mix-teal-deep: #0a5c56;
  --mix-coral: #e8794a;
  --mix-coral-deep: #d45a2a;
  background:
    radial-gradient(1000px 560px at 8% -10%, #f7dcc9 0%, transparent 52%),
    radial-gradient(900px 520px at 96% 0%, #b8d0c8 0%, transparent 50%),
    radial-gradient(700px 420px at 50% 100%, #c5d9e6 0%, transparent 55%),
    linear-gradient(165deg, #f6ebe3 0%, #e8eef2 48%, #e7ecef 100%);
}

body.login-mix::before {
  opacity: 0.22;
}

.login-shell {
  max-width: 920px;
  margin: 0 auto;
}

body.login-mix .brand-name {
  background: linear-gradient(120deg, var(--mix-teal-deep) 0%, var(--mix-coral-deep) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.login-panel {
  width: min(100%, 440px);
  background: rgba(255, 255, 255, 0.58);
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 28px;
  box-shadow: 0 24px 60px rgba(28, 36, 48, 0.1);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.login-modules {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: -0.6rem 0 1.25rem;
}

.login-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.login-chip-leads {
  color: var(--mix-coral-deep);
  background: rgba(232, 121, 74, 0.14);
  border: 1px solid rgba(232, 121, 74, 0.28);
}

.login-chip-hrms {
  color: var(--mix-teal-deep);
  background: rgba(15, 118, 110, 0.12);
  border: 1px solid rgba(15, 118, 110, 0.25);
}

body.login-mix .field input {
  background: rgba(255, 255, 255, 0.78);
  border-color: rgba(28, 36, 48, 0.12);
}

body.login-mix .field input:focus {
  border-color: rgba(15, 118, 110, 0.45);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.12);
}

.login-submit {
  width: 100%;
  margin-top: 0.25rem;
  background: linear-gradient(135deg, var(--mix-teal) 0%, #1a8f86 48%, var(--mix-coral) 100%);
  box-shadow: 0 12px 28px rgba(15, 118, 110, 0.22);
}

.login-submit:hover:not(:disabled) {
  background: linear-gradient(135deg, var(--mix-teal-deep) 0%, #0f766e 45%, var(--mix-coral-deep) 100%);
}

.topbar .brand-logo {
  height: 44px;
}

.dash-intro {
  width: min(100%, 960px);
  margin: 0 auto 1.5rem;
  animation: rise 0.45s ease both;
}

.dash-intro h1 {
  margin: 0.15rem 0 0;
  font-size: clamp(1.7rem, 4vw, 2.2rem);
  letter-spacing: -0.03em;
}

.dash-intro p {
  margin: 0.45rem 0 0;
  color: var(--ink-muted);
}

.card-grid {
  width: min(100%, 960px);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.menu-card {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  text-align: left;
  padding: 1.35rem 1.4rem;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.7);
  box-shadow: var(--shadow);
  color: inherit;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
  animation: rise 0.5s ease both;
  text-decoration: none;
}

.menu-card:nth-child(2) { animation-delay: 0.05s; }
.menu-card:nth-child(3) { animation-delay: 0.1s; }
.menu-card:nth-child(4) { animation-delay: 0.15s; }

.menu-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 22px 44px rgba(26, 35, 50, 0.12);
  border-color: rgba(15, 118, 110, 0.35);
}

.menu-card:focus-visible {
  outline: 3px solid rgba(15, 118, 110, 0.35);
  outline-offset: 2px;
}

.menu-icon {
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-size: 1.15rem;
  font-weight: 700;
  color: #fff;
}

.menu-icon.leave { background: #b45309; }
.menu-icon.punch { background: var(--teal); }
.menu-icon.holiday { background: #1d4e63; }
.menu-icon.info { background: #475569; }
.menu-icon.report { background: #334155; }

.menu-card h2 {
  margin: 0;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
}

.menu-card p {
  margin: 0;
  color: var(--ink-muted);
  font-size: 0.92rem;
  line-height: 1.4;
}

.menu-card .card-cta {
  margin-top: auto;
  padding-top: 0.35rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--teal-deep);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.page-back {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 1rem;
  color: var(--ink-muted);
  font-weight: 600;
  font-size: 0.9rem;
}

.page-back:hover {
  color: var(--ink);
}

.info-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.info-list li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.95rem;
}

.info-list li:last-child {
  border-bottom: none;
}

.info-list .label {
  color: var(--ink-muted);
}

.info-list .value {
  font-weight: 600;
  text-align: right;
}

.badge {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.badge-lop {
  background: rgba(194, 65, 12, 0.12);
  color: var(--clay-deep);
}

.badge-pending {
  background: rgba(161, 98, 7, 0.14);
  color: var(--warn);
}

.badge-approved {
  background: rgba(21, 128, 61, 0.14);
  color: var(--ok);
}

.badge-cancelled {
  background: rgba(90, 106, 122, 0.16);
  color: var(--ink-muted);
}

.leave-widgets .stat-value {
  font-family: var(--font-mono);
}

.holiday-item,
.leave-item {
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--line);
}

.holiday-item:last-child,
.leave-item:last-child {
  border-bottom: none;
}

.holiday-item .date,
.leave-item .date {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--ink-muted);
}

.holiday-item .name,
.leave-item .title {
  margin: 0.2rem 0 0;
  font-weight: 700;
}

.policy-box {
  margin-top: 1rem;
  padding: 0.95rem 1rem;
  border-radius: 14px;
  background: rgba(15, 118, 110, 0.08);
  color: var(--teal-deep);
  font-size: 0.92rem;
  line-height: 1.45;
}

.section-title {
  margin: 0 0 0.75rem;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
}

.btn-table {
  padding: 0.35rem 0.7rem;
  font-size: 0.8rem;
}

.textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: var(--surface-solid);
  border-radius: 12px;
  padding: 0.9rem 1rem;
  color: var(--ink);
  outline: none;
  resize: vertical;
  min-height: 96px;
}

.textarea:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.15);
}

.staff-nav {
  position: relative;
  display: flex;
  align-items: center;
  min-width: 0;
}

.nav-toggle {
  display: none;
  align-items: center;
  gap: 0.5rem;
  appearance: none;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.85);
  color: var(--ink);
  border-radius: 10px;
  padding: 0.55rem 0.85rem;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  white-space: nowrap;
}

.nav-toggle-bars {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  width: 18px;
}

.nav-toggle-bars span {
  display: block;
  height: 2px;
  width: 100%;
  border-radius: 2px;
  background: var(--ink);
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.staff-nav.is-open .nav-toggle-bars span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.staff-nav.is-open .nav-toggle-bars span:nth-child(2) {
  opacity: 0;
}

.staff-nav.is-open .nav-toggle-bars span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

.staff-nav-panel {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.15rem;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  box-sizing: border-box;
  padding: 0.45rem 0.7rem;
  border-radius: 8px;
  border: 0;
  background: transparent;
  color: var(--ink-muted);
  font-size: 0.86rem;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease;
  cursor: pointer;
  font-family: inherit;
  white-space: nowrap;
  position: relative;
}

.nav-link:hover {
  color: var(--ink);
  background: rgba(15, 118, 110, 0.08);
}

.nav-link.active {
  color: var(--teal-deep);
  background: rgba(15, 118, 110, 0.12);
}

.nav-link.active::after {
  content: "";
  position: absolute;
  left: 0.55rem;
  right: 0.55rem;
  bottom: 0.15rem;
  height: 2px;
  border-radius: 2px;
  background: var(--teal);
}

.nav-dropdown {
  position: relative;
  display: inline-flex;
  flex-direction: column;
  align-items: stretch;
}

.nav-dropdown-trigger {
  gap: 0.35rem;
}

.nav-caret {
  font-size: 0.7rem;
  line-height: 1;
  opacity: 0.75;
}

.nav-dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 0.35rem);
  left: 0;
  min-width: 11rem;
  padding: 0.4rem;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: #fff;
  box-shadow: 0 14px 32px rgba(26, 35, 50, 0.14);
  z-index: 80;
  flex-direction: column;
  gap: 0.25rem;
}

.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown:focus-within .nav-dropdown-menu {
  display: flex;
}

.nav-dropdown-menu .nav-link {
  width: 100%;
  justify-content: flex-start;
  border-radius: 10px;
}

.input-money {
  width: 100%;
  min-width: 5.5rem;
  padding: 0.45rem 0.55rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-family: var(--font-mono);
  font-size: 0.88rem;
  background: #fff;
  color: var(--ink);
}

.payslip-actions {
  display: flex;
  gap: 0.75rem;
  margin: 0 0 1rem;
}

.payslip-preview {
  margin-top: 0.5rem;
}

.payslip-sheet {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 1.5rem 1.6rem;
  box-shadow: var(--shadow);
  color: #1a2332;
}

.payslip-brand {
  text-align: center;
  margin-bottom: 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid #0f766e;
}

.payslip-company {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.payslip-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: #5a6a7a;
  margin-top: 0.15rem;
}

.payslip-period {
  margin-top: 0.35rem;
  font-family: var(--font-mono);
  font-size: 0.95rem;
  font-weight: 500;
}

.payslip-meta,
.payslip-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem 1.25rem;
  margin-bottom: 1.15rem;
}

.payslip-meta div,
.payslip-stats div {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.payslip-meta span,
.payslip-stats span {
  font-size: 0.75rem;
  color: #5a6a7a;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.payslip-meta strong,
.payslip-stats strong {
  font-size: 0.95rem;
}

.payslip-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1rem;
  font-size: 0.92rem;
}

.payslip-table th,
.payslip-table td {
  padding: 0.55rem 0.4rem;
  border-bottom: 1px solid rgba(26, 35, 50, 0.1);
  text-align: left;
}

.payslip-table th {
  color: #5a6a7a;
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.payslip-table .num {
  text-align: right;
  font-family: var(--font-mono);
}

.payslip-table tr.total td {
  font-weight: 700;
  border-bottom: none;
  padding-top: 0.75rem;
}

.payslip-net {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 0.5rem;
  padding: 0.9rem 1rem;
  border-radius: 12px;
  background: rgba(15, 118, 110, 0.08);
  border: 1px solid rgba(15, 118, 110, 0.2);
}

.payslip-net span {
  font-weight: 600;
}

.payslip-net strong {
  font-family: var(--font-mono);
  font-size: 1.25rem;
  color: #0a5c56;
}

.payslip-note {
  margin: 1rem 0 0;
  font-size: 0.82rem;
  color: #5a6a7a;
  line-height: 1.45;
}

@media (max-width: 700px) {
  .payslip-meta,
  .payslip-stats {
    grid-template-columns: 1fr;
  }
}

.fullscreen-toggle {
  font-size: 0.82rem;
  padding: 0.55rem 0.85rem;
  white-space: nowrap;
}

.mobile-block-icon {
  font-size: 3rem;
  line-height: 1;
  margin-bottom: 0.75rem;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: rgba(26, 35, 50, 0.4);
}

.modal[hidden] {
  display: none !important;
}

.modal-card {
  width: min(100%, 460px);
  background: #fff;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  padding: 1.35rem 1.4rem;
}

/* Desktop: links inline in header */
.staff-nav-panel--inline {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.1rem;
  min-width: 0;
  max-width: 100%;
  overflow-x: auto;
  scrollbar-width: thin;
  padding: 0.1rem 0.15rem;
  border-right: 1px solid rgba(26, 35, 50, 0.1);
  margin-right: 0.35rem;
  padding-right: 0.65rem;
}

.staff-nav-overlay {
  display: none;
}

.nav-toggle {
  display: none;
}

@media (max-width: 900px) {
  .btn-xl {
    width: 100%;
  }

  .fullscreen-toggle {
    display: none;
  }

  .card-grid {
    grid-template-columns: 1fr;
  }

  .shell {
    overflow-x: hidden;
  }

  .topbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.75rem;
    position: sticky;
    top: 0.5rem;
    z-index: 100;
    margin-bottom: 1rem;
    padding: 0.65rem 0.8rem;
  }

  .brand {
    min-width: 0;
  }

  .brand-name {
    font-size: 1.05rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .topbar-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.45rem;
    flex: 0 0 auto;
    min-width: 0;
  }

  .topbar-actions > .staff-nav {
    flex: 0 0 auto;
    margin-right: 0;
  }

  .topbar-actions .btn-ghost {
    padding: 0.5rem 0.75rem;
    font-size: 0.82rem;
    white-space: nowrap;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .staff-nav-panel--inline {
    display: none !important;
  }

  .staff-nav-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 200;
    background: rgba(26, 35, 50, 0.35);
    padding: 4.5rem 1rem 1rem;
    box-sizing: border-box;
  }

  .staff-nav-overlay.is-visible {
    display: block;
  }

  .staff-nav-panel--mobile {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.4rem;
    width: 100%;
    max-height: calc(100vh - 5.5rem);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 0.75rem;
    border-radius: 16px;
    background: #fff;
    border: 1px solid var(--line);
    box-shadow: 0 18px 40px rgba(26, 35, 50, 0.16);
    box-sizing: border-box;
  }

  .staff-nav-overlay .nav-link {
    width: 100%;
    justify-content: flex-start;
    border-radius: 10px;
    padding: 0.85rem 1rem;
    box-sizing: border-box;
    background: rgba(15, 118, 110, 0.04);
  }

  .staff-nav-overlay .nav-link.active {
    color: #fff;
    background: var(--teal);
  }

  .staff-nav-overlay .nav-link.active::after {
    display: none;
  }

  .staff-nav-overlay .nav-dropdown {
    width: 100%;
  }

  .staff-nav-overlay .nav-dropdown-menu {
    position: static;
    display: none;
    box-shadow: none;
    border: none;
    background: transparent;
    padding: 0.25rem 0 0.25rem 0.75rem;
    min-width: 0;
  }

  .staff-nav-overlay .nav-dropdown.is-open .nav-dropdown-menu {
    display: flex;
  }

  .staff-nav-overlay .nav-sublink {
    background: rgba(15, 118, 110, 0.06);
  }

  body.nav-open {
    overflow: hidden;
  }
}

.panel-xl {
  width: min(100%, 1180px);
}

.hub-grid {
  width: min(100%, 860px);
}

.menu-icon.leads {
  background: #6d28d9;
}

.menu-icon.payroll {
  background: var(--teal);
}

.check-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.55rem 1rem;
  margin: 0 0 1rem;
}

.check-item {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 0.92rem;
  line-height: 1.35;
  color: var(--ink);
}

.check-item input {
  margin-top: 0.15rem;
}

.lead-quick {
  margin-left: 0.35rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.lead-phones {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  min-width: 0;
}

.lead-phone-row {
  display: grid;
  grid-template-columns: minmax(7.5rem, 8.5rem) minmax(0, 1fr) auto;
  gap: 0.25rem 0.55rem;
  align-items: center;
}

.lead-phone-label {
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--lg-muted, var(--ink-muted));
}

.lead-phone-num {
  font-size: 0.9rem;
  color: var(--lg-ink, var(--ink));
  word-break: break-word;
}

.lead-phone-actions {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  justify-content: flex-end;
}

.lead-phone-actions .lead-quick {
  margin-left: 0;
}

.view-card-value .lead-phones {
  gap: 0.65rem;
}

.view-card-value .lead-phone-row {
  grid-template-columns: 1fr auto;
  padding: 0.45rem 0.55rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(28, 36, 48, 0.06);
}

.view-card-value .lead-phone-label {
  grid-column: 1 / -1;
  margin-bottom: 0.05rem;
}

.view-card-value .lead-phone-actions {
  justify-content: flex-start;
}

@media (max-width: 720px) {
  .lead-phone-row {
    grid-template-columns: 1fr auto;
  }

  .lead-phone-label {
    grid-column: 1 / -1;
  }
}

.modal-card.wide {
  width: min(100%, 680px);
  max-height: min(90vh, 820px);
  overflow: auto;
}

.lead-badge {
  text-transform: none;
  letter-spacing: 0.02em;
}

.lead-not-contacted {
  background: rgba(90, 106, 122, 0.16);
  color: var(--ink-muted);
}

.lead-contacted,
.lead-warm {
  background: rgba(15, 118, 110, 0.14);
  color: var(--teal-deep);
}

.lead-cold {
  background: rgba(29, 78, 216, 0.12);
  color: #1d4ed8;
}

.lead-hot,
.lead-sold {
  background: rgba(21, 128, 61, 0.14);
  color: var(--ok);
}

.lead-wrong-number,
.lead-lost,
.lead-not-interested {
  background: rgba(194, 65, 12, 0.12);
  color: var(--clay-deep);
}

.lead-no-answer {
  background: rgba(161, 98, 7, 0.14);
  color: var(--warn);
}

.content-tabs {
  overflow-x: auto;
}

/* Telecaller light-glass dashboard (scoped) */
body.lead-glass {
  --lg-peach: #f3d5c2;
  --lg-peach-deep: #e8b896;
  --lg-coral: #e8794a;
  --lg-coral-deep: #d45a2a;
  --lg-ink: #1c2430;
  --lg-muted: #6b7280;
  --lg-glass: rgba(255, 255, 255, 0.55);
  --lg-glass-strong: rgba(255, 255, 255, 0.72);
  --lg-dark: rgba(28, 36, 48, 0.88);
  background:
    radial-gradient(900px 520px at 12% -8%, #f7dcc9 0%, transparent 55%),
    radial-gradient(800px 480px at 92% 8%, #f0c8b0 0%, transparent 50%),
    radial-gradient(700px 420px at 50% 100%, #e8e4df 0%, transparent 55%),
    linear-gradient(165deg, #f6ebe3 0%, #efe8e2 42%, #e7ecef 100%);
}

body.lead-glass::before {
  opacity: 0.18;
  background-image:
    linear-gradient(rgba(28, 36, 48, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(28, 36, 48, 0.035) 1px, transparent 1px);
}

.lg-shell {
  max-width: 1280px;
  margin: 0 auto;
}

.lg-main {
  padding-bottom: 1.5rem;
}

.lg-frame {
  background: var(--lg-glass);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 28px;
  box-shadow: 0 24px 60px rgba(28, 36, 48, 0.08);
  padding: clamp(1.1rem, 2.5vw, 1.75rem);
}

.lg-page-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1.15rem;
}

.lg-title {
  margin: 0.15rem 0 0;
  font-size: clamp(1.55rem, 3vw, 2rem);
  letter-spacing: -0.03em;
  color: var(--lg-ink);
}

.lg-user-chip {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.35rem 0.7rem 0.35rem 0.35rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(10px);
}

.lg-user-chip strong {
  display: block;
  font-size: 0.85rem;
  line-height: 1.15;
}

.lg-user-chip span {
  display: block;
  font-size: 0.72rem;
  color: var(--lg-muted);
}

.lg-avatar {
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 0.85rem;
  color: #fff;
  background: linear-gradient(145deg, var(--lg-coral), var(--lg-coral-deep));
}

.lg-kpi-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.85rem;
  margin-bottom: 1rem;
}

.lg-kpi {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 1rem 1.05rem;
  border-radius: 20px;
  background: var(--lg-glass-strong);
  border: 1px solid rgba(255, 255, 255, 0.7);
  box-shadow: 0 10px 28px rgba(28, 36, 48, 0.05);
  backdrop-filter: blur(12px);
}

.lg-kpi-icon {
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  font-weight: 700;
  color: var(--lg-coral-deep);
  background: rgba(232, 121, 74, 0.14);
  flex-shrink: 0;
}

.lg-kpi-label {
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--lg-muted);
}

.lg-kpi-value {
  margin-top: 0.2rem;
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--lg-ink);
}

.lg-mid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(240px, 0.85fr);
  gap: 0.95rem;
  margin-bottom: 0.95rem;
}

.lg-bottom {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.95rem;
}

.lg-card {
  background: var(--lg-glass-strong);
  border: 1px solid rgba(255, 255, 255, 0.68);
  border-radius: 22px;
  padding: 1.1rem 1.15rem;
  box-shadow: 0 12px 32px rgba(28, 36, 48, 0.05);
  backdrop-filter: blur(14px);
}

.lg-card-dark {
  background: var(--lg-dark);
  border-color: rgba(255, 255, 255, 0.08);
  color: #f5f3f0;
}

.lg-card-dark .lg-eyebrow {
  color: rgba(245, 243, 240, 0.55);
}

.lg-card-dark .lg-card-title {
  color: #fff;
}

.lg-card-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.85rem;
  margin-bottom: 1rem;
}

.lg-card-head.tight {
  margin-bottom: 0.65rem;
}

.lg-eyebrow {
  margin: 0;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--lg-muted);
}

.lg-card-title {
  margin: 0.2rem 0 0;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
  color: var(--lg-ink);
}

.lg-hero-metric {
  margin: 0.65rem 0 0;
  display: flex;
  align-items: baseline;
  gap: 0.55rem;
}

.lg-hero-metric span {
  font-size: 2.2rem;
  font-weight: 700;
  letter-spacing: -0.04em;
  color: var(--lg-ink);
}

.lg-hero-metric small {
  color: var(--lg-muted);
  font-size: 0.82rem;
}

.lg-period {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.55rem;
}

.lg-period .lead-dash-range {
  justify-content: flex-end;
}

.lg-period .lead-dash-custom {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
}

.lg-period input[type="date"] {
  border: 1px solid rgba(28, 36, 48, 0.12);
  background: rgba(255, 255, 255, 0.7);
  border-radius: 999px;
  padding: 0.4rem 0.7rem;
  font-size: 0.82rem;
}

.btn-sm {
  padding: 0.45rem 0.95rem;
  font-size: 0.82rem;
}

body.lead-glass .btn-chip {
  padding: 0.4rem 0.8rem;
  font-size: 0.78rem;
  border-radius: 999px;
  border: 1px solid rgba(28, 36, 48, 0.1);
  background: rgba(255, 255, 255, 0.55);
  color: var(--lg-muted);
  cursor: pointer;
  font-weight: 600;
}

body.lead-glass .btn-chip.active,
body.lead-glass .btn-chip:hover {
  background: rgba(232, 121, 74, 0.16);
  color: var(--lg-coral-deep);
  border-color: rgba(232, 121, 74, 0.35);
}

body.lead-glass .btn-primary {
  background: linear-gradient(145deg, var(--lg-coral), var(--lg-coral-deep));
  color: #fff;
}

.lg-chart {
  min-height: 160px;
}

.lg-bars {
  display: flex;
  align-items: flex-end;
  gap: 0.45rem;
  height: 150px;
  padding-top: 0.5rem;
}

.lg-bar-col {
  flex: 1;
  min-width: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  gap: 0.35rem;
}

.lg-bar {
  width: 70%;
  max-width: 28px;
  border-radius: 10px 10px 6px 6px;
  background: linear-gradient(180deg, #f0a27a 0%, var(--lg-coral) 70%, var(--lg-coral-deep));
  box-shadow: 0 8px 16px rgba(212, 90, 42, 0.18);
}

.lg-bar-col span {
  font-size: 0.62rem;
  color: var(--lg-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.lg-side {
  display: flex;
  flex-direction: column;
  gap: 0.95rem;
}

.lg-dark-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-top: 1rem;
}

.lg-dark-row span {
  display: block;
  font-size: 0.75rem;
  color: rgba(245, 243, 240, 0.55);
}

.lg-dark-row strong {
  display: block;
  margin-top: 0.25rem;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
}

.lg-dark-note {
  margin: 1rem 0 0;
  font-size: 0.8rem;
  color: rgba(245, 243, 240, 0.55);
}

.lg-meter {
  margin-top: 0.85rem;
}

.lg-meter-top {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--lg-muted);
  margin-bottom: 0.45rem;
}

.lg-meter-top strong {
  color: var(--lg-ink);
  font-size: 1.1rem;
}

.lg-meter-track,
.lg-mini-track {
  height: 0.55rem;
  border-radius: 999px;
  background: rgba(28, 36, 48, 0.08);
  overflow: hidden;
}

.lg-meter-fill,
.lg-mini-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #f0a27a, var(--lg-coral-deep));
}

.lg-link {
  display: inline-block;
  margin-top: 0.9rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--lg-coral-deep);
}

.lg-table {
  border: none;
  background: transparent;
  border-radius: 0;
}

.lg-table table {
  min-width: 0;
}

.lg-table th {
  background: transparent;
}

.lg-table td,
.lg-table th {
  padding: 0.7rem 0.55rem;
}

@media (max-width: 1100px) {
  .lg-kpi-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .lg-mid,
  .lg-bottom {
    grid-template-columns: 1fr;
  }

  .lg-period {
    align-items: stretch;
  }

  .lg-period .lead-dash-range {
    justify-content: flex-start;
  }
}

@media (max-width: 640px) {
  .lg-kpi-row {
    grid-template-columns: 1fr;
  }

  .lg-frame {
    border-radius: 20px;
    padding: 1rem;
  }

  .lg-user-chip {
    display: none;
  }
}

/* Shared Lead Management glass theme (pages + horizontal menu) */
body.lead-glass .lg-panel.panel,
body.lead-glass .lg-panel.panel-xl {
  width: 100%;
  max-width: none;
  background: transparent;
  border: 0;
  box-shadow: none;
  backdrop-filter: none;
  padding: 0;
  animation: none;
}

body.lead-glass .stat {
  background: var(--lg-glass-strong);
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 18px;
  box-shadow: 0 10px 28px rgba(28, 36, 48, 0.05);
  backdrop-filter: blur(12px);
}

body.lead-glass .form-block,
body.lead-glass .list-block {
  background: rgba(255, 255, 255, 0.42);
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 18px;
  padding: 1rem 1.05rem;
  margin-bottom: 1rem;
}

body.lead-glass .table-wrap {
  background: rgba(255, 255, 255, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 16px;
  backdrop-filter: blur(8px);
}

body.lead-glass .content-tabs {
  background: rgba(255, 255, 255, 0.5);
  border-color: rgba(255, 255, 255, 0.65);
  border-radius: 16px;
}

body.lead-glass .content-tab.active {
  background: linear-gradient(145deg, var(--lg-coral), var(--lg-coral-deep));
  color: #fff;
}

body.lead-glass .content-tab:hover:not(.active) {
  background: rgba(232, 121, 74, 0.1);
  color: var(--lg-coral-deep);
}

body.lead-glass .field input,
body.lead-glass .field select,
body.lead-glass .textarea {
  background: rgba(255, 255, 255, 0.72);
  border-color: rgba(28, 36, 48, 0.12);
}

body.lead-glass .field input:focus,
body.lead-glass .field select:focus,
body.lead-glass .textarea:focus {
  border-color: rgba(232, 121, 74, 0.55);
  box-shadow: 0 0 0 3px rgba(232, 121, 74, 0.15);
}

body.lead-glass .modal-card {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 22px;
}

body.lead-glass .btn-ghost {
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(28, 36, 48, 0.1);
}

body.lead-glass .lg-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
  padding: 0.35rem 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

body.lead-glass .lg-topbar .brand {
  flex-direction: row;
  align-items: center;
  gap: 0.55rem;
  min-width: 0;
}

body.lead-glass .lg-topbar .brand-name {
  font-size: 1.05rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

body.lead-glass .lg-signout {
  padding: 0.45rem 0.85rem;
  font-size: 0.82rem;
  white-space: nowrap;
}

body.lead-glass .topbar-actions {
  flex-wrap: nowrap;
  justify-content: flex-end;
  flex-shrink: 0;
}

body.lead-glass .lg-topbar .nav-toggle {
  display: none;
  width: 2.4rem;
  height: 2.4rem;
  padding: 0;
  justify-content: center;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.8);
}

/* Dedicated horizontal menu under header (desktop) */
body.lead-glass .lg-menubar.staff-nav {
  display: block;
  width: 100%;
  max-width: none;
  margin: 0 0 1rem;
}

body.lead-glass .lg-menubar-panel,
body.lead-glass .lg-menubar .staff-nav-panel--inline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  width: 100%;
  max-width: none;
  overflow: visible;
  padding: 0.55rem 0.75rem;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(12px);
  box-shadow: 0 8px 24px rgba(28, 36, 48, 0.05);
}

body.lead-glass .lg-menubar .nav-link {
  white-space: nowrap;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.85);
  border-radius: 999px;
  color: var(--lg-muted);
  padding: 0.55rem 1rem;
}

body.lead-glass .lg-menubar .nav-link:hover,
body.lead-glass .nav-link:hover {
  color: var(--lg-coral-deep);
  border-color: rgba(232, 121, 74, 0.35);
  background: rgba(255, 255, 255, 0.95);
}

body.lead-glass .lg-menubar .nav-link.active,
body.lead-glass .nav-link.active {
  color: #fff;
  background: linear-gradient(145deg, var(--lg-coral), var(--lg-coral-deep));
  border-color: transparent;
}

body.lead-glass .nav-link.active::after {
  display: none;
}

body.lead-glass .lg-menubar .staff-nav-panel--inline {
  border-right: 0;
  margin-right: 0;
  padding-right: 0;
  overflow: visible;
  flex-wrap: wrap;
}

.lg-dash-filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 0.85rem;
  margin-bottom: 1rem;
  padding: 0.9rem 1rem;
  border-radius: 20px;
  background: var(--lg-glass-strong);
  border: 1px solid rgba(255, 255, 255, 0.7);
}

.lg-dash-filters .lg-period {
  align-items: flex-end;
}

.view-block {
  position: relative;
}

.view-block[data-mode="list"] .view-cards,
.view-block[data-mode="cards"] .table-wrap {
  display: none !important;
}

.view-block[data-mode="cards"] .view-cards {
  display: grid;
}

.view-cards[hidden],
.view-block .table-wrap[hidden] {
  display: none !important;
}

.view-toolbar {
  display: flex;
  justify-content: flex-start;
  margin: 0 0 0.45rem;
}

.view-switch {
  display: inline-flex;
  gap: 0.15rem;
  padding: 0.2rem;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 6px 16px rgba(28, 36, 48, 0.05);
}

.view-btn {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--lg-muted);
  display: inline-grid;
  place-items: center;
  width: 2.15rem;
  height: 2.15rem;
  padding: 0;
  border-radius: 11px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.view-btn:hover {
  color: var(--lg-coral-deep);
  background: rgba(232, 121, 74, 0.12);
}

.view-btn.active {
  background: linear-gradient(145deg, var(--lg-coral), var(--lg-coral-deep));
  color: #fff;
  box-shadow: 0 6px 14px rgba(212, 90, 42, 0.28);
}

.view-icon {
  width: 1.05rem;
  height: 1.05rem;
  display: block;
}

.view-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 0.95rem;
}

.view-cards > .empty-state {
  grid-column: 1 / -1;
  margin: 0;
  padding: 1.25rem 1rem;
  text-align: center;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.55);
  border: 1px dashed rgba(28, 36, 48, 0.14);
  color: var(--lg-muted);
}

.view-card {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(165deg, rgba(255, 255, 255, 0.92) 0%, rgba(255, 248, 243, 0.82) 100%);
  border: 1px solid rgba(255, 255, 255, 0.95);
  border-radius: 18px;
  padding: 1rem 1.05rem 0.95rem;
  box-shadow:
    0 14px 32px rgba(28, 36, 48, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.view-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: linear-gradient(180deg, var(--lg-coral), var(--lg-peach-deep));
}

.view-card:hover {
  transform: translateY(-2px);
  border-color: rgba(232, 121, 74, 0.35);
  box-shadow:
    0 18px 40px rgba(28, 36, 48, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.95);
}

.view-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.65rem;
  padding-left: 0.35rem;
}

.view-card-title {
  min-width: 0;
  font-weight: 700;
  font-size: 1.02rem;
  line-height: 1.3;
  letter-spacing: -0.02em;
  color: var(--lg-ink);
  word-break: break-word;
}

.view-card-title .lead-quick {
  display: inline-block;
  margin: 0.25rem 0.35rem 0 0;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: rgba(232, 121, 74, 0.12);
  color: var(--lg-coral-deep);
  text-decoration: none;
}

.view-card-title .lead-quick:hover {
  background: rgba(232, 121, 74, 0.22);
}

.view-card-status {
  flex-shrink: 0;
}

.view-card-status .lead-badge,
.view-card-body .lead-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.28rem 0.6rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
}

.view-card-body {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem 0.7rem;
  padding: 0.75rem 0.35rem 0.15rem;
  border-top: 1px solid rgba(28, 36, 48, 0.08);
}

.view-card-field {
  min-width: 0;
}

.view-card-field.is-wide {
  grid-column: 1 / -1;
}

.view-card-field > span {
  display: block;
  margin-bottom: 0.2rem;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--lg-muted);
}

.view-card-value {
  font-size: 0.9rem;
  line-height: 1.35;
  color: var(--lg-ink);
  word-break: break-word;
}

.view-card-value a {
  color: var(--lg-coral-deep);
  font-weight: 700;
  text-decoration: none;
}

.view-card-value a:hover {
  text-decoration: underline;
}

.view-card-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  margin-top: auto;
  padding: 0.75rem 0.35rem 0.1rem;
  border-top: 1px solid rgba(28, 36, 48, 0.08);
}

.view-card-actions .btn,
.view-card-actions .btn-table {
  width: auto;
  min-height: 2.1rem;
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
}

.view-card-actions input[type="checkbox"] {
  width: 1.05rem;
  height: 1.05rem;
  accent-color: var(--lg-coral);
}

@media (max-width: 420px) {
  .view-cards {
    grid-template-columns: 1fr;
  }

  .view-card-body {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  body.lead-glass .lg-menubar {
    display: none !important;
  }

  body.lead-glass .lg-topbar .nav-toggle {
    display: inline-flex !important;
  }

  body.lead-glass .staff-nav-overlay.is-visible {
    display: block !important;
  }

  body.lead-glass .staff-nav-overlay .nav-link.active {
    color: #fff;
    background: linear-gradient(145deg, var(--lg-coral), var(--lg-coral-deep));
  }
}
