/* =============================================
   ACELERADOR — Premium Theme
   Orla Experiência Imobiliária
   ============================================= */

/* Loading Overlay */
#loading-overlay {
  position: fixed; inset: 0; z-index: 9999;
  background: #04040c;
  display: flex; align-items: center; justify-content: center;
  flex-direction: column; gap: 16px;
  transition: opacity 0.4s;
}
#loading-overlay.hidden { opacity: 0; pointer-events: none; }
.loading-spinner {
  width: 44px; height: 44px;
  border: 3px solid rgba(201,168,76,0.15);
  border-top-color: #c9a84c;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading-text { color: #7070a0; font-size: 13px; font-family: 'Inter', sans-serif; }

:root {
  --bg-root:      #04040c;
  --bg-sidebar:   #080812;
  --bg-card:      #0e0e1c;
  --bg-card-hover:#13132a;
  --bg-input:     #0b0b1a;
  --bg-table-row: #0a0a18;
  --bg-table-alt: #0d0d20;

  --border:       rgba(201,168,76,0.12);
  --border-light: rgba(201,168,76,0.06);

  --gold:         #c9a84c;
  --gold-light:   #e8c96e;
  --gold-dim:     rgba(201,168,76,0.20);
  --gold-glow:    rgba(201,168,76,0.08);

  --text:         #e8e8f4;
  --text-muted:   #6868a0;
  --text-dim:     #9090c0;

  --hot:          #ff4757;
  --hot-bg:       rgba(255,71,87,0.12);
  --warm:         #ff9f1c;
  --warm-bg:      rgba(255,159,28,0.12);
  --cold:         #54a0ff;
  --cold-bg:      rgba(84,160,255,0.12);
  --blocked:      #a29bfe;
  --blocked-bg:   rgba(162,155,254,0.12);
  --closed:       #00d2d3;
  --closed-bg:    rgba(0,210,211,0.12);

  --sidebar-w:    260px;
  --radius:       10px;
  --radius-sm:    6px;
  --radius-lg:    14px;
  --transition:   0.2s cubic-bezier(0.4,0,0.2,1);
  --shadow:       0 4px 24px rgba(0,0,0,0.5);
  --shadow-card:  0 2px 12px rgba(0,0,0,0.4);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 14px; }

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg-root);
  color: var(--text);
  line-height: 1.5;
  overflow: hidden;
  height: 100vh;
}

/* =============================================
   APP LAYOUT
   ============================================= */
#app {
  display: flex;
  height: 100vh;
  overflow: hidden;
}

/* =============================================
   SIDEBAR
   ============================================= */
#sidebar {
  width: var(--sidebar-w);
  min-width: var(--sidebar-w);
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 28px 20px 24px;
  border-bottom: 1px solid var(--border-light);
}

.logo-icon {
  width: 36px;
  height: 36px;
  background: var(--gold-dim);
  border: 1px solid var(--gold);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold);
  flex-shrink: 0;
}
.logo-icon svg { width: 18px; height: 18px; }

.logo-text { display: flex; flex-direction: column; gap: 1px; }
.logo-name {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 3px;
  color: var(--gold);
}
.logo-sub {
  font-size: 9.5px;
  font-weight: 400;
  color: var(--text-muted);
  letter-spacing: 0.5px;
}

.sidebar-nav {
  flex: 1;
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  overflow-y: auto;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 500;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition);
  text-align: left;
  width: 100%;
  font-family: inherit;
  letter-spacing: 0.2px;
}
.nav-item svg { width: 17px; height: 17px; flex-shrink: 0; }
.nav-item:hover { background: var(--gold-glow); color: var(--text-dim); }
.nav-item.active {
  background: var(--gold-dim);
  color: var(--gold);
  border: 1px solid var(--border);
}

