@import url('https://fonts.googleapis.com/css2?family=Fira+Code:wght@400;500;600;700&family=Fira+Sans:wght@300;400;500;600;700&display=swap');

:root {
  --color-primary: #1e40af;
  --color-secondary: #eff6ff;
  --color-cta: #f59e0b;
  --color-background: #f8fafc;
  --color-surface: rgba(255, 255, 255, 0.94);
  --color-surface-alt: rgba(248, 250, 252, 0.98);
  --color-border: rgba(148, 163, 184, 0.18);
  --color-border-strong: rgba(148, 163, 184, 0.4);
  --color-text: #0f172a;
  --color-muted: #64748b;
  --color-warning: #f59e0b;
  --color-danger: #e11d48;
  --color-info: #3b82f6;
  --color-success: #10b981;
  --shadow-sm: 0 8px 24px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 16px 48px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 24px 64px rgba(15, 23, 42, 0.12);
  --radius-md: 18px;
  --radius-lg: 24px;
  --space-xs: 0.5rem;
  --space-sm: 0.75rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2.5rem;
  --space-2xl: 4rem;
}

* {
  box-sizing: border-box;
}

html {
  font-size: 16px;
  min-height: 100%;
  background:
    radial-gradient(circle at top left, rgba(59, 130, 246, 0.14), transparent 22rem),
    radial-gradient(circle at 85% 12%, rgba(245, 158, 11, 0.12), transparent 18rem),
    linear-gradient(180deg, #f8fafc 0%, #eef4ff 100%);
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Fira Sans", sans-serif;
  color: var(--color-text);
  background: transparent;
}

a {
  color: inherit;
  text-decoration: none;
}

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

form {
  margin: 0;
}

button {
  border: 0;
}

code,
.metric-value,
.top-meta,
.eyebrow,
.section-kicker,
.brand-mark {
  font-family: "Fira Code", monospace;
}

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

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

.side-rail {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
  height: 100vh;
  min-height: 100vh;
  padding: 1.25rem 0.9rem;
  border-right: 1px solid var(--color-border);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(239, 246, 255, 0.96));
  backdrop-filter: blur(16px);
  overflow: hidden;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.brand-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.35rem;
  height: 2.35rem;
  border: 1px solid rgba(37, 99, 235, 0.24);
  border-radius: 14px;
  background: white;
  overflow: hidden;
  padding: 0;
}

.brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 4px;
}

.brand-copy {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.brand-copy strong {
  font-size: 0.82rem;
}

.brand-copy span:last-child {
  font-size: 0.72rem;
  color: var(--color-muted);
}

.side-rail-nav {
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.nav-stack {
  display: grid;
  gap: 0.3rem;
  max-height: 100%;
  padding-right: 0.2rem;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(148, 163, 184, 0.68) transparent;
}

.nav-stack::-webkit-scrollbar {
  width: 6px;
}

.nav-stack::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.68);
}

.nav-stack::-webkit-scrollbar-track {
  background: transparent;
}

.nav-link {
  padding: 0.7rem 0.85rem;
  border: 1px solid transparent;
  border-radius: 14px;
  color: #1e3a8a;
  font-size: 0.92rem;
  transition: background-color 180ms ease, border-color 180ms ease, color 180ms ease;
  cursor: pointer;
}

.nav-link:hover,
.nav-link.active {
  background: rgba(219, 234, 254, 0.96);
  border-color: rgba(37, 99, 235, 0.18);
  color: #0f172a;
}

.logout-form {
  flex-shrink: 0;
}

.main-stage {
  min-width: 0;
  padding: 1.5rem 1.75rem 2rem;
}

.main-stage-public {
  padding-inline: 1.5rem;
}

.top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  margin-bottom: var(--space-xl);
  padding: 0.85rem 1.25rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(20px);
  box-shadow: var(--shadow-sm);
}

.surface-card {
  padding: 1.5rem 1.75rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.surface-card-hover:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--color-border-strong);
}

.glass-card {
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.4);
}

.gradient-text {
  background: linear-gradient(135deg, var(--color-primary), #6366f1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 800;
}

.top-brand-group {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-width: 0;
}

.mobile-menu-toggle {
  display: none;
  background: transparent;
  padding: 0.5rem;
  cursor: pointer;
  border-radius: 10px;
  transition: background-color 0.2s;
}

.mobile-menu-toggle:hover {
  background: rgba(30, 64, 175, 0.08);
}

.hamburger-box {
  width: 1.25rem;
  height: 1.1rem;
  display: inline-block;
  position: relative;
}

.hamburger-inner, .hamburger-inner::before, .hamburger-inner::after {
  width: 1.25rem;
  height: 2px;
  background-color: var(--color-primary);
  position: absolute;
  transition-property: transform;
  transition-duration: 0.15s;
  transition-timing-function: ease;
  border-radius: 4px;
}

.hamburger-inner {
  top: 50%;
  transform: translateY(-50%);
}

.hamburger-inner::before, .hamburger-inner::after {
  content: "";
  display: block;
}

.hamburger-inner::before {
  top: -6px;
}

.hamburger-inner::after {
  bottom: -6px;
}

.menu-open .hamburger-inner {
  transform: rotate(45deg);
}

.menu-open .hamburger-inner::before {
  top: 0;
  opacity: 0;
}

.menu-open .hamburger-inner::after {
  bottom: 0;
  transform: rotate(-90deg);
}

.top-bar-public,
.content-stage-public {
  width: min(100%, 1180px);
  margin-inline: auto;
}

.top-bar strong {
  display: block;
  margin-top: 0.15rem;
  font-size: 1rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.top-meta {
  color: var(--color-muted);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.top-actions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.content-stage {
  display: grid;
  gap: 0.5rem;
}

.hero-panel,
.surface-card,
.auth-panel,
.metric-card,
.payroll-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.96)),
    linear-gradient(135deg, rgba(59, 130, 246, 0.04), transparent 55%);
  box-shadow: var(--shadow-sm);
}

