/* ── DONA DON — iOS Glass + Soft 3D Design System ──────────── */

/* ── CSS Variables ─────────────────────────────────────────── */
:root {
  /* Brand */
  --brand: #22c55e;
  --brand-glow: rgba(34, 197, 94, 0.45);
  --brand-deep: #0b4021;
  --brand-accent: #d97706;
  --brand-danger: #ef4444;
  --brand-warning: #f59e0b;
  --brand-info: #3b82f6;

  /* Glass surfaces (dark) */
  --glass: rgba(255, 255, 255, 0.06);
  --glass-strong: rgba(255, 255, 255, 0.10);
  --glass-border: rgba(255, 255, 255, 0.10);
  --glass-highlight: rgba(255, 255, 255, 0.18);

  /* Depth */
  --shadow-soft: 0 8px 32px rgba(0, 0, 0, 0.35);
  --shadow-float: 0 12px 40px rgba(0, 0, 0, 0.45),
                  0 0 0 1px rgba(255, 255, 255, 0.06);
  --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.25),
                 0 0 0 1px rgba(255, 255, 255, 0.05);

  /* Text */
  --text: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;

  /* Surfaces */
  --bg: #0a0f1e;
  --bg-card: #1a2332;
  --hover: rgba(255, 255, 255, 0.06);
  --modal-overlay: rgba(0, 0, 0, 0.7);

  /* Misc */
  --radius: 16px;
  --radius-sm: 10px;
  --radius-xs: 8px;
  --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="light"] {
  --glass: rgba(255, 255, 255, 0.5);
  --glass-strong: rgba(255, 255, 255, 0.7);
  --glass-border: rgba(0, 0, 0, 0.08);
  --glass-highlight: rgba(255, 255, 255, 0.9);

  --shadow-soft: 0 8px 32px rgba(0, 0, 0, 0.08);
  --shadow-float: 0 12px 40px rgba(0, 0, 0, 0.10),
                  0 0 0 1px rgba(255, 255, 255, 0.8);
  --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.06),
                 0 0 0 1px rgba(255, 255, 255, 0.9);

  --text: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;

  --bg: #eef2f6;
  --bg-card: #ffffff;
  --hover: rgba(0, 0, 0, 0.04);
  --modal-overlay: rgba(0, 0, 0, 0.3);
}

/* ── Reset ─────────────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  transition: background var(--transition), color var(--transition);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Scrollbar ─────────────────────────────────────────────── */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--glass-strong); border-radius: 2px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* ── Navbar (Glass) ────────────────────────────────────────── */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 64px;
  background: var(--glass);
  backdrop-filter: blur(28px) saturate(180%);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
  border-bottom: 1px solid var(--glass-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  padding-top: calc(env(safe-area-inset-top, 0px) + 24px);
  height: calc(64px + env(safe-area-inset-top, 0px) + 24px);
  z-index: 100;
  transition: background var(--transition), border-color var(--transition);
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-logo {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--glass-border);
  box-shadow: 0 0 20px var(--brand-glow);
  flex-shrink: 0;
}

.brand-text {
  font-size: 22px;
  font-weight: 800;
  background: linear-gradient(135deg, #fff 30%, #a7f3d0);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.5px;
}

[data-theme="light"] .brand-text {
  background: linear-gradient(135deg, #0b4021 30%, #22c55e);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.nav-date, .nav-time {
  font-size: 13px;
  color: var(--text-secondary);
  font-variant-numeric: tabular-nums;
  font-weight: 500;
}
.nav-date { display: none; }
@media (min-width: 640px) { .nav-date { display: inline; } }

.theme-toggle {
  background: var(--glass-strong);
  border: 1px solid var(--glass-border);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  font-size: 17px;
  cursor: pointer;
  transition: all var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(8px);
}
.theme-toggle:hover {
  border-color: var(--brand);
  transform: scale(1.08);
  box-shadow: 0 0 20px var(--brand-glow);
}

/* ── Layout ────────────────────────────────────────────────── */
.layout {
  display: flex;
  padding-top: calc(64px + env(safe-area-inset-top, 0px) + 24px);
  min-height: 100vh;
}

/* ── Sidebar (Desktop) ─────────────────────────────────────── */
.sidebar {
  width: 220px;
  background: var(--glass);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-right: 1px solid var(--glass-border);
  padding: 20px 10px;
  position: fixed;
  top: 64px;
  bottom: 0;
  overflow-y: auto;
  transition: all var(--transition);
  z-index: 50;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  transition: all var(--transition);
  text-decoration: none !important;
}
.sidebar-link:hover {
  background: var(--hover);
  color: var(--text);
}
.sidebar-link.active {
  background: rgba(34, 197, 94, 0.12);
  color: var(--brand);
  font-weight: 600;
  box-shadow: inset 0 0 0 1px rgba(34, 197, 94, 0.15);
}
.sidebar-link .icon { font-size: 20px; }

/* ── Bottom Navigation (Mobile) ────────────────────────────── */
.bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 72px;
  background: var(--glass);
  backdrop-filter: blur(28px) saturate(180%);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
  border-top: 1px solid var(--glass-border);
  z-index: 100;
  padding: 6px 8px;
  padding-bottom: max(6px, env(safe-area-inset-bottom));
  justify-content: space-around;
  align-items: center;
}

.bottom-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  text-decoration: none !important;
  transition: all var(--transition);
  min-width: 56px;
}
.bottom-link:hover { color: var(--text-secondary); }
.bottom-link.active {
  color: var(--brand);
}
.bottom-link.active .bottom-icon {
  transform: scale(1.1);
}

.bottom-icon {
  font-size: 22px;
  transition: transform var(--transition);
}
.bottom-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.2px;
}

@media (max-width: 767px) {
  .sidebar { display: none; }
  .bottom-nav { display: flex; }
  .content {
    margin-left: 0 !important;
    padding: 16px !important;
    padding-bottom: 88px !important;
  }
}

/* ── Content ───────────────────────────────────────────────── */
.content {
  margin-left: 220px;
  flex: 1;
  padding: 24px 32px;
  min-height: 100vh;
  transition: padding var(--transition);
}

/* ── Page Header ───────────────────────────────────────────── */
.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 24px;
  gap: 16px;
  flex-wrap: wrap;
}
.page-header h1 {
  font-size: clamp(26px, 5vw, 34px);
  font-weight: 800;
  letter-spacing: -0.6px;
  color: var(--text);
  line-height: 1.2;
}
[data-theme="light"] .page-header h1 {
  color: var(--text);
}
.page-header .subtitle {
  font-size: 14px;
  color: var(--text-secondary);
  margin-top: 2px;
  font-weight: 400;
}

/* ── Cards (Glass) ─────────────────────────────────────────── */
.card {
  background: var(--glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  padding: 20px 24px;
  transition: all var(--transition);
  margin-bottom: 16px;
}
.card:hover {
  box-shadow: var(--shadow-float);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--glass-border);
}

.card-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
}

/* ── Stat Circles (Premium Glass + 3D) ─────────────────────── */
.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 28px;
}

