:root {
  --bg-overlay: rgba(18, 40, 26, 0.6);
  --emerald-100: #dff1e4;
  --emerald-200: #b9e3cb;
  --emerald-400: #4dd38d;
  --emerald-500: #2fcd7c;
  --emerald-600: #219e60;
  --emerald-700: #176b40;
  --forest-900: #0f1f19;
  --panel: rgba(255, 255, 255, 0.88);
  --panel-strong: rgba(255, 255, 255, 0.95);
  --panel-border: rgba(255, 255, 255, 0.4);
  --text: #103020;
  --text-soft: rgba(16, 48, 32, 0.72);
  --link: #176b40;
  --shadow: 0 24px 48px -30px rgba(8, 28, 17, 0.8);
  --radius-lg: 22px;
  --radius-md: 16px;
  --radius-sm: 12px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  color: var(--text);
  min-height: 100vh;
}

.background-filter {
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(var(--bg-overlay), rgba(10, 30, 18, 0.65)),
    url("https://images.unsplash.com/photo-1505691938895-1758d7feb511?auto=format&fit=crop&w=1600&q=80");
  background-size: cover;
  background-position: center;
  z-index: -2;
  filter: saturate(1.1);
}

.background-filter::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
}

.auth-body .background-filter::after {
  opacity: 0.22;
  background: url("../img/company-logo.svg") no-repeat center calc(45% - 60px);
  background-size: min(380px, 55vw);
  filter: blur(0.6px);
  mix-blend-mode: screen;
}

.dashboard-body .background-filter::after {
  opacity: 0.18;
  background: url("../img/company-logo.svg") no-repeat 78% 72%;
  background-size: clamp(260px, 32vw, 420px);
  filter: blur(0.8px);
  mix-blend-mode: screen;
  transform: scale(1.08);
}

.layout {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  backdrop-filter: blur(12px);
}

.top-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 48px;
  position: sticky;
  top: 0;
  z-index: 20;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0.8));
  border-bottom: 1px solid rgba(255, 255, 255, 0.4);
  backdrop-filter: blur(16px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-mark {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--emerald-500), var(--emerald-700));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  font-size: 18px;
  box-shadow: 0 16px 30px -20px rgba(0, 0, 0, 0.6);
}

.brand-copy span {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 0.4px;
}

.brand-copy small {
  display: block;
  font-size: 12px;
  color: var(--text-soft);
  letter-spacing: 1px;
  text-transform: uppercase;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 18px;
}

.user-chip {
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(47, 205, 124, 0.16);
  color: var(--emerald-700);
  font-weight: 600;
  font-size: 13px;
}

.nav-link {
  color: var(--link);
  text-decoration: none;
  font-weight: 600;
  letter-spacing: 0.3px;
  font-size: 14px;
}

.nav-link.logout {
  color: #c62828;
}

.nav-link:hover {
  text-decoration: underline;
}

.content-area {
  flex: 1;
  padding: 48px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.card,
.page-header-card,
.hero-card,
.auth-card {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 32px;
  backdrop-filter: blur(14px);
}

.dashboard-body .card,
.dashboard-body .hero-card {
  padding: 12px;
}

.dashboard-body .hero-card {
  max-width: 420px;
}

.dashboard-body .card h2 {
  font-size: 16px;
}

.dashboard-body .hero-card h1 {
  font-size: 20px;
  margin-bottom: 6px;
}

.dashboard-body .hero-card p {
  font-size: 12px;
  margin-bottom: 14px;
}

.page-header-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
}

.page-header-card h1 {
  margin: 0;
  font-size: 28px;
  font-weight: 700;
}

.page-header-card p {
  margin: 8px 0 0;
  color: var(--text-soft);
  max-width: 520px;
}

.hero-card {
  max-width: 640px;
  text-align: left;
}

.hero-card h1 {
  margin: 0 0 12px;
  font-size: 34px;
}