.hero-panel,
.surface-card,
.auth-panel {
  padding: 1.5rem 1.75rem;
}

.hero-panel::after,
.surface-card::after,
.auth-panel::after,
.metric-card::after,
.payroll-card::after {
  content: "";
  position: absolute;
  inset: auto 0 0 auto;
  width: 8rem;
  height: 8rem;
  background: radial-gradient(circle, rgba(34, 197, 94, 0.18), transparent 68%);
  pointer-events: none;
}

.hero-panel {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-xl);
}

.page-header {
  display: flex;
  justify-content: space-between;
  gap: var(--space-lg);
  align-items: flex-start;
}

.hero-panel h1,
.page-header h1,
.auth-panel h1 {
  margin: 0.35rem 0 0.75rem;
  font-size: clamp(1.4rem, 5vw, 2.25rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
}

h2 {
  font-size: clamp(1.15rem, 3vw, 1.45rem);
  letter-spacing: -0.01em;
}

.hero-copy {
  max-width: 70ch;
  margin: 0;
  color: #475569;
  font-size: 0.95rem;
  line-height: 1.5;
}

.eyebrow,
.section-kicker {
  color: #2563eb;
  letter-spacing: 0.08em;
  font-size: 0.72rem;
  text-transform: uppercase;
}

.hero-actions,
.filter-shell,
.split-grid,
.dashboard-grid,
.metric-grid,
.field-grid,
.payroll-grid,
.detail-stack,
.stack-sm,
.stack-md,
.action-stack {
  display: grid;
  gap: 1.5rem;
}

.stack-sm {
  gap: 1rem;
}

.field-grid {
  gap: 0.75rem;
}

.action-stack {
  gap: 0.85rem;
}

.hero-actions {
  align-self: stretch;
  min-width: 14rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 2.45rem;
  padding: 0.6rem 0.9rem;
  border-radius: 12px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: background-color 180ms ease, border-color 180ms ease, transform 180ms ease;
  cursor: pointer;
}

.button:hover {
  transform: translateY(-1px);
}

.button-primary {
  background: var(--color-cta);
  color: #7c2d12;
}

.button-primary:hover {
  background: #fbbf24;
}

.button-secondary {
  border: 1px solid var(--color-border-strong);
  background: rgba(255, 255, 255, 0.92);
  color: var(--color-text);
}

.button-secondary:hover {
  background: rgba(239, 246, 255, 0.96);
}

.button-inline {
  min-height: 2.5rem;
  padding-inline: 0.85rem;
}

.button-full {
  width: 100%;
}

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

.metric-card,
.payroll-card {
  padding: 1.25rem;
}

.metric-label {
  display: block;
  font-size: 0.82rem;
  color: var(--color-muted);
}

.metric-value {
  display: block;
  margin: 0.65rem 0;
  font-size: clamp(1.5rem, 3vw, 2rem);
}

.metric-card p,
.empty-state,
.timeline-item p,
.policy-panel p,
.note-panel,
.payroll-note,
.demo-card span,
.demo-card strong,
.text-muted,
td p {
  margin: 0;
  color: var(--color-muted);
  line-height: 1.55;
}

.dashboard-grid {
  grid-template-columns: 1.1fr 0.9fr;
}

.admin-two-up {
  grid-template-columns: 0.95fr 1.05fr;
}

.section-heading {
  display: flex;
  justify-content: space-between;
  gap: var(--space-md);
  align-items: flex-start;
  margin-bottom: 1.25rem;
}

.section-heading h2,
.section-heading h1,
.payroll-header h3 {
  margin: 0.25rem 0 0;
  font-size: 1rem;
}

.text-link {
  color: #2563eb;
  font-weight: 600;
}

.text-link:hover {
  color: #1d4ed8;
}

.timeline-list {
  gap: 1rem;
}

.timeline-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  padding: 0.9rem 1rem;
  border: 1px solid var(--color-border);
  border-radius: 16px;
  background: rgba(248, 250, 252, 0.92);
  margin-bottom: 0.5rem;
}

.timeline-item strong {
  display: block;
  margin-bottom: 0.25rem;
}

.chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.38rem 0.7rem;
  border-radius: 999px;
  font-size: 0.78rem;
  white-space: nowrap;
  border: 1px solid transparent;
}

.chip-success {
  background: rgba(34, 197, 94, 0.12);
  color: #166534;
  border-color: rgba(34, 197, 94, 0.18);
}

.chip-warning {
  background: rgba(245, 158, 11, 0.12);
  color: #92400e;
  border-color: rgba(245, 158, 11, 0.2);
}

.chip-info {
  background: rgba(14, 165, 233, 0.12);
  color: #0f766e;
  border-color: rgba(20, 184, 166, 0.2);
}

.chip-muted {
  background: rgba(148, 163, 184, 0.12);
  color: #475569;
  border-color: rgba(148, 163, 184, 0.2);
}

.policy-panel,
.note-panel,
.demo-card {
  padding: 1.25rem;
  border: 1px solid var(--color-border);
  border-radius: 16px;
  background: rgba(248, 250, 252, 0.9);
  margin-block: 0.5rem;
}

.field-grid {
  gap: 0.45rem;
}

.field-label {
  color: #334155;
  font-size: 0.82rem;
}

.input-shell {
  width: auto;
  min-height: 2.35rem;
  padding: 0.55rem 0.75rem;
  border: 1px solid var(--color-border-strong);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.98);
  color: var(--color-text);
  font-size: 0.95rem;
  transition: border-color 180ms ease, background-color 180ms ease;
}

.textarea-shell {
  min-height: 6rem;
  resize: vertical;
}

.field-hint {
  display: block;
  margin-top: 0.4rem;
  font-size: 0.82rem;
  color: var(--color-muted);
  font-style: italic;
}