@media (max-width: 767px) {
  .stats-row {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
}

.stat-circle {
  background: var(--glass);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--glass-border);
  border-radius: 24px;
  padding: 24px 16px;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition);
  box-shadow: var(--shadow-float);
  position: relative;
  overflow: hidden;
}
.stat-circle::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  opacity: 0.5;
}
.stat-circle.total::before { background: var(--brand-info); }
.stat-circle.ontime::before { background: var(--brand); }
.stat-circle.late::before { background: var(--brand-danger); }
.stat-circle.absent::before { background: var(--brand-warning); }

.stat-circle:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-float);
}
.stat-circle:active {
  transform: translateY(-1px) scale(0.98);
}

.stat-circle .circle {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 12px;
  font-size: 32px;
  font-weight: 800;
  border: 2px solid var(--glass-border);
  background: var(--glass-strong);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.06),
    0 8px 24px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
  transition: all var(--transition);
  color: var(--text); /* neutral text — no color clash with emoji */
}

/* Subtle colored glow borders instead of text color — keeps icons clean */
.stat-circle .circle.total {
  border-color: rgba(59, 130, 246, 0.4);
  box-shadow: 0 0 20px rgba(59, 130, 246, 0.12), 0 8px 24px rgba(0,0,0,0.3);
}
.stat-circle .circle.ontime {
  border-color: rgba(74, 222, 128, 0.4);
  box-shadow: 0 0 20px rgba(34, 197, 94, 0.12), 0 8px 24px rgba(0,0,0,0.3);
}
.stat-circle .circle.late {
  border-color: rgba(248, 113, 113, 0.4);
  box-shadow: 0 0 20px rgba(239, 68, 68, 0.12), 0 8px 24px rgba(0,0,0,0.3);
}
.stat-circle .circle.absent {
  border-color: rgba(251, 191, 36, 0.4);
  box-shadow: 0 0 20px rgba(245, 158, 11, 0.12), 0 8px 24px rgba(0,0,0,0.3);
}

.stat-circle .stat-label {
  font-size: 14px;
  color: var(--text);
  font-weight: 600;
}

.stat-circle .stat-count {
  font-size: 13px;
  font-weight: 400;
  color: var(--text-muted);
  margin-top: 2px;
}

/* ── Filters Bar ───────────────────────────────────────────── */
.filters-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
  align-items: center;
}

.filters-bar select, .filters-bar input {
  background: var(--glass-strong);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xs);
  padding: 10px 14px;
  color: var(--text);
  font-size: 13px;
  transition: border-color var(--transition), box-shadow var(--transition);
  backdrop-filter: blur(8px);
  outline: none;
}
.filters-bar select:focus, .filters-bar input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.15);
}

.search-input {
  min-width: 180px;
}

/* ── Buttons ───────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  border: 1px solid transparent;
  text-decoration: none !important;
  white-space: nowrap;
}
.btn-primary {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
  box-shadow: 0 4px 16px rgba(34, 197, 94, 0.3);
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 24px rgba(34, 197, 94, 0.4);
}
.btn-accent {
  background: var(--brand-accent);
  color: #fff;
  border-color: var(--brand-accent);
  box-shadow: 0 4px 16px rgba(217, 119, 6, 0.3);
}
.btn-accent:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 24px rgba(217, 119, 6, 0.4);
}
.btn-danger {
  background: var(--brand-danger);
  color: #fff;
  border-color: var(--brand-danger);
}
.btn-danger:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 24px rgba(239, 68, 68, 0.3);
}
.btn-ghost {
  background: var(--glass-strong);
  color: var(--text-secondary);
  border-color: var(--glass-border);
}
.btn-ghost:hover {
  background: var(--hover);
  color: var(--text);
  border-color: var(--glass-highlight);
}
.btn-sm {
  padding: 7px 14px;
  font-size: 12px;
}

/* ── Employee Grid ─────────────────────────────────────────── */
.employee-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
}

.employee-card {
  background: var(--glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 16px;
  cursor: pointer;
  transition: all var(--transition);
  box-shadow: var(--shadow-card);
}
.employee-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-float);
  border-color: rgba(34, 197, 94, 0.2);
}

/* ── Incomplete employee profile (missing shift/position, salary=0) ── */
.employee-card.emp-incomplete {
  border-color: rgba(239, 68, 68, 0.55);
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.08), rgba(239, 68, 68, 0.02));
}
.employee-card.emp-incomplete:hover {
  border-color: var(--brand-danger);
  box-shadow: 0 0 0 1px rgba(239, 68, 68, 0.4), 0 0 16px rgba(239, 68, 68, 0.15);
}
.data-table tr.emp-incomplete {
  background: rgba(239, 68, 68, 0.07);
}
.data-table tr.emp-incomplete:hover {
  background: rgba(239, 68, 68, 0.12);
}
.data-table td.emp-cell-warn {
  color: var(--brand-danger);
  font-weight: 600;
}
.emp-warn-badges {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 2px;
  margin-left: 6px;
  vertical-align: middle;
}
.employee-card .emp-warn-badges {
  display: flex;
  margin: 2px 0 4px;
}
.emp-warn-badge {
  display: inline-block;
  padding: 0 4px;
  border-radius: 999px;
  font-size: 5px;
  font-weight: 700;
  letter-spacing: 0.15px;
  text-transform: uppercase;
  color: var(--brand-danger);
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.35);
}

/* ── Employee split-by-department sections ──────────────────── */
.emp-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 12px;
  margin: 18px 0 10px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.12), rgba(34, 197, 94, 0.04));
  border: 1px solid rgba(34, 197, 94, 0.25);
  font-weight: 700;
  font-size: 14px;
  color: var(--brand-accent);
}
.emp-section-header:first-child {
  margin-top: 0;
}
.emp-section-count {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  background: var(--glass);
  border: 1px solid var(--glass-border);
  padding: 2px 10px;
  border-radius: 999px;
}

.emp-info {
  display: flex;
  align-items: center;
  gap: 14px;
}

.emp-photo {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  box-shadow: 0 0 0 2px var(--glass-border), 0 4px 12px rgba(0,0,0,0.2);
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition);
}
.emp-photo:hover {
  transform: scale(1.05);
  box-shadow: 0 0 0 2px var(--brand), 0 0 20px var(--brand-glow);
}

.emp-details {
  flex: 1;
  min-width: 0;
}

.emp-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
}

.emp-meta {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 1px;
}

.emp-status {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 20px;
  display: inline-block;
  margin-top: 4px;
  color: var(--text-secondary);
  border: 1px solid transparent;
}
.emp-status.ontime {
  background: rgba(34, 197, 94, 0.08);
  border-color: rgba(34, 197, 94, 0.25);
  color: var(--text);
}
.emp-status.late {
  background: rgba(239, 68, 68, 0.08);
  border-color: rgba(239, 68, 68, 0.25);
  color: var(--text);
}
.emp-status.absent {
  background: rgba(245, 158, 11, 0.08);
  border-color: rgba(245, 158, 11, 0.25);
  color: var(--text);
}

