/* ============================================================
   GMS Church Task Management System
   styles.css — Mobile-First · Bento Grid · Strictly B&W
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* ─────────────────────────────────────────────
   CSS CUSTOM PROPERTIES
───────────────────────────────────────────── */
:root {
  /* Monochrome palette */
  --black:      #000000;
  --white:      #ffffff;
  --gray-50:    #fafafa;
  --gray-100:   #f5f5f5;
  --gray-150:   #eeeeee;
  --gray-200:   #e0e0e0;
  --gray-300:   #cccccc;
  --gray-400:   #aaaaaa;
  --gray-500:   #888888;
  --gray-600:   #555555;
  --gray-700:   #333333;
  --gray-800:   #222222;
  --gray-900:   #111111;

  /* Design tokens */
  --border:        1px solid var(--gray-700);
  --border-light:  1px solid var(--gray-200);
  --border-mid:    1px solid var(--gray-300);
  --radius:        4px;
  --radius-sm:     2px;

  /* Spacing */
  --gap:    10px;
  --pad:    16px;
  --pad-sm: 12px;

  /* Typography */
  --font:         'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --text-xs:      0.7rem;
  --text-sm:      0.8rem;
  --text-base:    0.9rem;
  --text-md:      1rem;
  --text-lg:      1.15rem;
  --text-xl:      1.4rem;
  --text-2xl:     1.8rem;
  --text-3xl:     2.4rem;

  /* Transitions */
  --transition: 0.15s ease;

  /* Nav height */
  --nav-h: 52px;
}

/* ─────────────────────────────────────────────
   CSS RESET
───────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html { scroll-behavior: smooth; }

body {
  font-family:      var(--font);
  font-size:        var(--text-base);
  background-color: var(--gray-100);
  color:            var(--gray-900);
  line-height:      1.55;
  -webkit-font-smoothing: antialiased;
  min-height:       100vh;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: inherit; }
input, textarea { font-family: inherit; }
ul, ol { list-style: none; }

/* ─────────────────────────────────────────────
   TYPOGRAPHY
───────────────────────────────────────────── */
h1 { font-size: var(--text-xl); font-weight: 700; letter-spacing: -0.02em; }
h2 { font-size: var(--text-lg); font-weight: 600; letter-spacing: -0.01em; }
h3 { font-size: var(--text-md); font-weight: 600; }
h4 { font-size: var(--text-base); font-weight: 600; }

.label-tag {
  font-size:      var(--text-xs);
  font-weight:    700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color:          var(--gray-500);
  margin-bottom:  var(--pad-sm);
  display:        block;
  padding-bottom: 8px;
  border-bottom:  var(--border-mid);
}

/* ─────────────────────────────────────────────
   TOP NAVIGATION
───────────────────────────────────────────── */
.top-nav {
  position:         sticky;
  top:              0;
  z-index:          100;
  height:           var(--nav-h);
  background:       var(--black);
  border-bottom:    1px solid var(--gray-800);
  display:          flex;
  align-items:      center;
  justify-content:  space-between;
  padding:          0 var(--pad);
}

.nav-brand {
  display:     flex;
  align-items: center;
  gap:         10px;
}

.nav-brand-mark {
  width:         30px;
  height:        30px;
  border:        1px solid var(--gray-600);
  border-radius: var(--radius-sm);
  display:       flex;
  align-items:   center;
  justify-content: center;
  font-weight:   700;
  font-size:     var(--text-sm);
  color:         var(--white);
  flex-shrink:   0;
}

.nav-brand-text {
  font-size:    var(--text-sm);
  font-weight:  600;
  color:        var(--white);
  letter-spacing: 0.02em;
}
.nav-brand-sub {
  font-size:  var(--text-xs);
  color:      var(--gray-400);
  font-weight: 400;
}

.nav-right {
  display:     flex;
  align-items: center;
  gap:         10px;
}

.nav-user-pill {
  font-size:     var(--text-xs);
  color:         var(--gray-300);
  padding:       4px 10px;
  border:        1px solid var(--gray-700);
  border-radius: 2px;
  max-width:     140px;
  overflow:      hidden;
  text-overflow: ellipsis;
  white-space:   nowrap;
}

.btn-logout {
  font-size:      var(--text-xs);
  font-weight:    600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color:          var(--gray-400);
  background:     transparent;
  border:         1px solid var(--gray-700);
  border-radius:  var(--radius-sm);
  padding:        5px 10px;
  transition:     color var(--transition), border-color var(--transition), background var(--transition);
}
.btn-logout:hover {
  color:        var(--black);
  background:   var(--white);
  border-color: var(--white);
}

/* ─────────────────────────────────────────────
   BENTO GRID — BASE
───────────────────────────────────────────── */
.bento-grid {
  display: grid;
  gap:     var(--gap);
  padding: var(--gap);
  min-height: calc(100vh - var(--nav-h));
  align-content: start;
}

/* Bento Box base */
.bento-box {
  background:   var(--white);
  border:       var(--border);
  border-radius: var(--radius);
  padding:      var(--pad);
  overflow:     hidden;
  transition:   border-color var(--transition);
  position:     relative;
}
.bento-box:hover { border-color: var(--black); }

/* ─────────────────────────────────────────────
   ADMIN GRID LAYOUT
───────────────────────────────────────────── */
.admin-grid {
  grid-template-columns: 1fr;
  grid-template-areas:
    "box-header"
    "box-actions"
    "box-approvals"
    "box-projects"
    "box-footer";
}

@media (min-width: 768px) {
  .admin-grid {
    grid-template-columns: 1fr 1fr;
    grid-template-areas:
      "box-header   box-actions"
      "box-approvals box-projects"
      "box-footer   box-footer";
  }
}

@media (min-width: 1100px) {
  .admin-grid {
    grid-template-columns: 1fr 1fr 260px;
    grid-template-rows: auto 1fr auto;
    grid-template-areas:
      "box-header   box-header   box-actions"
      "box-approvals box-projects box-projects"
      "box-footer   box-footer   box-footer";
    min-height: calc(100vh - var(--nav-h));
    align-content: stretch;
  }
  .admin-grid .box-projects { min-height: 400px; }
}

.box-header   { grid-area: box-header;   }
.box-actions  { grid-area: box-actions;  }
.box-approvals{ grid-area: box-approvals; overflow-y: auto; max-height: 520px; }
.box-projects { grid-area: box-projects; overflow-y: auto; max-height: 600px; }
.box-footer   { grid-area: box-footer;   }