.hero-card p {
  margin: 0 0 28px;
  color: var(--text-soft);
  font-size: 16px;
  line-height: 1.6;
}

.hero-actions {
  display: flex;
  gap: 16px;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

@media (min-width: 1200px) {
  .dashboard-grid.metrics-grid,
  .dashboard-grid.bubble-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

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

.chart-card canvas {
  width: 100%;
  max-width: 100%;
}

.card-toolbar {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 8px;
}

.icon-button {
  border: none;
  background: rgba(15, 63, 42, 0.08);
  border-radius: 6px;
  padding: 6px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
}

.icon-button:hover {
  background: rgba(15, 63, 42, 0.15);
}

.icon-button svg {
  width: 18px;
  height: 18px;
  fill: var(--emerald-700);
}

.card.is-capturing .card-download {
  visibility: hidden;
}

.chart-card__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  flex-wrap: wrap;
}

.stat-chip {
  background: rgba(47, 205, 124, 0.16);
  color: var(--emerald-800);
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.stat-chip strong {
  font-size: 18px;
  color: var(--emerald-900);
}

.eyebrow-label {
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 12px;
  color: var(--emerald-700);
  margin: 0 0 4px;
}

.chart-subtitle {
  margin: 4px 0 0;
  color: var(--text-soft);
  font-size: 13px;
}

.chart-note {
  margin: 0;
  font-size: 13px;
  color: var(--text-soft);
}

.mini-list {
  list-style: none;
  padding: 0;
  margin: 16px 0 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mini-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  font-size: 14px;
  color: var(--text-soft);
}

.mini-list strong {
  color: var(--text-strong);
}

.mini-list span {
  color: var(--text-soft);
}

.mini-count {
  font-weight: 600;
  color: var(--emerald-700);
}

.leave-card .table-wrapper {
  margin-top: 16px;
}

.wide-chart {
  width: 100%;
}

.compact-table .report-table th,
.compact-table .report-table td {
  padding: 10px 12px;
  font-size: 13px;
}

.card {
  background: var(--panel-strong);
}

.date-switcher {
  display: flex;
  align-items: center;
  gap: 12px;
}

.date-switcher label {
  font-weight: 600;
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: 1px;
  color: var(--emerald-700);
}

.date-switcher input[type="date"] {
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: var(--radius-sm);
  padding: 10px 16px;
  font-size: 14px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--forest-900);
}

.attendance-card {
  padding: 0;
  overflow: hidden;
}

.attendance-form {
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.attendance-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
}

.attendance-toolbar .toolbar-save {
  min-width: 180px;
}

.attendance-toolbar .employee-filter {
  margin-left: auto;
}

.holiday-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  color: var(--emerald-800);
  cursor: pointer;
  white-space: nowrap;
}

.holiday-toggle input {
  width: 18px;
  height: 18px;
  accent-color: var(--emerald-600);
}

.holiday-toggle.disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.employee-filter {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 220px;
}

.employee-filter label {
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: 0.6px;
  font-weight: 600;
  color: var(--emerald-700);
}

.employee-filter select {
  border: 1px solid rgba(23, 107, 64, 0.18);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.96);
  color: var(--forest-900);
}

.employee-filter select:focus {
  outline: none;
  border-color: var(--emerald-500);
  box-shadow: 0 0 0 3px rgba(47, 205, 124, 0.24);
}

.holiday-banner {
  padding: 20px 32px;
  background: linear-gradient(90deg, rgba(47, 205, 124, 0.18), rgba(47, 205, 124, 0.04));
  border-bottom: 1px solid rgba(47, 205, 124, 0.2);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.holiday-banner strong {
  color: var(--emerald-800);
  font-size: 16px;
}

.holiday-banner span {
  color: var(--forest-900);
  font-size: 14px;
}

.holiday-banner .holiday-meta {
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 500;
}

.attendance-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 14px;
}