/* ── Data Table ────────────────────────────────────────────── */
.table-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.data-table th {
  text-align: left;
  padding: 12px 14px;
  font-weight: 600;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--glass-border);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.data-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--glass-border);
  color: var(--text);
}
.data-table tr {
  cursor: pointer;
  transition: background var(--transition);
}
.data-table tr:hover {
  background: var(--hover);
}
.data-table tr:last-child td {
  border-bottom: none;
}

/* ── Badge ─────────────────────────────────────────────────── */
.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
  border: 1px solid transparent;
}
.badge.ontime {
  background: rgba(34, 197, 94, 0.08);
  border-color: rgba(34, 197, 94, 0.25);
  color: var(--text);
}
.badge.late {
  background: rgba(239, 68, 68, 0.08);
  border-color: rgba(239, 68, 68, 0.25);
  color: var(--text);
}
.badge.absent {
  background: rgba(245, 158, 11, 0.08);
  border-color: rgba(245, 158, 11, 0.25);
  color: var(--text);
}

/* ── Ombor Payment Tabs ────────────────────────────────────── */
.ombor-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.ombor-tab {
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border, rgba(255, 255, 255, 0.1));
  background: var(--glass-strong);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}
.ombor-tab:hover {
  color: var(--text);
  border-color: var(--brand, #4f8cff);
}
.ombor-tab.active {
  background: var(--brand, #4f8cff);
  border-color: var(--brand, #4f8cff);
  color: #fff;
}

/* ── Ombor Badges ──────────────────────────────────────────── */
.ombor-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
}
.ombor-badge.ombor-paid {
  background: rgba(34, 197, 94, 0.08);
  border: 1px solid rgba(34, 197, 94, 0.25);
  color: var(--text);
}
.ombor-badge.ombor-pending {
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.25);
  color: var(--text);
}

/* ── Ombor Summary Cards ───────────────────────────────────── */
.ombor-summary {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.ombor-summary-item {
  flex: 1;
  min-width: 180px;
  padding: 14px 16px;
  border-radius: var(--radius, 12px);
  background: var(--glass-strong);
  border: 1px solid var(--border, rgba(255, 255, 255, 0.1));
}
.ombor-summary-item .label {
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 4px;
}
.ombor-summary-item .value {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
}

/* ── Ombor Table helpers ───────────────────────────────────── */
.empty-cell {
  color: var(--text-secondary);
  opacity: 0.6;
}

/* ── Layout Toggle ─────────────────────────────────────────── */
.layout-toggle {
  display: flex;
  gap: 4px;
  background: var(--glass-strong);
  border-radius: var(--radius-sm);
  padding: 3px;
  border: 1px solid var(--glass-border);
}
.layout-toggle button {
  padding: 6px 12px;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
}
.layout-toggle button.active {
  background: var(--glass);
  color: var(--text);
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

/* ── Inline Form ───────────────────────────────────────────── */
.inline-form {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}
.inline-form input,
.form-row input,
.form-row select {
  background: var(--glass-strong);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xs);
  padding: 10px 14px;
  color: var(--text);
  font-size: 13px;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
  backdrop-filter: blur(8px);
}
.inline-form input:focus,
.form-row input:focus,
.form-row select:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.15);
}

.form-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.form-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.form-group label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
}

/* ── History Items ─────────────────────────────────────────── */
.history-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--glass-border);
  gap: 12px;
  flex-wrap: wrap;
}
.history-item:last-child {
  border-bottom: none;
}
.history-item .date {
  font-weight: 600;
  font-size: 13px;
  color: var(--text);
}
.history-item .time {
  font-size: 12px;
  color: var(--text-secondary);
}
.history-item .fine {
  color: var(--brand-danger);
  font-size: 12px;
  font-weight: 600;
}
.history-item .bonus {
  color: var(--brand);
  font-size: 12px;
  font-weight: 600;
}
.history-item .left {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.history-item .right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* ── Position OMБОР type (lavozim) ─────────────────────────── */
.pos-ombor-row {
  margin-top: 4px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.pos-ombor-select {
  font-size: 12px;
  padding: 4px 8px;
  border-radius: 8px;
  border: 1px solid var(--glass-border);
  background: var(--bg);
  color: var(--text);
  max-width: 260px;
  cursor: pointer;
}

.history-list {
  display: flex;
  flex-direction: column;
}

/* ── Tags ──────────────────────────────────────────────────── */
.tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
}
.tag-green {
  background: rgba(34, 197, 94, 0.12);
  color: #4ade80;
}

/* ── Detail Stats ──────────────────────────────────────────── */
.detail-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}
.detail-stat {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  padding: 16px;
  text-align: center;
}
.detail-stat .value {
  font-size: 22px;
  font-weight: 800;
}
.detail-stat .label {
  font-size: 11px;
  color: var(--text-secondary);
  margin-top: 2px;
  font-weight: 500;
}

.action-bar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

/* ── Modal (Glass) ─────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--modal-overlay);
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.modal-overlay.open {
  display: flex;
}

.modal-content {
  background: var(--glass);
  backdrop-filter: blur(32px) saturate(180%);
  -webkit-backdrop-filter: blur(32px) saturate(180%);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 28px;
  max-width: 640px;
  width: 92%;
  max-height: 88vh;
  overflow-y: auto;
  box-shadow: var(--shadow-float), 0 0 60px rgba(34, 197, 94, 0.06);
  animation: modalIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes modalIn {
  from { transform: scale(0.92) translateY(12px); opacity: 0; }
  to { transform: scale(1) translateY(0); opacity: 1; }
}

.modal-close {
  float: right;
  background: var(--glass-strong);
  border: 1px solid var(--glass-border);
  border-radius: 50%;
  width: 36px;
  height: 36px;
  font-size: 18px;
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
}
.modal-close:hover {
  color: var(--text);
  border-color: var(--glass-highlight);
  transform: rotate(90deg);
}

/* ── Stat Modal (small circle click modal) ─────────────────── */
.stat-modal-header {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--glass-border);
  display: flex;
  align-items: center;
  gap: 10px;
}
.stat-modal-count {
  font-size: 13px;
  font-weight: 600;
  background: var(--glass-strong);
  padding: 2px 12px;
  border-radius: 20px;
  color: var(--text-secondary);
  border: 1px solid var(--glass-border);
}
.stat-modal-body {
  max-height: 50vh;
  overflow-y: auto;
}
.stat-modal-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.stat-modal-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition);
}
.stat-modal-item:hover {
  background: var(--hover);
}
.stat-modal-photo {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  box-shadow: 0 0 0 2px var(--glass-border);
}
.stat-modal-info {
  flex: 1;
  min-width: 0;
}
.stat-modal-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}
.stat-modal-meta {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 1px;
}
.stat-modal-status {
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  padding: 4px 12px;
  border-radius: 20px;
  flex-shrink: 0;
  color: var(--text-secondary);
  border: 1px solid transparent;
}
.stat-modal-status.ontime {
  background: rgba(34, 197, 94, 0.08);
  border-color: rgba(34, 197, 94, 0.25);
  color: var(--text);
}
.stat-modal-status.late {
  background: rgba(239, 68, 68, 0.08);
  border-color: rgba(239, 68, 68, 0.25);
  color: var(--text);
}
.stat-modal-status.absent {
  background: rgba(245, 158, 11, 0.08);
  border-color: rgba(245, 158, 11, 0.25);
  color: var(--text);
}

