/* ============================================================
   DMO Connect — styles.css   (Apple HIG · Light + Dark)
   ============================================================ */

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

/* ── RESET ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  font-family: 'Nunito', -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Helvetica Neue', Arial, sans-serif;
  font-size: 1rem; line-height: 1.5; min-height: 100dvh;
  background: var(--bg); color: var(--text-primary);
  transition: background 0.25s ease, color 0.25s ease;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
button { cursor: pointer; font: inherit; border: none; background: none; }
input, textarea, select { font: inherit; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }

/* ── TOKENS — LIGHT ─────────────────────────────────────────── */
.theme-light {
  --bg:               #F2F2F7;
  --bg-elevated:      #FFFFFF;
  --bg-card:          #FFFFFF;
  --bg-input:         #FFFFFF;
  --bg-overlay:       rgba(0,0,0,0.4);
  --text-primary:     #1C1C1E;
  --text-secondary:   #3C3C43;
  --text-tertiary:    #8E8E93;
  --text-placeholder: #C7C7CC;
  --accent:           #007AFF;
  --accent-hover:     #0063CC;
  --accent-light:     #E5F1FF;
  --accent-fg:        #FFFFFF;
  --danger:           #FF3B30;
  --danger-light:     #FFEEED;
  --warning:          #FF9500;
  --warning-light:    #FFF4E5;
  --success:          #34C759;
  --success-light:    #E8FAF0;
  --border:           rgba(60,60,67,0.18);
  --border-strong:    rgba(60,60,67,0.36);
  --separator:        rgba(60,60,67,0.12);
  --shadow-sm:        0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.06);
  --shadow-md:        0 4px 16px rgba(0,0,0,0.10), 0 1px 4px rgba(0,0,0,0.06);
  --shadow-lg:        0 12px 40px rgba(0,0,0,0.14), 0 2px 8px rgba(0,0,0,0.08);
  --radius-sm:        8px;
  --radius-md:        12px;
  --radius-lg:        16px;
  --radius-xl:        20px;
  --radius-pill:      999px;
  --badge-student-bg:  #E5F1FF; --badge-student-fg:  #007AFF;
  --badge-lecturer-bg: #E8FAF0; --badge-lecturer-fg: #1A7F3C;
  --badge-admin-bg:    #FFF4E5; --badge-admin-fg:    #B45309;
  --deadline-bg:      #FFF4E5; --deadline-fg:      #B45309;
  --panel-stub-bg:    #F7F7FA;
  --scrollbar-thumb:  rgba(0,0,0,0.2);
  --topbar-bg:        rgba(255,255,255,0.85);
  --popover-bg:       #FFFFFF;
}

/* ── TOKENS — DARK ──────────────────────────────────────────── */
.theme-dark {
  --bg:               #000000;
  --bg-elevated:      #1C1C1E;
  --bg-card:          #2C2C2E;
  --bg-input:         #3A3A3C;
  --bg-overlay:       rgba(0,0,0,0.6);
  --text-primary:     #FFFFFF;
  --text-secondary:   #EBEBF5;
  --text-tertiary:    #8E8E93;
  --text-placeholder: #636366;
  --accent:           #0A84FF;
  --accent-hover:     #409CFF;
  --accent-light:     rgba(10,132,255,0.18);
  --accent-fg:        #FFFFFF;
  --danger:           #FF453A; --danger-light:  rgba(255,69,58,0.15);
  --warning:          #FF9F0A; --warning-light: rgba(255,159,10,0.15);
  --success:          #30D158; --success-light: rgba(48,209,88,0.15);
  --border:           rgba(255,255,255,0.12);
  --border-strong:    rgba(255,255,255,0.24);
  --separator:        rgba(255,255,255,0.08);
  --shadow-sm:        0 1px 3px rgba(0,0,0,0.4);
  --shadow-md:        0 4px 16px rgba(0,0,0,0.5);
  --shadow-lg:        0 12px 40px rgba(0,0,0,0.6);
  --radius-sm: 8px; --radius-md: 12px; --radius-lg: 16px; --radius-xl: 20px; --radius-pill: 999px;
  --badge-student-bg:  rgba(10,132,255,0.18); --badge-student-fg:  #0A84FF;
  --badge-lecturer-bg: rgba(48,209,88,0.18);  --badge-lecturer-fg: #30D158;
  --badge-admin-bg:    rgba(255,159,10,0.18);  --badge-admin-fg:    #FF9F0A;
  --deadline-bg: rgba(255,159,10,0.15); --deadline-fg: #FF9F0A;
  --panel-stub-bg: #1C1C1E;
  --scrollbar-thumb: rgba(255,255,255,0.2);
  --topbar-bg:      rgba(28,28,30,0.9);
  --popover-bg:     #2C2C2E;
}

/* ── SCROLLBAR ──────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--scrollbar-thumb); border-radius: var(--radius-pill); }

/* ── FOCUS RING ─────────────────────────────────────────────── */
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: var(--radius-sm); }

