@import url("https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700&display=swap");
@import url("https://cdn.jsdelivr.net/npm/remixicon@3.5.0/fonts/remixicon.css");

/* ============================================================
   SKYVISION PRO BLUE (Corporate Premium)
   Shared admin system for all HR SaaS pages
   Palette: Primary #1C4E80, Secondary #246BBA,
            Accent A #00A8B5, Accent B #A9B4FF,
            Neutral BG #F3F5F9, Card #FFFFFF, Border #E4E7EB
============================================================ */

:root {
  --color-primary: #1c4e80;
  --color-primary-strong: #163a62;
  --color-secondary: #246bba;
  --color-secondary-strong: #1b528d;
  --color-accent-a: #00a8b5;
  --color-accent-b: #a9b4ff;

  --color-bg: #f3f5f9;
  --color-surface: #ffffff;
  --color-surface-muted: #f7f9fc;
  --color-border: #e4e7eb;
  --color-text: #1a1d1f;
  --color-text-muted: #69707a;

  --color-success: #2ecc71;
  --color-success-bg: #e8f8ef;
  --color-warning: #f39c12;
  --color-warning-bg: #fff5dd;
  --color-danger: #e74c3c;
  --color-danger-bg: #fdecea;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;

  --shadow-soft: 0 6px 18px rgba(24, 54, 88, 0.08);
  --shadow-strong: 0 18px 46px rgba(24, 54, 88, 0.12);

  --space-4: 4px;
  --space-8: 8px;
  --space-12: 12px;
  --space-16: 16px;
  --space-20: 20px;
  --space-24: 24px;
  --space-32: 32px;

  --font-family: "Manrope", "Segoe UI", "Inter", system-ui, -apple-system,
    sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-family);
  letter-spacing: -0.01em;
  line-height: 1.55;
}

/* In-app notifications */
.toast-container {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 360px;
}

.toast {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-soft);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  display: flex;
  gap: 10px;
  align-items: flex-start;
  animation: fadeIn 0.2s ease;
}

.toast .toast-icon {
  font-size: 18px;
  line-height: 1;
}

.toast .toast-content {
  flex: 1;
}

.toast .toast-title {
  font-weight: 700;
  margin-bottom: 4px;
  font-size: 14px;
}

.toast .toast-message {
  margin: 0;
  color: var(--color-text-muted);
  font-size: 13px;
}

.toast-success {
  border-color: var(--color-success);
}

.toast-warning {
  border-color: var(--color-warning);
}

.toast-danger {
  border-color: var(--color-danger);
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Drawer-style side panel for forms */
.drawer-card {
  position: fixed;
  top: 0;
  right: -720px;
  width: 720px;
  max-width: 96vw;
  height: 100vh;
  overflow-y: auto;
  background: var(--color-surface);
  box-shadow: var(--shadow-strong);
  border-left: 1px solid var(--color-border);
  padding: 16px 18px 24px;
  transition: right 0.25s ease;
  z-index: 900;
}

.drawer-card.open {
  right: 0;
}

.drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.3);
  z-index: 850;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.drawer-backdrop.show {
  opacity: 1;
}

.drawer-backdrop.hidden {
  display: none;
}

@media (max-width: 768px) {
  .drawer-card {
    width: 100%;
    right: -100%;
  }
}

/* Optimize form grid inside drawer */
.drawer-card .form-row {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

a {
  color: var(--color-secondary);
  text-decoration: none;
  font-weight: 600;
}

a:hover {
  color: var(--color-primary);
  text-decoration: underline;
}

img {
  max-width: 100%;
  display: block;
}

.container {
  max-width: 1280px;
  margin: 30px auto;
  padding: 0 24px;
}

.hidden {
  display: none !important;
}

/* ============================================================
   NAVBAR
============================================================ */
.navbar {
  background: var(--color-surface);
  color: var(--color-text);
  box-shadow: 0 6px 18px rgba(24, 54, 88, 0.06);
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  z-index: 100;
  min-height: 64px;
}

.nav-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 10px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.nav-left,
.nav-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-bottom {
  display: none;
}

.nav-toggle {
  display: none;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #fff;
  padding: 8px 10px;
  border-radius: 10px;
  cursor: pointer;
}

.nav-toggle i {
  font-size: 18px;
}

.mobile-actions {
  display: none;
  align-items: center;
  gap: 8px;
}

.nav-left,
.nav-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--color-text);
  font-weight: 700;
  letter-spacing: -0.02em;
  font-size: 18px;
}