/* ── Employee Detail ───────────────────────────────────────── */
.emp-detail-header {
  display: flex;
  gap: 20px;
  align-items: center;
  margin-bottom: 24px;
}

.emp-detail-header img {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--glass-border);
  box-shadow: 0 0 24px rgba(34, 197, 94, 0.15);
}

.emp-detail-header .info h2 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 4px;
}
.emp-detail-header .info .meta {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 2px;
}

/* ── Empty State ───────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 40px 20px;
}
.empty-state .icon {
  font-size: 48px;
  margin-bottom: 12px;
  opacity: 0.5;
}
.empty-state .text {
  font-size: 14px;
  color: var(--text-secondary);
}

/* ── Photo Preview ─────────────────────────────────────────── */
.photo-preview-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 12px 0;
}
.photo-preview-img {
  max-width: 100%;
  max-height: 70vh;
  border-radius: var(--radius);
  object-fit: contain;
  box-shadow: var(--shadow-float), 0 0 40px rgba(34, 197, 94, 0.1);
  border: 2px solid var(--glass-border);
}
.photo-preview-name {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-secondary);
}

/* ── Loading ───────────────────────────────────────────────── */
.loading {
  text-align: center;
  padding: 40px;
  color: var(--text-secondary);
  font-size: 14px;
}
.loading-dots::after {
  content: '';
  animation: dots 1.2s steps(4, end) infinite;
}
@keyframes dots {
  0%, 20% { content: ''; }
  40% { content: '.'; }
  60% { content: '..'; }
  80%, 100% { content: '...'; }
}

/* ── Toast ─────────────────────────────────────────────────── */
.toast {
  position: fixed;
  bottom: 90px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--glass);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  padding: 12px 20px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  z-index: 150;
  box-shadow: var(--shadow-float);
  animation: toastIn 0.3s ease;
}
@keyframes toastIn {
  from { transform: translateX(-50%) translateY(20px); opacity: 0; }
  to { transform: translateX(-50%) translateY(0); opacity: 1; }
}

/* ── 📱 Mobile Responsive — Fines & Bonus Page ────────────── */
@media (max-width: 767px) {
  /* Fines page filters — full width inputs */
  .filters-bar .form-group {
    min-width: 100% !important;
    flex: none !important;
  }
  .filters-bar .form-group input,
  .filters-bar .form-group select,
  .filters-bar .form-group .search-input {
    width: 100%;
  }
  /* Also make raw filter inputs full width on mobile */
  .filters-bar input,
  .filters-bar select {
    flex: 1;
    min-width: 120px;
  }
  .filters-bar .search-input {
    min-width: 120px;
  }

  /* Bonus modal hours/minutes grid — stack vertically on mobile */
  .modal-content div[style*="grid-template-columns"][style*="1fr 1fr"] {
    grid-template-columns: 1fr !important;
  }

  /* Employee detail settings grid — stack vertically on mobile */
  .edit-section div[style*="grid-template-columns"][style*="1fr 1fr"] {
    grid-template-columns: 1fr !important;
  }

  /* Detail stats — stack vertically */
  .detail-stats {
    grid-template-columns: 1fr !important;
  }

  /* Modal content — less padding on mobile */
  .modal-content {
    padding: 16px;
    width: 96%;
    max-height: 92vh;
  }

  /* Bonus modal inner padding */
  .modal-content [style*="padding:20px"] {
    padding: 0 !important;
  }

  /* Bonus preview — smaller text on mobile */
  #bonusPreview {
    font-size: 16px !important;
    padding: 10px !important;
  }

  /* Bonus input fields — smaller font on mobile */
  .modal-content input[type="number"] {
    font-size: 16px !important;
    padding: 10px 12px !important;
  }

  /* Fines page cards — less padding */
  .card {
    padding: 14px 16px;
  }

  /* Summary stat values — smaller on mobile */
  .detail-stat .value {
    font-size: 18px;
  }

  /* Table cells — smaller padding on mobile */
  .data-table th,
  .data-table td {
    padding: 8px 10px;
    font-size: 12px;
  }

  /* Action bar buttons — full width on mobile */
  .action-bar .btn {
    flex: 1;
    min-width: 0;
    justify-content: center;
  }

  /* Employee detail header — stack on mobile */
  .emp-detail-header {
    flex-direction: column;
    text-align: center;
    gap: 12px;
  }

  /* History items — stack on mobile */
  .history-item {
    flex-direction: column;
    align-items: flex-start;
  }
  .history-item .right {
    width: 100%;
  }
}

/* ── 🔐 Login Screen ─────────────────────────────────────────────── */
.login-root {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: var(--bg);
}
.login-card {
  width: 100%;
  max-width: 400px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 32px 28px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.2);
}
.login-brand {
  text-align: center;
  margin-bottom: 24px;
}
.login-brand h1 {
  font-size: 24px;
  margin: 12px 0 4px;
}
.login-brand p {
  color: var(--text-secondary);
  font-size: 14px;
}
.login-form .form-group {
  margin-bottom: 14px;
}
.login-form .form-group label {
  display: block;
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 6px;
}
.login-form input {
  width: 100%;
  padding: 12px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  background: var(--bg);
  color: var(--text-primary);
  font-size: 15px;
}
.login-form input:focus {
  outline: none;
  border-color: var(--brand-accent);
}

/* ── Global Search (Navbar) ─────────────────────────────────── */
.nav-search {
  position: relative;
  display: flex;
  align-items: center;
}
.nav-search-input {
  width: 180px;
  padding: 8px 12px;
  border-radius: 20px;
  border: 1px solid var(--glass-border);
  background: var(--glass-strong);
  color: var(--text);
  font-size: 13px;
  outline: none;
  transition: all var(--transition);
}
.nav-search-input:focus {
  width: 240px;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-glow);
}
.nav-search-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 340px;
  max-height: 420px;
  overflow-y: auto;
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-float);
  z-index: 200;
  padding: 6px;
}
.nav-search-group {
  padding: 6px 10px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
}
.nav-search-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: var(--radius-xs);
  cursor: pointer;
  font-size: 13px;
  color: var(--text);
  transition: background var(--transition);
}
.nav-search-item:hover { background: var(--hover); }
.nav-search-item .ns-icon { font-size: 16px; }
.nav-search-item .ns-sub {
  font-size: 11px;
  color: var(--text-muted);
  margin-left: auto;
}
.nav-search-empty {
  padding: 16px;
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
}

/* ── Navbar Panels (Sync) ──────────────────────────────────────── */
.sync-panel {
  position: fixed;
  top: calc(64px + env(safe-area-inset-top, 0px) + 24px + 8px);
  right: 16px;
  width: 320px;
  max-height: 70vh;
  overflow-y: auto;
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-float);
  z-index: 200;
  padding: 12px;
}
.qa-title {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  margin: 8px 0 6px;
}
.qa-empty {
  padding: 14px;
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
}

