/* SmartAttendance — ERP Light Theme (top-navbar layout) */

:root {
  --sams-primary:      #1E40AF;
  --sams-primary-700:  #1D3A8A;
  --sams-accent:       #0EA5E9;
  --sams-bg:           #F3F6FA;
  --sams-surface:      #FFFFFF;
  --sams-surface-2:    #F8FAFC;
  --sams-border:       #DDE5F0;
  --sams-border-soft:  #E8EEF6;
  --sams-text:         #111827;
  --sams-muted:        #64748B;
  --sams-success:      #16A34A;
  --sams-warning:      #F59E0B;
  --sams-danger:       #DC2626;
  --sams-purple:       #7C3AED;
  --sams-cyan:         #0EA5E9;
  --shadow-sm:  0 1px 2px rgba(15, 23, 42, 0.06);
  --shadow-md:  0 12px 30px rgba(15, 23, 42, 0.08);
  --nav-h:     56px;
  --nav-bg:    #FFFFFF;
  --nav-border:#E2E8F0;
  --nav-text:  #1E293B;
  --nav-active:#1E40AF;
  --nav-hover: #F1F5F9;
}

* { box-sizing: border-box; }
html { min-height: 100%; }

body {
  margin: 0;
  background: var(--sams-bg) !important;
  color: var(--sams-text) !important;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

a { color: var(--sams-primary); }
a:hover { color: var(--sams-accent); }

::-webkit-scrollbar { width: 7px; height: 7px; }
::-webkit-scrollbar-track { background: #EAF0F8; }
::-webkit-scrollbar-thumb { background: #B9C6D8; border-radius: 999px; }
::-webkit-scrollbar-thumb:hover { background: #94A3B8; }

/* ═══════════════════════════════════════════════════════════
   TOP NAVIGATION BAR
   ═══════════════════════════════════════════════════════════ */

.sams-topnav {
  height: var(--nav-h);
  background: var(--nav-bg);
  border-bottom: 2px solid var(--nav-border);
  display: flex;
  align-items: center;
  padding: 0 18px;
  position: sticky;
  top: 0;
  z-index: 1050;
  box-shadow: 0 2px 8px rgba(15,23,42,0.07);
  gap: 0;
  flex-shrink: 0;
}

/* Brand */
.sams-topnav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none !important;
  padding-right: 18px;
  border-right: 1px solid var(--nav-border);
  margin-right: 6px;
  flex-shrink: 0;
}

.sams-brand-box {
  width: 36px;
  height: 36px;
  background: var(--sams-primary);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 18px;
  flex-shrink: 0;
}

/* Legacy icon inside brand (hidden — box used instead) */
.sams-topnav-brand > i { display: none; }

.sams-topnav-brand-name {
  font-size: 16px;
  font-weight: 800;
  color: var(--sams-text);
  white-space: nowrap;
  line-height: 1.1;
}

.sams-topnav-brand-sub {
  font-size: 9px;
  font-weight: 700;
  color: var(--sams-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  line-height: 1;
}

/* Nav menu container */
.sams-topnav-menu {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-width: 0;
  height: 100%;
}

/* Nav links list */
.sams-topnav-links {
  display: flex;
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 0;
  height: 100%;
  overflow: visible;
}

.sams-topnav-links > li {
  position: relative;
  height: 100%;
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

/* Individual nav link / dropdown trigger */
.sams-nav-link,
.sams-nav-droptrigger {
  display: flex;
  align-items: center;
  gap: 5px;
  height: 100%;
  padding: 0 12px;
  color: var(--nav-text) !important;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none !important;
  border: none;
  background: none !important;
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.13s, background 0.13s;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  line-height: var(--nav-h);
}

.sams-nav-link:hover,
.sams-nav-droptrigger:hover {
  color: var(--nav-active) !important;
  background: rgba(30,64,175,0.04) !important;
}

.sams-nav-link.active,
.sams-nav-droptrigger.active {
  color: var(--nav-active) !important;
  background: rgba(30,64,175,0.06) !important;
  border-bottom-color: var(--nav-active);
}

.sams-nav-droptrigger::after { display: none; }
.sams-nav-droptrigger .drop-chevron {
  font-size: 10px;
  margin-left: 1px;
  transition: transform 0.15s;
}

/* Hover-open for desktop dropdowns */
@media (min-width: 992px) {
  .sams-topnav-links li.dropdown:hover > .dropdown-menu { display: block; }
}

/* Dropdown menu styling */
.sams-topnav-links .dropdown-menu {
  border-radius: 8px !important;
  border: 1px solid var(--nav-border) !important;
  box-shadow: 0 8px 24px rgba(15,23,42,0.13) !important;
  padding: 5px 0 !important;
  min-width: 215px;
  margin-top: 0 !important;
  z-index: 1100;
  max-height: calc(100vh - var(--nav-h) - 12px);
  overflow-y: auto;
}

.sams-topnav-links .dropdown-item {
  font-size: 13px;
  font-weight: 500;
  padding: 9px 16px;
  color: var(--nav-text) !important;
  display: flex;
  align-items: center;
  gap: 9px;
}

.sams-topnav-links .dropdown-item:hover {
  background: var(--nav-hover) !important;
  color: var(--nav-active) !important;
}

.sams-topnav-links .dropdown-item i {
  width: 15px;
  text-align: center;
  color: var(--sams-muted);
  font-size: 13px;
}

.sams-topnav-links .dropdown-divider {
  border-color: var(--nav-border) !important;
  margin: 4px 0 !important;
}

/* Right-side controls */
.sams-topnav-right {
  display: flex;
  align-items: center;
  gap: 7px;
  padding-left: 12px;
  flex-shrink: 0;
  margin-left: auto;
}

/* Branch button */
.sams-branch-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  background: #EFF6FF !important;
  border: 1px solid #BFDBFE !important;
  border-radius: 7px !important;
  color: var(--sams-primary) !important;
  font-size: 12px;
  font-weight: 700;
  max-width: 175px;
  overflow: hidden;
  white-space: nowrap;
}

.sams-branch-btn::after { margin-left: 2px; }

.sams-branch-display {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  background: #F8FAFC;
  border: 1px solid var(--nav-border);
  border-radius: 7px;
  color: var(--sams-muted);
  font-size: 12px;
  font-weight: 600;
}

/* Live clock */
.sams-nav-clock {
  padding: 5px 10px;
  background: #F8FAFC;
  border: 1px solid var(--nav-border);
  border-radius: 7px;
  color: var(--sams-primary);
  font-size: 12px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  min-width: 86px;
  text-align: center;
}

/* ── Birthday Bell Button ─────────────────────────────── */
/* ── Pending-Approval Notification Bell ─────────────────────── */
.sams-notif-bell {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  padding: 0;
  background: linear-gradient(135deg, #1e40af, #3b82f6) !important;
  border: none !important;
  border-radius: 50% !important;
  color: #fff !important;
  font-size: 16px;
  cursor: pointer;
  box-shadow: 0 3px 12px rgba(59,130,246,0.45);
  transition: transform 0.2s, box-shadow 0.2s;
}
.sams-notif-bell:hover {
  transform: scale(1.08);
  box-shadow: 0 5px 18px rgba(59,130,246,0.65) !important;
}
.sams-notif-bell::after { display: none !important; }

.sams-notif-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 999px;
  background: #ef4444;
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  line-height: 18px;
  text-align: center;
  pointer-events: none;
  border: 2px solid var(--sams-topnav-bg, #0f172a);
  animation: notif-pulse 2s ease-in-out infinite;
}
@keyframes notif-pulse {
  0%, 100% { transform: scale(1); }
  50%       { transform: scale(1.15); }
}

.sams-notif-dropdown {
  border-radius: 14px !important;
  border: 1px solid #e5e7eb !important;
  background: #ffffff !important;
  box-shadow: 0 12px 40px rgba(0,0,0,0.13) !important;
  overflow: hidden;
  padding: 0 !important;
}

.sams-notif-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  background: linear-gradient(135deg, #1e40af, #3b82f6);
  color: #fff;
}
.sams-notif-header-title {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.03em;
}
.sams-notif-header-sub {
  font-size: 11px;
  opacity: 0.75;
  margin-top: 1px;
}
.sams-notif-header-count {
  margin-left: auto;
  background: rgba(255,255,255,0.25);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  min-width: 24px;
  height: 24px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 6px;
}

.sams-notif-section {
  padding: 10px 16px 6px;
}
.sams-notif-section-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: #9ca3af;
  margin-bottom: 6px;
}
.sams-notif-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 10px;
  text-decoration: none !important;
  color: #1e293b !important;
  transition: background 0.15s;
  margin-bottom: 4px;
}
.sams-notif-row:hover {
  background: #f1f5f9;
}
.sams-notif-row-icon {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  flex-shrink: 0;
}
.icon-leave     { background: rgba(245,158,11,0.12); color: #d97706; }
.icon-training  { background: rgba(99,102,241,0.12); color: #6366f1; }
.icon-violation { background: rgba(239,68,68,0.12);  color: #ef4444; }

.sams-notif-row-info { flex: 1; min-width: 0; }
.sams-notif-row-title {
  font-size: 12.5px;
  font-weight: 600;
  color: #1e293b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sams-notif-row-sub {
  font-size: 11px;
  color: #9ca3af;
  margin-top: 1px;
}
.sams-notif-count {
  background: #ef4444;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  min-width: 22px;
  height: 22px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 6px;
  flex-shrink: 0;
}
.sams-notif-count.cnt-zero {
  background: #e5e7eb;
  color: #9ca3af;
}
.sams-notif-footer {
  padding: 10px 16px;
  border-top: 1px solid #f1f5f9;
  font-size: 11px;
  color: #6b7280;
  text-align: center;
  background: #f9fafb;
}
.sams-notif-divider {
  height: 1px;
  background: #f1f5f9;
  margin: 2px 16px;
}

/* ── Notification quick-action items ─────────────────────────── */
.sams-notif-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border-radius: 9px;
  margin-bottom: 3px;
  background: #f8fafc;
  border: 1px solid #f1f5f9;
}
.sams-notif-item-info {
  flex: 1;
  min-width: 0;
}
.sams-notif-item-name {
  font-size: 12.5px;
  font-weight: 600;
  color: #1e293b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sams-notif-item-meta {
  font-size: 11px;
  color: #6b7280;
  margin-top: 1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sams-notif-item-actions {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
}
.sams-qa-btn {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
  padding: 0;
}
.sams-qa-btn:active { transform: scale(0.92); }
.sams-qa-approve {
  background: rgba(34,197,94,0.12);
  color: #16a34a;
}
.sams-qa-approve:hover { background: rgba(34,197,94,0.22); }
.sams-qa-reject {
  background: rgba(239,68,68,0.10);
  color: #dc2626;
}
.sams-qa-reject:hover { background: rgba(239,68,68,0.20); }
.sams-notif-viewall {
  display: block;
  font-size: 11px;
  color: #3b82f6;
  text-align: right;
  padding: 2px 4px 4px;
  text-decoration: none;
}
.sams-notif-viewall:hover { text-decoration: underline; }
.sams-notif-empty {
  font-size: 11.5px;
  color: #9ca3af;
  padding: 6px 4px;
  text-align: center;
}

/* ── Birthday Bell ───────────────────────────────────────────── */
.sams-bday-bell {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  padding: 0;
  background: linear-gradient(135deg, #ff6b6b, #e94560) !important;
  border: none !important;
  border-radius: 50% !important;
  color: #fff !important;
  font-size: 16px;
  cursor: pointer;
  box-shadow: 0 3px 12px rgba(233,69,96,0.5);
  animation: bday-bell-ring 1.4s ease-in-out infinite;
  transition: transform 0.2s, box-shadow 0.2s;
}
.sams-bday-bell:hover {
  transform: scale(1.08);
  box-shadow: 0 5px 18px rgba(233,69,96,0.65) !important;
}
.sams-bday-bell::after { display: none !important; }

.sams-bday-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  background: #fff;
  color: #e94560;
  font-size: 9px;
  font-weight: 900;
  border-radius: 50%;
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  border: 2px solid #e94560;
  box-shadow: 0 1px 4px rgba(0,0,0,0.15);
}

/* ── Birthday Dropdown Panel ──────────────────────────── */
.sams-bday-dropdown {
  border-radius: 16px !important;
  box-shadow: 0 12px 40px rgba(0,0,0,0.18) !important;
  border: 1px solid rgba(233,69,96,0.15) !important;
  overflow: hidden;
  padding: 0 !important;
}

/* Header */
.sams-bday-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 18px 14px;
  background: linear-gradient(135deg, #fff0f3, #ffe4ea);
  border-bottom: 1px solid rgba(233,69,96,0.12);
}
.sams-bday-header-icon {
  font-size: 28px;
  line-height: 1;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
}
.sams-bday-header-title {
  font-weight: 700;
  font-size: 14px;
  color: #c0392b;
  line-height: 1.2;
}
.sams-bday-header-sub {
  font-size: 11px;
  color: #e94560;
  opacity: 0.75;
  margin-top: 2px;
}
.sams-bday-header-count {
  margin-left: auto;
  background: #e94560;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  border-radius: 20px;
  padding: 3px 10px;
  flex-shrink: 0;
}

/* Employee list wrapper */
.sams-bday-list {
  display: block;
  max-height: 260px;
  overflow-y: auto;
  padding: 8px 0;
}
.sams-bday-list::-webkit-scrollbar { width: 4px; }
.sams-bday-list::-webkit-scrollbar-track { background: transparent; }
.sams-bday-list::-webkit-scrollbar-thumb { background: rgba(233,69,96,0.25); border-radius: 4px; }

/* Single employee row */
.sams-bday-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 18px;
  text-decoration: none !important;
  transition: background 0.15s;
}
.sams-bday-item:hover {
  background: #fff5f6;
}

.sams-bday-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ff6b6b, #e94560);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 800;
  font-size: 15px;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(233,69,96,0.3);
}

.sams-bday-info { flex: 1; min-width: 0; }

.sams-bday-name {
  font-weight: 600;
  font-size: 13px;
  color: #1a1a2e;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sams-bday-meta {
  font-size: 11px;
  color: #999;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sams-bday-age {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: linear-gradient(135deg, #fff0f3, #ffe4ea);
  border: 1px solid rgba(233,69,96,0.2);
  border-radius: 10px;
  padding: 4px 10px;
  flex-shrink: 0;
}
.sams-bday-age span {
  font-weight: 800;
  font-size: 15px;
  color: #e94560;
  line-height: 1;
}
.sams-bday-age small {
  font-size: 9px;
  color: #e94560;
  opacity: 0.7;
  line-height: 1;
}

/* Footer */
.sams-bday-footer {
  text-align: center;
  padding: 10px 18px;
  font-size: 11px;
  color: #e94560;
  background: linear-gradient(135deg, #fff8f9, #fff0f3);
  border-top: 1px solid rgba(233,69,96,0.1);
  font-style: italic;
}

/* Bell ring animation */
@keyframes bday-bell-ring {
  0%, 55%, 100% { transform: rotate(0deg); }
  5%  { transform: rotate(22deg); }
  15% { transform: rotate(-18deg); }
  25% { transform: rotate(14deg); }
  35% { transform: rotate(-9deg); }
  45% { transform: rotate(4deg); }
}

/* User button */
.sams-user-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 8px 4px 4px;
  background: #F8FAFC !important;
  border: 1px solid var(--nav-border) !important;
  border-radius: 7px !important;
  color: var(--nav-text) !important;
}

.sams-user-btn::after { margin-left: 2px; }

.sams-user-avatar {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--sams-primary), var(--sams-accent));
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  border-radius: 6px;
  text-transform: uppercase;
  flex-shrink: 0;
}

.sams-user-name {
  font-size: 12px;
  font-weight: 600;
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Mobile nav toggler */
.sams-nav-toggler {
  background: none;
  border: 1px solid var(--nav-border);
  border-radius: 7px;
  padding: 5px 9px;
  cursor: pointer;
  font-size: 19px;
  color: var(--nav-text);
  display: none;
  margin-left: 8px;
  line-height: 1;
}

/* ═══════════════════════════════════════════════════════════
   PAGE HEADER BAR (breadcrumb + title area)
   ═══════════════════════════════════════════════════════════ */

.sams-page-header {
  background: #FFFFFF;
  border-bottom: 1px solid var(--sams-border);
  padding: 11px 26px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  min-height: 48px;
  flex-shrink: 0;
}

.sams-page-title {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
  color: var(--sams-text);
  line-height: 1.2;
}

.sams-page-subtitle {
  color: var(--sams-muted);
  font-size: 12px;
  margin-top: 1px;
  margin-bottom: 0;
}

.sams-page-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 7px;
}

/* ═══════════════════════════════════════════════════════════
   MAIN CONTENT + FOOTER
   ═══════════════════════════════════════════════════════════ */

.sams-content {
  padding: 22px 26px;
  flex: 1;
  background: var(--sams-bg);
}

.sams-footer {
  text-align: center;
  padding: 11px 18px;
  border-top: 1px solid var(--sams-border);
  color: var(--sams-muted);
  font-size: 11px;
  background: #FFFFFF;
  flex-shrink: 0;
}

/* ═══════════════════════════════════════════════════════════
   DASHBOARD HERO
   ═══════════════════════════════════════════════════════════ */

.dashboard-hero {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 22px;
  background: #FFFFFF;
  border: 1px solid var(--sams-border);
  border-radius: 8px;
  padding: 24px;
  margin-bottom: 18px;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}

.dashboard-hero::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 4px;
  background: linear-gradient(90deg, var(--sams-primary), var(--sams-accent));
}

.dashboard-hero h2 {
  margin: 6px 0 7px;
  color: var(--sams-text);
  font-size: 26px;
  font-weight: 800;
}

.dashboard-hero p {
  margin: 0;
  color: var(--sams-muted);
  max-width: 720px;
}

.eyebrow {
  color: var(--sams-primary);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.hero-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(110px, 1fr));
  gap: 12px;
  min-width: 260px;
}