.attendance-table thead th {
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: 0.7px;
  font-weight: 600;
  color: var(--text-soft);
  text-align: center;
  padding-bottom: 12px;
}

.attendance-table thead th.left {
  text-align: left;
}

.attendance-table tbody tr {
  background: rgba(255, 255, 255, 0.82);
  border-radius: var(--radius-md);
  box-shadow: 0 16px 32px -28px rgba(0, 0, 0, 0.45);
}

.attendance-table tbody td {
  padding: 18px 20px;
  text-align: center;
}

.attendance-table tbody tr td:first-child {
  border-radius: var(--radius-md) 0 0 var(--radius-md);
}

.attendance-table tbody tr td:last-child {
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

.attendance-table tbody tr.hidden {
  display: none;
}

body.attendance-holiday-active .attendance-table tbody tr {
  opacity: 0.6;
}

.employee-cell {
  display: flex;
  align-items: center;
  gap: 16px;
  text-align: left;
}

.avatar {
  width: 46px;
  height: 46px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--emerald-500), var(--emerald-700));
  color: #fff;
  font-weight: 700;
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 18px 28px -16px rgba(47, 205, 124, 0.6);
}

.employee-name {
  font-weight: 600;
  font-size: 16px;
}

.employee-id {
  font-size: 12px;
  letter-spacing: 0.8px;
  color: var(--text-soft);
}

.project-select,
.overtime-field,
.overtime-period-select,
.remarks-field,
.multi-select,
.auth-form input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid rgba(23, 107, 64, 0.18);
  border-radius: var(--radius-sm);
  font-size: 14px;
  background: rgba(255, 255, 255, 0.96);
  color: var(--forest-900);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.project-select {
  min-width: 200px;
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--emerald-500) 50%),
    linear-gradient(135deg, var(--emerald-500) 50%, transparent 50%);
  background-position: calc(100% - 18px) calc(50% - 4px),
    calc(100% - 12px) calc(50% - 4px);
  background-size: 7px 7px, 7px 7px;
  background-repeat: no-repeat;
}

.project-select[multiple] {
  min-height: 160px;
  padding-right: 12px;
  background-image: none;
  overflow-y: auto;
}

.project-selected-label {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  color: var(--text-soft);
}

.project-select:focus,
.overtime-field:focus,
.overtime-period-select:focus,
.remarks-field:focus,
.auth-form input:focus,
.multi-select:focus {
  outline: none;
  border-color: var(--emerald-500);
  box-shadow: 0 0 0 3px rgba(47, 205, 124, 0.24);
}

.field-error {
  border-color: #d14343 !important;
  box-shadow: 0 0 0 3px rgba(209, 67, 67, 0.18) !important;
}

.auth-form .remember-row {
  display: inline-flex;
  align-self: flex-start;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  margin: 10px 0 14px;
  user-select: none;
  white-space: nowrap;
}

.auth-form .remember-row input {
  width: 18px;
  height: 18px;
  margin: 0;
}

.remarks-field {
  min-width: 260px;
}

.toggle {
  position: relative;
  display: inline-flex;
  width: 58px;
  height: 30px;
}

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

.slider {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: rgba(151, 182, 162, 0.6);
  transition: background 0.2s ease;
}

.slider::before {
  content: "";
  position: absolute;
  height: 24px;
  width: 24px;
  left: 4px;
  top: 3px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 6px 12px -6px rgba(23, 107, 64, 0.4);
  transition: transform 0.2s ease;
}

.toggle input:checked + .slider {
  background: linear-gradient(135deg, var(--emerald-500), var(--emerald-600));
}

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

.toggle.disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 16px;
}