.input-shell::placeholder {
  color: #64748b;
}

.input-shell:focus-visible,
.button:focus-visible,
.nav-link:focus-visible {
  outline: none;
  border-color: rgba(37, 99, 235, 0.5);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.field-validation {
  color: #fecdd3;
  font-size: 0.82rem;
}

.checkbox-shell {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  color: #334155;
}

.checkbox-inline {
  white-space: nowrap;
}

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

.map-search-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 0.5rem;
  align-items: center;
}

.map-search-status {
  min-height: 1.4rem;
  font-size: 0.84rem;
  color: var(--color-muted);
}

.map-search-status[data-tone="success"] {
  color: #166534;
}

.map-search-status[data-tone="danger"] {
  color: #be123c;
}

.map-search-results {
  display: grid;
  gap: 0.45rem;
  max-height: 10.5rem;
  overflow: auto;
}

.map-search-result {
  display: block;
  width: 100%;
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--color-border);
  border-radius: 10px;
  background: rgba(248, 250, 252, 0.92);
  color: var(--color-text);
  text-align: left;
  line-height: 1.35;
  cursor: pointer;
}

.map-search-result:hover {
  border-color: rgba(37, 99, 235, 0.35);
  background: rgba(219, 234, 254, 0.52);
}

.geofence-map {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 320px;
  border: 1px solid var(--color-border);
  border-radius: 14px;
  overflow: hidden;
  background: rgba(226, 232, 240, 0.7);
}

.geofence-map .leaflet-control-attribution {
  font-size: 0.66rem;
}

.data-table-shell {
  overflow: auto;
  border: 1px solid var(--color-border);
  border-radius: 18px;
}

.data-table {
  width: 100%;
  min-width: 42rem;
  border-collapse: collapse;
}

.data-table thead {
  background: rgba(239, 246, 255, 0.96);
}

.data-table th,
.data-table td {
  padding: 0.95rem 1rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.1);
  text-align: left;
  vertical-align: top;
}

.data-table tbody tr {
  transition: background-color 180ms ease;
}

.data-table tbody tr:hover {
  background: rgba(239, 246, 255, 0.72);
}

.detail-stack {
  margin-bottom: 1rem;
}

.detail-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  padding: 1rem 1.25rem;
  border: 1px solid var(--color-border);
  border-radius: 14px;
  background: rgba(248, 250, 252, 0.92);
}

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

.shift-card-grid,
.payroll-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.shift-card {
  display: grid;
  gap: 0.7rem;
  padding: 1.1rem;
  border: 1px solid var(--color-border);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.96);
  cursor: pointer;
}

.shift-card:hover {
  border-color: rgba(37, 99, 235, 0.24);
}

.shift-card h3,
.payroll-header strong {
  margin: 0;
}

.inline-editor {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex-wrap: wrap;
}

.input-compact {
  min-height: 2.4rem;
  width: auto;
  min-width: 7rem;
}

.action-stack {
  display: flex;
  gap: 0.85rem;
  flex-wrap: wrap;
}

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

.payroll-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-md);
  margin-bottom: 1rem;
}

.payroll-note {
  margin-top: 0.9rem;
  font-size: 0.92rem;
}

.auth-shell {
  min-height: calc(100vh - 8rem);
  display: grid;
  place-items: center;
}

.auth-panel {
  width: min(100%, 72rem);
}

.auth-layout {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 1.5rem;
  align-items: stretch;
}

.auth-copy-panel {
  display: grid;
  gap: 1.5rem;
  padding: 1.75rem;
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(239, 246, 255, 0.98), rgba(255, 255, 255, 0.96)),
    radial-gradient(circle at top left, rgba(59, 130, 246, 0.1), transparent 40%);
  border: 1px solid rgba(148, 163, 184, 0.18);
}

.auth-copy-panel h1 {
  max-width: 10ch;
  font-size: clamp(2.75rem, 5vw, 5.3rem);
  line-height: 0.96;
}

.auth-form-panel {
  display: grid;
  gap: 1rem;
  align-content: start;
  padding: 1.5rem;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(148, 163, 184, 0.16);
}

.auth-feature-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem;
}

.demo-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem;
}

.inline-alert {
  padding: 0.95rem 1rem;
  border-radius: 16px;
  border: 1px solid transparent;
}

.inline-alert-success {
  background: rgba(34, 197, 94, 0.14);
  border-color: rgba(34, 197, 94, 0.22);
  color: #166534;
}

.inline-alert-danger {
  background: rgba(251, 113, 133, 0.14);
  border-color: rgba(251, 113, 133, 0.22);
  color: #9f1239;
}

.inline-alert-info {
  background: rgba(56, 189, 248, 0.14);
  border-color: rgba(56, 189, 248, 0.22);
  color: #1d4ed8;
}

.button-tiny {
  min-height: 1.9rem;
  padding: 0.38rem 0.65rem;
  border-radius: 10px;
  font-size: 0.76rem;
}