.sidebar-data-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 0 16px 4px;
}
.btn-data-action {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 8px 12px;
  background: rgba(201,168,76,0.06);
  border: 1px solid rgba(201,168,76,0.15);
  border-radius: 8px;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  font-family: 'Inter', sans-serif;
}
.btn-data-action svg { width:13px; height:13px; flex-shrink:0; color:var(--gold); }
.btn-data-action:hover { background:rgba(201,168,76,0.12); border-color:rgba(201,168,76,0.3); color:var(--gold); }
.btn-data-action.import svg { color:#54a0ff; }
.btn-data-action.import { border-color:rgba(84,160,255,0.15); background:rgba(84,160,255,0.06); }
.btn-data-action.import:hover { background:rgba(84,160,255,0.12); border-color:rgba(84,160,255,0.3); color:#54a0ff; }

.sidebar-footer {
  padding: 12px;
}
.sidebar-divider { height: 1px; background: var(--border-light); margin-bottom: 12px; }
.user-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: var(--gold-glow);
  border: 1px solid var(--border-light);
}
.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--gold-dim);
  border: 1px solid var(--gold);
  color: var(--gold);
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.user-name { display: block; font-size: 12px; font-weight: 600; color: var(--text); }
.user-role { display: block; font-size: 10px; color: var(--text-muted); }

/* =============================================
   MAIN CONTENT
   ============================================= */
#main-content {
  flex: 1;
  overflow-y: auto;
  height: 100vh;
  background: var(--bg-root);
}

.view { display: none; }
.view.active { display: block; }

/* =============================================
   PAGE HEADER
   ============================================= */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 28px 32px 20px;
  position: sticky;
  top: 0;
  background: var(--bg-root);
  z-index: 10;
  border-bottom: 1px solid var(--border-light);
}
.page-header-left { display: flex; flex-direction: column; gap: 2px; }
.page-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.3px;
}
.page-subtitle {
  font-size: 12px;
  color: var(--text-muted);
}
.page-header-actions { display: flex; gap: 10px; }

.page-content { padding: 24px 32px 40px; }

/* =============================================
   BUTTONS
   ============================================= */
.btn-primary {
  background: var(--gold);
  color: #08080f;
  border: none;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  font-family: inherit;
  letter-spacing: 0.2px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.btn-primary:hover { background: var(--gold-light); transform: translateY(-1px); }
.btn-primary svg { width: 15px; height: 15px; }

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border);
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.btn-ghost:hover { border-color: var(--gold); color: var(--gold); }
.btn-ghost svg { width: 15px; height: 15px; }

.btn-icon {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
}
.btn-icon:hover { border-color: var(--gold); color: var(--gold); }
.btn-icon svg { width: 14px; height: 14px; }

/* =============================================
   CARDS
   ============================================= */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 14px;
  margin-bottom: 28px;
}

.kpi-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: all var(--transition);
  cursor: default;
  position: relative;
  overflow: hidden;
}
.kpi-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold-dim), transparent);
}
.kpi-card:hover { background: var(--bg-card-hover); border-color: var(--border); transform: translateY(-2px); box-shadow: var(--shadow-card); }

.kpi-card.highlight { border-color: var(--gold); }
.kpi-card.highlight::before { background: var(--gold); }

.kpi-label { font-size: 11px; font-weight: 500; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.8px; }
.kpi-value { font-size: 26px; font-weight: 700; color: var(--text); line-height: 1; }
.kpi-value.gold { color: var(--gold); }
.kpi-value.hot { color: var(--hot); }
.kpi-value.warm { color: var(--warm); }
.kpi-value.cold { color: var(--cold); }
.kpi-value.blocked { color: var(--blocked); }
.kpi-value.closed { color: var(--closed); }
.kpi-sub { font-size: 11px; color: var(--text-muted); }
.kpi-icon { position: absolute; top: 16px; right: 16px; opacity: 0.15; }
.kpi-icon svg { width: 28px; height: 28px; }

/* =============================================
   CHARTS GRID
   ============================================= */
.charts-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 24px;
}
.charts-grid-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 20px;
  margin-bottom: 24px;
}

.chart-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 20px 22px;
}
.chart-card.wide { grid-column: span 2; }
.chart-title { font-size: 12px; font-weight: 600; color: var(--text-dim); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 20px; }
.chart-wrap { position: relative; height: 220px; }
.chart-wrap.tall { height: 280px; }

/* =============================================
   PRIORITY PANEL
   ============================================= */