.primary-button,
.secondary-button {
  border: none;
  border-radius: 999px;
  padding: 12px 28px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.1s ease, box-shadow 0.2s ease, background 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.primary-button {
  background: linear-gradient(135deg, var(--emerald-500), var(--emerald-600));
  color: #fff;
  box-shadow: 0 16px 30px -18px rgba(47, 205, 124, 0.7);
}

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

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

.primary-button.ghost {
  background: rgba(47, 205, 124, 0.16);
  color: var(--emerald-700);
  box-shadow: none;
}

.secondary-button {
  background: rgba(255, 255, 255, 0.9);
  color: var(--emerald-700);
  border: 1px solid rgba(47, 205, 124, 0.4);
}

.secondary-button:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 1);
}

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

.primary-button[disabled],
.secondary-button[disabled] {
  opacity: 0.55;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

.form-note {
  margin-top: 12px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  letter-spacing: 0.3px;
}

.form-note.info {
  background: rgba(47, 205, 124, 0.12);
  color: var(--emerald-700);
  border: 1px solid rgba(47, 205, 124, 0.24);
}

.form-note.warning {
  background: rgba(255, 193, 7, 0.16);
  color: #8c6d00;
  border: 1px solid rgba(255, 193, 7, 0.3);
}

.primary-button.stretch {
  width: 100%;
  justify-content: center;
}

.reports-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 32px;
}

.report-panel {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.report-header h2 {
  margin: 0;
  font-size: 22px;
}

.report-header p {
  margin: 6px 0 0;
  color: var(--text-soft);
  font-size: 14px;
}

.filter-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  align-items: end;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.filter-group label {
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--emerald-700);
}

.multi-select {
  min-height: 180px;
}

.table-wrapper {
  border: 1px solid rgba(47, 205, 124, 0.14);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.report-table {
  width: 100%;
  border-collapse: collapse;
  background: rgba(255, 255, 255, 0.96);
}

.report-table thead {
  background: rgba(47, 205, 124, 0.12);
}

.report-table th,
.report-table td {
  padding: 14px 16px;
  text-align: left;
  font-size: 14px;
  border-bottom: 1px solid rgba(23, 107, 64, 0.06);
}

.report-table tbody tr:last-child td {
  border-bottom: none;
}

.report-table tbody tr:hover {
  background: rgba(47, 205, 124, 0.08);
}

.report-table tbody tr.subtotal {
  background: rgba(47, 205, 124, 0.12);
  font-weight: 600;
}

.report-table tbody tr.subtotal td {
    border-bottom-color: rgba(47, 205, 124, 0.24);
}

.assignment-table .assignment-employees {
  width: 50%;
  max-width: 50%;
}

.assignment-table td.assignment-employees {
  white-space: normal;
}

.assignment-table td.assignment-employees .pill {
  white-space: nowrap;
}

.report-summary {
  margin: 24px 0 16px;
}

.report-intro {
  margin-top: 8px;
}

.pivot-table .day-header,
.pivot-table .day-cell {
  text-align: center;
}

.pivot-table .leave-count,
.pivot-table .present-count {
  text-align: right;
  font-weight: 600;
}

.pivot-table .leave-count {
  color: #c2410c;
}

.pivot-table .present-count {
  color: var(--emerald-700);
}

.pivot-table .holiday-col,
.pivot-table .holiday-cell {
  background: rgba(255, 205, 86, 0.15);
  color: var(--text-soft);
}

.pivot-table .present-cell {
  font-weight: 600;
  color: var(--emerald-700);
}

.pivot-table .leave-cell {
  color: #c2410c;
  font-weight: 600;
}

.pivot-table .blank-cell {
  color: transparent;
}

.pivot-table .holiday-marker {
  color: var(--emerald-700);
}

.pivot-table .half-day-cell {
  color: #f59e0b;
  font-weight: 600;
}

.pivot-table .manual-holiday-cell {
  position: relative;
}

.pivot-table .manual-holiday-cell::after {
  content: "";
  position: absolute;
  inset: 4px;
  border: 1px dashed rgba(255, 205, 86, 0.5);
  border-radius: 6px;
  pointer-events: none;
}

.pivot-table .future-col,
.pivot-table .future-cell {
  background: rgba(226, 232, 240, 0.3);
  color: rgba(37, 47, 63, 0.45);
}

.pivot-table .future-cell {
  font-style: italic;
}

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

.section-heading h2 {
  margin: 0;
}

.section-heading p {
  margin: 0;
  color: var(--text-soft);
}

.discreet-count {
  font-size: 14px;
  font-weight: 600;
  color: var(--emerald-700);
}

.flat-table thead th {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--emerald-700);
}