/* ── SPLASH ─────────────────────────────────────────────────── */
.splash { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 100dvh; gap: 1.25rem; }
.splash-text { font-size: 0.9rem; color: var(--text-tertiary); font-weight: 500; letter-spacing: 0.02em; }
.spinner-ring { width: 36px; height: 36px; border: 3px solid var(--border); border-top-color: var(--accent); border-radius: 50%; animation: spin 0.7s linear infinite; }
.spinner { display: inline-block; width: 16px; height: 16px; border: 2px solid rgba(255,255,255,0.4); border-top-color: #fff; border-radius: 50%; animation: spin 0.7s linear infinite; vertical-align: middle; }
@keyframes spin { to { transform: rotate(360deg); } }
.splash-brand {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 8px;
  opacity: 0.75;
}

.splash-brand-name {
  font-family: 'Nunito', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary, #888);
  white-space: nowrap;
  letter-spacing: 0.02em;
}
/* ── VISUALLY HIDDEN ────────────────────────────────────────── */
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }

/* ================================================================
   AUTH PAGE
   ================================================================ */

.auth-page {
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background: var(--bg);
  background-image:
    radial-gradient(ellipse 80% 60% at 20% 10%, var(--accent-light) 0%, transparent 60%),
    radial-gradient(ellipse 60% 50% at 80% 90%, var(--accent-light) 0%, transparent 60%);
  position: relative;
}

.auth-topbar {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 100;
}
.auth-topbar-right { position: relative; }
.auth-ctrl-wrap   { position: relative; }

.auth-ctrl-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text-tertiary);
  box-shadow: var(--shadow-sm);
  transition: color 0.15s, background 0.15s;
}
.auth-ctrl-btn:hover { color: var(--text-primary); background: var(--bg-card); }

.auth-settings-popover {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 210px;
  background: var(--popover-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 12px;
  z-index: 200;
  animation: pop-in 0.15s cubic-bezier(0.34,1.56,0.64,1) both;
}
@keyframes pop-in { from { opacity:0; transform: scale(0.93) translateY(-4px); } to { opacity:1; transform: scale(1) translateY(0); } }

.popover-label { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.07em; text-transform: uppercase; color: var(--text-tertiary); margin-bottom: 6px; }
.popover-row   { display: flex; gap: 6px; flex-wrap: wrap; }
.popover-sep   { height: 1px; background: var(--separator); margin: 10px 0; }

.popover-opt {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 10px; border-radius: var(--radius-sm);
  font-size: 0.82rem; font-weight: 600; color: var(--text-secondary);
  border: 1.5px solid transparent;
  transition: background 0.12s, border-color 0.12s, color 0.12s;
}
.popover-opt:hover  { background: var(--accent-light); color: var(--accent); }
.popover-opt.active { border-color: var(--accent); background: var(--accent-light); color: var(--accent); }

.auth-card {
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
  padding: 2.5rem 2rem;
  width: 100%;
  max-width: 400px;
  animation: card-enter 0.4s cubic-bezier(0.34,1.56,0.64,1) both;
}
@keyframes card-enter { from { opacity:0; transform: translateY(20px) scale(0.97); } to { opacity:1; transform: none; } }

.auth-brand { margin-bottom: 2rem; }
.auth-welcome-back {
  font-size: 1.7rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.03em;
  line-height: 1.2;
}
.auth-sign-line {
  font-size: 0.9rem;
  color: var(--text-tertiary);
  font-weight: 500;
  margin-top: 4px;
}

.auth-btn-stack { display: flex; flex-direction: column; gap: 10px; }

.auth-provider-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--border-strong);
  background: var(--bg-elevated);
  color: var(--text-primary);
  font-size: 0.9rem;
  font-weight: 600;
  text-align: left;
  transition: background 0.15s, border-color 0.15s, transform 0.1s, box-shadow 0.15s;
}
.auth-provider-btn:hover {
  background: var(--bg);
  border-color: var(--accent);
  box-shadow: var(--shadow-sm);
}
.auth-provider-btn:active { transform: scale(0.98); }

.auth-provider-btn--outline {
  background: transparent;
  border-color: var(--border);
  color: var(--text-secondary);
}
.auth-provider-btn--outline:hover { border-color: var(--accent); color: var(--accent); }

.provider-icon { flex-shrink: 0; }

.auth-form-section { display: flex; flex-direction: column; gap: 1rem; }

.auth-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 0.25rem;
  padding: 2px 0;
}
.auth-back-btn:hover { opacity: 0.8; }

.field-group { display: flex; flex-direction: column; gap: 0.375rem; }
.field-label { font-size: 0.82rem; font-weight: 600; color: var(--text-secondary); letter-spacing: 0.01em; }
.field-hint  { font-size: 0.75rem; font-weight: 400; color: var(--text-tertiary); }

.field-input {
  width: 100%;
  padding: 0.7rem 0.875rem;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--border);
  background: var(--bg-input);
  color: var(--text-primary);
  font-size: 0.95rem;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.field-input::placeholder { color: var(--text-placeholder); }
.field-input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-light); }
.field-input-wrap { position: relative; }
.field-input-wrap .field-input { padding-right: 2.75rem; }
.btn-pw-toggle {
  position: absolute; right: 0.625rem; top: 50%; transform: translateY(-50%);
  padding: 0.25rem; color: var(--text-tertiary); border-radius: var(--radius-sm);
  transition: color 0.15s;
}
.btn-pw-toggle:hover { color: var(--text-primary); }

.field-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238E8E93' stroke-width='2.5'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  padding-right: 2rem;
}

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