.brand-logo {
  height: 36px;
  width: 36px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.1);
  padding: 4px;
}

.nav-buttons {
  display: flex;
  gap: 10px;
  align-items: center;
}

.nav-btn i {
  font-size: 16px;
  line-height: 1;
}
.nav-label {
  margin-left: 6px;
}

.nav-btn {
  padding: 8px 14px;
  border-radius: 999px;
  color: var(--color-text);
  font-weight: 600;
  font-size: 14px;
  border: 1px solid var(--color-border);
  background: #fff;
  cursor: pointer;
  transition: all 0.18s ease;
  text-decoration: none !important;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.nav-btn:hover {
  background: var(--color-surface-muted);
  text-decoration: none;
}

.nav-btn.active {
  background: rgba(28, 78, 128, 0.1);
  color: var(--color-primary);
  border-color: rgba(28, 78, 128, 0.25);
  box-shadow: inset 0 0 0 1px rgba(28, 78, 128, 0.15);
}

.nav-btn:hover,
.nav-btn:focus {
  text-decoration: none;
}

.logout-btn {
  background: #fff;
  color: var(--color-danger);
  border-color: rgba(231, 76, 60, 0.3);
  box-shadow: none;
}

.logout-btn:hover {
  background: var(--color-danger-bg);
}

/* ============================================================
   TYPOGRAPHY
============================================================ */
h1,
h2,
h3,
h4 {
  margin: 0 0 12px;
  color: var(--color-text);
}

h1 {
  font-size: 28px;
  letter-spacing: -0.03em;
}

h2 {
  font-size: 20px;
  letter-spacing: -0.025em;
}

h3 {
  font-size: 17px;
}

.subtitle {
  margin: 0 0 14px;
  color: var(--color-text-muted);
  font-weight: 500;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
  color: var(--color-text-muted);
  font-size: 12px;
}

/* ============================================================
   CARDS & LAYOUT
============================================================ */
.card {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  padding: 22px;
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-soft);
  margin-bottom: 24px;
  position: relative;
}

.card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: var(--radius-lg);
  background: linear-gradient(
      135deg,
      rgba(28, 78, 128, 0.06),
      rgba(36, 107, 186, 0.05)
    ),
    rgba(255, 255, 255, 0.9);
  z-index: 0;
  pointer-events: none;
}

.card > * {
  position: relative;
  z-index: 1;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.description,
.current-range {
  color: var(--color-text-muted);
  margin: 0 0 14px;
  font-size: 14px;
}

.section-title {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-muted);
  font-weight: 700;
  margin: 16px 0 8px;
}

.worksite-section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin: 22px 0 10px;
}

/* ============================================================
   BUTTONS
============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 14px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.16s ease;
  background: var(--color-surface);
  color: var(--color-text);
  text-decoration: none;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(24, 54, 88, 0.12);
}

.btn:focus-visible {
  outline: 2px solid rgba(28, 78, 128, 0.4);
  outline-offset: 2px;
}

.btn-primary {
  background: linear-gradient(
    120deg,
    var(--color-primary),
    var(--color-secondary)
  );
  color: #fff;
  border-color: transparent;
}

.btn-primary:hover {
  background: linear-gradient(
    120deg,
    var(--color-primary-strong),
    var(--color-secondary)
  );
}

.btn-secondary {
  background: rgba(36, 107, 186, 0.1);
  color: var(--color-primary);
  border: 1px solid rgba(36, 107, 186, 0.2);
}

.btn-light {
  background: var(--color-surface-muted);
  color: var(--color-text);
  border: 1px solid var(--color-border);
}

.btn-ghost {
  background: transparent;
  color: var(--color-text-muted);
  border-color: var(--color-border);
}

.btn-danger {
  background: var(--color-danger);
  color: #fff;
  border-color: var(--color-danger);
}

.btn-success {
  background: var(--color-success);
  color: #fff;
  border-color: var(--color-success);
}

.btn-icon {
  padding: 8px 12px;
  border-radius: var(--radius-sm);
}

.btn-small {
  padding: 8px 12px;
  font-size: 13px;
}

/* ============================================================
   BADGES & CHIPS
============================================================ */
.badge,
.status-badge,
.punctuality-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 700;
  border-radius: 999px;
  border: 1px solid transparent;
}

