* {
  box-sizing: border-box;
}

:root {
  /* Brand palette */
  --green-900: #0b5a22;
  --green-700: #118e1d;
  --green-600: #169a2e;
  --green-500: #20a33c;
  --blue-900: #0a2d67;
  --blue-700: #0c4aa3;
  --blue-600: #1a5cba;
  --blue-500: #2e75d2;
  --gold-700: #b58c19;
  --gold-500: #d9b131;
  --gold-300: #f3df7a;

  /* Neutrals */
  --ink: #102034;
  --muted: #5b6d7e;
  --line: #e2e6eb;
  --line-light: #f0f2f5;

  /* Surfaces — opaque, clean */
  --surface: #ffffff;
  --surface-strong: #ffffff;
  --surface-elevated: #ffffff;
  --surface-page: #f5f7fa;
  --surface-hover: #f8f9fb;
  --surface-active: #f0f2f5;

  /* Semantic */
  --success: #118e1d;
  --success-soft: rgba(17, 142, 29, 0.08);
  --warning: #b58c19;
  --warning-soft: rgba(217, 177, 49, 0.10);
  --danger: #d24949;
  --danger-soft: rgba(210, 73, 73, 0.08);

  /* Shadows — subtle corporate */
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 24px rgba(0, 0, 0, 0.08);

  /* Radius — professional, tight */
  --radius-sm: 6px;
  --radius: 8px;
  --radius-md: 10px;
  --radius-lg: 12px;
  --radius-xl: 16px;

  /* Layout */
  --sidebar-width: 256px;
  --sidebar-collapsed: 64px;
  --topbar-height: 56px;

  /* Animation */
  --ease-out-expo: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --transition-fast: 150ms cubic-bezier(0.22, 1, 0.36, 1);
  --transition-normal: 250ms cubic-bezier(0.22, 1, 0.36, 1);
}

/* Material Symbols base */
.material-symbols-outlined {
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
  font-size: 20px;
  vertical-align: middle;
  line-height: 1;
  display: inline-flex;
  user-select: none;
  flex-shrink: 0;
}

html,
body {
  margin: 0;
  min-height: 100%;
  font-family: "Plus Jakarta Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
  color: var(--ink);
  background: var(--surface-page);
  -webkit-font-smoothing: antialiased;
}

html {
  scroll-behavior: smooth;
}

html[data-host-variant="prod"] [data-dev-host-only] {
  display: none !important;
}

/* grid overlay removed — clean corporate */

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

a {
  color: inherit;
}

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

.login-body {
  display: grid;
  place-items: center;
  padding: 24px;
}

.login-shell {
  width: min(1200px, 100%);
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

.app-shell {
  width: min(1380px, calc(100% - 28px));
  margin: 0 auto;
  padding: 22px 0 42px;
}

/* ── Sidebar ──────────────────────────────────────────────── */
.app-sidebar {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: var(--sidebar-width);
  background: linear-gradient(180deg, #0a3572 0%, #082b5e 100%);
  color: rgba(255, 255, 255, 0.85);
  display: flex;
  flex-direction: column;
  z-index: 50;
  transition: width 200ms var(--ease-out-expo);
  overflow: hidden;
}
.sidebar-header {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
}
.sidebar-logo { width: 36px; height: 36px; flex-shrink: 0; object-fit: contain; }
.sidebar-title { font-weight: 700; font-size: 1.05rem; color: #fff; white-space: nowrap; overflow: hidden; }
.sidebar-brand-link { display: flex; align-items: center; gap: 12px; text-decoration: none; overflow: hidden; }
.sidebar-collapse-btn {
  margin-left: auto;
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.6);
  cursor: pointer;
  padding: 4px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
}
.sidebar-collapse-btn:hover { color: #fff; background: rgba(255, 255, 255, 0.1); }
.sidebar-modules { display: flex; flex-direction: column; padding: 12px 12px 0; gap: 2px; }
.sidebar-module {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius);
  color: rgba(255, 255, 255, 0.65);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  transition: background 150ms, color 150ms;
  white-space: nowrap;
  overflow: hidden;
}
.sidebar-module:hover { background: rgba(255, 255, 255, 0.08); color: rgba(255, 255, 255, 0.9); }
.sidebar-module.active { background: rgba(255, 255, 255, 0.12); color: #fff; }
.sidebar-divider { height: 1px; background: rgba(255, 255, 255, 0.1); margin: 8px 16px; }
.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 4px 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.sidebar-nav::-webkit-scrollbar { width: 4px; }
.sidebar-nav::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.15); border-radius: 2px; }
.sidebar-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 12px;
  border-radius: var(--radius);
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.65);
  font: inherit;
  font-size: 0.855rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 150ms, color 150ms;
  text-align: left;
  width: 100%;
  white-space: nowrap;
  overflow: hidden;
}
.sidebar-item:hover { background: rgba(255, 255, 255, 0.08); color: rgba(255, 255, 255, 0.9); }
.sidebar-item.active { background: rgba(32, 163, 60, 0.25); color: #fff; font-weight: 600; }
.sidebar-item.active .material-symbols-outlined { color: var(--green-500); }

/* Fix sidebar icons to have consistent visual size */
.sidebar-item .material-symbols-outlined,
.sidebar-module .material-symbols-outlined {
  font-size: 20px;
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  /* Force consistent Material Symbols settings */
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 20;
}
.sidebar-group-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.35);
  padding: 16px 12px 4px;
  font-weight: 600;
}
.sidebar-footer { padding: 8px 12px 12px; border-top: 1px solid rgba(255, 255, 255, 0.1); margin-top: auto; }
.sidebar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.7);
  white-space: nowrap;
  overflow: hidden;
}
.sidebar-user-name { font-weight: 600; color: #fff; }
.sidebar-user-role { font-size: 0.72rem; color: rgba(255, 255, 255, 0.45); }

/* Collapsed sidebar */
.app-sidebar.is-collapsed { width: var(--sidebar-collapsed); }
.app-sidebar.is-collapsed .sidebar-title,
.app-sidebar.is-collapsed .sidebar-module span:not(.material-symbols-outlined),
.app-sidebar.is-collapsed .sidebar-item span:not(.material-symbols-outlined),
.app-sidebar.is-collapsed .sidebar-group-label,
.app-sidebar.is-collapsed .sidebar-user { display: none; }
.app-sidebar.is-collapsed .sidebar-collapse-btn .material-symbols-outlined { transform: rotate(180deg); }
.app-sidebar.is-collapsed .sidebar-module,
.app-sidebar.is-collapsed .sidebar-item { justify-content: center; padding: 10px 0; }
.app-sidebar.is-collapsed .sidebar-header {
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 12px 8px;
  gap: 6px;
}
.app-sidebar.is-collapsed .sidebar-brand-link { justify-content: center; }
.app-sidebar.is-collapsed .sidebar-collapse-btn {
  position: static;
  margin-left: 0;
}

/* Content offset */
.app-shell.has-sidebar {
  margin-left: var(--sidebar-width);
  margin-right: 0;
  width: auto;
  min-width: 0;
  max-width: none;
  padding: 16px 24px 42px;
  transition: margin-left 200ms var(--ease-out-expo);
  box-sizing: border-box;
}
.app-shell.has-sidebar.sidebar-collapsed { margin-left: var(--sidebar-collapsed); }
/* Also support is-collapsed class on sidebar via CSS sibling — JS toggles app-shell class */
.app-shell.has-sidebar.is-sidebar-collapsed { margin-left: var(--sidebar-collapsed); }
.has-sidebar .section-nav { display: none; }
.has-sidebar .panel-section-rail { display: none; }

/* Sidebar backdrop */
.sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 49;
}
.sidebar-backdrop.is-open { display: block; }

/* Hamburger */
.sidebar-hamburger {
  display: none;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  color: var(--ink);
  cursor: pointer;
  padding: 6px;
  border-radius: var(--radius-sm);
  margin-right: 8px;
}
.sidebar-hamburger:hover { background: var(--surface-hover); }

@media (max-width: 820px) {
  .app-sidebar {
    transform: translateX(-100%);
    box-shadow: none;
    width: 280px;
  }
  .app-sidebar.is-open { transform: translateX(0); box-shadow: var(--shadow-lg); }
  .app-sidebar.is-collapsed { width: 280px; }
  .app-sidebar.is-collapsed .sidebar-header { flex-direction: row; padding: 16px 20px; gap: 12px; }
  .app-sidebar.is-collapsed .sidebar-title,
  .app-sidebar.is-collapsed .sidebar-module span:not(.material-symbols-outlined),
  .app-sidebar.is-collapsed .sidebar-item span:not(.material-symbols-outlined),
  .app-sidebar.is-collapsed .sidebar-group-label,
  .app-sidebar.is-collapsed .sidebar-user { display: inline; }
  .app-sidebar.is-collapsed .sidebar-module,
  .app-sidebar.is-collapsed .sidebar-item { justify-content: flex-start; padding: 9px 12px; }
  .app-shell.has-sidebar,
  .app-shell.has-sidebar.sidebar-collapsed,
  .app-shell.has-sidebar.is-sidebar-collapsed { margin-left: 0; width: auto; }
  .sidebar-hamburger { display: flex; }
  .sidebar-collapse-btn { display: none; }
}

.login-hero,
.login-panel,
.topbar,
.card,
.camera-sheet,
.preview-sheet,
.app-dialog-sheet {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.login-hero,
.login-panel,
.topbar,
.card,
.camera-sheet,
.preview-sheet,
.app-dialog-sheet {
  padding: 24px;
}

.login-hero {
  color: white;
  background: linear-gradient(135deg, #0a3572 0%, #0c4aa3 50%, #118e1d 100%);
}

.login-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.brand-line,
.topbar-brand,
.topbar,
.topbar-actions,
.section-head,
.inline-actions,
.role-switch,
.section-nav,
.icon-cluster,
.stacked-lines,
.current-shift-grid,
.zoom-banner {
  display: flex;
  gap: 12px;
}

.brand-line {
  align-items: center;
}

.brand-line.large {
  margin-bottom: 24px;
}

.brand-line.compact {
  margin-bottom: 18px;
}

.brand-logo {
  width: 74px;
  height: 74px;
  flex: 0 0 auto;
  object-fit: contain;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.12));
}

.brand-logo.small {
  width: 56px;
  height: 56px;
}

.brand-logo-link {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  transition: opacity 0.15s;
}
.brand-logo-link:hover { opacity: 0.8; }

.eyebrow {
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.78rem;
  color: var(--muted);
}

.login-hero .eyebrow {
  color: rgba(255, 255, 255, 0.76);
}

.topbar .eyebrow {
  color: var(--muted);
}

h1 {
  font-size: clamp(2.1rem, 4vw, 3.7rem);
  line-height: 0.98;
  letter-spacing: -0.04em;
}

h2 {
  font-size: 1.36rem;
  line-height: 1.18;
}

.lead,
.topbar-subtext {
  line-height: 1.7;
}

.lead {
  max-width: 58ch;
  color: rgba(255, 255, 255, 0.92);
}

.topbar-subtext {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.88rem;
}

.topbar-user-label {
  margin-top: 6px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
  width: fit-content;
  padding: 6px 12px;
  border-radius: var(--radius);
  color: var(--ink);
  background: var(--surface-active);
  border: 1px solid var(--line);
  font-size: 0.92rem;
  line-height: 1.3;
}

.hero-steps,
.summary-grid,
.grid-2,
.indicator-list,
.detail-grid,
.coordinate-list,
.task-editor-list,
.task-result-stack,
.guide-list,
.chart-bars,
.preview-grid {
  display: grid;
  gap: 14px;
}

.hero-steps {
  margin-top: 26px;
}

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

.summary-grid.six {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.summary-grid.eight {
  grid-template-columns: repeat(8, minmax(0, 1fr));
}

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

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

.hero-card,
.metric-card,
.feature-callout,
.guide-item,
.chart-bar-card {
  border-radius: var(--radius-lg);
  padding: 18px;
}

.hero-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 14px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid var(--line);
}

.hero-card span:first-child {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.16);
  font-weight: 800;
}

.hero-card p {
  margin-top: 6px;
  color: rgba(255, 255, 255, 0.86);
}

.pwa-widget {
  padding-top: 6px;
}

.metric-card {
  background: var(--surface);
  border: 1px solid var(--line);
}

.metric-card p {
  color: var(--muted);
  margin-bottom: 10px;
}

.metric-card strong {
  font-size: 1.92rem;
  letter-spacing: -0.04em;
}

.metric-card.is-loading strong {
  display: block;
}

.metric-card--clickable {
  cursor: pointer;
  transition: box-shadow 0.15s, transform 0.12s;
}

.metric-card--clickable:hover {
  box-shadow: 0 4px 16px rgba(16, 32, 52, 0.13);
  transform: translateY(-1px);
}

.metric-card--clickable:active {
  transform: translateY(0);
}

.bulk-consinyering-row {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 14px;
  margin-bottom: 10px;
}
.bulk-row-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.metric-skeleton,
.skeleton-line {
  position: relative;
  display: block;
  width: 100%;
  min-height: 14px;
  border-radius: var(--radius);
  background: var(--surface-active);
  overflow: hidden;
}

.metric-skeleton {
  min-height: 30px;
  max-width: 92px;
}

.skeleton-line.short {
  max-width: 42%;
}

.metric-skeleton::after,
.skeleton-line::after {
  content: "";
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.72),
    transparent
  );
  animation: skeleton-shimmer 1.2s ease infinite;
}

@keyframes skeleton-shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

.compact-metrics .metric-card strong {
  font-size: 1.68rem;
}

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

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

.quick-action-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 16px;
  border-radius: 20px;
  border: 1px solid rgba(16, 32, 52, 0.08);
  background: var(--surface);
  text-align: left;
}

.quick-action-card.is-loading {
  grid-template-columns: 1fr;
}

.quick-action-card strong {
  display: block;
  margin-bottom: 4px;
}

.quick-action-card span {
  color: var(--muted);
  line-height: 1.45;
}

.quick-action-card em {
  font-style: normal;
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--blue-900);
}

.quick-action-icon {
  width: 40px;
  height: 40px;
  display: inline-grid;
  place-items: center;
  border-radius: 14px;
  background: rgba(12, 74, 163, 0.1);
  font-size: 1.1rem;
}

.loading-copy {
  color: var(--muted);
}

.feature-callout,
.guide-item {
  background: linear-gradient(135deg, rgba(12, 74, 163, 0.08), rgba(17, 142, 29, 0.1));
  border: 1px solid rgba(16, 32, 52, 0.06);
}

.guide-item p,
.feature-callout p {
  margin-top: 6px;
  color: var(--muted);
  line-height: 1.6;
}

.topbar {
  justify-content: space-between;
  align-items: center;
  color: var(--ink);
  margin-bottom: 18px;
  background: var(--surface);
  border: none;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  box-shadow: none;
  position: sticky;
  top: 0;
  z-index: 900; /* Below SweetAlert2 backdrop (1060) */
}

.topbar-brand {
  align-items: center;
}

.topbar-actions {
  align-items: center;
}

.wrap-actions {
  flex-wrap: wrap;
}

.role-switch {
  flex-wrap: wrap;
}

.section-nav {
  flex-wrap: nowrap;
  overflow-x: auto;
  scrollbar-width: none; /* Firefox */
}

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

.section-nav .nav-button {
  flex-shrink: 0;
}

.role-switch {
  padding: 6px;
  border-radius: var(--radius);
  background: var(--surface-active);
  margin-bottom: 18px;
}

.section-nav {
  margin-bottom: 18px;
  padding: 6px;
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-xs);
}

.section-nav.is-loading {
  opacity: 0.6;
  pointer-events: none;
}