/* ─────────────────────────────────────────────
   USER GRID LAYOUT
───────────────────────────────────────────── */
.user-grid {
  grid-template-columns: 1fr;
  grid-template-areas:
    "box-welcome"
    "box-available"
    "box-workspace"
    "box-todo"
    "box-footer";
}

@media (min-width: 768px) {
  .user-grid {
    grid-template-columns: 1fr 1fr;
    grid-template-areas:
      "box-welcome    box-available"
      "box-workspace  box-todo"
      "box-footer     box-footer";
  }
}

@media (min-width: 1100px) {
  .user-grid {
    grid-template-columns: 260px 1fr 1fr;
    grid-template-rows: auto auto auto;
    grid-template-areas:
      "box-welcome  box-available box-available"
      "box-workspace box-todo      box-todo"
      "box-footer   box-footer    box-footer";
    min-height: calc(100vh - var(--nav-h));
    align-content: stretch;
  }
}

.box-welcome   { grid-area: box-welcome;   }
.box-available { grid-area: box-available; overflow-y: auto; max-height: 450px; }
.box-workspace { grid-area: box-workspace; overflow-y: auto; max-height: 400px; }
.box-todo      { grid-area: box-todo;      min-height: 320px; }

/* ─────────────────────────────────────────────
   FOOTER BENTO BOX
───────────────────────────────────────────── */
.box-footer {
  background:      var(--black);
  border-color:    var(--black);
  text-align:      center;
  padding:         20px var(--pad);
}
.box-footer:hover { border-color: var(--gray-700); }

.footer-text {
  font-size:     var(--text-sm);
  color:         var(--gray-400);
  font-style:    italic;
  line-height:   1.7;
  max-width:     600px;
  margin:        0 auto;
}
.footer-text::before,
.footer-text::after { content: '"'; color: var(--gray-600); }

.footer-credit {
  margin-top:   8px;
  font-size:    var(--text-xs);
  color:        var(--gray-700);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* ─────────────────────────────────────────────
   STATS ROW (Admin header box)
───────────────────────────────────────────── */
.welcome-name {
  font-size:   var(--text-xl);
  font-weight: 700;
  margin-bottom: 4px;
  letter-spacing: -0.02em;
}
.welcome-role {
  font-size:  var(--text-xs);
  color:      var(--gray-500);
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: var(--pad);
}

.stats-row {
  display:   grid;
  grid-template-columns: repeat(3, 1fr);
  gap:       var(--gap);
  margin-top: var(--pad-sm);
}

.stat-card {
  border:        var(--border-mid);
  border-radius: var(--radius-sm);
  padding:       12px;
  text-align:    center;
  background:    var(--gray-50);
  transition:    border-color var(--transition), background var(--transition);
}
.stat-card:hover { border-color: var(--black); background: var(--white); }

.stat-num {
  display:     block;
  font-size:   var(--text-2xl);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.03em;
}
.stat-lbl {
  display:    block;
  font-size:  var(--text-xs);
  color:      var(--gray-500);
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-top: 3px;
}

/* ─────────────────────────────────────────────
   BUTTONS
───────────────────────────────────────────── */
.btn {
  display:        inline-flex;
  align-items:    center;
  justify-content: center;
  gap:            6px;
  font-size:      var(--text-sm);
  font-weight:    600;
  letter-spacing: 0.04em;
  border-radius:  var(--radius-sm);
  padding:        10px 16px;
  border:         var(--border);
  transition:     background var(--transition), color var(--transition),
                  transform var(--transition), border-color var(--transition);
  min-height:     44px; /* thumb-friendly */
  white-space:    nowrap;
}
.btn:hover   { transform: translateY(-1px); }
.btn:active  { transform: translateY(0);    }
.btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }

.btn-primary {
  background: var(--black);
  color:      var(--white);
  border-color: var(--black);
}
.btn-primary:hover { background: var(--gray-800); border-color: var(--gray-800); }

.btn-secondary {
  background: var(--white);
  color:      var(--gray-800);
}
.btn-secondary:hover { background: var(--gray-100); }

.btn-danger {
  background:  var(--white);
  color:       var(--gray-800);
  border-color: var(--gray-400);
}
.btn-danger:hover { background: var(--black); color: var(--white); border-color: var(--black); }

.btn-ghost {
  background:  transparent;
  color:       var(--gray-600);
  border-color: transparent;
  padding:     6px 10px;
  min-height:  auto;
  font-size:   var(--text-xs);
}
.btn-ghost:hover { background: var(--gray-100); color: var(--black); border-color: var(--gray-300); }

.btn-full { width: 100%; margin-bottom: 8px; }
.btn-full:last-child { margin-bottom: 0; }

.btn-sm {
  font-size:  var(--text-xs);
  padding:    6px 12px;
  min-height: 32px;
}

.btn-icon {
  background:     transparent;
  border:         none;
  color:          var(--gray-500);
  font-size:      var(--text-md);
  padding:        4px 8px;
  border-radius:  var(--radius-sm);
  transition:     color var(--transition), background var(--transition);
  cursor:         pointer;
  min-height:     32px;
  min-width:      32px;
  display:        flex;
  align-items:    center;
  justify-content: center;
}
.btn-icon:hover { color: var(--black); background: var(--gray-100); }

/* ─────────────────────────────────────────────
   STATUS BADGES
───────────────────────────────────────────── */
.badge {
  display:        inline-block;
  font-size:      var(--text-xs);
  font-weight:    700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius:  var(--radius-sm);
  padding:        3px 8px;
  white-space:    nowrap;
  border:         1px solid;
}

.badge-open      { color: var(--gray-500); border-color: var(--gray-300); background: var(--white); border-style: dashed; }
.badge-pending   { color: var(--gray-800); border-color: var(--gray-700); background: var(--gray-50); }
.badge-approved  { color: var(--white);    border-color: var(--black);    background: var(--black);   }
.badge-review    { color: var(--black);    border-color: var(--black);    background: var(--white);   letter-spacing: 0.1em; }
.badge-completed { color: var(--gray-400); border-color: var(--gray-200); background: var(--gray-100); text-decoration: line-through; }

/* Submit for Review Button — strictly B&W, distinct */
.btn-submit-review {
  background:   var(--white);
  color:        var(--black);
  border:       2px solid var(--black);
  font-weight:  700;
  letter-spacing: 0.06em;
  width:        100%;
  margin-top:   12px;
}
.btn-submit-review:hover:not(:disabled) {
  background: var(--black);
  color:      var(--white);
}