.hero-metrics > div {
  background: var(--sams-surface-2);
  border: 1px solid var(--sams-border-soft);
  border-radius: 8px;
  padding: 16px;
}

.hero-metrics span {
  display: block;
  color: var(--sams-primary);
  font-size: 28px;
  font-weight: 800;
  line-height: 1;
}

.hero-metrics small {
  color: var(--sams-muted);
  font-weight: 700;
}

/* ═══════════════════════════════════════════════════════════
   CARDS
   ═══════════════════════════════════════════════════════════ */

.sams-card,
.card.sams-card {
  background: var(--sams-surface) !important;
  border: 1px solid var(--sams-border) !important;
  border-radius: 8px !important;
  box-shadow: var(--shadow-sm) !important;
}

.sams-card .card-header {
  background: #FFFFFF !important;
  border-bottom: 1px solid var(--sams-border-soft) !important;
  padding: 14px 18px;
  color: var(--sams-text) !important;
}

.sams-card .card-body { color: var(--sams-text); }

.sams-card .card-footer {
  background: var(--sams-surface-2) !important;
  border-top: 1px solid var(--sams-border-soft) !important;
  padding: 12px 18px;
  color: var(--sams-muted) !important;
}

/* ═══════════════════════════════════════════════════════════
   STAT CARDS
   ═══════════════════════════════════════════════════════════ */

