/* ══════════════════════════════════════════════
   SDO City of Koronadal — Leave Management System
   app.css — Global styles (RED ARMOUR THEME)

   Personnel List page styles are in: personnel-list.css
   Load order in HTML:
     <link rel="stylesheet" href="app.css">
     <link rel="stylesheet" href="personnel-list.css">
══════════════════════════════════════════════ */

/* ── CSS Variables ── */
:root {
  --g0: #1a0000;
  --g1: #4a0a0a;
  --g2: #8b1a1a;
  --g3: #b52020;
  --g4: #fdf0f0;
  --gd: #f5c8c8;
  --au: #b07d2c;
  --au2: #fdf5e6;
  --au3: #f0d28a;
  --nb: #1e3a6e;
  --am: #8c4a10;
  --rd: #7f1d1d;
  --pu: #4e1d95;
  --cha: #1e2530;
  --sl: #3d4d60;
  --mu: #6b7a8d;
  --br: #ced6de;
  --dv: #e8edf2;
  --bg: #f5eded;
  --cd: #fff8f8;
  --wh: #ffffff;
  --sh: 0 1px 3px rgba(0,0,0,.05), 0 4px 14px rgba(0,0,0,.07);
  --shlg: 0 10px 40px rgba(0,0,0,.18), 0 2px 8px rgba(0,0,0,.08);
  --H: 40px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 13px;
  color: var(--cha);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

/* ── Integrated date picker (generic .date-wrap used elsewhere) ── */
.date-wrap { position: relative; display: flex; align-items: center; }
.date-wrap .date-text { width: 100%; padding-right: 36px !important; box-sizing: border-box; }
.date-wrap .date-cal-btn {
  position: absolute; right: 0; top: 0; width: 36px; height: 100%;
  background: none; border: none; pointer-events: none; font-size: 15px;
  display: flex; align-items: center; justify-content: center;
  color: var(--mu); border-radius: 0 7px 7px 0;
}
.date-wrap .date-pick-hidden {
  position: absolute; right: 0; top: 0; width: 36px; height: 100%;
  opacity: 0; cursor: pointer; border: none; padding: 0; margin: 0;
  font-size: 0; background: transparent; -webkit-appearance: none; appearance: none; z-index: 2;
}
.date-wrap:has(.date-pick-hidden:hover) .date-cal-btn { color: var(--g2); }

/* ── Screen system ── */
.screen { display: none; }
#s-login.active {
  display: flex; min-height: 100vh; align-items: center; justify-content: center;
  background: url('https://depedkoronadalcity.wordpress.com/wp-content/uploads/2012/09/city-division-office1.jpg') center/cover no-repeat fixed;
  position: relative;
}
#s-login.active::before {
  content: ''; position: fixed; inset: 0;
  background: linear-gradient(140deg, rgba(26,0,0,.90), rgba(14,10,30,.86));
  backdrop-filter: blur(7px); z-index: 0;
}
#s-app.active { display: flex; flex-direction: column; min-height: 100vh; }

/* ── Login ── */
.lw { position: relative; z-index: 1; width: 900px; max-width: 96vw; }
.split {
  display: flex; border-radius: 18px; overflow: hidden;
  box-shadow: var(--shlg), 0 0 0 1px rgba(255,255,255,.07);
  animation: rise .5s cubic-bezier(.22,1,.36,1) both;
}
@keyframes rise { from { opacity: 0; transform: translateY(22px) scale(.975); } to { opacity: 1; transform: none; } }

.sl {
  flex: 1.3;
  background: linear-gradient(155deg, var(--g0) 0%, var(--g1) 50%, var(--g2) 100%);
  color: white; padding: 50px 44px;
  display: flex; flex-direction: column; justify-content: center;
  position: relative; overflow: hidden;
}
.sl::before, .sl::after { content: ''; position: absolute; border-radius: 50%; background: rgba(255,255,255,.04); }
.sl::before { width: 360px; height: 360px; top: -110px; right: -100px; }
.sl::after  { width: 220px; height: 220px; bottom: -70px; left: -60px; }