.priority-panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 24px;
}
.priority-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-light);
  background: linear-gradient(90deg, rgba(201,168,76,0.05) 0%, transparent 60%);
}
.priority-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 1.5px;
}
.priority-title svg { width: 15px; height: 15px; }
.priority-count { font-size: 11px; color: var(--text-muted); }

.priority-list { padding: 6px 0; max-height: 280px; overflow-y: auto; }
.priority-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 12px 20px;
  border-bottom: 1px solid var(--border-light);
  cursor: pointer;
  transition: background var(--transition);
}
.priority-item:last-child { border-bottom: none; }
.priority-item:hover { background: var(--gold-glow); }

.priority-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-top: 5px;
  flex-shrink: 0;
}
.priority-dot.hot { background: var(--hot); box-shadow: 0 0 6px var(--hot); }
.priority-dot.warn { background: var(--warm); box-shadow: 0 0 6px var(--warm); }
.priority-dot.blocked { background: var(--blocked); box-shadow: 0 0 6px var(--blocked); }

.priority-info { flex: 1; min-width: 0; }
.priority-neg { font-size: 13px; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.priority-msg { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.priority-meta { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.priority-vgn { font-size: 12px; font-weight: 600; color: var(--gold); }

/* =============================================
   TEMPERATURE BADGES
   ============================================= */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}
.badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; }
.badge.hot  { background: var(--hot-bg);     color: var(--hot);     border: 1px solid rgba(255,71,87,0.25); }
.badge.hot::before  { background: var(--hot);  box-shadow: 0 0 4px var(--hot); }
.badge.warm { background: var(--warm-bg);    color: var(--warm);    border: 1px solid rgba(255,159,28,0.25); }
.badge.warm::before { background: var(--warm); box-shadow: 0 0 4px var(--warm); }
.badge.cold { background: var(--cold-bg);    color: var(--cold);    border: 1px solid rgba(84,160,255,0.25); }
.badge.cold::before { background: var(--cold); }
.badge.blocked { background: var(--blocked-bg); color: var(--blocked); border: 1px solid rgba(162,155,254,0.25); }
.badge.blocked::before { background: var(--blocked); }
.badge.closed { background: var(--closed-bg);  color: var(--closed);  border: 1px solid rgba(0,210,211,0.25); }
.badge.closed::before { background: var(--closed); }

.badge.inactive { background: rgba(108,117,125,0.12); color: #a0aab4; border: 1px solid rgba(108,117,125,0.2); }
.badge.inactive::before { background: #636e72; }

.badge-cargo {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.3px;
}
.badge-corretor  { background: rgba(201,168,76,0.1);  color: var(--gold);    border: 1px solid rgba(201,168,76,0.2); }
.badge-coord     { background: rgba(84,160,255,0.1);  color: var(--cold);    border: 1px solid rgba(84,160,255,0.2); }

.badge.origin {
  background: rgba(201,168,76,0.08);
  color: var(--gold);
  border: 1px solid var(--border);
  font-weight: 500;
}
.badge.origin::before { display: none; }

.badge.etapa {
  background: rgba(144,144,192,0.08);
  color: var(--text-dim);
  border: 1px solid rgba(144,144,192,0.15);
  font-weight: 500;
}
.badge.etapa::before { display: none; }

/* =============================================
   FILTERS BAR
   ============================================= */
.filters-bar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 18px;
  align-items: center;
}

.filter-select, .filter-input {
  background: var(--bg-input);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-family: inherit;
  cursor: pointer;
  transition: border-color var(--transition);
  outline: none;
}
.filter-select:focus, .filter-input:focus { border-color: var(--gold); }
.filter-input { width: 200px; }
.filter-input::placeholder { color: var(--text-muted); }

.filter-select option { background: var(--bg-card); color: var(--text); }

.filters-info { margin-left: auto; font-size: 12px; color: var(--text-muted); }

/* =============================================
   TABLE
   ============================================= */
.table-wrap {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  overflow: hidden;
}

.table-main {
  width: 100%;
  border-collapse: collapse;
}

.table-main thead th {
  text-align: left;
  padding: 12px 16px;
  font-size: 10px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  background: rgba(201,168,76,0.03);
  border-bottom: 1px solid var(--border-light);
  white-space: nowrap;
}

.table-main tbody tr {
  border-bottom: 1px solid var(--border-light);
  cursor: pointer;
  transition: background var(--transition);
}
.table-main tbody tr:last-child { border-bottom: none; }
.table-main tbody tr:nth-child(even) { background: rgba(201,168,76,0.015); }
.table-main tbody tr:hover { background: var(--gold-glow); }

.table-main td {
  padding: 12px 16px;
  font-size: 12px;
  color: var(--text);
  vertical-align: middle;
  max-width: 180px;
}
.table-main td .cell-main { font-weight: 600; color: var(--text); font-size: 13px; }
.table-main td .cell-sub { font-size: 11px; color: var(--text-muted); }

.vgn-cell { font-size: 13px; font-weight: 700; color: var(--gold); }
.prob-cell { display: flex; align-items: center; gap: 8px; }
.prob-bar { height: 4px; background: var(--border); border-radius: 2px; flex: 1; overflow: hidden; }
.prob-fill { height: 100%; border-radius: 2px; background: var(--gold); }
.prob-text { font-size: 11px; color: var(--text-muted); white-space: nowrap; }

.table-actions { display: flex; gap: 6px; }

.days-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 500;
}
.days-badge.ok  { background: rgba(0,210,211,0.1); color: var(--closed); }
.days-badge.warn{ background: rgba(255,159,28,0.1); color: var(--warm); }
.days-badge.risk{ background: rgba(255,71,87,0.1);  color: var(--hot); }

.table-empty {
  text-align: center;
  padding: 48px 20px;
  color: var(--text-muted);
  font-size: 14px;
}

/* =============================================
   BROKERS VIEW
   ============================================= */
.brokers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
  margin-bottom: 28px;
}