.auth-hint { font-size: 0.8rem; color: var(--text-tertiary); }
.auth-link-btn { color: var(--accent); font-weight: 600; font-size: inherit; }
.auth-link-btn:hover { text-decoration: underline; }
.auth-error {
  font-size: 0.82rem; color: var(--danger); background: var(--danger-light);
  border-radius: var(--radius-sm); padding: 0.5rem 0.75rem; font-weight: 500;
}

/* Primary button */
.btn-primary {
  display: flex; align-items: center; justify-content: center; gap: 0.5rem;
  width: 100%; padding: 0.8rem 1rem; border-radius: var(--radius-md);
  background: var(--accent); color: var(--accent-fg);
  font-size: 0.95rem; font-weight: 700; letter-spacing: 0.01em;
  transition: background 0.15s, transform 0.1s, box-shadow 0.15s;
  box-shadow: 0 2px 8px rgba(0,122,255,0.3);
}
.btn-primary:hover { background: var(--accent-hover); box-shadow: 0 4px 14px rgba(0,122,255,0.4); }
.btn-primary:active { transform: scale(0.98); }
.btn-primary:disabled,
.btn--disabled { opacity: 0.5; cursor: not-allowed; pointer-events: none; transform: none; }
.btn-primary.btn-sm { padding: 0.5rem 0.875rem; font-size: 0.82rem; width: auto; }

/* Ghost button */
.btn-ghost { padding: 0.45rem 0.875rem; border-radius: var(--radius-sm); font-size: 0.875rem; font-weight: 600; color: var(--accent); transition: background 0.15s; }
.btn-ghost:hover { background: var(--accent-light); }
.btn-ghost.btn-sm { padding: 0.3rem 0.625rem; font-size: 0.8rem; }

/* Button sizes */
.btn-sm { padding: 0.45rem 0.9rem; font-size: 0.82rem; }

.btn-link {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
  padding: 0.35rem 0;
}
.btn-link:hover { text-decoration: underline; }

/* ================================================================
   DASHBOARD SHELL
   ================================================================ */

.dash-page { display: flex; flex-direction: column; min-height: 100dvh; }

/* ── Desktop: toast position only — nav is always the floating pill ── */
@media (min-width: 900px) {
  .toast-container {
    left: auto;
    right: 24px;
    bottom: 24px;
    width: auto;
    max-width: 360px;
  }
}

/* Topbar */
.dash-topbar {
  position: sticky; top: 0; z-index: 50;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1rem;
  padding: 0 1.25rem;
  height: 56px;
  background: var(--topbar-bg);
  backdrop-filter: blur(12px) saturate(180%);
  -webkit-backdrop-filter: blur(12px) saturate(180%);
  border-bottom: 1px solid var(--separator);
}

.topbar-left  { display: flex; align-items: center; }
.topbar-right { display: flex; align-items: center; justify-content: flex-end; }

.topbar-regnum {
  font-size: 0.75rem;
  color: var(--text-tertiary);
}

/* Profile button */
.topbar-profile-wrap { position: relative; }
.topbar-profile-btn  { display: flex; align-items: center; border-radius: var(--radius-pill); padding: 2px; transition: box-shadow 0.15s; }
.topbar-profile-btn:hover { box-shadow: 0 0 0 3px var(--accent-light); }

.topbar-avatar {
  width: 34px; height: 34px; border-radius: 50%;
  object-fit: cover; border: 2px solid var(--border);
}
.topbar-avatar--initials {
  display: flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--accent); color: var(--accent-fg);
  font-weight: 800; font-size: 0.85rem; border: 2px solid var(--border);
}

/* Profile popover */
.topbar-popover {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  width: 240px;
  background: var(--popover-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 12px;
  z-index: 200;
  animation: pop-in 0.15s cubic-bezier(0.34,1.56,0.64,1) both;
}
.topbar-popover-header { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.topbar-popover-name  { font-weight: 700; font-size: 0.9rem; color: var(--text-primary); }
.topbar-popover-role  { font-size: 0.75rem; color: var(--text-tertiary); text-transform: capitalize; }
.topbar-popover-sep   { height: 1px; background: var(--separator); margin: 8px 0; }
.popover-action-label { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.07em; text-transform: uppercase; color: var(--text-tertiary); margin-bottom: 5px; }

/* Toggle row */
.popover-toggle-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 6px 0; cursor: pointer; font-size: 0.85rem; font-weight: 600; color: var(--text-secondary);
}
.toggle-switch { position: relative; flex-shrink: 0; }
.toggle-switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.toggle-track {
  display: block; width: 36px; height: 20px; border-radius: 10px;
  background: var(--border-strong); transition: background 0.2s;
  position: relative;
}
.toggle-track::after {
  content: ''; position: absolute; top: 2px; left: 2px;
  width: 16px; height: 16px; border-radius: 50%; background: white;
  transition: transform 0.2s; box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}
.toggle-switch input:checked ~ .toggle-track { background: var(--success); }
.toggle-switch input:checked ~ .toggle-track::after { transform: translateX(16px); }

/* Popover menu items */
.popover-menu-item {
  display: flex; align-items: center; gap: 8px; width: 100%;
  padding: 7px 6px; border-radius: var(--radius-sm);
  font-size: 0.85rem; font-weight: 600; color: var(--text-secondary);
  transition: background 0.12s, color 0.12s;
}
.popover-menu-item:hover { background: var(--accent-light); color: var(--accent); }
.popover-menu-item--danger:hover { background: var(--danger-light); color: var(--danger); }

/* Day counter */
.topbar-days {
  display: flex; flex-direction: column; align-items: flex-end;
  gap: 0; line-height: 1;
}
.topbar-days-count { font-size: 1.2rem; font-weight: 800; color: var(--text-primary); letter-spacing: -0.03em; }
.topbar-days-label { font-size: 0.68rem; font-weight: 600; color: var(--text-tertiary); text-transform: uppercase; letter-spacing: 0.06em; }

/* Nav */
.dash-nav {
  display: flex;
  gap: 0.25rem;
  background: var(--bg);
  border-radius: var(--radius-pill);
  padding: 0.25rem;
}

.dash-nav-btn {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.9rem;
  border-radius: var(--radius-pill);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-tertiary);
  background: transparent;
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
}