/* Complete Task (Admin) — inverted minimal */
.btn-complete-task {
  background:   var(--black);
  color:        var(--white);
  border:       2px solid var(--black);
  font-weight:  700;
  letter-spacing: 0.06em;
}
.btn-complete-task:hover { background: var(--gray-800); border-color: var(--gray-800); }

/* Locked checklist — user cannot interact after submitting for review */
.todo-item--locked {
  pointer-events: none;
  opacity: 0.6;
}
.todo-item--locked .todo-del { display: none; }
.todo-add-form--locked { display: none; }

/* ─────────────────────────────────────────────
   FORM ELEMENTS
───────────────────────────────────────────── */
.form-group {
  display:       flex;
  flex-direction: column;
  gap:           5px;
  margin-bottom: 12px;
}
.form-group:last-child { margin-bottom: 0; }

.form-label {
  font-size:      var(--text-xs);
  font-weight:    600;
  color:          var(--gray-600);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.input-field {
  width:         100%;
  padding:       10px 12px;
  border:        var(--border);
  border-radius: var(--radius-sm);
  font-size:     var(--text-base);
  background:    var(--white);
  color:         var(--black);
  transition:    border-color var(--transition), background var(--transition);
  min-height:    44px;
  outline:       none;
  -webkit-appearance: none;
}
.input-field:focus       { border-color: var(--black); background: var(--white); }
.input-field::placeholder { color: var(--gray-400); }

select.input-field {
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23555'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
  appearance: none;
}

.seamless-select {
  appearance: none;
  background: transparent;
  color: #1A3E26;
  font-weight: 800;
  font-size: 1.15rem;
  border: none;
  padding: 4px 24px 4px 6px;
  cursor: pointer;
  outline: none;
  background-image: url("data:image/svg+xml;utf8,<svg fill='%231A3E26' height='20' viewBox='0 0 24 24' width='20' xmlns='http://www.w3.org/2000/svg'><path d='M7 10l5 5 5-5z'/></svg>");
  background-repeat: no-repeat;
  background-position: right center;
  transition: background-color 0.2s, transform 0.2s;
  border-radius: 6px;
  margin: 0;
}
.seamless-select:hover, .seamless-select:focus {
  background-color: rgba(26, 62, 38, 0.08);
}
.seamless-select:active {
  transform: scale(0.98);
}

textarea.input-field {
  resize:    vertical;
  min-height: 80px;
  line-height: 1.5;
}

/* ─────────────────────────────────────────────
   TASK ITEMS
───────────────────────────────────────────── */
.task-list { display: flex; flex-direction: column; gap: 6px; }

.task-item {
  border:        var(--border-mid);
  border-radius: var(--radius-sm);
  padding:       12px;
  background:    var(--white);
  transition:    border-color var(--transition), background var(--transition);
  cursor:        default;
  position:      relative;
}
.task-item:hover { border-color: var(--black); background: var(--gray-50); }
.task-item.clickable { cursor: pointer; }
.task-item.active { border-color: var(--black); background: var(--gray-50); border-left: 3px solid var(--black); }

.task-pending {
  cursor: not-allowed !important;
}
.task-pending:hover {
  border-color: var(--border-mid) !important;
  background: var(--white) !important;
}
.task-pending > *:not(.task-item-top),
.task-pending .task-title {
  opacity: 0.5;
}

/* Tasks in review — clickable (to view checklist read-only) but visually distinct */
.task-in-review {
  cursor: pointer;
  border-left: 3px dashed var(--gray-500);
}

.task-item-top {
  display:         flex;
  align-items:     flex-start;
  justify-content: space-between;
  gap:             8px;
  margin-bottom:   4px;
}
.task-title {
  font-size:   var(--text-sm);
  font-weight: 600;
  line-height: 1.4;
  flex:        1;
}
.task-meta {
  display:   flex;
  flex-wrap: wrap;
  gap:       6px;
  align-items: center;
  margin-top: 5px;
}
.task-meta-text {
  font-size: var(--text-xs);
  color:     var(--gray-500);
}

/* Progress bar */
.todo-progress {
  height:        3px;
  background:    var(--gray-200);
  border-radius: 2px;
  margin-top:    8px;
  overflow:      hidden;
}
.todo-progress-fill {
  height:        100%;
  background:    var(--black);
  border-radius: 2px;
  transition:    width 0.3s ease;
}

/* ─────────────────────────────────────────────
   PROJECT ACCORDION
───────────────────────────────────────────── */
.project-group { margin-bottom: 10px; }
.project-group:last-child { margin-bottom: 0; }

.project-header {
  display:          flex;
  align-items:      center;
  justify-content:  space-between;
  padding:          10px 12px;
  background:       var(--gray-50);
  border:           var(--border-mid);
  border-radius:    var(--radius-sm);
  cursor:           pointer;
  transition:       background var(--transition), border-color var(--transition);
  gap:              8px;
}
.project-header:hover { background: var(--gray-100); border-color: var(--black); }
.project-header.expanded { border-color: var(--black); background: var(--black); color: var(--white); }
.project-header.expanded .project-header-meta { color: var(--gray-400); }

.project-name {
  font-size:   var(--text-sm);
  font-weight: 600;
  flex:        1;
  line-height: 1.3;
}
.project-header-meta {
  font-size:  var(--text-xs);
  color:      var(--gray-500);
  white-space: nowrap;
}

.project-tasks {
  border:        var(--border-mid);
  border-top:    none;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  padding:       8px;
  display:       none;
  flex-direction: column;
  gap:           5px;
  background:    var(--white);
}
.project-tasks.open { display: flex; }

/* ─────────────────────────────────────────────
   TODO LIST
───────────────────────────────────────────── */
.todo-panel {
  border-top:  var(--border-mid);
  margin-top:  12px;
  padding-top: 12px;
}
.todo-panel.hidden { display: none; }

.todo-panel-header {
  display:         flex;
  align-items:     center;
  justify-content: space-between;
  margin-bottom:   10px;
  gap:             8px;
}
.todo-panel-title {
  font-size:   var(--text-sm);
  font-weight: 600;
  overflow:    hidden;
  text-overflow: ellipsis;
  white-space:  nowrap;
  flex:         1;
}

.todo-list-items { display: flex; flex-direction: column; gap: 4px; margin-bottom: 10px; }

.todo-item {
  display:       flex;
  align-items:   flex-start;
  gap:           10px;
  padding:       8px 10px;
  border:        var(--border-light);
  border-radius: var(--radius-sm);
  background:    var(--white);
  transition:    background var(--transition), border-color var(--transition);
  cursor:        pointer;
  min-height:    44px;
}
.todo-item:hover { background: var(--gray-50); border-color: var(--gray-300); }
.todo-item.checked { background: var(--gray-50); }

/* Custom checkbox */
.todo-checkbox {
  flex-shrink:   0;
  width:         18px;
  height:        18px;
  border:        1.5px solid var(--gray-500);
  border-radius: 2px;
  background:    var(--white);
  display:       flex;
  align-items:   center;
  justify-content: center;
  margin-top:    2px;
  transition:    background var(--transition), border-color var(--transition);
  position:      relative;
}
.todo-item.checked .todo-checkbox {
  background:    var(--black);
  border-color:  var(--black);
}
.todo-item.checked .todo-checkbox::after {
  content:    '';
  width:      5px;
  height:     9px;
  border:     2px solid var(--white);
  border-top: none;
  border-left: none;
  transform:  rotate(45deg) translate(-1px, -1px);
}

.todo-desc {
  font-size:  var(--text-sm);
  flex:       1;
  line-height: 1.5;
  transition: color var(--transition);
}
.todo-item.checked .todo-desc {
  color:           var(--gray-400);
  text-decoration: line-through;
}

.todo-del {
  flex-shrink: 0;
  opacity:     0;
  transition:  opacity var(--transition);
}
.todo-item:hover .todo-del { opacity: 1; }

.todo-add-form {
  display:   flex;
  gap:       8px;
  margin-top: 8px;
}
.todo-add-form .input-field { flex: 1; }
.todo-add-form .btn         { flex-shrink: 0; }

.todo-empty {
  text-align:  center;
  padding:     20px;
  color:       var(--gray-400);
  font-size:   var(--text-sm);
  border:      1px dashed var(--gray-300);
  border-radius: var(--radius-sm);
}

/* ─────────────────────────────────────────────
   ACTION BOX PANEL
───────────────────────────────────────────── */
.action-divider {
  border: none;
  border-top: var(--border-light);
  margin: 12px 0;
}

.action-hint {
  font-size:  var(--text-xs);
  color:      var(--gray-400);
  text-align: center;
  margin-top: 6px;
  line-height: 1.5;
}

/* ─────────────────────────────────────────────
   MODAL
───────────────────────────────────────────── */
.modal-overlay {
  position:   fixed;
  inset:      0;
  background: rgba(0, 0, 0, 0.7);
  z-index:    200;
  display:    none;
  align-items: center;
  justify-content: center;
  padding:    var(--pad);
}
.modal-overlay.open { display: flex; }

.modal {
  background:    var(--white);
  border:        var(--border);
  border-radius: var(--radius);
  width:         100%;
  max-width:     480px;
  max-height:    90vh;
  overflow-y:    auto;
}

.modal-header {
  display:         flex;
  align-items:     center;
  justify-content: space-between;
  padding:         var(--pad);
  border-bottom:   var(--border-mid);
}
.modal-header h2 { font-size: var(--text-md); }

.modal-body    { padding: var(--pad); }
.modal-footer  { padding: var(--pad); border-top: var(--border-mid); display: flex; gap: 8px; justify-content: flex-end; }

/* ─────────────────────────────────────────────
   TOAST NOTIFICATIONS
───────────────────────────────────────────── */
#toast-container {
  position:      fixed;
  bottom:        20px;
  left:          50%;
  transform:     translateX(-50%);
  z-index:       999;
  display:       flex;
  flex-direction: column;
  align-items:   center;
  gap:           8px;
  pointer-events: none;
}

