/* =========================================================
   APSSI Portal – Global Stylesheet (PHP 5.6 compatible)
   ========================================================= */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --blue: #2563EB;
  --blue-dark: #1D4ED8;
  --blue-light: #EFF6FF;
  --blue-mid: #DBEAFE;
  --green: #16A34A;
  --green-light: #F0FDF4;
  --red: #DC2626;
  --red-light: #FEF2F2;
  --gray-50: #F8FAFC;
  --gray-100: #F1F5F9;
  --gray-200: #E2E8F0;
  --gray-300: #CBD5E1;
  --gray-400: #94A3B8;
  --gray-500: #64748B;
  --gray-700: #334155;
  --gray-900: #0F172A;
  --white: #FFFFFF;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow: 0 4px 12px rgba(0,0,0,0.10);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.12);
  --radius: 12px;
  --radius-sm: 8px;
}

html, body { height: 100%; font-family: 'Inter', 'Segoe UI', Arial, sans-serif; color: var(--gray-900); background: var(--gray-50); font-size: 15px; line-height: 1.6; }

a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }

img { max-width: 100%; }

/* ── Buttons ── */
.btn {
  display: -webkit-inline-box; display: -ms-inline-flexbox; display: inline-flex;
  -webkit-box-align: center; -ms-flex-align: center; align-items: center;
  -webkit-box-pack: center; -ms-flex-pack: center; justify-content: center;
  gap: 6px;
  padding: 9px 18px;
  border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 600;
  cursor: pointer; border: none; outline: none;
  -webkit-transition: background 0.15s, -webkit-box-shadow 0.15s; transition: background 0.15s, box-shadow 0.15s;
  white-space: nowrap;
}
.btn-primary { background: var(--blue); color: var(--white); }
.btn-primary:hover { background: var(--blue-dark); -webkit-box-shadow: 0 4px 12px rgba(37,99,235,0.3); box-shadow: 0 4px 12px rgba(37,99,235,0.3); color: var(--white); text-decoration: none; }
.btn-outline { background: var(--white); color: var(--gray-700); border: 1.5px solid var(--gray-200); }
.btn-outline:hover { background: var(--gray-50); color: var(--gray-900); text-decoration: none; }
.btn-danger { background: var(--red-light); color: var(--red); border: 1px solid #FECACA; }
.btn-danger:hover { background: #FEE2E2; text-decoration: none; }
.btn-sm { padding: 6px 12px; font-size: 13px; }
.btn-lg { padding: 14px 24px; font-size: 15px; }
.btn-full { width: 100%; }
.btn-icon { padding: 8px; border-radius: var(--radius-sm); background: none; border: none; cursor: pointer; color: var(--gray-400); -webkit-transition: background 0.15s, color 0.15s; transition: background 0.15s, color 0.15s; }
.btn-icon:hover { background: var(--gray-100); color: var(--gray-700); }

/* ── Form controls ── */
.form-label { display: block; font-size: 13px; font-weight: 500; color: var(--gray-700); margin-bottom: 5px; }
.form-label-xs { font-size: 11px; font-weight: 700; color: var(--gray-400); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 5px; display: block; }
.form-control {
  display: block; width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-sm);
  font-size: 14px; color: var(--gray-900);
  background: var(--gray-50);
  outline: none;
  -webkit-transition: border-color 0.15s, -webkit-box-shadow 0.15s; transition: border-color 0.15s, box-shadow 0.15s;
  font-family: inherit;
}
.form-control:focus { border-color: var(--blue); -webkit-box-shadow: 0 0 0 3px rgba(37,99,235,0.12); box-shadow: 0 0 0 3px rgba(37,99,235,0.12); background: var(--white); }
.form-control:disabled { background: var(--gray-100); color: var(--gray-500); cursor: not-allowed; }
.form-control-icon { padding-left: 38px; }
.input-wrap { position: relative; }
.input-icon { position: absolute; left: 11px; top: 50%; -webkit-transform: translateY(-50%); -ms-transform: translateY(-50%); transform: translateY(-50%); color: var(--gray-400); pointer-events: none; display: -webkit-box; display: -ms-flexbox; display: flex; }
.pw-toggle { position: absolute; right: 10px; top: 50%; -webkit-transform: translateY(-50%); -ms-transform: translateY(-50%); transform: translateY(-50%); background: none; border: none; cursor: pointer; color: var(--gray-400); padding: 2px; }
.pw-toggle:hover { color: var(--gray-600); }

/* ── PW REVEAL FIX ──
   Edge (Chromium) auto-injects its own native "reveal password" eye icon
   into <input type="password">, which sits on top of our custom .pw-toggle
   button and produces a doubled-eye look. Hide the native ones so our
   custom SVG toggle is the only icon shown, in every browser. */
input[type="password"]::-ms-reveal,
input[type="password"]::-ms-clear {
  display: none;
}
input[type="password"]::-webkit-credentials-auto-fill-button {
  visibility: hidden;
  display: none !important;
}

.form-group { margin-bottom: 18px; }

/* ── Cards ── */
.card { background: var(--white); border-radius: var(--radius); border: 1px solid var(--gray-200); -webkit-box-shadow: var(--shadow-sm); box-shadow: var(--shadow-sm); overflow: hidden; }
.card-header { padding: 14px 20px; border-bottom: 1px solid var(--gray-200); background: var(--gray-50); display: -webkit-box; display: -ms-flexbox; display: flex; -webkit-box-align: center; -ms-flex-align: center; align-items: center; gap: 8px; }
.card-body { padding: 20px; }

/* ── Badges ── */
.badge { display: -webkit-inline-box; display: -ms-inline-flexbox; display: inline-flex; -webkit-box-align: center; -ms-flex-align: center; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 999px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; border: 1px solid transparent; }
.badge-active { background: var(--green-light); color: var(--green); border-color: #BBF7D0; }
.badge-inactive { background: var(--gray-100); color: var(--gray-500); border-color: var(--gray-200); opacity: .7; }
.badge-role { background: var(--blue-mid); color: var(--blue); }
.badge-dot { width: 6px; height: 6px; border-radius: 50%; display: inline-block; }
.badge-dot-active { background: var(--green); }
.badge-dot-inactive { background: var(--gray-400); }

/* ── Tables ── */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
thead th { padding: 11px 18px; text-align: left; font-size: 12px; font-weight: 700; color: var(--gray-500); text-transform: uppercase; letter-spacing: .05em; background: var(--gray-50); border-bottom: 1px solid var(--gray-200); white-space: nowrap; }
tbody td { padding: 13px 18px; font-size: 14px; border-bottom: 1px solid var(--gray-100); vertical-align: middle; }
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background: rgba(37,99,235,0.03); }
tbody tr.selected { background: rgba(37,99,235,0.06); }
.th-sort { background: none; border: none; font: inherit; font-size: 12px; font-weight: 700; color: var(--gray-500); text-transform: uppercase; letter-spacing: .05em; cursor: pointer; display: -webkit-box; display: -ms-flexbox; display: flex; -webkit-box-align: center; -ms-flex-align: center; align-items: center; gap: 4px; padding: 0; }
.th-sort:hover { color: var(--gray-900); }
.sort-icon { font-size: 10px; }

/* ── Pagination ── */
.pagination { display: -webkit-box; display: -ms-flexbox; display: flex; -webkit-box-align: center; -ms-flex-align: center; align-items: center; gap: 2px; }
.page-btn { padding: 5px 11px; border: 1px solid var(--gray-300); background: var(--white); color: var(--gray-500); font-size: 13px; border-radius: 6px; cursor: pointer; -webkit-transition: background 0.1s; transition: background 0.1s; }
.page-btn:hover:not(:disabled) { background: var(--gray-50); }
.page-btn:disabled { opacity: .4; cursor: not-allowed; }
.page-btn.active { background: var(--blue-light); color: var(--blue); border-color: var(--blue-mid); font-weight: 700; }
.page-info { font-size: 13px; color: var(--gray-500); }

/* ── Avatar ── */
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--blue-light); color: var(--blue); font-size: 12px; font-weight: 700; display: -webkit-box; display: -ms-flexbox; display: flex; -webkit-box-align: center; -ms-flex-align: center; align-items: center; -webkit-box-pack: center; -ms-flex-pack: center; justify-content: center; -ms-flex-negative: 0; flex-shrink: 0; }
.avatar-lg { width: 56px; height: 56px; font-size: 20px; }
.avatar-blue { background: var(--blue); color: var(--white); }