.attendance-board-toolbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.attendance-board-stats {
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.attendance-stat-card {
  min-width: 8rem;
  padding: 0.8rem 0.95rem;
  border: 1px solid var(--color-border);
  border-radius: 14px;
  background: rgba(248, 250, 252, 0.92);
}

.attendance-stat-card strong {
  display: block;
  margin-top: 0.2rem;
  font-size: 1.2rem;
}

.attendance-page-card {
  display: grid;
  overflow: hidden;
}

.attendance-legend {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-bottom: 0.9rem;
}

.attendance-matrix-shell {
  height: min(68vh, calc(100vh - 18rem));
  overflow: auto;
  border: 1px solid var(--color-border);
  border-radius: 18px;
  background: #ffffff;
}

.attendance-matrix {
  width: max-content;
  min-width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.attendance-matrix th,
.attendance-matrix td {
  padding: 0.55rem;
  border-right: 1px solid rgba(148, 163, 184, 0.1);
  border-bottom: 1px solid rgba(148, 163, 184, 0.1);
  vertical-align: top;
}

.attendance-matrix thead th {
  position: sticky;
  top: 0;
  z-index: 3;
  background: rgba(239, 246, 255, 0.98);
}

.attendance-day-col {
  min-width: 8.5rem;
  text-align: center;
}

.attendance-day-col span,
.attendance-day-col small {
  display: block;
}

.attendance-day-col small {
  margin-top: 0.2rem;
  color: var(--color-muted);
  font-size: 0.72rem;
}

.attendance-weekend {
  background: rgba(219, 234, 254, 0.98) !important;
}

.attendance-sticky-col {
  position: sticky;
  left: 0;
  z-index: 4;
  min-width: 14rem;
  background: rgba(255, 255, 255, 0.98);
}

.attendance-summary-col {
  position: sticky;
  left: 14rem;
  z-index: 4;
  min-width: 9rem;
  background: rgba(248, 250, 252, 0.98);
}

.my-attendance-shell {
  display: grid;
  gap: 1rem;
}

.my-history-card,
.my-action-card {
  box-shadow: none;
}

.my-attendance-intro {
  display: grid;
  gap: 0.85rem;
}

.my-status-strip {
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.my-attendance-intro p {
  margin: 0;
  color: var(--color-muted);
  max-width: 48rem;
}

.my-push-card {
  box-shadow: none;
}

.my-push-actions {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex-wrap: wrap;
}

.profile-shell {
  display: grid;
  gap: 1rem;
}

.profile-hero,
.profile-card {
  box-shadow: none;
}

.profile-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.profile-detail-list {
  display: grid;
  gap: 0.45rem;
}

.dashboard-banner-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.dashboard-banner-card h2 {
  margin: 0.35rem 0 0.55rem;
  font-size: 1.1rem;
}

.audit-json {
  max-width: 18rem;
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 0.72rem;
  color: var(--color-muted);
}

.my-attendance-head {
  display: grid;
  gap: 1rem;
}

.my-attendance-policy {
  display: grid;
  gap: 0.35rem;
  padding: 0.8rem 0.9rem;
  border: 1px solid var(--color-border);
  border-radius: 14px;
  background: rgba(240, 253, 250, 0.9);
}

.my-attendance-policy p {
  margin: 0;
  font-size: 0.85rem;
  color: var(--color-muted);
}

.my-attendance-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.7rem;
  margin-top: 0.85rem;
}

.my-summary-card {
  padding: 0.8rem 0.9rem;
  border: 1px solid var(--color-border);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.94);
}

.my-summary-card .metric-value {
  margin: 0.25rem 0 0;
  font-size: 1.2rem;
}

.my-attendance-primary {
  display: grid;
}

.compact-section-heading {
  margin-bottom: 0.75rem;
}

.my-action-card {
  padding: 1rem;
}

.my-open-shift,
.my-empty-state {
  display: grid;
  gap: 0.85rem;
  padding: 0.95rem;
  border: 1px solid var(--color-border);
  border-radius: 16px;
  background: rgba(240, 253, 250, 0.72);
}

.my-open-shift-meta,
.my-empty-state {
  display: grid;
  gap: 0.2rem;
}

.my-open-shift-meta strong {
  font-size: 1rem;
}

.my-open-shift-meta span,
.my-empty-state span,
.my-empty-state p {
  margin: 0;
  color: var(--color-muted);
  font-size: 0.88rem;
}

.my-primary-button {
  min-height: 3rem;
  font-size: 1rem;
}

.my-shift-stack {
  display: grid;
  gap: 0.7rem;
}

.my-shift-option {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 0.95rem;
  border: 1px solid var(--color-border);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.96);
}

.my-shift-option strong,
.my-shift-option span {
  display: block;
}

.my-shift-option span {
  margin-top: 0.2rem;
  color: var(--color-muted);
  font-size: 0.84rem;
}

.my-history-card {
  padding: 1rem;
}

.my-history-filter {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex-wrap: wrap;
}

.my-history-table-shell {
  border-radius: 14px;
}

.my-history-table {
  min-width: 42rem;
}

.my-history-table th,
.my-history-table td {
  padding: 0.72rem 0.8rem;
  font-size: 0.88rem;
}

.shift-admin-card {
  padding: 0.95rem;
  box-shadow: none;
}

.shift-admin-formbar {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 0.8rem;
  margin-bottom: 0.8rem;
}

.shift-admin-formbar h2 {
  margin: 0.2rem 0 0;
  font-size: 1rem;
}

.shift-admin-form {
  display: grid;
  gap: 0.7rem;
}

.shift-table-shell {
  border-radius: 14px;
}

.shift-table {
  min-width: 58rem;
}

.shift-table th,
.shift-table td {
  padding: 0.7rem 0.78rem;
  font-size: 0.86rem;
}

.shift-table strong {
  font-size: 0.9rem;
}

.shift-actions-col {
  min-width: 14rem;
}

.shift-action-stack {
  gap: 0.35rem;
}

.shift-action-stack form {
  margin: 0;
}

.attendance-name-cell strong,
.attendance-name-cell span {
  display: block;
}

.attendance-name-cell span {
  margin-top: 0.25rem;
  color: var(--color-muted);
  font-size: 0.82rem;
}

.attendance-summary-stack {
  display: grid;
  gap: 0.35rem;
  font-size: 0.82rem;
}

.attendance-cell {
  min-width: 8.5rem;
  background: rgba(255, 255, 255, 0.98);
}

.attendance-cell-empty {
  text-align: center;
  vertical-align: middle;
}

.attendance-cell-placeholder {
  color: #94a3b8;
  font-size: 0.82rem;
}

