/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --red:       #CC0000;
  --red-dark:  #990000;
  --red-light: #ffeded;
  --gold:      #B8860B;
  --bg:        #f4f6f9;
  --surface:   #ffffff;
  --surface2:  #f8f9fb;
  --border:    #e2e6ea;
  --text:      #1a1a2e;
  --text2:     #555770;
  --text3:     #888aa0;
  --shadow:    0 1px 4px rgba(0,0,0,.10);
  --shadow-md: 0 4px 16px rgba(0,0,0,.12);
  --radius:    8px;
  --sidebar-w: 240px;
  --header-h:  60px;
}

html, body { height: 100%; font-family: 'Segoe UI', system-ui, sans-serif; font-size: 14px; color: var(--text); background: var(--bg); }
button { cursor: pointer; font-family: inherit; font-size: 14px; }
input, select, textarea { font-family: inherit; font-size: 14px; }
a { color: var(--red); text-decoration: none; }

/* ===== LAYOUT ===== */
#root { display: flex; height: 100vh; overflow: hidden; width: 100%; }

/* ===== SIDEBAR ===== */
#sidebar {
  width: var(--sidebar-w);
  background: #1a1a2e;
  color: #e0e0f0;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  overflow-y: auto;
}
.sidebar-logo {
  padding: 20px 16px 14px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.sidebar-logo .logo-title {
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  letter-spacing: .3px;
}
.sidebar-logo .logo-sub {
  font-size: 11px;
  color: rgba(255,255,255,.45);
  margin-top: 2px;
}
.sidebar-user {
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.sidebar-user .user-name {
  font-weight: 600;
  font-size: 13px;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sidebar-user .user-role {
  font-size: 11px;
  color: rgba(255,255,255,.5);
  margin-top: 2px;
}
.sidebar-user .user-chapter {
  font-size: 11px;
  color: var(--red);
  margin-top: 1px;
}
.sidebar-nav { flex: 1; padding: 8px 0; }
.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  cursor: pointer;
  color: rgba(255,255,255,.65);
  font-size: 13px;
  border-left: 3px solid transparent;
  transition: background .15s, color .15s;
  user-select: none;
}
.nav-item:hover { background: rgba(255,255,255,.06); color: #fff; }
.nav-item.active { background: rgba(204,0,0,.15); color: #fff; border-left-color: var(--red); }
.nav-item i { width: 18px; text-align: center; font-size: 13px; }
.sidebar-footer {
  padding: 12px 16px;
  border-top: 1px solid rgba(255,255,255,.08);
}
.btn-logout {
  width: 100%;
  background: rgba(255,255,255,.06);
  color: rgba(255,255,255,.6);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 6px;
  padding: 8px;
  font-size: 12px;
  transition: background .15s;
}
.btn-logout:hover { background: rgba(255,255,255,.12); color: #fff; }

/* ===== MAIN AREA ===== */
#main { flex: 1; display: flex; flex-direction: column; overflow: hidden; }

/* ===== HEADER ===== */
#header {
  height: var(--header-h);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 24px;
  gap: 12px;
  flex-shrink: 0;
  box-shadow: var(--shadow);
}
.header-title { font-size: 16px; font-weight: 700; color: var(--text); flex: 1; }
.header-title span { color: var(--red); }
.btn-notif {
  position: relative;
  background: none;
  border: none;
  font-size: 18px;
  color: var(--text2);
  padding: 6px 8px;
  border-radius: 6px;
}
.btn-notif:hover { background: var(--bg); }
.notif-badge {
  position: absolute;
  top: 2px; right: 2px;
  background: var(--red);
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  border-radius: 10px;
  padding: 1px 4px;
  min-width: 16px;
  text-align: center;
  line-height: 14px;
}
.btn-primary {
  background: var(--red);
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 8px 16px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: background .15s;
}
.btn-primary:hover { background: var(--red-dark); }
.btn-secondary {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 8px 14px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: background .15s;
}
.btn-secondary:hover { background: var(--bg); }

/* ===== CONTENT ===== */
#content { flex: 1; overflow-y: auto; padding: 24px; }

/* ===== CARDS / PANELS ===== */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.card-header {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 10px;
}
.card-title { font-size: 14px; font-weight: 700; color: var(--text); flex: 1; }
.card-body { padding: 18px; }

/* ===== KANBAN ===== */
.kanban-board {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  align-items: start;
}
@media (max-width: 1100px) { .kanban-board { grid-template-columns: repeat(2, 1fr); } }
.kanban-col {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.kanban-col-header {
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}
.kanban-col-title { font-weight: 700; font-size: 13px; flex: 1; }
.kanban-count {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1px 8px;
  font-size: 11px;
  font-weight: 700;
  color: var(--text2);
}
.kanban-col-body { padding: 10px; display: flex; flex-direction: column; gap: 8px; min-height: 80px; }
.kanban-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 12px;
  cursor: pointer;
  transition: box-shadow .15s, border-color .15s;
  box-shadow: var(--shadow);
}
.kanban-card:hover { border-color: var(--red); box-shadow: var(--shadow-md); }
.kc-name { font-weight: 700; font-size: 13px; color: var(--text); }
.kc-company { font-size: 12px; color: var(--text2); margin-top: 2px; }
.kc-meta { margin-top: 8px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.kc-chapter { font-size: 10px; background: var(--red-light); color: var(--red); border-radius: 4px; padding: 2px 6px; font-weight: 600; }

/* ===== STATUS BADGES ===== */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
}
.badge-pending   { background: #fff3cd; color: #856404; }
.badge-review    { background: #cce5ff; color: #004085; }
.badge-dd        { background: #d1ecf1; color: #0c5460; }
.badge-decision  { background: #e2d9f3; color: #6f42c1; }
.badge-approved  { background: #d4edda; color: #155724; }
.badge-declined  { background: #f8d7da; color: #721c24; }
.badge-onhold    { background: #fef3cd; color: #856404; }

/* ===== PHASE INDICATORS ===== */
.phase-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}
.ph1 { background: #3b82f6; }
.ph2 { background: #f59e0b; }
.ph3 { background: #8b5cf6; }
.ph4 { background: #10b981; }

/* ===== APPLICATIONS TABLE ===== */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
thead tr { background: var(--surface2); }
th { padding: 10px 14px; text-align: left; font-size: 12px; font-weight: 700; color: var(--text2); border-bottom: 2px solid var(--border); white-space: nowrap; }
td { padding: 10px 14px; font-size: 13px; border-bottom: 1px solid var(--border); color: var(--text); vertical-align: middle; }
tr:last-child td { border-bottom: none; }
tbody tr:hover { background: var(--surface2); cursor: pointer; }
.td-name { font-weight: 600; }
.td-sub  { font-size: 11px; color: var(--text3); }

/* ===== FILTERS / SEARCH ===== */
.filter-bar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; }
.filter-bar input, .filter-bar select {
  padding: 7px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  color: var(--text);
  outline: none;
}
.filter-bar input:focus, .filter-bar select:focus { border-color: var(--red); }
.filter-bar input { min-width: 220px; }

/* ===== DETAIL VIEW ===== */
.detail-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text2);
  font-size: 13px;
  margin-bottom: 16px;
  cursor: pointer;
  padding: 4px 0;
}
.detail-back:hover { color: var(--red); }
.detail-header-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin-bottom: 16px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  box-shadow: var(--shadow);
}
.detail-name { font-size: 22px; font-weight: 800; color: var(--text); }
.detail-company { font-size: 14px; color: var(--text2); margin-top: 4px; }
.detail-meta { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 10px; align-items: center; }
.section-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 16px;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.section-panel-header {
  padding: 12px 18px;
  border-bottom: 1px solid var(--border);
  background: var(--surface2);
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}
.section-panel-title { font-weight: 700; font-size: 13px; flex: 1; }
.section-panel-body { padding: 18px; }
.field-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.field-item label { display: block; font-size: 11px; font-weight: 700; color: var(--text3); margin-bottom: 4px; text-transform: uppercase; letter-spacing: .4px; }
.field-item .field-val { font-size: 13px; color: var(--text); }
.field-item input, .field-item select, .field-item textarea {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  color: var(--text);
  outline: none;
}
.field-item input:focus, .field-item select:focus, .field-item textarea:focus { border-color: var(--red); }

/* ===== CHECKLIST ===== */
.checklist { display: flex; flex-direction: column; gap: 8px; }
.check-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface2);
}
.check-item input[type=checkbox] { width: 16px; height: 16px; accent-color: var(--red); cursor: pointer; }
.check-item label { font-size: 13px; color: var(--text); cursor: pointer; flex: 1; }
.check-item.checked label { text-decoration: line-through; color: var(--text3); }

/* ===== UPLOAD FIELDS ===== */
.upload-area {
  border: 2px dashed var(--border);
  border-radius: 8px;
  padding: 20px;
  text-align: center;
  background: var(--surface2);
  transition: border-color .2s, background .2s;
  position: relative;
}
.upload-area:hover, .upload-area.dragover {
  border-color: var(--red);
  background: var(--red-light);
}
.upload-area input[type=file] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
}
.upload-icon { font-size: 28px; color: var(--text3); margin-bottom: 8px; }
.upload-hint { font-size: 12px; color: var(--text3); }
.upload-preview {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 6px;
  margin-top: 8px;
}
.upload-preview i { color: var(--red); font-size: 18px; }
.upload-preview .fname { font-size: 12px; font-weight: 600; color: var(--text); flex: 1; }
.upload-preview .fsize { font-size: 11px; color: var(--text3); }
.btn-remove-file { background: none; border: none; color: var(--text3); font-size: 14px; padding: 2px 4px; }
.btn-remove-file:hover { color: var(--red); }

/* ===== ACTIVITY LOG ===== */
.activity-list { display: flex; flex-direction: column; gap: 0; }
.activity-item {
  display: flex;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  position: relative;
}
.activity-item:last-child { border-bottom: none; }
.activity-dot {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--red-light);
  color: var(--red);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  flex-shrink: 0;
  margin-top: 2px;
}
.activity-body .act-action { font-size: 13px; font-weight: 600; color: var(--text); }
.activity-body .act-by    { font-size: 12px; color: var(--text3); }
.activity-body .act-time  { font-size: 11px; color: var(--text3); margin-top: 1px; }

/* ===== APPROVED GRID ===== */
.approved-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; }
.member-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 16px;
  text-align: center;
  box-shadow: var(--shadow);
  transition: box-shadow .15s;
}
.member-card:hover { box-shadow: var(--shadow-md); }
.member-avatar {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: var(--red-light);
  color: var(--red);
  font-size: 22px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 12px;
}
.member-name { font-size: 14px; font-weight: 700; color: var(--text); }
.member-company { font-size: 12px; color: var(--text2); margin-top: 2px; }
.member-chapter { font-size: 11px; color: var(--red); margin-top: 4px; font-weight: 600; }
.member-date { font-size: 11px; color: var(--text3); margin-top: 4px; }

/* ===== MODALS ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 16px;
}
.modal {
  background: var(--surface);
  border-radius: 10px;
  width: 100%;
  max-width: 620px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,.25);
  animation: modalIn .2s ease;
}
.modal-sm { max-width: 420px; }
.modal-lg { max-width: 800px; }
@keyframes modalIn { from { opacity:0; transform:scale(.96) translateY(-10px); } to { opacity:1; transform:none; } }
.modal-header {
  padding: 18px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 10px;
}
.modal-title { font-size: 16px; font-weight: 700; color: var(--text); flex: 1; }
.btn-close { background: none; border: none; font-size: 18px; color: var(--text3); padding: 2px 6px; border-radius: 4px; }
.btn-close:hover { background: var(--bg); color: var(--text); }
.modal-body { padding: 20px; }
.modal-footer { padding: 14px 20px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 10px; }
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 12px; font-weight: 700; color: var(--text2); margin-bottom: 5px; }
.form-group input, .form-group select, .form-group textarea {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  color: var(--text);
  outline: none;
  transition: border-color .15s;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus { border-color: var(--red); }
.form-group textarea { min-height: 80px; resize: vertical; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* ===== LOGIN PAGE ===== */
#login-page {
  width: 100%;
  min-height: 100vh;
  display: flex;
}
.login-split {
  display: flex;
  width: 100%;
  min-height: 100vh;
}
.login-brand {
  flex: 1;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 40px;
  text-align: center;
  min-height: 100vh;
}
.login-brand-logo { font-size: 64px; color: var(--red); margin-bottom: 20px; opacity: .9; }
.login-brand-name { font-size: 32px; font-weight: 900; color: #fff; letter-spacing: .5px; margin-bottom: 8px; }
.login-brand-tag { font-size: 14px; color: rgba(255,255,255,.55); margin-bottom: 24px; }
.login-brand-desc { font-size: 14px; color: rgba(255,255,255,.38); max-width: 320px; line-height: 1.7; }
.login-form-panel {
  width: 480px;
  flex-shrink: 0;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 24px;
  overflow-y: auto;
  min-height: 100vh;
}
@media (max-width: 800px) {
  .login-split { flex-direction: column; }
  .login-brand { min-height: 200px; padding: 32px 24px; }
  .login-form-panel { width: 100%; min-height: auto; }
}
.login-box {
  background: var(--surface);
  border-radius: 12px;
  padding: 36px 32px;
  width: 100%;
  max-width: 400px;
  box-shadow: 0 20px 60px rgba(0,0,0,.12);
}
.login-logo { text-align: center; margin-bottom: 28px; }
.login-logo .brand { font-size: 28px; font-weight: 900; color: var(--red); letter-spacing: .5px; }
.login-logo .tagline { font-size: 12px; color: var(--text3); margin-top: 4px; }
.login-title { font-size: 18px; font-weight: 700; color: var(--text); margin-bottom: 20px; text-align: center; }
.login-error { background: #f8d7da; color: #721c24; padding: 10px 14px; border-radius: 6px; font-size: 13px; margin-bottom: 16px; }
.demo-accounts { margin-top: 20px; border-top: 1px solid var(--border); padding-top: 16px; }
.demo-title { font-size: 11px; font-weight: 700; color: var(--text3); text-transform: uppercase; margin-bottom: 8px; }
.demo-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  margin-bottom: 4px;
  cursor: pointer;
  transition: background .15s;
}
.demo-item:hover { background: var(--bg); border-color: var(--red); }
.demo-item .di-role { font-size: 12px; font-weight: 700; color: var(--text); }
.demo-item .di-user { font-size: 11px; color: var(--text3); }
.demo-item .di-arrow { color: var(--text3); font-size: 11px; }

/* ===== NOTIFICATION PANEL ===== */
.notif-panel {
  position: absolute;
  top: calc(var(--header-h) + 4px);
  right: 16px;
  width: 340px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  z-index: 500;
  overflow: hidden;
}
.notif-header { padding: 12px 16px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
.notif-header-title { font-weight: 700; font-size: 14px; }
.notif-list { max-height: 360px; overflow-y: auto; }
.notif-item { padding: 12px 16px; border-bottom: 1px solid var(--border); cursor: pointer; transition: background .12s; }
.notif-item:hover { background: var(--surface2); }
.notif-item.unread { background: var(--red-light); }
.notif-item.unread:hover { background: #ffdcdc; }
.notif-item:last-child { border-bottom: none; }
.notif-msg { font-size: 13px; color: var(--text); }
.notif-time { font-size: 11px; color: var(--text3); margin-top: 3px; }
.notif-empty { padding: 32px; text-align: center; color: var(--text3); font-size: 13px; }

/* ===== TOAST ===== */
#toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}
.toast {
  background: var(--text);
  color: #fff;
  padding: 12px 18px;
  border-radius: 8px;
  font-size: 13px;
  box-shadow: 0 4px 16px rgba(0,0,0,.3);
  animation: toastIn .25s ease;
  max-width: 320px;
  display: flex;
  align-items: center;
  gap: 10px;
  pointer-events: all;
}
.toast.success { background: #1a7a4a; }
.toast.error   { background: var(--red); }
.toast.info    { background: #1a5c9e; }
@keyframes toastIn { from { opacity:0; transform:translateY(12px); } to { opacity:1; transform:none; } }

/* ===== DIVIDER / MISC ===== */
.divider { border: none; border-top: 1px solid var(--border); margin: 16px 0; }
.text-center { text-align: center; }
.text-muted { color: var(--text3); }
.fw-bold { font-weight: 700; }
.mt-4 { margin-top: 4px; }
.mt-8 { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.gap-8 { gap: 8px; }
.flex { display: flex; }
.flex-1 { flex: 1; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.btn-danger { background: var(--red); color: #fff; border: none; border-radius: 6px; padding: 8px 16px; font-weight: 600; transition: background .15s; }
.btn-danger:hover { background: var(--red-dark); }
.btn-success { background: #1a7a4a; color: #fff; border: none; border-radius: 6px; padding: 8px 16px; font-weight: 600; transition: background .15s; }
.btn-success:hover { background: #156038; }
.btn-warning { background: #e67e00; color: #fff; border: none; border-radius: 6px; padding: 8px 16px; font-weight: 600; transition: background .15s; }
.btn-warning:hover { background: #c06a00; }
.empty-state { text-align: center; padding: 48px 24px; color: var(--text3); }
.empty-state i { font-size: 40px; margin-bottom: 12px; display: block; }
.empty-state p { font-size: 14px; }
.pill-tabs { display: flex; gap: 4px; background: var(--bg); border-radius: 8px; padding: 4px; }
.pill-tab { padding: 6px 14px; border-radius: 6px; font-size: 13px; font-weight: 600; color: var(--text2); border: none; background: none; cursor: pointer; transition: background .15s; }
.pill-tab.active { background: var(--surface); color: var(--red); box-shadow: var(--shadow); }
.page-title { font-size: 20px; font-weight: 800; color: var(--text); margin-bottom: 4px; }
.page-sub   { font-size: 13px; color: var(--text3); margin-bottom: 20px; }
.stat-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; margin-bottom: 20px; }
.stat-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow); }
.stat-card .s-num  { font-size: 26px; font-weight: 800; color: var(--text); }
.stat-card .s-label{ font-size: 12px; color: var(--text3); margin-top: 2px; }
.stat-card .s-icon { font-size: 18px; color: var(--red); margin-bottom: 4px; }
hr.section-divider { border: none; border-top: 2px solid var(--border); margin: 20px 0; }
.remarks-box {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  color: var(--text);
  outline: none;
  resize: vertical;
  min-height: 90px;
  font-family: inherit;
  font-size: 13px;
}
.remarks-box:focus { border-color: var(--red); }
.tag { display: inline-block; padding: 2px 8px; border-radius: 10px; font-size: 11px; font-weight: 600; }
.tag-chapter { background: #eef2ff; color: #4338ca; }
.tag-industry { background: #f0fdf4; color: #166534; }
.required { color: var(--red); }
.info-banner { background: #e8f4fd; border: 1px solid #bee3f8; border-radius: 6px; padding: 10px 14px; font-size: 13px; color: #2b6cb0; display: flex; align-items: flex-start; gap: 8px; }
.warn-banner { background: #fffbeb; border: 1px solid #fcd34d; border-radius: 6px; padding: 10px 14px; font-size: 13px; color: #92400e; display: flex; align-items: flex-start; gap: 8px; }

/* ══════════════════════════════════════════════════════════
   5 MONTHS RENEWAL TRACKER — TRAFFIC LIGHT STYLES
   ══════════════════════════════════════════════════════════ */

.tl-wrap { padding: 0; }

.tl-page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 12px;
}
.tl-title {
  font-size: 20px;
  font-weight: 800;
  color: var(--text1);
  margin: 0 0 4px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.tl-title i { color: var(--red); }
.tl-subtitle { color: var(--text3); font-size: 13px; margin: 0; }

/* Traffic Light score pills */
.tl-score-pill {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 11.5px;
  border: 1.5px solid;
  min-width: 36px;
  text-align: center;
}
.tl-green  { background: #d1fae5; color: #065f46; border-color: #10b981; }
.tl-amber  { background: #fef3c7; color: #92400e; border-color: #f59e0b; }
.tl-red    { background: #fee2e2; color: #991b1b; border-color: #ef4444; }
.tl-grey   { background: #f3f4f6; color: #6b7280; border-color: #d1d5db; }

/* Legend dots */
.tl-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-right: 4px;
}
.tl-dot.tl-green  { background: #10b981; }
.tl-dot.tl-amber  { background: #f59e0b; }
.tl-dot.tl-red    { background: #ef4444; }

.tl-legend-item {
  display: flex;
  align-items: center;
  font-size: 12px;
  color: var(--text2);
}

/* Month tabs */
.tl-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 4px;
}
.tl-tab {
  padding: 6px 14px;
  border: 1.5px solid var(--border);
  border-radius: 6px;
  background: var(--surface1);
  color: var(--text2);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  display: flex;
  align-items: center;
  gap: 6px;
}
.tl-tab:hover { border-color: var(--red); color: var(--red); background: #fff8f8; }
.tl-tab.active { background: var(--red); color: #fff; border-color: var(--red); }
.tl-tab-badge {
  background: rgba(255,255,255,0.3);
  color: inherit;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 8px;
}
.tl-tab.active .tl-tab-badge { background: rgba(255,255,255,0.35); }

/* Rows due for renewal — highlight */
.tl-row-due td:first-child { border-left: 3px solid #ef4444; }

/* Table styling for TL */
.tl-table th { font-size: 11px; white-space: nowrap; }
.tl-table td { font-size: 12px; padding: 7px 8px; }

/* Upload drop zone */
.tl-drop-zone {
  border: 2px dashed var(--red);
  border-radius: 10px;
  background: #fff8f8;
  padding: 28px 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.15s;
}
.tl-drop-zone:hover {
  background: #fff0f0;
  border-color: #cc0000;
}

/* Upload preview success box */
.tl-preview-success {
  background: #ecfdf5;
  border: 1.5px solid #10b981;
  border-radius: 8px;
  padding: 14px 16px;
  margin-top: 8px;
}

/* Back button */
.btn-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border: 1.5px solid var(--border);
  border-radius: 6px;
  background: var(--surface1);
  color: var(--text2);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}
.btn-back:hover { border-color: var(--red); color: var(--red); }

/* Small action buttons */
.btn-sm {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 5px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  border: 1.5px solid;
  transition: all 0.15s;
}
.btn-sm.btn-primary  { background: var(--red); color: #fff; border-color: var(--red); }
.btn-sm.btn-primary:hover { background: #cc0000; }
.btn-sm.btn-secondary { background: var(--surface1); color: var(--text2); border-color: var(--border); }
.btn-sm.btn-secondary:hover { border-color: var(--red); color: var(--red); }
.btn-sm.btn-danger   { background: #fef2f2; color: #ef4444; border-color: #fca5a5; }
.btn-sm.btn-danger:hover { background: #fee2e2; }