.toast {
  background:    var(--black);
  color:         var(--white);
  font-size:     var(--text-sm);
  font-weight:   500;
  padding:       10px 20px;
  border-radius: var(--radius-sm);
  border:        1px solid var(--gray-700);
  white-space:   nowrap;
  animation:     toastIn 0.2s ease, toastOut 0.3s ease 2.5s forwards;
  pointer-events: auto;
  max-width:     90vw;
  text-align:    center;
}
.toast.error {
  background:    var(--white);
  color:         var(--black);
  border-color:  var(--black);
}

@keyframes toastIn  { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes toastOut { from { opacity: 1; } to { opacity: 0; } }

/* ─────────────────────────────────────────────
   LOADING SPINNER
───────────────────────────────────────────── */
.loading-dots {
  display:    flex;
  gap:        5px;
  align-items: center;
  justify-content: center;
  padding:    20px;
  color:      var(--gray-400);
  font-size:  var(--text-xs);
}
.loading-dots::before { content: '●'; animation: blink 1s infinite 0s;    }
.loading-dots::after  { content: '●'; animation: blink 1s infinite 0.3s;  }
.loading-dot-mid      { animation: blink 1s infinite 0.15s !important; }

@keyframes blink { 0%, 100% { opacity: 0.2; } 50% { opacity: 1; } }

/* ─────────────────────────────────────────────
   EMPTY STATES
───────────────────────────────────────────── */
.empty-state {
  text-align:    center;
  padding:       28px 16px;
  color:         var(--gray-400);
  font-size:     var(--text-sm);
  border:        1px dashed var(--gray-200);
  border-radius: var(--radius-sm);
}
.empty-state-icon { font-size: 1.8rem; margin-bottom: 6px; opacity: 0.5; }

/* ─────────────────────────────────────────────
   LOGIN PAGE
───────────────────────────────────────────── */
.login-page {
  min-height:      100vh;
  background:      var(--gray-100);
  display:         flex;
  flex-direction:  column;
  align-items:     center;
  justify-content: center;
  padding:         var(--pad);
}

.login-card {
  background:    var(--white);
  border:        var(--border);
  border-radius: var(--radius);
  padding:       32px 28px;
  width:         100%;
  max-width:     400px;
}

.login-brand {
  display:       flex;
  align-items:   center;
  gap:           12px;
  margin-bottom: 24px;
}

.login-brand-mark {
  width:         44px;
  height:        44px;
  background:    var(--black);
  border-radius: var(--radius-sm);
  display:       flex;
  align-items:   center;
  justify-content: center;
  font-weight:   800;
  font-size:     1rem;
  color:         var(--white);
  letter-spacing: -0.02em;
  flex-shrink:   0;
}

.login-brand-info h1 {
  font-size:    var(--text-lg);
  margin-bottom: 2px;
}
.login-brand-info p {
  font-size:  var(--text-xs);
  color:      var(--gray-500);
  font-weight: 500;
}

.login-divider {
  border:      none;
  border-top:  var(--border-mid);
  margin:      0 0 20px;
}

.login-submit {
  width:      100%;
  margin-top: 4px;
}

.login-error {
  margin-top:    10px;
  padding:       10px 12px;
  background:    var(--gray-100);
  border:        var(--border);
  border-radius: var(--radius-sm);
  font-size:     var(--text-sm);
  color:         var(--gray-800);
  display:       none;
}
.login-error.show { display: block; }

.login-footer {
  margin-top:  var(--pad);
  text-align:  center;
  font-size:   var(--text-xs);
  color:       var(--gray-400);
}

/* ─────────────────────────────────────────────
   WELCOME BOX (User)
───────────────────────────────────────────── */
.announcement-area {
  margin-top:    12px;
  padding:       12px;
  background:    var(--gray-50);
  border:        var(--border-light);
  border-radius: var(--radius-sm);
  border-left:   3px solid var(--black);
}
.announcement-title {
  font-size:   var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color:        var(--gray-600);
  margin-bottom: 4px;
}
.announcement-text {
  font-size:  var(--text-sm);
  color:      var(--gray-700);
  line-height: 1.6;
}

.servo-chips { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 10px; }
.servo-chip {
  font-size:     var(--text-xs);
  font-weight:   600;
  letter-spacing: 0.04em;
  padding:       3px 10px;
  border:        var(--border);
  border-radius: 50px;
  background:    var(--black);
  color:         var(--white);
}

/* ─────────────────────────────────────────────
   SERVO ROLE PICKER
───────────────────────────────────────────── */

/* Secondary servo chip — outline pill, removable */
.servo-chip-secondary {
  display:        inline-flex;
  align-items:    center;
  gap:            4px;
  font-size:      var(--text-xs);
  font-weight:    600;
  letter-spacing: 0.04em;
  padding:        3px 6px 3px 10px;  /* tighter right padding for ✕ */
  border:         1px solid var(--gray-400);
  border-radius:  50px;
  background:     var(--white);
  color:          var(--gray-700);
  transition:     border-color var(--transition), color var(--transition), opacity 0.2s ease, transform 0.2s ease;
}
.servo-chip-secondary:hover { border-color: var(--gray-600); color: var(--gray-900); }

/* ✕ remove button inside secondary chip */
.servo-chip-remove {
  display:         inline-flex;
  align-items:     center;
  justify-content: center;
  background:      transparent;
  border:          none;
  color:           var(--gray-400);
  cursor:          pointer;
  font-size:       9px;
  font-weight:     800;
  line-height:     1;
  padding:         2px 3px;
  border-radius:   50%;
  min-width:       16px;
  min-height:      16px;
  transition:      background var(--transition), color var(--transition);
  flex-shrink:     0;
}
.servo-chip-remove:hover {
  background: var(--black);
  color:      var(--white);
}

/* Wrapper keeps the picker anchored below the button */
.servo-add-wrapper {
  position: relative;
  display:  inline-flex;
  align-items: center;
}

/* [ + ] button — minimal, dashed, pill-shaped */
.servo-add-btn {
  font-size:      var(--text-xs);
  font-weight:    700;
  letter-spacing: 0.04em;
  padding:        3px 9px;
  border:         1px dashed var(--gray-400);
  border-radius:  50px;
  background:     transparent;
  color:          var(--gray-500);
  cursor:         pointer;
  white-space:    nowrap;
  min-height:     26px;
  transition:     border-color var(--transition), color var(--transition), border-style var(--transition), background var(--transition);
}
.servo-add-btn:hover {
  border-color:  var(--black);
  border-style:  solid;
  color:         var(--black);
}
.servo-add-btn[aria-expanded="true"] {
  border-color:  var(--black);
  border-style:  solid;
  background:    var(--black);
  color:         var(--white);
}

/* Dropdown picker panel */
.servo-picker {
  position:      absolute;
  top:           calc(100% + 6px);
  left:          0;
  z-index:       60;
  background:    var(--white);
  border:        var(--border);
  border-radius: var(--radius-sm);
  min-width:     190px;
  overflow:      hidden;
  /* Entrance animation */
  animation:     pickerIn 0.12s ease;
}
.servo-picker.hidden { display: none; }

@keyframes pickerIn {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0);    }
}