/* ── Alerts ── */
.alert { padding: 12px 16px; border-radius: var(--radius-sm); border: 1px solid transparent; font-size: 14px; display: -webkit-box; display: -ms-flexbox; display: flex; gap: 10px; -webkit-box-align: start; -ms-flex-align: start; align-items: flex-start; }
.alert-info { background: var(--blue-light); border-color: var(--blue-mid); color: #1e40af; }
.alert-error { background: var(--red-light); border-color: #FECACA; color: var(--red); }
.alert-success { background: var(--green-light); border-color: #BBF7D0; color: var(--green); }

/* ── Layout Helpers ── */
.flex { display: -webkit-box; display: -ms-flexbox; display: flex; }
.flex-col { -webkit-box-orient: vertical; -webkit-box-direction: normal; -ms-flex-direction: column; flex-direction: column; }
.items-center { -webkit-box-align: center; -ms-flex-align: center; align-items: center; }
.items-start { -webkit-box-align: start; -ms-flex-align: start; align-items: flex-start; }
.justify-between { -webkit-box-pack: justify; -ms-flex-pack: justify; justify-content: space-between; }
.justify-center { -webkit-box-pack: center; -ms-flex-pack: center; justify-content: center; }
.justify-end { -webkit-box-pack: end; -ms-flex-pack: end; justify-content: flex-end; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.gap-6 { gap: 24px; }
.flex-1 { -webkit-box-flex: 1; -ms-flex: 1; flex: 1; }
.flex-wrap { -ms-flex-wrap: wrap; flex-wrap: wrap; }
.w-full { width: 100%; }
.mt-1 { margin-top: 4px; } .mt-2 { margin-top: 8px; } .mt-4 { margin-top: 16px; } .mt-6 { margin-top: 24px; } .mt-8 { margin-top: 32px; }
.mb-1 { margin-bottom: 4px; } .mb-2 { margin-bottom: 8px; } .mb-4 { margin-bottom: 16px; } .mb-6 { margin-bottom: 24px; }
.ml-auto { margin-left: auto; }
.text-sm { font-size: 13px; } .text-xs { font-size: 11px; } .text-lg { font-size: 17px; } .text-xl { font-size: 19px; } .text-2xl { font-size: 22px; }
.font-bold { font-weight: 700; } .font-semibold { font-weight: 600; } .font-medium { font-weight: 500; }
.text-gray { color: var(--gray-500); } .text-blue { color: var(--blue); } .text-red { color: var(--red); } .text-green { color: var(--green); }
.text-center { text-align: center; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hidden { display: none; }
.space-y-4 > * + * { margin-top: 16px; }
.space-y-6 > * + * { margin-top: 24px; }

/* ── Nav ── */
.topnav { background: var(--white); border-bottom: 1px solid var(--gray-200); position: relative; z-index: 50; }
.topnav-inner { max-width: 1280px; margin: 0 auto; padding: 0 24px; height: 62px; display: -webkit-box; display: -ms-flexbox; display: flex; -webkit-box-align: center; -ms-flex-align: center; align-items: center; gap: 32px; }
.nav-logo { display: -webkit-box; display: -ms-flexbox; display: flex; -webkit-box-align: center; -ms-flex-align: center; align-items: center; gap: 10px; font-weight: 700; font-size: 17px; color: var(--gray-900); text-decoration: none; }
.nav-logo:hover { text-decoration: none; color: var(--gray-900); }
.logo-box { width: 32px; height: 32px; background: var(--blue); border-radius: 7px; display: -webkit-box; display: -ms-flexbox; display: flex; -webkit-box-align: center; -ms-flex-align: center; align-items: center; -webkit-box-pack: center; -ms-flex-pack: center; justify-content: center; color: var(--white); font-weight: 800; font-size: 16px; -ms-flex-negative: 0; flex-shrink: 0; }
.nav-links { display: -webkit-box; display: -ms-flexbox; display: flex; -webkit-box-align: center; -ms-flex-align: center; align-items: center; gap: 4px; }
.nav-link { padding: 6px 12px; font-size: 14px; font-weight: 500; color: var(--gray-500); border-radius: 6px; -webkit-transition: background 0.15s, color 0.15s; transition: background 0.15s, color 0.15s; text-decoration: none; border: none; background: none; cursor: pointer; display: -webkit-box; display: -ms-flexbox; display: flex; -webkit-box-align: center; -ms-flex-align: center; align-items: center; gap: 4px; }
.nav-link:hover { background: var(--gray-100); color: var(--gray-900); text-decoration: none; }
.nav-link.active { background: var(--blue-light); color: var(--blue); font-weight: 600; }
.nav-right { margin-left: auto; display: -webkit-box; display: -ms-flexbox; display: flex; -webkit-box-align: center; -ms-flex-align: center; align-items: center; gap: 12px; }
.profile-btn { display: -webkit-box; display: -ms-flexbox; display: flex; -webkit-box-align: center; -ms-flex-align: center; align-items: center; gap: 8px; padding: 4px 12px 4px 4px; border: 1px solid var(--gray-200); border-radius: 999px; background: var(--white); cursor: pointer; -webkit-transition: background 0.15s; transition: background 0.15s; }
.profile-btn:hover { background: var(--gray-50); }
.profile-name { font-size: 13px; font-weight: 700; color: var(--gray-900); }
.profile-role { font-size: 10px; font-weight: 700; color: var(--gray-400); text-transform: uppercase; letter-spacing: .06em; }
.dropdown { position: absolute; top: calc(100% + 6px); right: 0; min-width: 220px; background: var(--white); border: 1px solid var(--gray-200); border-radius: var(--radius-sm); -webkit-box-shadow: var(--shadow-lg); box-shadow: var(--shadow-lg); z-index: 100; overflow: hidden; }
.dropdown-item { display: -webkit-box; display: -ms-flexbox; display: flex; -webkit-box-align: center; -ms-flex-align: center; align-items: center; gap: 10px; padding: 10px 14px; font-size: 14px; color: var(--gray-700); cursor: pointer; -webkit-transition: background 0.1s; transition: background 0.1s; text-decoration: none; border: none; background: none; width: 100%; text-align: left; }
.dropdown-item:hover { background: var(--gray-50); text-decoration: none; color: var(--gray-700); }
.dropdown-item.danger { color: var(--red); }
.dropdown-item.danger:hover { background: var(--red-light); }
.dropdown-sep { height: 1px; background: var(--gray-100); margin: 4px 0; }
.dropdown-header { padding: 10px 14px; border-bottom: 1px solid var(--gray-100); }
.nav-pos { position: relative; }

/* ── Breadcrumb ── */
.breadcrumb { max-width: 1280px; margin: 0 auto; padding: 8px 24px; display: -webkit-box; display: -ms-flexbox; display: flex; -webkit-box-align: center; -ms-flex-align: center; align-items: center; gap: 6px; font-size: 12px; color: var(--gray-400); border-bottom: 1px solid var(--gray-100); background: var(--white); }
.breadcrumb a { color: var(--gray-400); text-decoration: none; }
.breadcrumb a:hover { color: var(--blue); }
.breadcrumb .current { color: var(--gray-900); font-weight: 700; }
.breadcrumb-sep { color: var(--gray-300); }

/* ── Page Layout ── */
.page-wrap { max-width: 1280px; margin: 0 auto; padding: 28px 24px; }
.page-header { display: -webkit-box; display: -ms-flexbox; display: flex; -webkit-box-align: start; -ms-flex-align: start; align-items: flex-start; -webkit-box-pack: justify; -ms-flex-pack: justify; justify-content: space-between; gap: 16px; margin-bottom: 24px; -ms-flex-wrap: wrap; flex-wrap: wrap; }
.page-title { font-size: 22px; font-weight: 700; color: var(--gray-900); }
.page-subtitle { font-size: 14px; color: var(--gray-500); margin-top: 2px; }
.main-footer { background: var(--white); border-top: 1px solid var(--gray-200); padding: 14px 24px; text-align: center; font-size: 13px; color: var(--gray-400); margin-top: auto; }

/* ── Toolbar ── */
.toolbar { padding: 14px 18px; border-bottom: 1px solid var(--gray-200); background: rgba(248,250,252,.5); display: -webkit-box; display: -ms-flexbox; display: flex; -webkit-box-align: center; -ms-flex-align: center; align-items: center; gap: 12px; -ms-flex-wrap: wrap; flex-wrap: wrap; }
.search-wrap { position: relative; }
.search-wrap input { padding-left: 36px; width: 300px; max-width: 100%; }
.search-icon { position: absolute; left: 10px; top: 50%; -webkit-transform: translateY(-50%); -ms-transform: translateY(-50%); transform: translateY(-50%); color: var(--gray-400); pointer-events: none; }
.rows-select { padding: 6px 28px 6px 10px; border: 1px solid var(--gray-300); border-radius: 6px; font-size: 13px; background: var(--white); -webkit-appearance: none; -moz-appearance: none; appearance: none; }
.select-wrap { position: relative; display: -webkit-inline-box; display: -ms-inline-flexbox; display: inline-flex; -webkit-box-align: center; -ms-flex-align: center; align-items: center; }
.select-arrow { position: absolute; right: 8px; pointer-events: none; color: var(--gray-500); font-size: 10px; }

/* ── Slide Panel ── */
.panel-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 60; display: none; }
.panel-overlay.open { display: block; }
.side-panel { position: fixed; top: 0; bottom: 0; right: 0; width: 460px; max-width: 100%; background: var(--white); z-index: 70; -webkit-box-shadow: var(--shadow-lg); box-shadow: var(--shadow-lg); display: -webkit-box; display: -ms-flexbox; display: flex; -webkit-box-orient: vertical; -webkit-box-direction: normal; -ms-flex-direction: column; flex-direction: column; -webkit-transform: translateX(100%); -ms-transform: translateX(100%); transform: translateX(100%); -webkit-transition: -webkit-transform 0.25s ease; transition: transform 0.25s ease; overflow-y: auto; }
.side-panel.open { -webkit-transform: translateX(0); -ms-transform: translateX(0); transform: translateX(0); }
.panel-header { padding: 20px 24px; border-bottom: 1px solid var(--gray-200); display: -webkit-box; display: -ms-flexbox; display: flex; -webkit-box-align: center; -ms-flex-align: center; align-items: center; -webkit-box-pack: justify; -ms-flex-pack: justify; justify-content: space-between; position: sticky; top: 0; background: var(--white); z-index: 1; }
.panel-body { padding: 24px; -webkit-box-flex: 1; -ms-flex: 1; flex: 1; }
.panel-footer { padding: 16px 24px; border-top: 1px solid var(--gray-200); display: -webkit-box; display: -ms-flexbox; display: flex; gap: 10px; position: sticky; bottom: 0; background: var(--white); }

/* ── Bulk Action Bar ── */
.bulk-bar { position: fixed; bottom: 28px; left: 50%; -webkit-transform: translateX(-50%); -ms-transform: translateX(-50%); transform: translateX(-50%); background: #111827; color: var(--white); padding: 12px 24px; border-radius: 16px; -webkit-box-shadow: var(--shadow-lg); box-shadow: var(--shadow-lg); border: 1px solid #1F2937; display: none; -webkit-box-align: center; -ms-flex-align: center; align-items: center; gap: 20px; z-index: 40; white-space: nowrap; }
.bulk-bar.visible { display: -webkit-box; display: -ms-flexbox; display: flex; }
.bulk-btn { background: none; border: none; color: inherit; cursor: pointer; display: -webkit-box; display: -ms-flexbox; display: flex; -webkit-box-align: center; -ms-flex-align: center; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 8px; font-size: 13px; -webkit-transition: background 0.1s; transition: background 0.1s; }
.bulk-btn:hover { background: rgba(255,255,255,.1); }
.bulk-btn.activate { color: #4ADE80; }
.bulk-btn.deactivate { color: #94A3B8; }
.bulk-btn.delete { color: #F87171; }

/* ── Toast ── */
.toast-container { position: fixed; bottom: 20px; right: 20px; z-index: 9999; display: -webkit-box; display: -ms-flexbox; display: flex; -webkit-box-orient: vertical; -webkit-box-direction: normal; -ms-flex-direction: column; flex-direction: column; gap: 8px; }
.toast { padding: 12px 16px; border-radius: var(--radius-sm); color: var(--white); font-size: 14px; font-weight: 500; -webkit-box-shadow: var(--shadow); box-shadow: var(--shadow); min-width: 220px; -webkit-animation: slideIn 0.2s ease; animation: slideIn 0.2s ease; }
.toast-success { background: #166534; }
.toast-error { background: #991B1B; }
@-webkit-keyframes slideIn { from { opacity: 0; -webkit-transform: translateX(20px); transform: translateX(20px); } to { opacity: 1; -webkit-transform: translateX(0); transform: translateX(0); } }
@keyframes slideIn { from { opacity: 0; -webkit-transform: translateX(20px); transform: translateX(20px); } to { opacity: 1; -webkit-transform: translateX(0); transform: translateX(0); } }

/* ── Empty State ── */
.empty-state { text-align: center; padding: 60px 20px; }
.empty-icon { width: 72px; height: 72px; background: var(--gray-100); border-radius: 16px; display: -webkit-box; display: -ms-flexbox; display: flex; -webkit-box-align: center; -ms-flex-align: center; align-items: center; -webkit-box-pack: center; -ms-flex-pack: center; justify-content: center; margin: 0 auto 16px; font-size: 32px; color: var(--gray-400); }
.empty-title { font-size: 17px; font-weight: 700; color: var(--gray-900); margin-bottom: 6px; }
.empty-desc { font-size: 14px; color: var(--gray-500); max-width: 320px; margin: 0 auto; }

/* ── Auth Layout ── */
.auth-layout { display: -webkit-box; display: -ms-flexbox; display: flex; min-height: 100vh; }
.auth-hero { width: 50%; position: relative; overflow: hidden; display: none; }
@media (min-width: 1024px) { .auth-hero { display: -webkit-box; display: -ms-flexbox; display: flex; } }
.auth-hero-img { width: 100%; height: 100%; object-fit: cover; -webkit-filter: brightness(.6) saturate(.7); filter: brightness(.6) saturate(.7); }
.auth-hero-overlay { position: absolute; inset: 0; background: -webkit-linear-gradient(145deg,rgba(37,41,100,.72) 0%,rgba(67,87,173,.55) 60%,rgba(100,116,189,.35) 100%); background: linear-gradient(145deg,rgba(37,41,100,.72) 0%,rgba(67,87,173,.55) 60%,rgba(100,116,189,.35) 100%); }
.auth-hero-content { position: absolute; inset: 0; z-index: 2; display: -webkit-box; display: -ms-flexbox; display: flex; -webkit-box-orient: vertical; -webkit-box-direction: normal; -ms-flex-direction: column; flex-direction: column; -webkit-box-pack: center; -ms-flex-pack: center; justify-content: center; padding: 60px; color: var(--white); }
.auth-logo-box { width: 44px; height: 44px; background: var(--white); border-radius: 10px; display: -webkit-box; display: -ms-flexbox; display: flex; -webkit-box-align: center; -ms-flex-align: center; align-items: center; -webkit-box-pack: center; -ms-flex-pack: center; justify-content: center; font-weight: 800; font-size: 20px; color: var(--blue); margin-bottom: 40px; -webkit-box-shadow: 0 4px 14px rgba(0,0,0,.18); box-shadow: 0 4px 14px rgba(0,0,0,.18); }
.auth-hero-title { font-size: 40px; font-weight: 800; line-height: 1.15; margin-bottom: 14px; }
.auth-hero-sub { font-size: 16px; color: rgba(255,255,255,.78); max-width: 340px; }
.auth-form-side { width: 100%; display: -webkit-box; display: -ms-flexbox; display: flex; -webkit-box-align: center; -ms-flex-align: center; align-items: center; -webkit-box-pack: center; -ms-flex-pack: center; justify-content: center; padding: 40px 32px; background: var(--white); }
@media (min-width: 1024px) { .auth-form-side { width: 50%; } }
.auth-form-box { width: 100%; max-width: 400px; }
.auth-title { font-size: 28px; font-weight: 700; margin-bottom: 6px; }
.auth-subtitle { font-size: 14px; color: var(--gray-500); margin-bottom: 32px; }

/* ── HR Services ── */
.hr-layout { display: -webkit-box; display: -ms-flexbox; display: flex; gap: 24px; -ms-flex-wrap: wrap; flex-wrap: wrap; }
.hr-sidebar { width: 260px; -ms-flex-negative: 0; flex-shrink: 0; }
.hr-content { -webkit-box-flex: 1; -ms-flex: 1; flex: 1; min-width: 0; }
.sidebar-menu { list-style: none; padding: 8px; }
.sidebar-item button { width: 100%; text-align: left; display: -webkit-box; display: -ms-flexbox; display: flex; -webkit-box-align: center; -ms-flex-align: center; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 8px; font-size: 14px; font-weight: 500; color: var(--gray-700); background: none; border: none; cursor: pointer; -webkit-transition: background 0.1s, color 0.1s; transition: background 0.1s, color 0.1s; -webkit-box-pack: justify; -ms-flex-pack: justify; justify-content: space-between; }
.sidebar-item button:hover { background: var(--gray-100); }
.sidebar-item button.active { background: var(--blue-light); color: var(--blue); }
.sidebar-sub { list-style: none; padding-left: 32px; margin-top: 4px; }
.sidebar-sub li button { padding: 7px 12px; font-size: 13px; color: var(--gray-500); }
.sidebar-sub li button.active { color: var(--blue); font-weight: 600; background: var(--blue-light); }
.sidebar-subgroup-title { display: -webkit-box; display: -ms-flexbox; display: flex; -webkit-box-align: center; -ms-flex-align: center; align-items: center; -webkit-box-pack: justify; -ms-flex-pack: justify; justify-content: space-between; padding: 7px 12px; font-size: 13px; font-weight: 600; color: var(--gray-700); cursor: pointer; border-radius: 8px; background: none; border: none; width: 100%; }
.sidebar-subgroup-title:hover { background: var(--gray-100); }
.sidebar-payslip { list-style: none; padding-left: 12px; border-left: 2px solid var(--gray-100); margin-left: 3px; }
.sidebar-item-disabled {opacity: .4; cursor: not-allowed;pointer-events: none;}
/* ── Dashboard ── */
.welcome-banner { position: relative; overflow: hidden; }
.welcome-content { position: relative; z-index: 1; padding: 36px; }
.service-grid { display: -webkit-box; display: -ms-flexbox; display: flex; gap: 20px; -ms-flex-wrap: wrap; flex-wrap: wrap; }
.service-card { background: var(--white); border: 1px solid var(--gray-200); border-radius: var(--radius); padding: 24px; cursor: pointer; -webkit-transition: -webkit-box-shadow 0.15s, border-color 0.15s; transition: box-shadow 0.15s, border-color 0.15s; -webkit-box-flex: 1; -ms-flex: 1 1 220px; flex: 1 1 220px; }
.service-card:hover { -webkit-box-shadow: var(--shadow); box-shadow: var(--shadow); border-color: var(--blue-mid); }
.service-icon { width: 48px; height: 48px; background: var(--blue-light); border-radius: 10px; display: -webkit-box; display: -ms-flexbox; display: flex; -webkit-box-align: center; -ms-flex-align: center; align-items: center; -webkit-box-pack: center; -ms-flex-pack: center; justify-content: center; margin-bottom: 14px; font-size: 20px; color: var(--blue); }

/* ── Grid ── */
.grid-2 { display: -webkit-box; display: -ms-flexbox; display: flex; gap: 20px; -ms-flex-wrap: wrap; flex-wrap: wrap; }
.grid-2 > * { -webkit-box-flex: 1; -ms-flex: 1 1 calc(50% - 10px); flex: 1 1 calc(50% - 10px); }
.grid-3 { display: -webkit-box; display: -ms-flexbox; display: flex; gap: 20px; -ms-flex-wrap: wrap; flex-wrap: wrap; }
.grid-3 > * { -webkit-box-flex: 1; -ms-flex: 1 1 calc(33% - 14px); flex: 1 1 calc(33% - 14px); }

/* ── Security modal ── */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 80; display: none; -webkit-box-align: center; -ms-flex-align: center; align-items: center; -webkit-box-pack: center; -ms-flex-pack: center; justify-content: center; }
.modal-overlay.open { display: -webkit-box; display: -ms-flexbox; display: flex; }
.modal-box { background: var(--white); border-radius: var(--radius); -webkit-box-shadow: var(--shadow-lg); box-shadow: var(--shadow-lg); width: 100%; max-width: 440px; margin: 16px; overflow: hidden; }
.modal-stripe { height: 4px; background: var(--blue); }
.modal-body { padding: 28px 28px 24px; }

/* ── Payslip ── */
.payslip-header { background: var(--gray-50); padding: 20px 24px; border-bottom: 1px solid var(--gray-200); }
.payslip-grid { display: -webkit-box; display: -ms-flexbox; display: flex; gap: 0; }
.payslip-col { -webkit-box-flex: 1; -ms-flex: 1; flex: 1; padding: 20px 24px; border-right: 1px solid var(--gray-200); }
.payslip-col:last-child { border-right: none; }
.payslip-row { display: -webkit-box; display: -ms-flexbox; display: flex; -webkit-box-pack: justify; -ms-flex-pack: justify; justify-content: space-between; font-size: 14px; padding: 5px 0; }
.payslip-total { display: -webkit-box; display: -ms-flexbox; display: flex; -webkit-box-pack: justify; -ms-flex-pack: justify; justify-content: space-between; font-size: 15px; font-weight: 700; padding-top: 12px; margin-top: 12px; border-top: 1px solid var(--gray-200); }
.payslip-net { background: var(--blue); color: var(--white); padding: 18px 24px; display: -webkit-box; display: -ms-flexbox; display: flex; -webkit-box-pack: justify; -ms-flex-pack: justify; justify-content: space-between; -webkit-box-align: center; -ms-flex-align: center; align-items: center; }




/* ── Responsive ── */
@media (max-width: 768px) {
  .auth-form-side { padding: 28px 20px; }
  .hr-sidebar { width: 100%; }
  .page-wrap { padding: 20px 16px; }
  .topnav-inner { padding: 0 16px; gap: 16px; }
  .payslip-grid { -webkit-box-orient: vertical; -webkit-box-direction: normal; -ms-flex-direction: column; flex-direction: column; }
  .payslip-col { border-right: none; border-bottom: 1px solid var(--gray-200); }
  .search-wrap input { width: 100%; }
  .side-panel { width: 100%; }
}
@media (min-width: 768px) { .md-hidden { display: none; } }