/* ============================================================
   DAPS — Digital Activity Proposal System
   assets/css/style.css
   ============================================================ */

/* ══════════════════════════════════════════════════════════
   ROLE THEMES
   body.role-proposer  → Green  #406F27
   body.role-approver  → Blue   #263F77
   body.role-admin     → Purple #4C2B7A
   ══════════════════════════════════════════════════════════ */

/* ── DEFAULT / SHARED VARIABLES ── */
:root {
  --accent:      #f0c040;
  --accent2:     #ff6b35;
  --danger:      #dc2626;
  --danger-bg:   #fee2e2;
  --warn:        #d97706;
  --white:       #fafdf8;
  --card-bg:     #ffffff;
  --hover-bg:    #f9fafb;
  --topbar-h:    60px;
  --sidebar-w:   256px;
  --success:     #065f46;
  --success-bg:  #d1fae5;

  /* Fallback — green (proposer) */
  --theme-900:   #1a2e0f;
  --theme-800:   #2a4a18;
  --theme-700:   #355c1f;
  --theme-600:   #406F27;
  --theme-500:   #4e8830;
  --theme-400:   #5ea33c;
  --theme-300:   #7fc05e;
  --theme-200:   #a8d98a;
  --theme-100:   #d0edbb;
  --theme-50:    #eef7e4;
  --theme-text:  #1a2e0f;
  --theme-muted: #4a6a30;
  --theme-border:#b8d99a;
  --theme-shadow: rgba(64,111,39,.12);

  --border:      var(--theme-border);
  --shadow:      var(--theme-shadow);
  --text:        var(--theme-text);
  --muted:       var(--theme-muted);
  --text-muted:  var(--theme-muted);
}

/* ── PROPOSER THEME — Green #406F27 ── */
body.role-proposer {
  --theme-900:   #1a2e0f;
  --theme-800:   #2a4a18;
  --theme-700:   #355c1f;
  --theme-600:   #406F27;
  --theme-500:   #4e8830;
  --theme-400:   #5ea33c;
  --theme-300:   #7fc05e;
  --theme-200:   #a8d98a;
  --theme-100:   #d0edbb;
  --theme-50:    #eef7e4;
  --theme-text:  #1a2e0f;
  --theme-muted: #4a6a30;
  --theme-border:#b8d99a;
  --theme-shadow: rgba(64,111,39,.12);
  --border:      #b8d99a;
  --shadow:      rgba(64,111,39,.12);
  --text:        #1a2e0f;
  --muted:       #4a6a30;
  --text-muted:  #4a6a30;
  background:    #f4f9ef;
}

/* ── APPROVER THEME — Blue #263F77 ── */
body.role-approver {
  --theme-900:   #0d1a35;
  --theme-800:   #162444;
  --theme-700:   #1e3060;
  --theme-600:   #263F77;
  --theme-500:   #2e4f93;
  --theme-400:   #3a62b5;
  --theme-300:   #5c82cc;
  --theme-200:   #92aede;
  --theme-100:   #c4d4f0;
  --theme-50:    #e8eef9;
  --theme-text:  #0d1a35;
  --theme-muted: #3a5080;
  --theme-border:#b0c4e8;
  --theme-shadow: rgba(38,63,119,.12);
  --border:      #b0c4e8;
  --shadow:      rgba(38,63,119,.12);
  --text:        #0d1a35;
  --muted:       #3a5080;
  --text-muted:  #3a5080;
  background:    #eff2fb;
}

/* ── ADMIN THEME — Purple #4C2B7A ── */
body.role-admin {
  --theme-900:   #1e0f33;
  --theme-800:   #2e1a4a;
  --theme-700:   #3b2260;
  --theme-600:   #4C2B7A;
  --theme-500:   #5e3595;
  --theme-400:   #7247b0;
  --theme-300:   #9268cc;
  --theme-200:   #b99be0;
  --theme-100:   #dac8f2;
  --theme-50:    #f2ecfb;
  --theme-text:  #1e0f33;
  --theme-muted: #5a3f80;
  --theme-border:#c5a8e8;
  --theme-shadow: rgba(76,43,122,.12);
  --border:      #c5a8e8;
  --shadow:      rgba(76,43,122,.12);
  --text:        #1e0f33;
  --muted:       #5a3f80;
  --text-muted:  #5a3f80;
  background:    #f5f0fb;
}