.servo-picker-item {
  display:       block;
  width:         100%;
  padding:       10px 14px;
  font-size:     var(--text-sm);
  font-weight:   500;
  text-align:    left;
  background:    transparent;
  border:        none;
  border-bottom: var(--border-light);
  cursor:        pointer;
  color:         var(--gray-800);
  min-height:    44px;
  transition:    background var(--transition), color var(--transition);
}
.servo-picker-item:last-child { border-bottom: none; }
.servo-picker-item:hover      { background: var(--black); color: var(--white); }
.servo-picker-item:disabled   { opacity: 0.45; cursor: not-allowed; }

.servo-picker-empty {
  padding:    14px;
  font-size:  var(--text-xs);
  color:      var(--gray-400);
  text-align: center;
}

/* ─────────────────────────────────────────────
   SYSTEM LOGS (AUDIT TRAIL)
───────────────────────────────────────────── */
.logs-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 400px;
  overflow-y: auto;
  border: var(--border-light);
  border-radius: var(--radius-sm);
  padding: 8px;
  background: var(--gray-50);
}
.log-item {
  display: flex;
  flex-direction: column;
  padding: 10px;
  background: var(--white);
  border: var(--border-light);
  border-radius: var(--radius-sm);
  font-size: var(--text-sm);
  line-height: 1.4;
}
.log-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 6px;
  align-items: center;
}
.log-time {
  font-size: var(--text-xs);
  color: var(--gray-400);
}
.log-user {
  font-weight: 600;
  color: var(--black);
}
.log-action {
  font-size: var(--text-xs);
  background: var(--gray-100);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: monospace;
}
.log-desc {
  color: var(--gray-800);
}