/* Sync status panel */
.sync-status .sync-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  margin-right: 2px;
}
.sync-status.ok .sync-dot { background: var(--brand); box-shadow: 0 0 8px var(--brand-glow); }
.sync-status.err .sync-dot { background: var(--brand-danger); box-shadow: 0 0 8px var(--brand-danger); }
.sync-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  border-radius: var(--radius-xs);
  font-size: 13px;
}
.sync-row .sync-device { font-weight: 600; }
.sync-row .sync-time { color: var(--text-muted); font-size: 12px; }
.sync-row .sync-state { font-size: 12px; font-weight: 600; }
.sync-state.ok { color: var(--brand); }
.sync-state.err { color: var(--brand-danger); }
.sync-state.never { color: var(--text-muted); }

/* ── Command Palette ────────────────────────────────────────── */
.cmd-overlay {
  position: fixed;
  inset: 0;
  background: var(--modal-overlay);
  backdrop-filter: blur(6px);
  z-index: 300;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 12vh;
}
.cmd-palette {
  width: 560px;
  max-width: 92vw;
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-float);
  overflow: hidden;
}
.cmd-input-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--glass-border);
}
.cmd-icon { font-size: 18px; color: var(--text-muted); }
.cmd-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text);
  font-size: 16px;
}
.cmd-esc {
  font-size: 11px;
  color: var(--text-muted);
  border: 1px solid var(--glass-border);
  border-radius: 4px;
  padding: 2px 6px;
}
.cmd-results { max-height: 380px; overflow-y: auto; padding: 6px; }
.cmd-group {
  padding: 6px 10px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
}
.cmd-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-xs);
  cursor: pointer;
  font-size: 14px;
  color: var(--text);
  transition: background var(--transition);
}
.cmd-item:hover, .cmd-item.selected { background: var(--hover); }
.cmd-item .cmd-icon { font-size: 16px; }
.cmd-item .cmd-kbd {
  margin-left: auto;
  font-size: 11px;
  color: var(--text-muted);
  border: 1px solid var(--glass-border);
  border-radius: 4px;
  padding: 1px 5px;
}
.cmd-empty {
  padding: 24px;
  text-align: center;
  color: var(--text-muted);
  font-size: 14px;
}

/* ── Health Dashboard Block ─────────────────────────────────── */
.health-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 10px;
}
.health-item {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  padding: 12px;
  text-align: center;
}
.health-item .health-name { font-size: 12px; color: var(--text-secondary); }
.health-item .health-state { font-size: 13px; font-weight: 700; margin-top: 4px; }
.health-item .health-state.ok { color: var(--brand); }
.health-item .health-state.err { color: var(--brand-danger); }
.health-item .health-state.warn { color: var(--brand-warning); }
.health-item .health-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  margin-right: 4px;
}
.health-item .health-dot.ok { background: var(--brand); box-shadow: 0 0 8px var(--brand-glow); }
.health-item .health-dot.err { background: var(--brand-danger); }
.health-item .health-dot.warn { background: var(--brand-warning); }

/* ── Tooltip (ⓘ) ────────────────────────────────────────────── */
.info-tip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--glass-strong);
  border: 1px solid var(--glass-border);
  color: var(--text-secondary);
  font-size: 11px;
  cursor: help;
  position: relative;
  margin-left: 6px;
  vertical-align: middle;
}
.info-tip:hover::after {
  content: attr(data-tip);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  width: 220px;
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xs);
  box-shadow: var(--shadow-float);
  padding: 8px 10px;
  font-size: 12px;
  font-weight: 400;
  color: var(--text);
  white-space: normal;
  z-index: 400;
  text-align: left;
}

/* ── Admin Logs ─────────────────────────────────────────────── */
.admin-log-item {
  display: flex;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--radius-xs);
  font-size: 13px;
  border-bottom: 1px solid var(--glass-border);
}
.admin-log-item .log-action { font-weight: 600; }
.admin-log-item .log-detail { color: var(--text-secondary); }
.admin-log-item .log-time { color: var(--text-muted); font-size: 11px; margin-left: auto; white-space: nowrap; }

/* Responsive: hide search on small screens */
@media (max-width: 640px) {
  .nav-search-input { width: 120px; }
  .nav-search-input:focus { width: 150px; }
  .nav-search-dropdown { width: 280px; right: -60px; }
  .sync-panel { width: 280px; right: 8px; }
}

/* ══ Enterprise Employee Card (Workday / SAP / HikCentral style) ══ */
.emp-modal.modal-content {
  max-width: 860px;
  padding: 24px;
}
.emp-modal .modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  float: none;
}

/* Identity header — photo + name + fact chips */
.emp-hero {
  display: flex;
  gap: 18px;
  align-items: center;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--glass-border);
  margin-bottom: 18px;
}
.emp-hero .emp-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--glass-border);
  box-shadow: 0 0 24px rgba(34, 197, 94, 0.12);
  flex-shrink: 0;
}
.emp-hero .emp-avatar.placeholder {
  background: var(--hover);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
}
.emp-hero .emp-id {
  min-width: 0;
}
.emp-hero .emp-id h2 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.emp-hero .emp-id .emp-chips {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.emp-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 20px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  color: var(--text-secondary);
  white-space: nowrap;
}
.emp-chip .chip-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--brand);
}
.emp-chip.pos { color: var(--brand-accent); border-color: rgba(59,130,246,0.25); }
.emp-chip.shift { color: var(--brand); border-color: rgba(34,197,94,0.25); }
.emp-chip.salary { color: var(--text); border-color: rgba(245,158,11,0.3); }

/* KPI stats — compact, aligned left */
.emp-kpis {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}
.emp-kpi {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.emp-kpi .kpi-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}
.emp-kpi .kpi-icon.green { background: rgba(34,197,94,0.12); }
.emp-kpi .kpi-icon.red { background: rgba(239,68,68,0.12); }
.emp-kpi .kpi-icon.blue { background: rgba(59,130,246,0.12); }
.emp-kpi .kpi-icon.orange { background: rgba(245,158,11,0.12); }
.emp-kpi .kpi-body { min-width: 0; }
.emp-kpi .kpi-value { font-size: 18px; font-weight: 800; line-height: 1.1; }
.emp-kpi .kpi-label { font-size: 11px; color: var(--text-secondary); margin-top: 2px; }

/* Two-column body */
.emp-body {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 18px;
  align-items: start;
}
.emp-col-main { min-width: 0; }
.emp-col-side { min-width: 0; }

