/* ============================================================
   GIADEC Leave Management System — Main Stylesheet
   Ghana Integrated Aluminium Development Corporation
   ============================================================ */

/* Fonts loaded via layout_header.php <link> — no @import needed */

/* ── CSS Variables ── */
:root {
  --primary:       #0B1F3A;
  --primary-light: #123C69;
  --red-bright:    #174A7C;
  --orange:        #B88920;
  --yellow:        #D6B04C;
  --gray-light:    #A5A5A5;
  --gray-dark:     #636363;
  --white:         #FFFFFF;
  --off-white:     #F6F7F9;
  --surface:       #FFFFFF;
  --surface-2:     #F1F4F8;
  --border:        #DDE4EE;
  --text-main:     #172033;
  --text-secondary:#4B5565;
  --text-muted:    #7A8494;
  --success:       #1A7A4A;
  --success-bg:    #E8F5EE;
  --danger:        #B42318;
  --danger-bg:     #FDECEA;
  --warning:       #D97706;
  --warning-bg:    #FEF3C7;
  --info:          #1D4ED8;
  --info-bg:       #EFF6FF;
  --sidebar-w:     260px;
  --sidebar-collapsed-w: 76px;
  --header-h:      64px;
  --radius:        10px;
  --radius-lg:     16px;
  --shadow-sm:     0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
  --shadow:        0 4px 12px rgba(0,0,0,.08), 0 2px 4px rgba(0,0,0,.04);
  --shadow-lg:     0 12px 32px rgba(0,0,0,.1), 0 4px 8px rgba(0,0,0,.06);
  --transition:    all .2s cubic-bezier(.4,0,.2,1);
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: 'Plus Jakarta Sans', sans-serif;
  background: var(--off-white);
  color: var(--text-main);
  line-height: 1.6;
  min-height: 100vh;
}
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--red-bright); }
img { max-width: 100%; display: block; }
ul { list-style: none; }
button { cursor: pointer; font-family: inherit; }

/* ── Layout ── */
.app-layout {
  display: flex;
  min-height: 100vh;
}

/* ── Sidebar ── */
.sidebar {
  width: var(--sidebar-w);
  background: var(--primary);
  background: linear-gradient(160deg, #07162A 0%, #0B1F3A 44%, #123C69 100%);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 100;
  transition: var(--transition);
  overflow: hidden;
}
.sidebar,
.main-content,
.site-footer {
  transition: margin-left .18s ease, width .18s ease, transform .18s ease;
}

.sidebar-logo {
  padding: 20px 20px 16px;
  border-bottom: 1px solid rgba(255,255,255,.12);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  position: relative;
}
.sidebar-collapse-btn {
  position: absolute;
  right: 12px;
  top: 14px;
  width: 32px;
  height: 32px;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 8px;
  background: rgba(255,255,255,.08);
  color: rgba(255,255,255,.82);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .15s, color .15s, transform .15s;
}
.sidebar-collapse-btn:hover {
  background: rgba(255,255,255,.18);
  color: #fff;
}
.sidebar-collapse-btn .nav-svg-icon {
  width: 18px;
  height: 18px;
}
.sidebar-logo-icon {
  width: 40px; height: 40px;
  background: var(--yellow);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; font-weight: 800;
  color: var(--primary); flex-shrink: 0;
  font-family: 'Playfair Display', serif;
}
.sidebar-logo-text { color: white; }
.sidebar-logo-title {
  font-size: 13px; font-weight: 700; letter-spacing: .5px;
  line-height: 1.2;
}
.sidebar-logo-sub {
  font-size: 10px; opacity: .65; margin-top: 1px; letter-spacing: .3px;
}

.sidebar-user {
  padding: 16px 20px;
  border-bottom: 1px solid rgba(255,255,255,.1);
}
.sidebar-user-name {
  color: white; font-size: 13px; font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.sidebar-user-role {
  font-size: 11px; color: rgba(255,255,255,.55);
  margin-top: 2px; text-transform: uppercase; letter-spacing: .5px;
}

.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 12px 0;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,.2) transparent;
}
.sidebar-nav::-webkit-scrollbar { width: 4px; }
.sidebar-nav::-webkit-scrollbar-track { background: transparent; }
.sidebar-nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,.2); border-radius: 2px; }

.nav-section-label {
  padding: 10px 20px 4px;
  font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 1px; color: rgba(255,255,255,.4);
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px;
  color: rgba(255,255,255,.75);
  font-size: 13.5px;
  font-weight: 500;
  transition: var(--transition);
  border-left: 3px solid transparent;
  margin: 1px 0;
}
.nav-item:hover {
  background: rgba(255,255,255,.1);
  color: white;
  border-left-color: var(--yellow);
}
.nav-item.active {
  background: rgba(255,255,255,.15);
  color: white;
  border-left-color: var(--yellow);
  font-weight: 600;
}
.nav-item-icon {
  width: 20px; text-align: center;
  font-size: 16px; flex-shrink: 0;
}
.nav-badge {
  margin-left: auto;
  background: var(--yellow); color: var(--primary);
  font-size: 10px; font-weight: 700;
  padding: 2px 7px; border-radius: 20px;
  min-width: 20px; text-align: center;
}

.sidebar-footer {
  padding: 12px 20px;
  border-top: 1px solid rgba(255,255,255,.1);
}
.sidebar-footer .nav-item {
  padding: 8px 0;
  border-left: none !important;
}

body.sidebar-collapsed .sidebar { width: var(--sidebar-collapsed-w); }
body.sidebar-collapsed .main-content { margin-left: var(--sidebar-collapsed-w); }
body.sidebar-collapsed .site-footer { margin-left: var(--sidebar-collapsed-w); }
body.sidebar-collapsed .sidebar-logo { padding: 18px 12px 14px; justify-content: center; align-items: center; }
body.sidebar-collapsed .sidebar-logo-img { width: 42px; max-width: 42px; object-fit: contain; }
body.sidebar-collapsed .sidebar-collapse-btn {
  position: static;
  margin-top: 10px;
  transform: rotate(180deg);
}
body.sidebar-collapsed .sidebar-logo-lms,
body.sidebar-collapsed .sidebar-user,
body.sidebar-collapsed .nav-section-label span,
body.sidebar-collapsed .nav-label { display: none; }
body.sidebar-collapsed .nav-section-label {
  height: 12px; padding: 8px 0 2px; margin: 0 18px;
  border-top: 1px solid rgba(255,255,255,.18);
}
body.sidebar-collapsed .nav-item {
  justify-content: center; padding: 11px 0; margin: 2px 10px;
  border-left: none; border-radius: 10px; position: relative;
}
body.sidebar-collapsed .nav-item:hover,
body.sidebar-collapsed .nav-item.active {
  border-left-color: transparent; background: rgba(255,255,255,.16);
}
body.sidebar-collapsed .nav-item-icon { width: 24px; }
body.sidebar-collapsed .nav-badge {
  position: absolute; top: 3px; right: 4px; min-width: 16px;
  padding: 1px 5px; font-size: 9px;
}
body.sidebar-collapsed .sidebar-footer { padding: 10px; }
body.sidebar-collapsed .sidebar-footer .nav-item { padding: 10px 0; }