.attendance-cell-stack {
  display: grid;
  gap: 0.45rem;
}

.attendance-entry-trigger,
.attendance-entry-card {
  display: grid;
  gap: 0.35rem;
  padding: 0.48rem;
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 12px;
  background: rgba(248, 250, 252, 0.96);
}

.attendance-entry-trigger {
  width: 100%;
  text-align: left;
  cursor: pointer;
  transition: border-color 180ms ease, background-color 180ms ease, transform 180ms ease;
}

.attendance-entry-trigger:hover,
.attendance-empty-trigger:hover,
.attendance-add-inline:hover {
  border-color: rgba(37, 99, 235, 0.24);
  background: rgba(239, 246, 255, 0.96);
}

.attendance-entry-head {
  display: flex;
  justify-content: space-between;
  gap: 0.4rem;
  align-items: flex-start;
}

.attendance-entry-head strong {
  font-size: 0.76rem;
  line-height: 1.2;
}

.attendance-entry-time {
  display: flex;
  gap: 0.25rem;
  align-items: center;
  color: #1e293b;
  font-size: 0.78rem;
}

.attendance-entry-meta {
  color: #b45309;
  font-size: 0.72rem;
}

.attendance-inline-actions {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.attendance-empty-trigger,
.attendance-add-inline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.2rem;
  border: 1px dashed rgba(148, 163, 184, 0.5);
  border-radius: 10px;
  background: rgba(248, 250, 252, 0.92);
  color: #2563eb;
  cursor: pointer;
  transition: border-color 180ms ease, background-color 180ms ease;
}

.attendance-empty-trigger {
  width: 100%;
  font-size: 1rem;
  font-weight: 700;
}

.attendance-add-inline {
  padding: 0.35rem 0.5rem;
  font-size: 0.78rem;
}

.attendance-dialog {
  width: min(42rem, calc(100vw - 2rem));
  padding: 0;
  border: 0;
  border-radius: 24px;
  background: transparent;
  box-shadow: var(--shadow-lg);
}

.attendance-dialog::backdrop {
  background: rgba(15, 23, 42, 0.38);
  backdrop-filter: blur(2px);
}

.attendance-dialog-panel {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 1rem;
  padding: 1.5rem;
  border: 1px solid var(--color-border);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.98);
}

.attendance-dialog-backdrop,
.attendance-dialog-close-scrim {
  display: none;
}

.attendance-dialog-header,
.attendance-dialog-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.attendance-dialog-header h2 {
  margin: 0.3rem 0 0;
}

.employee-form {
  gap: 1.1rem;
}

.employee-form .field-grid {
  gap: 0.45rem;
}

.employee-form .input-shell {
  width: 100%;
  min-height: 2.65rem;
  padding: 0.62rem 0.88rem;
  border-radius: 14px;
}

.employee-form .checkbox-shell {
  width: 100%;
  padding: 0.65rem 0.8rem;
  border: 1px solid var(--color-border);
  border-radius: 12px;
  background: rgba(248, 250, 252, 0.72);
}

.employee-form .attendance-dialog-actions {
  padding-top: 0.15rem;
}

.attendance-editor-form {
  display: grid;
  gap: 1rem;
}

.sheet-section {
  display: grid;
  gap: 0.45rem;
}

.sheet-section[hidden] {
  display: none !important;
}

.compact-sheet-card {
  padding: 0.8rem 0.95rem;
}

.compact-sheet-tabs-card {
  padding: 0.55rem 0.8rem;
}

.compact-sheet-tabs {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  padding: 0.2rem;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  background: rgba(248, 250, 252, 0.92);
}

.compact-sheet-tab {
  min-height: 2rem;
  padding: 0.35rem 0.82rem;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: #334155;
  font-family: "Fira Code", monospace;
  font-size: 0.73rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
}

.compact-sheet-tab:hover {
  border-color: rgba(37, 99, 235, 0.22);
  background: rgba(219, 234, 254, 0.7);
}

.compact-sheet-tab.is-active {
  border-color: rgba(37, 99, 235, 0.3);
  background: rgba(219, 234, 254, 0.98);
  color: #1d4ed8;
  box-shadow: inset 0 -2px 0 rgba(37, 99, 235, 0.28);
}

.compact-sheet-note p {
  margin: 0.2rem 0 0;
  font-size: 0.88rem;
  line-height: 1.42;
}

.compact-sheet-shell {
  max-height: 66vh;
  overflow: auto;
  border: 1px solid var(--color-border);
  border-radius: 14px;
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.compact-sheet-table {
  width: max-content;
  min-width: 100%;
  border-collapse: collapse;
}

.compact-sheet-table th,
.compact-sheet-table td {
  padding: 0.26rem 0.28rem;
  border-right: 1px solid rgba(148, 163, 184, 0.2);
  border-bottom: 1px solid rgba(148, 163, 184, 0.2);
  vertical-align: top;
  background: #fff;
}

.compact-sheet-table thead th {
  position: sticky;
  top: 0;
  z-index: 10;
  background: #f1f5f9;
  text-align: center;
  font-size: 0.72rem;
  font-weight: 700;
  color: #475569;
}

.compact-sticky-user,
.compact-sticky-shifts {
  position: sticky;
  z-index: 11;
  background: white;
}

.compact-sticky-user {
  left: 0;
  min-width: 9rem;
  max-width: 9rem;
}

.compact-sticky-shifts {
  left: 9rem;
  min-width: 7.2rem;
  max-width: 7.2rem;
  border-right: 2px solid var(--color-border);
}

/* Intersection of sticky top AND sticky left */
.compact-sheet-table thead th.compact-sticky-user {
  left: 0;
  z-index: 15;
  background: #e2e8f0;
}

.compact-sheet-table thead th.compact-sticky-shifts {
  left: 9rem;
  z-index: 15;
  background: #f1f5f9;
}

.compact-user-cell strong,
.compact-user-cell span {
  display: block;
}

.compact-user-cell span {
  margin-top: 0.12rem;
  color: var(--color-muted);
  font-size: 0.7rem;
  line-height: 1.2;
}

.compact-user-cell strong {
  font-size: 0.88rem;
  line-height: 1.15;
}

.compact-shift-cell {
  display: grid;
  gap: 0.22rem;
}

.compact-shift-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.17rem 0.34rem;
  border-radius: 999px;
  background: rgba(219, 234, 254, 0.9);
  color: #1d4ed8;
  font-size: 0.64rem;
  white-space: nowrap;
}