.badge-active,
.status-badge.active {
  background: var(--color-success-bg);
  color: var(--color-success);
  border-color: rgba(46, 204, 113, 0.25);
}

.badge-open,
.status-badge.completed {
  background: #85eeb1;
  color: var(--color-text);
  border-color: var(--color-border);
}

.status-badge.active {
  background: rgba(36, 107, 186, 0.12);
  color: var(--color-secondary);
  border-color: rgba(36, 107, 186, 0.2);
}

.punctuality-badge {
  text-transform: capitalize;
}

.punctuality-badge.on-time {
  background: var(--color-success-bg);
  color: var(--color-success);
  border-color: rgba(46, 204, 113, 0.25);
}

.punctuality-badge.late {
  background: var(--color-warning-bg);
  color: var(--color-warning);
  border-color: rgba(243, 156, 18, 0.25);
}

.punctuality-badge.very-late {
  background: var(--color-danger-bg);
  color: var(--color-danger);
  border-color: rgba(231, 76, 60, 0.25);
}

.punctuality-badge.na {
  background: var(--color-border);
  color: var(--color-text);
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: rgba(36, 107, 186, 0.12);
  border: 1px solid rgba(36, 107, 186, 0.3);
  color: var(--color-secondary);
  border-radius: 999px;
  font-weight: 700;
  font-size: 12px;
}

.code-badge {
  background: rgba(28, 78, 128, 0.08);
  color: var(--color-primary);
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  font-family: "JetBrains Mono", "SFMono-Regular", Consolas, monospace;
}

.status-pill {
  display: inline-flex;
  padding: 5px 12px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 12px;
}

.status-active {
  background: var(--color-success-bg);
  color: var(--color-success);
}

.status-inactive {
  background: var(--color-danger-bg);
  color: var(--color-danger);
}

/* Leave status pills */
.status-pending {
  background: var(--color-warning-bg);
  color: var(--color-warning);
}

.status-approved {
  background: var(--color-success-bg);
  color: var(--color-success);
}

.status-rejected {
  background: var(--color-danger-bg);
  color: var(--color-danger);
}

.status-cancelled {
  background: #e5e7eb;
  color: #374151;
}

.geofence-badge {
  padding: 6px 10px;
  border-radius: 10px;
  font-size: 12px;
}

.geofence-on {
  background: var(--color-success-bg);
  color: var(--color-success);
}

.geofence-off {
  background: var(--color-danger-bg);
  color: var(--color-danger);
}

/* ============================================================
   GRID & STAT CARDS
============================================================ */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}

.stat-card,
.kpi-card {
  background: linear-gradient(
    135deg,
    rgba(28, 78, 128, 0.12),
    rgba(36, 107, 186, 0.08)
  );
  border: 1px solid rgba(36, 107, 186, 0.25);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  box-shadow: var(--shadow-soft);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.stat-card:hover,
.kpi-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-strong);
}

.stat-value {
  font-size: 32px;
  font-weight: 800;
  margin-top: 4px;
}

.stat-trend {
  font-size: 13px;
  font-weight: 700;
  color: var(--color-secondary);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.stat-date-label {
  grid-column: 1 / -1;
  font-size: 13px;
  color: var(--color-text-muted);
  margin-bottom: -4px;
}

.stat-label {
  color: var(--color-text-muted);
  font-size: 14px;
  font-weight: 700;
}

.insight-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}

.insight-card {
  background: var(--color-surface);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-soft);
  padding: 18px;
}

.insight-card ul {
  padding-left: 16px;
  margin: 0;
  color: var(--color-text);
}

/* Insight links */
.insight-link {
  cursor: pointer;
  color: var(--color-secondary);
}
.insight-link:hover {
  text-decoration: underline;
}