.broker-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 22px 24px;
  transition: all var(--transition);
}
.broker-card:hover { border-color: var(--border); transform: translateY(-2px); box-shadow: var(--shadow-card); }

.broker-header { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.broker-avatar {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--gold-dim);
  border: 2px solid var(--gold);
  color: var(--gold);
  font-size: 16px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.broker-name-block { flex: 1; }
.broker-name { font-size: 15px; font-weight: 700; color: var(--text); }
.broker-rank { font-size: 11px; color: var(--text-muted); }
.broker-rank span { color: var(--gold); font-weight: 600; }

.broker-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}
.broker-stat { text-align: center; }
.broker-stat-value { font-size: 20px; font-weight: 700; color: var(--text); line-height: 1; }
.broker-stat-label { font-size: 10px; color: var(--text-muted); margin-top: 3px; text-transform: uppercase; letter-spacing: 0.5px; }

.broker-vgn { text-align: center; padding: 10px; background: var(--gold-glow); border: 1px solid var(--border); border-radius: var(--radius-sm); margin-bottom: 14px; }
.broker-vgn-value { font-size: 17px; font-weight: 800; color: var(--gold); }
.broker-vgn-label { font-size: 10px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.8px; }

.broker-temps { display: flex; gap: 6px; flex-wrap: wrap; }

.broker-card-actions {
  display: flex;
  gap: 4px;
  margin-left: auto;
}

.broker-email {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.broker-email svg { width: 11px; height: 11px; flex-shrink: 0; }

.btn-inativar:hover { border-color: #636e72; color: #a0aab4; }
.btn-delete:hover   { border-color: var(--hot); color: var(--hot); }

.broker-ranking {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  overflow: hidden;
}
.broker-ranking-header {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-light);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}
.ranking-row {
  display: flex;
  align-items: center;
  padding: 12px 18px;
  border-bottom: 1px solid var(--border-light);
  transition: background var(--transition);
  gap: 14px;
}
.ranking-row:last-child { border-bottom: none; }
.ranking-row:hover { background: var(--gold-glow); }
.rank-pos { font-size: 18px; font-weight: 800; color: var(--gold-dim); width: 28px; text-align: center; }
.rank-pos.top { color: var(--gold); }
.rank-name { flex: 1; font-weight: 600; font-size: 13px; }
.rank-vgn { font-weight: 700; color: var(--gold); font-size: 13px; }
.rank-bar-wrap { width: 100px; }
.rank-bar { height: 4px; background: var(--gold-dim); border-radius: 2px; }
.rank-bar-fill { height: 100%; background: var(--gold); border-radius: 2px; }

/* =============================================
   REPORTS VIEW
   ============================================= */
.reports-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}
.report-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 20px 22px;
  cursor: pointer;
  transition: all var(--transition);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.report-card:hover { border-color: var(--gold); background: var(--bg-card-hover); transform: translateY(-2px); }
