/* ================================================================
   PULSE — assets/css/style.css
   Design System: Liquid Glass UI  |  Paleta: #282829 #FFFDF0 #002A54 #8AA8FF #FF9800
   ================================================================ */

/* ---- Google Fonts ---- */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&family=Nunito:wght@300;400;600;700&display=swap');

/* ================================================================
   1. VARIÁVEIS GLOBAIS (DESIGN TOKENS)
   ================================================================ */
:root {
  /* Paleta principal */
  --clr-dark:     #282829;
  --clr-cream:    #FFFDF0;
  --clr-navy:     #002A54;
  --clr-blue:     #8AA8FF;
  --clr-orange:   #FF9800;

  /* Superfícies glass */
  --glass-bg:         rgba(255, 253, 240, 0.55);
  --glass-border:     rgba(255, 253, 240, 0.3);
  --glass-shadow:     0 8px 32px rgba(0, 42, 84, 0.12);
  --glass-blur:       blur(18px);

  /* Inputs */
  --input-bg:         rgba(255, 253, 240, 0.8);
  --input-bg-focus:   rgba(255, 253, 240, 1);
  --input-border:     rgba(0, 42, 84, 0.15);

  /* Texto */
  --text-primary:   #1a1a1b;
  --text-secondary: #3d3d3e;
  --text-muted:     #7a7a80;

  /* Dynamic Island */
  --di-bg:          rgba(16, 20, 32, 0.88);
  --di-border:      rgba(255, 255, 255, 0.10);
  --di-height:      52px;
  --di-top:         18px;

  /* Bordas */
  --radius-sm:   8px;
  --radius-md:   14px;
  --radius-lg:   20px;
  --radius-xl:   28px;

  /* Transições */
  --transition:  all 0.22s ease;
}

/* Tema Escuro */
:root[data-theme="escuro"], body[data-theme="escuro"], [data-theme="escuro"] {
  --clr-dark:     #FFFFFF; 
  --clr-cream:    #161616; /* Fundo principal escuro */
  --clr-navy:     #F3F3F3; /* Títulos etc */
  --clr-blue:     #8AA8FF; 
  --clr-orange:   #FF9800;

  --glass-bg:         #212121; /* Fundo sólido (Flat) */
  --glass-border:     rgba(255, 255, 255, 0.04);
  --glass-shadow:     0 4px 20px rgba(0, 0, 0, 0.4); /* Sombra suave escura */
  --glass-blur:       none; /* Sem blur (Flat) */

  --input-bg:         #171719; /* Input escuro */
  --input-bg-focus:   #101011; /* Foco mais profundo */
  --input-border:     rgba(255, 255, 255, 0.08);

  --text-primary:   #EAEAEA;
  --text-secondary: #A1A1AA;
  --text-muted:     #71717A;
  
  --di-bg:          #27272A;
}

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

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

body {
  font-family: 'Nunito', system-ui, sans-serif;
  background: var(--clr-cream);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  display: block;
  background-image:
    radial-gradient(ellipse 80% 60% at 20% 0%, rgba(138, 168, 255, 0.18) 0%, transparent 60%),
    radial-gradient(ellipse 60% 40% at 80% 100%, rgba(255, 152, 0, 0.10) 0%, transparent 60%);
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; }
img { max-width: 100%; }

/* Headings use Outfit */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
}

/* ================================================================
   3. GLASSMORPHISM CARD
   ================================================================ */
.glass {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  border-radius: var(--radius-lg);
}

/* ================================================================
   4. DYNAMIC ISLAND NAV
   ================================================================ */

/* Wrapper posicionado no topo */
.di-wrapper {
  position: fixed;
  top: var(--di-top);
  left: 50%;
  transform: translateX(-50%);
  z-index: 9000;
  width: max-content;
  max-width: calc(100vw - 2rem);
}

/* A pílula / island em si */
.dynamic-island {
  display: flex;
  align-items: center;
  gap: 0;
  height: var(--di-height);
  padding: 0 6px;
  background: var(--di-bg);
  backdrop-filter: blur(28px) saturate(180%);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
  border: 1px solid var(--di-border);
  border-radius: 99px;
  box-shadow:
    0 4px 6px rgba(0,0,0,0.12),
    0 16px 40px rgba(0,0,0,0.22),
    inset 0 1px 0 rgba(255,255,255,0.08);
  transition: box-shadow 0.3s ease;
}
.dynamic-island:hover {
  box-shadow:
    0 6px 12px rgba(0,0,0,0.18),
    0 24px 56px rgba(0,0,0,0.28),
    inset 0 1px 0 rgba(255,255,255,0.10);
}

/* Brand / Logo */
.di-brand {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0 0.9rem 0 0.8rem;
  color: #fff;
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: -0.3px;
  white-space: nowrap;
  flex-shrink: 0;
}
.di-brand i {
  color: var(--clr-orange);
  font-size: 1.1rem;
}
.di-brand-name {
  color: #fff;
}