/* ── Main Content ── */
.main-content {
  margin-left: var(--sidebar-w);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ── Top Header ── */
.topbar {
  height: var(--header-h);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 24px;
  gap: 16px;
  position: sticky;
  top: 0; z-index: 50;
  box-shadow: var(--shadow-sm);
}
.topbar-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  background: none; border: none;
  font-size: 20px; color: var(--gray-dark);
  padding: 8px; border-radius: 8px;
}
.topbar-toggle:hover { background: var(--surface-2); }
.topbar-title {
  font-size: 16px; font-weight: 700; color: var(--text-main);
  flex: 1;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.topbar-actions {
  display: flex; align-items: center; gap: 8px;
}
.topbar-btn {
  background: none; border: none;
  width: 36px; height: 36px;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; color: var(--gray-dark);
  transition: var(--transition); position: relative;
}
.topbar-btn:hover { background: var(--surface-2); }
.topbar-notif-dot {
  position: absolute; top: 6px; right: 6px;
  width: 8px; height: 8px;
  background: var(--red-bright); border-radius: 50%;
  border: 2px solid white;
}
.topbar-user {
  display: flex; align-items: center; gap: 10px;
  padding: 6px 12px;
  border-radius: var(--radius);
  cursor: pointer; transition: var(--transition);
  border: 1px solid transparent;
}
.topbar-user:hover { background: var(--surface-2); border-color: var(--border); }
.topbar-avatar {
  width: 34px; height: 34px;
  background: linear-gradient(135deg, var(--primary), var(--red-bright));
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: white; font-size: 13px; font-weight: 700;
  flex-shrink: 0;
}
.topbar-user-info { display: flex; flex-direction: column; }
.topbar-user-name { font-size: 13px; font-weight: 600; line-height: 1.2; }
.topbar-user-role { font-size: 11px; color: var(--text-muted); }

/* ── Page Content ── */
.page-content {
  flex: 1;
  padding: 24px;
  max-width: 1400px;
}
.page-header {
  margin-bottom: 24px;
}
.page-header h1 {
  font-size: 24px; font-weight: 800; color: var(--text-main);
  font-family: 'Playfair Display', serif;
}
.page-header p {
  font-size: 14px; color: var(--text-secondary); margin-top: 4px;
}
.page-breadcrumb {
  display: flex; align-items: center; gap: 6px;
  font-size: 12px; color: var(--text-muted);
  margin-bottom: 8px;
}
.page-breadcrumb a { color: var(--primary); }
.page-breadcrumb span { color: var(--gray-light); }

/* ── Cards ── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.card-header {
  padding: 18px 20px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
}
.card-title {
  font-size: 15px; font-weight: 700; color: var(--text-main);
}
.card-body { padding: 20px; }

/* ── Stats Grid ── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}
.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex; align-items: flex-start; justify-content: space-between;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}
.stat-card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0;
  height: 3px;
}
.stat-card.primary::before   { background: var(--primary); }
.stat-card.red::before       { background: var(--red-bright); }
.stat-card.orange::before    { background: var(--orange); }
.stat-card.yellow::before    { background: var(--yellow); }
.stat-card.green::before     { background: var(--success); }

.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.stat-info {}
.stat-label { font-size: 12px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: .5px; }
.stat-value { font-size: 32px; font-weight: 800; color: var(--text-main); line-height: 1.1; margin: 6px 0 4px; }
.stat-sub { font-size: 12px; color: var(--text-secondary); }
.stat-icon {
  width: 44px; height: 44px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; flex-shrink: 0;
}
.stat-card.primary .stat-icon   { background: #FDECEA; }
.stat-card.red .stat-icon       { background: #FDECEA; }
.stat-card.orange .stat-icon    { background: #FEF3C7; }
.stat-card.yellow .stat-icon    { background: #FEF9E7; }
.stat-card.green .stat-icon     { background: var(--success-bg); }

/* ── Badges ── */
.badge {
  display: inline-flex; align-items: center;
  padding: 3px 10px; border-radius: 20px;
  font-size: 11.5px; font-weight: 600; letter-spacing: .2px;
  white-space: nowrap;
}
.badge-red    { background: var(--danger-bg); color: var(--danger); }
.badge-orange { background: #FEF3C7; color: #B45309; }
.badge-yellow { background: #FEF9E7; color: #92610A; }
.badge-purple { background: #F3E8FF; color: #6B21A8; }
.badge-green  { background: var(--success-bg); color: var(--success); }
.badge-gray   { background: #F3F4F6; color: var(--gray-dark); }
.badge-blue   { background: var(--info-bg); color: var(--info); }

/* ── Tables ── */
.table-wrapper {
  overflow-x: auto;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
thead tr { background: var(--surface-2); }
th {
  padding: 12px 16px;
  text-align: left; font-weight: 600;
  color: var(--text-secondary); font-size: 12px;
  text-transform: uppercase; letter-spacing: .5px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
td {
  padding: 13px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--text-main);
  vertical-align: middle;
}
tbody tr { transition: var(--transition); }
tbody tr:hover { background: var(--surface-2); }
tbody tr:last-child td { border-bottom: none; }

/* ── Forms ── */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.form-grid.cols-3 { grid-template-columns: 1fr 1fr 1fr; }
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group.full { grid-column: 1 / -1; }
label {
  font-size: 13px; font-weight: 600; color: var(--text-secondary);
}
.form-control {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-size: 14px;
  font-family: inherit;
  color: var(--text-main);
  background: var(--surface);
  transition: var(--transition);
  outline: none;
}
.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(11,31,58,.12);
}
.form-control::placeholder { color: var(--gray-light); }
select.form-control { cursor: pointer; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23636363' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; background-size: 16px;
  padding-right: 36px;
}
textarea.form-control { resize: vertical; min-height: 100px; }
.form-hint { font-size: 12px; color: var(--text-muted); }
.form-error { font-size: 12px; color: var(--danger); }

/* ── Buttons ── */
.btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 9px 18px;
  border-radius: var(--radius);
  font-size: 13.5px; font-weight: 600;
  border: none; transition: var(--transition);
  font-family: inherit; white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
}
.btn-sm  { padding: 6px 13px; font-size: 12.5px; }
.btn-lg  { padding: 12px 24px; font-size: 15px; }
.btn-block { width: 100%; justify-content: center; }

.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: var(--red-bright); color: white; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(11,31,58,.28); }

.btn-secondary { background: var(--surface-2); color: var(--text-main); border: 1px solid var(--border); }
.btn-secondary:hover { background: var(--border); }

.btn-success { background: var(--success); color: white; }
.btn-success:hover { background: #158040; color: white; transform: translateY(-1px); }

.btn-danger  { background: var(--danger);  color: white; }
.btn-danger:hover  { background: var(--red-bright); color: white; }

.btn-orange { background: var(--orange); color: white; }
.btn-orange:hover { background: #d96207; color: white; }

.btn-outline { background: transparent; border: 1.5px solid var(--primary); color: var(--primary); }
.btn-outline:hover { background: var(--primary); color: white; }

/* ── Alerts ── */
.alert {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px;
  border-radius: var(--radius);
  margin-bottom: 16px;
  font-size: 14px; font-weight: 500;
}
.alert-icon { font-size: 16px; flex-shrink: 0; }
.alert-close { margin-left: auto; background: none; border: none; font-size: 18px; opacity: .5; cursor: pointer; }
.alert-close:hover { opacity: 1; }
.alert-success { background: var(--success-bg); color: var(--success); border: 1px solid #BBF7D0; }
.alert-error   { background: var(--danger-bg); color: var(--danger); border: 1px solid #FCA5A5; }
.alert-warning { background: var(--warning-bg); color: var(--warning); border: 1px solid #FDE68A; }
.alert-info    { background: var(--info-bg); color: var(--info); border: 1px solid #BFDBFE; }

/* ── Filters Bar ── */
.filters-bar {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 16px 20px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
}
.filter-group { display: flex; align-items: center; gap: 8px; }
.filter-group label { font-size: 12px; font-weight: 600; color: var(--text-muted); white-space: nowrap; }
.filter-select {
  padding: 7px 30px 7px 12px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: 13px; font-family: inherit;
  background: white;
  cursor: pointer; outline: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23636363' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 8px center; background-size: 14px;
}
.filter-select:focus { border-color: var(--primary); }
.filter-search {
  padding: 7px 12px; border: 1.5px solid var(--border);
  border-radius: 8px; font-size: 13px; font-family: inherit;
  outline: none; min-width: 200px;
}
.filter-search:focus { border-color: var(--primary); }

/* ── Approval Workflow Steps ── */
.workflow-steps {
  display: flex; gap: 0;
  margin: 20px 0;
}
.workflow-step {
  flex: 1;
  padding: 14px 16px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-right: none;
  position: relative;
  font-size: 13px;
}
.workflow-step:first-child { border-radius: var(--radius) 0 0 var(--radius); }
.workflow-step:last-child  { border-radius: 0 var(--radius) var(--radius) 0; border-right: 1px solid var(--border); }
.workflow-step.approved { background: var(--success-bg); border-color: #BBF7D0; }
.workflow-step.rejected { background: var(--danger-bg);  border-color: #FCA5A5; }
.workflow-step.active   { background: #FEF3C7; border-color: #FDE68A; }
.workflow-step-num  { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: var(--text-muted); }
.workflow-step-name { font-weight: 600; color: var(--text-main); margin: 2px 0; }
.workflow-step-status { font-size: 12px; color: var(--text-secondary); }
.workflow-arrow {
  position: absolute; right: -12px; top: 50%;
  transform: translateY(-50%);
  z-index: 1;
  color: var(--gray-light); font-size: 16px;
}

/* ── Leave Balance Cards ── */
.balance-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}
.balance-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  text-align: center;
  transition: var(--transition);
}
.balance-card:hover { box-shadow: var(--shadow); }
.balance-type { font-size: 12px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: .4px; margin-bottom: 8px; }
.balance-days { font-size: 28px; font-weight: 800; color: var(--primary); line-height: 1; }
.balance-days span { font-size: 13px; font-weight: 600; color: var(--text-muted); }
.balance-bar { height: 4px; background: var(--border); border-radius: 2px; margin: 10px 0 6px; overflow: hidden; }
.balance-bar-fill { height: 100%; background: var(--primary); border-radius: 2px; transition: width .5s ease; }
.balance-used { font-size: 11px; color: var(--text-muted); }

/* ── Empty State ── */
.empty-state {
  text-align: center; padding: 60px 20px;
  color: var(--text-muted);
}
.empty-state-icon { font-size: 56px; margin-bottom: 16px; opacity: .4; }
.empty-state h3 { font-size: 18px; font-weight: 700; color: var(--text-secondary); margin-bottom: 8px; }
.empty-state p { font-size: 14px; }

/* ── Modal ── */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.5); backdrop-filter: blur(2px);
  z-index: 200;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  opacity: 0; pointer-events: none; transition: opacity .2s;
}
.modal-overlay.open { opacity: 1; pointer-events: auto; }
.modal {
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  width: 100%; max-width: 560px;
  max-height: 90vh; overflow-y: auto;
  transform: scale(.95); transition: transform .2s;
}
.modal-overlay.open .modal { transform: scale(1); }
.modal-header {
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
}
.modal-title { font-size: 17px; font-weight: 700; }
.modal-close { background: none; border: none; font-size: 22px; color: var(--text-muted); cursor: pointer; }
.modal-body   { padding: 20px 24px; }
.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  display: flex; justify-content: flex-end; gap: 10px;
}

/* ── Pagination ── */
.pagination {
  display: flex; align-items: center; gap: 4px;
  padding: 16px 20px; border-top: 1px solid var(--border);
}
.pagination-info { font-size: 13px; color: var(--text-muted); margin-right: auto; }
.page-btn {
  width: 34px; height: 34px;
  border-radius: 8px; border: 1px solid var(--border);
  background: white; color: var(--text-main); font-size: 13px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: var(--transition);
}
.page-btn:hover { background: var(--surface-2); }
.page-btn.active { background: var(--primary); color: white; border-color: var(--primary); }
.page-btn:disabled { opacity: .4; cursor: not-allowed; }

/* ── Login Page ── */
.login-page {
  min-height: 100vh;
  display: flex;
  background: linear-gradient(135deg, #07162A 0%, #0B1F3A 50%, #123C69 100%);
  position: relative;
  overflow: hidden;
}
.login-bg-shape {
  position: absolute;
  border-radius: 50%;
  background: rgba(255,255,255,.04);
}
.login-left {
  flex: 1; display: flex; flex-direction: column;
  justify-content: center; padding: 60px;
  color: white;
}
.login-brand { display: flex; align-items: center; gap: 16px; margin-bottom: 48px; }
.login-brand-logo {
  width: 56px; height: 56px;
  background: var(--yellow); border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Playfair Display', serif;
  font-size: 24px; font-weight: 700; color: var(--primary);
}
.login-brand-name { font-size: 22px; font-weight: 800; line-height: 1.1; }
.login-brand-sub  { font-size: 13px; opacity: .6; margin-top: 2px; }
.login-headline {
  font-family: 'Playfair Display', serif;
  font-size: 42px; line-height: 1.15; font-weight: 700;
  margin-bottom: 20px;
}
.login-headline span { color: var(--yellow); }
.login-desc { font-size: 16px; opacity: .75; line-height: 1.7; max-width: 400px; }
.login-features { margin-top: 40px; display: flex; flex-direction: column; gap: 12px; }
.login-feature {
  display: flex; align-items: center; gap: 12px;
  font-size: 14px; opacity: .8;
}
.login-feature-dot { width: 8px; height: 8px; background: var(--yellow); border-radius: 50%; flex-shrink: 0; }

.login-right {
  width: 480px; flex-shrink: 0;
  background: white;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 60px 48px;
}
.login-form-title { font-size: 24px; font-weight: 800; color: var(--text-main); text-align: center; margin-bottom: 8px; }
.login-form-sub   { font-size: 14px; color: var(--text-muted); text-align: center; margin-bottom: 36px; }

.btn-microsoft {
  display: flex; align-items: center; justify-content: center; gap: 12px;
  width: 100%; padding: 13px 24px;
  background: #0078D4; color: white;
  border: none; border-radius: var(--radius);
  font-size: 15px; font-weight: 600; font-family: inherit;
  cursor: pointer; transition: var(--transition);
}
.btn-microsoft:hover { background: #006BBE; transform: translateY(-1px); box-shadow: 0 6px 16px rgba(0,120,212,.3); }
.btn-microsoft svg { width: 20px; height: 20px; flex-shrink: 0; }

.login-divider {
  display: flex; align-items: center; gap: 12px;
  margin: 24px 0; color: var(--text-muted); font-size: 13px;
}
.login-divider::before, .login-divider::after {
  content: ''; flex: 1; height: 1px; background: var(--border);
}
.login-footer-note { margin-top: 32px; font-size: 12px; color: var(--text-muted); text-align: center; line-height: 1.6; }

/* ── Timeline (Approval History) ── */
.timeline { display: flex; flex-direction: column; gap: 0; }
.timeline-item { display: flex; gap: 16px; padding-bottom: 24px; position: relative; }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-item::before {
  content: '';
  position: absolute; left: 19px; top: 40px; bottom: 0;
  width: 2px; background: var(--border);
}
.timeline-item:last-child::before { display: none; }
.timeline-dot {
  width: 40px; height: 40px; flex-shrink: 0;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
  border: 2px solid var(--border);
  background: var(--surface);
  position: relative; z-index: 1;
}
.timeline-dot.approved { background: var(--success-bg); border-color: var(--success); }
.timeline-dot.rejected { background: var(--danger-bg);  border-color: var(--danger); }
.timeline-dot.pending  { background: #FEF3C7; border-color: var(--yellow); }
.timeline-content { flex: 1; padding-top: 6px; }
.timeline-content h4 { font-size: 14px; font-weight: 700; }
.timeline-meta { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.timeline-comment {
  margin-top: 8px; padding: 10px 14px;
  background: var(--surface-2); border-radius: 8px;
  font-size: 13px; color: var(--text-secondary);
  border-left: 3px solid var(--border);
}

/* ── Top Strip (GIADEC accent) ── */
.top-strip {
  height: 4px;
  background: linear-gradient(90deg, #07162A 0%, #0B1F3A 42%, #B88920 72%, #D6B04C 100%);
}

/* ── Responsive ── */
@media (max-width: 1024px) {
  .form-grid.cols-3 { grid-template-columns: 1fr 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  body.sidebar-collapsed {
    --sidebar-collapsed-w: var(--sidebar-w);
  }
  body.sidebar-collapsed .sidebar {
    width: var(--sidebar-w);
  }
  body.sidebar-collapsed .main-content,
  body.sidebar-collapsed .site-footer {
    margin-left: 0;
  }
  body.sidebar-collapsed .sidebar-logo-img {
    width: 150px;
    max-width: 150px;
  }
  body.sidebar-collapsed .sidebar-collapse-btn {
    position: absolute;
    margin-top: 0;
    transform: none;
  }
  .sidebar-collapse-btn {
    display: none;
  }
  body.sidebar-collapsed .sidebar-logo-lms,
  body.sidebar-collapsed .sidebar-user,
  body.sidebar-collapsed .nav-section-label span,
  body.sidebar-collapsed .nav-label {
    display: initial;
  }
  body.sidebar-collapsed .nav-section-label {
    height: auto;
    padding: 10px 20px 4px;
    margin: 0;
    border-top: none;
  }
  body.sidebar-collapsed .nav-item {
    justify-content: flex-start;
    padding: 10px 20px;
    margin: 1px 0;
    border-left: 3px solid transparent;
    border-radius: 0;
  }
  body.sidebar-collapsed .nav-item.active {
    border-left-color: var(--yellow);
  }
  body.sidebar-collapsed .nav-badge {
    position: static;
    margin-left: auto;
    min-width: 20px;
    padding: 2px 7px;
    font-size: 10px;
  }
  .sidebar {
    width: min(var(--sidebar-w), 88vw);
    max-width: 320px;
    transform: translateX(-100%);
    box-shadow: var(--shadow-lg);
  }
  .sidebar.open { transform: translateX(0); }
  .main-content { margin-left: 0; }
  .topbar-toggle { display: flex; }
  .page-content { padding: 16px; }
  .form-grid, .form-grid.cols-3 { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .workflow-steps { flex-direction: column; }
  .workflow-step { border-right: 1px solid var(--border) !important; border-bottom: none; border-radius: 0 !important; }
  .workflow-step:first-child { border-radius: var(--radius) var(--radius) 0 0 !important; }
  .workflow-step:last-child  { border-radius: 0 0 var(--radius) var(--radius) !important; border-bottom: 1px solid var(--border) !important; }
  .login-left { display: none; }
  .login-right { width: 100%; padding: 40px 24px; }
  .topbar-user-info { display: none; }
}

@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr; }
  .balance-grid { grid-template-columns: 1fr 1fr; }
  .filters-bar { flex-direction: column; align-items: stretch; }
  .filter-search { min-width: unset; }
}

/* ── Responsive two-column page layout (form + sidebar) ── */
.page-two-col {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 20px;
}
@media (max-width: 768px) {
  .page-two-col {
    grid-template-columns: 1fr;
  }
}

/* ── Mobile: prevent main-content from overflowing viewport ── */
@media (max-width: 768px) {
  .main-content {
    min-width: 0;
    max-width: 100vw;
    overflow-x: hidden;
  }
}

/* ── Mobile table: hide low-priority columns & compact layout ── */
@media (max-width: 768px) {
  .col-hide-mobile { display: none !important; }
  /* Truncate long reference numbers instead of wrapping */
  .ref-cell {
    max-width: 90px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 11px;
  }
  /* Compact table cell padding */
  table th, table td { padding: 8px 6px !important; font-size: 12px; }
  /* Compact action buttons */
  table .btn-sm { padding: 4px 6px !important; font-size: 11px !important; }
}

/* ── Sidebar overlay (mobile) ── */
.sidebar-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,.45);
  z-index: 99;
}
.sidebar-overlay.show { display: block; }

/* ── Utility ── */
.text-center { text-align: center; }
.text-right  { text-align: right; }
.text-muted  { color: var(--text-muted); }
.text-danger { color: var(--danger); }
.text-success{ color: var(--success); }
.fw-bold     { font-weight: 700; }
.mt-4  { margin-top: 4px; }
.mt-8  { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.d-flex { display: flex; }
.align-center { align-items: center; }
.gap-8  { gap: 8px; }
.gap-12 { gap: 12px; }
.flex-1 { flex: 1; }
.hidden { display: none; }

/* ── Print ── */
@media print {
  .sidebar, .topbar, .btn, .filters-bar { display: none !important; }
  .main-content { margin-left: 0; }
  .page-content { padding: 0; }
  .card { box-shadow: none; border: 1px solid #ddd; }
}

/* ═══════════════════════════════════════════════
   SVG ICON SYSTEM
   ═══════════════════════════════════════════════ */
.nav-svg-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  display: block;
}
.nav-item-icon {
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.nav-item-icon .nav-svg-icon {
  width: 17px;
  height: 17px;
}
.topbar-toggle .nav-svg-icon {
  width: 20px;
  height: 20px;
  color: var(--gray-dark);
}
.dropdown-item-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

/* ═══════════════════════════════════════════════
   TOPBAR — NOTIFICATIONS & PENDING
   ═══════════════════════════════════════════════ */
.topbar-notif-btn,
.topbar-pending-btn {
  position: relative;
  text-decoration: none;
  color: var(--gray-dark);
}
.topbar-notif-btn .nav-svg-icon,
.topbar-pending-btn .nav-svg-icon {
  width: 20px; height: 20px;
}
.topbar-notif-badge,
.topbar-pending-badge {
  position: absolute;
  top: -3px; right: -3px;
  background: var(--red-bright);
  color: white;
  border-radius: 20px;
  min-width: 17px; height: 17px;
  font-size: 9px; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  padding: 0 4px;
  border: 2px solid white;
  line-height: 1;
}
.topbar-pending-badge { background: var(--orange); }

/* ═══════════════════════════════════════════════
   TOPBAR USER BUTTON & DROPDOWN
   ═══════════════════════════════════════════════ */
.topbar-user { position: relative; }
.topbar-user-btn {
  display: flex; align-items: center; gap: 10px;
  padding: 5px 10px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  background: none;
  cursor: pointer; transition: var(--transition);
  font-family: inherit;
}
.topbar-user-btn:hover {
  background: var(--surface-2);
  border-color: var(--border);
}
.topbar-chevron {
  width: 16px; height: 16px;
  color: var(--text-muted);
  transition: transform .2s;
  flex-shrink: 0;
}
.topbar-user-btn[aria-expanded="true"] .topbar-chevron {
  transform: rotate(180deg);
}

.user-dropdown {
  position: absolute;
  top: calc(100% + 8px); right: 0;
  background: white;
  border: 1.5px solid var(--border);
  border-radius: 14px;
  min-width: 210px;
  box-shadow: 0 8px 32px rgba(0,0,0,.13);
  z-index: 1000;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-6px) scale(.98);
  transform-origin: top right;
  transition: opacity .18s ease, transform .18s ease;
}
.user-dropdown.open {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}
.user-dropdown-header {
  padding: 13px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
}
.user-dropdown-name {
  font-size: 13px; font-weight: 700; color: var(--text-main);
}
.user-dropdown-role {
  font-size: 11px; color: var(--text-muted); margin-top: 1px;
}
.user-dropdown-item {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 16px;
  font-size: 13px; font-weight: 600;
  color: var(--text-main); text-decoration: none;
  transition: background .12s;
}
.user-dropdown-item:hover { background: var(--surface-2); }
.user-dropdown-item .dropdown-item-icon { color: var(--text-muted); }
.user-dropdown-divider {
  height: 1px; background: var(--border); margin: 2px 0;
}
.user-dropdown-logout { color: var(--danger); }
.user-dropdown-logout .dropdown-item-icon { color: var(--danger); }
.user-dropdown-logout:hover { background: var(--danger-bg); }

/* ═══════════════════════════════════════════════
   SIDEBAR LOGO HELPERS
   ═══════════════════════════════════════════════ */
.sidebar-logo-img {
  width: 150px; height: auto; display: block;
  filter: drop-shadow(0 2px 8px rgba(0,0,0,.3));
}
.sidebar-logo-lms {
  color: rgba(255,255,255,.5);
  font-size: 10px; letter-spacing: .4px;
  margin-top: 0; padding-left: 2px;
  line-height: 1.35;
  max-width: 180px;
}

/* ═══════════════════════════════════════════════
   SITE FOOTER
   ═══════════════════════════════════════════════ */
.site-footer {
  margin-left: var(--sidebar-w);
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 14px 24px;
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.7;
  transition: margin-left .2s;
}
.site-footer a {
  color: var(--primary);
  font-weight: 700;
  text-decoration: none;
}
.site-footer a:hover { text-decoration: underline; }
@media (max-width: 768px) {
  .site-footer { margin-left: 0; }
}

/* ═══════════════════════════════════════════════
   TOAST NOTIFICATION SYSTEM
   ═══════════════════════════════════════════════ */
.toast-container {
  position: fixed;
  bottom: 24px; right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}
.toast {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 14px 16px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0,0,0,.14), 0 2px 8px rgba(0,0,0,.08);
  border-left: 4px solid var(--primary);
  min-width: 280px; max-width: 380px;
  pointer-events: auto;
  animation: toastIn .3s cubic-bezier(.34,1.56,.64,1) forwards;
  position: relative;
  overflow: hidden;
}
.toast.toast-hiding {
  animation: toastOut .25s ease forwards;
}
.toast-success { border-left-color: var(--success); }
.toast-error   { border-left-color: var(--danger); }
.toast-warning { border-left-color: var(--warning); }
.toast-info    { border-left-color: var(--info); }

.toast-icon {
  width: 20px; height: 20px; flex-shrink: 0; margin-top: 1px;
}
.toast-success .toast-icon { color: var(--success); }
.toast-error   .toast-icon { color: var(--danger); }
.toast-warning .toast-icon { color: var(--warning); }
.toast-info    .toast-icon { color: var(--info); }

.toast-body { flex: 1; min-width: 0; }
.toast-title {
  font-size: 13.5px; font-weight: 700; color: var(--text-main); line-height: 1.3;
}
.toast-msg {
  font-size: 12.5px; color: var(--text-secondary); margin-top: 2px; line-height: 1.5;
}
.toast-close {
  background: none; border: none; cursor: pointer;
  color: var(--text-muted); padding: 0; font-size: 18px;
  line-height: 1; flex-shrink: 0; margin-top: -1px;
  transition: color .15s;
}
.toast-close:hover { color: var(--text-main); }
.toast-progress {
  position: absolute; bottom: 0; left: 0;
  height: 3px; background: currentColor;
  opacity: .25;
  animation: toastProgress linear forwards;
}
.toast-success .toast-progress { color: var(--success); }
.toast-error   .toast-progress { color: var(--danger); }
.toast-warning .toast-progress { color: var(--warning); }
.toast-info    .toast-progress { color: var(--info); }

@keyframes toastIn {
  from { opacity: 0; transform: translateY(16px) scale(.94); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes toastOut {
  from { opacity: 1; transform: translateX(0); max-height: 200px; margin-bottom: 0; }
  to   { opacity: 0; transform: translateX(24px); max-height: 0; margin-bottom: -10px; }
}
@keyframes toastProgress {
  from { width: 100%; }
  to   { width: 0%; }
}
@media (max-width: 480px) {
  .toast-container { bottom: 16px; right: 16px; left: 16px; }
  .toast { min-width: unset; max-width: unset; }
}

/* ═══════════════════════════════════════════════
   DASHBOARD — Hero, KPI, Balance, Charts
   (moved from dashboard.php inline styles)
   ═══════════════════════════════════════════════ */

/* ── Welcome Hero ── */
.hero {
  position: relative;
  background: linear-gradient(135deg, #07162A 0%, #0B1F3A 46%, #123C69 72%, #0A294D 100%);
  border-radius: 20px;
  padding: 32px 36px;
  margin-bottom: 28px;
  color: white;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}
.hero-orb {
  position: absolute; border-radius: 50%;
  background: rgba(255,255,255,.06); pointer-events: none;
}
.hero-orb-1 { width: 260px; height: 260px; right: -60px; top: -80px; }
.hero-orb-2 { width: 160px; height: 160px; right: 160px; bottom: -60px; }
.hero-orb-3 { width: 80px; height: 80px; right: 80px; top: 20px; background: rgba(252,193,12,.1); }
.hero-left  { position: relative; z-index: 1; }
.hero-greeting {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 1.5px; opacity: .65; margin-bottom: 6px;
}
.hero-name {
  font-family: 'Playfair Display', serif;
  font-size: 28px; font-weight: 700; line-height: 1.1; margin-bottom: 8px;
}
.hero-meta {
  display: flex; align-items: center; gap: 6px;
  font-size: 12.5px; opacity: .65; flex-wrap: wrap;
}
.hero-meta-dot { width: 3px; height: 3px; border-radius: 50%; background: rgba(255,255,255,.5); }
.hero-right {
  display: flex; gap: 12px; flex-wrap: wrap; position: relative; z-index: 1;
}
.hero-kpi {
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.2);
  backdrop-filter: blur(8px);
  border-radius: 14px; padding: 14px 20px;
  text-align: center; min-width: 96px;
  transition: transform .2s, background .2s;
}
.hero-kpi:hover { transform: translateY(-2px); background: rgba(255,255,255,.18); }
.hero-kpi-val { font-size: 30px; font-weight: 800; line-height: 1; }
.hero-kpi-lbl { font-size: 10.5px; opacity: .7; margin-top: 4px; font-weight: 600; letter-spacing: .3px; }
.hero-actions {
  display: flex; gap: 10px; margin-top: 18px; flex-wrap: wrap; position: relative; z-index: 1;
}
.hero-btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 9px 18px; border-radius: 10px;
  font-size: 13px; font-weight: 700; cursor: pointer;
  text-decoration: none; transition: all .2s; border: none; font-family: inherit;
}
.hero-btn-primary { background: white; color: var(--primary); }
.hero-btn-primary:hover { background: #f0f0f0; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(0,0,0,.15); }
.hero-btn-ghost { background: rgba(255,255,255,.15); color: white; border: 1px solid rgba(255,255,255,.3); }
.hero-btn-ghost:hover { background: rgba(255,255,255,.25); color: white; }

/* ── KPI Strip ── */
.kpi-strip {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 28px;
}
.kpi-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: 16px;
  padding: 20px 22px; position: relative; overflow: hidden;
  transition: transform .2s, box-shadow .2s; cursor: default;
}
.kpi-card::after {
  content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 3px;
  opacity: 0; transition: opacity .2s;
}
.kpi-card:hover { transform: translateY(-3px); box-shadow: 0 8px 24px rgba(0,0,0,.1); }
.kpi-card:hover::after { opacity: 1; }
.kpi-card.c-red::after    { background: linear-gradient(to right, var(--primary), var(--red-bright)); }
.kpi-card.c-orange::after { background: linear-gradient(to right, var(--orange), #FBBF24); }
.kpi-card.c-green::after  { background: linear-gradient(to right, var(--success), #34D399); }
.kpi-card.c-blue::after   { background: linear-gradient(to right, var(--info), #60A5FA); }
.kpi-icon-wrap {
  width: 42px; height: 42px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; margin-bottom: 14px;
}
.kpi-card.c-red    .kpi-icon-wrap { background: #FEE2E2; }
.kpi-card.c-orange .kpi-icon-wrap { background: #FEF3C7; }
.kpi-card.c-green  .kpi-icon-wrap { background: #D1FAE5; }
.kpi-card.c-blue   .kpi-icon-wrap { background: #DBEAFE; }
.kpi-number {
  font-size: 34px; font-weight: 800; line-height: 1;
  color: var(--text-main); margin-bottom: 4px; font-variant-numeric: tabular-nums;
}
.kpi-label { font-size: 12px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: .5px; }
.kpi-trend {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11px; font-weight: 700; padding: 2px 8px;
  border-radius: 20px; margin-top: 8px;
}
.kpi-trend.up   { background: #FEE2E2; color: var(--danger); }
.kpi-trend.down { background: #D1FAE5; color: var(--success); }
.kpi-trend.flat { background: var(--surface-2); color: var(--text-muted); }
.kpi-sparkline  { position: absolute; bottom: 0; right: 0; opacity: .08; font-size: 48px; line-height: 1; padding: 4px 8px; }

/* ── Section Headers ── */
.dash-section-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px; margin-top: 32px;
}
.dash-section-title {
  font-size: 16px; font-weight: 800; color: var(--text-main);
  display: flex; align-items: center; gap: 8px;
}
.dash-section-title::before {
  content: ''; width: 4px; height: 18px; border-radius: 2px;
  background: var(--primary); display: block;
}

/* ── Balance Cards ── */
.bal-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 14px; margin-bottom: 28px;
}
.bal-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: 16px;
  padding: 18px 20px; transition: transform .2s, box-shadow .2s;
  position: relative; overflow: hidden;
}
.bal-card:hover { transform: translateY(-3px); box-shadow: 0 8px 24px rgba(0,0,0,.09); }
.bal-card-accent { position: absolute; top: 0; left: 0; right: 0; height: 3px; border-radius: 16px 16px 0 0; }
.bal-type {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .6px; color: var(--text-muted); margin: 8px 0 10px;
}
.bal-main { display: flex; align-items: baseline; gap: 4px; margin-bottom: 2px; }
.bal-num { font-size: 32px; font-weight: 800; color: var(--text-main); line-height: 1; }
.bal-denom { font-size: 13px; font-weight: 600; color: var(--text-muted); }
.bal-track { height: 5px; background: var(--border); border-radius: 3px; overflow: hidden; margin: 12px 0 8px; }
.bal-fill { height: 100%; border-radius: 3px; transition: width .6s cubic-bezier(.4,0,.2,1); }
.bal-meta { font-size: 11px; color: var(--text-muted); display: flex; justify-content: space-between; }
.bal-carry {
  display: inline-flex; align-items: center; gap: 3px;
  font-size: 10.5px; font-weight: 700; color: #7C3AED;
  background: #F5F3FF; padding: 2px 7px; border-radius: 20px; margin-top: 6px;
}

/* ── Premium Card ── */
.pcard {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 18px; overflow: hidden; transition: box-shadow .2s;
}
.pcard:hover { box-shadow: 0 6px 20px rgba(0,0,0,.08); }
.pcard-head {
  padding: 18px 22px; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
}
.pcard-title {
  font-size: 14px; font-weight: 800; color: var(--text-main);
  display: flex; align-items: center; gap: 7px;
}
.pcard-body { padding: 20px 22px; }
.chart-wrap { position: relative; }

/* ── Org KPIs ── */
.org-kpi-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
  gap: 12px; margin-bottom: 24px;
}
.org-kpi {
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px;
  padding: 16px 18px; display: flex; align-items: center; gap: 12px;
  transition: transform .2s, box-shadow .2s;
}
.org-kpi:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(0,0,0,.08); }
.org-kpi-icon {
  width: 40px; height: 40px; border-radius: 10px; background: var(--surface-2);
  display: flex; align-items: center; justify-content: center; font-size: 18px; flex-shrink: 0;
}
.org-kpi-val  { font-size: 22px; font-weight: 800; color: var(--text-main); line-height: 1; }
.org-kpi-lbl  { font-size: 11px; font-weight: 600; color: var(--text-muted); margin-top: 2px; }
.org-kpi.alert-card { border-color: var(--danger); }
.org-kpi.alert-card .org-kpi-icon { background: #FEE2E2; }

/* ── Department bars ── */
.dept-row2 {
  display: flex; align-items: center; gap: 12px;
  padding: 9px 0; border-bottom: 1px solid var(--border);
}
.dept-row2:last-child { border-bottom: none; }
.dept-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--primary); flex-shrink: 0; }
.dept-name2 { flex: 1; font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dept-bar2 { flex: 2; height: 6px; background: var(--border); border-radius: 3px; overflow: hidden; }
.dept-fill2 {
  height: 100%; border-radius: 3px;
  background: linear-gradient(to right, var(--primary), var(--red-bright));
  transition: width .6s cubic-bezier(.4,0,.2,1);
}
.dept-cnt2 { font-size: 13px; font-weight: 700; color: var(--primary); width: 28px; text-align: right; }

/* ── On Leave Today ── */
.on-leave-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 0; border-bottom: 1px solid var(--border);
}
.on-leave-item:last-child { border-bottom: none; }
.on-leave-av {
  width: 34px; height: 34px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700; color: white; flex-shrink: 0;
}
.on-leave-name { font-size: 13px; font-weight: 700; }
.on-leave-dept { font-size: 11px; color: var(--text-muted); }

/* ── Overdue item ── */
.overdue-item {
  display: flex; align-items: center; gap: 12px;
  padding: 9px 0; border-bottom: 1px solid var(--border);
}
.overdue-item:last-child { border-bottom: none; }
.overdue-badge {
  font-size: 11px; font-weight: 800; padding: 3px 9px;
  border-radius: 20px; white-space: nowrap; flex-shrink: 0;
}

/* ── Requests table ── */
.req-table { width: 100%; border-collapse: collapse; }
.req-table th {
  padding: 11px 16px; text-align: left;
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .5px; color: var(--text-muted); border-bottom: 2px solid var(--border);
}
.req-table td { padding: 13px 16px; border-bottom: 1px solid var(--border); font-size: 13.5px; }
.req-table tbody tr { transition: background .15s; }
.req-table tbody tr:hover { background: var(--surface-2); }
.req-table tbody tr:last-child td { border-bottom: none; }
.req-ref { font-weight: 700; color: var(--primary); font-size: 12.5px; }
.req-ref:hover { text-decoration: underline; }

/* ── Quick Actions ── */
.qa-grid { display: flex; flex-direction: column; gap: 10px; }
.qa-btn {
  display: flex; align-items: center; gap: 12px;
  padding: 13px 16px; border-radius: 12px;
  border: 1.5px solid var(--border);
  background: var(--surface); color: var(--text-main);
  text-decoration: none; font-size: 13.5px; font-weight: 600;
  transition: all .2s; cursor: pointer; font-family: inherit;
}
.qa-btn:hover { border-color: var(--primary); background: #FEF2F2; color: var(--primary); transform: translateX(3px); }
.qa-btn.qa-primary { background: var(--primary); color: white; border-color: var(--primary); }
.qa-btn.qa-primary:hover { background: var(--primary-light); color: white; transform: translateX(3px); }
.qa-btn-icon {
  width: 32px; height: 32px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; flex-shrink: 0; background: rgba(255,255,255,.2);
}
.qa-btn:not(.qa-primary) .qa-btn-icon { background: var(--surface-2); }

/* ── Quick Reports ── */
.qr-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px,1fr)); gap: 10px; }
.qr-item {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 14px 10px; border-radius: 14px;
  border: 1.5px solid var(--border); background: var(--surface);
  text-decoration: none; color: var(--text-main);
  font-size: 12.5px; font-weight: 700; text-align: center; transition: all .2s;
}
.qr-item:hover { border-color: var(--primary); background: #EEF4FB; color: var(--primary); transform: translateY(-2px); box-shadow: 0 4px 12px rgba(11,31,58,.12); }
.qr-icon { font-size: 22px; }
.qr-item.qr-all { background: var(--primary); color: white; border-color: var(--primary); }
.qr-item.qr-all:hover { background: var(--primary-light); color: white; }

/* ── Policy card ── */
.policy-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 0; border-bottom: 1px solid var(--border); font-size: 13px;
}
.policy-row:last-child { border-bottom: none; }
.policy-label { color: var(--text-secondary); font-weight: 500; }
.policy-val { font-weight: 700; color: var(--text-main); }

/* ── Animations ── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}
.fade-up { animation: fadeUp .45s ease forwards; }
.delay-1 { animation-delay: .07s; opacity: 0; }
.delay-2 { animation-delay: .14s; opacity: 0; }
.delay-3 { animation-delay: .21s; opacity: 0; }
.delay-4 { animation-delay: .28s; opacity: 0; }

/* ── Chart toggle ── */
.chart-toggle {
  display: flex; align-items: center;
  background: var(--surface-2); border-radius: 8px; padding: 2px; border: 1px solid var(--border);
}
.ct-btn {
  padding: 4px 12px; border-radius: 6px; font-size: 12px; font-weight: 700;
  border: none; background: transparent; color: var(--text-muted);
  cursor: pointer; transition: all .18s; font-family: inherit;
}
.ct-btn.ct-active { background: white; color: var(--primary); box-shadow: 0 1px 4px rgba(0,0,0,.1); }
.ct-btn:hover:not(.ct-active) { color: var(--text-main); }

/* ── Trend pills ── */
.trend-pill {
  display: flex; flex-direction: column; align-items: center;
  padding: 7px 14px; border-radius: 10px; border: 1px solid transparent; flex: 1; min-width: 60px;
}
.tp-val { font-size: 18px; font-weight: 800; line-height: 1; }
.tp-lbl { font-size: 10px; color: var(--text-muted); font-weight: 600; margin-top: 3px; white-space: nowrap; }

/* ── Leave type legend rows ── */
.lt-legend-row {
  display: flex; align-items: center; gap: 8px;
  padding: 5px 8px; border-radius: 7px; cursor: pointer; transition: background .15s;
}
.lt-legend-row:hover { background: var(--surface-2); }

/* ── Who's Away Banner ── */
.whos-away-banner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; flex-wrap: wrap;
  background: linear-gradient(135deg, var(--surface) 0%, #FEF2F2 100%);
  border: 1.5px solid #FCA5A5; border-radius: 16px; padding: 18px 22px;
  text-decoration: none; color: inherit; margin-bottom: 24px;
  transition: transform .2s, box-shadow .2s, border-color .2s;
  position: relative; overflow: hidden;
}
.whos-away-banner::before {
  content: ''; position: absolute; right: -20px; top: -20px;
  width: 120px; height: 120px; border-radius: 50%;
  background: rgba(11,31,58,.04); pointer-events: none;
}
.whos-away-banner:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(11,31,58,.12); border-color: var(--primary); color: inherit; }
.wab-left { display: flex; align-items: center; gap: 14px; flex: 1; }
.wab-icon {
  width: 48px; height: 48px; border-radius: 14px;
  background: linear-gradient(135deg, var(--primary), var(--red-bright));
  display: flex; align-items: center; justify-content: center; font-size: 22px; flex-shrink: 0;
}
.wab-title { font-size: 15px; font-weight: 800; color: var(--text-main); }
.wab-sub   { font-size: 12.5px; color: var(--text-muted); margin-top: 2px; }
.wab-right { display: flex; align-items: center; gap: 20px; flex-shrink: 0; }
.wab-stat  { text-align: center; }
.wab-num   { display: block; font-size: 26px; font-weight: 800; color: var(--primary); line-height: 1; }
.wab-lbl   { display: block; font-size: 10.5px; color: var(--text-muted); font-weight: 600; margin-top: 2px; white-space: nowrap; }
.wab-arrow { font-size: 20px; color: var(--primary); font-weight: 800; transition: transform .2s; }
.whos-away-banner:hover .wab-arrow { transform: translateX(4px); }

/* ── Dashboard responsive ── */
@media (max-width: 1100px) {
  .kpi-strip { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 860px) {
  .hero { padding: 22px 20px; }
  .hero-name { font-size: 22px; }
  .hero-right { display: none; }
  .hero-actions { margin-top: 14px; }
  .kpi-strip { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .bal-grid { grid-template-columns: repeat(2, 1fr); }
  .two-col, .three-col { grid-template-columns: 1fr !important; }
}
@media (max-width: 560px) {
  .kpi-strip { grid-template-columns: 1fr 1fr; gap: 8px; }
  .kpi-number { font-size: 26px; }
  .hero-name { font-size: 18px; }
  .bal-grid { grid-template-columns: 1fr 1fr; }
  .qr-grid { grid-template-columns: repeat(3, 1fr); }
  .org-kpi-grid { grid-template-columns: 1fr 1fr; }
  .wab-right { display: none; }
}

/* ═══════════════════════════════════════════════════════════
   PHASE 2 — Interactive UX additions
   ═══════════════════════════════════════════════════════════ */

/* ── Live Request Preview Panel ──────────────────────────── */
.req-preview-panel {
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  background: var(--surface-2);
  transition: border-color .2s, background .2s;
  font-size: 13px;
}
.req-preview-panel.preview-ok  { border-color: var(--success); background: #F0FDF4; }
.req-preview-panel.preview-err { border-color: var(--danger);  background: #FEF2F2; }
.req-preview-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}
.req-preview-label { color: var(--text-muted); }
.req-preview-value { font-weight: 700; }
.req-preview-warnings {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(0,0,0,.07);
}
.req-preview-warning {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  color: var(--danger);
  margin-top: 5px;
  font-size: 12.5px;
  line-height: 1.4;
}
.btn[disabled], button[disabled] {
  opacity: .45;
  cursor: not-allowed;
  pointer-events: none;
}
.btn-icon { width: 15px; height: 15px; margin-right: 4px; vertical-align: -2px; }

/* ── Bulk Action Bar ──────────────────────────────────────── */
.bulk-action-bar {
  position: sticky;
  top: 8px;
  z-index: 200;
  display: none;
  align-items: center;
  gap: 10px;
  background: var(--primary);
  color: white;
  border-radius: var(--radius);
  padding: 10px 16px;
  margin-bottom: 16px;
  box-shadow: 0 4px 14px rgba(11,31,58,.32);
  animation: slideDown .18s ease;
}
.bulk-action-bar.visible { display: flex; }
@keyframes slideDown {
  from { opacity: 0; transform: translateY(-10px); }
  to   { opacity: 1; transform: translateY(0); }
}
.bulk-count { font-weight: 700; font-size: 14px; white-space: nowrap; }
.bulk-spacer { flex: 1; }
.bulk-btn {
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  border: 1.5px solid rgba(255,255,255,.6);
  cursor: pointer;
  background: transparent;
  color: white;
  transition: background .15s;
  white-space: nowrap;
}
.bulk-btn:hover      { background: rgba(255,255,255,.18); }
.bulk-btn-reject     { background: rgba(220,38,38,.55); border-color: transparent; }
.bulk-btn-reject:hover { background: rgba(220,38,38,.8); }
.bulk-deselect {
  background: transparent;
  border: none;
  color: rgba(255,255,255,.7);
  cursor: pointer;
  font-size: 12px;
  padding: 0 4px;
  transition: color .15s;
}
.bulk-deselect:hover { color: white; }

/* ── Approval card custom checkbox ───────────────────────── */
.approval-card-checkbox {
  appearance: none;
  -webkit-appearance: none;
  width: 17px;
  height: 17px;
  border: 2px solid var(--border);
  border-radius: 4px;
  cursor: pointer;
  flex-shrink: 0;
  position: relative;
  transition: border-color .15s, background .15s;
  vertical-align: middle;
}
.approval-card-checkbox:checked {
  background: var(--primary);
  border-color: var(--primary);
}
.approval-card-checkbox:checked::after {
  content: '';
  display: block;
  width: 4px;
  height: 8px;
  border: 2px solid white;
  border-top: none;
  border-left: none;
  transform: rotate(45deg);
  position: absolute;
  top: 1px;
  left: 4px;
}
.approval-card-checkbox:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* ── Filter search spinner ───────────────────────────────── */
.filter-search-wrap { position: relative; display: flex; align-items: center; }
.filter-search-wrap .filter-search { padding-right: 30px; width: 100%; }
.filter-search-loading {
  position: absolute;
  right: 10px;
  width: 14px;
  height: 14px;
  border: 2px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin .6s linear infinite;
  display: none;
  pointer-events: none;
}
.filter-search-loading.show { display: block; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ═══════════════════════════════════════════════════════════
   PHASE 3 — Calendar & Team Coverage
   ═══════════════════════════════════════════════════════════ */

/* ── Calendar Header ─────────────────────────────────────── */
.cal-header    { margin-bottom: 16px; }
.cal-nav       { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.cal-nav-btn   {
  width: 34px; height: 34px; border: 1.5px solid var(--border); border-radius: 8px;
  background: var(--surface); cursor: pointer; display: flex; align-items: center;
  justify-content: center; color: var(--text-main); transition: all .15s; flex-shrink: 0;
}
.cal-nav-btn:hover   { border-color: var(--primary); color: var(--primary); background: #FEF2F2; }
.cal-title     { font-family: 'Playfair Display', serif; font-size: 22px; font-weight: 700; color: var(--text-main); flex: 1; }
.cal-controls  { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

/* ── View tabs ───────────────────────────────────────────── */
.cal-view-tabs { display: flex; background: var(--surface-2); border-radius: 10px; padding: 3px; gap: 2px; }
.cal-tab       {
  padding: 7px 16px; border-radius: 8px; font-size: 13px; font-weight: 600;
  color: var(--text-muted); background: transparent; border: none; cursor: pointer;
  transition: all .15s; text-decoration: none;
}
.cal-tab.active { background: white; color: var(--primary); box-shadow: 0 1px 4px rgba(0,0,0,.1); }
.cal-tab:hover:not(.active) { color: var(--text-main); }

/* ── Stats pills ─────────────────────────────────────────── */
.cal-stats-row  { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.cal-stat-pill  {
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 20px;
  padding: 4px 12px; font-size: 12px; color: var(--text-secondary);
}
.cal-stat-holiday { background: #FFF8E7; border-color: #FCC10C; color: #92400E; }

/* ── Calendar grid wrapper ───────────────────────────────── */
.cal-wrap  { background: white; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; margin-bottom: 12px; position: relative; }
.cal-grid  { display: grid; grid-template-columns: repeat(7, 1fr); }

/* ── Day-of-week header row ──────────────────────────────── */
.cal-dow-header {
  padding: 10px 8px; font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .5px; color: var(--text-muted); text-align: center;
  background: var(--surface-2); border-bottom: 1px solid var(--border);
}

/* ── Day cells ───────────────────────────────────────────── */
.cal-cell {
  min-height: 96px; padding: 6px 8px;
  border-right: 1px solid var(--border); border-bottom: 1px solid var(--border);
  overflow: hidden; transition: background .12s; position: relative; vertical-align: top;
}
.cal-cell:nth-child(7n)  { border-right: none; }
.cal-cell-empty          { background: var(--surface-2); min-height: 96px; }
.cal-cell-weekend        { background: #F9FAFB; }
.cal-cell-holiday        { background: #FFFBEB; }
.cal-cell-today          { background: #FFF4F2; }
.cal-cell-has-leave      { cursor: pointer; }
.cal-cell-has-leave:hover { background: #F5F5F5; }
.cal-cell-today.cal-cell-has-leave:hover { background: #FEE9E5; }

/* ── Day number ──────────────────────────────────────────── */
.cal-day-num {
  font-size: 12px; font-weight: 600; color: var(--text-muted);
  display: block; text-align: right; margin-bottom: 4px;
}
.cal-day-today {
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--primary); color: white;
  font-weight: 800; font-size: 11px; float: right; margin-bottom: 2px;
}

/* ── Holiday label ───────────────────────────────────────── */
.cal-hol-label {
  font-size: 10px; color: #92400E; font-weight: 600;
  margin-bottom: 4px; line-height: 1.3; clear: both;
}

/* ── Leave pills in cells ────────────────────────────────── */
.cal-pill {
  display: flex; align-items: center; gap: 4px;
  padding: 2px 6px; border-radius: 4px; margin-bottom: 2px;
  font-size: 10.5px; overflow: hidden; max-width: 100%;
}
.cal-pill-dot  { width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; }
.cal-pill-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 600; color: var(--text-main); }
.cal-pill-pending { opacity: .6; }
.cal-more      { font-size: 10px; font-weight: 700; color: var(--text-muted); padding: 1px 4px; margin-top: 1px; }

/* ── Loading overlay on grid ─────────────────────────────── */
.cal-loading {
  display: none; position: absolute; inset: 0; background: rgba(255,255,255,.6);
  align-items: center; justify-content: center; z-index: 10; border-radius: var(--radius);
}
.cal-loading.show { display: flex; }
.cal-loading-spinner {
  width: 28px; height: 28px; border: 3px solid var(--border);
  border-top-color: var(--primary); border-radius: 50%;
  animation: spin .6s linear infinite;
}

/* ── Legend ──────────────────────────────────────────────── */
.cal-legend       { display: flex; gap: 16px; flex-wrap: wrap; font-size: 12px; color: var(--text-muted); margin-bottom: 24px; }
.cal-legend-item  { display: flex; align-items: center; gap: 6px; }
.cal-legend-dot   { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }
.cal-legend-swatch { width: 18px; height: 12px; border-radius: 3px; flex-shrink: 0; border: 1px solid var(--border); }
.cal-legend-today { background: #FFF4F2; border-color: var(--primary); }
.cal-legend-hol   { background: #FFFBEB; border-color: #FCC10C; }
.cal-legend-wknd  { background: #F9FAFB; }

/* ── Day detail side panel ───────────────────────────────── */
.cal-panel-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,.32); z-index: 300; backdrop-filter: blur(2px);
}
.cal-panel-overlay.show { display: block; }
.cal-panel {
  position: fixed; top: 0; right: -400px; width: 360px; max-width: 95vw;
  height: 100vh; background: white;
  box-shadow: -6px 0 28px rgba(0,0,0,.14);
  z-index: 301; transition: right .24s cubic-bezier(.4,0,.2,1);
  display: flex; flex-direction: column; overflow: hidden;
}
.cal-panel.open { right: 0; }
.cal-panel-head {
  padding: 20px; border-bottom: 1px solid var(--border);
  display: flex; justify-content: space-between; align-items: flex-start; gap: 12px;
  background: var(--surface-2);
}
.cal-panel-date  { font-weight: 800; font-size: 15px; color: var(--text-main); }
.cal-panel-sub   { font-size: 12px; color: var(--text-muted); margin-top: 3px; }
.cal-panel-close {
  width: 30px; height: 30px; border: none; background: var(--border);
  border-radius: 50%; cursor: pointer; display: flex; align-items: center;
  justify-content: center; flex-shrink: 0; color: var(--text-secondary); transition: background .15s;
}
.cal-panel-close:hover { background: var(--primary); color: white; }
.cal-panel-body  { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.cal-panel-holiday {
  background: #FFFBEB; border: 1px solid #FCC10C; border-radius: 8px;
  padding: 10px 12px; font-size: 12.5px; font-weight: 600; color: #92400E;
  display: flex; align-items: center; gap: 8px;
}
.cal-panel-empty { text-align: center; padding: 40px 20px; color: var(--text-muted); font-size: 13px; }
.cal-panel-item  {
  display: flex; align-items: center; gap: 12px; padding: 12px;
  border-radius: 10px; border: 1px solid var(--border); transition: background .12s;
}
.cal-panel-me    { background: #FEF2F2; border-color: var(--primary); }
.cal-panel-avatar {
  width: 38px; height: 38px; border-radius: 50%; display: flex; align-items: center;
  justify-content: center; color: white; font-weight: 800; font-size: 14px; flex-shrink: 0;
}
.cal-panel-info  { flex: 1; min-width: 0; }
.cal-panel-name  { font-weight: 700; font-size: 13.5px; color: var(--text-main); }
.cal-panel-meta  { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.cal-panel-type  { font-weight: 600; }
.cal-you-badge   {
  font-size: 10px; background: var(--primary); color: white;
  padding: 1px 7px; border-radius: 10px; font-weight: 700; vertical-align: middle;
}

/* ── Team Coverage table ─────────────────────────────────── */
.tcov-table               { width: 100%; border-collapse: collapse; font-size: 13px; }
.tcov-table th,
.tcov-table td            { text-align: center; padding: 8px 10px; border: 1px solid var(--border); }
.tcov-table thead th      { background: var(--surface-2); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: var(--text-muted); }
.tcov-table th:first-child,
.tcov-table td:first-child { text-align: left; min-width: 100px; white-space: nowrap; }
.tcov-today-hd            { background: #FFF4F2 !important; color: var(--primary) !important; }
.tcov-today-cell          { background: rgba(11,31,58,.04); }
.tcov-name                { font-size: 13px; font-weight: 600; padding: 8px 10px; }
.tcov-cell                { width: 60px; height: 36px; }
.tcov-out-dot             { width: 11px; height: 11px; border-radius: 50%; display: block; margin: 0 auto; }
.tcov-in-dot              { width: 11px; height: 11px; border-radius: 50%; background: #D1FAE5; border: 1px solid #86EFAC; display: block; margin: 0 auto; }
.card-title-icon          { width: 15px; height: 15px; vertical-align: -3px; margin-right: 4px; }
.ra-action-icon           { width: 22px; height: 22px; flex-shrink: 0; }
.ra-action-icon svg       { width: 22px; height: 22px; }
.ra-approved svg          { color: var(--success); }
.ra-rejected svg          { color: var(--danger); }

/* ── Who's On Leave page styles (moved from inline) ──────── */
.ol-hero { background: linear-gradient(135deg,#1A1614 0%,#2D2420 60%,#3D2E28 100%); border-radius: 18px; padding: 28px 32px; margin-bottom: 24px; color: #fff; display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; position: relative; overflow: hidden; }
.ol-hero::before { content: ''; position: absolute; right: -40px; top: -40px; width: 200px; height: 200px; border-radius: 50%; background: rgba(214,176,76,.16); }
.ol-hero::after  { content: ''; position: absolute; right: 80px; bottom: -60px; width: 140px; height: 140px; border-radius: 50%; background: rgba(252,193,12,.08); }
.ol-hero-left, .ol-hero-right { position: relative; z-index: 1; }
.ol-hero-title   { font-family: 'Playfair Display', serif; font-size: 24px; font-weight: 700; margin-bottom: 6px; }
.ol-hero-sub     { font-size: 13px; opacity: .65; }
.ol-hero-right   { display: flex; gap: 12px; flex-wrap: wrap; }
.ol-stat-pill    { background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.18); border-radius: 14px; padding: 14px 20px; text-align: center; min-width: 90px; }
.ol-stat-val     { font-size: 28px; font-weight: 800; line-height: 1; }
.ol-stat-lbl     { font-size: 10.5px; opacity: .65; margin-top: 4px; font-weight: 600; }
.ol-filters      { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 16px 20px; margin-bottom: 22px; display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }
.ol-filter-group { display: flex; flex-direction: column; gap: 5px; flex: 1; min-width: 140px; }
.ol-filter-label { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: var(--text-muted); }
.ol-filter-select, .ol-filter-date { padding: 9px 12px; border: 1.5px solid var(--border); border-radius: 9px; font-size: 13px; font-family: inherit; color: var(--text-main); background: var(--surface); outline: none; transition: border-color .15s; width: 100%; }
.ol-filter-select:focus, .ol-filter-date:focus { border-color: var(--primary); }
.ol-filter-back  { font-size: 12px; font-weight: 700; color: var(--primary); text-decoration: none; white-space: nowrap; padding: 9px 14px; border: 1.5px solid var(--border); border-radius: 9px; background: var(--surface-2); transition: all .15s; }
.ol-filter-back:hover { border-color: var(--primary); background: #FEF2F2; }
.ol-summary      { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; margin-bottom: 22px; }
.ol-sum-card     { background: var(--surface); border: 1px solid var(--border); border-radius: 13px; padding: 14px 16px; display: flex; align-items: center; gap: 10px; transition: transform .18s, box-shadow .18s; }
.ol-sum-card:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(0,0,0,.08); }
.ol-sum-icon     { width: 38px; height: 38px; border-radius: 10px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.ol-sum-icon svg { width: 20px; height: 20px; }
.ol-sum-val      { font-size: 22px; font-weight: 800; color: var(--text-main); line-height: 1; }
.ol-sum-lbl      { font-size: 11px; font-weight: 600; color: var(--text-muted); margin-top: 2px; }
.ol-grid         { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; margin-bottom: 24px; }
.ol-card         { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; overflow: hidden; transition: transform .2s, box-shadow .2s; }
.ol-card:hover   { transform: translateY(-3px); box-shadow: 0 8px 24px rgba(0,0,0,.1); }
.ol-avatar       { width: 42px; height: 42px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 16px; font-weight: 800; color: #fff; flex-shrink: 0; }
.ol-name         { font-size: 14px; font-weight: 800; color: var(--text-main); margin-bottom: 1px; }
.ol-role         { font-size: 11.5px; color: var(--text-muted); }
.ol-type-pill    { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 20px; font-size: 11.5px; font-weight: 700; }
.ol-dates        { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--text-muted); margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--border); }
.ol-empty        { text-align: center; padding: 64px 20px; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; }
.ol-empty-icon   { width: 52px; height: 52px; margin: 0 auto 14px; opacity: .3; }
.ol-empty-icon svg { width: 52px; height: 52px; }
.alert-icon svg  { width: 16px; height: 16px; vertical-align: -3px; }
.upcoming-item   { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.upcoming-item:last-child { border-bottom: none; }
.ol-quick-link   { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; border: 1.5px solid var(--border); text-decoration: none; color: var(--text-main); font-size: 13px; font-weight: 600; transition: all .15s; }
.ol-quick-link:hover { border-color: var(--primary); background: #FEF2F2; color: var(--primary); }
.ol-quick-icon   { width: 16px; height: 16px; flex-shrink: 0; }
.ol-quick-icon svg { width: 16px; height: 16px; }
@keyframes livepulse { 0%, 100% { opacity: 1; } 50% { opacity: .3; } }

/* ── Responsive adjustments ──────────────────────────────── */
@media (max-width: 860px) { .ol-main-grid { grid-template-columns: 1fr !important; } }
@media (max-width: 768px) {
  .ol-hero { padding: 20px; }
  .ol-hero-right { display: none; }
  .cal-cell { min-height: 70px; padding: 4px; }
  .cal-title { font-size: 18px; }
  .cal-panel { width: 100%; max-width: 100vw; }
}
@media (max-width: 480px) {
  .ol-grid { grid-template-columns: 1fr; }
  .ol-filters { flex-direction: column; }
  .cal-pill-name { display: none; }
  .cal-view-tabs { width: 100%; }
  .cal-tab { flex: 1; text-align: center; padding: 7px 8px; }
}