.role-button,
.nav-button,
.ghost-button,
.primary-button,
.icon-button,
.status-choice,
.photo-trigger {
  border: none;
  cursor: pointer;
  transition:
    transform 160ms var(--ease-out-expo),
    opacity 160ms ease,
    background-color 200ms ease,
    box-shadow 200ms ease;
}

.mobile-menu-toggle:disabled,
.mobile-panel-toolbar select:disabled {
  opacity: 0.6;
  cursor: wait;
}

.role-button,
.nav-button,
.ghost-button {
  padding: 10px 16px;
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--line);
  text-decoration: none;
  min-height: 44px;
}

.role-button.active,
.nav-button.active,
.primary-button {
  color: white;
  background: var(--blue-700);
  border-color: var(--blue-700);
  box-shadow: var(--shadow-xs);
}

.primary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 18px;
  border-radius: var(--radius);
  font-weight: 600;
  text-decoration: none;
}

.primary-button:hover {
  background: var(--blue-600);
  border-color: var(--blue-600);
}

.icon-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.icon-button {
  width: 38px;
  height: 38px;
  display: inline-grid;
  place-items: center;
  border-radius: var(--radius);
  background: var(--surface-active);
}

.icon-button.danger {
  background: var(--danger-soft);
  color: #a02c2c;
}

.icon-link {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border-radius: var(--radius);
  background: var(--surface-active);
  text-decoration: none;
}

/* Status link for attendance table - links to leave/permission details */
.status-link {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  transition: opacity 0.2s ease;
}

.status-link:hover {
  opacity: 0.8;
}

.status-link .link-icon {
  opacity: 0.7;
}

.icon-stack,
.photo-stack {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.icon-stack {
  align-items: center;
}

.mini-label {
  font-size: 0.78rem;
  color: var(--muted);
}

.photo-trigger {
  display: grid;
  place-items: center;
  gap: 4px;
  min-width: 72px;
  padding: 8px 6px;
  border-radius: 14px;
  background: var(--surface-active);
}

.photo-trigger span {
  font-size: 1.05rem;
}

.photo-trigger small {
  font-size: 0.73rem;
  color: var(--muted);
}

.photo-trigger.muted {
  opacity: 0.5;
}

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

.primary-button:active,
.ghost-button:active,
.nav-button:active,
.role-button:active {
  transform: scale(0.96);
}

.primary-button:hover {
  box-shadow: 0 8px 24px rgba(12, 74, 163, 0.2);
}

button:disabled,
.disabled-link {
  opacity: 0.55;
  cursor: not-allowed;
  pointer-events: none;
  transform: none;
}

.form-stack,
.form-grid,
.filter-grid {
  display: grid;
  gap: 14px;
}

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

.form-stack label,
.form-grid label,
.filter-grid label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  min-width: 0;
}

/* Radio Group untuk Lokasi Kerja WFH */
.radio-group {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 14px;
  margin-top: 4px;
}

.radio-group label {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
  background: var(--surface);
  color: var(--ink);
  font-size: 0.9rem;
}

.radio-group label:hover {
  background: var(--surface-hover);
  border-color: var(--blue-500);
}

.radio-group input[type="radio"]:checked + span {
  color: var(--blue-600);
  font-weight: 500;
}

.radio-group input[type="radio"] {
  width: 18px;
  height: 18px;
  accent-color: var(--blue-600);
  cursor: pointer;
}

/* Toggle Switch */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 48px;
  height: 26px;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--line);
  transition: var(--transition-normal);
  border-radius: 26px;
}

.toggle-slider:before {
  position: absolute;
  content: "";
  height: 20px;
  width: 20px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: var(--transition-normal);
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

.toggle-switch input:checked + .toggle-slider {
  background-color: var(--blue-600);
}

.toggle-switch input:checked + .toggle-slider:before {
  transform: translateX(22px);
}

.toggle-switch:active .toggle-slider:before {
  width: 22px;
}

.full-span {
  grid-column: 1 / -1;
}

.scroll-target {
  scroll-margin-top: 118px;
}

.mobile-panel-toolbar {
  display: none;
}

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

.mobile-menu-panel {
  display: grid;
  gap: 10px;
}

.mobile-section-shortcuts {
  display: grid;
  gap: 8px;
}

.mobile-section-shortcut-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.mobile-section-shortcut {
  border: 1px solid rgba(16, 32, 52, 0.08);
  background: var(--surface);
  color: var(--blue-900);
  border-radius: 14px;
  padding: 10px 12px;
  text-align: left;
  font-weight: 700;
  box-shadow: 0 10px 18px rgba(12, 74, 163, 0.08);
}

.mobile-menu-toggle-icon {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: var(--radius);
  background: rgba(12, 74, 163, 0.1);
}

.mobile-menu-toggle-copy {
  font-weight: 700;
  letter-spacing: 0.01em;
}

.inline-search {
  display: flex;
  align-items: center;
  min-width: min(320px, 100%);
}

.inline-search input {
  width: 100%;
}

.table-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 16px;
  flex-wrap: wrap;
}

.table-pagination-info {
  font-size: 0.9rem;
  color: var(--muted);
  text-align: center;
}

/* Pagination buttons - more compact and mobile-friendly */
.table-pagination .ghost-button {
  min-height: 36px;
  padding: 0 12px;
  font-size: 0.85rem;
  white-space: nowrap;
}

/* Fix chevron icon position for next button */
.table-pagination .ghost-button .material-symbols-outlined {
  font-size: 18px;
}

/* For next button, icon should be on the right */
.table-pagination button[id$="NextPageButton"] {
  flex-direction: row-reverse;
}

.table-pagination button[id$="NextPageButton"] .material-symbols-outlined {
  margin-left: 0;
  margin-right: 4px;
}

.table-pagination button[id$="PrevPageButton"] .material-symbols-outlined {
  margin-right: 0;
  margin-left: 4px;
}

.mobile-nav-control {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.mobile-nav-control span {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.mobile-nav-title {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.mobile-nav-icon {
  font-size: 0.95rem;
}

.login-support {
  margin-top: 14px;
}

input,
textarea,
select {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  padding: 13px 14px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(16, 32, 52, 0.12);
  background: var(--surface-strong);
  color: var(--ink);
}

.password-field {
  position: relative;
  display: flex;
  align-items: center;
}

.password-field input {
  padding-right: 52px;
}

.password-toggle-button {
  position: absolute;
  right: 8px;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 12px;
  background: rgba(12, 74, 163, 0.08);
  color: var(--blue-700);
  display: inline-grid;
  place-items: center;
}

.password-toggle-icon {
  width: 20px;
  height: 20px;
  display: block;
  fill: currentColor;
}

.panel-section-rail {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
  padding: 14px 18px;
  border-radius: 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.panel-section-rail-head {
  display: grid;
  gap: 4px;
  min-width: 150px;
}

.panel-section-rail-kicker {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.panel-section-rail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.panel-section-button {
  border: 1px solid rgba(16, 32, 52, 0.08);
  background: var(--surface);
  color: var(--ink);
  padding: 10px 14px;
  border-radius: var(--radius);
  cursor: pointer;
  transition:
    transform 160ms ease,
    box-shadow 160ms ease,
    background-color 160ms ease;
}

.panel-section-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 20px rgba(12, 74, 163, 0.12);
}

input[type="date"],
input[type="week"],
input[type="month"],
input[type="datetime-local"] {
  appearance: none;
  -webkit-appearance: none;
}

textarea {
  resize: vertical;
}

input:focus,
textarea:focus,
select:focus {
  outline: 2px solid rgba(12, 74, 163, 0.22);
  outline-offset: 2px;
}

.status-box,
.current-shift-box {
  margin-top: 16px;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  line-height: 1.6;
}

.status-box {
  background: rgba(12, 74, 163, 0.08);
  color: #0c4aa3;
  transition: background-color 300ms ease, color 300ms ease, opacity 300ms ease;
}

.status-box .status-text {
  color: inherit;
  font-size: 13px;
  line-height: 1.5;
}

.status-box.warning {
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 8px;
  background-color: rgba(180, 120, 0, 0.08);
  border: 1px solid rgba(180, 120, 0, 0.22);
  color: #92400e;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  min-height: 38px;
  box-sizing: border-box;
  line-height: 1.4;
}

/* Animated warning dot */
.warning-dot {
  width: 8px;
  height: 8px;
  background-color: #b45309;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
  margin-top: 4px;
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.5;
    transform: scale(1.2);
  }
}

/* Error tone styling */
.status-box.error {
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 8px;
  background-color: rgba(220, 38, 38, 0.08);
  border: 1px solid rgba(220, 38, 38, 0.22);
  color: #b91c1c;
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  height: auto;
  min-height: auto;
  box-sizing: border-box;
  line-height: 1.5;
}

.status-box.error .warning-dot {
  background-color: #dc2626;
}

/* Success tone styling */
.status-box.success {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background-color: rgba(5, 150, 105, 0.08);
  border: 1px solid rgba(5, 150, 105, 0.22);
  color: #065f46;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  min-height: 38px;
  height: auto;
  box-sizing: border-box;
  line-height: 1.4;
  margin-bottom: 12px;
}

.status-box.success .warning-dot {
  background-color: #059669;
  animation: none; /* No pulse for success */
}

/* Info tone styling */
.status-box.info {
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 8px;
  background-color: rgba(12, 74, 163, 0.07);
  border: 1px solid rgba(12, 74, 163, 0.2);
  color: #0c4aa3;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  min-height: 38px;
  box-sizing: border-box;
  line-height: 1.4;
}

.status-box.info .warning-dot {
  background-color: #1a5cba;
}

/* Modern soft warning alert with icon and better contrast for dark theme */
.status-box.warning-modern {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background-color: rgba(180, 120, 0, 0.08);
  border: 1px solid rgba(180, 120, 0, 0.22);
  color: #92400e;
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.5;
  margin-top: 16px;
}

.status-box.warning-modern .warning-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  margin-top: 2px;
}

.status-box.warning-modern strong,
.status-box.warning-modern a {
  text-decoration: underline;
  cursor: pointer;
  color: #78350f;
  font-weight: 600;
}

.status-box.warning-modern a:hover {
  color: #451a03;
  transition: color 200ms ease;
}

/* Text span inside modern warning boxes */
.status-box.warning-modern span {
  flex: 1;
}

/* Override max-width for attendance status in hero section */
.att-hero-actions .status-box.warning-modern {
  max-width: 100%;
  width: 100%;
  margin-top: 12px;
}

/* Semua status-box & teks di dalam att-hero harus putih — background biru tua */
.att-hero .status-box,
.att-hero-actions .status-box {
  background: rgba(0, 0, 0, 0.25) !important;
  border-color: rgba(255, 255, 255, 0.2) !important;
  color: rgba(255, 255, 255, 0.95) !important;
}

.att-hero .status-box .status-text,
.att-hero-actions .status-box .status-text,
.att-hero .status-box span,
.att-hero-actions .status-box span {
  color: rgba(255, 255, 255, 0.95) !important;
}

.att-hero .status-box a,
.att-hero-actions .status-box a {
  color: #a5f3d4 !important;
}

.att-hero .status-box strong,
.att-hero-actions .status-box strong {
  color: #fff !important;
}

/* Clock Notification Indicator */
.notification-indicator {
  margin-top: 12px;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 8px;
  backdrop-filter: blur(10px);
  animation: slideIn 0.3s ease;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.notification-indicator-content {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
}

.notification-indicator-content .material-symbols-outlined {
  font-size: 20px;
  color: #a5f3d4;
  animation: bellRing 2s ease-in-out infinite;
}

@keyframes bellRing {
  0%, 100% {
    transform: rotate(0deg);
  }
  10%, 30% {
    transform: rotate(-10deg);
  }
  20%, 40% {
    transform: rotate(10deg);
  }
}

.notification-indicator-text {
  flex: 1;
  min-width: 0;
}

.notification-indicator-text strong {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  margin-bottom: 2px;
}

.notification-indicator-text p {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.85);
  margin: 0;
  line-height: 1.4;
}

.notification-indicator-content .ghost-button {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  padding: 0;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.notification-indicator-content .ghost-button:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.05);
}

.notification-indicator-content .ghost-button .material-symbols-outlined {
  font-size: 16px;
  animation: none;
}

.notification-indicator-content .ghost-button:hover .material-symbols-outlined {
  transform: scale(1.1);
}

/* Clock Toast Notification - Mobile Floating Notification */
.clock-toast-notification {
  position: fixed !important;
  top: 20px !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  z-index: 2147483647 !important; /* Maximum z-index value */
  max-width: 90vw;
  width: 400px;
  animation: toastSlideIn 0.3s ease;
  pointer-events: auto !important;
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
}

@keyframes toastSlideIn {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

.clock-toast-notification.toast-hiding {
  animation: toastSlideOut 0.3s ease forwards;
}

@keyframes toastSlideOut {
  from {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
  to {
    opacity: 0;
    transform: translateX(-50%) translateY(-20px);
  }
}

.toast-content {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  position: relative;
  overflow: hidden;
}

.toast-content::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.1);
  animation: shimmer 3s infinite;
}

@keyframes shimmer {
  0%, 100% {
    opacity: 0;
  }
  50% {
    opacity: 1;
  }
}

.toast-icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
}

.toast-icon .material-symbols-outlined {
  font-size: 24px;
  color: white;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
}

.toast-message {
  flex: 1;
  min-width: 0;
  z-index: 1;
}

.toast-message strong {
  display: block;
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 4px;
  color: white;
}

.toast-message p {
  font-size: 14px;
  line-height: 1.4;
  margin: 0;
  color: rgba(255, 255, 255, 0.9);
}

.toast-close {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  z-index: 1;
}

.toast-close:hover {
  background: rgba(255, 255, 255, 0.2);
}

.toast-close .material-symbols-outlined {
  font-size: 18px;
  color: white;
}