.flat-table td {
  vertical-align: top;
  font-size: 15px;
  line-height: 1.5;
}

.snapshot-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.filter-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}

.snapshot-exclude select {
  min-height: 140px;
}

.helper-text {
  font-size: 12px;
  color: var(--text-soft);
}

.snapshot-card {
  border: 1px solid rgba(47, 205, 124, 0.2);
  border-radius: var(--radius-md);
  padding: 20px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 18px 40px -32px rgba(15, 31, 25, 0.7);
  margin-top: 20px;
  font-size: 16px;
}

.snapshot-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.snapshot-card__header h3 {
  margin: 0;
}

.snapshot-card__header p {
  margin: 0;
  color: var(--text-soft);
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.tag.warning {
  background: rgba(255, 193, 7, 0.18);
  color: #8c6d00;
}

.tag.info {
  background: rgba(47, 205, 124, 0.18);
  color: var(--emerald-700);
}

.snapshot-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 16px;
}

.pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  background: rgba(47, 205, 124, 0.18);
  border-radius: 999px;
  font-size: 13px;
  margin: 4px 6px 0 0;
}

.assignment-table th.assignment-employees,
.assignment-table td.assignment-employees {
  width: 220px;
  max-width: 220px;
  white-space: normal;
}

.assignment-table td.assignment-employees {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  word-break: break-word;
}

.snapshot-company {
  margin-left: auto;
  font-weight: 700;
  color: var(--emerald-800);
  font-size: 14px;
}

.report-summary h2 {
  margin-bottom: 8px;
  font-size: 20px;
  color: var(--text-strong);
}

.report-summary p {
  margin: 4px 0;
  color: var(--text-soft);
}

.report-summary p strong {
  color: var(--text-strong);
}

  .cell-heading {
    font-weight: 600;
}

.cell-sub {
  font-size: 12px;
  color: var(--text-soft);
  margin-top: 2px;
}