/* Alerts panel */
.alert-panel {
  background: var(--color-surface-muted);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  margin-bottom: 16px;
}

.alert-panel h3 {
  margin: 0 0 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.alert-panel ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 6px;
}

.alert-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  background: #fff;
  border: 1px solid var(--color-border);
}

.alert-item .alert-icon {
  font-size: 16px;
}

.alert-item .alert-text {
  flex: 1;
}

.month-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.summary-card {
  background: var(--color-surface-muted);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  border: 1px solid var(--color-border);
}

.summary-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text-muted);
  margin-bottom: 4px;
}

.summary-value {
  font-size: 20px;
  font-weight: 800;
}

.empty-text,
.empty-state {
  color: var(--color-text-muted);
  font-style: italic;
  text-align: center;
}

/* ============================================================
   WORKSITE CARDS
============================================================ */
.worksite-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
}

.worksite-card {
  background: var(--color-surface);
  padding: 18px;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-soft);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  position: relative;
  overflow: hidden;
}

.worksite-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(28, 78, 128, 0.08),
    rgba(36, 107, 186, 0.06)
  );
  opacity: 0.9;
}

.worksite-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-strong);
}

.worksite-card > * {
  position: relative;
}

.worksite-title {
  font-weight: 800;
  font-size: 17px;
}

.worksite-subtitle {
  color: var(--color-text-muted);
  margin-bottom: 10px;
}

.worksite-metrics {
  font-size: 14px;
  line-height: 1.6;
}

.ws-green {
  border-left: 6px solid var(--color-success);
}

.ws-orange {
  border-left: 6px solid var(--color-warning);
}

.ws-red {
  border-left: 6px solid var(--color-danger);
}

.worksite-table {
  margin-top: 12px;
}

/* ============================================================
   TABLES
============================================================ */
.table-wrap {
  overflow-x: auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  box-shadow: var(--shadow-soft);
  position: relative;
}

.table-wrap::after {
  content: "";
  position: sticky;
  right: 0;
  top: 0;
  width: 18px;
  height: 100%;
  pointer-events: none;
  background: linear-gradient(
    90deg,
    rgba(243, 245, 249, 0),
    rgba(243, 245, 249, 0.9)
  );
}

.sort-btn {
  width: 100%;
  justify-content: flex-start;
  color: var(--color-text);
  font-weight: 700;
  border: none;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
}

thead {
  background: var(--color-surface-muted);
}

thead th {
  position: sticky;
  top: 0;
  z-index: 1;
}

th {
  text-align: left;
  padding: 14px 16px;
  font-size: 13px;
  font-weight: 800;
  color: var(--color-text-muted);
  border-bottom: 1px solid var(--color-border);
  letter-spacing: 0.02em;
}

td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--color-border);
}

/* Center cells in Worksite Details except the first column */
.worksite-table td:not(:first-child),
.worksite-table th:not(:first-child) {
  text-align: center;
}

tbody tr:nth-child(even) td {
  background: rgba(243, 245, 249, 0.9);
}

tr:hover td {
  background: rgba(36, 107, 186, 0.04) !important;
}

.table-meta {
  color: var(--color-text-muted);
  font-size: 13px;
}

/* ============================================================
   FILTERS & FORM CONTROLS
============================================================ */
.filter-section,
.filters-row,
.filters-bar,
.month-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: flex-end;
  margin-bottom: 18px;
}

.filter-section {
  background: rgba(36, 107, 186, 0.05);
  border: 1px solid rgba(36, 107, 186, 0.18);
  padding: 14px 16px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-soft);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  align-items: end;
}

.filters-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 10px 14px;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.filter-group label,
.form-group label {
  font-weight: 700;
  color: var(--color-text-muted);
  font-size: 13px;
}

.filter-actions {
  display: flex;
  gap: 10px;
  margin-left: auto;
  flex-wrap: wrap;
}

input[type="text"],
input[type="number"],
input[type="date"],
input[type="time"],
input[type="password"],
input[type="email"],
input[type="month"],
select,
textarea {
  width: 100%;
  padding: 11px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
  background: #fff;
  font-size: 14px;
  font-family: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(28, 78, 128, 0.16);
  outline: none;
}

