/* =============================================================
   assets/css/app.css — ContentFlow · Estilos globais
   ============================================================= */

/* ---------- Reset & Base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  /* Paleta */
  --sidebar-bg:    #0f1117;
  --sidebar-hover: #1a1d27;
  --sidebar-active:#1e2235;
  --accent:        #6c63ff;
  --accent-light:  #8b84ff;
  --accent-glow:   rgba(108,99,255,.18);
  --danger:        #ff4d6d;
  --success:       #22c55e;
  --warning:       #f59e0b;
  --info:          #38bdf8;

  /* Superfícies */
  --bg:            #f4f5f9;
  --card-bg:       #ffffff;
  --border:        #e4e6ef;
  --border-light:  #f0f1f6;

  /* Texto */
  --text-primary:  #1a1d2e;
  --text-secondary:#6b7280;
  --text-muted:    #9ca3af;
  --text-sidebar:  #9aa5b4;
  --text-sidebar-active: #ffffff;

  /* Dimensões */
  --sidebar-w:     260px;
  --topbar-h:      64px;
  --radius:        12px;
  --radius-sm:     8px;
  --shadow:        0 2px 12px rgba(0,0,0,.07);
  --shadow-md:     0 4px 24px rgba(0,0,0,.10);

  /* Fontes */
  --font:          'Inter', system-ui, sans-serif;
  --font-mono:     'JetBrains Mono', monospace;
}

html { font-size: 15px; scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-light); }

img { max-width: 100%; display: block; }

/* ---------- Scrollbar ---------- */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: #c0c4d6; }

/* =============================================================
   SIDEBAR
   ============================================================= */
.sidebar {
  width: var(--sidebar-w);
  min-height: 100vh;
  background: var(--sidebar-bg);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 100;
  transition: transform .3s ease;
  overflow-y: auto;
}

#sidebarOverlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.5);
  z-index: 90;
}
#sidebarOverlay.visible { display: block; }

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 22px 22px 18px;
  border-bottom: 1px solid rgba(255,255,255,.06);
}

.brand-logo {
  width: 38px; height: 38px;
  background: var(--accent);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: .9rem; color: #fff;
  letter-spacing: -.5px;
  flex-shrink: 0;
  box-shadow: 0 0 0 4px var(--accent-glow);
}

.brand-name {
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: -.3px;
}
.brand-version {
  font-size: .65rem;
  color: var(--text-sidebar);
  letter-spacing: .5px;
  text-transform: uppercase;
}

/* Nav */
.sidebar-nav { flex: 1; padding: 12px 0; }

.nav-section-label {
  padding: 16px 22px 6px;
  font-size: .65rem;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: rgba(154,165,180,.45);
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 22px;
  color: var(--text-sidebar);
  font-size: .875rem;
  font-weight: 500;
  cursor: pointer;
  transition: background .18s, color .18s;
  border-radius: 0;
  position: relative;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav-item:hover {
  background: var(--sidebar-hover);
  color: #d1d5e0;
}

.nav-item.active {
  background: var(--sidebar-active);
  color: var(--text-sidebar-active);
}

.nav-item.active::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--accent);
  border-radius: 0 3px 3px 0;
}

.nav-item svg { width: 16px; height: 16px; flex-shrink: 0; opacity: .75; }
.nav-item.active svg { opacity: 1; }

/* Sidebar footer */
.sidebar-footer {
  padding: 16px 22px;
  border-top: 1px solid rgba(255,255,255,.06);
}

.user-card {
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: .8rem; color: #fff;
  flex-shrink: 0;
}

.user-info { flex: 1; min-width: 0; }
.user-name  { font-size: .82rem; font-weight: 600; color: #d1d5e0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-role  { font-size: .7rem; color: var(--text-sidebar); }

.btn-logout {
  background: none;
  border: none;
  color: var(--text-sidebar);
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  transition: color .18s;
}
.btn-logout:hover { color: var(--danger); }
.btn-logout svg { width: 16px; height: 16px; }

/* =============================================================
   MAIN WRAPPER
   ============================================================= */
.main-wrapper {
  margin-left: var(--sidebar-w);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Topbar */
.topbar {
  height: var(--topbar-h);
  background: var(--card-bg);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 28px;
  gap: 16px;
  position: sticky;
  top: 0;
  z-index: 50;
}

.topbar-title {
  flex: 1;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-primary);
}

.topbar-actions { display: flex; align-items: center; gap: 10px; }

/* Toggle sidebar (mobile) */
.sidebar-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 6px;
}
.sidebar-toggle svg { width: 22px; height: 22px; }

/* Page content */
.page-content {
  flex: 1;
  padding: 28px;
  max-width: 1280px;
  width: 100%;
}