/* Mobile-specific adjustments */
@media (max-width: 640px) {
  .clock-toast-notification {
    top: 10px !important;
    width: calc(100vw - 32px) !important;
    max-width: none !important;
    left: 16px !important;
    transform: none !important;
  }

  @keyframes toastSlideIn {
    from {
      opacity: 0;
      transform: translateY(-20px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  @keyframes toastSlideOut {
    from {
      opacity: 1;
      transform: translateY(0);
    }
    to {
      opacity: 0;
      transform: translateY(-20px);
    }
  }

  .clock-toast-notification.toast-hiding {
    animation: toastSlideOut 0.3s ease forwards;
  }

  .toast-content {
    padding: 14px;
  }

  .toast-icon {
    width: 36px;
    height: 36px;
  }

  .toast-icon .material-symbols-outlined {
    font-size: 20px;
  }

  .toast-message strong {
    font-size: 15px;
  }

  .toast-message p {
    font-size: 13px;
  }
}

.att-hero .status-box .warning-dot,
.att-hero-actions .status-box .warning-dot {
  background-color: rgba(255, 255, 255, 0.7) !important;
}

.att-hero .status-box svg,
.att-hero-actions .status-box svg {
  stroke: rgba(255, 255, 255, 0.8) !important;
}

/* status-flag (Face recognition siap / Geotagging siap) di hero */
.att-hero .status-flag {
  color: rgba(255, 255, 255, 0.85) !important;
  border-bottom-color: rgba(255, 255, 255, 0.15) !important;
}

.att-hero .status-dot.ready {
  background: #4ade80;
}

.att-hero .status-dot.not-ready {
  background: #f87171;
}

/* Success tone for modern status boxes */
.status-box.warning-modern.success {
  background-color: rgba(5, 150, 105, 0.08);
  border-color: rgba(5, 150, 105, 0.22);
  color: #065f46;
}

.status-box.warning-modern.success .warning-icon {
  color: #059669;
}

.status-box.warning-modern.success strong,
.status-box.warning-modern.success a {
  color: #064e3b;
}

.status-box.warning-modern.success a:hover {
  color: #022c22;
}

/* Error tone - keep existing error styles but ensure icon is visible */
.status-box.error {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: rgba(220, 38, 38, 0.08);
  border: 1px solid rgba(220, 38, 38, 0.22);
  color: #b91c1c;
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.5;
  margin-top: 12px;
  max-width: 100%;
  word-wrap: break-word;
  overflow-wrap: break-word;
  height: auto !important;
  min-height: auto !important;
}

#cameraModalStatus.status-box.error {
  margin-top: 0;
  margin-bottom: 16px;
  position: relative;
  z-index: 0;
}

.status-box.error .warning-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  margin-top: 2px;
}

.status-box.error span {
  flex: 1;
  min-width: 0;
}

.current-shift-box {
  background: var(--surface-active);
  border: 1px solid var(--line);
}

.section-head {
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 18px;
}

.section-head.compact {
  margin-bottom: 12px;
}

.panel-page {
  display: none;
  opacity: 0;
}

.panel-page.active {
  display: flex;
  flex-direction: column;
  gap: 16px;
  opacity: 1;
  animation: panel-enter 300ms var(--ease-out-expo) forwards;
}

@keyframes panel-enter {
  from { opacity: 0; }
  to { opacity: 1; }
}

.panel-page.active > .card,
.panel-page.active > .grid-2,
.panel-page.active > .summary-grid {
  animation: card-fade-up 350ms var(--ease-out-expo) both;
  margin-bottom: 0;
}
.panel-page.active > :nth-child(1) { animation-delay: 0ms; }
.panel-page.active > :nth-child(2) { animation-delay: 60ms; }
.panel-page.active > :nth-child(3) { animation-delay: 120ms; }
.panel-page.active > :nth-child(4) { animation-delay: 180ms; }
.panel-page.active > :nth-child(5) { animation-delay: 240ms; }

@keyframes card-fade-up {
  from { opacity: 0; }
  to { opacity: 1; }
}

body.ui-mode-dev-v2 .panel-page[data-panel="overview"].active {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
}

body.ui-mode-dev-v2 .panel-page[data-panel="overview"].active > .summary-grid,
body.ui-mode-dev-v2 .panel-page[data-panel="overview"].active > .grid-2 {
  margin-bottom: 0;
}

body.ui-mode-dev-v2 .panel-page[data-panel="overview"].active > .card,
body.ui-mode-dev-v2 .panel-page[data-panel="overview"].active > .grid-2,
body.ui-mode-dev-v2 .panel-page[data-panel="overview"].active > .summary-grid {
  width: 100%;
  min-width: 0;
}

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

.detail-grid div {
  padding: 14px;
  border-radius: 16px;
  background: var(--surface-active);
  min-width: 0;
}

.detail-grid span,
.detail-grid strong {
  display: block;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.detail-grid strong {
  margin-top: 6px;
}

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

.detail-grid.compact div {
  padding: 12px 14px;
}

.detail-grid div.is-wide {
  grid-column: span 2;
}

/* ── Attendance Summary Stat Cards ──────────────────────────────────────── */
.stats-row {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
}

@media (max-width: 1200px) {
  .stats-row { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 640px) {
  .stats-row { grid-template-columns: repeat(2, 1fr); }
}

.stat-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px 14px 14px;
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-xs);
  overflow: hidden;
  transition: box-shadow 0.15s, transform 0.15s;
}

.stat-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 3px;
  height: 100%;
  border-radius: 3px 0 0 3px;
}

.stat-card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-1px);
}

.stat-card-icon {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

.stat-card .stat-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--muted);
  margin: 0;
  line-height: 1.3;
}

.stat-card .stat-value {
  font-size: 28px;
  font-weight: 800;
  line-height: 1;
  margin: 0;
  letter-spacing: -0.5px;
}

/* color variants */
.stat-card.sc-total::before { background: var(--blue-700); }
.stat-card.sc-total .stat-card-icon { background: rgba(12,74,163,0.1); color: var(--blue-700); }
.stat-card.sc-total .stat-value { color: var(--blue-700); }

.stat-card.sc-hadir::before { background: var(--success); }
.stat-card.sc-hadir .stat-card-icon { background: var(--success-soft); color: var(--success); }
.stat-card.sc-hadir .stat-value { color: var(--success); }

.stat-card.sc-late::before { background: var(--warning); }
.stat-card.sc-late .stat-card-icon { background: var(--warning-soft); color: var(--warning); }
.stat-card.sc-late .stat-value { color: var(--warning); }

.stat-card.sc-absent::before { background: var(--danger); }
.stat-card.sc-absent .stat-card-icon { background: var(--danger-soft); color: var(--danger); }
.stat-card.sc-absent .stat-value { color: var(--danger); }

.stat-card.sc-leave::before { background: #7c3aed; }
.stat-card.sc-leave .stat-card-icon { background: rgba(124,58,237,0.1); color: #7c3aed; }
.stat-card.sc-leave .stat-value { color: #7c3aed; }

.stat-card.sc-consinyering::before { background: var(--gold-700); }
.stat-card.sc-consinyering .stat-card-icon { background: rgba(181,140,25,0.1); color: var(--gold-700); }
.stat-card.sc-consinyering .stat-value { color: var(--gold-700); }

/* ── /Attendance Summary Stat Cards ─────────────────────────────────────── */

.inline-field {
  display: inline-grid;
  gap: 6px;
  min-width: 0;
}

.inline-field span {
  font-size: 0.78rem;
  color: var(--muted);
}

.compact-field {
  min-width: 190px;
}

.indicator-list,
.coordinate-list {
  gap: 10px;
}

.status-flag,
.detail-row,
.coordinate-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.status-flag {
  justify-content: flex-start;
}

.status-dot {
  width: 12px;
  height: 12px;
  border-radius: var(--radius);
  flex: 0 0 auto;
}

.status-dot.ready {
  background: var(--green-700);
}

.status-dot.not-ready {
  background: var(--danger);
}

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

.profile-card {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  gap: 20px;
}

.profile-photo {
  min-height: 200px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: calc(var(--radius-lg) - 2px);
  background: linear-gradient(145deg, rgba(12, 74, 163, 0.12), rgba(17, 142, 29, 0.14));
}

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

.profile-detail-sections {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  align-items: start;
}

.profile-detail-section {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface-page);
}

.profile-detail-section h3 {
  margin-bottom: 12px;
  font-size: 1rem;
}

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

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

.calendar-side-card {
  padding: 16px;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: var(--surface-page);
  display: grid;
  gap: 12px;
}

.compact-form {
  gap: 10px;
}

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

.calendar-weekday {
  padding: 10px 6px;
  text-align: center;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--muted);
}

.calendar-cell {
  min-height: 96px;
  padding: 12px;
  border-radius: 18px;
  border: 1px solid rgba(16, 32, 52, 0.08);
  background: var(--surface-page);
  display: grid;
  align-content: start;
  gap: 8px;
}

.calendar-cell.is-empty {
  background: var(--surface-active);
}

.calendar-cell.is-today {
  border-color: rgba(12, 74, 163, 0.28);
  box-shadow: 0 12px 24px rgba(12, 74, 163, 0.08);
}

.calendar-cell.is-holiday {
  background: rgba(255, 247, 223, 0.92);
  border-color: rgba(197, 154, 32, 0.24);
}

.calendar-cell.has-reminder {
  box-shadow: inset 0 0 0 1px rgba(17, 142, 29, 0.18);
}

.calendar-cell.has-alert {
  box-shadow: inset 0 0 0 1px rgba(210, 73, 73, 0.16);
}

.calendar-cell-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.calendar-cell-head strong {
  font-size: 1rem;
}

.calendar-cell-note {
  margin: 0;
  font-size: 0.84rem;
  line-height: 1.45;
  color: var(--blue-900);
  overflow-wrap: anywhere;
  word-break: break-word;
}

.scheduler-shell {
  display: grid;
  gap: 16px;
}

.admin-calendar-card {
  overflow: hidden;
}

.admin-calendar-card .section-head {
  margin-bottom: 4px;
}

.admin-calendar-card .scheduler-shell {
  gap: 18px;
}

.admin-calendar-card .scheduler-month-grid {
  gap: 12px;
}

.admin-calendar-card .scheduler-month-weekdays,
.admin-calendar-card .scheduler-month-cells {
  gap: 12px;
}

.admin-calendar-card .scheduler-month-cells {
  grid-auto-rows: minmax(138px, auto);
}

.admin-calendar-card .scheduler-day-card {
  min-height: 138px;
  padding: 14px;
  gap: 10px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.admin-calendar-card .scheduler-day-preview {
  gap: 8px;
}

.admin-calendar-card .scheduler-inline-event,
.admin-calendar-card .scheduler-day-more {
  min-height: 28px;
}

.admin-calendar-card .scheduler-view-surface {
  min-height: 0;
}

.admin-calendar-card .scheduler-agenda-shell {
  min-height: 320px;
}

.scheduler-toolbar {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 14px;
}

.scheduler-toolbar-main,
.scheduler-view-switch {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.scheduler-toolbar-title {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.scheduler-toolbar-title strong {
  font-size: 1.18rem;
}

.scheduler-view-button {
  border: 1px solid rgba(16, 32, 52, 0.08);
  background: var(--surface);
  color: var(--muted);
  padding: 10px 12px;
  border-radius: var(--radius);
  cursor: pointer;
}

.scheduler-view-button.active {
  background: linear-gradient(135deg, var(--blue-700), var(--green-700));
  color: white;
  box-shadow: 0 14px 26px rgba(12, 74, 163, 0.22);
}

.scheduler-content {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(320px, 0.9fr);
  gap: 16px;
  align-items: start;
}

.scheduler-view-surface,
.scheduler-detail-pane {
  padding: 16px;
  border-radius: 22px;
  border: 1px solid var(--line);
  background: var(--surface-page);
}

.scheduler-detail-pane {
  display: grid;
  gap: 14px;
}

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

.scheduler-detail-list {
  display: grid;
  gap: 10px;
  max-height: 260px;
  overflow-y: auto;
  padding-right: 4px;
}

.scheduler-detail-item {
  padding: 12px 14px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: var(--surface);
}

.scheduler-detail-item-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
}

.scheduler-detail-item p,
.scheduler-detail-item small {
  color: var(--muted);
  line-height: 1.5;
}

.scheduler-mobile-sheet-body {
  display: grid;
  gap: 14px;
}

.scheduler-mobile-sheet-head {
  display: grid;
  gap: 4px;
}

.scheduler-empty-detail {
  color: var(--muted);
  line-height: 1.6;
}

.scheduler-month-grid {
  display: grid;
  gap: 10px;
}

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

.scheduler-month-cells {
  grid-auto-rows: minmax(124px, auto);
}

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

.scheduler-day-card {
  min-height: 124px;
  height: 100%;
  padding: 12px;
  border-radius: 18px;
  border: 1px solid rgba(16, 32, 52, 0.08);
  background: var(--surface);
  display: grid;
  grid-template-rows: auto 1fr;
  align-content: start;
  gap: 10px;
  text-align: left;
}

.scheduler-day-card.is-empty {
  background: var(--surface-active);
  border-style: dashed;
}

.scheduler-day-card.is-selected {
  border-color: rgba(12, 74, 163, 0.28);
  box-shadow: 0 12px 24px rgba(12, 74, 163, 0.08);
}

.scheduler-day-card.is-today {
  background: linear-gradient(180deg, rgba(12, 74, 163, 0.08), rgba(17, 142, 29, 0.06));
}

.scheduler-day-card.is-weekend .scheduler-day-number,
.scheduler-day-card.is-holiday-date .scheduler-day-number {
  color: #d24949;
}

.scheduler-day-card.is-collective-leave-date .scheduler-day-number,
.scheduler-day-card.is-custom-date .scheduler-day-number {
  color: #118e1d;
}

.scheduler-day-card.is-collective-leave-date {
  background: linear-gradient(180deg, rgba(17, 142, 29, 0.08), rgba(17, 142, 29, 0.03));
}

.scheduler-day-number {
  font-size: 1rem;
  font-weight: 800;
}

.scheduler-day-preview {
  display: grid;
  gap: 6px;
  align-content: start;
}

.scheduler-inline-event,
.scheduler-day-more {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  min-height: 26px;
  padding: 4px 8px;
  border-radius: var(--radius);
  background: var(--surface-active);
  font-size: 0.76rem;
  line-height: 1.3;
  width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.scheduler-inline-strip {
  display: block;
  width: 100%;
  min-height: 6px;
  border-radius: var(--radius);
  background: rgba(16, 32, 52, 0.1);
}

.scheduler-inline-strip.muted {
  background: var(--surface-active);
}

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

.scheduler-placeholder {
  min-height: 320px;
  display: grid;
  align-content: center;
  justify-items: start;
  gap: 10px;
  padding: 18px;
  border-radius: 20px;
  border: 1px dashed rgba(16, 32, 52, 0.12);
  background: linear-gradient(180deg, rgba(248, 251, 255, 0.9), rgba(239, 246, 255, 0.72));
}

.scheduler-placeholder strong {
  font-size: 1rem;
}

.scheduler-placeholder p {
  color: var(--muted);
  line-height: 1.55;
}

.scheduler-inline-event.tone-blue,
.scheduler-inline-strip.tone-blue,
.scheduler-event-pill.tone-blue,
.scheduler-detail-item.tone-blue {
  background: rgba(12, 74, 163, 0.1);
}

.scheduler-inline-event.tone-green,
.scheduler-inline-strip.tone-green,
.scheduler-event-pill.tone-green,
.scheduler-detail-item.tone-green {
  background: rgba(17, 142, 29, 0.1);
}

.scheduler-inline-event.tone-gold,
.scheduler-inline-strip.tone-gold,
.scheduler-event-pill.tone-gold,
.scheduler-detail-item.tone-gold {
  background: rgba(197, 154, 32, 0.14);
}

.scheduler-inline-event.tone-red,
.scheduler-inline-strip.tone-red,
.scheduler-event-pill.tone-red,
.scheduler-detail-item.tone-red {
  background: rgba(210, 73, 73, 0.12);
}

.scheduler-inline-event.tone-teal,
.scheduler-inline-strip.tone-teal,
.scheduler-event-pill.tone-teal,
.scheduler-detail-item.tone-teal {
  background: rgba(19, 136, 110, 0.12);
}

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

.scheduler-week-day {
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 10px;
  padding: 12px;
  min-height: 320px;
  border-radius: 18px;
  border: 1px solid rgba(16, 32, 52, 0.08);
  background: var(--surface);
}

.scheduler-week-day.is-selected {
  border-color: rgba(12, 74, 163, 0.28);
}

.scheduler-week-day.is-today {
  background: linear-gradient(180deg, rgba(12, 74, 163, 0.08), rgba(17, 142, 29, 0.06));
}

.scheduler-week-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  background: transparent;
  border: 0;
  text-align: left;
  cursor: pointer;
}

.scheduler-week-head span {
  color: var(--muted);
}

.scheduler-week-events {
  display: grid;
  gap: 8px;
  align-content: start;
  max-height: 250px;
  overflow-y: auto;
  padding-right: 4px;
}

.scheduler-event-chip {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border-radius: 14px;
}

.scheduler-empty-day {
  color: var(--muted);
  font-size: 0.82rem;
}

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

.scheduler-mini-month {
  padding: 12px 10px;
  border-radius: 18px;
  border: 1px solid rgba(16, 32, 52, 0.08);
  background: var(--surface);
  display: grid;
  gap: 8px;
  height: 100%;
}

.scheduler-mini-month-head {
  border: 0;
  background: transparent;
  text-align: left;
  font-weight: 800;
  color: var(--blue-900);
  cursor: pointer;
}

.scheduler-month-grid.is-compact .scheduler-month-weekdays span {
  font-size: 0.62rem;
}

.scheduler-month-grid.is-compact .scheduler-month-cells {
  gap: 4px;
}

.scheduler-month-grid.is-compact .scheduler-day-card {
  min-height: 54px;
  padding: 6px;
  gap: 4px;
}

.scheduler-month-grid.is-compact .scheduler-day-preview {
  min-height: 0;
  gap: 2px;
}

.scheduler-month-grid.is-compact .scheduler-inline-event {
  min-height: 20px;
  padding: 2px 6px;
  font-size: 0.68rem;
}

.scheduler-month-grid.is-compact .scheduler-day-more {
  min-height: 18px;
  font-size: 0.64rem;
  padding: 2px 4px;
}

.scheduler-agenda-shell {
  border: 1px solid rgba(16, 32, 52, 0.08);
  border-radius: 20px;
  background: var(--surface);
  overflow: hidden;
}

.app-dialog-body {
  display: grid;
  gap: 12px;
}

/* ─── App Dialog Head ─────────────────────────────────────────────────────── */
.app-dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(16, 32, 52, 0.08);
  position: relative;
  z-index: 2;
}

.app-dialog-head h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  flex: 1;
}

.app-dialog-head .icon-button {
  flex-shrink: 0;
  pointer-events: auto !important;
  cursor: pointer !important;
  position: relative;
  z-index: 3;
}

/* ─── Approval Action Buttons (inline table cell) ─────────────────────────── */
.approval-actions {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
}

.approval-actions-buttons {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}

.approval-comment-input {
  width: 100%;
}

.approval-comment-input .comment-textarea {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  font-size: 11px;
  padding: 6px 8px;
  resize: vertical;
  border: 1px solid rgba(16, 32, 52, 0.15);
  border-radius: 6px;
  background: #fff;
  color: inherit;
  box-sizing: border-box;
}

.scheduler-timeline {
  display: grid;
  max-height: 360px;
  overflow-y: auto;
}

.scheduler-all-day-row,
.scheduler-hour-row {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 12px;
  align-items: stretch;
  min-height: 56px;
  padding: 8px 12px;
  border-top: 1px solid rgba(16, 32, 52, 0.06);
}

.scheduler-all-day-row {
  border-top: 0;
}

.scheduler-hour-row.is-current {
  background: rgba(210, 73, 73, 0.08);
}

.scheduler-hour-label {
  display: inline-flex;
  align-items: center;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--muted);
}

