:root {
  --brand: #5b3df6;
  --brand-dark: #4527d6;
  --brand-light: #efeaff;
  --brand-tint: #f6f4ff;
  --brand-teal: #7fd8c9;
  --brand-gradient: linear-gradient(135deg, var(--brand) 0%, #8b7ff2 45%, var(--brand-teal) 100%);
  --bg: #f7f7fb;
  --card-bg: #ffffff;
  --border: #e9eaf2;
  --border-soft: #f0f1f7;
  --text: #1c2030;
  --text-muted: #6b7280;
  --text-faint: #9aa0b4;
  --green: #16a34a;
  --green-tint: #ecfdf3;
  --amber: #d97706;
  --amber-tint: #fffaeb;
  --red: #dc2626;
  --red-tint: #fef3f2;
  --r-lg: 20px;
  --r-md: 14px;
  --r-sm: 10px;
  --sh-sm: 0 1px 2px rgba(16, 24, 40, .04);
  --sh-md: 0 2px 4px rgba(16, 24, 40, .04), 0 10px 24px rgba(16, 24, 40, .06);
  --sh-hover: 0 6px 10px rgba(16, 24, 40, .06), 0 18px 34px rgba(91, 61, 246, .12);
  --sidebar-width: 264px;
  --header-height: 72px;
  --bottom-nav-height: 64px;
}

* { box-sizing: border-box; }

body {
  background: var(--bg);
  font-family: 'Plus Jakarta Sans', 'Segoe UI', system-ui, -apple-system, sans-serif;
  color: var(--text);
}

a { color: var(--brand); }
a:hover { color: var(--brand-dark); }

.brand-badge {
  width: 42px; height: 42px;
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  color: #fff; border-radius: 13px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 0.9rem;
  box-shadow: 0 4px 10px rgba(91, 61, 246, .28);
  flex-shrink: 0;
}

/* ---------------- Auth pages ---------------- */
.auth-body {
  font-family: 'Plus Jakarta Sans', 'Segoe UI', system-ui, -apple-system, sans-serif;
  background:
    radial-gradient(600px circle at 12% 8%, rgba(91, 61, 246, 0.14), transparent 60%),
    radial-gradient(560px circle at 88% 92%, rgba(127, 216, 201, 0.20), transparent 60%),
    linear-gradient(135deg, #f4f5fb, #eef0fc 60%, #eafaf5);
  min-height: 100vh;
}

.auth-wrapper { position: relative; }

.auth-card {
  width: 100%;
  max-width: 440px;
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 20px 50px -12px rgba(76, 55, 168, 0.22), 0 4px 14px rgba(31, 35, 48, 0.06);
  position: relative;
}

.auth-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 5px;
  background: var(--brand-gradient);
}

.auth-logo {
  height: 40px;
  max-width: 100%;
  width: auto;
  display: block;
  margin-left: auto;
  margin-right: auto;
}

.auth-card .form-label { color: #3a3f52; }

.auth-card .form-control {
  border-radius: 10px;
  border-color: var(--border);
  padding: .6rem .85rem;
}

.auth-card .form-control:focus {
  border-color: #a89bf7;
  box-shadow: 0 0 0 .2rem rgba(91, 61, 246, 0.15);
}

.auth-card .btn-primary {
  background: var(--brand-gradient);
  border: none;
  border-radius: 10px;
  box-shadow: 0 8px 20px -6px rgba(91, 61, 246, 0.45);
  transition: transform .15s ease, box-shadow .15s ease;
}

.auth-card .btn-primary:hover,
.auth-card .btn-primary:focus {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px -6px rgba(91, 61, 246, 0.55);
}

.auth-card a { color: var(--brand); font-weight: 500; text-decoration: none; }
.auth-card a:hover { color: var(--brand-dark); text-decoration: underline; }

/* ---------------- App shell ---------------- */
.app-shell { display: flex; min-height: 100vh; }

.sidebar {
  width: var(--sidebar-width);
  background: var(--card-bg);
  border-right: 1px solid var(--border-soft);
  position: fixed;
  top: 0; bottom: 0; left: 0;
  z-index: 100;
}
.sidebar-brand {
  display: flex; align-items: center; gap: .75rem;
  padding: 1.35rem 1.25rem;
}
.sidebar-nav { overflow-y: auto; padding: .5rem .9rem; height: calc(100vh - 154px); }

.nav-list { display: flex; flex-direction: column; gap: 2px; }
.nav-list .nav-item .nav-link {
  color: #4b5165;
  padding: .62rem .75rem;
  font-size: .875rem;
  font-weight: 600;
  border-radius: 12px;
  display: flex; align-items: center; gap: .75rem;
  transition: background .15s, color .15s, box-shadow .15s;
}
.nav-list .nav-item .nav-link i { font-size: 1.05rem; width: 1.2rem; color: #9096a8; transition: color .15s; }
.nav-list .nav-item .nav-link:hover { background: var(--brand-tint); color: var(--brand-dark); }
.nav-list .nav-item .nav-link:hover i { color: var(--brand); }
.nav-list .nav-item .nav-link.active {
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  color: #fff; font-weight: 700;
  box-shadow: 0 6px 14px rgba(91, 61, 246, .32);
}
.nav-list .nav-item .nav-link.active i { color: #fff; }
.nav-section {
  font-size: .68rem; text-transform: uppercase; letter-spacing: .06em; font-weight: 700;
  color: var(--text-faint); padding: 1.1rem .75rem .4rem;
}

.app-main { flex: 1; margin-left: var(--sidebar-width); display: flex; flex-direction: column; min-height: 100vh; }
.app-header {
  height: var(--header-height);
  background: var(--card-bg);
  border-bottom: 1px solid var(--border-soft);
  padding: 0 1.75rem;
  position: sticky; top: 0; z-index: 50;
}
.app-header h1 { font-weight: 800; letter-spacing: -.01em; font-size: 1.15rem; }
.app-content { padding: 1.75rem; flex: 1; }

.btn-icon {
  border: 1px solid var(--border-soft); background: var(--card-bg); color: #4b5165;
  width: 42px; height: 42px; border-radius: 12px;
  display: inline-flex; align-items: center; justify-content: center;
}
.btn-icon:hover { background: var(--brand-tint); border-color: var(--brand-light); color: var(--brand); }

.avatar-sm {
  width: 34px; height: 34px; border-radius: 50%;
  background: linear-gradient(135deg, var(--brand), var(--brand-dark)); color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: .8rem; text-transform: uppercase;
  object-fit: cover; /* when used on an <img>, e.g. header avatar */
}

.notif-dropdown { width: 340px; max-width: 90vw; border-radius: var(--r-md); border: 1px solid var(--border-soft); box-shadow: var(--sh-md); }
.notif-list { max-height: 340px; overflow-y: auto; }
.notif-item { padding: .6rem 1rem; border-bottom: 1px solid var(--border-soft); font-size: .85rem; }
.notif-item.unread { background: var(--brand-tint); }

/* ---------------- Cards / stats ---------------- */
.stat-card {
  background: var(--card-bg); border: 1px solid var(--border); border-radius: 16px;
  padding: 1.1rem; height: 100%;
  box-shadow: var(--sh-sm);
  transition: box-shadow .15s, transform .15s;
}
.stat-card:hover { box-shadow: var(--sh-hover); transform: translateY(-2px); }
.stat-card .stat-value { font-size: 1.6rem; font-weight: 800; letter-spacing: -.02em; }
.stat-card .stat-label { color: var(--text-muted); font-size: .8rem; font-weight: 600; margin-top: .1rem; }
.stat-ic {
  width: 38px; height: 38px; border-radius: 11px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: .85rem;
}
.stat-ic.bg-brand { background: var(--brand-tint); color: var(--brand); }
.stat-ic.bg-green { background: var(--green-tint); color: var(--green); }
.stat-ic.bg-amber { background: var(--amber-tint); color: var(--amber); }
.stat-ic.bg-red { background: var(--red-tint); color: var(--red); }

.card { border-radius: 18px; border: 1px solid var(--border); box-shadow: var(--sh-sm); }
.card-head-x {
  display: flex; align-items: center; gap: .55rem;
  padding: 1.05rem 1.15rem; border-bottom: 1px solid var(--border-soft);
  font-size: .92rem; font-weight: 700;
}
.card-body-x { padding: .5rem .65rem .75rem; }

.row-item { display: flex; align-items: center; gap: .75rem; padding: .65rem .5rem; border-radius: 12px; }
.row-item:hover { background: var(--bg); }
.row-name { font-size: .85rem; font-weight: 700; }
.row-sub { font-size: .75rem; color: var(--text-muted); }
.chip { margin-left: auto; font-size: .68rem; font-weight: 700; padding: .25rem .6rem; border-radius: 999px; white-space: nowrap; }
.chip-today { background: var(--amber-tint); color: var(--amber); }
.chip-tomorrow { background: var(--brand-tint); color: var(--brand); }

.badge-soft {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .45rem .8rem; border-radius: 999px; font-size: .78rem; font-weight: 700;
  background: var(--green-tint); color: var(--green);
  cursor: pointer; font-family: inherit;
}
.badge-soft:disabled { cursor: default; opacity: .8; }

.ev-item { display: flex; align-items: center; gap: .9rem; padding: .85rem 1.1rem; border-bottom: 1px solid var(--border-soft); }
.ev-item:last-child { border-bottom: none; }
.ev-date {
  width: 46px; height: 46px; border-radius: 12px; background: var(--brand-tint); color: var(--brand-dark);
  display: flex; flex-direction: column; align-items: center; justify-content: center; flex-shrink: 0;
}
.ev-date b { font-size: .95rem; line-height: 1; }
.ev-date span { font-size: .58rem; font-weight: 700; text-transform: uppercase; }

.santa-banner {
  background: linear-gradient(120deg, #5b3df6, #7c5cff 60%, #a78bfa);
  border-radius: 20px; padding: 1.6rem 1.75rem;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  box-shadow: 0 14px 30px rgba(91, 61, 246, .28); color: #fff; position: relative; overflow: hidden;
}
.santa-banner::after {
  content: ""; position: absolute; right: -40px; top: -60px; width: 220px; height: 220px;
  border-radius: 50%; background: rgba(255, 255, 255, .08);
}
.santa-ic {
  width: 52px; height: 52px; border-radius: 15px; background: rgba(255, 255, 255, .16);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0; font-size: 1.4rem;
}
.santa-banner h3 { margin: 0 0 .2rem; font-size: 1rem; font-weight: 800; }
.santa-banner p { margin: 0; font-size: .82rem; color: rgba(255, 255, 255, .85); }
.btn-white {
  background: #fff; color: var(--brand-dark); border: none; padding: .65rem 1.25rem; border-radius: 12px;
  font-weight: 700; font-size: .85rem; box-shadow: 0 4px 10px rgba(0, 0, 0, .1); white-space: nowrap; position: relative; z-index: 1;
}
.btn-white:hover { color: var(--brand-dark); }

.employee-card {
  border-radius: 18px; overflow: hidden; transition: box-shadow .15s, transform .15s;
  padding: 0 !important;
}
.employee-card:hover { box-shadow: var(--sh-hover); transform: translateY(-3px); }
.ecard-cover { height: 64px; position: relative; }
.employee-card .avatar-lg {
  width: 72px; height: 72px; border-radius: 50%; object-fit: cover;
  background: linear-gradient(135deg, var(--brand), var(--brand-dark)); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 1.35rem;
  border: 3px solid var(--card-bg);
  margin-top: -40px;
  position: relative; z-index: 1;
}
.employee-card .emp-role { color: var(--text-muted); font-weight: 600; font-size: .82rem; }
.emp-dept-pill {
  display: inline-flex; align-items: center; gap: .35rem;
  font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .03em;
  padding: .3rem .65rem; border-radius: 999px; margin-top: .55rem;
}
.ecard-body { padding: 0 1.1rem 1.1rem; }
.ecard-actions {
  display: flex; border-top: 1px solid var(--border-soft); margin-top: 1rem;
}
.ecard-actions a, .ecard-actions button {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: .3rem;
  padding: .7rem .3rem .1rem; font-size: .68rem; font-weight: 600; color: var(--text-muted);
  background: none; border: none; text-decoration: none;
}
.ecard-actions a:hover, .ecard-actions button:hover { color: var(--brand); }
.ecard-actions i { font-size: 1rem; color: var(--brand); }

.filterbar {
  background: var(--card-bg); border: 1px solid var(--border); border-radius: 16px;
  padding: .85rem; box-shadow: var(--sh-sm);
}
.filterbar .field-ic { position: relative; }
.filterbar .field-ic i {
  position: absolute; left: 13px; top: 50%; transform: translateY(-50%);
  color: var(--text-faint); font-size: .85rem; pointer-events: none;
}
.filterbar .field-ic .form-control,
.filterbar .field-ic .form-select {
  padding-left: 2.1rem;
}
.filterbar .form-control,
.filterbar .form-select {
  background: var(--bg); border: 1px solid var(--border-soft); border-radius: 11px; font-size: .85rem;
}
.filterbar .btn-primary {
  background: linear-gradient(135deg, var(--brand), var(--brand-dark)); border: none; border-radius: 11px;
  font-weight: 700; box-shadow: 0 6px 14px rgba(91, 61, 246, .28);
}
.result-count { font-size: .82rem; color: var(--text-muted); font-weight: 600; }

.dir-results-bar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .75rem; }
.view-toggle { display: inline-flex; border: 1px solid var(--border-soft); border-radius: 11px; overflow: hidden; }
.view-toggle button {
  width: 38px; height: 38px; border: none; background: var(--card-bg); color: var(--text-muted);
  display: flex; align-items: center; justify-content: center; cursor: pointer;
}
.view-toggle button.active { background: linear-gradient(135deg, var(--brand), var(--brand-dark)); color: #fff; }

.dir-hero {
  background: linear-gradient(120deg, #f3f1ff 0%, #eef0fc 55%, #eafaf5 100%);
  border-radius: 20px; padding: 1.75rem 2rem; margin-bottom: 1.25rem;
  position: relative; overflow: hidden; border: 1px solid var(--border-soft);
}
.dir-hero::after {
  content: ''; position: absolute; right: -30px; top: -50px; width: 220px; height: 220px;
  border-radius: 50%; background: radial-gradient(circle, rgba(91, 61, 246, .10), transparent 70%);
}
.dir-eyebrow {
  font-size: .72rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase;
  color: var(--brand); margin-bottom: .3rem;
}
.dir-hero h1 { font-size: 2rem; font-weight: 800; letter-spacing: -.02em; margin: 0 0 .35rem; }
.dir-hero p { color: var(--text-muted); font-size: .92rem; margin: 0; }
.dir-hero-deco { display: flex; align-items: center; gap: 1rem; position: relative; z-index: 1; }
.dir-hero-ic {
  width: 64px; height: 64px; border-radius: 50%; flex-shrink: 0;
  background: linear-gradient(135deg, var(--brand), var(--brand-teal));
  display: flex; align-items: center; justify-content: center; color: #fff; font-size: 1.6rem;
  box-shadow: 0 10px 24px rgba(91, 61, 246, .25);
}
.dir-hero-script {
  font-family: 'Caveat', cursive; font-size: 1.5rem; line-height: 1.15; color: var(--brand-dark);
  transform: rotate(-3deg);
}

/* directory modal */
.dir-modal-photo {
  width: 84px; height: 84px; border-radius: 50%; object-fit: cover;
  background: linear-gradient(135deg, var(--brand), var(--brand-dark)); color: #fff;
  display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 1.6rem;
}

@media (max-width: 767.98px) {
  .dir-hero { padding: 1.4rem 1.5rem; }
  .dir-hero h1 { font-size: 1.5rem; }
  .dir-hero-deco { display: none; }
}

.badge-status-active { background: var(--green-tint); color: var(--green); }
.badge-status-inactive { background: var(--red-tint); color: var(--red); }
.badge-status-pending { background: var(--amber-tint); color: var(--amber); }

.skeleton {
  background: linear-gradient(90deg, #eee 25%, #f5f5f5 37%, #eee 63%);
  background-size: 400% 100%;
  animation: skeleton-loading 1.4s ease infinite;
  border-radius: 8px;
}
@keyframes skeleton-loading {
  0% { background-position: 100% 50%; }
  100% { background-position: 0 50%; }
}

.empty-state { text-align: center; padding: 3rem 1rem; color: var(--text-faint); font-weight: 600; }
.empty-state i { font-size: 2.5rem; opacity: .4; }

/* Bootstrap component tune-up so the rest of the app inherits the same language */
.btn-primary {
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  border: none;
  box-shadow: 0 6px 14px rgba(91, 61, 246, .28);
}
.btn-primary:hover, .btn-primary:focus {
  background: linear-gradient(135deg, var(--brand-dark), var(--brand-dark));
}
.btn { border-radius: 11px; font-weight: 600; }
.form-control, .form-select { border-radius: 10px; border-color: var(--border); }
.form-control:focus, .form-select:focus { border-color: #a89bf7; box-shadow: 0 0 0 .2rem rgba(91, 61, 246, .15); }
.table > :not(caption) > * > * { vertical-align: middle; }
.dropdown-menu { border-radius: var(--r-md); border: 1px solid var(--border-soft); box-shadow: var(--sh-md); }

/* ---------------- Mobile bottom nav ---------------- */
.mobile-bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0;
  height: var(--bottom-nav-height);
  background: var(--card-bg);
  border-top: 1px solid var(--border-soft);
  display: flex; z-index: 90;
  padding-bottom: env(safe-area-inset-bottom);
}
.mobile-nav-item {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  color: #9096a8; text-decoration: none; font-size: .65rem; font-weight: 600; gap: .2rem;
}
.mobile-nav-item i { font-size: 1.2rem; }
.mobile-nav-item.active { color: var(--brand); }

/* ---------------- Responsive ---------------- */
@media (max-width: 991.98px) {
  .app-main { margin-left: 0; }
  .app-content { padding-bottom: calc(var(--bottom-nav-height) + 1rem); }
}

@media (max-width: 575.98px) {
  .app-content { padding: .85rem; }
  .stat-card .stat-value { font-size: 1.3rem; }
  .auth-card .card-body { padding: 1.5rem !important; }
}

.table-responsive-cards .table { display: none; }
@media (max-width: 767.98px) {
  .table-responsive-cards .table { display: none; }
  .table-responsive-cards .row-cards { display: block; }
}
@media (min-width: 768px) {
  .table-responsive-cards .row-cards { display: none; }
  .table-responsive-cards .table { display: table; }
}

.wishlist-box { background: var(--brand-tint); border: 1px dashed #c9bdfb; border-radius: 12px; padding: 1rem; }

/* ---------------- Profile page ---------------- */
.profile-hero {
  background: linear-gradient(120deg, #241a5e 0%, #4527d6 55%, #5b3df6 100%);
  border-radius: 20px;
  padding: 1.5rem 1.75rem;
  color: #fff;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  gap: 1.75rem;
  flex-wrap: wrap;
  box-shadow: 0 14px 30px rgba(69, 39, 214, .28);
}
.profile-hero::after {
  content: '';
  position: absolute; right: -60px; top: -80px; width: 260px; height: 260px;
  border-radius: 50%; background: rgba(255, 255, 255, .06);
}
.profile-hero-photo-wrap { position: relative; flex-shrink: 0; z-index: 1; }
.profile-hero-photo {
  width: 92px; height: 92px; border-radius: 50%; object-fit: cover;
  border: 3px solid rgba(255, 255, 255, .35);
  background: rgba(255, 255, 255, .15);
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 1.8rem; color: #fff;
}
.profile-status-dot {
  position: absolute; right: 2px; bottom: 2px; width: 16px; height: 16px;
  border-radius: 50%; background: var(--green); border: 3px solid #4930d6;
}
.profile-hero-name { font-size: 1.35rem; font-weight: 800; margin: 0; }
.profile-hero-role { font-size: .9rem; color: rgba(255, 255, 255, .82); margin-top: .1rem; }
.profile-dept-pill {
  display: inline-flex; align-items: center; gap: .4rem;
  background: rgba(255, 255, 255, .14); border-radius: 999px;
  padding: .3rem .75rem; font-size: .78rem; font-weight: 600; margin-top: .6rem;
}
.profile-hero-stats {
  display: flex; gap: 1.75rem; margin-left: auto; z-index: 1;
  padding-left: 1.75rem; border-left: 1px solid rgba(255, 255, 255, .18);
  flex-wrap: wrap;
}
@media (max-width: 767.98px) { .profile-hero-stats { border-left: none; padding-left: 0; margin-left: 0; } }
.profile-hero-stat { display: flex; align-items: center; gap: .6rem; }
.profile-hero-stat-ic {
  width: 34px; height: 34px; border-radius: 10px; background: rgba(255, 255, 255, .14);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0; font-size: .95rem;
}
.profile-hero-stat-val { font-weight: 800; font-size: .95rem; line-height: 1.1; }
.profile-hero-stat-lbl { font-size: .72rem; color: rgba(255, 255, 255, .75); }

.profile-locked-pill {
  display: inline-flex; align-items: center; gap: .7rem;
  background: var(--card-bg); border: 1px solid var(--border); border-radius: 16px;
  padding: .6rem 1rem; box-shadow: var(--sh-sm);
}
.profile-locked-pill-ic {
  width: 34px; height: 34px; border-radius: 50%; background: var(--brand-gradient);
  color: #fff; display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}

.profile-field { display: flex; align-items: flex-start; gap: .75rem; padding: .7rem .5rem; border-radius: 12px; }
.profile-field:hover { background: var(--bg); }
.profile-field-ic {
  width: 34px; height: 34px; border-radius: 10px; background: var(--brand-tint); color: var(--brand);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0; font-size: .95rem;
}
.profile-field-label { font-size: .74rem; color: var(--text-muted); font-weight: 600; }
.profile-field-value { font-size: .88rem; font-weight: 700; margin-top: .1rem; word-break: break-word; }

.view-only-pill {
  display: inline-flex; align-items: center; gap: .35rem;
  background: var(--brand-tint); color: var(--brand-dark);
  font-size: .72rem; font-weight: 700; padding: .3rem .7rem; border-radius: 999px;
}

.profile-locked-banner {
  display: flex; align-items: center; gap: 1rem; flex-wrap: wrap;
  background: var(--card-bg); border: 1px solid var(--border); border-radius: 18px;
  padding: 1.1rem 1.4rem; box-shadow: var(--sh-sm);
}
.profile-locked-banner-ic {
  width: 46px; height: 46px; border-radius: 13px; background: var(--brand-tint); color: var(--brand);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0; font-size: 1.2rem;
}

/* ---------------- Dashboard welcome hero ---------------- */
.dash-hero {
  background: linear-gradient(120deg, #f3f1ff 0%, #eef0fc 55%, #eafaf5 100%);
  border-radius: 20px; padding: 1.6rem 2rem; margin-bottom: 1.5rem;
  display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap;
  position: relative; overflow: hidden; border: 1px solid var(--border-soft);
}
.dash-hero::after {
  content: ''; position: absolute; right: -30px; top: -50px; width: 220px; height: 220px;
  border-radius: 50%; background: radial-gradient(circle, rgba(91, 61, 246, .10), transparent 70%);
}
.dash-hero h1 { font-size: 1.7rem; font-weight: 800; letter-spacing: -.02em; margin: 0 0 .3rem; }
.dash-hero p { color: var(--text-muted); font-size: .9rem; margin: 0; }
.dash-hero-deco { display: flex; align-items: center; gap: 1.1rem; position: relative; z-index: 1; }
.dash-hero-quote {
  background: rgba(255, 255, 255, .7); border: 1px solid rgba(255, 255, 255, .8);
  border-radius: 14px; padding: .8rem 1.1rem; font-size: .82rem; font-style: italic; color: var(--brand-dark);
  max-width: 190px; box-shadow: var(--sh-sm);
}
.dash-hero-quote footer { font-size: .68rem; font-style: normal; color: var(--text-faint); margin-top: .3rem; }
.dash-hero-ic {
  width: 58px; height: 58px; border-radius: 50%; flex-shrink: 0;
  background: linear-gradient(135deg, var(--brand), var(--brand-teal));
  display: flex; align-items: center; justify-content: center; color: #fff; font-size: 1.4rem;
  box-shadow: 0 10px 24px rgba(91, 61, 246, .25);
}
@media (max-width: 767.98px) {
  .dash-hero { padding: 1.3rem 1.4rem; }
  .dash-hero h1 { font-size: 1.35rem; }
  .dash-hero-deco { display: none; }
}

/* ---------------- Enhanced stat cards (watermark + trend) ---------------- */
.stat-card-x { position: relative; overflow: hidden; }
.stat-watermark {
  position: absolute; right: -6px; top: -6px; font-size: 3.2rem; opacity: .07; color: var(--brand);
  line-height: 1;
}
.stat-trend { display: inline-flex; align-items: center; gap: .3rem; font-size: .72rem; font-weight: 700; margin-top: .6rem; }
.stat-trend.up { color: var(--green); }
.stat-trend .trend-muted { color: var(--text-faint); font-weight: 500; }

/* ---------------- Rich empty states ---------------- */
.empty-state-lg { text-align: center; padding: 2rem 1rem; }
.empty-ic-lg {
  width: 68px; height: 68px; border-radius: 50%; margin: 0 auto .9rem;
  display: flex; align-items: center; justify-content: center; font-size: 1.7rem;
}
.empty-title-lg { font-weight: 700; font-size: .92rem; color: var(--text); }
.empty-sub-lg { font-size: .78rem; color: var(--text-faint); margin-top: .25rem; }

.pill-link {
  display: inline-flex; align-items: center; gap: .3rem;
  background: var(--brand-tint); color: var(--brand-dark); font-weight: 700; font-size: .74rem;
  padding: .35rem .8rem; border-radius: 999px; text-decoration: none;
}
.pill-link:hover { background: var(--brand-light); color: var(--brand-dark); }

/* ---------------- Admin list pages: header + horizontal stats + table ---------------- */
.page-hero {
  background: linear-gradient(120deg, #f3f1ff 0%, #eef0fc 55%, #eafaf5 100%);
  border-radius: 20px; padding: 1.5rem 2rem; margin-bottom: 1.25rem;
  display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap;
  position: relative; overflow: hidden; border: 1px solid var(--border-soft);
}
.page-hero::after {
  content: ''; position: absolute; right: -30px; top: -50px; width: 220px; height: 220px;
  border-radius: 50%; background: radial-gradient(circle, rgba(91, 61, 246, .10), transparent 70%);
}
.page-hero-title { display: flex; align-items: stretch; gap: .8rem; }
.page-hero-title .bar { width: 5px; border-radius: 4px; background: var(--brand-gradient); flex-shrink: 0; }
.page-hero-title h1 { font-size: 1.6rem; font-weight: 800; letter-spacing: -.02em; margin: 0 0 .3rem; }
.page-hero-title p { color: var(--text-muted); font-size: .9rem; margin: 0; }
@media (max-width: 767.98px) { .page-hero { padding: 1.2rem 1.4rem; } .page-hero-title h1 { font-size: 1.25rem; } .dir-hero-deco, .page-hero .dir-hero-deco { display: none; } }

.stat-card-h {
  display: flex; align-items: center; gap: .9rem;
  background: var(--card-bg); border: 1px solid var(--border); border-radius: 16px;
  padding: 1rem 1.15rem; box-shadow: var(--sh-sm); height: 100%;
}
.stat-card-h .stat-ic { width: 46px; height: 46px; border-radius: 13px; font-size: 1.1rem; margin-bottom: 0; flex-shrink: 0; }
.stat-card-h .stat-value { font-size: 1.4rem; line-height: 1.15; }
.stat-card-h .stat-label { font-size: .8rem; }

.admin-table thead th {
  font-size: .72rem; text-transform: uppercase; letter-spacing: .04em; color: var(--text-faint);
  font-weight: 700; border-bottom: 1px solid var(--border-soft); padding: .8rem .75rem;
}
.admin-table td { padding: .75rem; vertical-align: middle; border-bottom: 1px solid var(--border-soft); }
.admin-table tr:last-child td { border-bottom: none; }
.emp-row-name { font-weight: 700; font-size: .85rem; }
.emp-row-email { font-size: .74rem; color: var(--text-muted); }
.dept-pill {
  display: inline-block; font-size: .72rem; font-weight: 700; padding: .3rem .65rem; border-radius: 999px;
  background: var(--brand-tint); color: var(--brand);
}
.status-dot-pill { display: inline-flex; align-items: center; gap: .35rem; font-size: .72rem; font-weight: 700; padding: .3rem .65rem; border-radius: 999px; }
.status-dot-pill .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

.admin-breadcrumb { font-size: .8rem; color: var(--text-faint); margin-bottom: .6rem; }
.admin-breadcrumb a { color: var(--text-faint); text-decoration: none; }
.admin-breadcrumb a:hover { color: var(--brand); }
.admin-breadcrumb .current { color: var(--brand); font-weight: 600; }

.role-ic {
  width: 38px; height: 38px; border-radius: 11px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; font-size: 1rem;
}
.count-pill {
  display: inline-block; font-size: .78rem; font-weight: 700; padding: .25rem .65rem; border-radius: 999px;
  background: var(--brand-tint); color: var(--brand);
}
.system-tag {
  display: inline-block; font-size: .6rem; font-weight: 700; text-transform: uppercase; letter-spacing: .03em;
  padding: .18rem .5rem; border-radius: 6px; background: #1c2030; color: #fff; margin-left: .4rem;
}
.status-tag {
  display: inline-block; font-size: .72rem; font-weight: 700; padding: .25rem .65rem; border-radius: 8px;
}

.event-card { border-radius: 18px; }
.event-ic {
  width: 76px; height: 76px; border-radius: 18px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; font-size: 1.9rem; color: #fff;
  background: var(--brand-gradient);
}
.event-meta { display: flex; flex-wrap: wrap; gap: 1.4rem; margin-top: .6rem; }
.event-meta-item { display: flex; align-items: center; gap: .5rem; }
.event-meta-item i { font-size: 1.05rem; color: var(--brand); }
.event-meta-item .label { font-size: .7rem; color: var(--text-faint); margin-bottom: 0; }
.event-meta-item .value { font-size: .82rem; font-weight: 700; color: var(--text); }

.cta-panel { text-align: center; padding: 2.5rem 1.5rem; }
.cta-panel-ic {
  width: 84px; height: 84px; border-radius: 50%; margin: 0 auto 1rem;
  display: flex; align-items: center; justify-content: center; font-size: 2.1rem;
  background: var(--brand-tint); color: var(--brand);
}
.cta-panel h3 { font-size: 1.15rem; font-weight: 800; margin-bottom: .4rem; }
.cta-panel p { color: var(--text-muted); font-size: .88rem; max-width: 440px; margin: 0 auto 1.25rem; }