/* =============================================================
   CARDS
   ============================================================= */
.card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.card-header {
  padding: 18px 22px;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  gap: 10px;
}

.card-title {
  font-size: .95rem;
  font-weight: 600;
  color: var(--text-primary);
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
}
.card-title svg { width: 18px; height: 18px; flex-shrink: 0; }

.card-body { padding: 22px; }
.card-footer {
  padding: 14px 22px;
  border-top: 1px solid var(--border-light);
  background: var(--bg);
}

/* Stats cards */
.stat-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  transition: box-shadow .2s, transform .2s;
}
.stat-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }

.stat-icon {
  width: 46px; height: 46px;
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.stat-icon svg { width: 22px; height: 22px; }
.stat-icon.purple { background: rgba(108,99,255,.12); color: var(--accent); }
.stat-icon.green  { background: rgba(34,197,94,.12);  color: var(--success); }
.stat-icon.yellow { background: rgba(245,158,11,.12); color: var(--warning); }
.stat-icon.blue   { background: rgba(56,189,248,.12); color: var(--info); }
.stat-icon.red    { background: rgba(255,77,109,.12); color: var(--danger); }

.stat-info { flex: 1; }
.stat-value { font-size: 1.7rem; font-weight: 700; color: var(--text-primary); line-height: 1; }
.stat-label { font-size: .78rem; color: var(--text-secondary); margin-top: 4px; }

/* =============================================================
   BUTTONS
   ============================================================= */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 18px;
  border-radius: var(--radius-sm);
  font-size: .85rem;
  font-weight: 500;
  font-family: var(--font);
  cursor: pointer;
  border: none;
  transition: all .18s;
  white-space: nowrap;
  text-decoration: none;
}
.btn svg { width: 15px; height: 15px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

.btn-primary   { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-light); color: #fff; box-shadow: 0 4px 14px var(--accent-glow); }

.btn-secondary { background: var(--bg); color: var(--text-primary); border: 1px solid var(--border); }
.btn-secondary:hover { background: var(--border-light); color: var(--text-primary); }

.btn-danger    { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #ff6b85; color: #fff; }

.btn-success   { background: var(--success); color: #fff; }
.btn-success:hover { background: #16a34a; color: #fff; }

.btn-sm { padding: 6px 12px; font-size: .8rem; }
.btn-lg { padding: 12px 26px; font-size: .95rem; }
.btn-icon { padding: 8px; width: 36px; height: 36px; justify-content: center; }
.btn-icon svg { width: 16px; height: 16px; }
.copy-icon-btn {
  width: 30px;
  height: 30px;
  padding: 0;
  justify-content: center;
  background: transparent;
  border-color: transparent;
  color: var(--text-muted);
}
.copy-icon-btn svg { width: 15px; height: 15px; }
.copy-icon-btn:hover,
.copy-icon-btn.btn-success,
.copy-icon-btn.btn-success:hover {
  background: transparent;
  border-color: transparent;
  box-shadow: none;
  color: var(--accent);
}
#tabArquivo svg,
#tabTexto svg { width: 16px; height: 16px; margin-right: 6px; vertical-align: -3px; }

/* =============================================================
   FORMS
   ============================================================= */
.form-group { margin-bottom: 18px; }
.form-label {
  display: block;
  font-size: .82rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
  letter-spacing: .2px;
  text-transform: uppercase;
}
.field-copy-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
}
.field-copy-header .form-label { margin-bottom: 0; }

.form-control,
.form-select {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: .9rem;
  font-family: var(--font);
  color: var(--text-primary);
  background: #fff;
  transition: border-color .18s, box-shadow .18s;
  outline: none;
}
.form-control:focus,
.form-select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}
.form-control.is-invalid { border-color: var(--danger); }
.form-hint { font-size: .76rem; color: var(--text-muted); margin-top: 5px; }
.form-error { font-size: .78rem; color: var(--danger); margin-top: 5px; font-weight: 500; }

textarea.form-control { resize: vertical; min-height: 130px; }

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
@media (max-width: 640px) { .form-row { grid-template-columns: 1fr; } }

/* Upload zone */
.upload-zone {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 40px 24px;
  text-align: center;
  cursor: pointer;
  transition: border-color .2s, background .2s;
  background: var(--bg);
}
.upload-zone:hover,
.upload-zone.drag-over {
  border-color: var(--accent);
  background: var(--accent-glow);
}
.upload-zone input[type=file] { display: none; }
.upload-icon { font-size: 2.5rem; margin-bottom: 12px; opacity: .5; }
.upload-label { font-size: .92rem; color: var(--text-secondary); }
.upload-label strong { color: var(--accent); }
.upload-hint { font-size: .75rem; color: var(--text-muted); margin-top: 6px; }

/* =============================================================
   TABLES
   ============================================================= */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .87rem; }
thead tr { background: var(--bg); }
th {
  padding: 11px 16px;
  text-align: left;
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .6px;
  text-transform: uppercase;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
td {
  padding: 13px 16px;
  border-bottom: 1px solid var(--border-light);
  color: var(--text-primary);
  vertical-align: middle;
}
tr:last-child td { border-bottom: none; }
tbody tr:hover { background: #fafbff; }
.td-actions { display: flex; gap: 6px; align-items: center; }

/* =============================================================
   BADGES
   ============================================================= */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 9px;
  border-radius: 99px;
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .3px;
  text-transform: uppercase;
}
.badge-primary   { background: rgba(108,99,255,.12); color: var(--accent); }
.badge-success   { background: rgba(34,197,94,.12);  color: #16a34a; }
.badge-warning   { background: rgba(245,158,11,.12); color: #b45309; }
.badge-danger    { background: rgba(255,77,109,.12); color: var(--danger); }
.badge-info      { background: rgba(56,189,248,.12); color: #0284c7; }
.badge-secondary { background: var(--bg); color: var(--text-secondary); border: 1px solid var(--border); }

/* =============================================================
   ALERTS / FLASH
   ============================================================= */
.alert {
  padding: 13px 18px;
  border-radius: var(--radius-sm);
  font-size: .87rem;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 20px;
}
.alert svg { width: 17px; height: 17px; flex-shrink: 0; margin-top: 1px; }
.alert-success { background: rgba(34,197,94,.10); border: 1px solid rgba(34,197,94,.25); color: #15803d; }
.alert-danger   { background: rgba(255,77,109,.10); border: 1px solid rgba(255,77,109,.25); color: #be123c; }
.alert-warning  { background: rgba(245,158,11,.10); border: 1px solid rgba(245,158,11,.25); color: #92400e; }
.alert-info     { background: rgba(56,189,248,.10); border: 1px solid rgba(56,189,248,.25); color: #075985; }

/* =============================================================
   GRID UTILITIES
   ============================================================= */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3,1fr); gap: 20px; }
.grid-4 { display: grid; grid-template-columns: repeat(4,1fr); gap: 20px; }

@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2,1fr); }
  .grid-3 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr; }
}

/* =============================================================
   SECTION CONTENT VIEWER
   ============================================================= */
.secao-conteudo {
  white-space: pre-wrap;
  font-size: .88rem;
  line-height: 1.75;
  color: var(--text-primary);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 18px;
  min-height: 120px;
  font-family: var(--font);
}

.secao-vazia {
  text-align: center;
  padding: 50px 20px;
  color: var(--text-muted);
}
.secao-vazia svg { width: 44px; height: 44px; margin: 0 auto 12px; opacity: .3; }
.secao-vazia p { font-size: .9rem; }

/* =============================================================
   LOGIN PAGE
   ============================================================= */
.login-page {
  min-height: 100vh;
  background: var(--sidebar-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.login-card {
  background: #16192a;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 18px;
  padding: 44px 40px;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 24px 60px rgba(0,0,0,.4);
}

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

.login-card .form-label { color: rgba(255,255,255,.6); }
.login-card .form-control {
  background: rgba(255,255,255,.06);
  border-color: rgba(255,255,255,.1);
  color: #fff;
}
.login-card .form-control:focus {
  background: rgba(255,255,255,.08);
  border-color: var(--accent);
}
.login-card .form-control::placeholder { color: rgba(255,255,255,.25); }
.login-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 4px;
}
.login-sub {
  font-size: .85rem;
  color: rgba(255,255,255,.4);
  margin-bottom: 28px;
}

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

.modal {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: 0 24px 60px rgba(0,0,0,.25);
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
  animation: modalIn .25s ease;
}
@keyframes modalIn {
  from { opacity: 0; transform: translateY(18px) scale(.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 10px;
}
.modal-title {
  font-size: .95rem;
  font-weight: 600;
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
}
.modal-title svg { width: 18px; height: 18px; flex-shrink: 0; }
.modal-close {
  background: none; border: none; cursor: pointer;
  color: var(--text-muted); padding: 4px;
  display: flex; align-items: center;
  transition: color .15s;
}
.modal-close:hover { color: var(--danger); }
.modal-close svg { width: 18px; height: 18px; }
.modal-body    { padding: 24px; }
.modal-footer  { padding: 16px 24px; border-top: 1px solid var(--border); display: flex; gap: 10px; justify-content: flex-end; }

/* =============================================================
   MISC UTILITIES
   ============================================================= */
.flex     { display: flex; }
.flex-col { display: flex; flex-direction: column; }
.items-center  { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.mt-1 { margin-top: 4px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; }
.mb-4 { margin-bottom: 16px; }
.mb-6 { margin-bottom: 24px; }
.w-full { width: 100%; }
.text-right { text-align: right; }
.text-center { text-align: center; }
.text-sm   { font-size: .82rem; }
.text-muted { color: var(--text-muted); }
.font-semibold { font-weight: 600; }
.separator { border: none; border-top: 1px solid var(--border); margin: 20px 0; }

/* Loading spinner */
.spinner {
  width: 20px; height: 20px;
  border: 2.5px solid rgba(108,99,255,.2);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin .7s linear infinite;
  display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Page header */
.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 24px;
  gap: 16px;
  flex-wrap: wrap;
}
.page-header-info h1 {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
}
.page-header-info p {
  font-size: .85rem;
  color: var(--text-secondary);
  margin-top: 4px;
}

/* Empty state */
.empty-state {
  text-align: center;
  padding: 60px 20px;
}
.empty-state svg { width: 56px; height: 56px; color: var(--text-muted); margin: 0 auto 16px; opacity: .4; }
.empty-state .btn svg { width: 15px; height: 15px; margin: 0; opacity: 1; color: currentColor; }
.empty-state h3 { font-size: 1rem; font-weight: 600; color: var(--text-secondary); margin-bottom: 8px; }
.empty-state p  { font-size: .85rem; color: var(--text-muted); }

/* Weekly pipeline */
.week-pipeline {
  display: grid;
  grid-template-columns: repeat(8, minmax(150px, 1fr));
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 4px;
}
.week-day {
  min-width: 150px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.week-day-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  background: #fff;
}
.week-day-head span {
  font-size: .82rem;
  font-weight: 700;
  color: var(--text-primary);
}
.week-day-head small {
  min-width: 22px;
  height: 22px;
  border-radius: 99px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(108,99,255,.12);
  color: var(--accent);
  font-size: .72rem;
  font-weight: 700;
}
.week-day-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px;
  min-height: 130px;
}
.week-empty {
  color: var(--text-muted);
  font-size: .78rem;
  text-align: center;
  padding: 22px 4px;
}
.week-item {
  background: #fff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 10px;
  box-shadow: 0 1px 4px rgba(0,0,0,.04);
}
.week-item.week-status-aprovado {
  background: rgba(34,197,94,.08);
  border-color: rgba(34,197,94,.28);
  box-shadow: inset 3px 0 0 #22c55e;
}
.week-item.week-status-publicado {
  background: rgba(56,189,248,.09);
  border-color: rgba(56,189,248,.30);
  box-shadow: inset 3px 0 0 #38bdf8;
}
.week-item-top,
.week-item-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.week-item-title {
  margin-top: 0;
  font-size: .84rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.35;
  overflow-wrap: anywhere;
}
.week-item-recording {
  margin-top: 6px;
  color: var(--text-secondary);
  font-size: .75rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
}
.week-item-body {
  margin-top: 6px;
  color: var(--text-secondary);
  font-size: .78rem;
  line-height: 1.45;
  overflow-wrap: anywhere;
}
.week-item-actions {
  justify-content: flex-end;
  margin-top: 10px;
}

/* =============================================================
   RESPONSIVE
   ============================================================= */
@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
    z-index: 110;
  }
  .sidebar.open {
    transform: translateX(0);
  }
  .main-wrapper {
    margin-left: 0;
  }
  .sidebar-toggle {
    display: flex;
  }
  .page-content {
    padding: 18px 16px;
  }
  .topbar {
    min-height: 58px;
    padding: 0 14px;
  }
  .page-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }
  .page-header > div:last-child {
    width: 100%;
    justify-content: flex-start;
  }
  .page-header h1 {
    font-size: 1.35rem;
  }
  .card-body {
    padding: 18px;
  }
  .modal {
    width: calc(100vw - 24px);
    max-height: calc(100dvh - 24px);
  }
  .modal-body {
    max-height: calc(100dvh - 150px);
    overflow-y: auto;
    padding: 18px;
  }
  .modal-footer {
    padding: 12px 18px;
  }
  .table-wrap {
    -webkit-overflow-scrolling: touch;
  }
  table {
    min-width: 720px;
  }
  .week-pipeline {
    grid-template-columns: repeat(8, minmax(132px, 1fr));
    -webkit-overflow-scrolling: touch;
  }
  .week-day {
    min-width: 132px;
  }
  .login-card {
    padding: 32px 24px;
  }
}

@media (display-mode: standalone) {
  body {
    overscroll-behavior-y: contain;
  }
}