.stat-card {
  min-height: 154px;
  background: #FFFFFF;
  border: 1px solid var(--sams-border);
  border-radius: 8px;
  padding: 18px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

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

.stat-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 18px;
}

.stat-icon {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  background: #EFF6FF;
  color: var(--sams-primary);
}

.stat-chip {
  color: var(--sams-muted);
  background: var(--sams-surface-2);
  border: 1px solid var(--sams-border-soft);
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.stat-value {
  color: var(--sams-text);
  font-size: 30px;
  font-weight: 850;
  line-height: 1;
}

.stat-money { font-size: 22px; word-break: break-word; }

.stat-label {
  color: var(--sams-muted);
  font-size: 12px;
  font-weight: 700;
  margin-top: 8px;
}

.stat-card-blue   { border-top: 3px solid var(--sams-primary) !important; }
.stat-card-green  { border-top: 3px solid var(--sams-success) !important; }
.stat-card-yellow { border-top: 3px solid var(--sams-warning) !important; }
.stat-card-red    { border-top: 3px solid var(--sams-danger) !important; }
.stat-card-purple { border-top: 3px solid var(--sams-purple) !important; }
.stat-card-cyan   { border-top: 3px solid var(--sams-accent) !important; }

.stat-card-green  .stat-icon { background: #DCFCE7; color: var(--sams-success); }
.stat-card-yellow .stat-icon { background: #FEF3C7; color: var(--sams-warning); }
.stat-card-red    .stat-icon { background: #FEE2E2; color: var(--sams-danger); }
.stat-card-purple .stat-icon { background: #EDE9FE; color: var(--sams-purple); }
.stat-card-cyan   .stat-icon { background: #E0F2FE; color: var(--sams-accent); }

.chart-controls { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.chart-controls .form-select { width: auto; min-width: 96px; }
.branch-total-strip > div { min-width: 64px; }

/* ═══════════════════════════════════════════════════════════
   TABLES
   ═══════════════════════════════════════════════════════════ */

.table-responsive { border-radius: 0 0 8px 8px; }

.table {
  margin: 0;
  color: var(--sams-text) !important;
  --bs-table-bg: transparent !important;
  --bs-table-color: var(--sams-text) !important;
  --bs-table-border-color: var(--sams-border-soft) !important;
  --bs-table-hover-bg: #F8FAFC !important;
  --bs-table-striped-bg: #F8FAFC !important;
}

.table-dark {
  --bs-table-bg: transparent !important;
  --bs-table-color: var(--sams-text) !important;
  --bs-table-border-color: var(--sams-border-soft) !important;
  --bs-table-hover-bg: #F8FAFC !important;
  background: transparent !important;
  color: var(--sams-text) !important;
}

.table-dark > :not(caption) > * > * {
  background-color: transparent !important;
  color: var(--sams-text) !important;
  border-color: var(--sams-border-soft) !important;
}

.table thead th {
  background: #F8FAFC !important;
  color: #334155 !important;
  border-bottom: 1px solid var(--sams-border) !important;
  padding: 12px 16px;
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
  white-space: nowrap;
}

.table tbody td {
  padding: 12px 16px;
  vertical-align: middle;
  border-bottom: 1px solid var(--sams-border-soft);
  color: var(--sams-text) !important;
  background-color: transparent !important;
}

.table tbody tr:hover > * { background: #F8FAFC !important; }

.table-borderless td,
.table-borderless th { border: 0 !important; }

/* ═══════════════════════════════════════════════════════════
   FORMS
   ═══════════════════════════════════════════════════════════ */

.form-control,
.form-select {
  min-height: 40px;
  background: #FFFFFF !important;
  border: 1px solid #CBD5E1 !important;
  color: var(--sams-text) !important;
  border-radius: 8px !important;
  font-size: 14px;
  box-shadow: none !important;
}

.form-control-sm,
.form-select-sm { min-height: 34px; }

.form-control:focus,
.form-select:focus {
  border-color: var(--sams-accent) !important;
  box-shadow: 0 0 0 4px rgba(14,165,233,0.14) !important;
  outline: none !important;
}

.form-control::placeholder { color: #94A3B8 !important; }

.input-group-text {
  background: #F8FAFC !important;
  border: 1px solid #CBD5E1 !important;
  color: var(--sams-muted) !important;
  border-radius: 8px !important;
}

.input-group > .input-group-text:not(:last-child)  { border-top-right-radius: 0 !important; border-bottom-right-radius: 0 !important; }
.input-group > .form-control:not(:first-child)     { border-top-left-radius: 0 !important; border-bottom-left-radius: 0 !important; }
.input-group > .form-control:not(:last-child)      { border-top-right-radius: 0 !important; border-bottom-right-radius: 0 !important; }
.input-group > .input-group-text:not(:first-child),
.input-group > .btn:not(:first-child)              { border-top-left-radius: 0 !important; border-bottom-left-radius: 0 !important; }

.form-label {
  color: #475569 !important;
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}

.form-text { color: var(--sams-muted) !important; font-size: 12px; }

.form-check-input {
  border-color: #CBD5E1 !important;
  background-color: #FFFFFF !important;
}

.form-check-input:checked {
  background-color: var(--sams-primary) !important;
  border-color: var(--sams-primary) !important;
}

.form-check-label { color: var(--sams-text) !important; }

.section-label {
  color: var(--sams-primary);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
  border-bottom: 1px solid var(--sams-border);
  padding-bottom: 8px;
}

/* ═══════════════════════════════════════════════════════════
   BUTTONS
   ═══════════════════════════════════════════════════════════ */

.btn {
  border-radius: 8px !important;
  font-weight: 750;
  font-size: 13px;
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
}

.btn-sm { min-height: 34px; }
.btn-lg { min-height: 48px; }
.btn-xs { padding: 2px 8px !important; min-height: 26px; font-size: 11px !important; }

.btn-primary {
  background: var(--sams-primary) !important;
  border-color: var(--sams-primary) !important;
  color: #fff !important;
  box-shadow: 0 8px 18px rgba(30, 64, 175, 0.18);
}

.btn-primary:hover {
  background: var(--sams-primary-700) !important;
  border-color: var(--sams-primary-700) !important;
}

.btn-warning {
  background: var(--sams-warning) !important;
  border-color: var(--sams-warning) !important;
  color: #111827 !important;
}

.btn-danger {
  background: var(--sams-danger) !important;
  border-color: var(--sams-danger) !important;
}

.btn-outline-primary   { color: var(--sams-primary) !important; border-color: #AFC1F2 !important; }
.btn-outline-primary:hover { color: #fff !important; background: var(--sams-primary) !important; border-color: var(--sams-primary) !important; }
.btn-outline-secondary { color: #475569 !important; border-color: #CBD5E1 !important; }
.btn-outline-secondary:hover { color: var(--sams-text) !important; background: #F1F5F9 !important; border-color: #94A3B8 !important; }
.btn-outline-danger    { color: var(--sams-danger) !important; border-color: #FCA5A5 !important; }
.btn-outline-danger:hover { color: #fff !important; background: var(--sams-danger) !important; border-color: var(--sams-danger) !important; }
.btn-outline-success   { color: var(--sams-success) !important; border-color: #86EFAC !important; }
.btn-outline-success:hover { color: #fff !important; background: var(--sams-success) !important; border-color: var(--sams-success) !important; }
.btn-outline-warning   { color: #B45309 !important; border-color: #FCD34D !important; }
.btn-outline-warning:hover { color: #111827 !important; background: var(--sams-warning) !important; border-color: var(--sams-warning) !important; }
.btn-outline-info      { color: #0369A1 !important; border-color: #7DD3FC !important; }
.btn-outline-info:hover { color: #fff !important; background: var(--sams-accent) !important; border-color: var(--sams-accent) !important; }
.btn-link { color: var(--sams-primary) !important; }

/* ═══════════════════════════════════════════════════════════
   TABS
   ═══════════════════════════════════════════════════════════ */

.sams-tabs {
  border-bottom: 1px solid var(--sams-border) !important;
  gap: 4px;
}

.sams-tabs .nav-link {
  color: var(--sams-muted);
  border: 1px solid transparent !important;
  border-radius: 8px 8px 0 0 !important;
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 750;
}

.sams-tabs .nav-link:hover { color: var(--sams-primary); background: #EFF6FF; }

.sams-tabs .nav-link.active {
  color: var(--sams-primary) !important;
  background: #FFFFFF !important;
  border-color: var(--sams-border) var(--sams-border) #FFFFFF !important;
}

/* ═══════════════════════════════════════════════════════════
   AVATARS
   ═══════════════════════════════════════════════════════════ */

.emp-avatar,
.emp-avatar-sm {
  border-radius: 8px;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-weight: 850;
  text-transform: uppercase;
  background: linear-gradient(135deg, var(--sams-primary), var(--sams-accent));
}

.emp-avatar    { width: 38px; height: 38px; font-size: 14px; }
.emp-avatar-sm { width: 32px; height: 32px; font-size: 12px; }

/* ═══════════════════════════════════════════════════════════
   MINI ATTENDANCE CARDS
   ═══════════════════════════════════════════════════════════ */

.mini-attendance-card {
  background: #FFFFFF;
  border: 1px solid var(--sams-border);
  border-radius: 8px;
  padding: 13px;
  min-height: 104px;
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.mini-attendance-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.mini-attendance-card.status-present  { border-left: 4px solid var(--sams-success) !important; }
.mini-attendance-card.status-late     { border-left: 4px solid var(--sams-warning) !important; }
.mini-attendance-card.status-absent   { border-left: 4px solid var(--sams-danger) !important; }
.mini-attendance-card.status-leave    { border-left: 4px solid var(--sams-purple) !important; }
.mini-attendance-card.status-holiday,
.mini-attendance-card.status-weekend  { border-left: 4px solid #64748B !important; }

/* ═══════════════════════════════════════════════════════════
   FACE VERIFICATION THUMBNAILS
   ═══════════════════════════════════════════════════════════ */

.face-thumb-link {
  display: inline-flex;
  width: 58px;
  height: 44px;
  border: 1px solid var(--sams-border);
  border-radius: 8px;
  overflow: hidden;
  background: #F8FAFC;
}

.face-thumb { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ═══════════════════════════════════════════════════════════
   BADGES & STATUS
   ═══════════════════════════════════════════════════════════ */

.badge {
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  padding: 0.42em 0.7em;
}

.bg-primary-subtle  { background: #DBEAFE !important; }
.text-primary       { color: var(--sams-primary) !important; }
.border-primary-subtle { border-color: #BFDBFE !important; }
.bg-success-subtle  { background: #DCFCE7 !important; }
.text-success       { color: var(--sams-success) !important; }
.border-success-subtle { border-color: #BBF7D0 !important; }
.bg-warning-subtle  { background: #FEF3C7 !important; }
.text-warning       { color: #B45309 !important; }
.border-warning-subtle { border-color: #FDE68A !important; }
.bg-danger-subtle   { background: #FEE2E2 !important; }
.text-danger        { color: var(--sams-danger) !important; }
.border-danger-subtle  { border-color: #FECACA !important; }
.bg-info-subtle     { background: #E0F2FE !important; }
.text-info          { color: #0369A1 !important; }
.border-info-subtle { border-color: #BAE6FD !important; }
.bg-secondary-subtle { background: #F1F5F9 !important; }
.text-secondary     { color: #475569 !important; }
.text-muted         { color: var(--sams-muted) !important; }
.bg-purple-subtle   { background: #EDE9FE !important; }
.text-purple        { color: var(--sams-purple) !important; }
.border-purple-subtle { border-color: #DDD6FE !important; }

.status-badge-present { background: #DCFCE7 !important; color: var(--sams-success) !important; border: 1px solid #BBF7D0 !important; }
.status-badge-late    { background: #FEF3C7 !important; color: #B45309 !important; border: 1px solid #FDE68A !important; }
.status-badge-absent  { background: #FEE2E2 !important; color: var(--sams-danger) !important; border: 1px solid #FECACA !important; }
.status-badge-leave   { background: #EDE9FE !important; color: var(--sams-purple) !important; border: 1px solid #DDD6FE !important; }
.status-badge-holiday,
.status-badge-weekend { background: #F1F5F9 !important; color: #475569 !important; border: 1px solid #CBD5E1 !important; }

/* ═══════════════════════════════════════════════════════════
   ALERTS
   ═══════════════════════════════════════════════════════════ */

.alert {
  border-radius: 8px !important;
  font-size: 13px;
  border-width: 1px !important;
}

.alert-info    { background: #EFF6FF !important; color: #1D4ED8 !important; border-color: #BFDBFE !important; }
.alert-success { background: #ECFDF5 !important; color: #166534 !important; border-color: #BBF7D0 !important; }
.alert-warning { background: #FFFBEB !important; color: #92400E !important; border-color: #FDE68A !important; }
.alert-danger  { background: #FEF2F2 !important; color: #991B1B !important; border-color: #FECACA !important; }

/* ═══════════════════════════════════════════════════════════
   MISC OVERRIDES
   ═══════════════════════════════════════════════════════════ */

.progress { background: #E2E8F0 !important; border-radius: 999px !important; }

hr { border-color: var(--sams-border) !important; opacity: 1; }
.border-secondary { border-color: var(--sams-border) !important; }

.list-group-item {
  background: transparent !important;
  border-color: var(--sams-border-soft) !important;
  color: var(--sams-text) !important;
}

[style*="background:#1e2235"],
[style*="background:#1a1d2e"],
[style*="background:#252845"],
[style*="background:#374151"] {
  background: #F8FAFC !important;
  color: var(--sams-text) !important;
  border: 1px solid var(--sams-border-soft);
}

[style*="background:#4c1d95"] {
  background: #EDE9FE !important;
  color: var(--sams-purple) !important;
  border-color: #DDD6FE !important;
}

#resultHeader,
#camBadge,
[style*="background:#065f46"] { color: #fff !important; }

.camera-container video {
  border: 1px solid var(--sams-border);
  border-radius: 8px;
}

/* ═══════════════════════════════════════════════════════════
   LOGIN PAGE
   ═══════════════════════════════════════════════════════════ */

.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(circle at top left, rgba(14,165,233,0.16), transparent 32%),
    linear-gradient(135deg, #EFF6FF 0%, #F3F6FA 55%, #FFFFFF 100%);
}

.login-container { width: 100%; max-width: 430px; padding: 24px; }

.login-card {
  background: #FFFFFF;
  border: 1px solid var(--sams-border);
  border-radius: 8px;
  padding: 34px 30px;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.14);
}

.login-brand { text-align: center; margin-bottom: 28px; }

.login-logo {
  width: 62px;
  height: 62px;
  background: linear-gradient(135deg, var(--sams-primary), var(--sams-accent));
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  color: #fff;
  margin-bottom: 14px;
  box-shadow: 0 15px 30px rgba(30, 64, 175, 0.24);
}

.login-title    { margin: 0; color: var(--sams-text); font-size: 25px; font-weight: 850; }
.login-subtitle { color: var(--sams-muted); font-size: 13px; margin: 4px 0 0; }

.login-footer {
  text-align: center;
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px solid var(--sams-border-soft);
}

/* ═══════════════════════════════════════════════════════════
   HOME PAGE — MODULE CARDS
   ═══════════════════════════════════════════════════════════ */

.home-page {
  max-width: none;
  margin: 0;
  padding: 0 14px;
}

.home-welcome {
  background: #FFFFFF;
  border: 1px solid var(--sams-border);
  border-left: 4px solid var(--sams-primary);
  border-radius: 8px;
  padding: 16px 22px;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 14px;
}

.home-welcome::before { display: none; }
.home-welcome::after  { display: none; }
.home-welcome-inner   { position: static; z-index: auto; flex: 1; }

.home-welcome h2 {
  font-size: 17px;
  font-weight: 800;
  margin: 0 0 3px;
  color: var(--sams-text);
}

.home-welcome p {
  margin: 0;
  font-size: 12.5px;
  color: var(--sams-muted);
}

.home-section-label {
  font-size: 10.5px;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--sams-muted);
  letter-spacing: 1.2px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--sams-border);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.home-section-label::before {
  content: '';
  display: inline-block;
  width: 3px;
  height: 13px;
  background: var(--sams-primary);
  border-radius: 2px;
}

.module-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  background: #FFFFFF;
  border: 1px solid var(--sams-border);
  border-radius: 12px;
  padding: 22px 14px 18px;
  text-decoration: none !important;
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
  height: 100%;
  min-height: 148px;
  position: relative;
  overflow: hidden;
}

.module-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(15,23,42,0.12);
  border-color: #c3d0e8;
  text-decoration: none !important;
}

.module-card-icon {
  width: 60px;
  height: 60px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 27px;
  margin-bottom: 14px;
  flex-shrink: 0;
}

.module-card-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--sams-text);
  margin: 0 0 4px;
}

.module-card-desc {
  font-size: 11.5px;
  color: var(--sams-muted);
  margin: 0;
  line-height: 1.4;
}

.module-card-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  min-width: 25px;
  height: 25px;
  padding: 0 7px;
  border-radius: 999px;
  background: var(--sams-danger);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 800;
  box-shadow: 0 8px 18px rgba(220, 38, 38, 0.24);
}

/* DMS solid icon colors — white icon on solid background */
.mc-blue   .module-card-icon { background: #1D4ED8; color: #fff; }
.mc-green  .module-card-icon { background: #16A34A; color: #fff; }
.mc-yellow .module-card-icon { background: #D97706; color: #fff; }
.mc-red    .module-card-icon { background: #DC2626; color: #fff; }
.mc-purple .module-card-icon { background: #7C3AED; color: #fff; }
.mc-cyan   .module-card-icon { background: #0284C7; color: #fff; }
.mc-teal   .module-card-icon { background: #0D9488; color: #fff; }
.mc-orange .module-card-icon { background: #EA580C; color: #fff; }
.mc-pink   .module-card-icon { background: #DB2777; color: #fff; }
.mc-gray   .module-card-icon { background: #374151; color: #fff; }

/* DMS style — no colored top border; icon color alone identifies the module */

/* ═══════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════ */

@media (max-width: 991px) {
  .sams-nav-toggler { display: block; }

  .sams-topnav {
    height: auto;
    padding: 10px 16px;
    flex-wrap: wrap;
    gap: 6px;
  }

  .sams-topnav-brand {
    border-right: none;
    padding-right: 0;
    margin-right: 0;
    flex: 1;
  }

  .sams-topnav-menu {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    height: auto;
    border-top: 1px solid var(--nav-border);
    padding-top: 6px;
    margin-top: 4px;
  }

  .sams-topnav-menu.open { display: flex; }

  .sams-topnav-links {
    flex-direction: column;
    height: auto;
    width: 100%;
    gap: 1px;
    overflow: visible;
  }

  .sams-topnav-links > li {
    height: auto;
    width: 100%;
  }

  .sams-nav-link,
  .sams-nav-droptrigger {
    width: 100%;
    height: auto;
    padding: 10px 12px;
    border-bottom: none;
    border-radius: 7px;
    margin-bottom: 0;
    line-height: 1.4;
  }

  .sams-topnav-links .dropdown-menu {
    position: static !important;
    box-shadow: none !important;
    border-color: var(--nav-border) !important;
    margin: 2px 8px 4px 24px !important;
    width: calc(100% - 32px);
    transform: none !important;
    max-height: none;
    overflow-y: visible;
  }

  .sams-topnav-right {
    width: 100%;
    justify-content: flex-end;
    padding: 8px 0 4px;
    border-top: 1px solid var(--nav-border);
    margin-left: 0;
  }

  .sams-page-header { padding: 10px 16px; }
  .sams-content { padding: 16px; }
  .dashboard-hero { flex-direction: column; }
  .hero-metrics { min-width: 0; }
}

@media (max-width: 768px) {
  .dashboard-hero h2 { font-size: 20px; }
  .hero-metrics { grid-template-columns: 1fr 1fr; }
  .table thead th,
  .table tbody td { padding: 10px 12px; }
}

.sams-table-pagination {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 12px;
  padding: 12px 15px;
  border-top: 1px solid var(--sams-border);
  background: #fff;
}

.sams-page-size {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--sams-muted);
  font-size: 12px;
}

.sams-page-size .form-select { width: 72px; min-height: 30px; }
.sams-pagination-info { color: var(--sams-muted); font-size: 12px; min-width: 115px; text-align: center; }
.sams-pagination-buttons { display: inline-flex; gap: 4px; }
.sams-pagination-buttons .btn { min-width: 32px; padding-left: 8px; padding-right: 8px; }

@media (max-width: 576px) {
  .sams-table-pagination { justify-content: center; }
  .sams-pagination-info { order: 3; width: 100%; }
}

@media (max-width: 576px) {
  .sams-nav-clock { display: none; }
  .sams-user-name { display: none !important; }
  .sams-content { padding: 12px; }
  .stat-card { min-height: 130px; }
  .chart-controls .form-select,
  .chart-controls .btn { width: 100%; }
}

@media (min-width: 992px) {
  body { font-size: 13px; }
  .sams-content { padding: 20px 24px; }
  .stat-card { min-height: 140px; padding: 15px; }
  .stat-icon { width: 38px; height: 38px; font-size: 17px; }
  .stat-value { font-size: 26px; }
  .stat-money { font-size: 19px; }
  .table thead th { padding: 10px 13px; font-size: 10px; }
  .table tbody td { padding: 10px 13px; font-size: 12.5px; }
  .btn { min-height: 34px; font-size: 12.5px; }
  .btn-sm { min-height: 30px; font-size: 12px; }
  .form-control, .form-select { min-height: 36px; font-size: 12.5px; }
  .form-label { font-size: 10px; }
  .badge { font-size: 10px; }
  .sams-card .card-header { padding: 11px 15px; }
  .sams-card .card-body { padding: 14px 15px; }
}

/* ── Custom Searchable Select ── */
.sams-select-wrapper {
  position: relative;
  width: 100%;
}

.sams-select-trigger {
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 6px 12px;
  background-color: #FFFFFF !important;
  border: 1px solid #CBD5E1 !important;
  color: var(--sams-text) !important;
  border-radius: 8px !important;
  font-size: 12.5px;
  min-height: 36px;
  text-align: left;
  cursor: pointer;
  user-select: none;
  box-shadow: none !important;
  transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

@media (max-width: 991px) {
  .sams-select-trigger {
    min-height: 40px;
    font-size: 14px;
  }
}

.sams-select-trigger:focus {
  border-color: var(--sams-accent) !important;
  box-shadow: 0 0 0 4px rgba(14,165,233,0.14) !important;
  outline: none !important;
}

.sams-select-trigger::after {
  content: "";
  display: inline-block;
  width: 0.5em;
  height: 0.5em;
  margin-left: 0.5em;
  border-right: 2px solid var(--sams-muted);
  border-bottom: 2px solid var(--sams-muted);
  transform: rotate(45deg);
  transition: transform 0.2s ease;
  transform-origin: 50% 50%;
  margin-top: -3px;
}

.sams-select-wrapper.open .sams-select-trigger::after {
  transform: rotate(-135deg);
  margin-top: 3px;
}

.sams-select-dropdown {
  position: absolute;
  z-index: 99999;
  display: none;
  background-color: #FFFFFF;
  border: 1px solid var(--sams-border);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(15,23,42,0.18);
  padding: 8px;
  transform-origin: top center;
  animation: samsDropdownShow 0.15s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  min-width: 160px;
}

/* .sams-select-wrapper.open shows the dropdown via JS display toggle now */

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

.sams-select-search-wrapper {
  position: relative;
  margin-bottom: 8px;
}

.sams-select-search {
  width: 100%;
  padding: 6px 12px 6px 32px;
  font-size: 13px;
  border: 1px solid #CBD5E1;
  border-radius: 6px;
  background-color: #FFFFFF;
  color: var(--sams-text);
  min-height: 34px !important;
}

.sams-select-search:focus {
  border-color: var(--sams-accent);
  outline: none;
  box-shadow: 0 0 0 3px rgba(14,165,233,0.1);
}

.sams-select-search-icon {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--sams-muted);
  font-size: 14px;
  pointer-events: none;
}

.sams-select-options {
  max-height: 220px;
  overflow-y: auto;
  padding: 0;
  margin: 0;
  list-style: none;
}

.sams-select-option {
  padding: 6px 10px;
  font-size: 12.5px;
  border-radius: 6px;
  color: var(--sams-text);
  cursor: pointer;
  user-select: none;
  transition: background-color 0.1s ease, color 0.1s ease;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.sams-select-option:hover,
.sams-select-option.highlighted {
  background-color: #EEF6FF;
  color: var(--sams-primary);
}

.sams-select-option.selected {
  background-color: var(--sams-primary);
  color: #FFFFFF;
  font-weight: 600;
}

.sams-select-option.selected:hover {
  background-color: var(--sams-primary-700);
  color: #FFFFFF;
}

.sams-select-no-results {
  padding: 8px 10px;
  font-size: 12.5px;
  color: var(--sams-muted);
  text-align: center;
}

/* ═══════════════════════════════════════════════════════════
   HOME — DMS-STYLE MODULE PORTAL
   ═══════════════════════════════════════════════════════════ */

.home-page { padding-bottom: 10px; }

/* ── Hero banner ─────────────────────────────────────────── */
.home-hero {
  position: relative;
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  background: #FFFFFF;
  border: 1px solid var(--sams-border);
  border-radius: 16px;
  padding: 24px 26px;
  margin-bottom: 22px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
  overflow: hidden;
}

.home-hero::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--sams-primary), var(--sams-accent) 55%, var(--sams-purple));
}

.home-hero-logo {
  width: 76px;
  height: 76px;
  border-radius: 18px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 34px;
  color: #fff;
  background: linear-gradient(135deg, var(--sams-primary), var(--sams-accent));
  box-shadow: 0 10px 22px rgba(30, 64, 175, 0.28);
}

.home-hero-body { flex: 1 1 320px; min-width: 0; }

.home-hero-eyebrow {
  margin: 0 0 3px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--sams-primary);
}

.home-hero-title {
  margin: 0;
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.3px;
  line-height: 1.1;
  color: var(--sams-text);
  text-transform: uppercase;
}

.home-hero-sub {
  margin: 7px 0 0;
  font-size: 13px;
  color: var(--sams-muted);
}

.home-hero-side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  margin-left: auto;
}

.home-hero-pills {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.home-hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border: 1.5px solid var(--sams-border);
  border-radius: 999px;
  background: #fff;
  font-size: 13px;
  font-weight: 700;
  color: var(--sams-text);
  white-space: nowrap;
  max-width: 260px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.home-hero-pill.is-primary { border-color: #C7D5F5; color: var(--sams-primary); }

.home-hero-links {
  display: flex;
  align-items: center;
  gap: 14px;
}

.home-hero-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--sams-muted);
  text-decoration: none;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}
.home-hero-link:hover { color: var(--sams-primary); }

/* ── Module tiles — DMS grid ─────────────────────────────── */
.module-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(228px, 1fr));
  gap: 16px;
  align-items: stretch;
}

.module-grid .module-col { min-width: 0; }

.module-grid .module-card {
  height: 100%;
  min-height: 132px;
  border-radius: 12px;
  border-color: #E7EDF6;
  padding: 16px 10px 14px;
  justify-content: flex-start;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05);
}

.module-grid .module-card:hover {
  border-color: #C7D5F5;
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.11);
}

.module-grid .module-card-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  font-size: 20px;
  margin-bottom: 10px;
  box-shadow: 0 5px 12px rgba(15, 23, 42, 0.12);
}

.module-grid .module-card-title {
  font-size: 12.5px;
  font-weight: 800;
  line-height: 1.25;
  margin: 0 0 4px;
  color: #0F172A;
}

.module-grid .module-card-desc {
  font-size: 10.5px;
  line-height: 1.4;
  color: var(--sams-muted);
}

/* Faint DMS-style grip in the corner */
.module-card-handle {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 19px;
  height: 19px;
  border-radius: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  color: #C3CDDB;
  background: #F4F7FB;
  cursor: grab;
  transition: color 0.15s ease, background 0.15s ease;
}

.module-card:hover .module-card-handle { color: #94A3B8; background: #EDF2F9; }
.module-card-handle:hover { color: var(--sams-primary); background: #E3EAF6; }
.module-card-handle:active { cursor: grabbing; }

.module-col.is-dragging .module-card {
  opacity: 0.45;
  transform: scale(0.97);
  box-shadow: none;
}

.module-col.is-drop-target .module-card {
  border-color: var(--sams-primary);
  box-shadow: 0 0 0 2px rgba(30, 64, 175, 0.18);
}

@media (max-width: 991.98px) { .module-grid { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 14px; } }
@media (max-width: 575.98px) { .module-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; } }

@media (max-width: 767.98px) {
  .home-hero { padding: 18px; gap: 14px; }
  .home-hero-logo { width: 58px; height: 58px; font-size: 26px; border-radius: 15px; }
  .home-hero-title { font-size: 22px; }
  .home-hero-side { margin-left: 0; align-items: flex-start; width: 100%; }
  .home-hero-pills { justify-content: flex-start; }
  .module-grid .module-card { min-height: 122px; padding: 14px 8px 12px; }
  .module-grid .module-card-icon { width: 40px; height: 40px; font-size: 18px; margin-bottom: 8px; border-radius: 11px; }
  .module-grid .module-card-title { font-size: 12px; }
}

/* ═══════════════════════════════════════════════════════════
   HUB TAB STRIP (module group navigation)
   ═══════════════════════════════════════════════════════════ */

.hub-tabs {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
  background: #FFFFFF;
  border: 1px solid var(--sams-border);
  border-radius: 12px;
  padding: 5px;
  margin-bottom: 18px;
  box-shadow: var(--shadow-sm);
}

.hub-tab {
  flex: 1 1 0;
  min-width: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 9px 12px;
  border-radius: 9px;
  font-size: 13px;
  font-weight: 700;
  color: var(--sams-muted);
  text-decoration: none !important;
  white-space: nowrap;
  transition: background 0.15s ease, color 0.15s ease;
}

.hub-tab i { font-size: 14px; flex-shrink: 0; }
.hub-tab span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.hub-tab:hover { background: var(--nav-hover); color: var(--sams-text); }

.hub-tab.active {
  background: var(--sams-primary);
  color: #FFFFFF;
  box-shadow: 0 6px 14px rgba(30, 64, 175, 0.22);
}
.hub-tab.active:hover { background: var(--sams-primary-700); color: #FFFFFF; }

@media (max-width: 767.98px) {
  .hub-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .hub-tabs::-webkit-scrollbar { display: none; }
  .hub-tab { flex: 0 0 auto; padding: 7px 11px; font-size: 12px; }
}

/* ═══════════════════════════════════════════════════════════
   TABLE ACTION COLUMN — always reachable, never clipped
   ═══════════════════════════════════════════════════════════ */

.row-actions {
  display: flex;
  flex-wrap: nowrap;        /* keep the buttons on one line */
  justify-content: flex-end;
  align-items: center;
  gap: 4px;
}

.row-actions > form { margin: 0; }

.row-actions .btn {
  min-height: 0;
  padding: 4px 8px;
  line-height: 1.1;
  font-size: 12px;
}

.row-actions .badge {
  font-size: 10px;
  padding: 4px 7px;
  white-space: nowrap;
}

/* Pin the actions column to the right edge so it stays visible
   while the wide table scrolls horizontally. */
.table .actions-col {
  position: sticky;
  right: 0;
  z-index: 2;
  background: #FFFFFF !important;
  box-shadow: -8px 0 12px -10px rgba(15, 23, 42, 0.35);
  width: 1%;
  white-space: nowrap;
}

.table thead th.actions-col { background: #F8FAFC !important; z-index: 3; }
.table tbody tr:hover > .actions-col { background: #F8FAFC !important; }

@media (max-width: 575.98px) {
  .table .actions-col { position: static; box-shadow: none; }
  .row-actions { flex-wrap: wrap; justify-content: flex-start; }
}

/* ═══════════════════════════════════════════════════════════
   REPORTS WORKSPACE
   ═══════════════════════════════════════════════════════════ */

.report-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

/* Segmented report-type switcher */
.report-tabs {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 4px;
  background: #EEF2F8;
  border: 1px solid var(--sams-border);
  border-radius: 11px;
  flex-wrap: wrap;
}

.report-tab {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 0;
  background: transparent;
  border-radius: 8px;
  padding: 8px 15px;
  font-size: 13px;
  font-weight: 700;
  color: var(--sams-muted);
  white-space: nowrap;
  transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.report-tab i { font-size: 14px; }
.report-tab:hover { color: var(--sams-text); background: rgba(255, 255, 255, 0.75); }

.report-tab.active {
  background: #FFFFFF;
  color: var(--sams-primary);
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.12);
}

.report-more .dropdown-toggle { font-weight: 700; border-radius: 9px; }
.report-more .dropdown-item { font-size: 13px; font-weight: 600; padding: 8px 14px; }

/* Filter panel */
.report-filters {
  border-radius: 12px;
  overflow: hidden;
}

.report-filters .card-body { padding: 16px 18px 14px !important; }

.report-filters .form-label {
  font-size: 10px !important;
  font-weight: 800 !important;
  letter-spacing: 0.7px;
  text-transform: uppercase;
  color: var(--sams-muted) !important;
  margin-bottom: 5px;
}

.report-filters .form-control,
.report-filters .form-select { font-size: 13px; }

/* Action row sits on its own line, separated from the inputs */
.report-filters .row > .col-12:last-child {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed var(--sams-border);
}

.report-filters .row > .col-12:last-child .btn { font-weight: 700; }

@media (max-width: 767.98px) {
  .report-head { align-items: stretch; }
  .report-tabs { width: 100%; overflow-x: auto; flex-wrap: nowrap; scrollbar-width: none; }
  .report-tabs::-webkit-scrollbar { display: none; }
  .report-tab { padding: 7px 12px; font-size: 12px; }
  .report-more, .report-more .btn { width: 100%; }
}