.compact-toolbar-group {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.compact-toolbar {
  display: flex;
  align-items: end;
  gap: 0.55rem;
  flex-wrap: wrap;
}

.compact-export-form {
  display: flex;
  align-items: end;
}

.compact-lockbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.compact-lockbar-actions {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex-wrap: wrap;
}

.compact-search-field {
  min-width: 12rem;
}

.compact-sheet-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.6rem;
}

.compact-legend-item {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 1.55rem;
  padding: 0.18rem 0.48rem;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 999px;
  font-size: 0.66rem;
  font-weight: 600;
  white-space: nowrap;
}

.compact-day-col,
.compact-day-cell {
  min-width: 6.6rem;
}

.compact-day-today {
  background: rgba(219, 234, 254, 0.98) !important;
  box-shadow: inset 0 -2px 0 rgba(37, 99, 235, 0.32);
}

.compact-day-cell-today {
  background: rgba(239, 246, 255, 0.82);
}

.compact-day-cell-today .compact-slot-button {
  border-color: rgba(59, 130, 246, 0.24);
}

.compact-slot-stack {
  display: grid;
  gap: 0.16rem;
}

.compact-slot-item {
  display: grid;
  gap: 0.14rem;
}

.compact-slot-item-approve {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: stretch;
}

.compact-slot-item-approve .compact-slot-button {
  height: 100%;
}

.compact-slot-button,
.sheet-existing-item {
  width: 100%;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 8px;
  background: rgba(248, 250, 252, 0.98);
  color: var(--color-text);
  cursor: pointer;
  transition: border-color 180ms ease, background-color 180ms ease;
}

.compact-slot-button:hover,
.sheet-existing-item:hover {
  border-color: rgba(37, 99, 235, 0.28);
  background: rgba(239, 246, 255, 0.98);
}

.compact-slot-button {
  display: grid;
  grid-template-columns: 1.35rem 1fr 1fr auto;
  align-items: center;
  gap: 0.14rem;
  padding: 0.18rem 0.22rem;
  text-align: center;
}

.compact-slot-button strong {
  font-size: 0.58rem;
  font-weight: 700;
}

.compact-slot-button span {
  font-size: 0.6rem;
  white-space: nowrap;
}

.compact-slot-button em {
  font-style: normal;
  font-size: 0.56rem;
  color: #64748b;
  white-space: nowrap;
}

.compact-slot-quick-action {
  display: flex;
  align-items: stretch;
}

.compact-slot-quick-action .button {
  min-height: 100%;
  padding: 0.18rem 0.38rem;
  border-radius: 8px;
  font-size: 0.64rem;
}

.compact-page-header {
  align-items: end;
  gap: 1rem;
}

.compact-page-header h1 {
  margin-bottom: 0.45rem;
}

.compact-page-header .hero-copy {
  max-width: 52ch;
}

.compact-page-header .filter-shell {
  min-width: min(100%, 31rem);
}

.compact-slot-empty {
  color: #94a3b8;
}

.compact-slot-reviewed {
  background: rgba(220, 252, 231, 0.75);
  border-color: rgba(34, 197, 94, 0.2);
}

.compact-slot-ot {
  background: rgba(254, 243, 199, 0.9);
  border-color: rgba(245, 158, 11, 0.28);
}

.compact-slot-ot-approved {
  background: rgba(219, 234, 254, 0.92);
  border-color: rgba(37, 99, 235, 0.26);
}

.compact-slot-warning {
  background: rgba(254, 243, 199, 0.86);
  border-color: rgba(245, 158, 11, 0.24);
}

.compact-slot-muted {
  background: rgba(241, 245, 249, 0.96);
  color: #64748b;
}

.compact-slot-late {
  background: rgba(254, 226, 226, 0.88);
  border-color: rgba(239, 68, 68, 0.24);
}

.compact-slot-early {
  background: rgba(255, 237, 213, 0.9);
  border-color: rgba(249, 115, 22, 0.24);
}

.compact-slot-issue {
  background: rgba(254, 215, 170, 0.92);
  border-color: rgba(234, 88, 12, 0.26);
}

.compact-dialog-panel {
  max-width: 46rem;
}

.compact-dialog-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
}

.compact-dialog-aside {
  display: grid;
  gap: 0.45rem;
  align-content: start;
}

.compact-dialog-hint {
  margin: 0;
  color: var(--color-muted);
  font-size: 0.78rem;
}

.compact-dialog-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.55rem;
}

.compact-static-field {
  min-height: 2.2rem;
  display: flex;
  align-items: center;
  padding: 0.5rem 0.7rem;
  border: 1px solid var(--color-border-strong);
  border-radius: 12px;
  background: rgba(248, 250, 252, 0.98);
  color: var(--color-text);
  font-weight: 600;
  font-size: 0.9rem;
}

.compact-note-field {
  min-height: 4.5rem;
}

.sheet-existing-list {
  display: grid;
  gap: 0.35rem;
}

.sheet-existing-item {
  display: grid;
  gap: 0.2rem;
  padding: 0.48rem 0.55rem;
  text-align: left;
}

.sheet-existing-item strong {
  font-size: 0.72rem;
}

.sheet-existing-item span {
  font-size: 0.66rem;
  color: var(--color-muted);
}