.dash-nav-btn .nav-icon { font-size: 1rem; }

.dash-nav-btn:hover {
  background: var(--bg-elevated);
  color: var(--text-primary);
}

.dash-nav-btn.active {
  background: var(--bg-elevated);
  color: var(--accent);
  box-shadow: var(--shadow-sm);
}

/* Main content — pad bottom so content clears the floating nav pill */
.dash-main { flex: 1; overflow-y: auto; padding: 1.25rem; padding-bottom: 110px; }

/* Panel base */
.panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.panel-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.panel-sub {
  font-size: 0.8rem;
  color: var(--text-tertiary);
  font-weight: 500;
  margin-top: 0.15rem;
}

.panel-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4rem 2rem;
  gap: 0.75rem;
  text-align: center;
}

.panel-empty-icon {
  font-size: 2.5rem;
  opacity: 0.5;
}

.panel-empty-text {
  font-size: 0.9rem;
  color: var(--text-tertiary);
  max-width: 280px;
}

/* ================================================================
   DISTRICTS (RegionWorker)
   ================================================================ */

.district-panel { max-width: 100%; }
.district-header { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 1rem; }

.district-search-wrap { position: relative; margin-bottom: 0.75rem; }
.district-search-icon {
  position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
  color: var(--text-tertiary); pointer-events: none;
}
.district-search-input {
  width: 100%; padding: 0.6rem 0.875rem 0.6rem 2.25rem;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text-primary); font-size: 0.875rem;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.district-search-input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-light); }

.district-table-head {
  display: grid;
  grid-template-columns: 36px 1fr 160px 60px 140px 110px;
  gap: 0.5rem;
  align-items: center;
  padding: 0.4rem 0.75rem;
  font-size: 0.7rem; font-weight: 700; letter-spacing: 0.07em; text-transform: uppercase;
  color: var(--text-tertiary);
  border-bottom: 1px solid var(--separator);
  margin-bottom: 0.25rem;
}