.report-icon {
  width: 40px; height: 40px;
  background: var(--gold-dim);
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  color: var(--gold);
}
.report-icon svg { width: 20px; height: 20px; }
.report-name { font-size: 14px; font-weight: 600; color: var(--text); }
.report-desc { font-size: 11px; color: var(--text-muted); line-height: 1.5; }

/* =============================================
   MODAL
   ============================================= */
#modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.75);
  z-index: 100;
  backdrop-filter: blur(2px);
}
#modal-overlay.active { display: block; }

.modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 101;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  width: 700px;
  max-width: 95vw;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 24px 80px rgba(0,0,0,0.8);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-light);
}
.modal-header h2 { font-size: 16px; font-weight: 700; color: var(--text); }
.modal-close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: all var(--transition);
}
.modal-close:hover { background: var(--hot-bg); color: var(--hot); }
.modal-close svg { width: 16px; height: 16px; }

.modal-body { padding: 20px 24px; overflow-y: auto; flex: 1; }
.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 24px;
  border-top: 1px solid var(--border-light);
}

/* FORM */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.form-group { display: flex; flex-direction: column; gap: 5px; }
.form-group label { font-size: 11px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.6px; }
.form-full { grid-column: span 2; }

.form-group input,
.form-group select,
.form-group textarea {
  background: var(--bg-input);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-family: inherit;
  outline: none;
  transition: border-color var(--transition);
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus { border-color: var(--gold); }
.form-group input::placeholder,
.form-group textarea::placeholder { color: var(--text-muted); }
.form-group select option { background: var(--bg-card); }
.form-group textarea { resize: vertical; }

.temp-suggestion {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 10px 14px;
  background: rgba(201,168,76,0.06);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-top: 14px;
  font-size: 12px;
  color: var(--gold);
}
.temp-suggestion svg { width: 15px; height: 15px; flex-shrink: 0; margin-top: 1px; }

/* DETAIL MODAL */
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.detail-item { display: flex; flex-direction: column; gap: 3px; }
.detail-item.full { grid-column: span 2; }
.detail-label { font-size: 10px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.8px; }
.detail-value { font-size: 13px; color: var(--text); font-weight: 500; }
.detail-vgn { font-size: 22px; font-weight: 800; color: var(--gold); }
.detail-obs {
  background: var(--bg-input);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font-size: 12px;
  color: var(--text-dim);
  line-height: 1.6;
  margin-top: 4px;
}

/* =============================================
   TOAST
   ============================================= */
.toast {
  position: fixed;
  bottom: 28px;
  right: 28px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 18px;
  font-size: 13px;
  color: var(--text);
  z-index: 999;
  box-shadow: var(--shadow);
  transform: translateY(80px);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.4,0,0.2,1);
  max-width: 300px;
}
.toast.show { transform: translateY(0); opacity: 1; }
.toast.success { border-color: var(--closed); color: var(--closed); }
.toast.error { border-color: var(--hot); color: var(--hot); }

/* =============================================
   SCROLLBAR
   ============================================= */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(201,168,76,0.2); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(201,168,76,0.4); }

/* =============================================
   UTILITY
   ============================================= */