textarea {
  min-height: 90px;
  resize: vertical;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px 16px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-actions {
  display: flex;
  gap: 10px;
  margin-top: 12px;
  flex-wrap: wrap;
}

.readonly-field {
  background: var(--color-surface-muted);
}

.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(36, 107, 186, 0.08);
  border: 1px solid rgba(36, 107, 186, 0.2);
  color: var(--color-primary);
  font-weight: 700;
}

.info-pill {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  background: rgba(36, 107, 186, 0.08);
  border: 1px solid rgba(36, 107, 186, 0.2);
  margin: -4px 0 12px;
}

.breadcrumb {
  margin-bottom: 14px;
  font-size: 14px;
  color: var(--color-text-muted);
}

.breadcrumb a {
  color: var(--color-secondary);
  font-weight: 700;
}

.profile-header {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  align-items: flex-start;
}

.profile-main .name {
  font-size: 24px;
  font-weight: 800;
  margin-bottom: 6px;
}

.profile-main .position {
  color: var(--color-text-muted);
}

/* ============================================================
   TABS
============================================================ */
.tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.tab-btn {
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid var(--color-border);
  background: var(--color-surface-muted);
  cursor: pointer;
  font-weight: 700;
  color: var(--color-text-muted);
  transition: all 0.18s ease;
}

.tab-btn.active {
  background: linear-gradient(
    120deg,
    rgba(28, 78, 128, 0.14),
    rgba(36, 107, 186, 0.18)
  );
  border-color: rgba(36, 107, 186, 0.4);
  color: var(--color-primary);
  box-shadow: var(--shadow-soft);
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

/* ============================================================
   PAGINATION
============================================================ */
.pagination {
  display: flex;
  gap: 8px;
  margin-top: 14px;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
}

.pagination-info {
  color: var(--color-text-muted);
  font-size: 13px;
  font-weight: 600;
}

.pagination-controls {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.pagination-ellipsis {
  color: var(--color-text-muted);
  padding: 0 6px;
  font-weight: 700;
}

.page-size-selector {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--color-text-muted);
  font-size: 13px;
  font-weight: 600;
}

.page-size-select {
  width: auto;
  padding: 6px 10px;
  border-radius: 10px;
  border: 1px solid var(--color-border);
  background: #fff;
  font-weight: 700;
  color: var(--color-text);
}

.page-btn,
.pagination button {
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid var(--color-border);
  background: #fff;
  cursor: pointer;
  min-width: 38px;
  font-weight: 700;
  color: var(--color-text);
  transition: all 0.15s ease;
}

.page-btn.active,
.pagination button.active {
  background: var(--color-primary);
  color: #fff;
  border-color: var(--color-primary);
  box-shadow: var(--shadow-soft);
}

.pagination button:hover,
.page-btn:hover {
  transform: translateY(-1px);
  border-color: var(--color-secondary);
}

@media (max-width: 768px) {
  .pagination {
    flex-direction: column;
    align-items: flex-start;
  }
  .pagination-controls {
    width: 100%;
  }
  .page-size-selector {
    width: 100%;
    justify-content: flex-start;
  }
}

/* ============================================================
   ALERTS
============================================================ */
.error-message,
.success-message {
  border-radius: var(--radius-md);
  padding: 12px 14px;
  font-size: 14px;
  margin-bottom: 14px;
  display: none;
}

.error-message {
  background: var(--color-danger-bg);
  color: var(--color-danger);
  border: 1px solid rgba(231, 76, 60, 0.35);
}

.success-message {
  background: var(--color-success-bg);
  color: var(--color-success);
  border: 1px solid rgba(46, 204, 113, 0.35);
}

.error {
  color: var(--color-danger);
  text-align: center;
  font-size: 13px;
  margin-top: 10px;
}

.loading {
  opacity: 0.6;
  pointer-events: none;
}

/* ============================================================
   AUTH / LOGIN
============================================================ */
.auth-body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: radial-gradient(
      circle at 18% 20%,
      rgba(0, 168, 181, 0.16),
      transparent 40%
    ),
    linear-gradient(140deg, var(--color-primary), var(--color-secondary));
}