/* ─────────────────────────────────────────────
   RESOURCES / REFERENSI
───────────────────────────────────────────── */
.resource-list-items {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}
.resource-pill {
  display: inline-flex;
  align-items: center;
  background: var(--white);
  border: var(--border-mid);
  border-radius: 16px;
  padding: 4px 10px;
  font-size: var(--text-xs);
  transition: border-color var(--transition), background var(--transition);
}
.resource-pill:hover {
  border-color: var(--black);
  background: var(--gray-50);
}
.resource-pill-link {
  color: var(--black);
  text-decoration: none;
  font-weight: 500;
  margin-right: 6px;
}
.resource-pill-link:hover {
  text-decoration: underline;
}
.resource-pill-del {
  color: var(--gray-500);
  cursor: pointer;
  padding: 0 4px;
  border-radius: 50%;
  font-size: 10px;
}
.resource-pill-del:hover {
  color: var(--danger);
  background: var(--gray-200);
}
.resource-add-form {
  display: flex;
  gap: 6px;
  margin-bottom: 16px;
}
.resource-add-form .input-field {
  min-height: 32px;
  padding: 0 10px;
  font-size: var(--text-xs);
}

/* ─────────────────────────────────────────────
   SCROLLBAR STYLING
───────────────────────────────────────────── */
::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: var(--gray-100); }
::-webkit-scrollbar-thumb { background: var(--gray-300); border-radius: 2px; }
::-webkit-scrollbar-thumb:hover { background: var(--gray-500); }

/* ─────────────────────────────────────────────
   UTILITY CLASSES
───────────────────────────────────────────── */
.hidden   { display: none !important; }
.flex     { display: flex; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.gap-sm   { gap: 6px; }
.mt-sm    { margin-top: 8px; }
.mt-md    { margin-top: 14px; }
.text-sm  { font-size: var(--text-sm); }
.text-xs  { font-size: var(--text-xs); }
.text-muted { color: var(--gray-500); }
.font-600 { font-weight: 600; }
.w-full   { width: 100%; }

/* ─────────────────────────────────────────────
   RESPONSIVE TWEAKS
───────────────────────────────────────────── */
@media (max-width: 400px) {
  .login-card { padding: 24px 16px; }
  .stats-row  { grid-template-columns: 1fr 1fr; }
  .stat-card:last-child { grid-column: span 2; }
}

@media (min-width: 768px) {
  :root { --pad: 20px; --gap: 12px; }
  h1    { font-size: var(--text-2xl); }
  .welcome-name { font-size: var(--text-2xl); }
}

@media (min-width: 1100px) {
  :root { --pad: 24px; }
}

/* ─────────────────────────────────────────────
   UNIFIED HOME PAGE (LANDING DASHBOARD)
───────────────────────────────────────────── */
.home-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--nav-h);
  background-color: var(--black);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--pad);
  z-index: 50;
}

.home-logo {
  font-size: var(--text-lg);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.hamburger-btn {
  background: none;
  border: none;
  color: var(--white);
  font-size: 1.5rem;
  padding: 4px;
}

/* Slide-out Drawer */
.drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  opacity: 1;
  transition: opacity 0.25s ease;
}
.drawer-overlay.hidden {
  display: none !important;
  opacity: 0;
  pointer-events: none;
}

.drawer-menu {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 280px;
  background: var(--white);
  z-index: 1001;
  transform: translateX(0);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  box-shadow: -4px 0 20px rgba(0,0,0,0.2);
}
.drawer-menu.hidden {
  display: none !important;
  transform: translateX(100%);
}

.drawer-header {
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--pad);
  border-bottom: var(--border-light);
}

.drawer-title {
  font-weight: 600;
  font-size: var(--text-md);
  color: var(--black);
}

.drawer-close {
  background: none;
  border: none;
  font-size: 1.2rem;
  padding: 4px;
  color: var(--gray-600);
}

.drawer-content {
  padding: var(--pad);
  flex: 1;
}

.drawer-profile {
  margin-bottom: var(--pad);
}
.drawer-user-name {
  font-weight: 700;
  font-size: var(--text-lg);
  color: var(--black);
}
.drawer-user-role {
  color: var(--gray-500);
  font-size: var(--text-sm);
}
.drawer-divider {
  border: none;
  border-top: var(--border-light);
  margin: var(--pad) 0;
}

/* Landing View */
.home-landing-view {
  padding-top: calc(var(--nav-h) + var(--pad));
  padding-bottom: 40px;
  max-width: 600px;
  margin: 0 auto;
}
.home-landing-view.hidden {
  display: none;
}

.home-section {
  margin-bottom: 32px;
}

.home-section-title {
  font-size: var(--text-md);
  font-weight: 700;
  padding: 0 var(--pad);
  margin-bottom: var(--pad-sm);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Hero Slider (16:9) */
.hero-slider {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  gap: var(--pad-sm);
  padding: 0 var(--pad);
  scrollbar-width: none;
}
.hero-slider::-webkit-scrollbar {
  display: none;
}

.hero-slide {
  flex: 0 0 85%;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius);
  background-color: var(--gray-300);
  scroll-snap-align: center;
  position: relative;
  overflow: hidden;
}
.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.hero-slide-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: var(--pad-sm);
  background: linear-gradient(transparent, rgba(0,0,0,0.8));
  color: var(--white);
}
.hero-slide-title {
  font-weight: 700;
  font-size: var(--text-md);
}

/* Event Grid (1:1) */
.event-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--gap);
  padding: 0 var(--pad);
}

.event-square {
  aspect-ratio: 1 / 1;
  border-radius: var(--radius);
  background-color: var(--gray-200);
  position: relative;
  overflow: hidden;
  cursor: pointer;
  transition: transform var(--transition);
}
.event-square img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.event-square:hover, .event-square:active {
  transform: scale(0.98);
}
.event-square-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(transparent 50%, rgba(0,0,0,0.7));
  display: flex;
  align-items: flex-end;
  padding: var(--pad-sm);
  color: var(--white);
  font-weight: 600;
  font-size: var(--text-sm);
}

/* Pelayanan Grid (Divisions) */
.pelayanan-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--gap);
  padding: 0 var(--pad);
}

.pelayanan-square {
  aspect-ratio: 1 / 1;
  border-radius: var(--radius);
  background-color: var(--black);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 8px;
  font-size: var(--text-xs);
  font-weight: 600;
  cursor: pointer;
  transition: transform var(--transition), background-color var(--transition);
}
.pelayanan-square:hover, .pelayanan-square:active {
  transform: scale(0.96);
  background-color: var(--gray-800);
}

/* Dashboard Wrapper Adjustment */
#dashboard-view {
  padding-top: calc(var(--nav-h) + var(--pad));
}