.scheduler-all-day-events,
.scheduler-hour-events {
  display: grid;
  gap: 8px;
  align-content: center;
}

.scheduler-event-pill {
  display: inline-grid;
  gap: 2px;
  align-content: start;
  width: 100%;
  padding: 10px 12px;
  border-radius: 14px;
  overflow: hidden;
}

@media (min-width: 861px) {
  .scheduler-toolbar {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "title actions"
      "nav actions";
    align-items: start;
    gap: 14px 18px;
    padding: 18px 20px;
    border-radius: 24px;
    border: 1px solid rgba(16, 32, 52, 0.08);
    background: var(--surface);
  }

  .scheduler-toolbar-title {
    grid-area: title;
  }

  .scheduler-toolbar-main {
    grid-area: nav;
  }

  .scheduler-view-switch {
    grid-area: actions;
    justify-content: flex-end;
    align-self: start;
  }

  .scheduler-toolbar .ghost-button.icon-label {
    min-height: 44px;
    padding: 10px 14px;
    flex-direction: row;
  }

  .scheduler-content {
    grid-template-columns: minmax(0, 1.9fr) minmax(360px, 420px);
    gap: 20px;
  }

  .scheduler-view-surface {
    min-height: 760px;
  }

  .scheduler-detail-pane {
    position: sticky;
    top: 18px;
    max-height: calc(100vh - 160px);
    overflow: hidden;
  }

  .scheduler-detail-list {
    max-height: 320px;
  }

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

  .admin-calendar-card .scheduler-toolbar {
    grid-template-columns: auto minmax(0, 1fr) auto;
    grid-template-areas: "nav title actions";
    align-items: center;
    gap: 18px;
  }

  .admin-calendar-card .scheduler-toolbar-title {
    text-align: center;
    align-self: center;
  }

  .admin-calendar-card .scheduler-content {
    grid-template-columns: minmax(0, 2.15fr) minmax(320px, 0.95fr);
    gap: 22px;
    align-items: start;
  }

  .admin-calendar-card .scheduler-view-surface {
    min-height: 680px;
  }

  .admin-calendar-card .scheduler-detail-pane {
    top: 0;
    max-height: none;
    min-height: 680px;
  }

  .admin-calendar-card .scheduler-detail-list {
    max-height: 340px;
  }
}

.scheduler-event-time {
  font-size: 0.78rem;
  color: var(--muted);
}

.scheduler-empty-slot {
  min-height: 20px;
  color: transparent;
}

.reminder-board {
  display: grid;
  gap: 14px;
}

.reminder-group {
  display: grid;
  gap: 10px;
  padding: 16px;
  border-radius: 22px;
  border: 1px solid var(--line);
  background: var(--surface-page);
}

.comment-thread-list,
.comment-thread-item {
  display: grid;
  gap: 6px;
}

.comment-thread-item {
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(16, 32, 52, 0.08);
  background: var(--surface);
}

.comment-thread-item.is-pending {
  border-color: rgba(197, 154, 32, 0.24);
  background: rgba(255, 250, 235, 0.88);
}

.comment-thread-item.is-resolved {
  border-color: rgba(17, 142, 29, 0.14);
  background: rgba(243, 250, 246, 0.9);
}

.ghost-button.compact,
.icon-label.compact {
  padding: 8px 12px;
  font-size: 0.84rem;
}

.reminder-group-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.reminder-group-head strong {
  font-size: 1rem;
}

.reminder-group-count {
  min-width: 28px;
  height: 28px;
  display: inline-grid;
  place-items: center;
  padding: 0 8px;
  border-radius: var(--radius);
  background: rgba(12, 74, 163, 0.12);
  color: var(--blue-900);
  font-size: 0.78rem;
  font-weight: 800;
}

.reminder-list {
  display: grid;
  gap: 10px;
  max-height: 320px;
  overflow-y: auto;
  padding-right: 4px;
}

.reminder-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
  align-items: flex-start;
  padding: 12px 14px;
  border-radius: 18px;
  border: 1px solid rgba(16, 32, 52, 0.08);
  background: var(--surface);
}

.reminder-item.is-done {
  background: var(--surface-active);
  border-style: dashed;
}

.reminder-check {
  width: 26px;
  height: 26px;
  border-radius: var(--radius);
  border: 2px solid rgba(16, 32, 52, 0.16);
  background: white;
  color: var(--green-700);
  display: inline-grid;
  place-items: center;
  cursor: pointer;
}

.reminder-check.is-done {
  border-color: rgba(17, 142, 29, 0.3);
  background: rgba(17, 142, 29, 0.12);
}

.reminder-body {
  display: grid;
  gap: 4px;
}

.reminder-body strong {
  font-size: 1rem;
}

.reminder-item.is-done .reminder-body strong {
  color: var(--muted);
  font-weight: 500;
}

.reminder-meta,
.reminder-note {
  color: var(--muted);
  line-height: 1.5;
}

.reminder-actions {
  display: inline-flex;
  gap: 8px;
}

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

.guide-list,
.task-result-stack {
  gap: 12px;
}

.zoom-banner {
  justify-content: space-between;
  align-items: center;
  padding: 18px;
  border-radius: 22px;
  background: linear-gradient(135deg, rgba(12, 74, 163, 0.08), rgba(17, 142, 29, 0.12));
}

.current-shift-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.current-shift-grid div {
  padding: 12px;
  border-radius: 16px;
  background: var(--surface-page);
}

.task-editor-item,
.task-check-item,
.empty-panel,
.task-result-item {
  padding: 16px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: var(--surface-page);
  margin-bottom: 12px;
}

.task-editor-head,
.task-check-head,
.task-result-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.task-check-head,
.task-result-head {
  margin-bottom: 12px;
}

.task-check-item.completed {
  border-color: rgba(17, 142, 29, 0.24);
  background: rgba(17, 142, 29, 0.06);
}

.task-status-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.status-choice {
  padding: 10px 12px;
  border-radius: var(--radius);
  background: var(--surface-active);
}

.status-choice.active.success {
  background: var(--success-soft);
  color: #0b6b20;
}

.status-choice.active.warning {
  background: var(--warning-soft);
  color: #8b6516;
}

.status-choice.active.danger {
  background: var(--danger-soft);
  color: #a02c2c;
}

.task-help,
.task-note,
.camera-caption {
  margin-top: 10px;
  font-size: 0.95rem;
  line-height: 1.55;
  color: var(--muted);
}

.success-text {
  color: var(--green-700);
}

.spaced-top {
  margin-top: 14px;
}

.spaced-bottom {
  margin-bottom: 14px;
}

.task-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: var(--radius);
  font-size: 0.82rem;
  white-space: nowrap;
}

.task-chip.ready {
  background: var(--success-soft);
  color: #0b6b20;
}

.task-chip.warning {
  background: var(--warning-soft);
  color: #8b6516;
}

.task-chip.danger {
  background: var(--danger-soft);
  color: #a02c2c;
}

.task-chip.carry {
  background: rgba(12, 74, 163, 0.12);
  color: var(--blue-700);
}

.task-bullets {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 8px;
}

.task-bullets li {
  line-height: 1.55;
}

.task-bullets li.done span {
  text-decoration: line-through;
  color: var(--muted);
}

.table-wrap {
  overflow-x: auto;
  max-height: 560px;
  overflow-y: auto;
  padding-right: 4px;
}

/* Desktop: date cell di history table */
.history-date-cell {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

/* Desktop: chip status di dalam td Tanggal disembunyikan — sudah ada di kolom Status terpisah */
.history-status-chip {
  display: none;
}

table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

/* Data table text alignment */
.data-table th,
.data-table td {
  text-align: left;
}

/* Ensure native table display for sticky to work properly — only for report-table */
.report-table {
  display: table !important;
}

.report-table thead {
  display: table-header-group !important;
}

.report-table tbody {
  display: table-row-group !important;
}

.report-table tr {
  display: table-row !important;
}

.report-table td,
.report-table th {
  display: table-cell !important;
}

/* Sticky table headers for report tables */
.report-table thead {
  position: sticky;
  top: 0;
  z-index: 5;
}

.report-table thead th {
  text-align: left;
  padding-bottom: 14px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.76rem;
  color: var(--muted);
  white-space: nowrap;
}

/* Sticky table headers for report tables - MUST override generic thead th */
.report-table thead th {
  position: sticky !important;
  top: 0 !important;
  background-color: #ffffff !important;
  background: #ffffff !important;
  z-index: 10 !important;
  box-shadow: 0 1px 0 var(--border);
}

/* Sortable table headers */
thead th[data-sort] {
  cursor: pointer;
  user-select: none;
  position: relative;
  padding-right: 20px;
  transition: color 0.2s ease;
}

thead th[data-sort]:hover {
  color: var(--accent);
}

thead th[data-sort] .sort-icon {
  display: inline-block;
  margin-left: 4px;
  font-size: 0.9em;
  opacity: 0.5;
  transition: opacity 0.2s ease, color 0.2s ease;
}

thead th[data-sort]:hover .sort-icon {
  opacity: 0.8;
}

tbody td {
  padding: 16px 0;
  border-top: 1px solid var(--line);
  vertical-align: top;
  line-height: 1.6;
}

.empty-state {
  text-align: center;
  color: var(--muted);
  padding: 28px 0;
}

.stacked-lines {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}

.chart-bars {
  grid-template-columns: repeat(auto-fit, minmax(112px, 1fr));
  align-items: end;
  min-height: 250px;
}

.overview-chart-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}

@media (min-width: 800px) {
  .overview-chart-layout {
    grid-template-columns: 1fr 1fr;
  }
}

.chart-bars.compact {
  min-height: 180px;
}

.chart-section {
  padding: 18px;
  border-radius: 22px;
  background: var(--surface-page);
  border: 1px solid var(--line);
}

.chart-bar-card {
  display: grid;
  justify-items: center;
  gap: 12px;
  background: var(--surface);
}

.chart-bar-card .bar-name {
  font-size: 0.72rem;
  text-align: center;
  word-break: break-word;
  overflow-wrap: break-word;
  max-width: 100%;
  line-height: 1.3;
}

.chart-bar-track {
  width: 100%;
  height: 140px;
  display: flex;
  align-items: end;
  padding: 10px;
  border-radius: 18px;
  background: var(--surface-active);
}

.chart-bar {
  width: 100%;
  border-radius: 14px;
}