.download-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.tab-nav {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.tab-link {
  padding: 10px 20px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(47, 205, 124, 0.2);
  color: var(--emerald-700);
  font-weight: 600;
  text-decoration: none;
  transition: background 0.2s ease, box-shadow 0.2s ease, color 0.2s ease;
}

.tab-link:hover {
  box-shadow: 0 12px 24px -20px rgba(47, 205, 124, 0.7);
}

.tab-link.active {
  background: linear-gradient(135deg, var(--emerald-500), var(--emerald-600));
  color: #fff;
  border-color: rgba(47, 205, 124, 0.35);
  box-shadow: 0 16px 32px -22px rgba(47, 205, 124, 0.7);
}

.admin-card {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.admin-section {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.admin-section-header h2 {
  margin: 0;
  font-size: 22px;
}

.admin-section-header p {
  margin: 6px 0 0;
  color: var(--text-soft);
}

.admin-list {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.admin-row,
.admin-add-row,
.bulk-upload {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(23, 107, 64, 0.12);
  border-radius: var(--radius-md);
  box-shadow: 0 16px 32px -29px rgba(16, 48, 32, 0.45);
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.admin-add-row,
.bulk-upload {
  border-style: dashed;
  background: rgba(255, 255, 255, 0.86);
}

.admin-row-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
}

.field label {
  display: block;
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--emerald-700);
  margin-bottom: 6px;
}

.field input,
.field select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid rgba(23, 107, 64, 0.18);
  border-radius: var(--radius-sm);
  font-size: 14px;
  background: rgba(255, 255, 255, 0.96);
  color: var(--forest-900);
}

.field input:focus,
.field select:focus {
  outline: none;
  border-color: var(--emerald-500);
  box-shadow: 0 0 0 3px rgba(47, 205, 124, 0.24);
}

.readonly-input {
  background: rgba(47, 205, 124, 0.08);
  border: 1px dashed rgba(47, 205, 124, 0.35);
  color: var(--emerald-800);
  font-weight: 600;
  cursor: default;
}

.readonly-input:focus {
  outline: none;
  box-shadow: none;
  border-color: rgba(47, 205, 124, 0.35);
}

.field-note {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  color: var(--text-soft);
}

.field.wide {
  grid-column: span 2;
}

.field.readonly .readonly-chip {
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  background: rgba(47, 205, 124, 0.12);
  color: var(--emerald-700);
  font-weight: 600;
}

.field.checkbox-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  justify-content: flex-end;
}

.readonly {
  pointer-events: none;
}

.admin-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.link-button {
  border: none;
  background: none;
  color: var(--emerald-700);
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
  padding: 8px 12px;
}

.link-button.danger {
  color: #c62828;
}

.bulk-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.bulk-row input[type="file"] {
  flex: 1;
  min-width: 220px;
}

.save-toast {
  position: fixed;
  top: 24px;
  right: 24px;
  width: min(320px, calc(100% - 48px));
  background: var(--panel-strong);
  border: 1px solid rgba(47, 205, 124, 0.3);
  border-radius: var(--radius-md);
  box-shadow: 0 24px 45px -24px rgba(16, 48, 32, 0.55);
  padding: 18px 20px;
  opacity: 0;
  transform: translateY(-12px);
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
  z-index: 160;
}

.save-toast.show {
  pointer-events: auto;
}

.save-toast.visible {
  opacity: 1;
  transform: translateY(0);
}

.save-toast__content {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.save-toast__content strong {
  display: block;
  color: var(--emerald-800);
  font-size: 15px;
}

.save-toast__content span {
  display: block;
  font-size: 13px;
  color: var(--text-soft);
  margin-top: 4px;
}

.save-toast__dismiss {
  border: none;
  background: none;
  color: var(--emerald-700);
  font-weight: 600;
  cursor: pointer;
  padding: 6px 8px;
}

.save-toast__dismiss:hover {
  text-decoration: underline;
}

.flash-stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.flash {
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(198, 40, 40, 0.2);
  color: #a22;
  padding: 12px 16px;
  border-radius: 12px;
  font-weight: 600;
}

.auth-body .layout {
  justify-content: center;
}

.auth-card {
  max-width: 420px;
  margin: 0 auto;
  text-align: center;
}

.auth-card h1 {
  margin: 0 0 8px;
  font-size: 28px;
}

.auth-subtitle {
  margin: 0 0 24px;
  color: var(--text-soft);
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  text-align: left;
}

.auth-form label {
  font-weight: 600;
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: 0.6px;
  color: var(--emerald-700);
}

.auth-footer {
  margin-top: 16px;
  color: var(--text-soft);
}

@media (max-width: 1024px) {
  .content-area {
    padding: 32px;
  }

  .page-header-card,
  .card,
  .hero-card,
  .auth-card {
    padding: 24px;
  }

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

@media (max-width: 720px) {
  .top-nav {
    flex-direction: column;
    gap: 18px;
    padding: 18px 24px;
  }

  .nav-actions {
    flex-wrap: wrap;
    justify-content: center;
  }

  .content-area {
    padding: 24px;
  }

  .page-header-card {
    flex-direction: column;
    align-items: flex-start;
  }

  .date-switcher {
    width: 100%;
    justify-content: space-between;
  }

  .attendance-table {
    border-spacing: 0 8px;
  }

  .attendance-table tbody td {
    padding: 14px 12px;
  }
}