/* Section card */
.emp-section {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  margin-bottom: 14px;
}
.emp-section .sec-title {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--text-secondary);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Compact history rows */
.emp-history { display: flex; flex-direction: column; }
.emp-hrow {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--glass-border);
  font-size: 13px;
}
.emp-hrow:last-child { border-bottom: none; }
.emp-hrow .h-date { font-weight: 600; width: 92px; flex-shrink: 0; }
.emp-hrow .h-times { color: var(--text-secondary); font-size: 12px; flex: 1; min-width: 0; }
.emp-hrow .h-badges { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.h-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 12px;
  white-space: nowrap;
}
.h-badge.late { background: rgba(239,68,68,0.12); color: var(--brand-danger); }
.h-badge.bonus { background: rgba(34,197,94,0.12); color: var(--brand); }
.h-badge.paid { background: rgba(34,197,94,0.12); color: var(--brand); }
.h-badge.ontime { background: rgba(34,197,94,0.1); color: var(--brand); }

/* Compact payments table */
.emp-pay-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.emp-pay-table th {
  text-align: left;
  padding: 6px 8px;
  font-weight: 600;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--glass-border);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
.emp-pay-table td { padding: 7px 8px; border-bottom: 1px solid var(--glass-border); }
.emp-pay-table tr:last-child td { border-bottom: none; }
.emp-pay-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.emp-pay-table .fine { color: var(--brand-danger); }
.emp-pay-table .bonus { color: var(--brand); }
.emp-pay-table .net { font-weight: 700; }

/* Side settings form */
.emp-settings .form-group { margin-bottom: 10px; }
.emp-settings label { font-size: 11px; color: var(--text-secondary); font-weight: 600; display: block; margin-bottom: 4px; }
.emp-settings select, .emp-settings input {
  width: 100%;
  padding: 8px 10px;
  border-radius: var(--radius-xs);
  border: 1px solid var(--glass-border);
  background: var(--glass-strong);
  color: var(--text);
  font-size: 13px;
}
.emp-settings select:focus, .emp-settings input:focus {
  outline: none;
  border-color: var(--brand);
}

/* Side action buttons — vertical stack */
.emp-actions { display: flex; flex-direction: column; gap: 8px; }
.emp-actions .btn { width: 100%; justify-content: center; }

/* Empty state inside sections */
.emp-empty { color: var(--text-secondary); font-size: 13px; padding: 8px 0; }

/* Status badge next to name */
.emp-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 20px;
  white-space: nowrap;
  vertical-align: middle;
}
.emp-status-badge.ontime { background: rgba(34,197,94,0.12); color: var(--brand); }
.emp-status-badge.late { background: rgba(239,68,68,0.12); color: var(--brand-danger); }
.emp-status-badge.absent { background: rgba(148,163,184,0.15); color: var(--text-secondary); }

/* Status strip: last pass / last sync / source */
.emp-statusbar {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}
.emp-statusbar-item {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
}
.emp-statusbar-item .esb-icon {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: rgba(59,130,246,0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}
.emp-statusbar-item .esb-body { min-width: 0; }
.emp-statusbar-item .esb-label { font-size: 10px; color: var(--text-secondary); font-weight: 600; text-transform: uppercase; letter-spacing: 0.3px; }
.emp-statusbar-item .esb-value { font-size: 13px; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Recent events rows */
.emp-recent { display: flex; flex-direction: column; }
.emp-recent-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 0;
  border-bottom: 1px solid var(--glass-border);
  font-size: 13px;
}
.emp-recent-row:last-child { border-bottom: none; }
.emp-recent-dot { font-size: 13px; flex-shrink: 0; }
.emp-recent-date { font-weight: 600; width: 92px; flex-shrink: 0; }
.emp-recent-times { color: var(--text-secondary); font-size: 12px; flex: 1; min-width: 0; }

/* History as vertical timeline */
.emp-timeline {
  position: relative;
  padding-left: 4px;
}
.emp-tl-item {
  position: relative;
  display: flex;
  gap: 12px;
  padding: 0 0 14px 0;
}
.emp-tl-item:last-child { padding-bottom: 0; }
.emp-tl-marker {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--glass-strong);
  border: 2px solid var(--glass-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  flex-shrink: 0;
  z-index: 1;
}
.emp-tl-marker.ontime { border-color: var(--brand); }
.emp-tl-marker.late { border-color: var(--brand-danger); }
.emp-tl-marker.absent { border-color: var(--text-secondary); }
.emp-tl-body { flex: 1; min-width: 0; }
.emp-tl-head {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.emp-tl-date { font-weight: 700; font-size: 13px; }
.emp-tl-times { color: var(--text-secondary); font-size: 12px; }
.emp-tl-badges { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; }

/* Work info facts grid */
.emp-facts {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px 16px;
}
.emp-fact {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 6px 0;
  border-bottom: 1px dashed var(--glass-border);
  font-size: 13px;
}
.emp-fact:last-child { border-bottom: none; }
.emp-fact .ef-label { color: var(--text-secondary); font-size: 12px; }
.emp-fact .ef-value { font-weight: 600; text-align: right; }

/* Quick actions row (secondary buttons) */
.emp-actions-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.emp-actions-row .btn { justify-content: center; }

/* Danger zone */
.emp-danger {
  border-color: rgba(239,68,68,0.25);
  background: rgba(239,68,68,0.04);
}
.emp-danger .sec-title.danger { color: var(--brand-danger); }
.emp-danger-body {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.emp-danger-text { font-size: 12px; color: var(--text-secondary); flex: 1; min-width: 200px; }

/* Responsive: stack columns on mobile */
@media (max-width: 720px) {
  .emp-modal.modal-content { max-width: 96%; padding: 16px; }
  .emp-body { grid-template-columns: 1fr; }
  .emp-kpis { grid-template-columns: 1fr 1fr; }
  .emp-statusbar { grid-template-columns: 1fr; }
  .emp-facts { grid-template-columns: 1fr; }
  .emp-actions-row { grid-template-columns: 1fr; }
  .emp-hero { flex-direction: column; text-align: center; }
  .emp-hero .emp-id h2 { justify-content: center; }
  .emp-hero .emp-chips { justify-content: center; }
  .emp-hrow { flex-wrap: wrap; }
  .emp-hrow .h-badges { justify-content: flex-start; }
}

/* ── Add Employee (photo upload) ───────────────────────────── */
.photo-upload-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 160px;
  border: 2px dashed var(--glass-border);
  border-radius: var(--radius);
  background: var(--glass-strong);
  cursor: pointer;
  transition: all var(--transition);
  text-align: center;
  padding: 20px;
  color: var(--text-secondary);
}
.photo-upload-box:hover {
  border-color: var(--brand);
  color: var(--text);
  background: rgba(34, 197, 94, 0.06);
}
.photo-upload-box .upload-icon {
  font-size: 36px;
  opacity: 0.7;
}
.photo-upload-box .upload-text {
  font-size: 13px;
  font-weight: 600;
}
.photo-upload-box .upload-hint {
  font-size: 12px;
  opacity: 0.8;
}
.photo-upload-preview {
  display: none;
  width: 100%;
  max-width: 220px;
  margin: 12px auto 0;
}
.photo-upload-preview img {
  width: 100%;
  border-radius: var(--radius);
  border: 2px solid var(--brand);
  box-shadow: 0 0 24px rgba(34, 197, 94, 0.25);
  object-fit: cover;
  aspect-ratio: 1 / 1;
}
.photo-upload-preview.show {
  display: block;
}
.add-emp-status {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  display: none;
}
.add-emp-status.ok {
  display: block;
  background: rgba(34, 197, 94, 0.08);
  border: 1px solid rgba(34, 197, 94, 0.25);
  color: var(--text);
}
.add-emp-status.err {
  display: block;
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.25);
  color: var(--text);
}

/* ════════════════════════════════════════════════════════════════════
   PREMIUM SAAS GRID — design identity override (emerald #10b981)
   Reference: premium_saas_grid.html — emerald brand, light #F8FAFC
   surface, Inter font, white sidebar with accent bar, employee cards
   with pills + "Maosh (Oylik)" footer, rose error cards with CTA.
   Applied purely as CSS — NO logic changes.
   ════════════════════════════════════════════════════════════════════ */

/* ── Emerald brand identity ─────────────────────────────────────── */
:root {
  --brand: #10b981;
  --brand-glow: rgba(16, 185, 129, 0.45);
  --brand-deep: #065f46;
  --brand-50: #ecfdf5;
  --brand-100: #d1fae5;
  --brand-600: #059669;
  --brand-700: #047857;
  --brand-rose: #f43f5e;
  --brand-rose-50: #fff1f2;
  --brand-rose-100: #ffe4e6;
  --brand-rose-200: #fecdd3;
  --brand-rose-600: #e11d48;
  --surface: #f8fafc;
  --surface-card: #ffffff;
  --border-soft: #e2e8f0;
  --border-soft-60: rgba(226, 232, 240, 0.6);
  --brand-ink: #0f172a;
  --brand-slate-500: #64748b;
  --brand-slate-400: #94a3b8;
  --brand-slate-600: #475569;
}

[data-theme="light"] {
  --bg: var(--surface);
  --bg-card: var(--surface-card);
  --text: var(--brand-ink);
  --text-secondary: var(--brand-slate-600);
  --text-muted: var(--brand-slate-500);
  --brand: #10b981;
  --brand-glow: rgba(16, 185, 129, 0.35);
  --glass: rgba(255, 255, 255, 0.85);
  --glass-strong: rgba(255, 255, 255, 0.95);
  --glass-border: var(--border-soft-60);
  --glass-highlight: rgba(255, 255, 255, 1);
  --hover: rgba(15, 23, 42, 0.045);
  --shadow-card: 0 1px 3px rgba(15, 23, 42, 0.05), 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-float: 0 12px 32px rgba(15, 23, 42, 0.10), 0 0 0 1px rgba(226, 232, 240, 0.7);
  --shadow-soft: 0 8px 24px rgba(15, 23, 42, 0.07);
}

/* ── Inter font (fallback to system) ────────────────────────────── */
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
}

