:root {
  --navy: #1b2559;
  --navy-dark: #10143a;
  --blue: #1878c6;
  --blue-light: #2f9bdb;
  --gold: #c9a24b;
  --bg: #f2f4f9;
  --card: #ffffff;
  --text: #1b1f2e;
  --muted: #6b7280;
  --border: #e6e9f2;
  --success: #189b56;
  --success-bg: #e6f7ee;
  --danger: #d64545;
  --danger-bg: #fdecec;
  --warn: #a9791a;
  --warn-bg: #fdf3de;
  --radius: 12px;
  --shadow-sm: 0 1px 2px rgba(16, 20, 58, 0.05), 0 1px 1px rgba(16, 20, 58, 0.03);
  --shadow-md: 0 8px 24px rgba(16, 20, 58, 0.08);
  --shadow-lg: 0 24px 60px rgba(16, 20, 58, 0.28);
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: 'Plus Jakarta Sans', 'Segoe UI', Roboto, -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }

.topbar {
  background: linear-gradient(120deg, var(--navy-dark) 0%, var(--navy) 60%, #1c2a66 100%);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1.75rem;
  box-shadow: var(--shadow-md);
  position: sticky;
  top: 0;
  z-index: 10;
}
.topbar .brand { display: flex; align-items: center; gap: 0.65rem; }
.topbar .brand img { height: 36px; filter: drop-shadow(0 2px 4px rgba(0,0,0,0.25)); }
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-title { font-weight: 700; font-size: 1.05rem; letter-spacing: -0.01em; }
.brand-role {
  font-size: 0.68rem; color: var(--navy-dark); font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em;
  background: var(--gold); display: inline-block; padding: 0.12rem 0.55rem; border-radius: 999px; margin-top: 0.2rem; width: fit-content;
}
.topbar nav { display: flex; align-items: center; }
.topbar nav a {
  color: #cfd9f0; margin-left: 1.15rem; font-size: 0.88rem; font-weight: 500;
  padding: 0.35rem 0; border-bottom: 2px solid transparent; transition: color 0.15s, border-color 0.15s;
}
.topbar nav a:hover { color: #fff; text-decoration: none; border-bottom-color: var(--gold); }
.topbar nav a.active { color: #fff; border-bottom-color: var(--gold); }

/* ---- Global search bar ---- */
.topbar-search { position: relative; flex: 1; max-width: 340px; margin: 0 1.2rem; }
.topbar-search input {
  width: 100%; padding: 0.5rem 0.9rem; border-radius: 999px; border: 1.5px solid rgba(255,255,255,0.2);
  background: rgba(255,255,255,0.1); color: #fff; font-size: 0.86rem;
}
.topbar-search input::placeholder { color: #a9b6d6; }
.topbar-search input:focus { outline: none; border-color: var(--gold); background: rgba(255,255,255,0.16); }
.search-dropdown {
  display: none; position: absolute; left: 0; right: 0; top: 100%; margin-top: 6px; background: #fff;
  border: 1px solid var(--border); border-radius: 10px; box-shadow: var(--shadow-lg); max-height: 320px; overflow-y: auto; z-index: 30;
}
.search-dropdown.open { display: block; }
.search-result-item {
  display: flex; flex-direction: column; padding: 0.6rem 1rem; border-bottom: 1px solid var(--border); color: var(--text);
}
.search-result-item:last-child { border-bottom: none; }
.search-result-item:hover { background: #eef4fb; text-decoration: none; }
.search-result-name { font-weight: 700; color: var(--navy); font-size: 0.9rem; }
.search-result-meta { font-size: 0.78rem; color: var(--muted); margin-top: 0.1rem; }
.search-dropdown .no-results { padding: 0.7rem 1rem; color: var(--muted); font-size: 0.85rem; }
.topbar .user-chip { color: #fff; font-size: 0.85rem; margin-left: 1.3rem; font-weight: 600; background: rgba(255,255,255,0.08); padding: 0.35rem 0.8rem; border-radius: 999px; }
.topbar form { display: inline; }
.topbar button.link-btn {
  background: none; border: none; color: #cfd9f0; cursor: pointer; font-size: 0.86rem; margin-left: 1rem; padding: 0; font-family: inherit;
}
.topbar button.link-btn:hover { color: #fff; text-decoration: underline; }

.container { max-width: 1150px; margin: 0 auto; padding: 1.8rem 1.6rem; }
.container.narrow { max-width: 560px; }

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-top: 3px solid var(--blue);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 1.25rem;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.15s;
}
.card:hover { box-shadow: var(--shadow-md); }
.card.stale-files-card { border-top-color: var(--warn); }
.card.table-card { padding: 0; overflow: auto; }
.card.table-card table { margin: 0; }
.card.table-card h2 { padding: 1.2rem 1.5rem 0; margin-bottom: 0.4rem; }

.grid { display: grid; gap: 1.1rem; }
.container > .grid { margin-bottom: 1.25rem; }
.grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid.cols-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 700px) {
  .grid.cols-2, .grid.cols-3, .grid.cols-4 { grid-template-columns: 1fr; }
}

.stat {
  background: var(--card);
  border: 1px solid var(--border);
  border-left: 4px solid var(--blue);
  border-radius: var(--radius);
  padding: 1.2rem 1.3rem;
  box-shadow: var(--shadow-sm);
}
.stat .num { font-size: 1.9rem; font-weight: 800; color: var(--navy); letter-spacing: -0.02em; }
.stat .label { color: var(--muted); font-size: 0.83rem; margin-top: 0.25rem; font-weight: 500; }

h1, h2, h3 { color: var(--navy); font-weight: 700; letter-spacing: -0.01em; }
h1 { font-size: 1.55rem; }
h2 { font-size: 1.1rem; margin: 0 0 0.9rem; }

table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
th, td { text-align: left; padding: 0.7rem 1rem; border-bottom: 1px solid var(--border); }
th { color: var(--muted); font-weight: 700; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.05em; background: #f8f9fd; }
tbody tr { transition: background 0.1s; }
tbody tr:hover td { background: #f7f9fd; }
tbody tr:last-child td { border-bottom: none; }
.row-link { color: var(--navy); font-weight: 600; }
.row-link:hover { color: var(--blue); text-decoration: none; }

.badge {
  display: inline-block; padding: 0.25rem 0.65rem; border-radius: 999px; font-size: 0.75rem; font-weight: 700;
  background: var(--blue); color: #fff; letter-spacing: 0.01em;
}
.badge.muted { background: #eef1f7; color: var(--navy); }
.badge.success { background: var(--success-bg); color: var(--success); }
.badge.warn { background: var(--warn-bg); color: var(--warn); }

label { display: block; font-size: 0.85rem; font-weight: 600; margin: 0.9rem 0 0.35rem; color: var(--navy); }
input[type=text], input[type=tel], input[type=password], input[type=date], input[type=email], input[type=number], input[type=month], input[type=time], select, textarea {
  width: 100%; padding: 0.6rem 0.75rem; border: 1.5px solid var(--border); border-radius: 8px; font-size: 0.94rem; font-family: inherit;
  background: #fff; transition: border-color 0.15s, box-shadow 0.15s; color: var(--text);
}
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(24, 120, 198, 0.12);
}
textarea { min-height: 80px; resize: vertical; }
.checkbox-row { display: flex; align-items: center; gap: 0.5rem; margin-top: 0.8rem; }
.checkbox-row input { width: auto; }

.checkbox-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 0.5rem 0.8rem;
  background: #f8f9fd; border: 1px solid var(--border); border-radius: 8px; padding: 0.9rem;
}
.checkbox-item { display: flex; align-items: center; gap: 0.4rem; font-size: 0.87rem; font-weight: 500; color: var(--text); margin: 0; cursor: pointer; }
.checkbox-item input { width: auto; margin: 0; accent-color: var(--blue); }

/* ---- Country multi-select chip picker ---- */
.country-picker {
  position: relative; border: 1.5px solid var(--border); border-radius: 8px; padding: 0.5rem 0.6rem; background: #fff;
}
.country-picker:focus-within { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(24, 120, 198, 0.12); }
.country-chips { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 0.3rem; }
.country-chip {
  display: inline-flex; align-items: center; gap: 0.4rem; background: var(--blue); color: #fff; font-size: 0.82rem;
  font-weight: 600; padding: 0.25rem 0.4rem 0.25rem 0.7rem; border-radius: 999px;
}
.country-chip button {
  background: rgba(255,255,255,0.25); border: none; color: #fff; width: 18px; height: 18px; border-radius: 50%;
  cursor: pointer; font-size: 0.8rem; line-height: 1; display: flex; align-items: center; justify-content: center; padding: 0;
}
.country-chip button:hover { background: rgba(255,255,255,0.4); }
#country-search { border: none; outline: none; padding: 0.35rem 0.2rem; width: 100%; font-size: 0.92rem; font-family: inherit; }
.country-dropdown {
  display: none; position: absolute; left: 0; right: 0; top: 100%; margin-top: 4px; background: #fff;
  border: 1px solid var(--border); border-radius: 8px; box-shadow: var(--shadow-md); max-height: 220px; overflow-y: auto; z-index: 20;
}
.country-dropdown.open { display: block; }
.country-option { padding: 0.55rem 0.9rem; cursor: pointer; font-size: 0.9rem; }
.country-option:hover, .country-option.highlighted { background: #eef4fb; }
.country-dropdown .no-results { padding: 0.55rem 0.9rem; color: var(--muted); font-size: 0.85rem; }

.duplicate-warning {
  margin-top: 0.4rem; padding: 0.55rem 0.8rem; border-radius: 7px; background: var(--warn-bg); color: var(--warn);
  font-size: 0.85rem; font-weight: 500;
}
.duplicate-warning a { color: var(--warn); text-decoration: underline; font-weight: 700; }

.btn {
  display: inline-block; padding: 0.6rem 1.2rem; border-radius: 8px; border: none; cursor: pointer;
  background: var(--blue); color: #fff; font-size: 0.92rem; font-weight: 700; font-family: inherit;
  box-shadow: 0 2px 6px rgba(24, 120, 198, 0.25); transition: background 0.15s, transform 0.1s, box-shadow 0.15s;
}
.btn:hover { background: var(--blue-light); text-decoration: none; box-shadow: 0 4px 12px rgba(24, 120, 198, 0.32); }
.btn:active { transform: translateY(1px); }
.btn.secondary { background: #eef1f7; color: var(--navy); box-shadow: none; }
.btn.secondary:hover { background: #e2e7f2; box-shadow: none; }
.btn.danger { background: var(--danger); box-shadow: 0 2px 6px rgba(214, 69, 69, 0.25); }
.btn.small { padding: 0.35rem 0.75rem; font-size: 0.8rem; }

.alert { padding: 0.75rem 1.1rem; border-radius: 8px; margin-bottom: 1.1rem; font-size: 0.9rem; font-weight: 500; }
.alert.error { background: var(--danger-bg); color: var(--danger); }
.alert.success { background: var(--success-bg); color: var(--success); }
.alert.warn { background: var(--warn-bg); color: var(--warn); }

.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: radial-gradient(circle at top left, #1c2a66, var(--navy-dark) 60%); padding: 1.5rem; }
.login-card { background: #fff; border-radius: 18px; padding: 2.5rem 2.2rem; width: 100%; max-width: 380px; box-shadow: var(--shadow-lg); text-align: center; }
.login-card img { height: 72px; margin-bottom: 1rem; }
.login-card h1 { margin-bottom: 1.5rem; font-size: 1.3rem; }
.login-card .btn { width: 100%; margin-top: 1.1rem; padding: 0.75rem; }

.timeline { list-style: none; padding: 0; margin: 1rem 0; }
.timeline li { position: relative; padding: 0 0 1.4rem 1.7rem; border-left: 2px solid var(--border); }
.timeline li:last-child { border-color: transparent; padding-bottom: 0; }
.timeline li::before { content: ''; position: absolute; left: -6.5px; top: 2px; width: 11px; height: 11px; border-radius: 50%; background: var(--blue); border: 2px solid #fff; box-shadow: 0 0 0 2px var(--blue); }
.timeline li.current::before { background: var(--success); box-shadow: 0 0 0 4px var(--success-bg), 0 0 0 2px var(--success); }
.timeline .stage-name { font-weight: 700; color: var(--navy); font-size: 0.98rem; }
.timeline .stage-date { color: var(--muted); font-size: 0.78rem; margin-top: 0.1rem; }
.timeline .stage-note { color: var(--text); font-size: 0.88rem; margin-top: 0.3rem; background: #f8f9fd; padding: 0.4rem 0.6rem; border-radius: 6px; display: inline-block; }

.track-hero { background: linear-gradient(135deg, var(--navy-dark), var(--navy) 70%); color: #fff; padding: 2.6rem 1.5rem; text-align: center; }
.track-hero img { height: 62px; margin-bottom: 0.7rem; filter: drop-shadow(0 4px 10px rgba(0,0,0,0.3)); }
.track-hero .status-pill { display: inline-block; margin-top: 0.8rem; background: rgba(255,255,255,0.14); border: 1px solid rgba(255,255,255,0.2); padding: 0.45rem 1.1rem; border-radius: 999px; font-weight: 600; font-size: 0.9rem; }

.progress-track { max-width: 340px; margin: 1.1rem auto 0; height: 8px; background: rgba(255,255,255,0.15); border-radius: 999px; overflow: hidden; }
.progress-track-fill { height: 100%; background: linear-gradient(90deg, var(--gold), #e6c877); border-radius: 999px; transition: width 0.4s ease; }

.search-card { max-width: 420px; margin: 0 auto 1.25rem; box-shadow: var(--shadow-lg); }

.stepper { list-style: none; margin: 0; padding: 0; }
.stepper-item { display: flex; gap: 1rem; position: relative; padding-bottom: 1.6rem; }
.stepper-item:last-child { padding-bottom: 0; }
.stepper-item::before {
  content: ''; position: absolute; left: 15px; top: 34px; bottom: 0; width: 2px; background: var(--border);
}
.stepper-item:last-child::before { display: none; }
.stepper-item.completed::before { background: var(--success); }
.stepper-marker {
  flex-shrink: 0; width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 0.95rem; font-weight: 700; background: #eef1f7; color: var(--muted); border: 2px solid var(--border); z-index: 1;
}
.stepper-item.completed .stepper-marker { background: var(--success); color: #fff; border-color: var(--success); }
.stepper-item.current .stepper-marker { background: var(--blue); color: #fff; border-color: var(--blue); box-shadow: 0 0 0 5px var(--success-bg); animation: pulse-current 2s infinite; }
@keyframes pulse-current {
  0% { box-shadow: 0 0 0 0 rgba(24, 120, 198, 0.35); }
  70% { box-shadow: 0 0 0 8px rgba(24, 120, 198, 0); }
  100% { box-shadow: 0 0 0 0 rgba(24, 120, 198, 0); }
}
.stepper-content { padding-top: 0.35rem; }
.stepper-name { font-weight: 700; color: var(--navy); font-size: 0.98rem; }
.stepper-item.upcoming .stepper-name { color: var(--muted); font-weight: 600; }
.stepper-date { color: var(--muted); font-size: 0.78rem; margin-top: 0.15rem; }
.stepper-note { color: var(--text); font-size: 0.86rem; margin-top: 0.35rem; background: #f8f9fd; padding: 0.4rem 0.65rem; border-radius: 6px; display: inline-block; }

.filters { display: flex; gap: 0.8rem; align-items: flex-end; flex-wrap: wrap; margin-bottom: 1.1rem; }
.filters > div { min-width: 170px; }
.filters label { margin-top: 0; }

.field-hint { color: var(--muted); font-size: 0.8rem; margin-top: 0.3rem; line-height: 1.5; }
.top-actions { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.2rem; flex-wrap: wrap; gap: 0.6rem; }

.pagination { display: flex; gap: 0.4rem; justify-content: center; margin: 1.2rem 0; flex-wrap: wrap; }
.page-link {
  display: inline-flex; align-items: center; justify-content: center; min-width: 36px; height: 36px;
  border-radius: 8px; background: var(--card); border: 1px solid var(--border); color: var(--navy);
  font-weight: 600; font-size: 0.88rem;
}
.page-link:hover { background: #eef1f7; text-decoration: none; }
.page-link.active { background: var(--blue); color: #fff; border-color: var(--blue); }

/* ---- Mobile / small-screen responsiveness ---- */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }

@media (max-width: 860px) {
  .topbar {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.7rem;
    padding: 0.85rem 1.1rem;
  }
  .topbar nav {
    flex-wrap: wrap;
    width: 100%;
    row-gap: 0.5rem;
  }
  .topbar-search { max-width: none; width: 100%; margin: 0; order: 3; }
  .topbar nav a { margin-left: 0; margin-right: 1rem; }
  .topbar .user-chip { margin-left: 0; margin-right: 0.6rem; }
  .topbar button.link-btn { margin-left: 0; }
}

@media (max-width: 700px) {
  .container { padding: 1.2rem 0.9rem; }
  .card { padding: 1.1rem; }
  .card.table-card table { min-width: 640px; } /* keeps columns readable; card scrolls horizontally */
  h1 { font-size: 1.3rem; }
  .filters { flex-direction: column; align-items: stretch; }
  .filters > div { min-width: 0; width: 100%; }
  .login-card { padding: 2rem 1.5rem; }
  .grid.cols-3 form,
  .grid.cols-2 form { flex-wrap: wrap; }
}

@media (max-width: 480px) {
  .topbar .brand-title { font-size: 0.95rem; }
  .stat .num { font-size: 1.5rem; }
  .btn { width: 100%; text-align: center; }
  .btn.small { width: auto; }
  table th, table td { padding: 0.55rem 0.6rem; font-size: 0.85rem; }
}

/* ---- Developer credit footer - present on every page ---- */
.site-footer {
  text-align: center;
  padding: 1.4rem 1rem;
  margin-top: 1.5rem;
  border-top: 1px solid var(--border);
  background: #f8f9fd;
}
.site-footer p {
  margin: 0;
  font-size: 0.8rem;
  color: var(--muted);
}
.site-footer a {
  color: var(--navy);
  font-weight: 700;
}
.site-footer a:hover { color: var(--blue); }

/* ---- Top-menu dropdowns ---- */
.nav-dd { position: relative; display: inline-flex; align-items: center; margin-left: 1.15rem; }
.topbar nav .nav-dd > a { margin-left: 0; }
.dd-toggle { background: none; border: 0; color: #cfd9f0; font: inherit; font-size: 0.88rem; font-weight: 500; cursor: pointer; padding: 0.35rem 0 0.35rem 0.3rem; border-bottom: 2px solid transparent; }
.dd-toggle.dd-label { padding-left: 0; }
.dd-toggle:hover, .dd-toggle.active { color: #fff; border-bottom-color: var(--gold); }
.dd-toggle .caret { font-size: 0.7rem; }
.dd-menu {
  display: none; position: absolute; top: 100%; left: 0; min-width: 190px; z-index: 30;
  background: #fff; border-radius: 10px; box-shadow: var(--shadow-md); padding: 0.4rem; margin-top: 0.35rem;
  border: 1px solid var(--border);
}
.dd-menu::before { content: ""; position: absolute; top: -0.45rem; left: 0; right: 0; height: 0.45rem; }
.nav-dd.open .dd-menu { display: block; }
@media (hover: hover) { .nav-dd:hover .dd-menu { display: block; } }
.topbar nav .dd-menu a {
  display: block; margin: 0; padding: 0.6rem 0.85rem; color: var(--text, #1a2140); border-radius: 7px;
  border-bottom: 0; font-size: 0.92rem; font-weight: 600;
}
.topbar nav .dd-menu a:hover { background: #eef2ff; color: var(--navy); }
.topbar nav .dd-menu a.active { background: #e4eaff; color: var(--navy); }
@media (max-width: 860px) {
  .nav-dd { margin-left: 0; margin-right: 1rem; flex-wrap: wrap; }
  .dd-menu { position: static; width: 100%; flex-basis: 100%; margin-top: 0.3rem; min-width: 0; }
  .nav-dd:hover .dd-menu { display: none; }
  .nav-dd.open .dd-menu { display: block; }
}

/* ---- Sheet View (Google-Sheet style master table) ---- */
.container.wide { max-width: 1500px; }
.sheet-card { overflow: auto; }
.sheet-table { font-size: 0.9rem; }
.sheet-table th { font-size: 0.72rem; padding: 0.7rem 0.85rem; position: sticky; top: 0; z-index: 2; }
.sheet-table td { padding: 0.6rem 0.85rem; vertical-align: middle; line-height: 1.4; }
.sheet-table td.nowrap { white-space: nowrap; }
.sheet-table td .row-link { font-weight: 700; }
.sheet-table tbody tr:hover td { background: #f3f6ff; }
.sheet-table tr.month-row td { background: var(--navy); color: #fff; font-weight: 700; font-size: 0.85rem; letter-spacing: 0.02em; padding: 0.45rem 0.85rem; }
.sheet-table tr.month-row:hover td { background: var(--navy); }
.sheet-line { margin-bottom: 0.3rem; }
.sheet-line:last-child { margin-bottom: 0; }
.muted-text { color: var(--muted); font-size: 0.88rem; }
.sheet-path { color: #3b4468; }
.inline-form { display: inline; margin: 0; }
.plain-list { margin: 0.4rem 0 0 1.1rem; line-height: 1.8; }
@media (max-width: 720px) { .sheet-table { min-width: 900px; } }

/* ---- Toast notifications ---- */
.toast-wrap { position: fixed; top: 74px; left: 50%; transform: translateX(-50%); z-index: 100; width: min(92vw, 460px); transition: opacity 0.3s, transform 0.3s; }
.toast-wrap.hide { opacity: 0; transform: translate(-50%, -10px); }
.toast { display: flex; align-items: center; justify-content: space-between; gap: 0.8rem; padding: 0.85rem 1.1rem; border-radius: 10px; font-weight: 600; font-size: 0.95rem; box-shadow: 0 8px 24px rgba(20, 30, 70, 0.22); border-left: 5px solid; }
.toast.success { background: #eaf8f0; color: #17603a; border-color: #2f9e62; }
.toast.error { background: #fdecec; color: #8f2424; border-color: #d64545; }
.toast-close { background: none; border: 0; font-size: 1.3rem; line-height: 1; cursor: pointer; color: inherit; }

/* ---- Tasks, targets, misc ---- */
.count-pill { display: inline-block; min-width: 1.15rem; padding: 0 0.35rem; margin-left: 0.35rem; border-radius: 999px; background: var(--danger); color: #fff; font-size: 0.7rem; font-weight: 800; line-height: 1.15rem; text-align: center; }
.install-btn { margin-left: 1rem; color: var(--gold); }
.tabs { display: flex; gap: 0.5rem; margin: 1.2rem 0 1rem; }
.tabs .tab { padding: 0.5rem 1.1rem; border-radius: 999px; background: #e9edf8; color: var(--navy); font-weight: 700; font-size: 0.9rem; }
.tabs .tab:hover { text-decoration: none; background: #dbe2f5; }
.tabs .tab.active { background: var(--navy); color: #fff; }
.task-card { border-left: 4px solid var(--gold); }
.task-card.done { border-left-color: var(--success); opacity: 0.92; }
.task-head { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; margin-bottom: 0.5rem; }
.task-by { color: var(--muted); font-size: 0.85rem; }
.task-message { font-size: 1.05rem; line-height: 1.6; margin: 0 0 0.7rem; white-space: pre-wrap; }
.task-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.empty-state { text-align: center; padding: 2rem 1rem; }
.progress { height: 10px; background: #e6eaf5; border-radius: 999px; overflow: hidden; margin-bottom: 0.25rem; }
.progress-bar { height: 100%; background: var(--navy); border-radius: 999px; transition: width 0.4s; }
.progress-bar.done { background: var(--success); }
.target-card { margin-bottom: 1.25rem; }
.target-input { width: 90px; }
.month-switch { display: flex; align-items: center; justify-content: space-between; max-width: 420px; margin: 0.5rem 0 1.2rem; gap: 1rem; }
.link-btn[hidden], .install-btn[hidden] { display: none; }

/* ---- QR codes & print card ---- */
.qr-row { display: flex; gap: 1rem; align-items: center; margin-top: 1.2rem; padding-top: 1rem; border-top: 1px solid var(--border); }
.qr-box { width: 120px; flex: none; padding: 6px; background: #fff; border: 1px solid var(--border); border-radius: 10px; }
.qr-box svg { display: block; width: 100%; height: auto; }
.qr-box.center { margin: 0.6rem auto; width: 170px; }
.qr-box.big { width: 260px; border: 2px solid var(--navy); }
.qr-card { max-width: 460px; margin: 0 auto; background: #fff; border: 2px solid var(--navy); border-radius: 16px; padding: 2rem 1.6rem; text-align: center; box-shadow: var(--shadow-md); }
.qr-card-logo { height: 64px; margin-bottom: 0.6rem; }
.qr-card-name { font-size: 1.25rem; font-weight: 800; color: var(--navy); margin: 0.2rem 0 0.6rem; }
.qr-card-text { color: #3b4468; font-size: 0.95rem; line-height: 1.55; margin: 0.8rem 0 0.4rem; }
.qr-card-link { font-weight: 700; color: var(--navy); word-break: break-all; font-size: 0.9rem; }
.qr-card-foot { color: var(--muted); font-size: 0.8rem; margin: 1rem 0 0; }
.sms-preview { background: #f3f5fb; border: 1px solid var(--border); border-radius: 8px; padding: 0.8rem 1rem; white-space: pre-wrap; font-family: inherit; font-size: 0.92rem; margin: 0.4rem 0 0.8rem; }
@media print {
  .topbar, .site-footer, .no-print, .toast-wrap { display: none !important; }
  body { background: #fff !important; }
  .container { padding: 0; }
  .qr-card { box-shadow: none; margin-top: 1cm; }
}
@media (max-width: 480px) { .qr-box.big { width: 220px; } }

/* ---- Daily report: SMS preview ---- */
.report-range { max-width: none; justify-content: flex-start; gap: 0.5rem; margin: 0.3rem 0 1.2rem; flex-wrap: wrap; }
.report-range .tab { padding: 0.5rem 1.1rem; border-radius: 999px; background: #e9edf8; color: var(--navy); font-weight: 700; font-size: 0.9rem; }
.report-range .tab:hover { text-decoration: none; background: #dbe2f5; }
.report-range .tab.active { background: var(--navy); color: #fff; }
.sms-phone { background: #eef1f9; border-radius: 18px; padding: 1.1rem 1rem 0.7rem; margin: 0.6rem 0 1rem; }
.sms-bubble { background: #fff; border-radius: 16px 16px 16px 4px; padding: 0.95rem 1.1rem; white-space: pre-wrap; line-height: 1.6; font-size: 0.98rem; color: #1b1f2e; box-shadow: 0 1px 3px rgba(20, 30, 70, 0.12); max-width: 360px; }
.sms-meta { color: var(--muted); font-size: 0.78rem; margin: 0.45rem 0 0 0.3rem; }
button.btn[disabled] { opacity: 0.5; cursor: not-allowed; box-shadow: none; }

/* ---- Top bar: keep the search box usable even with many menu items ---- */
.topbar-search { min-width: 170px; }
@media (max-width: 1400px) and (min-width: 861px) {
  .topbar { padding-left: 1.1rem; padding-right: 1.1rem; }
  .topbar nav a, .dd-toggle { font-size: 0.84rem; }
  .topbar nav a { margin-left: 0.8rem; }
  .nav-dd { margin-left: 0.8rem; }
  .brand-title { font-size: 0.95rem; }
  .topbar-search { margin: 0 0.8rem; }
  .install-btn { margin-left: 0.6rem; }
}

@media (max-width: 700px) {
  .grid.cols-3.stats-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 860px) {
  .topbar nav .nav-dd > a { margin-right: 0; }
}

/* ---- Student Agreement card ---- */
.agreement-card { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.2rem; border-top-color: var(--blue); }
.agreement-info { display: flex; align-items: flex-start; gap: 0.9rem; flex: 1 1 320px; min-width: 0; }
.agreement-info h2 { margin: 0 0 0.25rem; }
.agreement-info .field-hint { margin: 0; }
.agreement-icon { font-size: 1.8rem; line-height: 1; padding: 0.55rem; border-radius: 12px; background: rgba(0,0,0,0.04); }
.agreement-actions form { margin: 0; }
@media (max-width: 600px) { .agreement-actions, .agreement-actions .btn { width: 100%; } }

/* ---- Document Custody ---- */
.doc-summary-card { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.2rem; border-top-color: var(--gold); }
.doc-summary-card .agreement-actions .btn { white-space: nowrap; }
.stats-grid4 { margin-bottom: 1.2rem; }
.doc-student-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
.doc-student-strip span { display: block; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); font-weight: 600; }
.doc-student-strip strong { color: var(--navy); font-size: 0.98rem; word-break: break-word; }
.doc-pending { border-top-color: var(--gold); background: linear-gradient(180deg, #fffdf6, #fff); }
.doc-pending-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; flex-wrap: wrap; }
.doc-chips { list-style: none; padding: 0; margin: 1rem 0; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.doc-chips li { background: #eef1f7; border-radius: 999px; padding: 0.35rem 0.85rem; font-size: 0.85rem; color: var(--navy); }
.doc-chips li span { color: var(--muted); margin-left: 0.3rem; font-size: 0.78rem; }
.doc-otp-form { display: flex; align-items: flex-end; gap: 0.8rem; flex-wrap: wrap; margin-top: 0.4rem; }
.doc-otp-form .btn { padding: 0.75rem 1.6rem; }
.otp-input { font-size: 1.7rem !important; letter-spacing: 0.5em; text-align: center; font-weight: 700; width: 13rem; max-width: 100%; padding-left: 0.5em !important; }
.doc-pending-actions { display: flex; gap: 0.6rem; flex-wrap: wrap; margin-top: 1rem; }
.doc-pending-actions form { margin: 0; }
.doc-manual { margin-top: 1.1rem; border-top: 1px dashed var(--border); padding-top: 0.8rem; }
.doc-manual summary { cursor: pointer; color: var(--muted); font-size: 0.85rem; font-weight: 600; }
.doc-pick { display: flex; flex-direction: column; gap: 0.15rem; max-height: 440px; overflow: auto; padding-right: 0.3rem; }
.doc-pick-row { display: grid; grid-template-columns: 1fr 9.5rem 4.2rem; gap: 0.5rem; align-items: center; padding: 0.3rem 0; border-bottom: 1px solid var(--border); }
.doc-pick-row select, .doc-pick-row input[type=number], .doc-pick-row input[type=text] { padding: 0.4rem 0.5rem; font-size: 0.85rem; }
.doc-check { display: flex; align-items: center; gap: 0.55rem; margin: 0; font-weight: 600; cursor: pointer; }
.doc-check input, .doc-return-row input { width: auto; margin: 0; }
.doc-return-row { display: flex; align-items: center; gap: 0.6rem; margin: 0; padding: 0.55rem 0.2rem; border-bottom: 1px solid var(--border); font-weight: 500; cursor: pointer; }
.doc-return-row em { color: var(--muted); font-style: normal; font-size: 0.8rem; margin-left: 0.3rem; }
.doc-forms { margin-bottom: 1.2rem; }
.card-title-row { padding: 1.1rem 1rem 0.5rem; }
.card-title-row h2 { margin: 0; }
.empty-cell { text-align: center; color: var(--muted); padding: 1.6rem !important; }
@media (max-width: 700px) {
  .doc-student-strip { grid-template-columns: repeat(2, 1fr); }
  .doc-pick-row { grid-template-columns: 1fr 7.5rem 3.6rem; }
  .doc-otp-form .btn { width: 100%; }
  .doc-pending-actions .btn { width: auto; }
}

.nowrap { white-space: nowrap; }

@media (min-width: 1361px) { .topbar nav a { white-space: nowrap; } }
.doc-held-table td, .doc-held-table th { white-space: nowrap; }
@media (min-width: 1121px) and (max-width: 1360px) {
  .topbar nav a { margin-left: 0.8rem; font-size: 0.85rem; }
  .topbar-search { margin: 0 0.7rem; max-width: 260px; }
  .topbar .user-chip { margin-left: 0.8rem; }
}

/* Tablet widths: use the stacked top bar (nav now has more items) */
@media (min-width: 861px) and (max-width: 1120px) {
  .topbar { flex-direction: column; align-items: flex-start; gap: 0.7rem; padding: 0.85rem 1.1rem; }
  .topbar nav { flex-wrap: wrap; width: 100%; row-gap: 0.5rem; }
  .topbar-search { max-width: none; width: 100%; margin: 0; order: 3; }
  .topbar nav a { margin-left: 0; margin-right: 1rem; }
  .topbar .user-chip { margin-left: 0; margin-right: 0.6rem; }
  .topbar button.link-btn { margin-left: 0; }
}

/* ---- Dashboard: Documents in office ---- */
.dc-card { border-top-color: var(--gold); padding: 1.3rem 1.4rem; }
.dc-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.dc-title { display: flex; align-items: center; gap: 0.85rem; min-width: 0; }
.dc-icon { font-size: 1.5rem; line-height: 1; width: 2.9rem; height: 2.9rem; display: grid; place-items: center; border-radius: 14px; background: linear-gradient(135deg, #fbf3df, #f3e3b8); box-shadow: inset 0 0 0 1px rgba(201,162,75,0.35); flex: none; }
.dc-title h2 { margin: 0; font-size: 1.05rem; }
.dc-title p { margin: 0.1rem 0 0; color: var(--muted); font-size: 0.82rem; }
.dc-metrics { display: grid; grid-template-columns: repeat(4, 1fr); margin: 1.1rem 0 0.9rem; border: 1px solid var(--border); border-radius: 12px; overflow: hidden; background: #fbfcff; }
.dc-metric { padding: 0.85rem 1rem; border-right: 1px solid var(--border); }
.dc-metric:last-child { border-right: 0; }
.dc-metric strong { display: block; font-size: 1.6rem; line-height: 1.1; color: var(--navy); letter-spacing: -0.02em; font-weight: 800; }
.dc-metric span { color: var(--muted); font-size: 0.8rem; font-weight: 500; }
.dc-metric.is-pending strong { color: var(--warn); }
.dc-alerts { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.45rem; }
.dc-alerts li { display: flex; align-items: flex-start; gap: 0.6rem; padding: 0.6rem 0.85rem; border-radius: 10px; font-size: 0.87rem; background: var(--warn-bg); color: var(--warn); }
.dc-alerts li strong { font-weight: 800; }
.dc-dot { width: 9px; height: 9px; border-radius: 50%; background: currentColor; flex: none; margin-top: 0.4rem; }
.dc-ok { display: flex; align-items: center; gap: 0.6rem; margin: 0; padding: 0.6rem 0.85rem; border-radius: 10px; background: var(--success-bg); color: var(--success); font-size: 0.87rem; font-weight: 600; }
.dc-ok .dc-dot { margin-top: 0; }
@media (max-width: 640px) { .dc-metrics { grid-template-columns: repeat(2, 1fr); } .dc-metric:nth-child(2) { border-right: 0; } .dc-metric:nth-child(-n+2) { border-bottom: 1px solid var(--border); } .dc-head .btn { width: 100%; text-align: center; } }

/* ---- Tracking page: Your Documents ---- */
.dt-card { border-top-color: var(--gold); padding: 1.4rem 1.4rem 1.2rem; }
.dt-head { display: flex; align-items: center; gap: 0.9rem; }
.dt-icon { font-size: 1.6rem; line-height: 1; width: 3.1rem; height: 3.1rem; display: grid; place-items: center; border-radius: 15px; background: linear-gradient(135deg, #fbf3df, #f3e3b8); box-shadow: inset 0 0 0 1px rgba(201,162,75,0.35); flex: none; }
.dt-head h2 { margin: 0; font-size: 1.15rem; }
.dt-head p { margin: 0.15rem 0 0; color: var(--muted); font-size: 0.84rem; }
.dt-summary { display: grid; grid-template-columns: 1fr 1fr; gap: 0.7rem; margin: 1.1rem 0 0.4rem; }
.dt-sum { border: 1px solid var(--border); border-radius: 12px; padding: 0.7rem 0.95rem; background: #fbfcff; }
.dt-sum strong { display: block; font-size: 1.5rem; line-height: 1.1; color: var(--navy); font-weight: 800; }
.dt-sum span { color: var(--muted); font-size: 0.8rem; font-weight: 500; }
.dt-sum.on { background: var(--success-bg); border-color: #bfe8d0; }
.dt-sum.on strong { color: var(--success); }
.dt-group { margin: 1.2rem 0 0.55rem; font-size: 0.74rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.07em; color: var(--muted); }
.dt-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.6rem; }
.dt-item { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 0.85rem; padding: 0.8rem 0.9rem; border: 1px solid var(--border); border-radius: 14px; background: #fff; box-shadow: 0 1px 2px rgba(27,37,89,0.04); }
.dt-item.returned { background: #fafbfe; }
.dt-item.returned .dt-info strong { color: #5b647c; }
.dt-doc-icon { font-size: 1.3rem; width: 2.6rem; height: 2.6rem; display: grid; place-items: center; border-radius: 12px; background: #eef2fb; flex: none; }
.dt-item.returned .dt-doc-icon { filter: grayscale(0.8); opacity: 0.75; }
.dt-info { min-width: 0; }
.dt-info strong { display: block; color: var(--navy); font-size: 0.98rem; line-height: 1.25; }
.dt-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 0.3rem 0.4rem; margin-top: 0.3rem; }
.dt-chip { background: #eef1f7; color: var(--navy); border-radius: 999px; padding: 0.1rem 0.55rem; font-weight: 600; font-size: 0.74rem; }
.dt-date { margin-top: 0.3rem; color: var(--muted); font-size: 0.78rem; line-height: 1.5; }
.dt-ref { white-space: nowrap; font-variant-numeric: tabular-nums; color: #8a93a8; margin-left: 0.55rem; padding-left: 0.55rem; border-left: 1px solid var(--border); }
.dt-status { display: inline-flex; align-items: center; gap: 0.4rem; border-radius: 999px; padding: 0.3rem 0.75rem; font-size: 0.76rem; font-weight: 700; white-space: nowrap; }
.dt-status i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.dt-status.held { background: var(--success-bg); color: var(--success); }
.dt-status.done { background: #eef1f7; color: #6b7280; }
.dt-note { display: flex; gap: 0.7rem; margin-top: 1.2rem; padding: 0.85rem 1rem; border-radius: 12px; background: #f4f8ff; border: 1px solid #dbe8fb; color: #3d5a80; font-size: 0.84rem; line-height: 1.5; }
.dt-note p { margin: 0; }
@media (max-width: 520px) {
  .dt-card { padding: 1.1rem 1rem; }
  .dt-item { gap: 0.65rem; padding: 0.7rem 0.7rem; }
  .dt-status { padding: 0.25rem 0.6rem; font-size: 0.72rem; }
  .dt-ref { display: block; margin: 0.05rem 0 0; padding: 0; border: 0; }
  .dt-doc-icon { width: 2.3rem; height: 2.3rem; font-size: 1.15rem; }
}

/* ---- Documents: return date, dashboard due list, forms ---- */
.opt { color: var(--muted); font-weight: 500; }
.doc-notify { margin-top: 1rem; padding: 0.7rem 0.85rem; border: 1px solid var(--border); border-radius: 10px; background: #fbfcff; }
.doc-due-card { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; border-top-color: var(--gold); }
.doc-due-card.is-due { background: linear-gradient(180deg, #fff9ec, #fff); }
.doc-due-info h2 { margin: 0 0 0.3rem; }
.doc-due-date { margin: 0; font-weight: 700; color: var(--navy); display: flex; align-items: center; flex-wrap: wrap; gap: 0.5rem; }
.doc-due-actions { display: flex; gap: 0.6rem; flex-wrap: wrap; align-items: center; }
.doc-due-actions form { margin: 0; display: flex; gap: 0.4rem; align-items: center; }
.doc-due-form input[type=date], .doc-due-form select { width: auto; padding: 0.4rem 0.55rem; font-size: 0.85rem; }
.stats-auto { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 1rem; margin-bottom: 1.2rem; }
.stat.stat-warn { border-left-color: var(--warn); }
.stat.stat-warn .num { color: var(--warn); }
.dc-metric.is-due strong { color: var(--warn); }
.dc-due { margin: 0 0 0.9rem; }
.dc-due h3 { margin: 0 0 0.55rem; font-size: 0.74rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.07em; color: var(--muted); display: flex; align-items: center; gap: 0.5rem; }
.dc-count { background: var(--warn); color: #fff; border-radius: 999px; padding: 0.05rem 0.5rem; font-size: 0.72rem; letter-spacing: 0; }
.dc-due-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.55rem; }
.dc-due-list li { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; padding: 0.8rem 0.95rem; border: 1px solid var(--border); border-left: 4px solid var(--blue); border-radius: 12px; background: #fff; }
.dc-due-list li.over { border-left-color: var(--danger); background: #fffafa; }
.dc-due-list li.today { border-left-color: var(--warn); background: #fffcf5; }
.dc-due-main { min-width: 0; flex: 1 1 260px; }
.dc-due-name { font-weight: 700; color: var(--navy); }
.dc-due-docs { display: block; color: var(--muted); font-size: 0.82rem; margin-top: 0.1rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.dc-due-meta { display: flex; flex-wrap: wrap; gap: 0.35rem 0.8rem; margin-top: 0.35rem; font-size: 0.78rem; color: var(--muted); }
.dc-when { font-weight: 700; color: var(--blue); }
.dc-due-list li.over .dc-when { color: var(--danger); }
.dc-due-list li.today .dc-when { color: var(--warn); }
.dc-reminded { color: var(--success); font-weight: 600; }
.dc-due-actions { display: flex; gap: 0.5rem; align-items: center; flex-wrap: wrap; }
.dc-due-actions form { margin: 0; display: flex; gap: 0.35rem; align-items: center; }
.dc-extend select { width: auto; padding: 0.3rem 0.45rem; font-size: 0.8rem; }
.dc-more { display: inline-block; margin-top: 0.6rem; font-size: 0.84rem; font-weight: 600; }
@media (max-width: 640px) { .dc-due-actions { width: 100%; } .dc-due-actions form:first-child .btn { width: auto; } }

/* ---- Tracking page: collect documents ---- */
.dt-until { color: #3d7a55; border-left-color: #cfe7d8; }
.dt-collect { margin-top: 1.3rem; border: 1px solid #dbe8fb; border-radius: 14px; background: linear-gradient(180deg, #f6f9ff, #fff); padding: 1.1rem 1.15rem; }
.dt-collect-head { display: flex; gap: 0.8rem; align-items: flex-start; }
.dt-collect-icon { font-size: 1.3rem; width: 2.5rem; height: 2.5rem; display: grid; place-items: center; border-radius: 12px; background: #e6efff; flex: none; }
.dt-collect-head h3 { margin: 0 0 0.25rem; font-size: 1rem; color: var(--navy); }
.dt-collect-head p { margin: 0; color: #44526b; font-size: 0.86rem; line-height: 1.55; }
.dt-steps { list-style: none; margin: 1rem 0 0.2rem; padding: 0; display: flex; flex-direction: column; gap: 0.6rem; }
.dt-steps li { display: flex; align-items: flex-start; gap: 0.75rem; font-size: 0.86rem; color: #44526b; line-height: 1.5; }
.dt-steps li > span { flex: none; width: 1.6rem; height: 1.6rem; border-radius: 50%; background: var(--navy); color: #fff; display: grid; place-items: center; font-size: 0.78rem; font-weight: 700; margin-top: 0.05rem; }
.dt-steps strong { color: var(--navy); }
.dt-collect-foot { margin: 0.9rem 0 0; padding-top: 0.8rem; border-top: 1px dashed #cfdcf3; color: #5a6b86; font-size: 0.8rem; display: flex; gap: 0.4rem; }
.dt-collect-foot::before { content: '🔒'; }

/* ---- Student page: custom SMS + timeline side by side ---- */
.sms-timeline { align-items: start; }
.sms-timeline .span-all { grid-column: 1 / -1; }
.sms-form-foot { display: flex; align-items: center; justify-content: space-between; gap: 0.8rem; margin-top: 0.6rem; flex-wrap: wrap; }
.sms-form-foot .field-hint { margin: 0; }
.sms-recent-title { margin: 1.2rem 0 0.5rem; font-size: 0.74rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.07em; color: var(--muted); }
.sms-recent { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.5rem; }
.sms-recent li { padding: 0.65rem 0.85rem; border: 1px solid var(--border); border-radius: 12px; background: #fbfcff; }
.sms-recent-meta { display: flex; justify-content: space-between; align-items: center; gap: 0.5rem; color: var(--muted); font-size: 0.76rem; }
.sms-recent p { margin: 0.3rem 0 0; font-size: 0.86rem; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.timeline-scroll { max-height: 470px; overflow-y: auto; padding: 0.2rem 0.4rem 0.2rem 0.5rem; margin-right: -0.4rem; }
.timeline-card .timeline { margin: 0.6rem 0 0.2rem; }
@media (max-width: 800px) { .timeline-scroll { max-height: 380px; } }

/* ---- SMS balance ---- */
.sb-top { align-items: stretch; margin-bottom: 1.2rem; }
.sb-balance { border-top-color: var(--success); display: flex; flex-direction: column; align-items: flex-start; gap: 0.4rem; }
.sb-balance.is-low { border-top-color: var(--warn); background: linear-gradient(180deg, #fffaf0, #fff); }
.sb-balance.is-err { border-top-color: var(--danger); }
.sb-label { font-size: 0.74rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.07em; color: var(--muted); }
.sb-amount { font-size: 2.6rem; font-weight: 800; letter-spacing: -0.03em; color: var(--navy); line-height: 1.1; }
.sb-amount span { font-size: 1.5rem; margin-right: 0.15rem; color: var(--muted); font-weight: 700; }
.sb-amount.sb-na { font-size: 1.6rem; color: var(--danger); }
.sb-balance.is-low .sb-amount { color: var(--warn); }
.sb-error { margin: 0; color: var(--danger); font-size: 0.88rem; }
.sb-checked { margin: 0.5rem 0 0; color: var(--muted); font-size: 0.78rem; }
.sb-stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.7rem; margin: 0.9rem 0; }
.sb-stat-grid > div { border: 1px solid var(--border); border-radius: 12px; padding: 0.7rem 0.9rem; background: #fbfcff; }
.sb-stat-grid strong { display: block; font-size: 1.5rem; color: var(--navy); line-height: 1.1; }
.sb-stat-grid span { color: var(--muted); font-size: 0.78rem; }
.sb-stat-grid .bad strong { color: var(--warn); }
.sb-switch { margin: 0; font-size: 0.88rem; color: var(--muted); }
.sb-msg { max-width: 420px; font-size: 0.85rem; color: #44526b; }
@media (max-width: 520px) { .sb-stat-grid { grid-template-columns: 1fr; } .sb-amount { font-size: 2.1rem; } }

/* sms + timeline row: prevent grid blowout on small screens */
.sms-timeline>*{min-width:0}
@media(max-width:760px){.sms-timeline{grid-template-columns:minmax(0,1fr)!important}}

/* tracking page: compact collection note */
.dt-collect { padding: 0.85rem 1rem; }
.dt-collect-note { margin: 0; display: flex; gap: 0.55rem; align-items: flex-start; color: #44526b; font-size: 0.86rem; line-height: 1.55; }
.dt-collect-foot { margin-top: 0.7rem; padding-top: 0.65rem; }
.dt-until { color: #a06a00; border-left-color: #f0dfb8; }
.doc-due-docs { margin: 0 0 0.3rem; color: #44526b; font-size: 0.9rem; }
.doc-out-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; align-items: center; }
.doc-out-actions form { margin: 0; display: flex; gap: 0.4rem; align-items: center; }
.doc-out-card { margin-top: 1.2rem; }
.doc-out-card .card-title-row { padding: 1rem 1.25rem 0.2rem; }

/* Status Timeline matches the Custom SMS card height and scrolls inside itself */
@media (min-width: 761px) {
  .sms-timeline { align-items: stretch; }
  .sms-timeline > .timeline-card:not(.span-all) { contain: size; display: flex; flex-direction: column; min-height: 320px; overflow: hidden; }
  .sms-timeline > .timeline-card:not(.span-all) .timeline-scroll { flex: 1 1 auto; min-height: 0; max-height: none; }
}

/* ---- Top bar: grouped Settings menu and profile menu ---- */
.dd-group { font-size: 0.68rem; font-weight: 800; letter-spacing: 0.07em; text-transform: uppercase; color: #8a93a8; padding: 0.55rem 0.85rem 0.2rem; }
.dd-group:first-child { padding-top: 0.25rem; }
.dd-menu.dd-wide { min-width: 210px; }
.dd-menu.dd-right { left: auto; right: 0; min-width: 190px; }
.nav-user { margin-left: 1.3rem; }
.nav-user .user-btn { display: inline-flex; align-items: center; gap: 0.5rem; background: rgba(255,255,255,0.08); border: 0; border-radius: 999px; padding: 0.25rem 0.7rem 0.25rem 0.3rem; color: #fff; font-weight: 600; font-size: 0.85rem; }
.nav-user .user-btn:hover { background: rgba(255,255,255,0.15); }
.user-avatar { width: 1.7rem; height: 1.7rem; border-radius: 50%; background: var(--gold); color: var(--navy); display: grid; place-items: center; font-weight: 800; font-size: 0.8rem; }
.user-name { max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dd-profile { padding: 0.55rem 0.85rem 0.6rem; border-bottom: 1px solid var(--border); margin-bottom: 0.3rem; display: flex; flex-direction: column; gap: 0.1rem; }
.dd-profile strong { color: var(--navy); font-size: 0.92rem; }
.dd-profile span { color: #8a93a8; font-size: 0.78rem; }
.dd-item { display: block; width: 100%; text-align: left; background: none; border: 0; font: inherit; font-size: 0.92rem; font-weight: 600; color: var(--text, #1a2140); padding: 0.6rem 0.85rem; border-radius: 7px; cursor: pointer; }
.dd-item:hover { background: #eef2ff; color: var(--navy); }
.dd-item[hidden] { display: none; }
.dd-logout { color: #b3261e; }
.dd-logout:hover { background: #fdecea; color: #b3261e; }
.nav-user form { margin: 0; }
@media (max-width: 1120px) {
  .nav-user { margin-left: 0; margin-right: 0.6rem; }
  .dd-menu.dd-right { left: 0; right: auto; }
}

/* ---- SMS Center ---- */
.smc-card { margin-bottom: 1.2rem; }
.smc-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; flex-wrap: wrap; margin-bottom: 0.6rem; }
.smc-head h2 { margin-bottom: 0.2rem; }
.smc-pill { background: #eef2ff; color: var(--navy); font-weight: 700; font-size: 0.8rem; padding: 0.35rem 0.8rem; border-radius: 999px; }
.smc-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1.6rem; margin-top: 0.6rem; }
.smc-col { min-width: 0; }
.smc-step { display: flex; align-items: center; gap: 0.55rem; margin: 0 0 0.6rem; font-size: 1rem; color: var(--navy); }
.smc-step span { width: 1.5rem; height: 1.5rem; border-radius: 50%; background: var(--navy); color: #fff; font-size: 0.78rem; display: grid; place-items: center; }
.smc-col textarea { resize: vertical; min-height: 130px; }
.smc-meta { display: flex; justify-content: space-between; gap: 0.6rem; flex-wrap: wrap; font-size: 0.8rem; color: var(--muted); margin-top: 0.3rem; }
.smc-parts { font-weight: 700; color: var(--navy); }
.smc-tip { margin: 0.5rem 0 0; }
.smc-tip code { background: #eef2ff; padding: 0.05rem 0.35rem; border-radius: 5px; font-size: 0.85em; }
.smc-modes { display: grid; gap: 0.5rem; margin-bottom: 0.8rem; }
.smc-mode { display: flex; align-items: flex-start; gap: 0.6rem; border: 1px solid var(--border); border-radius: 12px; padding: 0.7rem 0.9rem; cursor: pointer; background: #fbfcff; margin: 0; }
.smc-mode:has(input:checked) { border-color: var(--blue); background: #eef5ff; }
.smc-mode input { margin-top: 0.25rem; width: auto; }
.smc-mode strong { display: block; color: var(--navy); font-size: 0.92rem; }
.smc-mode small { color: var(--muted); font-size: 0.78rem; }
.smc-search-row { display: flex; gap: 0.5rem; }
.smc-search-row input { flex: 1; min-width: 0; }
.smc-search-row select { width: auto; max-width: 150px; }
.smc-results { border: 1px solid var(--border); border-radius: 12px; margin-top: 0.6rem; max-height: 240px; overflow: auto; background: #fff; }
.smc-row { display: flex; justify-content: space-between; align-items: center; gap: 0.6rem; padding: 0.5rem 0.75rem; border-bottom: 1px solid #eef0f6; }
.smc-row:last-child { border-bottom: 0; }
.smc-row-info { min-width: 0; }
.smc-row-info strong { display: block; font-size: 0.88rem; color: var(--navy); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.smc-row-info span { font-size: 0.76rem; color: var(--muted); }
.smc-empty { padding: 1rem; text-align: center; color: var(--muted); font-size: 0.85rem; }
.smc-results-foot { display: flex; justify-content: space-between; align-items: center; gap: 0.6rem; margin-top: 0.4rem; }
.smc-chosen-head { display: flex; justify-content: space-between; align-items: center; margin-top: 0.7rem; font-size: 0.88rem; color: var(--navy); }
.smc-chosen { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.4rem; max-height: 130px; overflow: auto; padding: 0.1rem; }
.smc-chip { display: inline-flex; align-items: center; gap: 0.35rem; background: #e8f1fd; color: var(--navy); border-radius: 999px; padding: 0.2rem 0.3rem 0.2rem 0.7rem; font-size: 0.8rem; font-weight: 600; }
.smc-chip button { border: 0; background: rgba(27,37,89,0.12); color: var(--navy); width: 1.3rem; height: 1.3rem; border-radius: 50%; cursor: pointer; line-height: 1; padding: 0; font-size: 0.95rem; }
.smc-chip button:hover { background: rgba(27,37,89,0.25); }
.smc-exclude { margin-top: 0; }
.smc-summary { display: flex; gap: 1rem; flex-wrap: wrap; margin: 1.2rem 0 0.6rem; }
.smc-summary > div { flex: 1; min-width: 150px; border: 1px solid var(--border); border-radius: 12px; padding: 0.7rem 1rem; background: #fbfcff; }
.smc-summary strong { display: block; font-size: 1.6rem; color: var(--navy); line-height: 1.1; }
.smc-summary span { color: var(--muted); font-size: 0.8rem; }
.smc-confirm { margin: 0.8rem 0 0.9rem; }
.smc-ok { color: #1f8a57; font-weight: 700; font-size: 0.88rem; }
.smc-bad { display: block; color: var(--warn); font-size: 0.8rem; font-weight: 600; }
.smc-bar { height: 6px; background: #e8ecf6; border-radius: 999px; overflow: hidden; margin-top: 0.4rem; min-width: 90px; }
.smc-bar span { display: block; height: 100%; background: var(--blue); transition: width 0.4s; }
#smc-history { margin-bottom: 1.2rem; }
@media (max-width: 860px) { .smc-grid { grid-template-columns: minmax(0, 1fr); } .smc-search-row { flex-direction: column; } .smc-search-row select { max-width: none; width: 100%; } }
.smc-chosen-head .link-btn { background: none; border: 0; color: var(--blue); font: inherit; font-size: 0.82rem; font-weight: 600; cursor: pointer; padding: 0; }
.smc-chosen-head .link-btn:hover { text-decoration: underline; }

/* ---- Documents: tabs + Document Preparation ---- */
.doc-tabs { display: inline-flex; gap: 0.3rem; background: #eef1f9; border-radius: 12px; padding: 0.25rem; margin: 0 0 1.1rem; }
.doc-tabs a { padding: 0.5rem 1.1rem; border-radius: 9px; font-weight: 700; font-size: 0.88rem; color: #5a6b86; }
.doc-tabs a:hover { color: var(--navy); text-decoration: none; }
.doc-tabs a.active { background: #fff; color: var(--navy); box-shadow: 0 1px 4px rgba(27,37,89,0.12); }
.badge.dp-pending { background: var(--warn-bg); color: var(--warn); }
.badge.dp-in_progress { background: #e4f0fd; color: #14639f; }
.badge.dp-completed { background: var(--success-bg); color: var(--success); }
.badge.dp-queued { background: #eef0f8; color: #4b5a85; }
.badge.dp-on_hold { background: #fde8e8; color: #b03a3a; }
.badge.dp-not_required { background: #f0f1f4; color: #7b8498; }
.dp-card { border-top-color: var(--gold); margin-top: 1.2rem; }
.dp-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; flex-wrap: wrap; margin-bottom: 0.8rem; }
.dp-head h2 { margin-bottom: 0.2rem; }
.dp-list { display: grid; gap: 0.6rem; margin-bottom: 1rem; }
.dp-item { display: flex; justify-content: space-between; align-items: center; gap: 0.9rem 1.2rem; flex-wrap: wrap; border: 1px solid var(--border); border-left: 4px solid #d3d9e8; border-radius: 12px; padding: 0.75rem 1rem; background: #fff; }
.dp-item-pending { border-left-color: var(--warn); }
.dp-item-in_progress { border-left-color: var(--blue); }
.dp-item-completed { border-left-color: #2fb67c; background: #fafdfb; }
.dp-item-queued { border-left-color: #8a96bd; }
.dp-item-on_hold { border-left-color: #d95b5b; }
.dp-item-not_required { border-left-color: #c9cedb; background: #f8f9fb; opacity: 0.8; }
.dp-item-main { min-width: 220px; flex: 1; }
.dp-item-main strong { color: var(--navy); }
.dp-item-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem 0.6rem; margin-top: 0.3rem; }
.dp-note { margin-top: 0.3rem; font-size: 0.8rem; color: #6b7894; }
.dp-late { color: var(--warn); }
.dp-item-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }
.dp-inline { display: flex; gap: 0.4rem; align-items: center; margin: 0; flex-wrap: wrap; }
.dp-inline select, .dp-inline input[type=date] { width: auto; padding: 0.4rem 0.55rem; font-size: 0.85rem; }
.dp-notify { display: inline-flex; align-items: center; gap: 0.25rem; margin: 0; font-size: 0.8rem; font-weight: 600; color: #5a6b86; white-space: nowrap; }
.dp-notify input { width: auto; margin: 0; }
.dp-empty { padding: 0.6rem 0 1rem; }
.dp-add { border-top: 1px dashed var(--border); padding-top: 0.9rem; }
.dp-add summary { cursor: pointer; font-weight: 700; color: var(--blue); font-size: 0.92rem; }
.dp-types { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 0.1rem 1rem; margin-bottom: 0.7rem; }
.dp-others { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 0.5rem; margin-bottom: 0.4rem; }
.dp-add-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 0.8rem; }
.dp-visible { margin-top: 0.8rem; }
.dp-table td { vertical-align: middle; }
@media (max-width: 640px) { .dp-item-actions, .dp-inline { width: 100%; } }

/* tracking page: documents we are preparing */
.dpt-card { border-top-color: var(--blue); padding: 1.4rem 1.4rem 1.2rem; }
.dpt-head { display: flex; gap: 1rem; align-items: center; margin-bottom: 1.1rem; }
.dpt-ring { --p: 0; width: 64px; height: 64px; border-radius: 50%; flex: none; display: grid; place-items: center; position: relative;
  background: conic-gradient(#2fb67c calc(var(--p) * 1%), #e4eaf5 0); }
.dpt-ring::before { content: ''; position: absolute; inset: 7px; background: #fff; border-radius: 50%; }
.dpt-ring b { position: relative; font-size: 0.85rem; color: var(--navy); }
.dpt-title h2 { margin: 0; font-size: 1.1rem; }
.dpt-title p { margin: 0.15rem 0 0.35rem; color: var(--muted); font-size: 0.85rem; }
.dpt-count { display: inline-block; font-size: 0.74rem; font-weight: 700; color: #14639f; background: #e4f0fd; border-radius: 999px; padding: 0.15rem 0.6rem; }
.dpt-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.6rem; }
.dpt-item { display: flex; align-items: center; gap: 0.8rem; border: 1px solid var(--border); border-left: 4px solid #f0b429; border-radius: 12px; padding: 0.75rem 0.9rem; background: #fff; }
.dpt-item.st-in_progress { border-left-color: #2f8fd8; background: #fafcff; }
.dpt-item.st-completed { border-left-color: #2fb67c; background: #f8fcf9; }
.dpt-ico { font-size: 1.25rem; width: 2.4rem; height: 2.4rem; display: grid; place-items: center; border-radius: 12px; background: #f1f4fb; flex: none; }
.dpt-name { min-width: 0; flex: 1; }
.dpt-name strong { display: block; color: var(--navy); font-size: 0.95rem; overflow-wrap: anywhere; }
.dpt-name small { color: #8a93a8; font-size: 0.76rem; }
.dpt-status { display: inline-flex; align-items: center; gap: 0.4rem; border-radius: 999px; padding: 0.3rem 0.75rem; font-size: 0.76rem; font-weight: 700; white-space: nowrap; flex: none; }
.dpt-status i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.dpt-status.in_progress i { animation: dptPulse 1.4s ease-in-out infinite; }
@keyframes dptPulse { 50% { opacity: 0.25; } }
.dpt-status.pending { background: var(--warn-bg); color: var(--warn); }
.dpt-status.in_progress { background: #e4f0fd; color: #14639f; }
.dpt-status.completed { background: var(--success-bg); color: var(--success); }
.dpt-status.queued { background: #eef0f8; color: #4b5a85; }
.dpt-status.on_hold { background: #fde8e8; color: #b03a3a; }
.dpt-status.not_required { background: #f0f1f4; color: #7b8498; }
.dpt-item.st-queued { border-left-color: #8a96bd; }
.dpt-item.st-on_hold { border-left-color: #d95b5b; }
.dpt-item.st-not_required { border-left-color: #c9cedb; background: #f8f9fb; }
.dpt-item.st-not_required .dpt-name strong { color: #7b8498; font-weight: 600; }
.dpt-sub { display: block; margin: 0.9rem 0 0.8rem; font-size: 0.78rem; color: #6b7894; }
@media (max-width: 520px) { .dpt-card { padding: 1.1rem 1rem; } .dpt-item { padding: 0.65rem 0.7rem; gap: 0.6rem; } .dpt-ico { width: 2rem; height: 2rem; font-size: 1.05rem; } .dpt-status { padding: 0.25rem 0.55rem; font-size: 0.7rem; } .dpt-ring { width: 56px; height: 56px; } }

/* Two fields side by side on forms (stack on phones) */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem; }
.two-col > div { min-width: 0; }
@media (max-width: 600px) { .two-col { grid-template-columns: 1fr; } }

/* Sheet View sections */
.sheet-tabs { display: flex; gap: 0.4rem; overflow-x: auto; padding: 0.25rem 0 0.6rem; margin-bottom: 0.4rem; -webkit-overflow-scrolling: touch; }
.sheet-tabs a { flex: none; padding: 0.5rem 1rem; border-radius: 999px; border: 1px solid var(--border); background: #fff; color: var(--navy); font-weight: 600; font-size: 0.88rem; white-space: nowrap; text-decoration: none; }
.sheet-tabs a:hover { border-color: var(--blue); color: var(--blue); }
.sheet-tabs a.active { background: var(--navy); border-color: var(--navy); color: #fff; }
.sheet-progress { display: inline-flex; gap: 0.3rem; background: #eef2fa; border-radius: 12px; padding: 0.25rem; margin-bottom: 0.9rem; flex-wrap: wrap; }
.sheet-progress a { padding: 0.4rem 0.9rem; border-radius: 9px; font-size: 0.85rem; font-weight: 600; color: #51607f; text-decoration: none; }
.sheet-progress a b { margin-left: 0.3rem; background: #fff; border-radius: 999px; padding: 0 0.5rem; font-size: 0.78rem; }
.sheet-progress a.active { background: #fff; color: var(--navy); box-shadow: 0 1px 4px rgba(20,40,90,.15); }
.sheet-progress a.done.active { color: var(--success); }
.sheet-progress a.pend.active { color: var(--warn); }
.sheet-note { color: var(--muted); padding: 1rem 1.2rem; }
.filters select.need-pick { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(47,143,216,.18); }
.sheet-legend { display: flex; gap: 0.5rem 1.1rem; flex-wrap: wrap; font-size: 0.78rem; margin: 0 0 0.6rem; color: #51607f; }
.sheet-legend .lg.done { color: var(--success); font-weight: 700; }
.sheet-legend .lg.cur { color: #14639f; font-weight: 700; }
.sheet-legend .lg.pend { color: var(--warn); font-weight: 700; }
.sheet-legend .lg.na { color: #9aa3b8; }
.sheet-matrix th.stage-col { text-align: center; min-width: 92px; max-width: 108px; font-size: 0.68rem; white-space: normal; line-height: 1.25; }
.sheet-matrix td.mx-cell { text-align: center; padding: 0.45rem 0.3rem; min-width: 92px; }
.mx-cell .mx-ico { display: inline-grid; place-items: center; width: 1.45rem; height: 1.45rem; border-radius: 50%; font-weight: 800; font-size: 0.9rem; }
.mx-cell small { display: block; font-size: 0.66rem; margin-top: 0.1rem; color: #6b7894; white-space: nowrap; }
.mx-done { background: #f1faf5; } .mx-done .mx-ico { background: var(--success-bg); color: var(--success); }
.mx-current { background: #eef6fe; } .mx-current .mx-ico { background: #cfe5fa; color: #14639f; }
.mx-pending .mx-ico { background: var(--warn-bg); color: var(--warn); }
.mx-na .mx-ico { color: #c2c8d6; }
.mx-total b { font-size: 0.9rem; color: var(--navy); }
.mx-bar { display: block; height: 5px; background: #e4eaf5; border-radius: 99px; margin-top: 0.3rem; min-width: 60px; overflow: hidden; }
.mx-bar i { display: block; height: 100%; background: #2fb67c; }
@media (max-width: 720px) { .sheet-matrix { min-width: 0; } }

/* Document Preparation: student finder */
.dp-find { margin-bottom: 1rem; }
.dp-find label { margin-top: 0; }
.dp-find-results { margin-top: 0.5rem; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.dp-find-results a { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; padding: 0.65rem 0.9rem; text-decoration: none; color: var(--navy); border-bottom: 1px solid var(--border); }
.dp-find-results a:last-child { border-bottom: 0; }
.dp-find-results a:hover { background: #f3f6ff; }
.dp-find-results span, .dp-find-none { color: #6b7894; font-size: 0.85rem; }
.dp-find-none { padding: 0.65rem 0.9rem; }

/* One-click copy button (credentials) */
.copy-btn { display: inline-flex; align-items: center; gap: 0.3rem; margin-left: 0.4rem; padding: 0.25rem 0.6rem; font: inherit; font-size: 0.78rem; font-weight: 600; color: var(--navy); background: #eef2fa; border: 1px solid var(--border); border-radius: 8px; cursor: pointer; vertical-align: middle; transition: background .15s, color .15s, border-color .15s; }
.copy-btn:hover { background: #e2e9f7; border-color: var(--blue); }
.copy-btn.copied { background: var(--success-bg); color: var(--success); border-color: #bfe6d0; }
.copy-btn.failed { background: var(--warn-bg); color: var(--warn); }
.cred-val { overflow-wrap: anywhere; }

.role-form { display: flex; gap: 0.4rem; align-items: center; margin: 0; }
.role-form select { width: auto; min-width: 150px; padding: 0.4rem 0.55rem; font-size: 0.85rem; }

/* Sheet View: section tabs, then one tidy filter card (search + intake + country + language proficiency) */
.sheet-bar { margin: 0 0 0.5rem; }
.sheet-bar .sheet-tabs { margin: 0; padding: 0.15rem 0 0.35rem; }
.sheet-filters { display: flex; flex-wrap: wrap; gap: 0.9rem 1rem; align-items: flex-end;
  background: #fff; border: 1px solid var(--border); border-radius: 16px; padding: 0.95rem 1.15rem 1rem; margin: 0 0 1rem; box-shadow: 0 2px 8px rgba(16,20,58,.05); }
.sheet-filters .sf { min-width: 0; flex: 1 1 170px; }
.sheet-filters .sf-search { flex: 2 1 260px; }
.sheet-filters .sf-end { flex: 0 0 auto; }
.sheet-filters .sf-end:empty { display: none; }
.sheet-filters .sf label { display: block; margin: 0 0 0.35rem; font-size: 0.68rem; font-weight: 700; letter-spacing: 0.07em; text-transform: uppercase; color: #6b7894; }
.sheet-filters select, .sheet-filters input[type=search] { width: 100%; height: 42px; margin: 0; border: 1px solid #dbe2ef; border-radius: 11px; background-color: #f7f9fd; color: var(--navy); font: inherit; font-size: 0.92rem; box-shadow: none; transition: border-color .15s, box-shadow .15s, background-color .15s; }
.sheet-filters select { appearance: none; -webkit-appearance: none; padding: 0 2.2rem 0 0.9rem; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5 11 1.5' fill='none' stroke='%236b7894' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 0.9rem center; }
.sheet-filters .sf-input { position: relative; }
.sheet-filters .sf-input svg { position: absolute; left: 0.85rem; top: 50%; transform: translateY(-50%); color: #8a96b0; pointer-events: none; }
.sheet-filters input[type=search] { padding: 0 0.9rem 0 2.45rem; -webkit-appearance: none; appearance: none; }
.sheet-filters input[type=search]::-webkit-search-cancel-button { -webkit-appearance: none; }
.sheet-filters select:hover, .sheet-filters input[type=search]:hover { border-color: #b9c6e0; }
.sheet-filters select:focus, .sheet-filters input[type=search]:focus { outline: none; background-color: #fff; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(37,99,235,.15); }
.sheet-filters select.on { background-color: #eef4ff; border-color: var(--blue); color: #1d4ed8; font-weight: 600; }
.sheet-filters .sf-end { display: flex; align-items: center; min-height: 42px; }
.sheet-filters .sf-clear { display: inline-flex; align-items: center; gap: 0.35rem; height: 42px; padding: 0 1rem; border-radius: 11px; border: 1px solid #f3c9c9; background: #fff5f5; color: #b42318; font-size: 0.85rem; font-weight: 700; text-decoration: none; white-space: nowrap; }
.sheet-filters .sf-clear:hover { background: #fee4e2; }
@media (max-width: 640px) { .sheet-filters { padding: 0.85rem; gap: 0.75rem; } .sheet-filters .sf-search { flex: 1 1 100%; } .sheet-filters .sf-end { flex: 1 1 100%; } .sheet-filters .sf-clear { width: 100%; justify-content: center; } }

/* Sheet View: the table scrolls inside its own frame, so the header row stays visible
   while scrolling down, and Date / Name / Country / Program stay in place while scrolling sideways. */
.sheet-card { max-height: calc(100vh - 130px); min-height: 320px; overflow: auto; }
.sheet-table thead th { position: sticky; top: 0; z-index: 4; background: #f3f6fd; box-shadow: 0 1px 0 var(--border); }
.sheet-matrix .fz { position: sticky; z-index: 2; background: #fff; box-sizing: border-box; overflow: hidden; }
.sheet-matrix thead th.fz { z-index: 6; background: #f3f6fd; }
.sheet-matrix .fz1 { left: 0; width: 112px; min-width: 112px; max-width: 112px; }
.sheet-matrix .fz2 { left: 112px; width: 150px; min-width: 150px; max-width: 150px; }
.sheet-matrix .fz3 { left: 262px; width: 100px; min-width: 100px; max-width: 100px; }
.sheet-matrix .fz4 { left: 362px; width: 150px; min-width: 150px; max-width: 150px; box-shadow: 1px 0 0 var(--border), 4px 0 8px -4px rgba(20,40,90,.18); }
.sheet-matrix tbody tr:hover td.fz { background: #f3f6ff; }
@media (max-width: 900px) {
  /* narrow screens: only Name stays frozen sideways so the stage columns have room; the header row still stays on top */
  .sheet-matrix .fz1, .sheet-matrix .fz3, .sheet-matrix .fz4 { left: auto; width: auto; min-width: 0; max-width: none; box-shadow: none; overflow: visible; }
  .sheet-matrix .fz2 { left: 0; width: 120px; min-width: 120px; max-width: 120px; box-shadow: 1px 0 0 var(--border); }
  .sheet-matrix tbody td.fz1, .sheet-matrix tbody td.fz3, .sheet-matrix tbody td.fz4 { position: static; z-index: auto; background: transparent; }
  .sheet-matrix thead th.fz1, .sheet-matrix thead th.fz3, .sheet-matrix thead th.fz4 { z-index: 4; }
  .sheet-card { max-height: calc(100vh - 90px); }
}

/* Online file application (apply site + staff review) */
.apply-card { padding: 1.6rem 1.5rem; }
.ap-trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.ap-h { margin: 1.4rem 0 0.6rem; font-size: 1rem; color: var(--navy); }
.ap-methods { display: grid; grid-template-columns: 1fr 1fr; gap: 0.8rem; }
.ap-method { display: block; margin: 0; cursor: pointer; }
.ap-method input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.ap-card { display: block; height: 100%; border: 2px solid var(--border); border-radius: 14px; padding: 0.95rem 1rem; background: #fff; transition: border-color .15s, background .15s, box-shadow .15s; }
.ap-card strong { display: block; color: var(--navy); font-size: 0.98rem; margin-bottom: 0.25rem; }
.ap-card small { color: #6b7894; font-size: 0.82rem; line-height: 1.4; display: block; }
.ap-method:hover .ap-card { border-color: #9ec3ea; }
.ap-method input:checked + .ap-card { border-color: var(--blue); background: #f2f8fe; box-shadow: 0 0 0 3px rgba(47,143,216,.15); }
.ap-method input:focus-visible + .ap-card { outline: 2px solid var(--navy); outline-offset: 2px; }
.ap-sub { margin-top: 0.4rem; }
.ap-code { font-size: 1.6rem; letter-spacing: 0.5rem; text-align: center; font-weight: 700; }
.ap-message { background: #f4f7fd; border-left: 4px solid var(--blue); border-radius: 8px; padding: 0.8rem 1rem; margin: 0.6rem 0; color: var(--navy); overflow-wrap: anywhere; }
@media (max-width: 600px) { .ap-methods { grid-template-columns: 1fr; } .apply-card { padding: 1.2rem 1rem; } }
.badge.ap-pending { background: var(--warn-bg); color: var(--warn); }
.badge.ap-need_info { background: #e4f0fd; color: #14639f; }
.badge.ap-approved { background: var(--success-bg); color: var(--success); }
.badge.ap-rejected { background: #fde8e8; color: #b03a3a; }
.ap-count { display: inline-block; margin-left: 0.3rem; min-width: 1.3rem; padding: 0 0.4rem; border-radius: 999px; background: rgba(120,135,170,.18); font-size: 0.75rem; text-align: center; }
.sheet-tabs a.active .ap-count { background: rgba(255,255,255,.22); }
.ap-link-card { display: flex; gap: 1.4rem; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.ap-link-main { flex: 1 1 340px; min-width: 0; }
.ap-link-main h2 { margin-bottom: 0.2rem; }
.ap-link-row { display: flex; gap: 0.5rem; align-items: center; margin-top: 0.5rem; }
.ap-link-row input { margin: 0; flex: 1; min-width: 0; }
.ap-link-qr { width: 130px; height: 130px; flex: none; }
.ap-link-qr svg { width: 100%; height: 100%; }
.ap-rules { display: flex; gap: 0.8rem; align-items: flex-end; flex-wrap: wrap; }
.ap-rules > div { flex: 1 1 160px; min-width: 0; }
.ap-rules label { margin-top: 0; }
.ap-inline-form { display: flex; gap: 0.6rem; align-items: center; flex-wrap: wrap; margin-top: 0.9rem; }
.ap-inline-form input[type=text], .ap-inline-form select { flex: 1 1 240px; width: auto; margin: 0; }
.ap-actions-top { display: flex; gap: 0.6rem; flex-wrap: wrap; }
.ap-more { margin-top: 1rem; border-top: 1px dashed var(--border); padding-top: 0.8rem; }
.ap-more summary { cursor: pointer; font-weight: 700; color: var(--blue); font-size: 0.9rem; margin-bottom: 0.7rem; }
.ap-steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 0.7rem; }
.ap-step { display: flex; gap: 0.7rem; align-items: flex-start; border: 1px solid var(--border); border-radius: 12px; padding: 0.7rem 0.8rem; background: #fff; }
.ap-step > span { flex: none; width: 1.7rem; height: 1.7rem; border-radius: 50%; display: grid; place-items: center; background: #eef1f7; color: var(--navy); font-weight: 800; font-size: 0.85rem; }
.ap-step strong { display: block; color: var(--navy); font-size: 0.9rem; }
.ap-step small { color: #6b7894; font-size: 0.78rem; line-height: 1.35; display: block; }
.ap-step.done { background: #f8fcf9; border-color: #cfe9da; }
.ap-step.done > span { background: var(--success-bg); color: var(--success); }
.ap-decide { border-top-color: #2fb67c; }
.ap-decide button[disabled] { opacity: .5; cursor: not-allowed; }
@media (max-width: 600px) { .ap-link-qr { width: 110px; height: 110px; } }

/* ---- Share your link (Applications) ---- */
.sh-card { padding: 1rem 1.2rem; margin-bottom: 1rem; }
.sh-top { display: flex; align-items: center; justify-content: space-between; gap: 1rem 1.5rem; flex-wrap: wrap; }
.sh-title h2 { margin: 0; font-size: 1.05rem; }
.sh-title .field-hint { display: block; margin: .1rem 0 0; }
.sh-top .sh-linkrow { flex: 1 1 320px; max-width: 460px; margin: 0; }
.sh-grid { display: grid; grid-template-columns: 112px 1fr; gap: 1.1rem; margin-top: .9rem; align-items: start; }
.sh-thumb { position: relative; padding: 0; border: 0; background: none; cursor: pointer; border-radius: 12px; display: block; width: 100%; font: inherit; }
.sh-thumb canvas { width: 100%; height: auto; display: block; border-radius: 12px; box-shadow: 0 6px 16px rgba(16,20,58,.2); background: #1b2559; transition: transform .15s; }
.sh-thumb:hover canvas, .sh-thumb:focus-visible canvas { transform: translateY(-2px); }
.sh-thumb-cap { display: block; margin-top: .4rem; font-size: .74rem; font-weight: 700; color: var(--blue); text-align: center; }
.sh-msg label { margin: 0 0 .25rem; font-weight: 700; color: var(--navy); font-size: .85rem; }
.sh-msg textarea { width: 100%; margin: 0; font-family: inherit; font-size: .86rem; line-height: 1.5; padding: .6rem .8rem; border-radius: 10px; resize: vertical; background: #f8faff; }
.sh-actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .55rem; }
.sh-actions .btn { text-decoration: none; }
.sh-actions .btn.wa { background: #25d366; color: #fff; }
.sh-actions .btn.wa:hover { background: #1fb957; }
.sh-actions .btn.copied { background: var(--success); }
@media (max-width: 640px) { .sh-grid { grid-template-columns: 84px 1fr; gap: .8rem; } .sh-top .sh-linkrow { max-width: none; flex-basis: 100%; } .sh-actions .btn { flex: 1 1 auto; text-align: center; } }

/* Dashboard: files by intake */
.itk-card { padding: 1.1rem 1.25rem 1.25rem; margin-top: 1rem; }
.itk-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; flex-wrap: wrap; }
.itk-head h2 { margin: 0; font-size: 1.1rem; }
.itk-head p { margin: .15rem 0 0; color: var(--muted, #64748b); font-size: .85rem; }
.itk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: .8rem; margin-top: .9rem; }
.itk-tile { display: flex; flex-direction: column; gap: .35rem; padding: .9rem 1rem; border: 1px solid var(--border, #e2e8f0); border-radius: 14px; background: #fff; text-decoration: none; color: inherit; transition: box-shadow .15s, transform .15s, border-color .15s; }
.itk-tile:hover, .itk-tile:focus-visible { box-shadow: 0 8px 22px rgba(16,20,58,.12); transform: translateY(-2px); border-color: var(--blue, #2563eb); }
.itk-tile.is-none { background: #f8fafc; border-style: dashed; }
.itk-name { font-weight: 700; color: var(--navy, #1b2559); font-size: .98rem; }
.itk-name em { font-style: normal; font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: #92400e; background: #fef3c7; border-radius: 999px; padding: .1rem .45rem; margin-left: .3rem; }
.itk-total { color: #475569; font-size: .85rem; }
.itk-total strong { font-size: 1.7rem; color: var(--navy, #1b2559); margin-right: .2rem; }
.itk-bar { display: flex; height: 7px; border-radius: 999px; overflow: hidden; background: #e8edf6; }
.itk-bar i { display: block; height: 100%; }
.itk-bar .a, .itk-legend .a::before { background: #3b82f6; }
.itk-bar .s, .itk-legend .s::before { background: #16a34a; }
.itk-bar .r, .itk-legend .r::before { background: #ef4444; }
.itk-legend { display: flex; flex-wrap: wrap; gap: .2rem .7rem; font-size: .74rem; color: #64748b; }
.itk-legend span { display: inline-flex; align-items: center; gap: .3rem; }
.itk-legend span::before { content: ''; width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.itk-go { margin-top: .2rem; font-size: .8rem; font-weight: 700; color: var(--blue, #2563eb); }

/* Sheet View: University section */
.sheet-matrix .uni-col { min-width: 280px; text-align: left; }
.uni-line { display: flex; align-items: center; flex-wrap: wrap; gap: 0.2rem 0.5rem; padding: 0.2rem 0; }
.uni-line + .uni-line { border-top: 1px dashed #e4eaf5; }
.uni-name { font-weight: 700; color: var(--navy); }
.uni-meta { color: var(--muted); font-size: 0.78rem; }
.uni-chip { margin-left: auto; padding: 0.1rem 0.55rem; border-radius: 999px; font-size: 0.7rem; font-weight: 700; background: #eef2fa; color: #51607f; }
.uni-chip.uni-offer, .uni-chip.uni-offer-received, .uni-chip.uni-accepted, .uni-chip.uni-admitted { background: var(--success-bg); color: var(--success); }
.uni-chip.uni-rejected { background: #fee4e2; color: #b42318; }
.uni-chip.uni-applied, .uni-chip.uni-submitted { background: #e3effc; color: #14639f; }

/* =====================================================================
   Call Log (counselor sheet, Admin leads / reports / storage)
   ===================================================================== */
.cl-page { padding-bottom: 3rem; }
.cl-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.1rem; }
.cl-head h1 { margin: 0 0 0.15rem; }
.cl-head .field-hint { margin: 0; max-width: 62ch; }
.cl-head-actions { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; }
.btn.sm { padding: 0.38rem 0.8rem; font-size: 0.8rem; }
.btn.disabled { opacity: 0.5; cursor: not-allowed; pointer-events: none; }
.btn.secondary.danger-text { color: var(--danger); }

/* status + english pills (the colors are shared by screen, print and Excel) */
.cs, .en { display: inline-block; padding: 0.22rem 0.75rem; border-radius: 999px; font-size: 0.76rem; font-weight: 700; white-space: nowrap; line-height: 1.35; border: 0; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.cs-interested { background: #fde3cf; color: #a4540b; }
.cs-appt_fixed { background: #0f8a4f; color: #fff; }
.cs-appt_done { background: #6b3fa0; color: #fff; }
.cs-call_back { background: #dbeafe; color: #1d4ed8; }
.cs-no_answer { background: #fff3bf; color: #8a6d00; }
.cs-dropped { background: #3b3f4a; color: #fff; }
.en-moi { background: #e9ebf0; color: #3b4150; }
.en-ielts { background: #c0261d; color: #fff; }
.en-pte { background: #d6e8fb; color: #14639f; }
.en-toefl { background: #ffe8b8; color: #8a5a00; }
.en-duolingo { background: #d7f3ee; color: #0b6b5d; }
.en-notyet { background: #f3f4f6; color: #6b7280; }

/* appointment highlight: today = orange, tomorrow = blue */
.apt { display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.2rem 0.6rem; border-radius: 8px; font-size: 0.8rem; font-weight: 700; white-space: nowrap; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.apt em { font-style: normal; font-size: 0.66rem; letter-spacing: 0.05em; text-transform: uppercase; padding: 0.05rem 0.4rem; border-radius: 6px; background: rgba(255, 255, 255, 0.7); }
.ap-today { background: #ffd79a; color: #7a3e00; box-shadow: inset 0 0 0 1.5px #f0a53c; }
.ap-tomorrow { background: #bbd9fa; color: #12467d; box-shadow: inset 0 0 0 1.5px #5aa2ee; }
.ap-later { background: #eef1f7; color: #3b4468; }
.ap-past { background: transparent; color: var(--muted); font-weight: 600; }

/* today / tomorrow appointment panels */
.cl-appts { display: grid; grid-template-columns: 1fr 1fr; gap: 0.9rem; margin-bottom: 1rem; }
.cl-appt { background: #fff; border: 1px solid var(--border); border-radius: 14px; padding: 0.85rem 1rem; box-shadow: var(--shadow-sm); border-top: 5px solid #ccc; min-width: 0; }
.cl-appt-today { border-top-color: #f0a53c; background: linear-gradient(180deg, #fff8ec, #fff 55%); }
.cl-appt-tomorrow { border-top-color: #5aa2ee; background: linear-gradient(180deg, #f1f7fe, #fff 55%); }
.cl-appt-head { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.45rem; }
.cl-appt-head b { color: var(--navy); }
.cl-appt-head small { margin-left: auto; color: var(--muted); font-weight: 600; }
.cl-dot { width: 10px; height: 10px; border-radius: 50%; background: #f0a53c; }
.cl-appt-tomorrow .cl-dot { background: #5aa2ee; }
.cl-count { min-width: 1.5rem; text-align: center; padding: 0.05rem 0.45rem; border-radius: 999px; background: #ffd79a; color: #7a3e00; font-weight: 800; font-size: 0.8rem; }
.cl-appt-tomorrow .cl-count { background: #bbd9fa; color: #12467d; }
.cl-appt ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.3rem; max-height: 9.5rem; overflow: auto; }
.cl-appt li { display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; padding: 0.3rem 0.1rem; border-top: 1px dashed #e4e8f2; }
.cl-appt li:first-child { border-top: 0; }
.cl-appt li a { display: flex; flex-direction: column; color: var(--navy); min-width: 0; }
.cl-appt li a:hover { text-decoration: none; }
.cl-appt li a b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cl-appt li a span { color: var(--muted); font-size: 0.78rem; font-variant-numeric: tabular-nums; }
.cl-none { margin: 0.2rem 0; color: var(--muted); font-size: 0.88rem; }

/* summary tiles */
.cl-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 0.75rem; margin-bottom: 1rem; }
.cl-stat { background: #fff; border: 1px solid var(--border); border-left: 5px solid #ccd3e4; border-radius: 12px; padding: 0.6rem 0.95rem; box-shadow: var(--shadow-sm); }
.cl-stat small { display: block; color: var(--muted); font-size: 0.68rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; }
.cl-stat b { font-size: 1.55rem; color: var(--navy); line-height: 1.25; }
.cl-stat b.sm { font-size: 1.05rem; }
.cl-stat.s-total { border-left-color: var(--navy); }
.cl-stat.s-int { border-left-color: #e08a3c; }
.cl-stat.s-fix { border-left-color: #0f8a4f; }
.cl-stat.s-done { border-left-color: #6b3fa0; }
.cl-stat.s-na { border-left-color: #d9b52a; }
.cl-stat.s-drop { border-left-color: #3b3f4a; }
.cl-stat.s-today { border-left-color: #f0a53c; }
.cl-stat.s-tomorrow { border-left-color: #5aa2ee; }

/* tabs */
.cl-tabs, .cl-admin-tabs { display: flex; gap: 0.4rem; flex-wrap: wrap; margin: 0 0 0.9rem; }
.cl-tabs a, .cl-admin-tabs a { padding: 0.5rem 1.05rem; border-radius: 999px; background: #e9edf8; color: var(--navy); font-weight: 700; font-size: 0.88rem; }
.cl-tabs a:hover, .cl-admin-tabs a:hover { text-decoration: none; background: #dbe2f5; }
.cl-tabs a.active, .cl-admin-tabs a.active { background: var(--navy); color: #fff; }
.ap-count { display: inline-block; margin-left: 0.25rem; padding: 0 0.45rem; border-radius: 999px; background: rgba(255, 255, 255, 0.25); font-size: 0.75rem; }
.cl-tabs a:not(.active) .ap-count { background: #fff; }

/* day picker */
.cl-date { display: inline-flex; align-items: stretch; background: #fff; border: 1px solid var(--border); border-radius: 12px; overflow: hidden; box-shadow: var(--shadow-sm); }
.cl-date > a, .cl-date > .off { display: grid; place-items: center; padding: 0 0.85rem; font-size: 1.3rem; font-weight: 800; color: var(--navy); }
.cl-date > a:hover { background: #eef1f7; text-decoration: none; }
.cl-date > .off { color: #c3c9d8; }
.cl-date-form { margin: 0; display: flex; border-left: 1px solid var(--border); border-right: 1px solid var(--border); }
.cl-date-pick { position: relative; display: flex; align-items: center; margin: 0; cursor: pointer; padding: 0 1rem; font-weight: 700; color: var(--navy); white-space: nowrap; }
.cl-date-pick:hover { background: #f3f6fd; }
.cl-date-pick input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; margin: 0; padding: 0; border: 0; }

/* filters */
.cl-filters { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 0.7rem; background: #fff; border: 1px solid var(--border); border-radius: 14px; padding: 0.8rem 1rem; margin-bottom: 0.9rem; box-shadow: var(--shadow-sm); }
.cl-f { display: flex; flex-direction: column; gap: 0.25rem; min-width: 130px; }
.cl-f label { font-size: 0.66rem; font-weight: 800; letter-spacing: 0.07em; text-transform: uppercase; color: #6b7894; margin: 0; }
.cl-f input, .cl-f select { margin: 0; padding: 0.5rem 0.65rem; font-size: 0.88rem; border: 1px solid #d9dfec; border-radius: 10px; background-color: #fff; }
.cl-f select.on { border-color: var(--blue); background-color: #eef6fd; color: var(--navy); font-weight: 700; }
.cl-f-search { flex: 1 1 220px; }
.cl-f-end { min-width: 0; justify-content: flex-end; }
.cl-clear { padding: 0.5rem 0.8rem; border-radius: 10px; background: var(--danger-bg); color: var(--danger); font-weight: 700; font-size: 0.85rem; }
.cl-clear:hover { text-decoration: none; background: #f9d9d9; }

/* the sheet */
.cl-card { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.cl-table { width: 100%; border-collapse: collapse; font-size: 0.88rem; min-width: 960px; }
.cl-table th { background: #f3f6fd; color: #5b6786; font-size: 0.68rem; letter-spacing: 0.07em; text-transform: uppercase; text-align: left; padding: 0.65rem 0.7rem; border-bottom: 1px solid var(--border); white-space: nowrap; position: sticky; top: 0; z-index: 1; }
.cl-table td { padding: 0.5rem 0.7rem; border-bottom: 1px solid #eef1f7; vertical-align: middle; }
.cl-table tbody tr:hover td { background: #f8faff; }
.cl-table tr.row-today td { background: #fff8ec; }
.cl-table tr.row-tomorrow td { background: #f2f8ff; }
.cl-table tr.row-today:hover td { background: #fff1d8; }
.cl-table tr.row-tomorrow:hover td { background: #e6f1fe; }
.cl-table .c-sl { width: 2.6rem; color: var(--muted); text-align: center; }
.cl-table .c-name { min-width: 150px; }
.cl-table .c-phone { white-space: nowrap; font-variant-numeric: tabular-nums; font-weight: 600; }
.cl-table .c-country { min-width: 130px; }
.cl-table .c-status { min-width: 170px; }
.cl-table .c-appt { min-width: 130px; }
.cl-table .c-rem { max-width: 320px; }
.cl-table .c-rem span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cl-table .c-rem-wrap { min-width: 170px; max-width: 300px; white-space: normal; line-height: 1.4; }
.cl-table .c-act { width: 5.5rem; white-space: nowrap; text-align: right; }
.cl-table .c-act-wide { white-space: nowrap; text-align: right; }
.cl-table .nowrap { white-space: nowrap; }
.cl-name { all: unset; cursor: pointer; font-weight: 800; color: var(--navy); }
.cl-name:hover { text-decoration: underline; }
.cl-name:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; border-radius: 4px; }
.cl-file { display: inline-block; margin-left: 0.4rem; padding: 0.05rem 0.5rem; border-radius: 999px; background: #e6f7ee; color: #0f7a43; font-size: 0.66rem; font-weight: 800; letter-spacing: 0.03em; text-transform: uppercase; }
.cl-tel { color: inherit; }
.cl-quick { margin-left: 0.35rem; display: inline-flex; gap: 0.2rem; }
.cl-quick a { display: inline-grid; place-items: center; width: 1.5rem; height: 1.5rem; border-radius: 50%; background: #e6f7ee; font-size: 0.8rem; }
.cl-quick a:hover { text-decoration: none; background: #cdeedb; }
.cl-icon { all: unset; cursor: pointer; display: inline-grid; place-items: center; width: 1.9rem; height: 1.9rem; border-radius: 8px; color: var(--navy); font-size: 0.95rem; }
.cl-icon:hover { background: #eef1f7; }
.cl-icon.danger:hover { background: var(--danger-bg); }
.cl-icon:focus-visible { outline: 2px solid var(--blue); }
.cl-empty { text-align: center; color: var(--muted); padding: 2.2rem 1rem !important; }
.cl-pager { display: flex; align-items: center; justify-content: center; gap: 0.8rem; flex-wrap: wrap; margin-top: 1rem; color: var(--muted); font-size: 0.9rem; }

/* status dropdown that looks like a pill */
select.cs.cl-status-select { appearance: none; -webkit-appearance: none; cursor: pointer; padding: 0.3rem 1.7rem 0.3rem 0.8rem; margin: 0; width: auto; min-width: 10.5rem; font-size: 0.78rem; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23888' stroke-width='1.6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 0.6rem center; box-shadow: none; }
select.cs.cl-status-select.cs-appt_fixed, select.cs.cl-status-select.cs-appt_done, select.cs.cl-status-select.cs-dropped { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23fff' stroke-width='1.6'/%3E%3C/svg%3E"); }
select.cs.cl-status-select option { background: #fff; color: #1b1f2e; font-weight: 600; }
select.cs.cl-status-select:disabled { opacity: 0.6; }
select.cs.cl-status-select:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }

/* add / edit drawer */
.cl-overlay { position: fixed; inset: 0; background: rgba(16, 20, 58, 0.45); z-index: 90; }
.cl-overlay[hidden] { display: none; }
.cl-drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(480px, 100vw); background: #fff; z-index: 100; transform: translateX(105%); transition: transform 0.22s ease; box-shadow: var(--shadow-lg); display: flex; }
.cl-drawer.open { transform: none; }
.cl-drawer form { display: flex; flex-direction: column; width: 100%; max-width: none; margin: 0; padding: 0; }
.cl-d-head { display: flex; align-items: center; justify-content: space-between; padding: 1rem 1.3rem; border-bottom: 1px solid var(--border); }
.cl-d-head h2 { margin: 0; font-size: 1.15rem; color: var(--navy); }
.cl-x { all: unset; cursor: pointer; width: 2rem; height: 2rem; display: grid; place-items: center; border-radius: 8px; color: #6b7894; }
.cl-x:hover { background: #eef1f7; }
.cl-d-body { flex: 1; overflow-y: auto; padding: 1rem 1.3rem; }
.cl-d-foot { display: flex; gap: 0.5rem; flex-wrap: wrap; padding: 0.9rem 1.3rem; border-top: 1px solid var(--border); background: #fafbfe; }
.cl-fld { margin-bottom: 0.9rem; }
.cl-fld > label { display: block; font-size: 0.68rem; font-weight: 800; letter-spacing: 0.07em; text-transform: uppercase; color: #6b7894; margin: 0 0 0.3rem; }
.cl-fld input[type=text], .cl-fld input[type=tel], .cl-fld input[type=date], .cl-fld textarea { margin: 0; width: 100%; }
.cl-row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0.7rem; }
.cl-seg { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.cl-seg label { margin: 0; cursor: pointer; }
.cl-seg input { position: absolute; opacity: 0; pointer-events: none; }
.cl-seg span { display: inline-block; opacity: 0.55; transition: opacity 0.12s, transform 0.12s, box-shadow 0.12s; padding: 0.35rem 0.9rem; font-size: 0.82rem; }
.cl-seg label:hover span { opacity: 0.9; }
.cl-seg input:checked + span { opacity: 1; box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--navy); }
.cl-seg input:focus-visible + span { box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--blue); }
.cl-warn { background: #fff3bf; border: 1px solid #f0d36b; color: #7a5b00; border-radius: 10px; padding: 0.6rem 0.8rem; font-size: 0.85rem; margin-bottom: 0.8rem; line-height: 1.45; }
.cl-warn.info { background: #e8f1fd; border-color: #b6d3f6; color: #14477e; }
.cl-warn a { font-weight: 800; text-decoration: underline; }
.cl-fld.need > label::after { content: ' *'; color: var(--danger); }
.cl-lock { overflow: hidden; }
.cl-drawer .country-picker { margin: 0; }
[hidden] { display: none !important; }

/* New File: suggestion from the Call Log */
.call-suggest { margin: 0.6rem 0 0.2rem; padding: 0.8rem 1rem; border-radius: 12px; background: #eaf6ff; border: 1px solid #b6d3f6; border-left: 5px solid var(--blue); }
.call-suggest .cs-head { display: flex; flex-direction: column; gap: 0.1rem; color: var(--navy); }
.call-suggest .cs-head span { font-size: 0.88rem; color: #33507a; }
.call-suggest .cs-meta { margin: 0.35rem 0 0; font-size: 0.85rem; color: #33507a; }
.call-suggest .cs-note { margin: 0.35rem 0 0; font-size: 0.82rem; color: #8a5a00; }
.call-suggest .cs-actions { margin-top: 0.6rem; }

/* admin report */
.cl-rp-controls { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 0.8rem; margin-bottom: 1rem; }
.cl-presets { display: inline-flex; background: #e9edf8; border-radius: 999px; padding: 0.2rem; }
.cl-presets a { padding: 0.45rem 1.1rem; border-radius: 999px; color: var(--navy); font-weight: 700; font-size: 0.88rem; }
.cl-presets a:hover { text-decoration: none; }
.cl-presets a.active { background: var(--navy); color: #fff; }
.cl-rp-form { display: flex; gap: 0.7rem; flex-wrap: wrap; align-items: flex-end; margin: 0; max-width: none; }
.cl-paper { background: #fff; border: 1px solid var(--border); border-radius: 14px; padding: 1.4rem 1.6rem; box-shadow: var(--shadow-md); }
.cl-rp-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; border-bottom: 3px solid var(--navy); padding-bottom: 0.7rem; margin-bottom: 0.9rem; }
.cl-rp-head h2 { margin: 0; color: var(--navy); font-size: 1.3rem; }
.cl-rp-head p { margin: 0.2rem 0 0; color: #51607f; font-size: 0.9rem; }
.cl-rp-total { text-align: right; }
.cl-rp-total small { display: block; color: var(--muted); font-size: 0.7rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; }
.cl-rp-total b { font-size: 2rem; color: var(--navy); line-height: 1; }
.cl-rp-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 0.55rem; margin-bottom: 0.6rem; }
.cl-rp-cards > div { border: 1px solid var(--border); border-left: 5px solid #ccd3e4; border-radius: 10px; padding: 0.4rem 0.7rem; }
.cl-rp-cards small { display: block; font-size: 0.64rem; font-weight: 800; letter-spacing: 0.05em; text-transform: uppercase; color: #6b7894; }
.cl-rp-cards b { font-size: 1.25rem; color: var(--navy); }
.cl-rp-cards .k-ielts { border-left-color: #c0261d; } .cl-rp-cards .k-pte { border-left-color: #5aa2ee; } .cl-rp-cards .k-moi { border-left-color: #a5acbd; } .cl-rp-cards .k-oth { border-left-color: #d9b52a; }
.cl-rp-cards .k-interested { border-left-color: #e08a3c; } .cl-rp-cards .k-appt_fixed { border-left-color: #0f8a4f; } .cl-rp-cards .k-appt_done { border-left-color: #6b3fa0; } .cl-rp-cards .k-call_back { border-left-color: #1d4ed8; } .cl-rp-cards .k-no_answer { border-left-color: #d9b52a; } .cl-rp-cards .k-dropped { border-left-color: #3b3f4a; }
.cl-legend { display: flex; flex-wrap: wrap; gap: 0.4rem; align-items: center; margin: 0.7rem 0 0.4rem; font-size: 0.8rem; }
.cl-legend > b { color: #51607f; margin-right: 0.3rem; }
.cl-rp-sub { margin: 1.1rem 0 0.4rem; color: var(--navy); font-size: 1.05rem; display: flex; align-items: baseline; gap: 0.7rem; flex-wrap: wrap; }
.cl-rp-sub span { color: var(--muted); font-size: 0.82rem; font-weight: 600; }
.cl-rp-table { width: 100%; border-collapse: collapse; font-size: 0.84rem; }
.cl-rp-table th { background: #f3f6fd; color: #5b6786; font-size: 0.66rem; letter-spacing: 0.06em; text-transform: uppercase; text-align: left; padding: 0.45rem 0.55rem; border-bottom: 1px solid var(--border); -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.cl-rp-table td { padding: 0.35rem 0.55rem; border-bottom: 1px solid #eef1f7; vertical-align: middle; }
.cl-rp-table .c-sl { width: 2.2rem; color: var(--muted); text-align: center; }
.cl-rp-table .c-rem-wrap { line-height: 1.35; }
.cl-rp-table .nowrap { white-space: nowrap; }
.cl-rp-summary td, .cl-rp-summary th { text-align: center; } .cl-rp-summary td:first-child, .cl-rp-summary th:first-child { text-align: left; }
.cl-rp-foot { display: flex; justify-content: space-between; gap: 1rem; margin-top: 1.1rem; padding-top: 0.6rem; border-top: 1px solid var(--border); font-size: 0.74rem; color: var(--muted); }
.cl-print-head { display: none; }

/* storage */
.cl-mix { display: flex; height: 8px; border-radius: 99px; overflow: hidden; background: #e7ebf5; min-width: 150px; }
.cl-mix i { display: block; height: 100%; }
.cl-mix .m-ielts { background: #c0261d; } .cl-mix .m-pte { background: #7fb2e6; } .cl-mix .m-oth { background: #c9cedb; }
.c-mix small { color: var(--muted); }
.cl-modal { position: fixed; inset: 0; background: rgba(16, 20, 58, 0.5); display: grid; place-items: center; z-index: 120; padding: 1rem; }
.cl-modal-box { background: #fff; border-radius: 16px; padding: 1.4rem 1.6rem; width: min(520px, 100%); box-shadow: var(--shadow-lg); border-top: 5px solid var(--danger); max-width: none; }
.cl-modal-box h2 { margin: 0 0 0.5rem; color: #b42318; font-size: 1.15rem; }
.cl-modal-box p { margin: 0.4rem 0; color: #51607f; font-size: 0.92rem; line-height: 1.5; }
.cl-modal-box .cl-ok { color: #0f7a43; font-weight: 700; }
.cl-modal-actions { display: flex; gap: 0.6rem; margin-top: 1rem; }

/* phones and tablets */
@media (max-width: 860px) {
  .cl-appts { grid-template-columns: 1fr; }
  .cl-row2 { grid-template-columns: 1fr; }
  .cl-head-actions { width: 100%; }
  .cl-head-actions .btn { flex: 1; text-align: center; }
  .cl-f { flex: 1 1 140px; }
  .cl-rp-controls { flex-direction: column; align-items: stretch; }
  .cl-paper { padding: 1rem; }
  .cl-rp-foot { flex-direction: column; gap: 0.2rem; }
  .cl-rp-table { min-width: 720px; }
  .cl-paper { overflow-x: auto; }
}

/* print: coloured A4 landscape, readable */
@page callsheet { size: A4 landscape; margin: 9mm; }
.cl-report-page, .cl-admin.cl-page { page: callsheet; }
@media print {
  html, body { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .only-print, .cl-print-head { display: flex !important; justify-content: space-between; margin-bottom: 4mm; font-size: 10pt; border-bottom: 2px solid #1b2559; padding-bottom: 2mm; }
  .cl-page { padding: 0 !important; max-width: none !important; }
  .cl-paper { border: 0; box-shadow: none; padding: 0; border-radius: 0; overflow: visible; }
  .cl-card { box-shadow: none; border: 0; overflow: visible; }
  .cl-table, .cl-rp-table { min-width: 0 !important; width: 100%; font-size: 8.6pt; }
  .cl-table th { position: static; }
  .cl-table td, .cl-rp-table td { padding: 1.4mm 1.6mm; }
  .cl-table tr, .cl-rp-table tr { page-break-inside: avoid; break-inside: avoid; }
  .cl-table thead, .cl-rp-table thead { display: table-header-group; }
  .cl-rp-section { break-before: auto; }
  .cl-rp-section + .cl-rp-section { break-before: page; }
  .cl-rp-head h2 { font-size: 15pt; } .cl-rp-total b { font-size: 20pt; }
  .cl-rp-cards b { font-size: 12pt; }
  .cl-rp-sub { break-after: avoid; }
  .cl-rp-foot { position: static; }
  .cs, .en, .apt { font-size: 7.6pt; padding: 0.4mm 2.2mm; }
  .cl-quick, .cl-icon { display: none !important; }
  .cl-table .c-rem-wrap, .cl-rp-table .c-rem-wrap { max-width: none; }
  a { color: inherit; }
}

/* Call Log: one-click copy of number / @username */
.cl-tel { word-break: break-all; }
.cl-copy { position: relative; margin-left: 0.4rem; width: 1.65rem; height: 1.65rem; padding: 0; display: inline-grid; place-items: center; vertical-align: middle; border: 1px solid var(--border); border-radius: 8px; background: #fff; color: #51607f; cursor: pointer; transition: background .15s, color .15s, border-color .15s; }
.cl-copy:hover { background: #eef3fd; color: var(--navy); border-color: #b6c6ea; }
.cl-copy.copied { background: #e6f7ee; color: #0f8a4f; border-color: #9fd9b8; }
.cl-copy.failed { background: #fdeceb; color: #c0261d; border-color: #f0b4b0; }
.cl-copy[data-tip]::after { content: attr(data-tip); position: absolute; bottom: 125%; left: 50%; transform: translateX(-50%); background: #1b2559; color: #fff; font-size: 0.68rem; font-weight: 700; padding: 0.15rem 0.45rem; border-radius: 6px; white-space: nowrap; pointer-events: none; }
@media print { .cl-copy { display: none !important; }
  /* Call report print: heading + call list only */
  .cl-report-page .cl-rp-cards, .cl-report-page .cl-legend, .cl-report-page .cl-rp-summary-wrap { display: none !important; }
}

/* Call Log print: bold box lines + stronger colours (report and leads sheet) */
@media print {
  .cl-rp-head { border-bottom: 4px solid #1b2559 !important; }
  .cl-rp-sub { color: #0f1b52 !important; font-size: 12.5pt !important; }
  .cl-rp-table, .cl-table { border-collapse: collapse !important; border: 2px solid #1b2559 !important; }
  .cl-rp-table th, .cl-table th { background: #1b2559 !important; color: #fff !important; border: 1.4px solid #1b2559 !important; font-size: 7.8pt !important; padding: 2mm 1.8mm !important; }
  .cl-rp-table td, .cl-table td { border: 1.4px solid #4a5a8a !important; color: #0b1020 !important; }
  .cl-rp-table tbody tr:nth-child(even) td, .cl-table tbody tr:nth-child(even) td { background-color: #f4f6fc; }
  .cl-rp-table tr.rw-interested td { background-color: #fff0e0 !important; }
  .cl-rp-table tr.rw-appt_fixed td { background-color: #def5e8 !important; }
  .cl-rp-table tr.rw-appt_done td { background-color: #ece3f8 !important; }
  .cl-rp-table tr.rw-call_back td { background-color: #e1ecff !important; }
  .cl-rp-table tr.rw-no_answer td { background-color: #fff8cc !important; }
  .cl-rp-table tr.rw-dropped td { background-color: #e4e6ec !important; }
  .cl-rp-table td b { font-size: 9.2pt; }
  .cs, .en, .apt { border: 1.2px solid rgba(0,0,0,.55) !important; font-weight: 800 !important; }
  .en-ielts { background: #b3170f !important; color: #fff !important; }
  .en-pte { background: #2f7fd1 !important; color: #fff !important; }
  .en-moi { background: #6b7385 !important; color: #fff !important; }
  .en-toefl { background: #f2a516 !important; color: #3b2500 !important; }
  .en-duolingo { background: #1fb59d !important; color: #fff !important; }
  .cs-interested { background: #f08a2c !important; color: #fff !important; }
  .cs-call_back { background: #2563eb !important; color: #fff !important; }
  .cs-no_answer { background: #f2c200 !important; color: #3b2f00 !important; }
  .ap-today { background: #ff9d1c !important; color: #3b1c00 !important; }
  .ap-tomorrow { background: #4f9cf0 !important; color: #fff !important; }
  .cl-rp-foot { border-top: 2px solid #1b2559 !important; color: #1b2559 !important; font-size: 8.5pt !important; }
}
@media print {
  .cl-admin-tabs { display: none !important; }
  .cl-admin .cl-card, .cl-admin .table-card { overflow: visible !important; border-radius: 0 !important; }
  .cl-table-admin { table-layout: auto; font-size: 8pt !important; }
  .cl-table-admin th, .cl-table-admin td { padding: 1.4mm 1.2mm !important; word-break: break-word; }
  .cl-table-admin .cs, .cl-table-admin .en, .cl-table-admin .apt { font-size: 7.4pt !important; padding: 0.4mm 2mm !important; }
}

/* ===== Leaderboard ===== */
.lb-page { padding-top: 1.2rem; padding-bottom: 2.5rem; }
.lb-hero { position: relative; overflow: hidden; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 1rem; padding: 1.6rem 1.8rem; border-radius: 20px; color: #fff; background: radial-gradient(900px 300px at 90% -20%, rgba(255,196,60,.45), transparent 60%), radial-gradient(600px 260px at 0% 120%, rgba(90,162,238,.45), transparent 60%), linear-gradient(135deg, #1b2559 0%, #3b2a86 55%, #6b3fa0 100%); box-shadow: 0 14px 34px rgba(27,37,89,.28); }
.lb-hero h1 { margin: .15rem 0 .2rem; font-size: 2rem; font-weight: 800; color: #fff; display: flex; align-items: center; gap: .5rem; }
.lb-hero p { margin: 0; color: rgba(255,255,255,.82); font-weight: 600; }
.lb-eyebrow { font-size: .72rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: #ffd166; }
.lb-trophy { font-size: 2rem; filter: drop-shadow(0 3px 6px rgba(0,0,0,.3)); }
.lb-tabs { display: inline-flex; flex-wrap: wrap; gap: .3rem; background: rgba(255,255,255,.14); padding: .3rem; border-radius: 999px; backdrop-filter: blur(4px); }
.lb-tabs a { color: #fff; padding: .45rem 1rem; border-radius: 999px; font-weight: 700; font-size: .85rem; text-decoration: none; transition: background .15s; }
.lb-tabs a:hover { background: rgba(255,255,255,.2); text-decoration: none; }
.lb-tabs a.active { background: #fff; color: #1b2559; box-shadow: 0 3px 10px rgba(0,0,0,.2); }

.lb-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: .8rem; margin: 1rem 0 1.2rem; }
.lb-kpi { background: #fff; border: 1px solid var(--border); border-radius: 14px; padding: .8rem 1rem; border-left: 6px solid #ccd3e4; box-shadow: var(--shadow-sm, 0 2px 8px rgba(27,37,89,.06)); }
.lb-kpi small { display: block; font-size: .68rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: #6b7894; }
.lb-kpi b { font-size: 1.7rem; color: var(--navy); line-height: 1.2; }
.lb-kpi.k-calls { border-left-color: #2f7fd1; } .lb-kpi.k-new { border-left-color: #1fb59d; } .lb-kpi.k-fixed { border-left-color: #0f8a4f; } .lb-kpi.k-visit { border-left-color: #6b3fa0; }

.lb-podium { display: grid; gap: 1rem; align-items: end; margin: 0 auto 1.4rem; max-width: 900px; grid-template-columns: repeat(3, 1fr); }
.lb-podium.n1 { grid-template-columns: minmax(0, 320px); justify-content: center; } .lb-podium.n2 { grid-template-columns: repeat(2, minmax(0, 300px)); justify-content: center; }
.lb-pod { position: relative; text-align: center; background: #fff; border: 1px solid var(--border); border-radius: 18px 18px 6px 6px; padding: 1.5rem 1rem 0; box-shadow: 0 10px 26px rgba(27,37,89,.12); overflow: hidden; display: flex; flex-direction: column; align-items: center; }
.lb-pod h3 { margin: .3rem 0 .2rem; font-size: 1.05rem; color: var(--navy); } .lb-pod h3 em, .lb-who em { font-style: normal; font-size: .62rem; font-weight: 800; background: #1b2559; color: #fff; padding: .12rem .45rem; border-radius: 999px; vertical-align: middle; margin-left: .3rem; }
.lb-pod .lb-pts b { font-size: 2rem; font-weight: 800; color: var(--navy); line-height: 1; } .lb-pod .lb-pts small { display: block; font-size: .68rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: #6b7894; }
.lb-pod ul { list-style: none; display: flex; gap: .7rem; margin: .7rem 0 1rem; padding: 0; font-size: .75rem; color: #51607f; } .lb-pod ul b { color: var(--navy); }
.lb-step { width: calc(100% + 2rem); margin: 0 -1rem; }
.lb-pod.gold { padding-top: 2.2rem; border-color: #f2c14e; background: linear-gradient(180deg, #fff8e1, #fff 60%); } .lb-pod.gold .lb-step { height: 54px; background: linear-gradient(180deg, #ffd35a, #f2a516); }
.lb-pod.silver { border-color: #cfd5e2; background: linear-gradient(180deg, #f3f5fa, #fff 60%); } .lb-pod.silver .lb-step { height: 34px; background: linear-gradient(180deg, #d5dae6, #aab2c5); }
.lb-pod.bronze { border-color: #e6b98c; background: linear-gradient(180deg, #fdf0e4, #fff 60%); } .lb-pod.bronze .lb-step { height: 22px; background: linear-gradient(180deg, #e9a566, #c47a35); }
.lb-pod.me { box-shadow: 0 0 0 3px #1b2559, 0 10px 26px rgba(27,37,89,.2); }
.lb-crown { position: absolute; top: .35rem; left: 50%; transform: translateX(-50%); font-size: 1.5rem; filter: drop-shadow(0 2px 3px rgba(0,0,0,.25)); }
.lb-medal { display: inline-block; margin-top: .35rem; font-size: .7rem; font-weight: 800; padding: .12rem .6rem; border-radius: 999px; color: #fff; background: #8a93a8; }
.lb-pod.gold .lb-medal { background: #e09a0a; } .lb-pod.silver .lb-medal { background: #7d879d; } .lb-pod.bronze .lb-medal { background: #b86b27; }

.lb-avatar { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; font-size: 1.6rem; font-weight: 800; color: #fff; border: 3px solid #fff; box-shadow: 0 4px 12px rgba(0,0,0,.2); flex: none; }
.lb-avatar.sm { width: 42px; height: 42px; font-size: 1.05rem; border-width: 2px; }
.av-0 { background: linear-gradient(135deg, #5b6ee1, #3b2a86); } .av-1 { background: linear-gradient(135deg, #1fb59d, #0b6b5d); } .av-2 { background: linear-gradient(135deg, #f08a2c, #c0261d); } .av-3 { background: linear-gradient(135deg, #2f7fd1, #14477e); }
.av-4 { background: linear-gradient(135deg, #b567d6, #6b3fa0); } .av-5 { background: linear-gradient(135deg, #f2a516, #b86b27); } .av-6 { background: linear-gradient(135deg, #e0507a, #9b1c4a); } .av-7 { background: linear-gradient(135deg, #3cc47c, #0f8a4f); }

.lb-board { background: #fff; border: 1px solid var(--border); border-radius: 18px; padding: 1rem 1.1rem; box-shadow: 0 8px 24px rgba(27,37,89,.08); }
.lb-board-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: .5rem; margin-bottom: .6rem; } .lb-board-head h2 { margin: 0; font-size: 1.1rem; color: var(--navy); }
.lb-how { font-size: .76rem; color: #6b7894; } .lb-how b { color: var(--navy); }
.lb-row { display: grid; grid-template-columns: 44px 42px minmax(150px, 1.3fr) minmax(0, 3fr) 74px; align-items: center; gap: .8rem; padding: .7rem .6rem; border-radius: 14px; border: 1px solid transparent; transition: background .15s; }
.lb-row + .lb-row { border-top: 1px solid #eef1f7; } .lb-row:hover { background: #f7f9fe; }
.lb-row.me { background: linear-gradient(90deg, #eaf0ff, #f7f9fe); border-color: #b6c6ea; } .lb-row.idle { opacity: .72; }
.lb-rank { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; font-weight: 800; background: #eef1f7; color: #51607f; }
.lb-rank.gold { background: linear-gradient(135deg, #ffd35a, #e09a0a); color: #fff; } .lb-rank.silver { background: linear-gradient(135deg, #d5dae6, #8a93a8); color: #fff; } .lb-rank.bronze { background: linear-gradient(135deg, #e9a566, #b86b27); color: #fff; }
.lb-who strong { color: var(--navy); } .lb-bar-score { height: 6px; background: #eef1f7; border-radius: 999px; overflow: hidden; margin-top: .35rem; } .lb-bar-score span { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, #5b6ee1, #b567d6, #f2a516); }
.lb-metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: .7rem; }
.lb-m-top { display: flex; justify-content: space-between; align-items: baseline; font-size: .7rem; } .lb-m-top small { font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: #6b7894; } .lb-m-top b { font-size: .95rem; color: var(--navy); }
.lb-m-bar { display: block; height: 7px; background: #eef1f7; border-radius: 999px; overflow: hidden; margin-top: .25rem; } .lb-m-bar i { display: block; height: 100%; border-radius: 999px; }
.m-calls i { background: #2f7fd1; } .m-new i { background: #1fb59d; } .m-fixed i { background: #0f8a4f; } .m-visit i { background: #6b3fa0; }
.lb-score { text-align: right; } .lb-score b { font-size: 1.35rem; font-weight: 800; color: var(--navy); } .lb-score small { display: block; font-size: .62rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: #6b7894; }
.lb-foot { margin: .8rem .2rem 0; font-size: .78rem; color: #6b7894; } .lb-none { color: #6b7894; padding: .6rem; }
.lb-empty { text-align: center; background: #fff; border: 2px dashed #ccd3e4; border-radius: 18px; padding: 2.2rem 1rem; margin-bottom: 1.2rem; } .lb-empty-ico { font-size: 2.6rem; } .lb-empty h2 { margin: .3rem 0; color: var(--navy); } .lb-empty p { margin: 0; color: #6b7894; }
@media (max-width: 860px) {
  .lb-hero { padding: 1.2rem; } .lb-hero h1 { font-size: 1.6rem; }
  .lb-kpis { grid-template-columns: repeat(2, 1fr); }
  .lb-podium, .lb-podium.n2 { grid-template-columns: repeat(3, 1fr); gap: .5rem; } .lb-podium.n2 { grid-template-columns: repeat(2, 1fr); } .lb-podium.n1 { grid-template-columns: 1fr; }
  .lb-pod { padding: 1.4rem .4rem 0; } .lb-pod.gold { padding-top: 2rem; } .lb-pod h3 { font-size: .85rem; } .lb-pod .lb-pts b { font-size: 1.4rem; } .lb-pod ul { flex-direction: column; gap: .1rem; align-items: center; } .lb-step { width: calc(100% + .8rem); margin: 0 -.4rem; } .lb-avatar { width: 50px; height: 50px; font-size: 1.25rem; }
  .lb-row { grid-template-columns: 36px 40px 1fr 64px; row-gap: .5rem; } .lb-metrics { grid-column: 1 / -1; grid-row: 2; }
}

/* Report: students visited (Appointment Done) */
.cl-rp-totals { display: flex; gap: 1.6rem; align-items: flex-end; }
.cl-rp-total.visit b { color: #6b3fa0; }
.cl-rp-cards .k-visit { border-left-color: #6b3fa0; }
.cl-rp-visits { margin-bottom: .6rem; }
.cl-rp-visits .cl-rp-sub .vi-ico { font-size: 1.15rem; }
.cl-rp-days { display: flex; flex-wrap: wrap; gap: .4rem; margin: 0 0 .5rem; }
.cl-rp-days span { background: #efe6fa; color: #4c2a7a; border: 1px solid #cbb4ea; border-radius: 999px; padding: .15rem .65rem; font-size: .78rem; font-weight: 600; }
.cl-rp-visit-table thead th { background: #efe6fa; color: #4c2a7a; }
@media print {
  .cl-rp-total.visit b { color: #4c2a7a !important; }
  .cl-rp-visits { break-inside: avoid; margin-bottom: 4mm; }
  .cl-rp-visit-table th { background: #4c2a7a !important; color: #fff !important; border-color: #4c2a7a !important; }
  .cl-rp-visit-table { border-color: #4c2a7a !important; }
  .cl-rp-visit-table td { background-color: #f6f0fd !important; border-color: #8e6cc2 !important; }
  .cl-rp-days span { background: #4c2a7a !important; color: #fff !important; border-color: #4c2a7a !important; font-weight: 800; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .cl-rp-totals { gap: 8mm; }
  .cl-rp-section { break-before: auto; } .cl-rp-visits + .cl-rp-section { break-before: auto; }
}

/* ===== Authenticator (2-step) pages ===== */
.tf-card { text-align: center; }
.tf-wide { max-width: 520px; }
.tf-shield { width: 68px; height: 68px; margin: .3rem auto .6rem; border-radius: 20px; display: grid; place-items: center; font-size: 2rem; background: linear-gradient(135deg, #1b2559, #6b3fa0); box-shadow: 0 10px 24px rgba(27,37,89,.3); }
.tf-shield.ok { background: linear-gradient(135deg, #0f8a4f, #1fb59d); }
.tf-sub { color: #51607f; margin: .3rem 0 1rem; line-height: 1.5; }
.tf-card form { text-align: left; }
.tf-code { text-align: center; font-size: 1.5rem; letter-spacing: .35em; font-weight: 800; font-family: ui-monospace, Menlo, Consolas, monospace; padding: .7rem; }
.tf-hint { text-align: center; margin-top: .9rem; }
.tf-link { display: block; margin: 1rem auto 0; background: none; border: 0; color: #1d4ed8; font-weight: 700; cursor: pointer; font-size: .9rem; }
.tf-steps { text-align: left; margin: 0 0 1rem 1.2rem; padding: 0; color: #2b3652; line-height: 1.6; }
.tf-qr { display: flex; align-items: center; gap: 1.2rem; justify-content: center; flex-wrap: wrap; background: #f5f7fc; border: 1px solid var(--border); border-radius: 16px; padding: 1rem; margin-bottom: 1rem; text-align: left; }
.tf-qr-box { width: 168px; height: 168px; background: #fff; border-radius: 12px; padding: 6px; border: 1px solid var(--border); flex: none; } .tf-qr-box svg { width: 100%; height: 100%; display: block; }
.tf-key { max-width: 230px; } .tf-key small { display: block; color: #6b7894; font-size: .74rem; margin: .25rem 0; }
.tf-key code { display: block; font-size: 1rem; font-weight: 800; letter-spacing: .08em; background: #fff; border: 1px dashed #b6c6ea; border-radius: 10px; padding: .5rem .6rem; word-break: break-all; color: #1b2559; }
.tf-codes { display: grid; grid-template-columns: repeat(2, 1fr); gap: .5rem; margin: 1rem 0; }
.tf-codes span { font-family: ui-monospace, Menlo, Consolas, monospace; font-weight: 800; font-size: 1.05rem; letter-spacing: .1em; background: #f5f7fc; border: 1px solid #b6c6ea; border-radius: 10px; padding: .6rem; color: #1b2559; }
.tf-actions { display: flex; flex-wrap: wrap; gap: .6rem; justify-content: center; }
.tf-codes-card { margin-left: auto; margin-right: auto; }
@media print { .tf-actions, .topbar, .site-footer { display: none !important; } .tf-codes span { border: 2px solid #000; } }

/* ===== My Profile ===== */
.ac-page { padding-top: 1.2rem; padding-bottom: 2.5rem; max-width: 980px; }
.ac-hero { display: flex; align-items: center; gap: 1.1rem; padding: 1.4rem 1.6rem; border-radius: 20px; color: #fff; background: linear-gradient(135deg, #1b2559 0%, #3b2a86 60%, #6b3fa0 100%); box-shadow: 0 12px 30px rgba(27,37,89,.25); margin-bottom: 1.2rem; }
.ac-hero h1 { margin: 0 0 .25rem; color: #fff; font-size: 1.5rem; } .ac-hero p { margin: 0; color: rgba(255,255,255,.85); font-weight: 600; } .ac-hero .badge { background: rgba(255,255,255,.2); color: #fff; }
.ac-avatar { width: 66px; height: 66px; border-radius: 50%; background: linear-gradient(135deg, #ffd35a, #f08a2c); color: #1b2559; display: grid; place-items: center; font-size: 1.8rem; font-weight: 800; border: 3px solid rgba(255,255,255,.7); flex: none; }
.ac-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 1.1rem; align-items: start; }
.ac-card h2 { margin-top: 0; color: var(--navy); } .ac-sub { color: #51607f; margin: .2rem 0 .9rem; font-size: .9rem; line-height: 1.5; }
.ac-card form label { display: block; margin-top: .7rem; font-weight: 700; font-size: .85rem; } .ac-card form .btn { margin-top: 1rem; }
.ac-meter { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; margin-top: .45rem; } .ac-meter span { height: 6px; border-radius: 999px; background: #e4e8f2; }
.ac-meter span.s1 { background: #e0503f; } .ac-meter span.s2 { background: #f2a516; } .ac-meter span.s3 { background: #8bc34a; } .ac-meter span.s4 { background: #0f8a4f; }
.ac-meter-label { display: block; color: #6b7894; font-size: .74rem; margin-top: .2rem; } .ac-match { display: block; font-size: .78rem; margin-top: .25rem; font-weight: 700; } .ac-match.ok { color: #0f8a4f; } .ac-match.bad { color: #c0261d; }
.ac-status { display: inline-flex; align-items: center; gap: .5rem; padding: .35rem .8rem; border-radius: 999px; background: #f3f4f6; font-size: .85rem; font-weight: 700; color: #51607f; } .ac-status .dot { width: 9px; height: 9px; border-radius: 50%; background: #9aa3b8; }
.ac-status.on { background: #e6f7ee; color: #0b6b3a; } .ac-status.on .dot { background: #0f8a4f; box-shadow: 0 0 0 4px rgba(15,138,79,.18); }
.ac-details { border: 1px solid var(--border); border-radius: 12px; padding: .6rem .9rem; margin: .8rem 0; background: #fafbfe; } .ac-details summary { cursor: pointer; font-weight: 800; color: var(--navy); }
.ac-note { font-size: .8rem; color: #6b7894; background: #f5f7fc; border-radius: 10px; padding: .55rem .7rem; } .ac-tips { margin: .8rem 0 0 1.1rem; padding: 0; color: #51607f; font-size: .85rem; line-height: 1.7; }
@media (max-width: 820px) { .ac-grid { grid-template-columns: 1fr; } .ac-hero { padding: 1.1rem; } }

/* ===== Sheet View redesign: KPI tiles, grouped colourful stage headers, compact chips, phone cards ===== */
.sx-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.6rem; margin: 0 0 0.7rem; }
.sx-kpi { display: flex; align-items: center; gap: 0.6rem; background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 0.5rem 0.75rem; box-shadow: 0 1px 4px rgba(16,20,58,.05); }
.sx-kpi i { flex: none; width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; font-style: normal; font-size: 0.9rem; font-weight: 800; color: #fff; }
.sx-kpi b { display: block; font-size: 1.15rem; line-height: 1.1; color: var(--navy); }
.sx-kpi span { font-size: 0.7rem; color: #6b7894; font-weight: 600; }
.k-navy i { background: #1b2559; } .k-green i { background: linear-gradient(135deg,#22c55e,#15803d); } .k-blue i { background: linear-gradient(135deg,#60a5fa,#1d4ed8); } .k-amber i { background: linear-gradient(135deg,#fbbf24,#d97706); }
.sx-desktop .sheet-matrix { border-collapse: separate; border-spacing: 0; }
.sx-desktop .sheet-table thead th.sx-grp, .sx-desktop .sheet-table thead th.sx-subh { color: #fff; text-align: center; font-size: 0.68rem; font-weight: 800; letter-spacing: .02em; border-left: 1px solid rgba(255,255,255,.35); white-space: normal; line-height: 1.2; padding: 0.4rem 0.35rem; }
.sx-desktop .sheet-table thead th.sx-subh { top: 30px; margin-top: -1px; font-size: 0.62rem; font-weight: 700; }
.sx-desktop .sheet-table thead th.fz, .sx-desktop .sheet-table thead th.uni-col, .sx-desktop .sheet-table thead tr:first-child th:not(.sx-grp) { background: #1b2559; color: #fff; font-size: 0.7rem; }
.sx-c0 { background: #4c5fd5 !important; } .sx-c1 { background: #0f8b8d !important; } .sx-c2 { background: #b4491f !important; } .sx-c3 { background: #7c3aed !important; } .sx-c4 { background: #b4872a !important; }
.sx-desktop .sheet-matrix tbody tr.sx-r-done td { background-image: none; }
.sx-desktop .sheet-matrix tbody tr.sx-r-done td.fz1 { box-shadow: inset 3px 0 0 #22c55e; }
.sx-desktop .sheet-matrix tbody tr.sx-r-cur td.fz1 { box-shadow: inset 3px 0 0 #3b82f6; }
.sx-desktop .sheet-matrix td.mx-cell { padding: 0.28rem 0.25rem; min-width: 70px; text-align: center; }
.sx-chip { display: inline-flex; flex-direction: column; align-items: center; justify-content: center; width: 62px; height: 34px; border-radius: 9px; font-size: 0.62rem; line-height: 1.15; }
.sx-chip b { font-weight: 800; font-size: 0.62rem; }
.sx-chip small { font-size: 0.56rem; opacity: .92; white-space: nowrap; margin: 0; color: inherit; }
.c-done { background: linear-gradient(135deg,#22c55e,#15803d); color: #fff; }
.c-proc { background: linear-gradient(135deg,#60a5fa,#1d4ed8); color: #fff; box-shadow: 0 0 0 2px #bfdbfe; }
.c-not { background: #fff6e8; color: #b45309; border: 1.5px dashed #f4b860; }
.c-na { color: #c3cadb; font-weight: 800; font-size: 0.9rem; }
.sx-desktop .sheet-matrix td.mx-total { min-width: 74px; }
.sx-cards { display: none; }
.sx-cmonth { font-weight: 800; font-size: 0.72rem; letter-spacing: .06em; text-transform: uppercase; color: #6b7894; padding: 0.6rem 0.2rem 0.2rem; }
.sx-card { background: #fff; border: 1px solid var(--border); border-left: 4px solid #cbd5e8; border-radius: 12px; padding: 0.6rem 0.7rem; margin-bottom: 0.5rem; box-shadow: 0 1px 4px rgba(16,20,58,.05); }
.sx-card.is-done { border-left-color: #22c55e; } .sx-card.is-cur { border-left-color: #3b82f6; }
.sx-ct { display: flex; justify-content: space-between; align-items: baseline; gap: 0.5rem; }
.sx-cname { font-weight: 800; color: var(--navy); font-size: 0.92rem; text-decoration: none; overflow-wrap: anywhere; }
.sx-cpct { flex: none; font-size: 0.74rem; font-weight: 800; color: #15803d; background: #e8f7ee; border-radius: 99px; padding: 0.05rem 0.5rem; }
.sx-cmeta { font-size: 0.72rem; color: #6b7894; margin: 0.15rem 0 0.4rem; }
.sx-cbar { height: 5px; background: #e4eaf5; border-radius: 99px; overflow: hidden; margin-bottom: 0.45rem; }
.sx-cbar i { display: block; height: 100%; background: linear-gradient(90deg,#22c55e,#15803d); }
.sx-cchips { display: flex; flex-wrap: wrap; gap: 0.25rem; }
.sx-mc { font-size: 0.64rem; font-weight: 700; padding: 0.12rem 0.45rem; border-radius: 99px; line-height: 1.3; }
.sx-mc.c-proc { box-shadow: 0 0 0 1.5px #bfdbfe; }
.sx-cuni { display: flex; flex-direction: column; gap: 0.15rem; margin-top: 0.45rem; font-size: 0.74rem; color: var(--navy); font-weight: 600; }
.sx-cuni em { font-style: normal; font-size: 0.64rem; background: #eef2fa; color: #51607f; border-radius: 99px; padding: 0.02rem 0.4rem; margin-left: 0.2rem; }
.sx-cdrive { display: inline-block; margin-top: 0.4rem; font-size: 0.74rem; font-weight: 700; }
@media (max-width: 720px) {
  .sx-kpis { grid-template-columns: 1fr 1fr; gap: 0.4rem; }
  .sx-kpi { padding: 0.4rem 0.55rem; } .sx-kpi i { width: 26px; height: 26px; font-size: 0.8rem; } .sx-kpi b { font-size: 1rem; }
  .sx-desktop { display: none; }
  .sheet-filters .sf:not(.sf-search) { flex: 1 1 calc(50% - 0.5rem); }
  .sheet-filters { padding: 0.7rem; gap: 0.55rem; margin-bottom: 0.6rem; }
  .sheet-filters .sf label { margin-bottom: 0.2rem; }
  .sheet-filters select, .sheet-filters input[type=search] { height: 38px; font-size: 0.85rem; }
  .sx-cards { display: block; }
  .sheet-legend { font-size: 0.68rem; gap: 0.3rem 0.8rem; }
}
@media print { .sx-kpis, .sx-cards { display: none; } .sx-desktop { display: block !important; max-height: none; overflow: visible; } .c-done, .c-proc, .sx-grp, .sx-subh { -webkit-print-color-adjust: exact; print-color-adjust: exact; } }

/* Stage order controls (Settings > Stages) */
.so-cell { white-space: nowrap; }
.so-handle { cursor: grab; color: #9aa3b8; font-size: 1rem; letter-spacing: -2px; padding: 0 0.3rem; user-select: none; }
.so-num { display: inline-block; min-width: 1.4rem; text-align: center; }
.so-form { display: inline; margin: 0; }
.so-btn { border: 1px solid var(--border); background: #fff; border-radius: 6px; width: 26px; height: 26px; font-size: 0.62rem; color: var(--navy); cursor: pointer; }
.so-btn:hover:not(:disabled) { background: #eef4ff; border-color: var(--blue); }
.so-btn:disabled { opacity: .35; cursor: default; }
tr.stage-row.dragging { opacity: .45; background: #eef4ff; }


.lb-how { display: none; }

/* ===== Final university choice ===== */
.fc-strip { display: flex; align-items: center; gap: 0.6rem; border-radius: 10px; padding: 0.6rem 0.85rem; margin: 0.2rem 0 0.9rem; font-size: 0.86rem; font-weight: 600; }
.fc-strip.todo { background: #fff4e0; border: 1px solid #f4b860; color: #8a4b08; }
.fc-strip.ok { background: #fff8e6; border: 1px solid #e3c36d; color: #6b4e00; }
.fc-btn { border: 1px solid #d9b45a; background: #fff; color: #8a6a10; border-radius: 8px; font: inherit; font-weight: 700; font-size: 0.78rem; padding: 0.4rem 0.7rem; cursor: pointer; white-space: nowrap; }
.fc-btn:hover { background: #fff8e6; }
.fc-badge, .tk-final { display: inline-block; background: linear-gradient(135deg, #e8c46a, #c9a24b); color: #3b2a00; font-weight: 800; font-size: 0.72rem; border-radius: 99px; padding: 0.28rem 0.7rem; white-space: nowrap; }
.tk-final { padding: 0.15rem 0.55rem; font-size: 0.68rem; margin-right: 0.25rem; }
.app-table tr.fc-row td, table tr.fc-row td { background: #fffaf0; }
.app-table tr.fc-row td:first-child, table tr.fc-row td:first-child { box-shadow: inset 4px 0 0 #c9a24b; }
.fc-mut { color: #a0a7b8; font-size: 0.78rem; }
.fc-undo { display: inline; margin: 0 0 0 0.35rem; }
.fc-link { background: none; border: 0; color: #6b7894; font: inherit; font-size: 0.74rem; text-decoration: underline; cursor: pointer; padding: 0; }
.fc-alert { border-left: 4px solid #c9a24b; }
.fc-filter a.fc.active { background: #fff4d6; border-color: #e3c36d; color: #6b4e00; }
.uni-line.is-final .uni-name { color: #8a6a10; font-weight: 800; }
.uni-line.is-final .uni-chip { background: linear-gradient(135deg, #e8c46a, #c9a24b); color: #3b2a00; }
.sx-cuni .is-final { color: #8a6a10; font-weight: 800; }
@media (max-width: 700px) {
  .app-table thead { display: none; }
  .app-table, .app-table tbody { display: block; }
  .app-table tbody tr { display: grid; grid-template-columns: 1fr auto; gap: 0.35rem 0.6rem; border: 1px solid var(--border); border-radius: 12px; padding: 0.7rem; margin-bottom: 0.6rem; background: #fff; }
  .app-table tbody td { display: block; border: 0; padding: 0; background: transparent; }
  .app-table tbody tr.fc-row { background: #fffaf0; border-color: #e3c36d; }
  .app-table tbody tr.fc-row td:first-child { box-shadow: none; }
  .app-table tbody td:nth-child(1) { grid-column: 1; font-size: 0.72rem; color: var(--muted); font-weight: 700; }
  .app-table tbody td:nth-child(2) { grid-column: 1; font-weight: 800; color: var(--navy); font-size: 0.95rem; }
  .app-table tbody td:nth-child(n+3) { grid-column: 1 / 3; }
  .app-table tbody td.fc-td { grid-column: 2; grid-row: 1 / 3; align-self: center; text-align: right; }
  .app-table tbody td form[style] { flex-wrap: wrap; }
}

/* 2-step: remember device */
.tf-remember { display: flex; align-items: flex-start; gap: 0.5rem; font-size: 0.82rem; font-weight: 600; color: #51607f; margin: 0.7rem 0 0.9rem; cursor: pointer; text-align: left; }
.tf-remember input { margin-top: 0.15rem; width: auto; }
.ac-devices { display: flex; align-items: center; justify-content: space-between; gap: 0.8rem; flex-wrap: wrap; margin-top: 0.9rem; padding: 0.7rem 0.8rem; background: #f6f8fd; border: 1px solid var(--border); border-radius: 10px; font-size: 0.88rem; }

/* Call Log: Enrolled + Follow-up Needed */
.cs-enrolled { background: #f5d77a; color: #5c4300; }
.cs-follow_up { background: #cffafe; color: #0e7490; }
.cl-rp-cards .k-enrolled { border-left-color: #c9a24b; } .cl-rp-cards .k-follow_up { border-left-color: #0891b2; }
@media print {
  .cs-enrolled { background: #e0b84a !important; color: #3b2a00 !important; }
  .cs-follow_up { background: #0891b2 !important; color: #fff !important; }
  .cl-rp-table tr.rw-enrolled td { background-color: #fbf1cc !important; }
  .cl-rp-table tr.rw-follow_up td { background-color: #dcf6fa !important; }
}

/* ===== Team photos + optional 2-step ===== */
.user-avatar { overflow: hidden; } .user-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ac-avatar { overflow: hidden; } .ac-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.av-tools { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-top: 0.55rem; } .av-tools form { margin: 0; }
.av-btn { border: 1px solid rgba(255,255,255,.55); background: rgba(255,255,255,.15); color: #fff; border-radius: 999px; font: inherit; font-weight: 700; font-size: 0.78rem; padding: 0.3rem 0.8rem; cursor: pointer; }
.av-btn:hover { background: rgba(255,255,255,.28); } .av-btn.ghost { background: transparent; }
.ac-photo-note { margin: 0.35rem 0 0 !important; font-size: 0.78rem !important; opacity: .8; }
.tm-who { display: flex; align-items: center; gap: 0.65rem; min-width: 170px; }
.tm-av { flex: none; width: 42px; height: 42px; border-radius: 50%; overflow: hidden; background: linear-gradient(135deg, #ffd35a, #f08a2c); color: #1b2559; display: grid; place-items: center; font-weight: 800; font-size: 1.05rem; border: 2px solid #fff; box-shadow: 0 1px 4px rgba(16,20,58,.2); }
.tm-av img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tm-name b { display: block; line-height: 1.2; }
.tm-photo { display: flex; gap: 0.6rem; align-items: center; } .tm-photo form { margin: 0; display: inline; }
.av-link { background: none; border: 0; padding: 0; font: inherit; font-size: 0.74rem; font-weight: 700; color: var(--blue); cursor: pointer; text-decoration: underline; }
.av-link.danger { color: #b42318; }
.ac-off summary { color: #b42318; }
.tf-points { list-style: none; padding: 0; margin: 0.6rem 0 1rem; text-align: left; display: grid; gap: 0.55rem; font-size: 0.9rem; color: #3b4660; }
.tf-points li { background: #f6f8fd; border: 1px solid var(--border); border-radius: 10px; padding: 0.55rem 0.75rem; }
.tf-actions-col { flex-direction: column; align-items: stretch; gap: 0.6rem; }
.tf-actions-col .btn { text-align: center; text-decoration: none; }
.tf-actions-col .tf-link { text-align: center; text-decoration: none; }
.tf-foot { font-size: 0.74rem; color: #8a93a8; margin: 0.8rem 0 0; }