.fill-blue {
  background: linear-gradient(180deg, #5896ea, #0c4aa3);
}

.fill-green {
  background: linear-gradient(180deg, #4cbe59, #118e1d);
}

.fill-teal {
  background: linear-gradient(180deg, #47c0aa, #13886e);
}

.fill-gold {
  background: linear-gradient(180deg, #f1d16f, #c59a20);
}

.fill-danger {
  background: linear-gradient(180deg, #f08f8f, #d24949);
}

.fill-carry {
  background: linear-gradient(180deg, #8cb5ff, #4467cf);
}

.pie-panel,
.chart-legend {
  display: grid;
  gap: 12px;
}

.pie-chart {
  width: min(240px, 100%);
  aspect-ratio: 1;
  margin: 0 auto;
  border-radius: 50%;
  position: relative;
  background: var(--surface-active);
  box-shadow: inset 0 0 0 1px rgba(16, 32, 52, 0.06);
}

.pie-chart::after {
  content: "";
  position: absolute;
  inset: 24%;
  border-radius: 50%;
  background: var(--surface);
  box-shadow: inset 0 0 0 1px rgba(16, 32, 52, 0.05);
}

.legend-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 16px;
  background: var(--surface-page);
  border: 1px solid var(--line);
}

.legend-dot {
  width: 12px;
  height: 12px;
  border-radius: var(--radius);
}

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

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

.widget-scroll {
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 6px;
  scrollbar-width: thin;
  scrollbar-color: rgba(12, 74, 163, 0.28) transparent;
}

.widget-scroll::-webkit-scrollbar {
  width: 8px;
}

.widget-scroll::-webkit-scrollbar-track {
  background: transparent;
}

.widget-scroll::-webkit-scrollbar-thumb {
  border-radius: var(--radius);
  background: rgba(12, 74, 163, 0.24);
}

.widget-scroll.three-cards {
  max-height: 412px;
  align-content: start;
  scroll-snap-type: y proximity;
}

.notification-heading {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.notification-counter {
  min-width: 28px;
  height: 28px;
  display: inline-grid;
  place-items: center;
  padding: 0 10px;
  border-radius: var(--radius);
  background: var(--danger);
  color: white;
  font-size: 0.82rem;
  font-weight: 800;
  line-height: 1;
  box-shadow: 0 12px 22px rgba(210, 73, 73, 0.22);
}

.notification-item {
  display: grid;
  gap: 6px;
  width: 100%;
  text-align: left;
  padding: 16px 18px;
  appearance: none;
  cursor: pointer;
  border-radius: 20px;
  background: var(--surface-page);
  border: 1px solid var(--line);
  scroll-snap-align: start;
  transition: all 0.2s ease;
}

.notification-item:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  border-color: var(--blue-300);
}

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

.notification-title {
  color: var(--blue-700);
  font-weight: 700;
  line-height: 1.4;
}

.notification-state-chip {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 26px;
  padding: 4px 10px;
  border-radius: var(--radius);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  background: rgba(12, 74, 163, 0.12);
  color: var(--blue-700);
}

.notification-state-chip.warning {
  background: rgba(197, 154, 32, 0.16);
  color: #8b6516;
}

.notification-state-chip.error {
  background: rgba(210, 73, 73, 0.16);
  color: #a02c2c;
}

.notification-state-chip.info {
  background: rgba(12, 74, 163, 0.12);
  color: var(--blue-700);
}

.notification-state-chip.ready {
  background: rgba(17, 142, 29, 0.14);
  color: var(--green-700);
}

.notification-state-chip.muted {
  background: rgba(91, 109, 126, 0.12);
  color: var(--muted);
}

.notification-item p {
  margin: 0;
  color: var(--muted);
}

.notification-item.tone-warning {
  border-color: rgba(197, 154, 32, 0.35);
  background: rgba(255, 247, 223, 0.92);
}

.notification-item.tone-info {
  border-color: rgba(12, 74, 163, 0.18);
}

.notification-item.tone-info .notification-title {
  color: var(--blue-700);
}

.notification-item.tone-error {
  border-color: rgba(210, 73, 73, 0.28);
  background: rgba(255, 240, 240, 0.92);
}

.notification-item.tone-error .notification-title {
  color: #a02c2c;
}

.notification-item.tone-warning .notification-title {
  color: #8b6516;
}

.notification-item.tone-ready {
  border-color: rgba(17, 142, 29, 0.24);
  background: rgba(239, 249, 241, 0.94);
}

.notification-item.tone-ready .notification-title {
  color: var(--green-700);
}

.notification-item.tone-muted {
  border-color: rgba(91, 109, 126, 0.16);
  background: rgba(247, 249, 251, 0.96);
}

.notification-item.is-complete .notification-title,
.notification-item.tone-muted .notification-title {
  color: var(--muted);
  font-weight: 500;
}

.notification-item.is-complete p,
.notification-item.tone-muted p {
  color: rgba(91, 109, 126, 0.9);
}

/* Broadcast read state */
.notification-item.is-broadcast-read {
  opacity: 0.52;
}
.notification-item.is-broadcast-read .notification-title {
  font-weight: 400;
}
.notification-item .notification-read-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent, #1a6ee0);
  margin-left: 6px;
  vertical-align: middle;
  flex-shrink: 0;
}
.notification-item.is-broadcast-read .notification-read-dot {
  display: none;
}

.geo-map {
  width: 100%;
  min-height: 360px;
  border-radius: 24px;
  overflow: hidden;
  background: var(--surface-page);
  border: 1px solid rgba(16, 32, 52, 0.08);
}

.camera-modal,
.preview-modal,
.app-dialog-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100vw;
  height: 100vh;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(7, 26, 44, 0.6);
  box-sizing: border-box;
}

.camera-sheet {
  width: min(760px, 100%);
  max-height: calc(100vh - 20px);
  display: grid;
  gap: 16px;
  overflow: auto;
  position: relative;
  z-index: 1;
}

.preview-sheet {
  width: min(980px, 100%);
  max-height: calc(100vh - 24px);
  overflow: auto;
}

.app-dialog-modal {
  z-index: 1100;
  align-items: center;
  justify-content: center;
}

.app-dialog-sheet {
  width: min(640px, 100%);
  max-height: calc(100vh - 80px);
  display: grid;
  gap: 16px;
  overflow-y: auto;
  overflow-x: hidden;
  position: relative;
  z-index: 1;
}

.app-dialog-copy {
  margin-top: 0;
}

.app-dialog-form {
  display: grid;
  gap: 16px;
}

.app-dialog-fields {
  margin-top: 2px;
}

.app-dialog-field {
  min-width: 0;
}

/* Section headers for grouped form fields */
.app-dialog-section {
  margin: 24px 0 16px 0;
  padding: 12px 16px;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.05) 0%, rgba(147, 51, 234, 0.05) 100%);
  border-left: 4px solid #3b82f6;
  border-radius: 0 8px 8px 0;
  font-size: 0.95rem;
  font-weight: 700;
  color: #1e3a8a;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.app-dialog-section:first-child {
  margin-top: 0;
}

/* Tab navigation for dialogs */
.app-dialog-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 20px;
  border-bottom: 2px solid rgba(16, 32, 52, 0.08);
  padding-bottom: 2px;
  overflow-x: auto;
}

.app-dialog-tab {
  padding: 10px 16px;
  background: transparent;
  border: none;
  border-radius: 8px 8px 0 0;
  font-size: 0.85rem;
  font-weight: 600;
  color: #64748b;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
  position: relative;
}

.app-dialog-tab:hover {
  color: #3b82f6;
  background: rgba(59, 130, 246, 0.05);
}

.app-dialog-tab.active {
  color: #3b82f6;
  background: rgba(59, 130, 246, 0.1);
}

.app-dialog-tab.active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 0;
  height: 3px;
  background: #3b82f6;
  border-radius: 2px 2px 0 0;
}

/* Tab panels */
.app-dialog-tab-panel {
  display: none;
}

.app-dialog-tab-panel.active {
  display: block;
  animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.dialog-checkbox-group {
  display: grid;
  gap: 10px;
  border: 0;
  padding: 0;
  margin: 0;
  min-width: 0;
}

.dialog-checkbox-group legend {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--ink);
  padding: 0;
}

.dialog-checkbox-list {
  display: grid;
  gap: 10px;
  max-height: 220px;
  overflow-y: auto;
  padding: 12px;
  border-radius: 18px;
  border: 1px solid rgba(16, 32, 52, 0.08);
  background: var(--surface);
}

.dialog-checkbox-list.is-compact {
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.dialog-search-group {
  gap: 12px;
}

.dialog-search-input {
  width: 100%;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(16, 32, 52, 0.12);
  background: rgba(248, 251, 255, 0.9);
  color: var(--ink);
}

.dialog-search-empty {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.dialog-check-option {
  display: flex;
  align-items: center;
  gap: 10px;
  line-height: 1.45;
  color: var(--ink);
  padding: 4px 0;
}

.dialog-check-option input {
  margin-top: 0;
  flex-shrink: 0;
}

.dialog-check-option.hidden {
  display: none;
}

/* Select All styling */
.dialog-check-option.is-select-all {
  background: rgba(16, 128, 80, 0.08);
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid rgba(16, 128, 80, 0.3);
  font-weight: 600;
  margin-bottom: 8px;
}

.dialog-check-option.is-select-all span {
  color: #0d6b4d;
}

/* Driver-only location styling */
.dialog-check-option.is-driver-only {
  background: rgba(255, 193, 7, 0.08);
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px dashed rgba(255, 193, 7, 0.4);
  font-weight: 500;
}

.dialog-check-option.is-driver-only span {
  color: #d68b00;
}

.dialog-help {
  color: var(--muted);
  line-height: 1.5;
}

.app-dialog-actions {
  justify-content: flex-end;
  flex-wrap: wrap;
}

.primary-button.danger {
  background: linear-gradient(135deg, #b23131, #d24949);
}

.video-frame {
  position: relative;
  width: min(100%, 640px);
  margin: 0 auto;
  overflow: hidden;
  min-height: clamp(300px, 52vh, 430px);
  max-height: 60vh;
  aspect-ratio: 4 / 3;
  border-radius: 24px;
  background: #071a2c;
}

.camera-caption,
#cameraModalStatus {
  width: min(100%, 640px);
  margin: 0 auto;
}

.camera-stage-strip {
  width: min(100%, 640px);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  position: relative;
  z-index: 1;
}

.camera-stage {
  display: grid;
  justify-items: center;
  gap: 6px;
  padding: 10px 8px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: var(--surface-page);
  color: var(--muted);
  text-align: center;
}

.camera-stage-index {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: var(--radius);
  font-size: 0.86rem;
  font-weight: 700;
  background: rgba(15, 23, 42, 0.08);
  color: inherit;
}

.camera-stage-label {
  font-size: 0.78rem;
  font-weight: 600;
}

.camera-stage[data-stage-state="active"] {
  border-color: rgba(19, 87, 144, 0.24);
  background: rgba(19, 87, 144, 0.1);
  color: var(--blue-900);
}

.camera-stage[data-stage-state="active"] .camera-stage-index {
  background: rgba(19, 87, 144, 0.18);
}

.camera-stage[data-stage-state="done"] {
  border-color: rgba(22, 125, 78, 0.22);
  background: rgba(22, 125, 78, 0.12);
  color: #15613d;
}

.camera-stage[data-stage-state="done"] .camera-stage-index {
  background: rgba(22, 125, 78, 0.2);
}

.camera-stage[data-stage-state="error"] {
  border-color: rgba(180, 50, 50, 0.24);
  background: rgba(180, 50, 50, 0.1);
  color: #8d1f1f;
}

.camera-stage[data-stage-state="error"] .camera-stage-index {
  background: rgba(180, 50, 50, 0.18);
}

#video,
#overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

#video {
  transform: scaleX(-1);
}

#overlay {
  pointer-events: none;
}

.face-guide {
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(48%, 280px);
  aspect-ratio: 0.78;
  border: 3px solid rgba(255, 255, 255, 0.8);
  border-radius: 50%;
  transform: translate(-50%, -52%);
  box-shadow:
    0 0 0 999px rgba(5, 20, 32, 0.22),
    inset 0 0 0 2px rgba(12, 74, 163, 0.3);
}

/* Mobile optimization untuk face-guide - lebih besar untuk layar handphone */
@media (max-width: 768px) {
  .face-guide {
    width: min(65%, 300px);
    border-width: 4px;
  }
}

/* Portrait mode handphone - lingkaran lebih besar lagi */
@media (max-width: 480px) and (orientation: portrait) {
  .face-guide {
    width: min(70%, 320px);
    border-width: 4px;
  }
}

.face-guide.ready {
  border-color: rgba(19, 136, 110, 0.96);
  box-shadow:
    0 0 0 999px rgba(5, 20, 32, 0.16),
    inset 0 0 0 2px rgba(19, 136, 110, 0.4);
}

.camera-capture-fab {
  position: relative;
  min-width: 210px;
  min-height: 54px;
  padding: 14px 24px;
  border-radius: var(--radius);
  color: white;
  font-weight: 700;
  background: linear-gradient(135deg, var(--gold-700), var(--green-700));
  box-shadow: 0 16px 30px rgba(12, 74, 163, 0.28);
}

.camera-capture-fab:hover {
  transform: translateY(-1px);
}

.camera-actions {
  position: absolute;
  inset: auto 0 18px;
  display: flex;
  justify-content: center;
  padding: 0 18px;
  z-index: 2;
}

/* Location Checking Overlay - Minimalis Dashboard Style */
.location-check-overlay {
  position: absolute;
  inset: 0;
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  border-radius: 16px;
  transition: opacity 0.3s ease;
  padding: 24px;
}

.location-check-content {
  width: 100%;
  max-width: 420px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

/* Ring Spinner */
.location-spinner-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 64px;
  width: 64px;
}

.location-spinner-ring {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid #2563EB;
  border-top-color: transparent;
  animation: location-spin 1s linear infinite;
}

@keyframes location-spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Status Text Section */
.location-status-section {
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.location-status-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #94A3B8;
  margin: 0;
}

.location-status-text {
  font-size: 14px;
  font-weight: 500;
  color: #334155;
  margin: 0;
  line-height: 1.5;
}

/* Metrics Grid - 2 Columns */
.location-metrics-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  width: 100%;
}

/* Metric Card */
.metric-card {
  background: white;
  border: 1px solid #E2E8F0;
  border-radius: 12px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.metric-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #94A3B8;
  display: block;
}

.metric-value {
  font-size: 14px;
  font-weight: 700;
  color: #1E293B;
  display: block;
  margin-top: 2px;
}

.metric-value-loading {
  color: #F59E0B;
  animation: metric-pulse 1.5s ease-in-out infinite;
}

@keyframes metric-pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.6;
  }
}

/* Success state for metric values */
.metric-value-success {
  color: #065f46;
  animation: none;
}

.metric-value-warning {
  color: #92400e;
  animation: none;
}

.video-frame.blur #video {
  filter: blur(8px);
  transition: filter 0.3s ease;
}


.compact-box {
  margin-top: 12px;
}

/* ─── Consinyering Layout (65:35 ratio) ───────────────────────────────────── */
.consinyering-layout {
  display: grid;
  grid-template-columns: 65fr 35fr;
  gap: 20px;
  margin-bottom: 18px;
}

.consinyering-form-card {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.consinyering-form-card label {
  display: grid;
  gap: 8px;
  color: var(--muted);
}

.consinyering-form-card .spaced-top {
  margin-top: 20px;
}

.consinyering-form-card .current-shift-box {
  margin-top: 0;
}

.consinyering-form-card .compact-box {
  margin-top: 24px;
  padding: 16px;
  background: var(--surface-active);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
}

.consinyering-form-card .inline-actions {
  margin-top: 24px;
}

.consinyering-form-card .status-box {
  margin-top: 20px;
}

/* Consinyering Evaluation Fields */
.consinyering-form-card .radio-with-reason {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
}

.consinyering-form-card .radio-options {
  display: flex;
  gap: 16px;
}

.consinyering-form-card .radio-label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  user-select: none;
}

.consinyering-form-card .radio-label input[type="radio"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
}

.consinyering-form-card .radio-label span {
  font-size: 14px;
  color: var(--ink);
}

.consinyering-form-card .reason-textbox {
  flex: 1;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-family: inherit;
  transition: border-color 0.2s ease;
}

.consinyering-form-card .reason-textbox:focus {
  outline: none;
  border-color: var(--primary);
}

.consinyering-form-card .reason-textbox:disabled {
  background-color: var(--surface-disabled);
  color: var(--muted);
  cursor: not-allowed;
}

.consinyering-form-card .reason-textbox:not(:disabled) {
  background-color: var(--surface);
}

.consinyering-form-card textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-family: inherit;
  resize: vertical;
  min-height: 60px;
}

.consinyering-form-card textarea:focus {
  outline: none;
  border-color: var(--primary);
}

.consinyering-result-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.consinyering-result-card label {
  display: grid;
  gap: 8px;
  color: var(--muted);
}

.consinyering-result-card .compact-box {
  flex: 1;
  display: flex;
  align-items: center;
  padding: 16px;
  background: var(--surface-hover);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  line-height: 1.6;
}

.consinyering-result-card .inline-actions {
  margin-top: auto;
}

/* Better spacing for consinyering instruction text */
.consinyering-instruction {
  margin-top: 16px;
  padding: 12px 16px;
  background: var(--surface-hover);
  border-radius: var(--radius-md);
  border-left: 3px solid var(--blue-500);
  line-height: 1.6;
  color: var(--muted);
  font-size: 0.9rem;
}

/* Honorarium summary with stronger visual separation */
.consinyering-honor-summary {
  margin-top: 24px;
  padding: 18px 20px;
  background: linear-gradient(135deg, var(--surface-hover) 0%, var(--surface) 100%);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
}

.consinyering-honor-summary .current-shift-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.consinyering-honor-summary .current-shift-grid > div strong {
  display: block;
  font-size: 0.8rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 4px;
}

.consinyering-honor-summary .current-shift-grid > div p {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--ink);
}

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

.preview-card {
  display: grid;
  gap: 12px;
  padding: 16px;
  border-radius: 20px;
  background: var(--surface-page);
  border: 1px solid var(--line);
}

.preview-image,
.preview-empty {
  width: 100%;
  min-height: 260px;
  border-radius: 18px;
  background: var(--surface-active);
  object-fit: cover;
}

.preview-empty {
  display: grid;
  place-items: center;
  color: var(--muted);
}

.multiline-prewrap {
  white-space: pre-wrap;
  line-height: 1.5;
}