.flatpickr-input[readonly],
.flatpickr-alt-input {
  background: rgba(255, 255, 255, 0.98);
}

.flatpickr-calendar {
  border: 1px solid var(--color-border);
  border-radius: 14px;
  box-shadow: var(--shadow-sm);
  font-family: "Fira Sans", sans-serif;
  z-index: 10010 !important;
}

dialog .flatpickr-calendar,
.compact-dialog-panel .flatpickr-calendar {
  z-index: 10010 !important;
}

.flatpickr-day.selected,
.flatpickr-day.startRange,
.flatpickr-day.endRange,
.flatpickr-day.selected:hover {
  background: #2563eb;
  border-color: #2563eb;
}

.flatpickr-monthSelect-month.selected {
  background: rgba(37, 99, 235, 0.14);
  border-color: rgba(37, 99, 235, 0.3);
  color: #1d4ed8;
}

@media (max-width: 1180px) {
  .metric-grid,
  .dashboard-grid,
  .dashboard-banner-row,
  .admin-two-up,
  .payroll-grid,
  .shift-card-grid,
  .auth-layout {
    grid-template-columns: 1fr 1fr;
  }
}

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

  .mobile-menu-toggle {
    display: block;
  }

  .side-rail {
    position: fixed;
    top: 0;
    left: 0;
    width: 280px;
    height: 100vh;
    z-index: 1000;
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 20px 0 50px rgba(0,0,0,0.1);
  }

  .menu-open .side-rail {
    transform: translateX(0);
  }

  .side-rail-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.15);
    backdrop-filter: blur(4px);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
  }

  .menu-open .side-rail-backdrop {
    opacity: 1;
    visibility: visible;
  }

  .top-bar {
    padding-inline: 0.75rem;
    margin-bottom: var(--space-lg);
  }

  .top-meta {
    display: none;
  }

  .hero-panel,
  .page-header,
  .payroll-header {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-lg);
  }

  .hero-actions {
    width: 100%;
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .dashboard-banner-row {
    grid-template-columns: 1fr;
  }

  .metric-grid,
  .dashboard-grid,
  .admin-two-up,
  .payroll-grid,
  .shift-card-grid,
  .demo-grid,
  .split-grid,
  .auth-layout,
  .auth-feature-list,
  .attendance-board-toolbar {
    grid-template-columns: 1fr;
  }

  .attendance-board-toolbar,
  .attendance-board-stats {
    display: grid;
  }

  .compact-dialog-layout,
  .compact-dialog-summary {
    display: grid;
    grid-template-columns: 1fr;
  }

  .my-attendance-summary {
    grid-template-columns: 1fr;
  }

  .my-shift-option {
    grid-template-columns: 1fr;
  }

  .compact-sheet-tabs {
    width: 100%;
  }

  .compact-sheet-tab {
    flex: 1 1 auto;
    text-align: center;
  }

  .map-search-row {
    grid-template-columns: 1fr;
  }

  .map-search-row .button {
    width: 100%;
  }

  .my-action-card {
    position: sticky;
    top: 0.5rem;
    z-index: 3;
  }
}

@media (max-width: 720px) {
  .main-stage {
    padding-inline: 0.8rem;
  }

  .hero-panel,
  .surface-card,
  .auth-panel,
  .metric-card,
  .payroll-card,
  .top-bar {
    padding: 1rem;
  }

  .data-table {
    min-width: 36rem;
  }

  .my-action-card,
  .my-history-card,
  .my-attendance-hero {
    padding: 0.85rem;
  }

  .my-primary-button,
  .my-shift-option .button {
    width: 100%;
  }

  .my-history-filter {
    display: grid;
    grid-template-columns: 1fr;
  }

  .geofence-map {
    height: 260px;
  }

  .shift-admin-formbar {
    flex-direction: column;
  }

  .shift-table {
    min-width: 48rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

/* Geo Badge & Header Layout */
.my-attendance-header-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--space-lg);
  margin-bottom: 0;
}

.geo-compact-badge {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0.85rem;
  border-radius: var(--radius-xl);
  background: var(--surface-2);
  border: 1px solid var(--border-subtle);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: help;
  flex-shrink: 0;
}

.geo-compact-badge:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
  border-color: var(--border-strong);
}

.geo-req {
  background: rgba(34, 197, 94, 0.08);
  border-color: rgba(34, 197, 94, 0.2);
  color: var(--success);
}

.geo-flex {
  background: rgba(100, 116, 139, 0.08);
  border-color: rgba(100, 116, 139, 0.2);
  color: var(--text-muted);
}

.geo-badge-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: white;
  box-shadow: var(--shadow-sm);
  color: var(--primary);
}

.geo-req .geo-badge-icon {
  color: var(--success);
}

.geo-badge-info {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}

.geo-badge-info strong {
  font-size: 0.8rem;
  font-weight: 600;
  display: block;
}

.geo-badge-info span {
  font-size: 0.7rem;
  opacity: 0.7;
  white-space: nowrap;
}

@media (max-width: 640px) {
  .my-attendance-header-row {
    flex-direction: column;
    gap: var(--space-md);
  }
  
  .geo-compact-badge {
    width: 100%;
    justify-content: flex-start;
  }
}

/* --- Premium Auth Section --- */
.auth-page-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: var(--space-lg);
  overflow: hidden;
  background: 
    radial-gradient(at 0% 0%, rgba(59, 130, 246, 0.15) 0px, transparent 50%),
    radial-gradient(at 100% 0%, rgba(245, 158, 11, 0.1) 0px, transparent 50%),
    radial-gradient(at 100% 100%, rgba(37, 99, 235, 0.15) 0px, transparent 50%),
    radial-gradient(at 0% 100%, rgba(16, 185, 129, 0.1) 0px, transparent 50%),
    #f8fafc;
}