.l-logos { display: flex; align-items: center; gap: 14px; margin-bottom: 26px; position: relative; z-index: 1; }
.l-logos img { width: 66px; height: 66px; border-radius: 50%; object-fit: contain; background: white; padding: 5px; border: 2px solid rgba(255,255,255,.22); }
.l-tag {
  display: inline-block; font-size: 10px; font-weight: 600; letter-spacing: 1.8px; text-transform: uppercase;
  color: var(--au); background: rgba(176,125,44,.14); border: 1px solid rgba(176,125,44,.3);
  padding: 4px 14px; border-radius: 30px; margin-bottom: 20px; position: relative; z-index: 1; width: fit-content;
}
.sl h1 { font-family: 'Cormorant Garamond', Georgia, serif; font-size: 1.85rem; font-weight: 700; line-height: 1.2; margin-bottom: 13px; letter-spacing: -.3px; position: relative; z-index: 1; }
.sl p  { font-size: .84rem; font-weight: 300; line-height: 1.8; color: rgba(255,255,255,.66); max-width: 265px; position: relative; z-index: 1; }
.l-rule { width: 38px; height: 2px; background: var(--au); border-radius: 2px; margin: 22px 0 13px; position: relative; z-index: 1; }
.sl small { font-size: 10px; letter-spacing: 2px; text-transform: uppercase; color: rgba(255,255,255,.28); position: relative; z-index: 1; }