/* ══════════════════════════════════════════════════════════
   RESET
   ══════════════════════════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: 'Segoe UI', system-ui, sans-serif;
  min-height: 100vh;
  overflow-x: hidden;
  font-size: 14px;
  line-height: 1.5;
}
a   { text-decoration: none; color: inherit; }
img { max-width: 100%; }
input, select, textarea, button { font-family: inherit; font-size: inherit; }

/* ══════════════════════════════════════════════════════════
   LAYOUT
   ══════════════════════════════════════════════════════════ */
.app  { display: flex; min-height: 100vh; }
.main {
  margin-left: 256px;
  width: calc(100% - 256px);
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  padding-top: var(--topbar-h);
}

/* ══════════════════════════════════════════════════════════
   SIDEBAR — uses theme colors
   ══════════════════════════════════════════════════════════ */
.sidebar {
  width: 256px;
  background: var(--theme-800);
  color: #fff;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0;
  height: 100vh;
  z-index: 100;
  overflow-y: auto;
}
.sidebar-logo {
  padding: 18px 16px;
  border-bottom: 1px solid rgba(255,255,255,.1);
  display: flex;
  align-items: center;
  justify-content: center;
}
.logo-icon {
  width: 38px; height: 38px; border-radius: 10px;
  background: var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-size: 19px; font-weight: 900; color: var(--theme-900); flex-shrink: 0;
}
.logo-text { font-size: 15px; font-weight: 700; color: #fff; line-height: 1.2; }
.logo-sub  { font-size: 10px; color: var(--theme-200); letter-spacing: .4px; }

.sidebar-nav { flex: 1; padding: 12px 8px; display: flex; flex-direction: column; gap: 2px; }
.nav-sec-label {
  padding: 10px 10px 3px;
  font-size: 10px; letter-spacing: 1.5px;
  color: var(--theme-200); font-weight: 700; text-transform: uppercase;
}
.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; cursor: pointer; border-radius: 8px;
  color: rgba(255,255,255,.65); font-size: 13.5px; font-weight: 500;
  transition: .15s;
}
.nav-item:hover  { background: rgba(255,255,255,.08); color: #fff; }
.nav-item.active {
  background: rgba(255,255,255,.15);
  color: #fff;
  border-left: 3px solid var(--accent);
}
.nav-item ion-icon { font-size: 17px; flex-shrink: 0; vertical-align: middle; }
.nav-badge {
  margin-left: auto; background: var(--accent2);
  color: #fff; font-size: 10px; font-weight: 700;
  padding: 2px 7px; border-radius: 20px;
}
.sidebar-user {
  padding: 14px 18px; border-top: 1px solid rgba(255,255,255,.1);
  display: flex; align-items: center; gap: 10px;
}
.u-name { font-size: 13px; font-weight: 600; color: #f9fafb; line-height: 1.3; }
.u-role { font-size: 11px; color: var(--theme-200); }

/* ══════════════════════════════════════════════════════════
   TOPBAR — uses theme colors
   ══════════════════════════════════════════════════════════ */
.topbar {
  height: var(--topbar-h);
  background: var(--theme-600);
  border-bottom: none;
  display: flex; align-items: center;
  justify-content: space-between;
  padding: 0 26px;
  position: fixed;
  top: 0; left: 256px; right: 0;
  z-index: 50;
  box-shadow: 0 2px 12px var(--theme-shadow);
}
.topbar-title {
  font-size: 17px; font-weight: 700;
  color: #fff;
  letter-spacing: -.2px;
}
.topbar-actions { display: flex; align-items: center; gap: 10px; }
.topbar-actions ion-icon,
.notif-btn ion-icon { font-size: 20px; vertical-align: middle; }

/* ══════════════════════════════════════════════════════════
   PAGE CONTENT
   ══════════════════════════════════════════════════════════ */
.page-content { padding: 26px; flex: 1; }
.pg-header    { margin-bottom: 22px; }
.pg-title     { font-size: 22px; font-weight: 800; color: var(--theme-900); display: flex; align-items: center; gap: 8px; }
.pg-sub       { font-size: 13.5px; color: var(--muted); margin-top: 3px; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }

/* ══════════════════════════════════════════════════════════
   FLASH MESSAGES
   ══════════════════════════════════════════════════════════ */
.flash {
  padding: 11px 16px; font-size: 13.5px; font-weight: 500;
  margin: 12px 26px 0;
  display: flex; align-items: center; gap: 8px;
  border-radius: 8px;
}
.flash ion-icon  { vertical-align: middle; margin-right: 4px; }
.flash-success   { background: #d1fae5; color: #065f46; border: 1px solid #a7f3d0; }
.flash-error     { background: #fee2e2; color: #991b1b; border: 1px solid #fca5a5; }

/* ══════════════════════════════════════════════════════════
   BUTTONS — theme-colored
   ══════════════════════════════════════════════════════════ */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 16px; border-radius: 8px;
  font-size: 13px; font-weight: 600;
  cursor: pointer; border: 1.5px solid transparent;
  transition: background .15s, border-color .15s, color .15s;
  font-family: inherit; white-space: nowrap;
  text-decoration: none;
}
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* Primary / Secondary / General — theme color */
.btn-primary,
.btn-secondary,
.btn-accent,
.btn-warn,
.btn-warning,
.btn-filter {
  background: var(--theme-600);
  color: #fff !important;
  border-color: var(--theme-600);
}
.btn-primary:hover,
.btn-secondary:hover,
.btn-accent:hover,
.btn-warn:hover,
.btn-warning:hover,
.btn-filter:hover {
  background: var(--theme-700);
  border-color: var(--theme-700);
  color: #fff !important;
}

/* Blue — Edit only */
.btn-edit {
  background: #2563eb;
  color: #fff !important;
  border-color: #2563eb;
}
.btn-edit:hover {
  background: #1d4ed8;
  border-color: #1d4ed8;
  color: #fff !important;
}

/* Red — Delete/Remove only */
.btn-danger {
  background: #dc2626;
  color: #fff !important;
  border-color: #dc2626;
}
.btn-danger:hover {
  background: #b91c1c;
  border-color: #b91c1c;
  color: #fff !important;
}

.btn-sm   { padding: 5px 12px; font-size: 12px; }
.btn-full { width: 100%; justify-content: center; padding: 12px; }

/* ══════════════════════════════════════════════════════════
   STAT CARDS
   ══════════════════════════════════════════════════════════ */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 14px; margin-bottom: 22px;
}
.stat-card {
  background: #fff; border: 1.5px solid var(--theme-border, var(--border));
  border-radius: 12px; padding: 18px 20px;
  position: relative; overflow: hidden;
}
.stat-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: var(--theme-400);
}
/* Specific stat card color overrides */
.sc-green  { background: #dcfce7; color: #14532d; border-color: #bbf7d0; }
.sc-green::before  { background: #16a34a; }
.sc-yellow { background: #fef9c3; color: #713f12; border-color: #fde68a; }
.sc-yellow::before { background: var(--accent); }
.sc-teal   { background: #ccfbf1; color: #134e4a; border-color: #99f6e4; }
.sc-teal::before   { background: #14b8a6; }
.sc-orange { background: #ffedd5; color: #7c2d12; border-color: #fed7aa; }
.sc-orange::before { background: var(--accent2); }
.sc-blue   { background: #dbeafe; color: #1e3a8a; border-color: #bfdbfe; }
.sc-blue::before   { background: #2563eb; }
.sc-red    { background: #fee2e2; color: #7f1d1d; border-color: #fca5a5; }
.sc-red::before    { background: #dc2626; }
/* Theme stat card */
.sc-theme  { background: var(--theme-50); color: var(--theme-900); border-color: var(--theme-100); }
.sc-theme::before { background: var(--theme-400); }

.sc-label  { font-size: 11px; text-transform: uppercase; letter-spacing: .8px; color: var(--muted); font-weight: 600; margin-bottom: 6px; }
.sc-value  { font-size: 30px; font-weight: 800; color: var(--theme-900); line-height: 1; }
.sc-sub    { font-size: 12px; color: var(--muted); margin-top: 5px; display: flex; align-items: center; gap: 4px; }
.sc-icon   { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); opacity: .14; display: flex; align-items: center; }
.sc-icon ion-icon { font-size: 38px; }

/* ══════════════════════════════════════════════════════════
   CARD
   ══════════════════════════════════════════════════════════ */
.card {
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: 12px; padding: 20px; margin-bottom: 18px;
  box-shadow: 0 1px 4px rgba(0,0,0,.04);
}
.card-title {
  font-size: 14.5px; font-weight: 700; color: var(--theme-900);
  margin-bottom: 14px; display: flex; align-items: center; gap: 7px;
}
.card-title ion-icon { font-size: 18px; color: var(--theme-500); }

/* ══════════════════════════════════════════════════════════
   TWO-COL
   ══════════════════════════════════════════════════════════ */
.two-col { display: grid; grid-template-columns: 2fr 1fr; gap: 18px; align-items: start; }

/* ══════════════════════════════════════════════════════════
   TABLE
   ══════════════════════════════════════════════════════════ */
.tbl-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th {
  text-align: left; padding: 9px 12px;
  background: var(--theme-50); color: var(--muted);
  font-weight: 600; font-size: 11.5px;
  text-transform: uppercase; letter-spacing: .4px;
  border-bottom: 1.5px solid var(--border);
  white-space: nowrap;
}
td { padding: 11px 12px; border-bottom: 1px solid var(--border); color: var(--text); vertical-align: middle; }
tr:last-child td { border-bottom: none; }
tr:hover td { background: var(--theme-50); }
.main-row { cursor: pointer; }
.main-row:hover td { background: var(--theme-50); }

/* ══════════════════════════════════════════════════════════
   BADGES & CHIPS
   ══════════════════════════════════════════════════════════ */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px; border-radius: 20px;
  font-size: 11.5px; font-weight: 600;
}
.badge ion-icon { font-size: 13px; vertical-align: middle; }
.b-pending     { background: #fef3c7; color: #92400e; }
.b-approved    { background: #d1fae5; color: #065f46; }
.b-revision    { background: #fee2e2; color: #991b1b; }
.b-disapproved { background: #fce7f3; color: #9d174d; }
.b-archived    { background: #f3f4f6; color: #6b7280; }
.b-active      { background: #d1fae5; color: #065f46; }
.b-disabled    { background: #f3f4f6; color: #6b7280; }

.chip {
  display: inline-flex; align-items: center;
  padding: 2px 9px; border-radius: 6px;
  font-size: 12px; font-weight: 600;
  background: var(--theme-50); color: var(--theme-700);
  border: 1px solid var(--theme-100);
}

/* ══════════════════════════════════════════════════════════
   STATUS PILLS
   ══════════════════════════════════════════════════════════ */
.pill {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px; border-radius: 999px;
  font-size: 12px; font-weight: 600;
}
.pill-pending  { background: #fef3c7; color: #92400e; }
.pill-approved { background: #d1fae5; color: #065f46; }
.pill-rejected { background: #fee2e2; color: #991b1b; }
.pill-revision { background: #ede9fe; color: #5b21b6; }
.pill-neutral  { background: var(--border); color: var(--text); }
.pill-archived { background: #f3f4f6; color: #6b7280; }

.status-badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px; border-radius: 999px;
  font-size: 12px; font-weight: 600;
}

/* ══════════════════════════════════════════════════════════
   FORMS
   ══════════════════════════════════════════════════════════ */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.fg        { display: flex; flex-direction: column; gap: 5px; margin-bottom: 14px; }
.fg.full   { grid-column: 1 / -1; }
label      { font-size: 12.5px; font-weight: 600; color: var(--text); }
.fg label  { font-size: 12px; font-weight: 600; color: var(--muted); }
input[type="text"], input[type="email"], input[type="password"],
input[type="number"], input[type="date"], select, textarea {
  padding: 9px 12px;
  border: 1.5px solid var(--border); border-radius: 8px;
  font-family: inherit; font-size: 13.5px; color: var(--text);
  background: #fff; transition: .15s; outline: none; width: 100%;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--theme-400);
  box-shadow: 0 0 0 3px rgba(var(--theme-400), .1);
}
textarea { resize: vertical; min-height: 80px; }
.form-error { font-size: 12px; color: var(--danger); margin-top: 2px; }

/* ══════════════════════════════════════════════════════════
   SEARCH BAR
   ══════════════════════════════════════════════════════════ */
.search-wrap { position: relative; margin-bottom: 14px; }
.search-wrap input { padding-left: 36px; }
.search-ico {
  position: absolute; left: 11px; top: 50%;
  transform: translateY(-50%);
  color: var(--muted); pointer-events: none;
  display: flex; align-items: center; font-size: 15px;
}

/* ══════════════════════════════════════════════════════════
   TAB BUTTONS — theme-colored
   ══════════════════════════════════════════════════════════ */
.tab-btn {
  display: inline-flex !important; align-items: center !important; gap: 8px !important;
  padding: 9px 20px !important; border-radius: 8px !important;
  border: 1.5px solid var(--theme-600) !important;
  background: #fff !important; color: var(--theme-600) !important;
  font-size: 14px !important; font-weight: 600 !important;
  cursor: pointer !important; transition: all .15s !important;
}
.tab-btn:hover {
  background: var(--theme-50) !important;
  border-color: var(--theme-700) !important;
  color: var(--theme-700) !important;
}
.tab-btn.tab-active {
  background: var(--theme-600) !important;
  border-color: var(--theme-600) !important;
  color: #fff !important;
}
.tab-btn.tab-active:hover {
  background: var(--theme-700) !important;
  border-color: var(--theme-700) !important;
  color: #fff !important;
}
.tab-count {
  display: inline-flex !important; align-items: center !important;
  justify-content: center !important;
  min-width: 20px !important; height: 20px !important; padding: 0 6px !important;
  border-radius: 999px !important; font-size: 11px !important; font-weight: 700 !important;
  background: rgba(255,255,255,.3) !important; color: inherit !important;
}
.tab-btn:not(.tab-active) .tab-count {
  background: var(--theme-100) !important;
  color: var(--theme-700) !important;
}

/* ══════════════════════════════════════════════════════════
   NOTIFICATIONS
   ══════════════════════════════════════════════════════════ */
.notif-wrap { position: relative; }
.notif-btn {
  width: 36px; height: 36px; border-radius: 50%;
  background: rgba(255,255,255,.15);
  border: 1.5px solid rgba(255,255,255,.3);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; position: relative;
  color: #fff;
}
.notif-btn:hover { background: rgba(255,255,255,.25); }
.notif-dot {
  position: absolute; top: 4px; right: 4px;
  width: 9px; height: 9px; background: var(--accent2);
  border-radius: 50%; border: 2px solid transparent; display: none;
}
.notif-dot.show { display: block; }
.notif-panel {
  position: absolute; top: calc(100% + 10px); right: 0;
  width: 340px; background: #fff;
  border: 1.5px solid var(--border); border-radius: 12px;
  box-shadow: 0 12px 40px var(--shadow);
  z-index: 200; display: none; overflow: hidden;
}
.notif-panel.open { display: block; }
.np-header { padding: 12px 15px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
.np-title  { font-weight: 700; font-size: 14px; display: flex; align-items: center; gap: 6px; color: var(--theme-900); }
.np-body   { max-height: 320px; overflow-y: auto; }
.np-item   { padding: 11px 15px; border-bottom: 1px solid var(--border); border-left: 3px solid transparent; cursor: pointer; transition: background .1s; }
.np-item:hover  { background: var(--theme-50); }
.np-item.unread { border-left-color: var(--theme-400); background: var(--theme-50); }
.np-item-title  { font-size: 13px; font-weight: 600; color: var(--theme-900); margin-bottom: 2px; }
.np-item-msg    { font-size: 12px; color: var(--muted); margin-top: 2px; }
.np-item-time   { font-size: 11px; color: var(--muted); font-family: monospace; margin-top: 3px; }
.np-empty  { padding: 22px; text-align: center; color: var(--muted); font-size: 13px; }
.np-footer { padding: 10px 15px; text-align: center; font-size: 12.5px; border-top: 1px solid var(--border); }
.np-footer a { color: var(--theme-600); font-weight: 600; }

/* ══════════════════════════════════════════════════════════
   MODAL
   ══════════════════════════════════════════════════════════ */
.modal-bg {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.45); z-index: 300;
  display: none; align-items: center; justify-content: center;
  padding: 20px; backdrop-filter: blur(3px);
}
.modal-bg.open { display: flex; }
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 500; display: none; align-items: center; justify-content: center; }
.modal-overlay.open { display: flex; }
.modal, .modal-box {
  background: #fff; border-radius: 14px;
  max-width: 520px; width: 100%;
  max-height: 90vh; overflow-y: auto;
  padding: 24px;
  box-shadow: 0 24px 60px rgba(0,0,0,.2);
  position: relative;
}
.modal-hdr   { padding: 18px 22px 0; display: flex; align-items: flex-start; justify-content: space-between; }
.modal-title { font-size: 16px; font-weight: 800; color: var(--theme-900); margin-bottom: 18px; }
.modal-body  { padding: 14px 22px 22px; }
.close-btn   { background: none; border: none; font-size: 18px; cursor: pointer; color: var(--muted); padding: 3px 6px; border-radius: 5px; line-height: 1; }
.close-btn:hover { background: var(--theme-50); }

/* ══════════════════════════════════════════════════════════
   TOAST
   ══════════════════════════════════════════════════════════ */
.toast-wrap { position: fixed; bottom: 22px; right: 22px; z-index: 999; display: flex; flex-direction: column; gap: 8px; }
.toast {
  padding: 11px 16px; border-radius: 10px; font-size: 13.5px; font-weight: 500;
  display: flex; align-items: center; gap: 8px;
  max-width: 320px; animation: toastIn .3s;
}
.toast-success { background: #d1fae5; color: #065f46; border: 1.5px solid #a7f3d0; }
.toast-error   { background: #fee2e2; color: #991b1b; border: 1.5px solid #fca5a5; }
.toast-info    { background: #dbeafe; color: #1e40af; border: 1.5px solid #bfdbfe; }
@keyframes toastIn { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: translateX(0); } }

/* ══════════════════════════════════════════════════════════
   AVATAR
   ══════════════════════════════════════════════════════════ */
.u-avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--theme-400);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 13px; color: #fff; flex-shrink: 0;
}

/* ══════════════════════════════════════════════════════════
   STEP BAR
   ══════════════════════════════════════════════════════════ */
.step-bar { display: flex; align-items: center; margin-bottom: 22px; }
.step     { display: flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 600; color: var(--muted); }
.step.done   { color: var(--theme-500); }
.step.active { color: var(--theme-800); }
.s-num {
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 11.5px; font-weight: 700; transition: .2s;
}
.step.done   .s-num { background: var(--theme-400); color: #fff; }
.step.active .s-num { background: var(--theme-700); color: #fff; box-shadow: 0 0 0 4px var(--theme-100); }
.s-line      { flex: 1; height: 2px; background: var(--border); margin: 0 6px; }
.s-line.done { background: var(--theme-400); }

/* ══════════════════════════════════════════════════════════
   ROADMAP
   ══════════════════════════════════════════════════════════ */
.roadmap  { display: flex; align-items: center; padding: 14px 0; overflow-x: auto; }
.rm-stage { display: flex; flex-direction: column; align-items: center; gap: 5px; min-width: 74px; }
.rm-circle {
  width: 34px; height: 34px; border-radius: 50%;
  border: 2.5px solid var(--border); background: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; transition: .3s;
}
.rm-circle.done   { border-color: var(--theme-400); background: var(--theme-400); color: #fff; }
.rm-circle.active { border-color: var(--accent); background: var(--accent); color: var(--theme-900); }
.rm-label         { font-size: 10.5px; font-weight: 600; color: var(--muted); text-align: center; }
.rm-line          { flex: 1; height: 2px; background: var(--border); margin-bottom: 19px; }
.rm-line.done     { background: var(--theme-400); }

/* ══════════════════════════════════════════════════════════
   UPLOAD ZONE
   ══════════════════════════════════════════════════════════ */
.upload-zone {
  border: 2px dashed var(--border); border-radius: 10px;
  padding: 22px; text-align: center; cursor: pointer;
  transition: .15s; background: var(--theme-50);
}
.upload-zone:hover { border-color: var(--theme-400); }

/* ══════════════════════════════════════════════════════════
   DIGITAL PAPER
   ══════════════════════════════════════════════════════════ */
.paper     { background: #fff; border: 1.5px solid var(--border); border-radius: 12px; padding: 28px; max-width: 860px; }
.paper-hdr { text-align: center; border-bottom: 2px solid var(--theme-200); padding-bottom: 16px; margin-bottom: 18px; }
.paper-uni   { font-size: 11px; text-transform: uppercase; letter-spacing: 2px; color: var(--muted); }
.paper-title { font-size: 20px; font-weight: 800; color: var(--theme-900); margin-top: 6px; }
.p-sec-title {
  font-size: 10.5px; text-transform: uppercase; letter-spacing: 1px;
  color: var(--theme-400); font-weight: 700; margin-bottom: 8px;
  border-bottom: 1px solid var(--border); padding-bottom: 5px; margin-top: 16px;
}
.p-row      { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; margin-bottom: 10px; }
.p-field-lbl { font-size: 11px; color: var(--muted); font-weight: 600; }
.p-field-val { font-size: 13.5px; font-weight: 500; margin-top: 2px; }

/* ══════════════════════════════════════════════════════════
   ACTIVITY LOG
   ══════════════════════════════════════════════════════════ */
.log-item   { display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); align-items: flex-start; }
.log-dot    { width: 9px; height: 9px; border-radius: 50%; background: var(--theme-400); margin-top: 5px; flex-shrink: 0; }
.log-action { font-size: 13px; font-weight: 600; color: var(--theme-900); }
.log-meta   { font-size: 11.5px; color: var(--muted); margin-top: 2px; font-family: monospace; }

/* ══════════════════════════════════════════════════════════
   APPROVAL CHAIN
   ══════════════════════════════════════════════════════════ */
.approval-chain { display: flex; align-items: flex-start; gap: 0; flex-wrap: nowrap; padding: 8px 0 4px; }
.approval-step  { display: flex; flex-direction: column; align-items: center; position: relative; min-width: 90px; }
.approval-step + .approval-step::before {
  content: ''; position: absolute; left: -24px; top: 14px;
  width: 48px; height: 2px; background: var(--border); z-index: 0;
}
.approval-step + .approval-step.step-done::before { background: #10b981; }
.step-circle {
  width: 30px; height: 30px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; border: 2px solid var(--border);
  background: #fff; color: var(--muted); z-index: 1; position: relative;
}
.step-circle.s-approved { border-color: #10b981; background: #d1fae5; color: #059669; }
.step-circle.s-pending  { border-color: #f59e0b; background: #fef3c7; color: #d97706; }
.step-circle.s-rejected { border-color: #ef4444; background: #fee2e2; color: #dc2626; }
.step-circle.s-waiting  { border-color: var(--border); background: #fff; color: var(--muted); }
.step-label { font-size: 10px; font-weight: 700; text-align: center; margin-top: 4px; max-width: 80px; line-height: 1.3; }
.step-sub   { font-size: 9px; color: var(--muted); text-align: center; max-width: 80px; }
.step-date  { font-size: 9px; color: #10b981; text-align: center; }
.step-note  { font-size: 9px; color: #ef4444; text-align: center; max-width: 80px; }

/* ══════════════════════════════════════════════════════════
   EXPANDABLE DETAIL ROW
   ══════════════════════════════════════════════════════════ */
.detail-row       { display: none; background: var(--theme-50); }
.detail-row.open  { display: table-row; }
.detail-cell      { padding: 14px 18px 18px !important; }
.detail-grid      { display: grid; grid-template-columns: auto 1fr; gap: 5px 14px; font-size: 13px; }
.detail-grid .lbl { color: var(--muted); }
.detail-grid .val { font-weight: 600; }

/* ══════════════════════════════════════════════════════════
   CONFIRM / REF TAG
   ══════════════════════════════════════════════════════════ */
.confirm-center { text-align: center; padding: 14px 0 18px; }
.confirm-ico    { font-size: 50px; margin-bottom: 12px; }
.confirm-title  { font-size: 20px; font-weight: 800; color: var(--theme-900); margin-bottom: 6px; }
.confirm-sub    { font-size: 13.5px; color: var(--muted); line-height: 1.6; max-width: 360px; margin: 0 auto; }
.ref-tag {
  display: inline-block; background: var(--theme-50);
  border: 1.5px solid var(--theme-200); border-radius: 8px;
  padding: 7px 18px; font-family: monospace;
  font-size: 14px; font-weight: 500; color: var(--theme-700); margin: 12px 0;
}

/* ══════════════════════════════════════════════════════════
   E-SIGN
   ══════════════════════════════════════════════════════════ */
.esign-box {
  background: var(--theme-50); border: 1.5px solid var(--theme-100);
  border-radius: 10px; padding: 13px;
  display: flex; align-items: center; gap: 11px; margin-bottom: 16px;
}

/* ══════════════════════════════════════════════════════════
   LOGIN PAGE — Canvas LMS style
   ══════════════════════════════════════════════════════════ */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 24px;
  background-image: url('/images/pubackground.png');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

/* Blue-to-green gradient overlay */
.login-page::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(38, 63, 119, 0.70) 0%,
    rgba(64, 111, 39, 0.62) 100%
  );
  z-index: 0;
}

.lp-left { display: none !important; }

/* Semi-transparent card — blends with blue-green overlay */
.lp-right {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 420px;
  background: rgba(38, 63, 119, 0.35);
  border-radius: 14px;
  padding: 36px 40px 40px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,.18);
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

/* Teaching staff — blue tint card */
.lp-right.card-teaching {
  background: rgba(38, 63, 119, 0.45);
  border-color: rgba(92, 130, 204, 0.4);
}

/* Non-teaching staff — green tint card */
.lp-right.card-nonteaching {
  background: rgba(64, 111, 39, 0.45);
  border-color: rgba(94, 163, 60, 0.4);
}

.lp-form { width: 100%; }

/* ── LOGO — centered ── */
.lp-logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 28px;
  text-align: center;
}

.lp-logo img {
  width: 120px;
  height: auto;
  filter: brightness(0) invert(1);
}

.lp-title { display: none; }
.lp-sub   { display: none; }

/* White labels */
.lp-form label {
  color: #fff !important;
  font-size: 14px;
  font-weight: 600;
  display: block;
  margin-bottom: 6px;
}

/* Light gray inputs like Canvas */
.lp-form input[type="email"],
.lp-form input[type="password"],
.lp-form input[type="text"] {
  background: rgba(220, 228, 240, 0.88);
  border: none;
  border-radius: 4px;
  padding: 11px 14px;
  font-size: 14px;
  color: #1a2e1f;
  width: 100%;
  margin-bottom: 0;
}
.lp-form input:focus {
  outline: 2px solid rgba(255,255,255,.7);
  box-shadow: none;
  border-color: transparent;
  background: rgba(240, 245, 255, 0.95);
}

/* Forgot password */
.lp-form a[href*="reset"] {
  color: #fff;
  font-size: 13px;
  text-decoration: underline;
  opacity: .85;
}
.lp-form a[href*="reset"]:hover { opacity: 1; }

/* Log In button — white outlined like Canvas */
.lp-form .btn-primary.btn-full {
  background: rgba(255,255,255,.15) !important;
  border: 2px solid rgba(255,255,255,.8) !important;
  color: #fff !important;
  font-size: 15px;
  font-weight: 600;
  border-radius: 4px;
  padding: 11px;
  margin-top: 6px;
  letter-spacing: .3px;
  transition: background .15s;
}
.lp-form .btn-primary.btn-full:hover {
  background: rgba(255,255,255,.28) !important;
  border-color: #fff !important;
  color: #fff !important;
}

/* Hint box */
.lp-hint {
  margin-top: 18px;
  padding: 10px 14px;
  background: rgba(255,255,255,.10);
  border-radius: 6px;
  font-size: 12px;
  color: rgba(255,255,255,.90);
  border: 1px solid rgba(255,255,255,.25);
}

/* Switch / register link */
.lp-switch {
  text-align: center;
  margin-top: 18px;
  font-size: 13px;
  color: rgba(255,255,255,.80);
}
.lp-switch a {
  color: #fff;
  font-weight: 700;
  text-decoration: underline;
}

/* Role buttons on register page */
.lp-form .btn-role {
  background: rgba(255,255,255,.15) !important;
  border: 2px solid rgba(255,255,255,.7) !important;
  color: #fff !important;
  font-size: 15px;
  font-weight: 600;
  border-radius: 4px;
  padding: 14px;
  width: 100%;
  margin-bottom: 12px;
  cursor: pointer;
  transition: background .15s;
  display: block;
  text-align: center;
}
.lp-form .btn-role:hover {
  background: rgba(255,255,255,.28) !important;
}

/* ══════════════════════════════════════════════════════════
   UTILITY
   ══════════════════════════════════════════════════════════ */
.mono         { font-family: monospace; }
.text-sm      { font-size: 12.5px; }
.text-muted   { color: var(--muted); }
.flex         { display: flex; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.gap-2 { gap: 8px; } .gap-3 { gap: 12px; }
.hidden { display: none !important; }
.mt-2 { margin-top: 8px; } .mt-4 { margin-top: 16px; } .mb-4 { margin-bottom: 16px; }

ion-icon { vertical-align: middle; }
.btn ion-icon, .badge ion-icon, .card-title ion-icon,
.tab-btn ion-icon, .nav-item ion-icon, .flash ion-icon { vertical-align: middle; line-height: 1; }

/* ══════════════════════════════════════════════════════════
   PRINT
   ══════════════════════════════════════════════════════════ */
@media print {
  .sidebar, .topbar, .btn, form, .notif-wrap { display: none !important; }
  .main  { margin-left: 0; padding-top: 0; }
  .paper { box-shadow: none; border: none; }
}

/* ══════════════════════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════════════════════ */
@media (max-width: 900px) {
  .sidebar { transform: translateX(-256px); }
  .main    { margin-left: 0; width: 100%; }
  .topbar  { left: 0; }
  .stat-grid { grid-template-columns: 1fr 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .two-col   { grid-template-columns: 1fr; }
  .p-row     { grid-template-columns: 1fr 1fr; }
  .lp-left   { display: none; }
  .lp-right  { width: 100%; }
}
@media (max-width: 700px) {
  .stat-grid { grid-template-columns: 1fr 1fr; }
  .p-row     { grid-template-columns: 1fr; }
}