code {
  padding: 2px 6px;
  border-radius: 8px;
  background: var(--surface-active);
}

.hidden {
  display: none !important;
}

body.dialog-open {
  overflow: hidden;
}

/* ─── Login Desktop Layout ─────────────────────────────────────────────────── */
@media (min-width: 1000px) {
  .login-shell {
    grid-template-columns: minmax(360px, 0.78fr) minmax(0, 1.15fr);
  }
  .login-hero { order: 2; }
  .login-panel { order: 1; }
  .login-hero-peek { display: none !important; }
}

/* ─── Login Mobile Hero Collapse ───────────────────────────────────────────── */
@media (max-width: 999px) {
  .login-hero {
    max-height: 0;
    overflow: hidden;
    padding: 0;
    margin: 0;
    border: none;
    opacity: 0;
    box-shadow: none;
    transition: max-height 400ms var(--ease-out-expo), opacity 300ms ease, padding 300ms ease;
  }
  .login-hero.is-expanded {
    max-height: 900px;
    opacity: 1;
    padding: 24px;
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
  }
  .login-hero-peek {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    margin-bottom: 14px;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, rgba(12, 74, 163, 0.08), rgba(17, 142, 29, 0.08));
    border: 1px solid rgba(12, 74, 163, 0.1);
    cursor: pointer;
    transition: background 200ms ease;
  }
  .login-hero-peek:hover {
    background: linear-gradient(135deg, rgba(12, 74, 163, 0.12), rgba(17, 142, 29, 0.12));
  }
  .login-hero-peek-text {
    flex: 1;
    font-size: 0.88rem;
    color: var(--blue-900);
    line-height: 1.4;
  }
  .login-hero-peek-text strong {
    display: block;
    margin-bottom: 2px;
  }
  .login-hero-peek-toggle {
    font-size: 0.78rem;
    color: var(--blue-700);
    font-weight: 600;
    white-space: nowrap;
    transition: transform 200ms ease;
  }
  .login-hero.is-expanded ~ .login-panel .login-hero-peek-toggle,
  .login-hero-peek.is-expanded .login-hero-peek-toggle {
    transform: rotate(180deg);
  }
}

@media (max-width: 1180px) {
  .summary-grid.eight,
  .summary-grid.four,
  .summary-grid.six,
  .summary-grid,
  .grid-2,
  .quick-action-grid,
  .detail-grid,
  .current-shift-grid,
  .preview-grid {
    grid-template-columns: 1fr 1fr;
  }

  .calendar-panel-grid {
    grid-template-columns: 1fr;
  }

  .scheduler-content {
    grid-template-columns: 1fr;
  }

  .scheduler-year-grid {
    grid-template-columns: 1fr;
  }

  .panel-section-rail {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 860px) {
  .summary-grid.eight,
  .summary-grid.four,
  .summary-grid.six,
  .summary-grid,
  .grid-2,
  .detail-grid,
  .current-shift-grid,
  .form-grid,
  .filter-grid,
  .preview-grid,
  .chart-bars,
  .overview-chart-layout {
    grid-template-columns: 1fr;
  }

  .profile-card {
    grid-template-columns: 1fr;
  }

  .profile-detail-sections {
    grid-template-columns: 1fr;
  }

  .detail-grid div.is-wide {
    grid-column: auto;
  }

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

  .calendar-weekday {
    display: none;
  }

  .scheduler-toolbar {
    grid-template-columns: 1fr;
  }

  .scheduler-week-grid {
    grid-template-columns: 1fr;
  }

  /* Consinyering layout becomes single column on mobile */
  .consinyering-layout {
    grid-template-columns: 1fr;
  }

  /* Consinyering mobile optimizations */
  .consinyering-form-card .section-head {
    margin-bottom: 12px;
  }

  .consinyering-form-card .section-head h2 {
    font-size: 1.1rem;
  }

  .consinyering-form-card .section-head .eyebrow {
    font-size: 0.65rem;
    margin-bottom: 6px;
  }

  .consinyering-form-card .current-shift-box {
    padding: 10px 12px;
    margin-top: 12px;
  }

  .consinyering-form-card .current-shift-box .muted {
    font-size: 0.8rem;
    line-height: 1.4;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid var(--line-light);
  }

  .consinyering-form-card .spaced-top {
    margin-top: 12px;
  }

  .consinyering-form-card label {
    font-size: 0.85rem;
  }

  .consinyering-form-card input,
  .consinyering-form-card textarea,
  .consinyering-form-card select {
    padding: 10px 12px;
    font-size: 0.9rem;
  }

  .consinyering-form-card textarea {
    min-height: 80px;
  }

  .consinyering-honor-summary {
    margin-top: 16px;
    padding: 12px 14px;
  }

  .consinyering-honor-summary .current-shift-grid {
    gap: 12px;
  }

  .consinyering-honor-summary .current-shift-grid > div strong {
    font-size: 0.7rem;
  }

  .consinyering-honor-summary .current-shift-grid > div p {
    font-size: 0.95rem;
  }

  .consinyering-form-card .inline-actions {
    margin-top: 16px;
    gap: 8px;
  }

  .consinyering-form-card .inline-actions button {
    padding: 10px 14px;
    font-size: 0.85rem;
  }

  .consinyering-form-card .status-box {
    margin-top: 12px;
    padding: 10px 12px;
    font-size: 0.85rem;
  }

  /* Consinyering result card mobile optimizations */
  .consinyering-result-card .section-head {
    margin-bottom: 12px;
  }

  .consinyering-result-card .section-head h2 {
    font-size: 1.1rem;
  }

  .consinyering-result-card .section-head .eyebrow {
    font-size: 0.65rem;
  }

  .consinyering-result-card label {
    font-size: 0.85rem;
  }

  .consinyering-result-card textarea {
    padding: 10px 12px;
    font-size: 0.9rem;
    min-height: 100px;
  }

  .consinyering-result-card .compact-box {
    padding: 10px 12px;
    font-size: 0.85rem;
    line-height: 1.5;
  }

  .consinyering-result-card .inline-actions {
    margin-top: 12px;
  }

  .consinyering-result-card .inline-actions button {
    padding: 10px 14px;
    font-size: 0.85rem;
    width: 100%;
  }

  /* Export button becomes icon-only on mobile */
  .consinyering-form-card .section-head .icon-label span:last-child {
    display: none;
  }

  .consinyering-form-card .section-head .icon-label {
    padding: 8px;
    min-width: 38px;
    justify-content: center;
  }

  /* Status grid stays 2 columns on mobile */
  .current-shift-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .current-shift-grid > div strong {
    font-size: 0.75rem;
  }

  .current-shift-grid > div p {
    font-size: 0.9rem;
  }

  .scheduler-year-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }

  .scheduler-mini-month {
    padding: 10px 8px;
    gap: 6px;
  }

  .scheduler-mini-month-head {
    font-size: 0.9rem;
  }

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

  .scheduler-month-cells {
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 6px;
  }

  .scheduler-month-grid.is-mobile-compact {
    gap: 6px;
  }

  .scheduler-month-grid.is-mobile-compact .scheduler-day-card {
    min-height: 58px;
    height: 58px;
    padding: 6px 5px 4px;
    gap: 4px;
    border-radius: 12px;
  }

  .scheduler-month-grid.is-mobile-compact .scheduler-day-number {
    font-size: 0.95rem;
    line-height: 1;
  }

  .scheduler-month-grid.is-mobile-compact .scheduler-day-preview {
    min-height: 12px;
    gap: 2px;
    align-content: end;
  }

  .scheduler-content.is-mobile-month .scheduler-view-surface {
    padding: 12px 10px;
  }

  .scheduler-all-day-row,
  .scheduler-hour-row {
    grid-template-columns: 58px minmax(0, 1fr);
    gap: 8px;
    padding: 8px 10px;
  }

  .zoom-banner,
  .topbar,
  .topbar-actions,
  .section-head,
  .inline-actions,
  .section-nav,
  .topbar-brand {
    flex-direction: column;
    align-items: stretch;
  }

  .topbar-actions {
    width: 100%;
  }

  .topbar-actions > * {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 760px) {
  .app-shell {
    width: min(100% - 18px, 1380px);
    padding-top: 18px;
  }

  .login-body {
    padding: 16px;
  }

  .login-hero,
  .login-panel,
  .topbar,
  .card,
  .camera-sheet,
  .preview-sheet {
    padding: 18px;
    border-radius: 22px;
  }

  .video-frame {
    min-height: 56vh;
    width: 100%;
  }

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

  .data-table thead {
    display: none;
  }

  /* report-table di mobile: sembunyikan thead dan ubah ke card layout */
  .report-table thead {
    display: none !important;
  }

  .report-table,
  .report-table tbody {
    display: block !important;
    width: 100% !important;
  }

  .report-table tr {
    display: block !important;
    width: 100% !important;
    margin-bottom: 12px;
    border-radius: 16px;
    background: var(--surface);
    border: 1px solid var(--line);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    padding: 4px 0;
  }

  .report-table td:not([style*="display:none"]):not([style*="display: none"]) {
    display: block !important;
    width: 100% !important;
    padding: 10px 16px;
    border-top: 1px solid var(--line-light);
    box-sizing: border-box;
  }

  .report-table tr td:first-child:not([style*="display:none"]) {
    border-top: none;
    padding-top: 14px;
  }

  .report-table tr td:last-child:not([style*="display:none"]) {
    padding-bottom: 14px;
  }

  .report-table td::before {
    content: attr(data-label);
    display: block;
    color: var(--muted);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.09em;
    font-weight: 700;
    margin-bottom: 4px;
  }

  .report-table td[colspan]::before {
    display: none;
  }

  .report-table th {
    display: none !important;
  }

  .data-table,
  .data-table tbody,
  .data-table tr,
  .data-table td {
    display: block;
    width: 100%;
  }

  .data-table tr {
    margin-bottom: 12px;
    padding: 4px 0;
    border-radius: 16px;
    background: var(--surface);
    border: 1px solid var(--line);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
  }

  .data-table td {
    padding: 10px 16px;
    border-top: 1px solid var(--line-light);
    display: block;
    width: 100%;
    box-sizing: border-box;
  }

  .data-table tr td:first-child {
    border-top: none;
    padding-top: 14px;
  }

  .data-table tr td:last-child {
    padding-bottom: 14px;
  }

  .data-table td > * {
    min-width: 0;
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  .data-table td::before {
    content: attr(data-label);
    display: block;
    color: var(--muted);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.09em;
    font-weight: 700;
    margin-bottom: 4px;
  }

  .data-table td[colspan] {
    display: block;
  }

  .data-table td[colspan]::before {
    display: none;
  }

  /* ── Attendance History Card-Based Mobile Layout ─────────────────────────── */
  #historyTableBody {
    display: block !important;
    width: 100% !important;
    max-width: 100vw !important;
    overflow-x: hidden !important;
  }

  #historyTableBody tr {
    display: flex !important;
    flex-direction: column !important;
    background: var(--surface);
    border-radius: 16px;
    border: 1px solid #f0f0f0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    margin-bottom: 12px;
    overflow: hidden;
    position: relative;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    cursor: pointer;
    max-width: 100vw !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  #historyTableBody tr:active {
    transform: scale(0.98);
    box-shadow: 0 1px 2px rgba(0,0,0,0.04);
  }

  /* Status indicator stripe on left */
  #historyTableBody tr::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--muted);
    border-radius: 16px 0 0 16px;
  }

  #historyTableBody tr.status-danger::before {
    background: #ef4444;
  }

  #historyTableBody tr.status-success::before {
    background: #22c55e;
  }

  #historyTableBody tr.status-warning::before {
    background: #f59e0b;
  }

  #historyTableBody td {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 !important;
    border: none !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
  }

  /* Di mobile: kolom Status terpisah & hidden td tidak perlu tampil */
  #historyTableBody td[data-label="Status"],
  #historyTableBody td[data-label="Masuk / Pulang"],
  #historyTableBody td[data-label="Lokasi"],
  #historyTableBody td[data-label="Target"],
  #historyTableBody td[data-label="Hasil"],
  #historyTableBody td[data-label="Komentar"] {
    display: none !important;
  }

  #historyTableBody td > * {
    max-width: 100% !important;
    overflow-wrap: break-word !important;
    word-break: break-word !important;
    hyphens: auto !important;
  }

  #historyTableBody td::before {
    display: none !important;
  }

  /* Date & Status Header - Date Focused */
  #historyTableBody td[data-label="Tanggal"] {
    display: flex !important;
    flex-direction: row !important;
    justify-content: space-between;
    align-items: flex-start;
    padding: 16px !important;
    padding-left: 24px !important;
    background: transparent;
    border-bottom: none !important;
  }

  /* Di mobile: tampilkan chip status yang ada di dalam td Tanggal */
  .history-status-chip {
    display: inline-flex !important;
  }

  /* Di mobile: history-date-cell menggunakan class baru */
  .history-date-cell {
    display: flex;
    flex-direction: column;
    gap: 2px;
  }

  #historyTableBody td[data-label="Tanggal"] .history-date-cell,
  #historyTableBody td[data-label="Tanggal"] .date-group {
    display: flex;
    flex-direction: column;
    gap: 2px;
  }

  #historyTableBody td[data-label="Tanggal"] .date-day {
    font-size: 24px;
    font-weight: 800;
    color: var(--ink);
    line-height: 1;
  }

  #historyTableBody td[data-label="Tanggal"] .date-month-year {
    font-size: 12px;
    color: var(--muted);
    font-weight: 500;
  }

  #historyTableBody td[data-label="Tanggal"] .date-weekday {
    font-size: 11px;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.5px;
  }

  #historyTableBody td[data-label="Tanggal"] strong {
    display: none;
  }

  #historyTableBody td[data-label="Status"] {
    position: static;
    padding: 0 !important;
    background: none !important;
    border: none !important;
  }

  #historyTableBody td[data-label="Status"] .task-chip {
    font-size: 12px;
    padding: 5px 14px;
    border-radius: 20px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
  }

  #historyTableBody td[data-label="Status"] .task-chip.ready {
    background: #f0fdf4;
    color: #16a34a;
  }

  #historyTableBody td[data-label="Status"] .task-chip.danger {
    background: #fef2f2;
    color: #dc2626;
  }

  #historyTableBody td[data-label="Status"] .task-chip.warning {
    background: #fffbeb;
    color: #d97706;
  }

  /* Divider */
  .card-divider {
    height: 1px;
    background: #f3f4f6;
    margin: 0 16px 12px;
  }

  /* Detail Grid */
  .detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    padding: 0 16px 16px;
    padding-left: 24px;
  }

  .detail-item {
    display: flex;
    flex-direction: column;
    gap: 3px;
  }

  .detail-item.full-width {
    grid-column: 1 / -1;
  }

  .detail-label {
    font-size: 11px;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    font-weight: 500;
  }

  .detail-value {
    font-size: 13px;
    color: var(--ink);
    font-weight: 500;
    max-width: 100%;
    overflow-wrap: break-word;
    word-break: break-word;
    line-height: 1.4;
  }

  .detail-value.muted {
    color: #9ca3af;
    font-style: italic;
  }

  .detail-value.time {
    font-family: 'SF Mono', Monaco, 'Courier New', monospace;
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .detail-value.location {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
    word-break: break-word;
  }

  .location-icon {
    width: 14px;
    height: 14px;
    color: #9ca3af;
  }

  /* Chevron indicator */
  .card-chevron {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #d1d5db;
    font-size: 18px;
    pointer-events: none;
  }

  /* Target/Hasil compact styling */
  #historyTableBody td[data-label="Target"] .task-bullets,
  #historyTableBody td[data-label="Hasil"] .task-result-stack {
    gap: 8px !important;
    margin-top: 4px;
  }

  #historyTableBody td[data-label="Target"] .task-bullets li,
  #historyTableBody td[data-label="Hasil"] .task-result-item {
    padding: 8px 10px !important;
    font-size: 0.8rem !important;
    border-radius: 8px !important;
  }

  /* Location compact styling */
  #historyTableBody td[data-label="Lokasi"] .stacked-lines {
    display: flex !important;
    flex-direction: column !important;
    gap: 6px;
  }

  #historyTableBody td[data-label="Lokasi"] .stacked-lines span {
    font-size: 0.8rem;
    line-height: 1.4;
  }

  #historyTableBody td[data-label="Lokasi"] .icon-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.8rem;
    color: var(--blue-700);
  }

  /* Mobile expand toggle button */
  .mobile-expand-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: calc(100% - 32px);
    margin: 0 16px 12px;
    padding: 10px 16px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    color: #374151;
    cursor: pointer;
    transition: all 0.2s ease;
  }

  .mobile-expand-toggle:hover {
    background: #f3f4f6;
    border-color: #d1d5db;
  }

  .mobile-expand-toggle.expanded {
    background: #eff6ff;
    border-color: #bfdbfe;
    color: #2563eb;
  }

  .mobile-expand-toggle .material-symbols-outlined {
    transition: transform 0.2s ease;
    font-size: 20px;
  }

  .mobile-expand-toggle.expanded .material-symbols-outlined {
    transform: rotate(180deg);
  }

  /* Show hidden content when row is expanded on mobile */
  #historyTableBody tr.mobile-expanded td[data-label="Target"],
  #historyTableBody tr.mobile-expanded td[data-label="Hasil"],
  #historyTableBody tr.mobile-expanded td[data-label="Komentar"] {
    display: block !important;
    padding: 12px 16px !important;
    background: #fafafa !important;
    border-top: 1px solid #e5e7eb !important;
  }

  #historyTableBody tr.mobile-expanded td[data-label="Target"]:empty,
  #historyTableBody tr.mobile-expanded td[data-label="Hasil"]:empty,
  #historyTableBody tr.mobile-expanded td[data-label="Komentar"]:empty {
    display: none !important;
  }

  #workspaceTeamSection .table-pagination {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  #workspaceTeamSection .table-pagination-info {
    text-align: center;
  }

  /* Mobile-friendly pagination for all tables */
  .table-pagination {
    flex-wrap: nowrap;
    padding: 0 4px;
  }

  .table-pagination .ghost-button {
    min-width: 40px;
    width: 40px;
    height: 40px;
    padding: 0;
    border-radius: 8px;
    justify-content: center;
  }

  .table-pagination .ghost-button .material-symbols-outlined {
    margin: 0 !important;
  }

  .table-pagination .ghost-button span:not(.material-symbols-outlined) {
    display: none;
  }

  .table-pagination-info {
    font-size: 0.8rem;
    flex: 1;
    text-align: center;
    padding: 0 8px;
  }

  /* Reset specific overrides for workspace */
  #workspaceTeamSection .table-pagination .ghost-button {
    width: auto;
    min-width: auto;
  }

  #workspaceTeamSection .table-pagination .ghost-button span:not(.material-symbols-outlined) {
    display: inline;
  }

  #workspaceTeamSection .data-table td {
    grid-template-columns: 76px minmax(0, 1fr);
    gap: 10px;
    font-size: 0.94rem;
  }

  #workspaceTeamSection .ghost-button.compact {
    width: 100%;
    justify-content: center;
  }

  #workspaceTeamSection .stacked-lines {
    min-width: 0;
  }

  #workspaceTeamSection .stacked-lines span {
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  #workspaceTeamSection .table-wrapper {
    overflow-x: hidden;
  }

  .table-wrap,
  .table-wrapper {
    overflow-x: visible;
    max-width: 100%;
  }

  /* report-table wrap tidak perlu max-height di mobile, card layout mengatur sendiri */
  .table-wrap:has(.report-table) {
    max-height: none;
    overflow-y: visible;
  }

  /* Ensure attendance history table container stays within viewport */
  #historyTableBody {
    max-width: 100vw !important;
    width: 100% !important;
  }

  #historyTableBody .data-table {
    width: 100% !important;
    max-width: 100vw !important;
  }

  #workspaceTeamSection .data-table td > * {
    min-width: 0;
  }

  #workspaceTeamSection .data-table td strong,
  #workspaceTeamSection .data-table td span,
  #workspaceTeamSection .data-table td p,
  #workspaceTeamSection .data-table td small {
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  #workspaceTeamSection .data-table td::before {
    font-size: 0.72rem;
  }

  .camera-capture-fab {
    min-width: 170px;
    bottom: 12px;
  }

  /* Mobile responsive untuk location overlay */
  .location-check-overlay {
    padding: 16px;
  }

  .location-check-content {
    gap: 20px;
  }

  .location-metrics-grid {
    gap: 10px;
  }

  .metric-card {
    padding: 12px;
  }

  .metric-label {
    font-size: 9px;
  }

  .metric-value {
    font-size: 13px;
  }

  .location-status-text {
    font-size: 13px;
  }
}