/* Divider vertical */
.di-divider {
  width: 1px;
  height: 22px;
  background: rgba(255,255,255,0.12);
  flex-shrink: 0;
  margin: 0 2px;
}

/* Nav tabs container */
.di-tabs {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 0 6px;
}

/* Individual tab */
.di-tab {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.4rem 0.85rem;
  border-radius: 99px;
  color: rgba(255,255,255,0.55);
  font-size: 0.82rem;
  font-weight: 500;
  white-space: nowrap;
  text-decoration: none;
  transition: all 0.2s ease;
  position: relative;
}
.di-tab i {
  font-size: 0.88rem;
  flex-shrink: 0;
}
.di-tab-label {
  /* Labels visíveis por padrão — some em telas pequenas */
}
.di-tab:hover {
  color: rgba(255,255,255,0.9);
  background: rgba(255,255,255,0.08);
}
.di-tab--active {
  background: rgba(255, 152, 0, 0.18);
  color: var(--clr-orange) !important;
  font-weight: 600;
}
.di-tab--active::after {
  content: '';
  position: absolute;
  bottom: 4px;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--clr-orange);
}

/* User section */
.di-user {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0 0.8rem 0 0.7rem;
}
.di-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--clr-orange), #ff6b35);
  color: #fff;
  font-weight: 700;
  font-size: 0.78rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(255,152,0,0.4);
}
.di-username {
  color: rgba(255,255,255,0.75);
  font-size: 0.8rem;
  font-weight: 500;
  white-space: nowrap;
}
.di-logout {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  color: rgba(255,255,255,0.4);
  font-size: 0.78rem;
  transition: var(--transition);
  text-decoration: none;
  margin-left: 2px;
}
.di-logout:hover {
  background: rgba(255,107,107,0.18);
  color: #ff6b6b;
}

/* Main content — espaço para a island */
.main-content {
  margin-left: 0;
  flex: 1;
  padding: calc(var(--di-top) + var(--di-height) + 1.5rem) 2.5rem 2rem;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ================================================================
   5. PAGE HEADER
   ================================================================ */
.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.8rem;
  flex-wrap: wrap;
}
.page-header h1 {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--clr-navy);
  letter-spacing: -0.5px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.page-header h1 i { color: var(--clr-orange); font-size: 1.4rem; }
.page-subtitle { color: var(--text-muted); font-size: 0.9rem; margin-top: 0.2rem; }
.header-date { color: var(--text-secondary); font-size: 0.85rem; display: flex; align-items: center; gap: 0.4rem; margin-top: 0.4rem; }

/* ================================================================
   6. KPI CARDS
   ================================================================ */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.2rem;
  margin-bottom: 1.8rem;
}

.kpi-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.3rem 1.5rem;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.4s ease, transform 0.4s ease, box-shadow 0.22s ease;
}
.kpi-card.card-visible { opacity: 1; transform: translateY(0); }
.kpi-card:hover { box-shadow: 0 12px 40px rgba(0,42,84,0.18); transform: translateY(-2px); }

.kpi-icon {
  width: 50px; height: 50px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}