.sr {
  flex: 1;
  background: linear-gradient(168deg, rgba(26,0,0,.65), rgba(20,0,0,.85)), url('https://depedkoronadalcity.wordpress.com/wp-content/uploads/2012/09/city-division-office1.jpg') center/cover;
  display: flex; align-items: center; justify-content: center; padding: 52px 42px;
}
.lfw { width: 100%; max-width: 275px; }
.lfw h2 { font-family: 'Cormorant Garamond', serif; font-size: 1.65rem; font-weight: 700; color: white; margin-bottom: 4px; }
.lsub { font-size: .8rem; color: rgba(255,255,255,.42); margin-bottom: 28px; }
.lf { margin-bottom: 14px; }
.lf label { display: block; font-size: 9.5px; font-weight: 600; text-transform: uppercase; letter-spacing: 1px; color: rgba(255,255,255,.48); margin-bottom: 6px; }
.lfi { position: relative; }
.lfi input {
  width: 100%; height: var(--H); padding: 0 42px 0 15px;
  background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.2);
  border-radius: 8px; font-size: .9rem; color: white; font-family: 'Inter', sans-serif;
  transition: border-color .2s, background .2s, box-shadow .2s;
}
.lfi input::placeholder { color: rgba(255,255,255,.28); }
.lfi input:focus { outline: none; border-color: var(--au); background: rgba(255,255,255,.13); box-shadow: 0 0 0 3px rgba(176,125,44,.22); }
.leye { position: absolute; right: 13px; top: 50%; transform: translateY(-50%); background: none; border: none; cursor: pointer; font-size: 15px; opacity: .4; color: white; padding: 0; line-height: 1; transition: opacity .2s; }
.leye:hover { opacity: .85; }
.lbtn { width: 100%; height: var(--H); margin-top: 12px; background: var(--g2); color: white; border: none; border-radius: 8px; font-size: .9rem; font-weight: 700; font-family: 'Inter', sans-serif; cursor: pointer; box-shadow: 0 4px 18px rgba(139,26,26,.45); transition: all .2s; }
.lbtn:hover { background: var(--g3); transform: translateY(-1px); box-shadow: 0 8px 24px rgba(139,26,26,.55); }
.lerr { color: #fca5a5; font-size: 11px; margin-top: 10px; display: none; text-align: center; }

/* ── Topbar ── */
.topbar {
  background: #fff; position: sticky; top: 0; z-index: 300;
  box-shadow: 0 1px 0 var(--dv), 0 2px 20px rgba(0,0,0,.06);
  border-bottom: 3px solid var(--g2); flex-shrink: 0;
}
.tb-in { display: flex; align-items: center; justify-content: space-between; padding: 0 24px; max-width: 1800px; margin: auto; height: 60px; gap: 12px; }
.tb-brand { display: flex; align-items: center; gap: 12px; }
.tb-logo { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; border: 2px solid var(--gd); box-shadow: 0 1px 4px rgba(0,0,0,.1); background: var(--g4); flex-shrink: 0; }
.tb-divider { width: 1px; height: 28px; background: var(--dv); margin: 0 2px; }
.tb-title { font-size: 14px; font-weight: 700; color: var(--g0); letter-spacing: -.2px; line-height: 1.2; }
.tb-sub { font-size: 10px; color: var(--g3); font-weight: 500; letter-spacing: .3px; margin-top: 1px; }
.tb-nav { display: flex; gap: 8px; align-items: center; }

.nb {
  height: 36px; padding: 0 14px; border-radius: 7px; border: 1.5px solid var(--br);
  background: #fff; color: var(--sl); font-size: 12px; font-weight: 600;
  cursor: pointer; font-family: 'Inter', sans-serif; transition: all .16s;
  display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
}
.nb:hover { background: var(--g4); border-color: var(--gd); color: var(--g1); }
.nb.out { border-color: #e8c8c8; color: var(--rd); }
.nb.out:hover { background: #fff0f0; border-color: var(--rd); }

/* ── Main layout ── */
.ca { flex: 1; padding: 22px 26px; max-width: 1800px; margin: auto; width: 100%; }
.page { display: none; }
.page.on { display: block; animation: pgIn .2s ease both; }
@keyframes pgIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ── Cards ── */
.card {
  background: #fff; border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0,0,0,.05), 0 4px 16px rgba(0,0,0,.06);
  margin-bottom: 20px; overflow: hidden; border: 1px solid #e8dede;
}
.card.card--leave-table { overflow: visible; }
.tw.tw--leave-table { overflow-x: auto; overflow-y: visible; max-height: none; }

.ch { padding: 13px 22px; color: #fff; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; display: flex; align-items: center; gap: 8px; }
.ch.grn   { background: linear-gradient(100deg, var(--g0) 0%, var(--g2) 100%); }
.ch.amber { background: linear-gradient(100deg, #3d1800 0%, var(--am) 100%); }
.ch.navy  { background: linear-gradient(100deg, #0c1f48 0%, var(--nb) 100%); }
.ch.center { justify-content: center; }
.cb { padding: 20px 22px; }

/* ── Stats row ── */
.stats-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px,1fr)); gap: 14px; margin-bottom: 20px; }
.stat-box {
  background: #fff; border-radius: 12px; border: 1px solid #e8dede;
  box-shadow: 0 1px 3px rgba(0,0,0,.05), 0 4px 12px rgba(0,0,0,.05);
  padding: 16px 18px; display: flex; align-items: center; gap: 13px;
  transition: transform .18s, box-shadow .18s;
}
.stat-box:hover { transform: translateY(-2px); box-shadow: 0 6px 24px rgba(139,26,26,.1); }
.stat-icon { width: 42px; height: 42px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 20px; flex-shrink: 0; }
.si-g { background: #fce8e8; } .si-b { background: #ddeeff; } .si-a { background: var(--au2); }
.stat-val { font-size: 24px; font-weight: 800; color: var(--g0); line-height: 1; }
.stat-lbl { font-size: 10px; color: var(--mu); text-transform: uppercase; letter-spacing: .6px; margin-top: 3px; }

/* ── Toolbar ── */
.toolbar {
  display: flex; align-items: center; gap: 10px; flex-wrap: nowrap;
  padding: 14px 20px; border-bottom: 1px solid var(--dv); overflow-x: auto; background: #fafafa;
}
.toolbar-left { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.toolbar-filters { display: flex; align-items: center; gap: 8px; flex-shrink: 0; margin-left: auto; }

/* ── Generic search ── */
.srch { position: relative; flex-shrink: 0; }
.srch input {
  height: 36px; padding: 0 14px 0 34px; border: 1.5px solid var(--br); border-radius: 7px;
  font-size: 12px; width: 200px; background: #fff; font-family: 'Inter', sans-serif;
  transition: border-color .18s, box-shadow .18s, width .22s;
}
.srch input:focus { outline: none; border-color: var(--g3); box-shadow: 0 0 0 3px rgba(139,26,26,.1); width: 240px; }
.sri { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--mu); font-size: 13px; pointer-events: none; }

/* ── Sidebar overlay ── */
.sb-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.55); z-index: 400; opacity: 0; pointer-events: none; transition: opacity .25s; }
.sb-overlay.open { opacity: 1; pointer-events: all; }

.sidebar {
  position: fixed; top: 0; left: 0; bottom: 0; width: 260px;
  background: #1a0505; z-index: 500;
  transform: translateX(-100%); transition: transform .28s cubic-bezier(.22,1,.36,1);
  display: flex; flex-direction: column;
  box-shadow: 6px 0 32px rgba(0,0,0,.45); border-right: 1px solid rgba(255,255,255,.06);
}
.sidebar.open { transform: translateX(0); }

.sb-head { padding: 20px 18px 16px; border-bottom: 1px solid rgba(255,255,255,.08); display: flex; align-items: center; gap: 11px; background: rgba(0,0,0,.25); }
.sb-logo { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; border: 2px solid rgba(255,255,255,.2); flex-shrink: 0; }
.sb-brand { flex: 1; min-width: 0; }
.sb-brand-title { font-size: 12px; font-weight: 700; color: #fff; line-height: 1.3; letter-spacing: .3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sb-brand-sub { font-size: 9px; color: rgba(255,255,255,.4); margin-top: 1px; letter-spacing: .3px; }
.sb-close { background: none; border: none; color: rgba(255,255,255,.35); font-size: 16px; cursor: pointer; padding: 5px; line-height: 1; transition: color .15s, background .15s; border-radius: 6px; flex-shrink: 0; }
.sb-close:hover { color: white; background: rgba(255,255,255,.1); }

.sb-user { padding: 14px 18px; border-bottom: 1px solid rgba(255,255,255,.06); display: flex; align-items: center; gap: 11px; cursor: pointer; transition: background .15s; background: rgba(139,26,26,.15); }
.sb-user:hover { background: rgba(139,26,26,.28); }
.sb-av { width: 36px; height: 36px; border-radius: 10px; background: linear-gradient(135deg, var(--g2), #b52020); color: white; font-weight: 800; font-size: 14px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; box-shadow: 0 2px 8px rgba(0,0,0,.3); }
.sb-uname { font-size: 12.5px; font-weight: 700; color: white; line-height: 1.3; }
.sb-urole { font-size: 9px; color: rgba(255,255,255,.4); margin-top: 2px; text-transform: uppercase; letter-spacing: .5px; }

.sb-nav { flex: 1; padding: 8px 0 16px; overflow-y: auto; }
.sb-nav::-webkit-scrollbar { width: 3px; }
.sb-nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,.1); border-radius: 3px; }

.sb-item { display: flex; align-items: center; gap: 12px; padding: 12px 20px; color: rgba(255,255,255,.6); font-size: 12.5px; font-weight: 500; cursor: pointer; transition: background .15s, color .15s, border-color .15s; border-left: 3px solid transparent; user-select: none; margin: 1px 0; }
.sb-item:hover { background: rgba(255,255,255,.07); color: rgba(255,255,255,.9); }
.sb-item.active { background: rgba(139,26,26,.35); color: white; border-left-color: #e89090; font-weight: 600; }
.sb-item .sb-icon { font-size: 15px; width: 20px; text-align: center; flex-shrink: 0; opacity: .85; }
.sb-item.active .sb-icon { opacity: 1; }
.sb-item.danger { color: rgba(255,120,120,.75); }
.sb-item.danger:hover { background: rgba(180,30,30,.25); color: #fca5a5; }
.sb-divider { height: 1px; background: rgba(255,255,255,.07); margin: 6px 16px; }

.sb-toggle { width: 36px; height: 36px; border-radius: 8px; border: 1.5px solid var(--br); background: white; color: var(--sl); font-size: 17px; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; transition: all .18s; flex-shrink: 0; }
.sb-toggle:hover { background: var(--g4); border-color: var(--g3); color: var(--g1); }

/* ── Profile grid ── */
.pg { display: grid; grid-template-columns: repeat(4,1fr); gap: 14px; }
.pi label { font-size: 9px; font-weight: 600; color: var(--mu); text-transform: uppercase; letter-spacing: .6px; display: block; margin-bottom: 3px; }
.pi span { font-size: 12.5px; font-weight: 500; color: var(--cha); display: block; padding-bottom: 6px; border-bottom: 1px solid var(--dv); }

/* ── Form fields ── */
.ig { display: grid; grid-template-columns: repeat(auto-fill, minmax(175px,1fr)); gap: 14px; }
.f label { font-size: 9px; font-weight: 600; color: var(--mu); text-transform: uppercase; letter-spacing: .6px; display: block; margin-bottom: 5px; }
.f input, .f select, .f input[type=text], .f input[type=date], .f input[type=number], .f input[type=password] {
  height: var(--H); padding: 0 12px; border: 1.5px solid var(--br); border-radius: 7px;
  font-size: 12px; width: 100%; background: white; color: var(--cha); font-family: 'Inter', sans-serif;
  transition: border-color .18s, box-shadow .18s, background .18s; appearance: none;
}
.f input:focus, .f select:focus { outline: none; border-color: var(--g3); box-shadow: 0 0 0 3px rgba(139,26,26,.12); background: white; }
.ew { position: relative; }
.ew input { padding-right: 36px !important; }
.eye-btn { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); background: none; border: none; cursor: pointer; font-size: 14px; opacity: .35; color: var(--cha); padding: 0; line-height: 1; transition: opacity .18s; }
.eye-btn:hover { opacity: .75; }
.hl input { border-color: #7c3aed !important; background: #f8f5ff !important; }
.hl label { color: #4c1d95 !important; }
.sdiv { font-size: 9px; font-weight: 700; color: var(--mu); text-transform: uppercase; letter-spacing: 1px; margin: 18px 0 10px; padding-bottom: 6px; border-bottom: 1px solid var(--dv); }

/* ── Buttons & badges ── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 0 18px; border-radius: 7px; border: none; cursor: pointer; font-weight: 600; font-size: 12px; font-family: 'Inter', sans-serif; letter-spacing: .2px; text-transform: uppercase; transition: all .18s; height: var(--H); white-space: nowrap; }
.b-pri { background: var(--g2); color: white; } .b-pri:hover { background: var(--g3); transform: translateY(-1px); }
.b-grn { background: #8b1a1a; color: white; } .b-grn:hover { background: #b52020; }
.b-amb { background: var(--am); color: white; } .b-amb:hover { background: #6a340a; }
.b-slt { background: var(--sl); color: white; } .b-slt:hover { background: #2e3c4e; }
.b-red { background: var(--rd); color: white; } .b-red:hover { background: #5e1414; }
.b-prn { background: #8b1a1a; color: white; } .b-prn:hover { background: #b52020; }
.b-pdf { background: var(--pu); color: white; } .b-pdf:hover { background: #3b1483; }
.b-nvy { background: var(--nb); color: white; } .b-nvy:hover { background: #12276a; }
.b-sm { height: 30px !important; padding: 0 10px; font-size: 10.5px; border-radius: 5px; }
.badge { display: inline-block; padding: 3px 10px; border-radius: 20px; font-size: 9.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .4px; }
.bt  { background: #ddeeff; color: #1e3a6e; }
.bnt { background: var(--g4); color: var(--g1); }

/* ── Table (generic) ── */
.tw { overflow-x: auto; overflow-y: auto; max-height: 560px; }
table { width: 100%; border-collapse: collapse; font-size: 11.5px; table-layout: auto; }
thead th {
  background: var(--g0); color: white; font-size: 9px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .4px; border: 1px solid #5a2a2a; position: sticky; z-index: 2;
  vertical-align: middle; text-align: center; padding: 0 6px; line-height: 1.2; white-space: nowrap;
}
thead tr:first-child th { top: 0; height: 40px; }
thead tr:nth-child(2) th { top: 40px; height: 30px; }
.ths { background: #3a1a1a !important; color: #c8a8a8 !important; font-size: 8.5px !important; white-space: nowrap !important; width: 1px !important; }
.tha { background: var(--g2) !important; border-color: #701414 !important; }
.thb { background: var(--nb) !important; border-color: #243f7a !important; }
tbody td { border: 1px solid var(--br); padding: 7px 5px; text-align: center; white-space: nowrap; }
tbody td:nth-child(2), tbody td:last-child, tbody td:nth-last-child(2) { white-space: normal; word-break: break-word; text-align: left; padding-left: 7px; }
tbody tr:nth-child(even) { background: #fdf5f5; }
tbody tr:hover { background: #fce8e8; transition: background .12s; }
.bc { font-weight: 700; background: var(--au2) !important; color: #6b4a10; font-family: 'JetBrains Mono', monospace; font-size: 11.5px; white-space: nowrap; }
.remarks-cell { font-size: 14px; text-align: left; padding-left: 5px !important; white-space: normal; word-break: break-word; line-height: 1.5; }
.prd-date { font-size: 11.5px; color: var(--cha); font-weight: 700; display: block; margin-top: 1px; }
.period-cell { text-align: left; padding-left: 5px !important; line-height: 1.5; font-size: 11.5px; font-weight: 700; white-space: normal; word-break: break-word; color: var(--cha); }
.nc { font-family: 'JetBrains Mono', monospace; white-space: nowrap; }
.rdc { color: var(--rd); font-weight: 700; }
.puc { color: var(--pu); font-weight: 700; }
.archived-view th.no-print, .archived-view td.no-print { display: none !important; }

/* ── Row context menu ── */
.row-menu-wrap { position: relative; display: inline-block; }
.row-menu-btn { background: none; border: none; cursor: pointer; font-size: 18px; color: var(--mu); padding: 2px 6px; border-radius: 5px; line-height: 1; transition: background .15s, color .15s; }
.row-menu-btn:hover { background: var(--dv); color: var(--cha); }
.row-menu-dd { display: none; position: fixed; background: white; border: 1px solid var(--br); border-radius: 8px; box-shadow: 0 4px 20px rgba(0,0,0,.15); z-index: 9999; min-width: 160px; padding: 4px 0; top: auto; bottom: auto; }
.row-menu-dd.open { display: block; }
.row-menu-dd button { display: block; width: 100%; text-align: left; padding: 8px 14px; background: none; border: none; font-size: 12px; font-family: 'Inter', sans-serif; font-weight: 500; cursor: pointer; color: var(--cha); transition: background .12s; }
.row-menu-dd button:hover { background: var(--g4); }
.row-menu-dd button.danger { color: var(--rd); }
.row-menu-dd button.danger:hover { background: #fff5f5; }
.row-menu-dd .menu-div { height: 1px; background: var(--dv); margin: 4px 0; }

/* ── Conversion era UI ── */
.era-old-toggle:hover { background: var(--gd); }
.era-old-toggle .era-arrow { display: inline-block; transition: transform .25s; font-size: 13px; transform: rotate(-90deg); }
.era-old-toggle.open .era-arrow { transform: rotate(0deg); }
.era-fwd-row td { font-weight: 700 !important; color: var(--au) !important; font-style: italic; }

/* ── Modal ── */
.mo { display: none; position: fixed; inset: 0; background: rgba(26,0,0,.65); backdrop-filter: blur(5px); z-index: 500; align-items: flex-start; justify-content: center; padding: 28px 16px; overflow-y: auto; }
.mo.open { display: flex; }
.mb { background: var(--wh); border-radius: 12px; width: 100%; max-width: 1100px; box-shadow: var(--shlg); margin: auto; border: 1px solid var(--br); }
.mb.sm { max-width: 460px; } .mb.xsm { max-width: 360px; }
.mh { padding: 14px 22px; border-bottom: 1px solid var(--dv); display: flex; justify-content: space-between; align-items: center; background: linear-gradient(90deg, var(--g0), var(--g1)); border-radius: 12px 12px 0 0; }
.mh h3 { font-size: 12px; font-weight: 700; color: white; text-transform: uppercase; letter-spacing: .7px; }
.md { padding: 24px; max-height: 76vh; overflow-y: auto; }
.mf { padding: 12px 22px; border-top: 1px solid var(--dv); display: flex; gap: 10px; justify-content: flex-end; }

/* ── Generic filter selects ── */
.tb-filter { height: 36px; padding: 0 10px; border: 1.5px solid var(--br); border-radius: 6px; font-size: 11.5px; font-family: 'Inter', sans-serif; background: white; color: var(--cha); outline: none; transition: border-color .15s, box-shadow .15s; }
.tb-filter:focus { border-color: var(--g3); box-shadow: 0 0 0 3px rgba(139,26,26,.12); }
.tb-filter-clear { height: 36px; padding: 0 14px; border-radius: 6px; border: 1.5px solid #e0c0c0; background: white; color: var(--rd); font-size: 11.5px; font-weight: 700; font-family: 'Inter', sans-serif; cursor: pointer; white-space: nowrap; transition: background .15s, color .15s; }
.tb-filter-clear:hover { background: var(--rd); color: white; border-color: var(--rd); }
.email-hint { font-size: 10px; color: #e53e3e; display: none; margin-top: 3px; }

/* ── Developers section ── */
.dev-section { padding: 36px 28px; background: linear-gradient(135deg, #fff0f6 0%, #ffe4f0 40%, #fce8f8 100%); border-radius: 16px; border: 1.5px solid #f9c8e0; margin-bottom: 20px; }
.dev-section-title { text-align: center; font-family: 'Cormorant Garamond', Georgia, serif; font-size: 1.5rem; font-weight: 700; color: #8b1a4a; margin-bottom: 6px; letter-spacing: -.2px; }
.dev-section-sub { text-align: center; font-size: 11px; color: #c06090; letter-spacing: 1.5px; text-transform: uppercase; margin-bottom: 32px; font-weight: 600; }
.dev-cards { display: flex; gap: 28px; justify-content: center; flex-wrap: wrap; }
.dev-card { background: white; border-radius: 18px; padding: 28px 24px 22px; width: 240px; text-align: center; box-shadow: 0 4px 24px rgba(220,100,160,.18), 0 1px 6px rgba(200,80,140,.1); border: 1.5px solid #f5b8d8; position: relative; overflow: hidden; transition: transform .2s, box-shadow .2s; }
.dev-card:hover { transform: translateY(-4px); box-shadow: 0 12px 36px rgba(220,100,160,.28), 0 2px 10px rgba(200,80,140,.14); }
.dev-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 80px; background: linear-gradient(135deg, #ffd6ec, #ffb3d9); z-index: 0; }
.dev-card.left::before  { background: linear-gradient(135deg, #ffd6e8, #ff9ec8); }
.dev-card.right::before { background: linear-gradient(135deg, #ffd6e8, #ff9ec8); }
.dev-avatar { position: relative; z-index: 1; width: 110px; height: 110px; border-radius: 50%; object-fit: cover; object-position: top center; border: 4px solid white; box-shadow: 0 4px 18px rgba(220,100,160,.32); display: block; margin: 0 auto 14px; background: #fde8f4; }
.dev-name  { font-weight: 700; font-size: 14px; color: #6b1040; margin-bottom: 3px; position: relative; z-index: 1; }
.dev-role  { font-size: 10px; font-weight: 600; letter-spacing: 1px; text-transform: uppercase; color: #c060a0; margin-bottom: 10px; position: relative; z-index: 1; }
.dev-bio   { font-size: 11px; color: #a05080; line-height: 1.6; position: relative; z-index: 1; }
.dev-badge { display: inline-block; margin-top: 12px; padding: 3px 12px; border-radius: 20px; font-size: 9px; font-weight: 700; letter-spacing: .5px; text-transform: uppercase; position: relative; z-index: 1; }
.dev-card.left  .dev-badge { background: #ffe0f0; color: #b03070; }
.dev-card.right .dev-badge { background: #ffe0f0; color: #b03070; }
.dev-hearts { position: absolute; bottom: 10px; right: 12px; font-size: 11px; opacity: .35; letter-spacing: 2px; }

/* ── PDF area ── */
#pdfArea { position: fixed; top: 0; left: -9999px; background: white; z-index: -1; font-family: Inter, sans-serif; }
#pdfArea .no-print { display: none !important; }
#pdfArea .tw { overflow: visible !important; max-height: none !important; width: 100% !important; }


/* ══════════════════════════════════════
   LEAVE ENTRY FORM — collapsible panel
══════════════════════════════════════ */

/* Header acts as the toggle button */
.lc-entry-toggle {
  cursor: pointer;
  user-select: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.lc-entry-toggle:hover {
  filter: brightness(1.12);
}

/* Chevron arrow indicator */
.lc-entry-chevron {
  font-size: 11px;
  opacity: 0.7;
  transition: transform 0.28s cubic-bezier(.22,1,.36,1);
  transform: rotate(-90deg); /* collapsed → pointing right */
  margin-left: 8px;
  flex-shrink: 0;
}
.lc-entry-toggle--open .lc-entry-chevron {
  transform: rotate(0deg); /* open → pointing down */
}

/* Smooth height animation via CSS grid trick */
.lc-entry-collapse {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.3s cubic-bezier(.22,1,.36,1);
  overflow: hidden;
}
.lc-entry-collapse.lc-collapse-open {
  grid-template-rows: 1fr;
}

/* Inner body must have min-height:0 for the grid trick to work */
.lc-entry-collapse > .lc-entry-body {
  min-height: 0;
  overflow: hidden;
}


/* ══════════════════════════════════════
   PRINT / PDF — Legal (8.5 × 14 in)
   NOTE: print.css is the authoritative print
   stylesheet. This block only handles basic
   show/hide and page setup so the two files
   don't conflict. All table / profile detail
   overrides live in print.css.
══════════════════════════════════════ */
@media print {

  /* Force all elements to honour exact colours */
  *, *::before, *::after {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
    box-sizing: border-box !important;
  }

  /* Legal paper */
  @page {
    size: 8.5in 14in portrait;
    margin: 8mm 7mm 8mm 7mm;
  }

  html, body {
    margin: 0 !important; padding: 0 !important;
    background: white !important;
    font-size: 9px !important;
    width: 100% !important;
  }

  /* ── Hide chrome ── */
  .topbar, .no-print, button,
  .sidebar, .sb-overlay,
  .lc-topbar, .lc-entry-card, .lc-era-bar,
  .dev-section, .dash-hero, .dash-stats,
  .dash-why, .dash-devs, .dash-panel,
  .row-menu-btn, .row-menu-dd, .row-menu-wrap > button,
  [data-delera], [data-edit-rec],
  [data-del-rec], [data-insert-after],
  #s-login { display: none !important; }

  /* ── App container ── */
  #s-app { display: block !important; }
  .ca { padding: 0 !important; max-width: 100% !important; width: 100% !important; }

  /* ── Pages — show only the active one ── */
  .page           { display: none !important; }
  .page.on        { display: block !important; padding: 0 !important; }

  /* ── Table scroll containers must be flat for print ── */
  .tw {
    overflow: visible !important;
    max-height: none !important;
    width: 100% !important;
    display: block !important;
  }

  /* ── Prevent rows being cut mid-page ── */
  thead { display: table-header-group !important; }
  tfoot { display: table-footer-group !important; }
  tbody tr { page-break-inside: avoid !important; }

  
}
/* ══════════════════════════════════════════════
   RED ARMOUR LOGIN — JUMPSCARE ENHANCEMENT
   Append to end of app.css
══════════════════════════════════════════════ */

/* ── Jumpscare overlay (flashes red then vanishes) ── */
#js-flash {
  position: fixed; inset: 0; z-index: 9999;
  background: #8b1a1a;
  pointer-events: none;
  animation: jsFlash 1.2s cubic-bezier(.22,1,.36,1) forwards;
}
@keyframes jsFlash {
  0%   { opacity: 1; }
  18%  { opacity: 1; }
  40%  { opacity: 0.85; transform: scale(1.03); }
  100% { opacity: 0; transform: scale(1); }
}

/* ── Screen shake on the login wrapper ── */
.js-shake {
  animation: jsShake 0.55s cubic-bezier(.36,.07,.19,.97) both;
}
@keyframes jsShake {
  10%, 90%  { transform: translateX(-4px) rotate(-.3deg); }
  20%, 80%  { transform: translateX(8px)  rotate(.3deg); }
  30%, 50%, 70% { transform: translateX(-6px) rotate(-.2deg); }
  40%, 60%  { transform: translateX(6px)  rotate(.2deg); }
  100%      { transform: none; }
}

/* ── Slam-in animation for .split ── */
#s-login.active .split {
  animation: none; /* override the old 'rise' */
}
.js-slam {
  animation: jsSlamIn 0.65s cubic-bezier(.22,1,.36,1) both !important;
}
@keyframes jsSlamIn {
  0%   { opacity: 0; transform: translateY(-120px) scale(1.08); }
  55%  { opacity: 1; transform: translateY(10px) scale(.98); }
  75%  { transform: translateY(-4px) scale(1.01); }
  100% { opacity: 1; transform: none; }
}

/* ── Enhanced left panel with animated glow ring ── */
.sl::before {
  width: 500px !important; height: 500px !important;
  top: -160px !important; right: -130px !important;
  background: radial-gradient(circle, rgba(181,32,32,.18) 0%, transparent 70%) !important;
  animation: glowPulse 3.5s ease-in-out infinite !important;
}
@keyframes glowPulse {
  0%, 100% { opacity: .6; transform: scale(1); }
  50%       { opacity: 1;  transform: scale(1.12); }
}

/* ── Shield crest above the logo ── */
.js-crest {
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 18px; position: relative; z-index: 2;
}
.js-shield {
  width: 64px; height: 74px;
  clip-path: polygon(50% 0%, 100% 15%, 100% 60%, 50% 100%, 0% 60%, 0% 15%);
  background: linear-gradient(160deg, var(--au) 0%, #7a5020 60%, var(--au) 100%);
  display: flex; align-items: center; justify-content: center;
  font-size: 28px;
  box-shadow: 0 0 0 3px rgba(176,125,44,.3), 0 8px 32px rgba(139,26,26,.6);
  animation: shieldGlow 2.8s ease-in-out infinite;
  position: relative;
}
@keyframes shieldGlow {
  0%, 100% { box-shadow: 0 0 0 3px rgba(176,125,44,.3), 0 8px 32px rgba(139,26,26,.5); }
  50%       { box-shadow: 0 0 0 6px rgba(176,125,44,.55), 0 12px 44px rgba(181,32,32,.75); }
}

/* ── SDO logo ring glow ── */
.l-logos img {
  animation: logoPulse 3s ease-in-out infinite;
  box-shadow: 0 0 0 3px rgba(176,125,44,.4), 0 0 22px rgba(176,125,44,.3) !important;
}
@keyframes logoPulse {
  0%, 100% { box-shadow: 0 0 0 2px rgba(176,125,44,.3), 0 0 14px rgba(176,125,44,.2); }
  50%       { box-shadow: 0 0 0 5px rgba(176,125,44,.6), 0 0 30px rgba(176,125,44,.45); }
}

/* ── Ember particles floating up ── */
.js-embers {
  position: absolute; inset: 0; z-index: 0;
  pointer-events: none; overflow: hidden; border-radius: inherit;
}
.js-ember {
  position: absolute; bottom: -10px;
  width: 4px; height: 4px; border-radius: 50%;
  background: var(--au3);
  animation: floatUp var(--dur, 4s) var(--delay, 0s) ease-in infinite;
  opacity: 0;
}
@keyframes floatUp {
  0%   { opacity: 0; transform: translateY(0) translateX(0) scale(1); }
  15%  { opacity: .9; }
  80%  { opacity: .4; }
  100% { opacity: 0; transform: translateY(-380px) translateX(var(--drift, 30px)) scale(.4); }
}

/* ── Login button pulse when idle ── */
.lbtn {
  animation: btnIdlePulse 2.5s ease-in-out infinite;
}
@keyframes btnIdlePulse {
  0%, 100% { box-shadow: 0 4px 18px rgba(139,26,26,.45); }
  50%       { box-shadow: 0 6px 30px rgba(181,32,32,.7), 0 0 0 3px rgba(139,26,26,.15); }
}
.lbtn:focus, .lbtn:hover { animation: none; }

/* ── Red armour scanline texture on left panel ── */
.sl {
  position: relative;
  background: linear-gradient(155deg, var(--g0) 0%, var(--g1) 50%, var(--g2) 100%) !important;
}
.sl::after {
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 3px,
    rgba(0,0,0,.06) 3px,
    rgba(0,0,0,.06) 4px
  ) !important;
  width: 100% !important; height: 100% !important;
  top: 0 !important; left: 0 !important; border-radius: 0 !important;
  pointer-events: none;
}