@media (max-width: 820px) {
  .app-shell {
    width: min(100% - 14px, 1380px);
    padding-top: 14px;
    padding-bottom: calc(90px + env(safe-area-inset-bottom));
  }

  .panel-page.active {
    padding-bottom: calc(24px + env(safe-area-inset-bottom));
  }

  .widget-scroll {
    padding-right: 3px;
  }

  .widget-scroll.three-cards {
    max-height: 334px;
  }

  .panel-section-rail {
    display: none;
  }

  .quick-action-grid,
  .grid-2,
  .detail-grid,
  .current-shift-grid {
    grid-template-columns: 1fr;
  }

  .topbar {
    flex-direction: row;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
  }

  .topbar-brand {
    flex-direction: row;
    align-items: center;
    min-width: 0;
    flex: 1 1 auto;
  }

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

  .topbar .eyebrow,
  .topbar-subtext {
    display: none;
  }

  .topbar h1 {
    max-width: 100%;
    font-size: 1.02rem;
    line-height: 1.15;
  }

  .topbar-user-label {
    margin-top: 4px;
    padding: 5px 10px;
    font-size: 0.76rem;
    max-width: 100%;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  .brand-logo.small {
    width: 38px;
    height: 38px;
  }

  .topbar-actions {
    width: auto;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: flex-end;
    gap: 4px;
    flex: 0 0 auto;
  }

  .topbar-actions > * {
    width: auto;
  }

  .topbar-actions .icon-label {
    min-width: 42px;
    min-height: 42px;
    width: 42px;
    height: 42px;
    padding: 8px;
    gap: 0;
    border-radius: 12px;
    justify-content: center;
    align-items: center;
    position: relative;
  }

  .topbar-actions .icon-label span:first-child {
    font-size: 1.15rem;
  }

  .topbar-actions .icon-label span:last-child {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
  }

  .section-nav {
    display: none;
  }

  body.ui-mode-stable .section-nav {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding: 0 2px 4px;
    margin: 0 0 12px;
    scroll-snap-type: x proximity;
  }

  body.ui-mode-stable .section-nav::-webkit-scrollbar {
    display: none;
  }

  body.ui-mode-stable .section-nav .nav-button {
    flex: 0 0 auto;
    min-width: max-content;
    white-space: nowrap;
    scroll-snap-align: start;
  }

  .mobile-panel-toolbar {
    position: fixed !important;
    left: 50%;
    right: auto !important;
    top: auto !important;
    bottom: calc(10px + env(safe-area-inset-bottom)) !important;
    transform: translateX(-50%);
    z-index: 18;
    width: min(calc(100% - 18px), 420px);
    display: flex;
    justify-content: flex-end;
    align-items: flex-end;
    margin-bottom: 0;
    padding: 0;
    border-radius: 0;
    background: transparent;
    border: none;
    box-shadow: none;
    backdrop-filter: none;
    pointer-events: none;
    overflow: visible;
  }

  .mobile-menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 16px;
    border-radius: var(--radius);
    border: 1px solid rgba(16, 32, 52, 0.08);
    background: var(--surface);
    color: var(--ink);
    box-shadow: 0 16px 32px rgba(9, 35, 64, 0.18);
    pointer-events: auto;
  }

  .mobile-panel-toolbar.is-open .mobile-menu-toggle {
    background: linear-gradient(135deg, rgba(12, 74, 163, 0.96), rgba(17, 142, 29, 0.92));
    color: white;
  }

  .mobile-panel-toolbar.is-open .mobile-menu-toggle .mobile-menu-toggle-icon {
    background: rgba(255, 255, 255, 0.18);
  }

  .mobile-menu-panel {
    position: absolute;
    left: 0;
    right: 0;
    bottom: calc(100% + 10px);
    width: 100%;
    grid-template-columns: minmax(0, 1fr);
    padding: 12px;
    border-radius: 20px;
    background: var(--surface);
    border: 1px solid rgba(16, 32, 52, 0.08);
    box-shadow: 0 20px 40px rgba(9, 35, 64, 0.18);
    opacity: 0;
    transform: translateY(12px);
    visibility: hidden;
    pointer-events: none;
    transition:
      opacity 160ms ease,
      transform 160ms ease,
      visibility 160ms ease;
  }

  .mobile-panel-toolbar.is-open .mobile-menu-panel {
    opacity: 1;
    transform: translateY(0);
    visibility: visible;
    pointer-events: auto;
  }

  .mobile-nav-control select {
    width: 100%;
    min-width: 0;
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
    padding: 12px 14px;
    border-radius: 16px;
  }

  .mobile-nav-control {
    padding: 2px;
  }

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

  .scheduler-month-grid.is-mobile-compact .scheduler-month-weekdays {
    gap: 6px;
  }

  .scheduler-month-grid.is-mobile-compact .scheduler-month-cells {
    gap: 4px;
    grid-auto-rows: 58px;
  }

  .scheduler-month-grid.is-mobile-compact .scheduler-day-card {
    min-height: 58px;
    height: 58px;
    padding: 6px 5px 4px;
    gap: 3px;
    border-radius: 12px;
    box-shadow: none;
  }

  .scheduler-month-grid.is-mobile-compact .scheduler-day-card.is-empty {
    min-height: 58px;
    height: 58px;
    background: transparent;
    border-color: rgba(16, 32, 52, 0.04);
  }

  .scheduler-month-grid.is-mobile-compact .scheduler-day-number {
    font-size: 0.95rem;
    line-height: 1;
  }

  .scheduler-month-grid.is-mobile-compact .scheduler-day-preview {
    min-height: 10px;
    gap: 2px;
    align-content: end;
  }

  .scheduler-month-grid.is-mobile-compact .scheduler-inline-strip {
    min-height: 3px;
    border-radius: var(--radius);
  }

  .scheduler-month-grid.is-mobile-compact .scheduler-day-more {
    min-height: auto;
    padding: 0;
    background: transparent;
    color: var(--muted);
    font-size: 0.58rem;
    line-height: 1;
    justify-content: flex-start;
  }

  .filter-grid,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .section-head {
    gap: 12px;
  }

  .section-head .inline-actions {
    width: 100%;
    flex-wrap: wrap;
  }

  .section-head .inline-actions > * {
    flex: 1 1 calc(50% - 6px);
    min-width: 0;
    justify-content: center;
  }

  .geo-map {
    min-height: 280px;
  }

  .scroll-target {
    scroll-margin-top: 138px;
  }

  .app-dialog-modal {
    align-items: end;
    padding: 12px;
  }

  .app-dialog-sheet {
    width: 100%;
    max-height: min(82vh, 720px);
    border-radius: 28px 28px 22px 22px;
    padding-bottom: calc(18px + env(safe-area-inset-bottom));
  }

  .app-dialog-actions > * {
    flex: 1 1 calc(50% - 6px);
    justify-content: center;
  }
}

/* ─── Focus-Visible & Accessibility ────────────────────────────────────────── */
:focus-visible {
  outline: 3px solid rgba(12, 74, 163, 0.5);
  outline-offset: 2px;
}

:focus:not(:focus-visible) {
  outline: none;
}

/* ─── Reduced Motion ──────────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ─── Bottom Tab Bar ──────────────────────────────────────────────────────── */
.bottom-tab-bar {
  display: none;
}