.district-list { display: flex; flex-direction: column; gap: 2px; }
.district-row {
  display: grid;
  grid-template-columns: 36px 1fr 160px 60px 140px 110px;
  gap: 0.5rem;
  align-items: center;
  padding: 0.75rem 0.75rem;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  background: var(--bg-elevated);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.district-row:hover         { border-color: var(--border); box-shadow: var(--shadow-sm); }
.district-row--selected     { border-color: var(--accent) !important; background: var(--accent-light); }
.district-row--full         { opacity: 0.7; }

.col-idx    { font-size: 0.75rem; font-weight: 700; color: var(--text-tertiary); text-align: center; }
.col-name   { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.district-name { font-weight: 700; font-size: 0.9rem; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.district-desc { font-size: 0.75rem; color: var(--text-tertiary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.col-capacity { display: flex; flex-direction: column; gap: 4px; }
.cap-badge {
  display: inline-flex; align-items: center;
  padding: 2px 8px; border-radius: var(--radius-pill);
  font-size: 0.72rem; font-weight: 700; width: fit-content;
}
.cap-badge--full  { background: var(--success-light); color: var(--success); }
.cap-badge--open  { background: var(--warning-light); color: var(--warning); }

.cap-bar { height: 5px; border-radius: var(--radius-pill); background: var(--border); overflow: hidden; }
.cap-bar-fill { height: 100%; border-radius: var(--radius-pill); transition: width 0.4s ease; }
.cap-bar-fill--full { background: var(--success); }
.cap-bar-fill--half { background: var(--accent); }
.cap-bar-fill--low  { background: var(--warning); }

.col-weather { font-size: 1.3rem; text-align: center; }
.weather-icon { filter: drop-shadow(0 1px 2px rgba(0,0,0,0.15)); }

.col-team { display: flex; align-items: center; }
.col-action { display: flex; align-items: center; justify-content: flex-end; }

/* Avatar stack */
.avatar-stack { display: flex; align-items: center; }
.avatar-wrap  { position: relative; flex-shrink: 0; }
.avatar-chip {
  width: 28px; height: 28px; border-radius: 50%;
  border: 2px solid var(--bg-elevated);
  object-fit: cover; display: flex; align-items: center; justify-content: center;
  font-size: 0.65rem; font-weight: 800; flex-shrink: 0;
}
.avatar-chip--img    { background: var(--border); }
.avatar-chip--more   { background: var(--border); color: var(--text-tertiary); font-size: 0.6rem; }
.avatar-chip--initials[data-color="blue"]   { background: #E5F1FF; color: #007AFF; }
.avatar-chip--initials[data-color="green"]  { background: #E8FAF0; color: #1A7F3C; }
.avatar-chip--initials[data-color="purple"] { background: #F0EAFF; color: #7B5CF6; }
.avatar-chip--initials[data-color="orange"] { background: #FFF4E5; color: #B45309; }
.avatar-chip--initials[data-color="pink"]   { background: #FFE5F0; color: #C2185B; }
.avatar-chip--initials[data-color="teal"]   { background: #E0F7FA; color: #00838F; }
.avatar-badge {
  position: absolute; top: -3px; right: -3px;
  background: var(--accent); color: white; border-radius: var(--radius-pill);
  font-size: 0.55rem; font-weight: 800; padding: 1px 4px; min-width: 14px; text-align: center;
  border: 1.5px solid var(--bg-elevated);
}
.no-team { font-size: 0.75rem; color: var(--text-tertiary); }

.district-selected-tag {
  padding: 4px 10px; border-radius: var(--radius-pill);
  background: var(--success-light); color: var(--success);
  font-size: 0.75rem; font-weight: 700;
}
.district-full-tag {
  padding: 4px 10px; border-radius: var(--radius-pill);
  background: var(--border); color: var(--text-tertiary);
  font-size: 0.75rem; font-weight: 700;
}

.btn-select-district {
  padding: 5px 14px; border-radius: var(--radius-pill);
  background: var(--accent); color: white;
  font-size: 0.78rem; font-weight: 700;
  transition: background 0.15s, transform 0.1s;
}
.btn-select-district:hover  { background: var(--accent-hover); }
.btn-select-district:active { transform: scale(0.96); }
.btn-select-district:disabled { opacity: 0.5; }

/* ── REGION CARD EXTRAS ───────────────────────────────────── */

.region-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.region-card-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.25rem;
}

.region-badge {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-pill);
}

.region-badge--selected  { background: var(--accent-light);   color: var(--accent); }
.region-badge--full      { background: var(--danger-light);   color: var(--danger); }
.region-badge--open      { background: var(--success-light);  color: var(--success); }

/* ================================================================
   CHAT (ReportWorker)
   ================================================================ */

.chat-shell {
  display: flex; flex-direction: column;
  height: calc(100dvh - 56px - 2.5rem);
  max-width: 860px; margin: 0 auto; width: 100%;
}

.chat-topbar {
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--separator);
  margin-bottom: 0.5rem;
}
.chat-filter-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chat-chip {
  padding: 4px 12px; border-radius: var(--radius-pill);
  font-size: 0.78rem; font-weight: 700;
  color: var(--text-tertiary); border: 1.5px solid var(--border);
  background: var(--bg-elevated);
  transition: all 0.12s;
}
.chat-chip:hover  { border-color: var(--accent); color: var(--accent); }
.chat-chip.active { border-color: var(--accent); background: var(--accent-light); color: var(--accent); }

.chat-pinned { display: flex; flex-direction: column; gap: 4px; margin-bottom: 8px; }
.chat-pinned-item {
  display: flex; align-items: center; gap: 6px;
  padding: 6px 12px; border-radius: var(--radius-md);
  background: var(--warning-light); color: var(--warning);
  font-size: 0.8rem; font-weight: 600;
}

.chat-feed {
  flex: 1; overflow-y: auto; padding: 0.5rem 0;
  display: flex; flex-direction: column; gap: 12px;
}
.chat-empty { display: flex; align-items: center; justify-content: center; flex: 1; }
.chat-empty p { font-size: 0.875rem; color: var(--text-tertiary); }

.msg-wrap { display: flex; align-items: flex-end; gap: 8px; }
.msg-wrap--own { flex-direction: row-reverse; }

.msg-avatar {
  width: 30px; height: 30px; border-radius: 50%; flex-shrink: 0;
  object-fit: cover; border: 2px solid var(--border);
}
.msg-avatar--initials {
  display: flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; border-radius: 50%;
  font-size: 0.7rem; font-weight: 800; border: 2px solid var(--border);
  flex-shrink: 0;
}
.msg-avatar--initials[data-color="blue"]   { background: #E5F1FF; color: #007AFF; }
.msg-avatar--initials[data-color="green"]  { background: #E8FAF0; color: #1A7F3C; }
.msg-avatar--initials[data-color="purple"] { background: #F0EAFF; color: #7B5CF6; }
.msg-avatar--initials[data-color="orange"] { background: #FFF4E5; color: #B45309; }
.msg-avatar--initials[data-color="pink"]   { background: #FFE5F0; color: #C2185B; }
.msg-avatar--initials[data-color="teal"]   { background: #E0F7FA; color: #00838F; }

.msg-bubble {
  max-width: 65%; position: relative;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 10px 14px;
  box-shadow: var(--shadow-sm);
}
.msg-bubble--own   { background: var(--accent); color: var(--accent-fg); border-color: transparent; }
.msg-bubble--own .msg-name, .msg-bubble--own .msg-time { color: rgba(255,255,255,0.7); }
.msg-bubble--pinned { border-color: var(--warning); background: var(--warning-light); }

.msg-name { font-size: 0.72rem; font-weight: 700; color: var(--accent); display: block; margin-bottom: 3px; }
.msg-text { font-size: 0.875rem; line-height: 1.5; word-break: break-word; }
.msg-time { font-size: 0.65rem; color: var(--text-tertiary); display: block; margin-top: 4px; text-align: right; }
.msg-bubble--own .msg-time { color: rgba(255,255,255,0.6); }

.msg-hashtag { color: var(--accent); font-weight: 700; cursor: pointer; }
.msg-hashtag:hover { text-decoration: underline; }
.msg-mention  { color: var(--success); font-weight: 700; }

.msg-attachment { margin-top: 8px; }
.msg-image { max-width: 240px; border-radius: var(--radius-md); border: 1px solid var(--border); cursor: pointer; }
.msg-file-link {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 10px; border-radius: var(--radius-sm);
  background: rgba(0,0,0,0.06); font-size: 0.8rem; font-weight: 600;
  color: var(--text-secondary);
}
.msg-file-link:hover { background: rgba(0,0,0,0.1); }

.msg-actions { display: flex; gap: 4px; margin-top: 6px; justify-content: flex-end; }
.msg-action-btn {
  display: flex; align-items: center; justify-content: center;
  width: 24px; height: 24px; border-radius: var(--radius-sm);
  color: var(--text-tertiary); transition: background 0.12s, color 0.12s;
}
.msg-action-btn:hover { background: var(--danger-light); color: var(--danger); }
.btn-pin-msg:hover    { background: var(--warning-light); color: var(--warning); }

/* Composer */
.chat-composer { padding-top: 0.75rem; border-top: 1px solid var(--separator); }

.chat-file-previews { display: flex; flex-wrap: wrap; gap: 8px; padding-bottom: 8px; }
.file-preview-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 8px 4px 4px;
  background: var(--bg-elevated); border: 1px solid var(--border);
  border-radius: var(--radius-sm); font-size: 0.78rem; font-weight: 600; color: var(--text-secondary);
}
.file-preview-thumb { width: 28px; height: 28px; border-radius: 4px; object-fit: cover; }
.file-preview-name  { max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-preview-remove { color: var(--text-tertiary); font-size: 0.75rem; margin-left: 2px; transition: color 0.12s; }
.file-preview-remove:hover { color: var(--danger); }

.chat-composer-row {
  display: flex; align-items: flex-end; gap: 8px;
  background: var(--bg-elevated);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 6px 8px;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.chat-composer-row:focus-within {
  border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-light);
}

.chat-input-wrap { flex: 1; }
.chat-input {
  width: 100%; resize: none; border: none; background: transparent;
  color: var(--text-primary); font-size: 0.9rem; line-height: 1.5;
  max-height: 120px; overflow-y: auto;
}
.chat-input:focus { outline: none; }
.chat-input::placeholder { color: var(--text-placeholder); }

.chat-action-btn {
  display: flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: var(--radius-md);
  color: var(--text-tertiary); flex-shrink: 0; cursor: pointer;
  transition: color 0.15s, background 0.15s;
}
.chat-action-btn:hover { color: var(--accent); background: var(--accent-light); }
.chat-action-btn.active { color: var(--warning); background: var(--warning-light); }

.chat-send-btn {
  display: flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: var(--radius-md);
  background: var(--accent); color: white; flex-shrink: 0;
  transition: background 0.15s, transform 0.1s;
}
.chat-send-btn:hover  { background: var(--accent-hover); }
.chat-send-btn:active { transform: scale(0.92); }
.chat-send-btn:disabled { opacity: 0.5; }

/* ── REPORT FORM ──────────────────────────────────────────── */

.report-form-wrap { margin-bottom: 1.5rem; }

.report-form {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.reaction-picker { display: flex; gap: 0.75rem; flex-wrap: wrap; }

.reaction-opt { display: flex; align-items: center; gap: 0.4rem; cursor: pointer; }
.reaction-opt input { accent-color: var(--accent); }

.reaction-label {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-pill);
  cursor: pointer;
}

.reaction-label--help      { background: var(--danger-light);  color: var(--danger); }
.reaction-label--amazed    { background: var(--success-light); color: var(--success); }
.reaction-label--reference { background: var(--accent-light);  color: var(--accent); }

.form-error { font-size: 0.82rem; color: var(--danger); font-weight: 600; }

.form-actions { display: flex; justify-content: flex-end; gap: 0.5rem; }

/* ── REPORT FEED ──────────────────────────────────────────── */

.report-feed { display: flex; flex-direction: column; gap: 0.75rem; }

.report-card-regnum { font-size: 0.75rem; color: var(--text-tertiary); font-weight: 400; }

.dash-avatar--sm { width: 32px; height: 32px; font-size: 0.8rem; flex-shrink: 0; }

/* ================================================================
   FILES PANEL (FileWorker)
   ================================================================ */

.files-header-actions { display: flex; align-items: center; gap: 8px; }

.view-toggle { display: flex; gap: 2px; background: var(--border); border-radius: var(--radius-sm); padding: 2px; }
.view-btn {
  display: flex; align-items: center; justify-content: center;
  width: 26px; height: 26px; border-radius: 6px;
  color: var(--text-tertiary); transition: all 0.12s;
}
.view-btn:hover  { color: var(--text-primary); }
.view-btn.active { background: var(--bg-elevated); color: var(--accent); box-shadow: var(--shadow-sm); }

.file-upload-label {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 6px 14px; border-radius: var(--radius-md);
  background: var(--accent); color: white;
  font-size: 0.82rem; font-weight: 700; cursor: pointer;
  transition: background 0.15s;
}
.file-upload-label:hover { background: var(--accent-hover); }

.upload-progress-wrap {
  margin-bottom: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.upload-progress-bar {
  height: 4px;
  background: var(--separator);
  border-radius: var(--radius-pill);
  overflow: hidden;
}
.upload-progress-fill {
  height: 100%; width: 0%;
  background: var(--accent); border-radius: var(--radius-pill);
  transition: width 0.3s ease;
}
.upload-progress-label { font-size: 0.78rem; color: var(--text-tertiary); }

.files-section { margin-bottom: 1.5rem; }
.files-section-header {
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 0.625rem; padding: 0 0.25rem;
}
.files-tag-label  { font-size: 0.8rem; font-weight: 700; color: var(--accent); }
.files-tag-count  { font-size: 0.75rem; color: var(--text-tertiary); }

/* Grid view */
.file-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 10px;
}
.file-card {
  background: var(--bg-elevated); border: 1px solid var(--border);
  border-radius: var(--radius-lg); overflow: hidden;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.file-card:hover { border-color: var(--accent); box-shadow: var(--shadow-md); }
.file-card-preview {
  aspect-ratio: 4/3; display: flex; align-items: center; justify-content: center;
  background: var(--bg); overflow: hidden;
}
.file-card-img  { width: 100%; height: 100%; object-fit: cover; }
.file-card-icon { font-size: 2rem; }
.file-card-info { padding: 8px 10px 4px; }
.file-card-name { font-size: 0.78rem; font-weight: 700; color: var(--text-primary); display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.file-card-meta { font-size: 0.68rem; color: var(--text-tertiary); display: block; margin-top: 2px; }
.file-card-actions { display: flex; gap: 4px; justify-content: flex-end; padding: 4px 8px 8px; }

/* List view */
.file-list { display: flex; flex-direction: column; gap: 0.5rem; }
.file-list-view { display: flex; flex-direction: column; gap: 2px; }

.file-row {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0.875rem 1rem;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.file-row:hover { border-color: var(--border); box-shadow: var(--shadow-sm); }

.file-row-icon  { font-size: 1.4rem; flex-shrink: 0; }
.file-row-info  { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 0.2rem; }
.file-row-name  { font-size: 0.875rem; font-weight: 600; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.file-row-meta  { font-size: 0.75rem; color: var(--text-tertiary); }
.file-row-actions { display: flex; gap: 0.25rem; flex-shrink: 0; }

/* ================================================================
   TOAST
   ================================================================ */

.toast-container {
  position: fixed; bottom: 1.25rem; left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  z-index: 1000; pointer-events: none;
}
.toast {
  padding: 10px 18px; border-radius: var(--radius-pill);
  font-size: 0.85rem; font-weight: 600;
  box-shadow: var(--shadow-md); pointer-events: auto;
  animation: toast-in 0.3s cubic-bezier(0.34,1.56,0.64,1) both;
}
.toast--success { background: var(--success); color: white; border-left: 3px solid var(--success); }
.toast--error   { background: var(--danger);  color: white; border-left: 3px solid var(--danger); }
.toast--info    { background: var(--bg-elevated); color: var(--text-primary); border: 1px solid var(--border); border-left: 3px solid var(--accent); }
@keyframes toast-in { from { opacity:0; transform: translateY(12px) scale(0.9); } to { opacity:1; transform: none; } }

/* ================================================================
   PROFILE SHEET  (dmo-ps-*)
   Apple HIG bottom sheet — fixed, full-viewport, blur backdrop.
   Slides up from bottom; touch-friendly; safe-area aware.
   ================================================================ */

/* ── Backdrop ───────────────────────────────────────────────── */
.dmo-ps-backdrop {
  position: fixed;
  inset: 0;
  z-index: 900;
  background: var(--bg-overlay);
  backdrop-filter: blur(8px) saturate(160%);
  -webkit-backdrop-filter: blur(8px) saturate(160%);
  opacity: 0;
  transition: opacity 0.28s ease;
}
.dmo-ps-backdrop.dmo-ps-open { opacity: 1; }

/* ── Sheet ──────────────────────────────────────────────────── */
.dmo-ps-sheet {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 901;
  background: var(--bg-elevated);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  border-top: 1px solid var(--border);
  box-shadow: 0 -8px 40px rgba(0,0,0,0.18);
  padding: 0 0 1rem;
  max-height: 88dvh;
  overflow-y: auto;
  overscroll-behavior: contain;
  transform: translateY(100%);
  transition: transform 0.32s cubic-bezier(0.32,0.72,0,1);
}
.dmo-ps-sheet.dmo-ps-open { transform: translateY(0); }

/* ── Handle ─────────────────────────────────────────────────── */
.dmo-ps-handle-wrap {
  display: flex; justify-content: center;
  padding: 10px 0 4px;
}
.dmo-ps-handle {
  width: 36px; height: 4px;
  border-radius: var(--radius-pill);
  background: var(--border-strong);
}

/* ── Profile card ───────────────────────────────────────────── */
.dmo-ps-profile-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 20px 16px;
}

.dmo-ps-avatar-wrap { flex-shrink: 0; }

.dmo-ps-avatar-img {
  width: 56px; height: 56px;
  border-radius: 50%;
  object-fit: cover;
  border: 2.5px solid var(--border-strong);
}
.dmo-ps-avatar-initials {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-fg);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.25rem; font-weight: 800;
  border: 2.5px solid var(--border-strong);
}

.dmo-ps-profile-info {
  flex: 1; min-width: 0;
  display: flex; flex-direction: column; gap: 5px;
}
.dmo-ps-name {
  font-size: 1rem; font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.dmo-ps-meta-row {
  display: flex; align-items: center; gap: 7px; flex-wrap: wrap;
}
.dmo-ps-badge {
  display: inline-flex; align-items: center;
  padding: 2px 9px;
  border-radius: var(--radius-pill);
  font-size: 0.7rem; font-weight: 700;
  letter-spacing: 0.04em; text-transform: uppercase;
}
.dmo-ps-badge--student  { background: var(--badge-student-bg);  color: var(--badge-student-fg); }
.dmo-ps-badge--lecturer { background: var(--badge-lecturer-bg); color: var(--badge-lecturer-fg); }
.dmo-ps-badge--admin    { background: var(--badge-admin-bg);    color: var(--badge-admin-fg); }

.dmo-ps-regnum {
  font-size: 0.72rem; font-weight: 600;
  color: var(--text-tertiary);
  letter-spacing: 0.02em;
}
.dmo-ps-district {
  display: flex; align-items: center; gap: 4px;
  font-size: 0.75rem; font-weight: 600;
  color: var(--text-tertiary);
}

/* ── Separator ──────────────────────────────────────────────── */
.dmo-ps-sep {
  height: 1px;
  background: var(--separator);
  margin: 2px 0;
}

/* ── Section label ──────────────────────────────────────────── */
.dmo-ps-section-label {
  font-size: 0.68rem; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--text-tertiary);
  padding: 12px 20px 6px;
}

/* ── Theme toggle ───────────────────────────────────────────── */
.dmo-ps-theme-row {
  display: flex;
  gap: 8px;
  padding: 0 20px 14px;
}
.dmo-ps-theme-btn {
  flex: 1;
  display: flex; align-items: center; justify-content: center;
  gap: 7px;
  padding: 9px 12px;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--border);
  background: var(--bg-card);
  color: var(--text-secondary);
  font-size: 0.85rem; font-weight: 600;
  transition: border-color 0.15s, background 0.15s, color 0.15s, box-shadow 0.15s;
}
.dmo-ps-theme-btn:hover {
  background: var(--accent-light);
  border-color: var(--accent);
  color: var(--accent);
}
.dmo-ps-theme-btn.active {
  background: var(--accent-light);
  border-color: var(--accent);
  color: var(--accent);
  box-shadow: var(--shadow-sm);
}
.dmo-ps-theme-icon { font-size: 1rem; line-height: 1; }

/* ── Language list ──────────────────────────────────────────── */
.dmo-ps-lang-list {
  display: flex; flex-direction: column;
  padding: 0 12px 14px;
  gap: 2px;
}
.dmo-ps-lang-row {
  display: flex; align-items: center; gap: 12px;
  width: 100%;
  padding: 10px 10px;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-size: 0.88rem; font-weight: 600;
  transition: background 0.12s, color 0.12s;
}
.dmo-ps-lang-row:hover  { background: var(--accent-light); color: var(--accent); }
.dmo-ps-lang-row.active { background: var(--accent-light); color: var(--accent); }

.dmo-ps-lang-flag  { font-size: 1.15rem; line-height: 1; flex-shrink: 0; }
.dmo-ps-lang-label { flex: 1; text-align: left; }
.dmo-ps-lang-check {
  opacity: 0;
  color: var(--accent);
  flex-shrink: 0;
  transition: opacity 0.12s;
}
.dmo-ps-lang-row.active .dmo-ps-lang-check { opacity: 1; }

/* ── Sign-out ────────────────────────────────────────────────── */
.dmo-ps-signout-btn {
  display: flex; align-items: center; gap: 10px;
  width: calc(100% - 40px);
  margin: 6px 20px 0;
  padding: 11px 14px;
  border-radius: var(--radius-md);
  border: 1.5px solid transparent;
  background: var(--danger-light);
  color: var(--danger);
  font-size: 0.88rem; font-weight: 700;
  transition: background 0.15s, border-color 0.15s;
}
.dmo-ps-signout-btn:hover {
  background: var(--danger);
  color: white;
  border-color: var(--danger);
}

/* ================================================================
   RESPONSIVE
   ================================================================ */

@media (max-width: 700px) {
  .district-table-head { display: none; }
  .district-row {
    grid-template-columns: 28px 1fr auto;
    grid-template-rows: auto auto;
    gap: 4px;
  }
  .col-capacity { grid-column: 1 / -1; }
  .col-weather, .col-team { display: none; }
  .col-action  { grid-column: 3; grid-row: 1; }

  .dash-topbar { padding: 0 1rem; }
  .dash-nav-btn span { display: none; }
  .dash-nav-btn { padding: 6px 10px; }
  .topbar-days  { display: none; }

  .msg-bubble { max-width: 80%; }
  .chat-shell { height: calc(100dvh - 56px - 2rem); }

  .file-grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
}

@media (max-width: 600px) {
  .dash-nav-btn .nav-label { display: none; }
  .dash-nav-btn { padding: 0.45rem 0.65rem; }
  .panel-header { flex-direction: column; }
  .file-row-meta { display: none; }
}