.kpi-blue   { background: rgba(138,168,255,0.18); color: #4a7aff; }
.kpi-orange { background: rgba(255,152,0,0.15);   color: var(--clr-orange); }
.kpi-green  { background: rgba(52,199,89,0.15);   color: #28a745; }
.kpi-teal   { background: rgba(0,206,201,0.15);   color: #00cec9; }

.kpi-value {
  display: block;
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--clr-navy);
  line-height: 1.1;
  letter-spacing: -0.5px;
}
.kpi-label { font-size: 0.78rem; color: var(--text-muted); font-weight: 500; }

/* ================================================================
   7. SECTION CARD / TABELAS
   ================================================================ */
.section-card {
  padding: 1.5rem;
  margin-bottom: 1.8rem;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}
.section-card.card-visible { opacity: 1; transform: translateY(0); }

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.2rem;
}
.section-header h2 {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--clr-navy);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.section-header h2 i { color: var(--clr-orange); }

.table-responsive { overflow-x: auto; }

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}
.data-table thead tr {
  border-bottom: 2px solid rgba(0,42,84,0.08);
}
.data-table th {
  text-align: left;
  padding: 0.7rem 1rem;
  font-weight: 600;
  color: var(--text-muted);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
}
.data-table td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid rgba(0,42,84,0.05);
  color: var(--text-secondary);
}
.data-table tbody tr:hover { background: rgba(138,168,255,0.06); }
.data-table tbody tr:last-child td { border-bottom: none; }
.empty-state {
  text-align: center;
  color: var(--text-muted);
  padding: 2.5rem !important;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

/* ================================================================
   8. BADGES DE STATUS
   ================================================================ */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.22rem 0.7rem;
  border-radius: 99px;
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
}
.badge-confirmado { background: rgba(52,199,89,0.15);   color: #1e8449; }
.badge-concluido  { background: rgba(138,168,255,0.2);  color: #2c4fa3; }
.badge-pendente   { background: rgba(255,152,0,0.18);   color: #b36a00; }
.badge-cancelado  { background: rgba(255,59,48,0.15);   color: #c0392b; }

.rank-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--clr-orange);
  color: white;
  font-size: 0.72rem;
  font-weight: 700;
  margin-right: 0.4rem;
}

/* ================================================================
   9. BOTÕES
   ================================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.55rem 1.2rem;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 600;
  border: none;
  transition: var(--transition);
  cursor: pointer;
  white-space: nowrap;
  text-decoration: none;
}
.btn-primary {
  background: var(--clr-orange);
  color: #fff;
}
.btn-primary:hover { background: #e68900; box-shadow: 0 4px 16px rgba(255,152,0,0.4); transform: translateY(-1px); }

.btn-ghost {
  background: rgba(0,42,84,0.06);
  color: var(--text-secondary);
  border: 1px solid rgba(0,42,84,0.12);
}
.btn-ghost:hover { background: rgba(0,42,84,0.1); }

.btn-danger {
  background: rgba(255,59,48,0.9);
  color: #fff;
}
.btn-danger:hover { background: #c0392b; }

.btn-sm { padding: 0.38rem 0.9rem; font-size: 0.8rem; }
.btn-block { width: 100%; justify-content: center; }

.btn-icon {
  padding: 0.4rem;
  border-radius: var(--radius-sm);
  background: transparent;
  border: none;
  font-size: 1rem;
  transition: var(--transition);
}
.btn-edit:hover  { background: rgba(138,168,255,0.2); color: #4a7aff; }
.btn-delete:hover { background: rgba(255,59,48,0.12); color: #c0392b; }
.action-btns { display: flex; gap: 0.3rem; }

.export-btns { display: flex; gap: 0.6rem; }

/* ================================================================
   10. FORMULÁRIOS & INPUTS
   ================================================================ */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.form-group label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1.2rem;
}
.span-2 { grid-column: span 2; }

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="date"],
input[type="time"],
select,
textarea {
  width: 100%;
  padding: 0.65rem 0.9rem;
  border: 1.5px solid var(--input-border);
  border-radius: var(--radius-sm);
  background: var(--input-bg);
  font-size: 0.875rem;
  color: var(--text-primary);
  transition: var(--transition);
  outline: none;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--clr-blue);
  background: var(--input-bg-focus);
  box-shadow: 0 0 0 3px rgba(138,168,255,0.2);
}
.input-invalid {
  border-color: #e74c3c !important;
  box-shadow: 0 0 0 3px rgba(231,76,60,0.15) !important;
}
.field-error {
  font-size: 0.77rem;
  color: #e74c3c;
  min-height: 14px;
  display: block;
}

.input-icon {
  position: relative;
  display: flex;
  align-items: center;
}
.input-icon > i:first-child {
  position: absolute;
  left: 0.8rem;
  color: var(--text-muted);
  font-size: 0.9rem;
  pointer-events: none;
}
.input-icon input { padding-left: 2.4rem; }

.toggle-pass {
  position: absolute;
  right: 0.6rem;
  background: none;
  border: none;
  color: var(--text-muted);
  padding: 0.2rem;
  cursor: pointer;
}

.select-filter {
  padding: 0.65rem 0.9rem;
  border: 1.5px solid var(--input-border);
  border-radius: var(--radius-sm);
  background: var(--input-bg);
  font-size: 0.875rem;
  color: var(--text-primary);
  outline: none;
  transition: var(--transition);
}
.select-filter:focus { border-color: var(--clr-blue); box-shadow: 0 0 0 3px rgba(138,168,255,0.2); }

textarea { resize: vertical; min-height: 64px; }

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  cursor: pointer;
  font-size: 0.875rem;
  color: var(--text-secondary);
}
.checkbox-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--clr-orange);
  cursor: pointer;
}

/* ================================================================
   11. SEARCH BAR / FILTROS
   ================================================================ */
.search-bar {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.85rem 1.2rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}
.search-bar .input-icon { flex: 1; min-width: 180px; }
.search-bar .input-icon input { min-width: 0; }

.filter-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr auto auto;
  gap: 0.8rem;
  align-items: center;
}