.tab-bar-item .tab-icon {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.tab-bar-item.active .tab-icon {
  stroke-width: 2.2;
}

.slide-drawer-backdrop {
  display: none;
}

.slide-drawer {
  display: none;
}

@media (max-width: 820px) {
  .bottom-tab-bar {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 20;
    height: calc(60px + env(safe-area-inset-bottom));
    padding-bottom: env(safe-area-inset-bottom);
    background: var(--surface);
    border-top: 1px solid rgba(16, 32, 52, 0.06);
    box-shadow: 0 -4px 24px rgba(9, 35, 64, 0.06);
    align-items: stretch;
    justify-content: space-around;
  }

  .tab-bar-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    border: none;
    background: none;
    cursor: pointer;
    color: var(--muted);
    font-size: 0.62rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    min-height: 44px;
    min-width: 44px;
    padding: 6px 4px;
    transition: color 200ms ease, transform 150ms ease;
    -webkit-tap-highlight-color: transparent;
    position: relative;
  }

  .tab-bar-item .tab-icon {
    transition: transform 200ms var(--ease-spring);
  }

  .tab-bar-item.active {
    color: var(--blue-700);
  }

  .tab-bar-item.active .tab-icon {
    transform: scale(1.1);
  }

  .tab-bar-item.active::after {
    content: "";
    position: absolute;
    top: 4px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 4px;
    border-radius: var(--radius);
    background: var(--blue-700);
  }

  .tab-bar-item:active {
    transform: scale(0.9);
  }

  .tab-bar-badge {
    position: absolute;
    top: 4px;
    right: calc(50% - 16px);
    min-width: 16px;
    height: 16px;
    display: inline-grid;
    place-items: center;
    padding: 0 4px;
    border-radius: var(--radius);
    background: var(--danger);
    color: white;
    font-size: 0.58rem;
    font-weight: 800;
    line-height: 1;
  }

  /* Popup sub-menu for tab bar items */
  .tab-popup-menu {
    position: fixed;
    z-index: 25;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 -4px 24px rgba(0,0,0,0.15), 0 0 0 1px rgba(0,0,0,0.05);
    padding: 6px;
    min-width: 180px;
    max-width: 260px;
    opacity: 0;
    scale: 0.92;
    transition: opacity 150ms ease, scale 150ms ease;
    transform-origin: bottom left;
  }
  .tab-popup-menu.is-visible { opacity: 1; scale: 1; }
  .tab-popup-menu::after {
    content: "";
    position: absolute;
    bottom: -6px;
    left: var(--arrow-left, 50%);
    transform: translateX(-50%);
    width: 12px;
    height: 6px;
    clip-path: polygon(0 0, 100% 0, 50% 100%);
    background: #fff;
  }
  .tab-popup-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 10px 14px;
    background: none;
    border: none;
    border-radius: 10px;
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--ink, #1e293b);
    cursor: pointer;
    text-align: left;
    transition: background 120ms;
  }
  .tab-popup-item:hover,
  .tab-popup-item:active { background: var(--surface-hover, #f1f5f9); }
  .tab-popup-item .material-symbols-outlined { color: var(--blue-600, #2563eb); }

  .slide-drawer-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 21;
    background: rgba(16, 32, 52, 0.4);
    opacity: 0;
    visibility: hidden;
    transition: opacity 300ms ease, visibility 300ms ease;
    -webkit-tap-highlight-color: transparent;
  }

  .slide-drawer-backdrop.is-open {
    opacity: 1;
    visibility: visible;
  }

  .slide-drawer {
    display: block;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 22;
    max-height: 72vh;
    background: white;
    border-radius: 24px 24px 0 0;
    padding: 12px 18px calc(18px + env(safe-area-inset-bottom));
    box-shadow: 0 -16px 48px rgba(9, 35, 64, 0.16);
    transform: translateY(100%);
    transition: transform 350ms cubic-bezier(0.32, 0.72, 0, 1);
    overflow-y: auto;
    overscroll-behavior: contain;
  }

  .slide-drawer.is-open {
    transform: translateY(0);
  }

  .drawer-handle {
    width: 36px;
    height: 4px;
    border-radius: var(--radius);
    background: rgba(16, 32, 52, 0.16);
    margin: 0 auto 14px;
  }

  .drawer-title {
    font-size: 0.92rem;
    margin-bottom: 14px;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 700;
  }

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

  .drawer-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 14px 8px;
    border-radius: 16px;
    border: none;
    background: var(--surface-active);
    cursor: pointer;
    font-size: 0.76rem;
    font-weight: 600;
    color: var(--ink);
    min-height: 44px;
    transition: background 150ms ease, transform 150ms ease;
    -webkit-tap-highlight-color: transparent;
    text-align: center;
    line-height: 1.3;
  }

  .drawer-item:active {
    transform: scale(0.95);
    background: rgba(12, 74, 163, 0.1);
  }

  .drawer-item.active {
    background: rgba(12, 74, 163, 0.1);
    color: var(--blue-700);
  }

  .drawer-item-icon {
    width: 36px;
    height: 36px;
    display: inline-grid;
    place-items: center;
    border-radius: 12px;
    background: rgba(12, 74, 163, 0.08);
    font-size: 1.05rem;
  }

  .drawer-item.active .drawer-item-icon {
    background: rgba(12, 74, 163, 0.16);
  }

  /* Anchor links in drawer should look the same as buttons */
  a.drawer-item {
    border: none;
    color: var(--ink);
  }
  a.drawer-item:visited {
    color: var(--ink);
  }

  /* Hide legacy mobile toolbar when bottom bar is active */
  body.ui-mode-dev-v2 .mobile-panel-toolbar {
    display: none !important;
  }
}

/* ─── PWA Install Banner ──────────────────────────────────────────────────── */
.pwa-install-banner {
  position: fixed;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  z-index: 19;
  width: min(calc(100% - 24px), 380px);
  padding: 14px 16px;
  border-radius: 18px;
  background: white;
  box-shadow: 0 16px 48px rgba(9, 35, 64, 0.18);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 300ms ease, transform 300ms ease, visibility 300ms ease;
}

@media (max-width: 820px) {
  .pwa-install-banner {
    bottom: calc(70px + env(safe-area-inset-bottom));
  }
}

.pwa-install-banner.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.install-banner-content {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
}

.install-banner-content img {
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
}

.install-banner-content strong {
  display: block;
  font-size: 0.88rem;
}

.install-banner-content p {
  font-size: 0.76rem;
  color: var(--muted);
  margin: 0;
}

.install-banner-actions {
  display: flex;
  gap: 6px;
  flex: 0 0 auto;
}

.install-banner-actions .primary-button.compact {
  min-height: 36px;
  padding: 8px 14px;
  font-size: 0.82rem;
  border-radius: 12px;
}

.install-banner-actions .ghost-button.compact {
  min-height: 36px;
  padding: 8px 12px;
  font-size: 0.82rem;
}

/* ─── Contrast improvements ───────────────────────────────────────────────── */
.login-hero .eyebrow {
  color: rgba(255, 255, 255, 0.86);
}

.topbar .eyebrow {
  color: var(--muted);
}

.topbar-subtext {
  color: var(--muted);
}

/* ─── Approval Hierarchy Panel ──────────────────────────────────────────────── */
.chain-cell {
  max-width: 320px;
  white-space: normal;
  line-height: 1.6;
}

.chain-node {
  display: inline-block;
  background: rgba(12, 74, 163, 0.08);
  color: #0c4aa3;
  border-radius: 4px;
  padding: 1px 7px;
  font-size: 0.78rem;
  font-weight: 500;
  white-space: nowrap;
}

.chain-node.chain-error {
  background: var(--danger-soft, rgba(180, 40, 40, 0.1));
  color: #a02c2c;
}

.chain-arrow {
  display: inline-block;
  margin: 0 3px;
  color: var(--muted, #888);
  font-size: 0.78rem;
}

.chain-empty {
  color: var(--muted, #888);
  font-size: 0.85rem;
}

.badge {
  display: inline-block;
  border-radius: 100px;
  padding: 2px 10px;
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
}

.badge-president  { background: #1a1a2e; color: #fff; }
.badge-director   { background: #1d3557; color: #fff; }
.badge-vice       { background: #457b9d; color: #fff; }
.badge-manager        { background: rgba(12,74,163,0.15); color: #0c4aa3; }
.badge-employee       { background: rgba(0,0,0,0.07); color: #444; }
.badge-field-work     { background: rgba(20,160,80,0.15); color: #0a6b30; }
.badge-consinyering   { background: rgba(255,140,0,0.15); color: #b35900; }
.badge-magang         { background: rgba(140,80,200,0.15); color: #5a1a8c; }

.warning-banner {
  background: var(--warning-soft, rgba(217,177,49,0.18));
  color: #7a5800;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 0.85rem;
  margin-bottom: 8px;
}

.warning-banner.hidden { display: none; }

.pagination-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 0 4px;
  justify-content: center;
}

.pagination-info {
  font-size: 0.82rem;
  color: var(--muted, #888);
}

.small-button {
  font-size: 0.78rem;
  padding: 3px 8px;
}

.text-warning { color: #c07800; }
.muted { color: var(--muted, #888); }

/* ── Report period summary bar ─────────────────────────────────────────── */
.report-period-summary {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  padding: 10px 14px;
  background: var(--surface-active);
  border-radius: 10px;
  margin-bottom: 12px;
  border: 1px solid var(--line);
}
.summary-stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 90px;
}
.summary-label {
  font-size: 0.72rem;
  color: var(--muted, #6b7a93);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.summary-stat strong {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text);
}
tr.clickable-row { cursor: pointer; }
tr.clickable-row:hover td { background: var(--hover-bg, rgba(0,0,0,0.03)); }

/* Highlight effect for scrolling to approval item */
tr.highlight-row {
  animation: highlightPulse 2s ease-in-out;
}

@keyframes highlightPulse {
  0% {
    background-color: rgba(255, 215, 0, 0.3);
  }
  50% {
    background-color: rgba(255, 215, 0, 0.5);
  }
  100% {
    background-color: transparent;
  }
}

.select-compact {
  font-size: 0.82rem;
  padding: 0.3rem 0.6rem;
  border-radius: 6px;
  border: 1px solid var(--border, #ddd);
  background: var(--card-bg, #fff);
}

/* ── Attendance Hero ── */
.att-hero {
  background: linear-gradient(135deg, var(--blue-900) 0%, var(--blue-700) 100%);
  color: #fff;
  border: none;
}
.att-hero-layout {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
}
.att-hero-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 200px;
}
.att-clock {
  font-size: 3rem;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -1px;
  font-variant-numeric: tabular-nums;
}
.att-date {
  font-size: 0.95rem;
  opacity: 0.85;
  margin-bottom: 8px;
}
.att-status-badges {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.att-status-badges .status-flag {
  font-size: 0.82rem;
  padding: 2px 0;
  border: none;
  background: none;
}
.att-schedule-info {
  margin-top: 4px;
}
.att-schedule-info .muted {
  color: rgba(255,255,255,0.7);
  font-size: 0.85rem;
}
.att-hero-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.att-buttons-wrapper {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.att-buttons-row {
  display: flex;
  gap: 8px;
}
.att-buttons-wrapper .status-box {
  width: 100%;
  margin: 0;
  font-weight: 500;
}
.att-buttons-wrapper .status-box .status-text {
  color: inherit;
}
.att-buttons-wrapper .status-box .warning-dot {
  background-color: rgba(255, 255, 255, 0.8) !important;
}
.att-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  border: none;
  border-radius: 12px;
  font-size: 1.05rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
  min-width: 160px;
  justify-content: center;
}
.att-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.25);
}
.att-btn:active {
  transform: translateY(0);
}
.att-btn-in {
  background: var(--green-600);
  color: #fff;
}
.att-btn-out {
  background: rgba(255,255,255,0.15);
  color: #fff;
  border: 1.5px solid rgba(255,255,255,0.4);
  backdrop-filter: blur(4px);
}
.att-btn-out:hover {
  background: rgba(255,255,255,0.25);
}
.att-btn .material-symbols-outlined {
  font-size: 22px;
}
.att-status-msg {
  /* Kept for backward compatibility, but now using status-box.warning instead */
  display: none;
}
.att-zoom-compact {
  padding: 12px 20px;
}
.att-zoom-compact .zoom-banner {
  padding: 0;
  margin: 0;
  border: none;
  background: none;
}
.att-zoom-compact .status-box {
  margin-top: 8px;
  font-size: 0.82rem;
}
.att-readiness-details {
  cursor: pointer;
}
.att-readiness-summary {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--muted);
  list-style: none;
  padding: 4px 0;
}
.att-readiness-summary::-webkit-details-marker {
  display: none;
}
.att-readiness-summary::after {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  border-right: 1.5px solid var(--muted);
  border-bottom: 1.5px solid var(--muted);
  transform: rotate(-45deg);
  transition: transform 0.2s;
  margin-left: auto;
}
.att-readiness-details[open] .att-readiness-summary::after {
  transform: rotate(45deg);
}
.att-btn-active {
  background: #dc3545;
  border-color: #dc3545;
  animation: att-pulse 2s infinite;
}
@keyframes att-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(220,53,69,0.4); }
  50% { box-shadow: 0 0 0 8px rgba(220,53,69,0); }
}
@media (max-width: 768px) {
  .att-hero-layout {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
  }
  .att-hero-actions {
    justify-content: center;
  }
  .att-clock {
    font-size: 2.4rem;
  }
  .att-status-badges {
    justify-content: center;
  }
  .att-btn {
    flex: 1;
    min-width: 130px;
  }
}

/* Modern SweetAlert Modal Styling */
.swal2-modal-modern {
  padding: 0 !important;
  border-radius: 12px !important;
}

.swal2-modal-modern .swal2-html-container {
  padding: 24px !important;
}

.swal2-actions-modern {
  padding: 0 24px 24px 24px !important;
  justify-content: flex-end !important;
  gap: 8px !important;
}

.swal2-actions-modern .swal2-confirm {
  padding: 10px 20px !important;
  font-size: 14px !important;
  font-weight: 500 !important;
  border-radius: 6px !important;
}

.swal2-actions-modern .swal2-cancel {
  padding: 10px 20px !important;
  font-size: 14px !important;
  font-weight: 500 !important;
  border-radius: 6px !important;
  border: 1px solid #d1d5db !important;
  background: white !important;
  color: #374151 !important;
}

.swal2-actions-modern .swal2-cancel:hover {
  background: #f9fafb !important;
}

/* Pending Verification Status Box */
.pending-verification {
  background: rgba(245, 158, 11, 0.1) !important;
  border: 1px solid rgba(245, 158, 11, 0.2) !important;
  border-radius: 8px !important;
  padding: 12px 16px !important;
  display: flex !important;
  align-items: flex-start !important;
  gap: 12px !important;
  width: 100% !important;
}

.pending-verification .spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(245, 158, 11, 0.4);
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  flex-shrink: 0;
  margin-top: 2px;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.pending-verification .message {
  flex: 1;
  font-size: 13px;
  color: #ffffff;
  line-height: 1.5;
  text-align: left;
}

/* Approval Progress Steps */
.approval-progress-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 8px 0;
  min-width: 200px;
}

.approval-progress-step {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 12px;
  background: rgba(0, 0, 0, 0.03);
  border: 1px solid rgba(0, 0, 0, 0.08);
}

.approval-progress-step.step-approved {
  background: rgba(34, 197, 94, 0.08);
  border-color: rgba(34, 197, 94, 0.2);
}

.approval-progress-step.step-pending {
  background: rgba(245, 158, 11, 0.08);
  border-color: rgba(245, 158, 11, 0.2);
}

.approval-progress-step.step-rejected {
  background: rgba(239, 68, 68, 0.08);
  border-color: rgba(239, 68, 68, 0.2);
}

.approval-progress-step.step-skipped {
  background: rgba(156, 163, 175, 0.08);
  border-color: rgba(156, 163, 175, 0.2);
  opacity: 0.6;
}

.approval-step-number {
  font-weight: 600;
  font-size: 11px;
  color: #6b7280;
  min-width: 50px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.approval-step-name {
  flex: 1;
  font-weight: 500;
  color: #374151;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.approval-step-badge {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 500;
  white-space: nowrap;
}

.approval-step-badge.badge-pending {
  background: rgba(245, 158, 11, 0.15);
  color: #b45309;
}

.approval-step-badge.badge-approved {
  background: rgba(34, 197, 94, 0.15);
  color: #047857;
}

.approval-step-badge.badge-rejected {
  background: rgba(239, 68, 68, 0.15);
  color: #b91c1c;
}

.approval-step-badge.badge-skipped {
  background: rgba(156, 163, 175, 0.15);
  color: #4b5563;
}

.approval-step-badge .material-symbols-outlined {
  font-size: 14px;
}

/* ─── Consinyering Evaluation Detail Modal ────────────────────────────────── */
.consinyering-eval-details {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.eval-detail-item {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Employee header */
.eval-employee-header {
  display: flex;
  align-items: center;
  gap: 12px;
}

.eval-employee-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0c4aa3, #169a2e);
  color: #fff;
  font-weight: 700;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.eval-employee-name {
  display: block;
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.3;
}

.eval-employee-meta {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}

/* Info grid */
.eval-info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.eval-info-cell {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 12px;
  background: var(--surface-hover, #f9fafb);
  border-radius: 8px;
  border: 1px solid rgba(16, 32, 52, 0.06);
}

.eval-info-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--muted);
}

.eval-info-value {
  font-size: 13px;
  font-weight: 500;
  color: var(--ink);
}

.eval-nominal {
  font-weight: 700;
  color: #0c4aa3;
}

/* Evaluation section */
.eval-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px;
  background: #f8faff;
  border: 1px solid rgba(12, 74, 163, 0.1);
  border-radius: 10px;
}

.eval-section-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: #0c4aa3;
}

.eval-section-title .material-symbols-outlined {
  font-size: 16px;
}

/* Urgency box */
.eval-urgency-box {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 10px 12px;
  background: #fffbeb;
  border: 1px solid #f59e0b;
  border-radius: 8px;
}

/* Criteria list */
.eval-criteria-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.eval-criterion-row {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto auto;
  align-items: center;
  gap: 4px 8px;
  padding: 8px 10px;
  background: #fff;
  border: 1px solid rgba(16, 32, 52, 0.07);
  border-radius: 8px;
}

.eval-criterion-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink);
}

.eval-criterion-icon {
  font-size: 15px;
  color: var(--muted);
  flex-shrink: 0;
}

.eval-criterion-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

.eval-criterion-reason {
  grid-column: 1 / -1;
  margin: 0;
  font-size: 12px;
  color: var(--muted);
  padding-left: 21px;
  line-height: 1.5;
}

/* Empty state */
.eval-empty-state {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px;
  background: #fffbeb;
  border: 1px solid #f59e0b;
  border-radius: 10px;
}

.eval-empty-state strong {
  display: block;
  font-size: 13px;
  color: #92400e;
  margin-bottom: 4px;
}

.eval-empty-state p {
  margin: 0;
  font-size: 12px;
  color: #78350f;
  line-height: 1.5;
}