/* ── Light sidebar — premium white + emerald accent bar ─────────── */
[data-theme="light"] .sidebar {
  width: 260px;
  background: var(--surface-card);
  border-right: 1px solid var(--border-soft-60);
}
[data-theme="light"] .content {
  margin-left: 260px;
}
[data-theme="light"] .sidebar-link {
  color: var(--brand-slate-500);
  border-radius: 10px;
  margin: 1px 8px;
  padding: 10px 14px;
  position: relative;
}
[data-theme="light"] .sidebar-link:hover {
  background: var(--brand-50);
  color: var(--brand-600);
}
[data-theme="light"] .sidebar-link.active {
  background: rgba(16, 185, 129, 0.08);
  color: var(--brand-600);
  font-weight: 600;
  box-shadow: none;
}
[data-theme="light"] .sidebar-link.active::before {
  content: '';
  position: absolute;
  left: -8px;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 22px;
  border-radius: 0 999px 999px 0;
  background: var(--brand);
}
[data-theme="light"] .bottom-link.active {
  color: var(--brand-600);
}

/* ── Navbar — frosted white ─────────────────────────────────────── */
[data-theme="light"] .navbar {
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--border-soft-60);
}

/* ── Cards — clean white surfaces ───────────────────────────────── */
[data-theme="light"] .card,
[data-theme="light"] .stat-circle {
  background: var(--surface-card);
  border: 1px solid var(--border-soft);
  border-radius: 20px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
[data-theme="light"] .card:hover {
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
}

/* ── Employee cards — premium pills + salary footer ─────────────── */
[data-theme="light"] .employee-card {
  background: var(--surface-card);
  border: 1px solid var(--border-soft);
  border-radius: 20px;
  padding: 20px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
[data-theme="light"] .employee-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.10), 0 0 0 1px rgba(226, 232, 240, 0.8);
  border-color: var(--border-soft);
}
[data-theme="light"] .employee-grid {
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}
[data-theme="light"] .emp-photo {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  box-shadow: 0 0 0 2px #fff, 0 2px 8px rgba(15, 23, 42, 0.10);
}
[data-theme="light"] .emp-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--brand-ink);
}
[data-theme="light"] .emp-details {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}

/* Position + shift → pill chips (like premium grid) */
[data-theme="light"] .employee-card .emp-meta:first-of-type {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 600;
  color: var(--brand-slate-600);
  background: #f8fafc;
  border: 1px solid var(--border-soft-60);
  border-radius: 8px;
  padding: 3px 10px;
  margin-top: 0;
}
[data-theme="light"] .employee-card .emp-meta:nth-of-type(2) {
  font-size: 11px;
  color: var(--brand-slate-400);
}

/* Salary → "Maosh (Oylik)" footer with top border, emerald amount */
[data-theme="light"] .employee-card .emp-meta:last-of-type {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  width: 100%;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border-soft-60);
  font-size: 14px;
  font-weight: 700;
  color: var(--brand-ink) !important;
}
[data-theme="light"] .employee-card .emp-meta:last-of-type::before {
  content: 'Maosh (Oylik)';
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--brand-slate-500);
}
[data-theme="light"] .employee-card .emp-meta:last-of-type:empty::after {
  content: '—';
  color: var(--brand-slate-400);
}

/* ── Rose error cards (missing shift / position / salary) ───────── */
[data-theme="light"] .employee-card.emp-incomplete {
  background: var(--brand-rose-50);
  border: 1px solid var(--brand-rose-200);
}
[data-theme="light"] .employee-card.emp-incomplete:hover {
  border-color: var(--brand-rose-600);
  box-shadow: 0 12px 32px rgba(225, 29, 72, 0.10), 0 0 0 1px var(--brand-rose-200);
}
[data-theme="light"] .employee-card.emp-incomplete .emp-name {
  color: var(--brand-rose-600);
}
[data-theme="light"] .employee-card.emp-incomplete .emp-warn-badges {
  gap: 4px;
}
[data-theme="light"] .employee-card.emp-incomplete .emp-warn-badge {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.2px;
  padding: 2px 8px;
  color: var(--brand-rose-600);
  background: var(--brand-rose-100);
  border: 1px solid var(--brand-rose-200);
  border-radius: 999px;
  text-transform: none;
}
[data-theme="light"] .employee-card.emp-incomplete .emp-meta:first-of-type {
  background: var(--brand-rose-100);
  border-color: var(--brand-rose-200);
  color: var(--brand-rose-600);
}
[data-theme="light"] .employee-card.emp-incomplete .emp-meta:last-of-type {
  border-top-color: var(--brand-rose-200);
  color: var(--brand-rose-600) !important;
}
[data-theme="light"] .employee-card.emp-incomplete .emp-meta:last-of-type::before {
  color: var(--brand-rose-600);
}