.login-card {
  width: 100%;
  max-width: 480px;
  background: var(--color-surface);
  padding: 30px 28px 26px;
  border-radius: 18px;
  box-shadow: var(--shadow-strong);
  position: relative;
  overflow: hidden;
  animation: authFadeUp 0.4s ease-out;
}

.login-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    circle at 94% 12%,
    rgba(169, 180, 255, 0.22),
    transparent 30%
  );
}

.login-card > * {
  position: relative;
  z-index: 1;
}

@keyframes authFadeUp {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.brand-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.brand-header img {
  width: 56px;
  height: 56px;
  border-radius: 14px;
}

.brand-title {
  display: flex;
  flex-direction: column;
}

.brand-title h1 {
  margin: 0;
  color: var(--color-primary);
  font-size: 22px;
}

.brand-title span {
  color: var(--color-text-muted);
  font-weight: 600;
}

.card-subtitle {
  margin: 0 0 16px;
  color: var(--color-text-muted);
}

.btn-login {
  width: 100%;
  margin-top: 6px;
}

.footer-note,
.powered {
  text-align: center;
  color: var(--color-text-muted);
  font-size: 13px;
  margin-top: 16px;
}

.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 10px 0 18px;
  flex-wrap: wrap;
}

.page-title {
  margin: 0;
  font-size: 24px;
  letter-spacing: -0.02em;
}

.breadcrumb {
  margin: 0;
  font-size: 14px;
  color: var(--color-text-muted);
}

.breadcrumb a {
  color: var(--color-secondary);
  font-weight: 700;
  text-decoration: none;
}

.breadcrumb a:hover {
  text-decoration: underline;
}

.nav-admin-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  color: var(--color-text);
  font-weight: 700;
}

.nav-admin-label i {
  font-size: 18px;
}

.user-name-ellipsis {
  display: inline-block;
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.helper-text {
  font-size: 12px;
  color: var(--color-text-muted);
  margin-top: -6px;
}

.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.chip-ghost {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(36, 107, 186, 0.08);
  color: var(--color-secondary);
  border: 1px solid rgba(36, 107, 186, 0.2);
  font-weight: 700;
}

/* ============================================================
   RESPONSIVE
============================================================ */
@media (max-width: 768px) {
  .navbar {
    position: static;
    border-radius: 0;
  }
  .nav-container {
    flex-direction: row;
    justify-content: center;
    align-items: center;
    position: relative;
    padding: 10px 14px;
  }
  .nav-brand {
    margin: 0 auto;
  }
  .nav-toggle {
    display: none;
  }
  .mobile-actions {
    display: inline-flex;
    position: absolute;
    left: 12px;
    top: 8px;
  }
  .nav-buttons {
    display: none;
  }
  .nav-left,
  .nav-right {
    width: auto;
  }
  .nav-right {
    display: none;
  }
  .nav-bottom {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--color-surface);
    padding: 10px 8px env(safe-area-inset-bottom);
    border-top: 1px solid var(--color-border);
    justify-content: space-around;
    gap: 6px;
    z-index: 120;
  }
  .nav-bottom .nav-btn {
    flex: 1;
    justify-content: center;
    padding: 10px 6px;
    border-radius: 12px;
    font-size: 12px;
    background: transparent;
    border: none;
    color: var(--color-text);
  }
  .nav-bottom .nav-btn i {
    font-size: 20px;
    margin-right: 0;
  }
  .nav-bottom .nav-label {
    display: none;
  }
}
.input-with-icon {
  position: relative;
  width: 100%;
}
.search-icon {
  position: absolute;
  top: 50%;
  left: 12px;
  transform: translateY(-50%);
  font-size: 18px;
  color: var(--color-text-muted);
  pointer-events: none;
}
/* Password input with eye icon (RIGHT) */
.input-with-icon {
  position: relative;
  width: 100%;
}

.input-with-icon input {
  width: 100%;
  padding-right: 44px; /* space for eye */
  box-sizing: border-box;
}

.toggle-eye {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
  color: var(--color-text-muted);
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  user-select: none;
}

.toggle-eye:hover,
.input-with-icon input:focus + .toggle-eye {
  color: var(--color-primary);
}