/* ─────────────────────────────────────────────
   GLOBAL WORKSPACE VIEW (gws-*)
───────────────────────────────────────────── */
.workspace-global-view {
  padding-top: calc(var(--nav-h) + var(--pad));
  padding-bottom: 40px;
  min-height: 100vh;
}
.workspace-global-view.hidden { display: none; }

/* Page header bar */
.gws-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 0 var(--pad) var(--pad);
  border-bottom: var(--border-mid);
  margin-bottom: var(--gap);
}
.gws-title {
  font-size: var(--text-xl);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.02em;
}
.gws-subtitle { margin-top: 2px; }

/* Two-column grid */
.gws-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  min-height: calc(100vh - 140px);
}

@media (min-width: 768px) {
  .gws-grid {
    grid-template-columns: 300px 1fr;
    gap: 0;
  }
}

@media (min-width: 1100px) {
  .gws-grid {
    grid-template-columns: 340px 1fr;
  }
}

/* Master list (left column) */
.gws-master {
  border-right: var(--border-mid);
  overflow-y: auto;
  max-height: calc(100vh - 140px);
  position: sticky;
  top: calc(var(--nav-h) + var(--pad));
  align-self: start;
  padding: var(--pad-sm) 0;
}

@media (max-width: 767px) {
  .gws-master {
    border-right: none;
    border-bottom: var(--border-mid);
    max-height: 50vh;
    position: static;
  }
}

/* Section label above list */
.gws-section-label {
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--gray-500);
  padding: 6px var(--pad);
  text-transform: uppercase;
}

.gws-task-list {
  display: flex;
  flex-direction: column;
}

/* Task card in master list */
.gws-task-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px var(--pad);
  border-bottom: var(--border-light);
  cursor: pointer;
  transition: background var(--transition);
  position: relative;
}
.gws-task-card:hover       { background: var(--gray-50); }
.gws-task-card.active      { background: var(--gray-50); border-left: 3px solid var(--black); }
.gws-task-card.task-review { border-left: 3px dashed var(--gray-500); }
.gws-task-card.task-completed {
  opacity: 0.55;
  cursor: default;
}
.gws-task-card.task-completed:hover { background: transparent; }

.gws-card-title {
  font-size: var(--text-sm);
  font-weight: 600;
  line-height: 1.4;
  flex: 1;
}
.gws-card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.gws-card-project {
  font-size: var(--text-xs);
  color: var(--gray-500);
}

/* History separator */
.gws-history-separator {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px var(--pad) 6px;
  margin-top: 8px;
}
.gws-history-separator::before,
.gws-history-separator::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--gray-300);
}
.gws-history-separator span {
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--gray-400);
  white-space: nowrap;
}

/* Detail column (right) */
.gws-detail {
  padding: var(--pad);
  overflow-y: auto;
}

/* Placeholder state */
.gws-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 300px;
  text-align: center;
  color: var(--gray-400);
  font-size: var(--text-sm);
  line-height: 1.6;
  border: 1px dashed var(--gray-200);
  border-radius: var(--radius);
}
.gws-placeholder-icon {
  font-size: 2.5rem;
  margin-bottom: 12px;
  opacity: 0.35;
}

/* Detail panel header */
.gws-detail-header {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: var(--border-mid);
}

/* ============================================================
   SUBNAV TABS & SPREADSHEET MODULE STYLES
   ============================================================ */

.subnav-bar {
  background: var(--white);
  border-bottom: 1px solid var(--gray-300);
  position: sticky;
  top: var(--nav-h);
  z-index: 90;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.subnav-container {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  overflow-x: auto;
  white-space: nowrap;
  -webkit-overflow-scrolling: touch;
}

.subnav-btn {
  background: transparent;
  border: 1px solid var(--gray-200);
  border-radius: 20px;
  padding: 6px 14px;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--gray-700);
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.subnav-btn:hover {
  background: var(--gray-100);
  border-color: var(--gray-400);
  color: var(--gray-900);
}

.subnav-btn.active {
  background: #5D3590;
  color: #ffffff;
  border-color: #5D3590;
  box-shadow: 0 2px 6px rgba(93, 53, 144, 0.3);
}

.tab-view-container {
  padding: 20px;
  max-width: 1400px;
  margin: 0 auto;
}

.tab-view-container.hidden {
  display: none !important;
}

/* Master Events Table (Purple Header) */
.sheet-card {
  background: var(--white);
  border-radius: 8px;
  border: 1px solid var(--gray-300);
  box-shadow: 0 4px 16px rgba(0,0,0,0.06);
  overflow: hidden;
  margin-bottom: 24px;
}

.sheet-header-purple {
  background: linear-gradient(135deg, #4A237A 0%, #5D3590 100%);
  color: var(--white);
  padding: 16px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.sheet-header-title {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-speaker-link {
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: var(--white);
  padding: 6px 12px;
  border-radius: 6px;
  font-size: var(--text-xs);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  backdrop-filter: blur(4px);
  transition: all 0.2s ease;
}

.btn-speaker-link:hover {
  background: rgba(255, 255, 255, 0.3);
}

.table-responsive {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.custom-sheet-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-sm);
  text-align: left;
}

.custom-sheet-table th {
  background: #5D3590;
  color: var(--white);
  font-weight: 700;
  padding: 12px 16px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
}

.custom-sheet-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--gray-200);
  border-right: 1px solid var(--gray-150);
  vertical-align: middle;
  color: var(--gray-800);
}

.custom-sheet-table tr:hover td {
  background: #F8F5FF;
}

/* Content Timeline (Mint Header & Progress Bar) */
.sheet-header-mint {
  background: linear-gradient(135deg, #BDE0C7 0%, #D4EADB 100%);
  color: #1A3E26;
  padding: 16px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  border-bottom: 1px solid #A8D1B3;
}

.sheet-header-mint th {
  background: #2E5C3B;
  color: var(--white);
}

.progress-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--white);
  padding: 8px 14px;
  border-radius: 20px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.06);
  border: 1px solid #A8D1B3;
}

.progress-banner-label {
  font-weight: 700;
  font-size: var(--text-xs);
  color: #1A3E26;
  text-transform: uppercase;
}

.progress-bar-outer {
  width: 140px;
  height: 12px;
  background: var(--gray-200);
  border-radius: 6px;
  overflow: hidden;
  position: relative;
}

.progress-bar-inner {
  height: 100%;
  background: linear-gradient(90deg, #10B981, #059669);
  transition: width 0.4s ease;
}

.progress-val-text {
  font-weight: 800;
  font-size: var(--text-sm);
  color: #059669;
}

/* Format Badges */
.format-pill {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--white);
}