.section-title {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1.2px;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.section-title::after { content: ''; flex: 1; height: 1px; background: var(--border-light); }

.no-data {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}
.no-data svg { width: 40px; height: 40px; opacity: 0.2; margin-bottom: 10px; }
.no-data p { font-size: 14px; }

.inline-flex { display: inline-flex; align-items: center; gap: 6px; }

/* =============================================
   PREMIUM REPORT
   ============================================= */
.print-report {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-top: 3px solid var(--gold);
  border-radius: var(--radius-lg);
  margin-top: 24px;
  overflow: hidden;
  box-shadow: 0 8px 40px rgba(0,0,0,0.4);
}

.report-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 28px 32px 24px;
  background: linear-gradient(135deg, rgba(201,168,76,0.06) 0%, transparent 60%);
  border-bottom: 1px solid var(--border-light);
}
.report-header-left { display: flex; align-items: flex-start; gap: 16px; }
.report-logo-mark {
  width: 44px; height: 44px;
  background: var(--gold-dim);
  border: 1px solid var(--gold);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  color: var(--gold);
  flex-shrink: 0;
}
.report-logo-mark svg { width: 20px; height: 20px; }
.report-brand {
  font-size: 10px;
  font-weight: 600;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 6px;
}
.report-title {
  font-size: 22px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.4px;
  line-height: 1.1;
}
.report-header-right { text-align: right; flex-shrink: 0; }
.report-date-label { font-size: 10px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.8px; }
.report-date-value { font-size: 14px; font-weight: 700; color: var(--text); margin-top: 4px; }
.report-date-time  { font-size: 12px; color: var(--text-muted); margin-top: 2px; }

.report-stats {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--border-light);
}
.report-stat {
  flex: 1;
  padding: 18px 24px;
  border-right: 1px solid var(--border-light);
  text-align: center;
}
.report-stat:last-child { border-right: none; }
.report-stat-value {
  font-size: 24px;
  font-weight: 800;
  color: var(--gold);
  line-height: 1;
  margin-bottom: 6px;
}
.report-stat-label {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.report-table-wrap { overflow-x: auto; }
.report-table {
  width: 100%;
  border-collapse: collapse;
}
.report-table thead th {
  text-align: left;
  padding: 12px 20px;
  font-size: 10px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  background: rgba(201,168,76,0.04);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.report-table thead th:first-child { padding-left: 32px; }
.report-table tbody td {
  padding: 13px 20px;
  font-size: 13px;
  color: var(--text);
  border-bottom: 1px solid var(--border-light);
  vertical-align: middle;
}
.report-table tbody td:first-child { padding-left: 32px; font-weight: 600; }
.report-table tbody tr.row-even { background: transparent; }
.report-table tbody tr.row-odd  { background: rgba(201,168,76,0.02); }
.report-table tbody tr:hover    { background: var(--gold-glow); }
.report-table tbody tr:last-child td { border-bottom: none; }

.report-empty {
  text-align: center;
  padding: 48px 20px;
  color: var(--text-muted);
  font-size: 14px;
}

.report-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 32px;
  border-top: 1px solid var(--border-light);
  background: rgba(201,168,76,0.02);
}
.report-total {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
}
.report-total::before {
  content: '';
  display: inline-block;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--gold);
  margin-right: 8px;
  vertical-align: middle;
}

/* =============================================
   PRINT STYLES
   ============================================= */
@media print {
  #sidebar,
  .page-header-actions,
  .filters-bar,
  .reports-grid,
  .section-title,
  .btn-primary,
  .btn-ghost,
  .report-footer .btn-ghost { display: none !important; }

  body, #main-content { background: #fff !important; color: #000 !important; overflow: visible !important; height: auto !important; }
  #app { display: block !important; }

  .print-report {
    border: none !important;
    border-top: 3px solid #c9a84c !important;
    box-shadow: none !important;
    background: #fff !important;
    border-radius: 0 !important;
    margin: 0 !important;
  }
  .report-header     { background: #f9f6ee !important; }
  .report-brand      { color: #b8962a !important; }
  .report-title, .report-date-value { color: #111 !important; }
  .report-stat-value { color: #b8962a !important; }
  .report-stat       { border-right-color: #ddd !important; }
  .report-stats      { border-bottom-color: #ddd !important; }
  .report-table thead th { background: #f3efdd !important; color: #555 !important; border-bottom-color: #ccc !important; }
  .report-table tbody td { color: #222 !important; border-bottom-color: #eee !important; }
  .report-table tbody tr.row-odd { background: #fafaf5 !important; }
  .report-table tbody tr:hover   { background: transparent !important; }
  .report-footer { background: #f9f9f9 !important; border-top-color: #ddd !important; }
  .report-total  { color: #555 !important; }
}