/* ── Data table rows — rose tint for incomplete ─────────────────── */
[data-theme="light"] .data-table {
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  overflow: hidden;
}
[data-theme="light"] .data-table th {
  background: #f8fafc;
  color: var(--brand-slate-500);
  border-bottom: 1px solid var(--border-soft);
}
[data-theme="light"] .data-table td {
  border-bottom: 1px solid var(--border-soft-60);
}
[data-theme="light"] .data-table tr.emp-incomplete {
  background: var(--brand-rose-50);
}
[data-theme="light"] .data-table td.emp-cell-warn {
  color: var(--brand-rose-600);
  font-weight: 600;
}

/* ── Buttons — emerald primary ──────────────────────────────────── */
[data-theme="light"] .btn-primary {
  background: var(--brand);
  border-color: var(--brand);
  box-shadow: 0 1px 2px rgba(16, 185, 129, 0.3);
}
[data-theme="light"] .btn-primary:hover {
  background: var(--brand-600);
  border-color: var(--brand-600);
}

/* ── Structures page — two-column management grid ───────────────── */
.structures-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 16px;
}
@media (max-width: 767px) {
  .structures-grid {
    grid-template-columns: 1fr;
  }
}

/* ── Inputs — clean light fields ────────────────────────────────── */
[data-theme="light"] .inline-form input,
[data-theme="light"] .form-row input,
[data-theme="light"] .form-row select,
[data-theme="light"] .search-input {
  background: var(--surface-card);
  border: 1px solid var(--border-soft);
  color: var(--brand-ink);
  border-radius: 10px;
}
[data-theme="light"] .inline-form input:focus,
[data-theme="light"] .form-row input:focus,
[data-theme="light"] .form-row select:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.12);
}
[data-theme="light"] .history-item {
  border-bottom-color: var(--border-soft-60);
}

/* ── Page header — slate ink ────────────────────────────────────── */
[data-theme="light"] .page-header h1 {
  color: var(--brand-ink);
  letter-spacing: -0.5px;
}
[data-theme="light"] .page-header .subtitle {
  color: var(--brand-slate-500);
}

/* ── Badges & tags — emerald family ─────────────────────────────── */
[data-theme="light"] .badge.ontime,
[data-theme="light"] .emp-status.ontime,
[data-theme="light"] .tag-green {
  background: var(--brand-50);
  border-color: var(--brand-100);
  color: var(--brand-700);
}
[data-theme="light"] .badge.late,
[data-theme="light"] .emp-status.late {
  background: var(--brand-rose-50);
  border-color: var(--brand-rose-200);
  color: var(--brand-rose-600);
}
[data-theme="light"] .badge.absent,
[data-theme="light"] .emp-status.absent {
  background: #fffbeb;
  border-color: #fde68a;
  color: #b45309;
}

/* ── Premium sidebar: logo box + FontAwesome icons ───────────────── */
.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px 22px;
  border-bottom: 1px solid var(--border-soft-60, #f1f5f9);
}
.sidebar-logo-box {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: var(--brand-50, #ecfdf5);
  border: 1px solid var(--brand-100, #d1fae5);
  color: var(--brand-600, #059669);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  flex-shrink: 0;
}
.sidebar-logo-text {
  font-weight: 800;
  font-size: 18px;
  letter-spacing: -0.4px;
  color: var(--brand-ink, #0f172a);
  white-space: nowrap;
}
/* FA icons inside sidebar links (desktop + mobile bottom nav) */
.sidebar-link .icon i,
.bottom-link .bottom-icon i {
  font-size: 16px;
  width: 20px;
  text-align: center;
  color: var(--brand-slate-400, #94a3b8);
  transition: color 0.2s ease;
}
.sidebar-link.active .icon i,
.bottom-link.active .bottom-icon i {
  color: var(--brand-600, #059669);
}
/* Colored hover icons (per reference) */
[data-hover="amber"]:hover .icon i { color: #f59e0b; }
[data-hover="rose"]:hover .icon i { color: #f43f5e; }
[data-hover="blue"]:hover .icon i { color: #3b82f6; }
[data-hover="purple"]:hover .icon i { color: #a855f7; }
[data-hover="yellow"]:hover .icon i { color: #eab308; }
[data-hover="emerald"]:hover .icon i { color: var(--brand, #10b981); }
[data-hover="slate"]:hover .icon i { color: #64748b; }
[data-hover="brand"]:hover .icon i { color: var(--brand-600, #059669); }
/* Bottom nav FA icons sizing */
.bottom-link .bottom-icon i { font-size: 18px; }

/* ── Stable page-header action row (uz/ru switch) ────────────────── */
.page-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.page-actions .btn {
  white-space: nowrap;
}
.page-actions .layout-toggle {
  flex-shrink: 0;
}
/* Keep filter bars aligned when labels differ between languages */
.filters-bar {
  align-items: flex-end;
}
.filters-bar .form-group {
  flex-shrink: 0;
}
.filters-bar .form-group.flex-grow {
  flex: 1 1 160px;
  min-width: 140px;
}

/* ── TOP dashboard (best / worst employee) ───────────────────────── */
.fines-top-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
  margin-bottom: 8px;
}
.fines-top-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  border-radius: 16px;
  border: 1px solid var(--border-soft, #e2e8f0);
  background: var(--surface-card, #fff);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.fines-top-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}
.fines-top-item.best {
  border-left: 4px solid var(--brand, #10b981);
}
.fines-top-item.worst {
  border-left: 4px solid var(--brand-danger, #f43f5e);
}
.fines-top-avatar {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
  background: var(--brand-50, #ecfdf5);
}
.fines-top-item.worst .fines-top-avatar {
  background: var(--brand-rose-50, #fff1f2);
}
.fines-top-info {
  flex: 1;
  min-width: 0;
}
.fines-top-role {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--brand-600, #059669);
}
.fines-top-item.worst .fines-top-role {
  color: var(--brand-rose-600, #e11d48);
}
.fines-top-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--brand-ink, #0f172a);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.fines-top-meta {
  font-size: 12px;
  color: var(--brand-slate-500, #64748b);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.fines-top-nums {
  text-align: right;
  flex-shrink: 0;
}
.fines-top-net {
  font-size: 16px;
  font-weight: 800;
  color: var(--brand-600, #059669);
}
.fines-top-item.worst .fines-top-net {
  color: var(--brand-rose-600, #e11d48);
}
.fines-top-sub {
  font-size: 11px;
  color: var(--brand-slate-400, #94a3b8);
}
.fines-top-hint {
  font-size: 12px;
  color: var(--brand-slate-400, #94a3b8);
  text-align: center;
  margin-top: 4px;
}