/* ================================================================
   12. MODAIS (LIQUID GLASS)
   ================================================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease;
  padding: 1rem;
}
.modal-overlay.active {
  opacity: 1;
  pointer-events: all;
}
.modal-overlay.active .modal {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.modal {
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 1.8rem;
  transform: translateY(20px) scale(0.97);
  opacity: 0;
  transition: transform 0.25s ease, opacity 0.25s ease;
}
.modal-lg { max-width: 700px; }
.modal-sm { max-width: 420px; }

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(0,42,84,0.08);
}
.modal-header h2 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--clr-navy);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.modal-close {
  background: none;
  border: none;
  font-size: 1.1rem;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.3rem;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}
.modal-close:hover { background: rgba(255,59,48,0.1); color: #e74c3c; }

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.7rem;
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(0,42,84,0.06);
}

/* ================================================================
   13. ALERTAS INLINE
   ================================================================ */
.alert {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  margin-bottom: 1.2rem;
}
.alert-error { background: rgba(231,76,60,0.12); color: #c0392b; border: 1px solid rgba(231,76,60,0.25); }

/* ================================================================
   14. TOAST NOTIFICATIONS
   ================================================================ */
#toast-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  z-index: 9999;
}

.toast {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.8rem 1.1rem;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  font-weight: 500;
  min-width: 260px;
  max-width: 380px;
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  box-shadow: 0 8px 24px rgba(0,0,0,0.14);
  opacity: 0;
  transform: translateX(24px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}
.toast-visible { opacity: 1; transform: translateX(0); }
.toast-success i { color: #27ae60; }
.toast-error   i { color: #e74c3c; }
.toast-warning i { color: var(--clr-orange); }
.toast-info    i { color: var(--clr-blue); }
.toast-close {
  margin-left: auto;
  background: none;
  border: none;
  font-size: 0.85rem;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.15rem;
}

/* ================================================================
   15. LOGIN PAGE
   ================================================================ */
.login-body {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: linear-gradient(135deg, var(--clr-navy) 0%, #003f7a 50%, #1a2a4a 100%);
  position: relative;
  overflow: hidden;
}

.login-bg { position: fixed; inset: 0; pointer-events: none; }
.login-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.3;
}
.blob1 {
  width: 400px; height: 400px;
  background: var(--clr-orange);
  top: -100px; right: -100px;
  animation: blobFloat 8s ease-in-out infinite;
}
.blob2 {
  width: 300px; height: 300px;
  background: var(--clr-blue);
  bottom: -80px; left: -80px;
  animation: blobFloat 10s ease-in-out infinite reverse;
}
@keyframes blobFloat {
  0%,100% { transform: translate(0,0) scale(1); }
  50%      { transform: translate(20px,-20px) scale(1.05); }
}

.login-container { position: relative; z-index: 1; width: 100%; max-width: 420px; padding: 1.5rem; }

.login-card {
  padding: 2.5rem;
  background: rgba(255,253,240,0.12);
  border: 1px solid rgba(255,255,255,0.18);
}

.login-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  font-size: 2rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 0.3rem;
  letter-spacing: -1px;
}
.login-logo i { color: var(--clr-orange); font-size: 2rem; }
.login-subtitle { text-align: center; color: rgba(255,255,255,0.55); font-size: 0.85rem; margin-bottom: 2rem; }

.login-card .form-group label { color: rgba(255,255,255,0.75); }
.login-card input {
  background: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.2);
  color: #fff;
}
.login-card input::placeholder { color: rgba(255,255,255,0.35); }
.login-card input:focus { border-color: var(--clr-orange); box-shadow: 0 0 0 3px rgba(255,152,0,0.2); }
.login-card .input-icon > i:first-child { color: rgba(255,255,255,0.4); }
.login-card .toggle-pass { color: rgba(255,255,255,0.4); }

.login-hint { text-align: center; color: rgba(255,255,255,0.3); font-size: 0.75rem; margin-top: 1.5rem; }

/* ================================================================
   16. USER CHIP INLINE
   ================================================================ */
.user-chip-inline {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* ================================================================
   17. RESPONSIVIDADE
   ================================================================ */

/* Telas médias — esconde labels, mantém ícones */
@media (max-width: 900px) {
  .di-tab-label,
  .di-brand-name,
  .di-username { display: none; }
  .di-tab { padding: 0.45rem 0.6rem; }
  .di-brand { padding: 0 0.5rem 0 0.6rem; }
  .di-user { padding: 0 0.5rem 0 0.4rem; gap: 0.4rem; }
  .main-content { padding: calc(var(--di-top) + var(--di-height) + 1.2rem) 1.2rem 1.5rem; }
}

@media (max-width: 640px) {
  :root { --di-top: 12px; }
  .main-content { padding: calc(var(--di-top) + var(--di-height) + 1rem) 1rem 1.5rem; }
  .filter-grid { grid-template-columns: 1fr 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .span-2 { grid-column: span 1; }
  .kpi-grid { grid-template-columns: 1fr 1fr; }
  .page-header { flex-direction: column; }
  .export-btns { width: 100%; }
  .modal { padding: 1.2rem; }
}