.auth-mesh-blobs {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.auth-blob {
  position: absolute;
  width: 40vw;
  height: 40vw;
  filter: blur(80px);
  opacity: 0.4;
  border-radius: 50%;
  animation: blob-float 20s infinite alternate cubic-bezier(0.45, 0, 0.55, 1);
}

.auth-blob-1 { top: -10%; left: -10%; background: #3b82f6; }
.auth-blob-2 { bottom: -10%; right: -10%; background: #10b981; animation-delay: -5s; }
.auth-blob-3 { top: 40%; right: 10%; background: #f59e0b; animation-delay: -10s; }

@keyframes blob-float {
  from { transform: translate(0, 0) scale(1); }
  to { transform: translate(10%, 15%) scale(1.1); }
}

.auth-premium-card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 410px;
  padding: var(--space-xl);
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(32px);
  box-shadow: 
    0 10px 15px -3px rgba(0, 0, 0, 0.05),
    0 40px 60px -15px rgba(15, 23, 42, 0.12);
}

.auth-card-header {
  text-align: center;
  margin-bottom: var(--space-lg);
}

.auth-card-header .brand-mark {
  margin: 0 auto 1.25rem;
  width: 3.25rem;
  height: 3.25rem;
  font-size: 1.15rem;
  border-radius: 18px;
}

.auth-card-header h1 {
  font-size: 1.5rem;
  font-weight: 800;
  margin: 0 0 0.25rem;
  color: var(--color-text);
  letter-spacing: -0.02em;
}

.auth-card-header p {
  color: var(--color-muted);
  font-size: 0.88rem;
  line-height: 1.4;
}

.auth-form-stack {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.auth-input-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.auth-input-group .field-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--color-text);
  margin-left: 0.15rem;
}

.auth-premium-button {
  padding: 1rem;
  font-weight: 700;
  font-size: 0.95rem;
  background: linear-gradient(135deg, #1e40af, #3b82f6);
  color: white;
  border-radius: 16px;
  box-shadow: 0 8px 16px -4px rgba(30, 64, 175, 0.25);
  transition: all 0.3s ease;
  cursor: pointer;
  margin-top: 0.5rem;
}

.auth-premium-button:hover {
  transform: translateY(-1.5px);
  box-shadow: 0 12px 24px -4px rgba(30, 64, 175, 0.35);
  background: linear-gradient(135deg, #1d4ed8, #2563eb);
}

.auth-premium-button:active {
  transform: translateY(0);
}

.auth-demo-section {
  margin-top: 1.75rem;
  padding-top: 1.5rem;
  border-top: 1px dashed var(--color-border);
}

.auth-demo-title {
  display: block;
  text-align: center;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--color-muted);
  margin-bottom: var(--space-md);
  letter-spacing: 0.05em;
}

.auth-demo-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}

.auth-demo-chip {
  padding: 0.75rem;
  border-radius: 14px;
  background: rgba(148, 163, 184, 0.05);
  border: 1px solid transparent;
  text-align: center;
  transition: all 0.2s ease;
}

.auth-demo-chip:hover {
  background: rgba(59, 130, 246, 0.05);
  border-color: rgba(59, 130, 246, 0.2);
}

.auth-demo-chip span {
  display: block;
  font-size: 0.65rem;
  color: var(--color-muted);
  margin-bottom: 0.15rem;
}

.auth-demo-chip code {
  font-size: 0.75rem;
  color: var(--color-primary);
  font-weight: 600;
}

@media (max-width: 480px) {
  .auth-page-wrapper {
    padding: var(--space-md);
    background: white;
  }
  
  .auth-premium-card {
    border: 0;
    box-shadow: none;
    padding: var(--space-xl) var(--space-md);
    background: transparent;
    backdrop-filter: none;
  }
}

.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.section-heading .section-actions {
  display: flex;
  gap: var(--space-2);
  align-items: center;
}

.import-dialog {
  width: calc(100vw - 2rem) !important;
  max-width: 1200px !important;
  max-height: calc(100vh - 4rem) !important;
}

.import-dialog[open] {
  display: flex;
  flex-direction: column;
}

.import-dialog-panel {
  width: 100%;
  max-width: 100%;
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 4rem - 2px);
  overflow: hidden;
  padding: 1.5rem;
}

.import-preview-container {
  margin: var(--space-md) 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  flex: 1 1 auto;
  min-height: 200px;
}

.import-preview-scroll {
  flex: 1 1 auto;
  overflow: auto;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  background: var(--surface-1);
}

.import-preview-table {
  font-size: var(--text-xs);
  border-collapse: separate;
  border-spacing: 0;
  width: 100%;
}

.import-preview-table th, 
.import-preview-table td {
  padding: var(--space-2) var(--space-3);
  border-bottom: 1px solid var(--border-subtle);
  border-right: 1px solid var(--border-subtle);
  white-space: nowrap;
  background: var(--surface-1);
  vertical-align: middle;
}

.import-preview-table tr:last-child td {
  border-bottom: none;
}

.import-preview-table thead th {
  position: sticky;
  top: 0;
  z-index: 10;
  box-shadow: 0 1px 0 var(--border-subtle);
  background: var(--surface-subtle);
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.65rem;
  letter-spacing: 0.05em;
  padding: var(--space-3);
}

.import-preview-table .compact-sticky-user {
  position: sticky;
  left: 0;
  z-index: 4; /* Higher than top to stack correctly */
  background: var(--surface-1);
}
.import-preview-table div {
  font-weight: 600;
  color: var(--text-primary);
}

.import-preview-table small {
  display: block;
  color: var(--text-muted);
}

.import-preview-table hr {
  margin: var(--space-1) 0;
  border: none;
  border-top: 1px solid var(--border-subtle);
}

.import-preview-table .chip {
  font-size: 10px;
  padding: 1px 6px;
  display: inline-block;
  margin-top: 4px;
}