.format-pill.reels { background: linear-gradient(135deg, #EF4444, #F97316); }
.format-pill.story { background: linear-gradient(135deg, #EAB308, #CA8A04); }
.format-pill.feed  { background: linear-gradient(135deg, #3B82F6, #1D4ED8); }
.format-pill.carousel { background: linear-gradient(135deg, #10B981, #047857); }

/* Material Tags */
.material-tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.65rem;
  font-weight: 700;
  margin-right: 6px;
}

.material-tag.promo { background: #E0E7FF; color: #3730A3; }
.material-tag.event { background: #FCE7F3; color: #9D174D; }
.material-tag.highlight { background: #FEF3C7; color: #92400E; }
.material-tag.recap { background: #F3E8FF; color: #6B21A8; }
.material-tag.ibadah { background: #D1FAE5; color: #065F46; }
.material-tag.regional { background: #CFFAFE; color: #155E75; }

/* Calendar Timeline Matrix */
.matrix-legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--white);
  border-radius: 8px;
  border: 1px solid var(--gray-300);
  margin-bottom: 16px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--gray-700);
}

.legend-dot {
  width: 12px;
  height: 12px;
  border-radius: 3px;
}

.legend-dot.promo { background: #22C55E; }
.legend-dot.eagle-kids { background: #F97316; }
.legend-dot.aog { background: #EF4444; }
.legend-dot.umum { background: #3B82F6; }
.legend-dot.special-event { background: #EC4899; }
.legend-dot.after-event { background: #06B6D4; }

.month-block {
  background: var(--white);
  border: 1px solid var(--gray-300);
  border-radius: 8px;
  margin-bottom: 16px;
  overflow: hidden;
}

.month-title-bar {
  background: var(--gray-200);
  padding: 10px 16px;
  font-weight: 700;
  font-size: var(--text-md);
  color: var(--gray-800);
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
}

.matrix-grid-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.75rem;
  table-layout: fixed;
}

.matrix-grid-table th {
  background: var(--gray-100);
  color: var(--gray-700);
  padding: 6px 4px;
  text-align: center;
  border: 1px solid var(--gray-300);
}

.matrix-grid-table td {
  height: 36px;
  border: 1px solid var(--gray-200);
  text-align: center;
  vertical-align: middle;
  position: relative;
  padding: 2px;
}

.matrix-bar {
  border-radius: 4px;
  padding: 4px 6px;
  color: var(--white);
  font-weight: 700;
  font-size: 0.65rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.matrix-bar.promo { background: #22C55E; }
.matrix-bar.eagle-kids { background: #F97316; }
.matrix-bar.aog { background: #EF4444; }
.matrix-bar.umum { background: #3B82F6; }
.matrix-bar.special-event { background: #EC4899; }
.matrix-bar.after-event { background: #06B6D4; }

.btn-archive-month {
  background: #DC2626;
  color: #FFFFFF;
  border: none;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: background 0.2s, transform 0.1s;
  box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}
.btn-archive-month:hover {
  background: #B91C1C;
  transform: translateY(-1px);
}
.btn-archive-month:active {
  transform: translateY(0);
}

/* Dynamic Calendar Matrix Headers & Cells */
.matrix-grid-table th.day-weekday {
  background: var(--gray-100);
  color: var(--gray-700);
  font-weight: 700;
  font-size: 0.7rem;
  padding: 4px 2px;
  border: 1px solid var(--gray-300);
}

.matrix-grid-table th.day-sat {
  background-color: #DC2626 !important;
  color: #FFFFFF !important;
  font-weight: 700;
  font-size: 0.7rem;
  padding: 4px 2px;
  border: 1px solid #B91C1C;
}

.matrix-grid-table th.day-sun {
  background-color: #2563EB !important;
  color: #FFFFFF !important;
  font-weight: 700;
  font-size: 0.7rem;
  padding: 4px 2px;
  border: 1px solid #1D4ED8;
}

.matrix-grid-table th.date-num {
  padding: 4px 2px;
  font-size: 0.75rem;
  border: 1px solid var(--gray-300);
}

.matrix-grid-table th.date-num.cur-month {
  color: var(--gray-900);
  background-color: #F8FAFC;
  font-weight: 700;
}

.matrix-grid-table th.date-num.other-month {
  color: #94A3B8;
  background-color: #F1F5F9;
  font-weight: 500;
  opacity: 0.7;
}

/* ─────────────────────────────────────────────
   PUSAT DATA DIREKTORI STYLES
───────────────────────────────────────────── */
.directory-category-card {
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.02);
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.directory-category-card:hover {
  box-shadow: 0 4px 14px rgba(0,0,0,0.05);
  border-color: #CBD5E1;
}

.directory-category-header {
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #FFFFFF;
}

.directory-category-title-wrap {
  display: flex;
  align-items: center;
  gap: 14px;
}

.directory-folder-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
}

.directory-category-name {
  font-weight: 800;
  font-size: 1.05rem;
  color: #0F172A;
  letter-spacing: -0.01em;
}

.directory-badge {
  font-size: 0.75rem;
  font-weight: 600;
  color: #475569;
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 999px;
  padding: 4px 14px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.03);
}

.directory-item-list {
  border-top: 1px solid #F1F5F9;
}

.directory-item-row {
  padding: 14px 20px 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid #F8FAFC;
  transition: background 0.15s ease;
}

.directory-item-row:hover {
  background: #F8FAFC;
}

.directory-item-title-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.9rem;
  color: #334155;
  font-weight: 600;
}

.directory-item-indicator {
  color: #94A3B8;
  font-size: 1rem;
}

.btn-visit-link {
  border: 1px solid #D1D5DB;
  border-radius: 8px;
  background: #FFFFFF;
  padding: 6px 16px;
  font-size: 0.8rem;
  font-weight: 600;
  color: #111827;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  transition: all 0.15s ease;
  box-shadow: 0 1px 2px rgba(0,0,0,0.03);
}

.btn-visit-link:hover {
  background: #F9FAFB;
  border-color: #9CA3AF;
  color: #000;
}

.btn-dir-action {
  background: none;
  border: none;
  color: #94A3B8;
  cursor: pointer;
  padding: 4px 6px;
  font-size: 0.95rem;
  border-radius: 6px;
  transition: color 0.15s, background 0.15s;
}

.btn-dir-action:hover {
  color: #0F172A;
  background: #F1F5F9;
}




