:root {
  --bg: #0a0a0d;
  --panel: #131318;
  --card: #191920;
  --card-border: #26262e;
  --text: #f3f3f5;
  --text-dim: #96969f;
  --text-dimmer: #6b6b74;
  --gold: #ffb800;
  --gold-dark: #e0a000;
  --blue: #3b82f6;
  --red: #c0395f;
  --green: #22c55e;
  --sidebar-w: 260px;
  --radius: 16px;
}

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

html, body {
  height: 100%;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', sans-serif;
  overflow: hidden;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; }

.app {
  display: flex;
  height: 100vh;
}

/* ===================== SIDEBAR ===================== */
.sidebar {
  width: var(--sidebar-w);
  min-width: var(--sidebar-w);
  height: 100vh;
  flex-shrink: 0;
  background: var(--panel);
  padding: 28px 20px;
  border-right: 1px solid var(--card-border);
  overflow-y: auto;
}

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

.brand-icon {
  color: var(--gold);
  font-size: 1.5rem;
}

.brand-text {
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 1.15rem;
}

.brand-text b { color: var(--gold); }
.brand-text small { display: block; font-family: 'Inter'; font-weight: 600; font-size: 0.6rem; letter-spacing: 2px; color: var(--text-dimmer); }

.nav-list { list-style: none; display: flex; flex-direction: column; gap: 4px; }

.nav-list a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-radius: 10px;
  color: var(--text-dim);
  font-weight: 500;
  font-size: 0.92rem;
  transition: background 0.15s, color 0.15s;
}

.nav-list a i { width: 18px; text-align: center; }
.nav-list li:not(.active) a:hover { background: #1f1f27; color: var(--text); }
.nav-list li.active a { background: var(--gold); color: #1a1200; font-weight: 600; }

/* ===================== MAIN ===================== */
.main {
  flex: 1;
  height: 100vh;
  overflow-y: auto;
  padding: 24px 32px 40px;
  min-width: 0;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}

.search-box {
  flex: 1;
  max-width: 420px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 11px 16px;
  color: var(--text-dimmer);
}

.search-box input {
  background: transparent;
  border: none;
  outline: none;
  color: var(--text);
  font-size: 0.9rem;
  width: 100%;
}

.topbar-right { display: flex; align-items: center; gap: 18px; }

.icon-btn {
  position: relative;
  background: var(--card);
  border: 1px solid var(--card-border);
  width: 42px; height: 42px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-dim);
  font-size: 1rem;
}

.hamburger-btn {
  display: none;
  background: var(--card);
  border: 1px solid var(--card-border);
  width: 42px; height: 42px;
  border-radius: 12px;
  align-items: center;
  justify-content: center;
  color: var(--text-dim);
  font-size: 1.05rem;
  flex-shrink: 0;
}
.hamburger-btn:hover { color: var(--text); }

.icon-btn .dot {
  position: absolute;
  top: -5px; right: -5px;
  background: var(--red);
  color: #fff;
  font-size: 0.6rem;
  font-weight: 700;
  min-width: 16px; height: 16px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  padding: 0 3px;
}

.profile {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 6px 14px 6px 6px;
}

.avatar-badge {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: #101014;
  border: 2px solid var(--gold);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.5rem;
  font-weight: 800;
  color: var(--gold);
  font-family: 'Poppins', sans-serif;
}

.profile-text { display: flex; flex-direction: column; line-height: 1.25; }
.profile-text span { font-weight: 600; font-size: 0.85rem; }
.profile-text small { color: var(--text-dimmer); font-size: 0.72rem; display: flex; align-items: center; gap: 4px; }
.profile > i.fa-chevron-down { color: var(--text-dimmer); font-size: 0.7rem; }

/* ===================== STATS ===================== */
.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-bottom: 20px;
}

.stat-card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 18px;
  display: flex;
  align-items: center;
  gap: 14px;
}

.stat-icon {
  width: 44px; height: 44px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
  color: #fff;
  flex-shrink: 0;
}

.stat-icon.blue { background: var(--blue); }
.stat-icon.red { background: var(--red); }
.stat-icon.green { background: var(--green); }
.stat-icon.gold { background: var(--gold); color: #1a1200; }

.stat-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.stat-label { font-size: 0.75rem; color: var(--text-dim); font-weight: 500; }
.stat-value { font-size: 1.5rem; font-weight: 700; font-family: 'Poppins', sans-serif; }
.stat-delta { font-size: 0.72rem; font-weight: 600; }
.stat-delta.up { color: var(--green); }
.stat-delta.stars { color: var(--gold); }
.stat-delta.stars small { color: var(--text-dimmer); font-weight: 500; }

/* ===================== CONTENT GRID ===================== */
.content-grid {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 20px;
  align-items: start;
}

.card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 20px;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.card-header h3 { font-size: 1rem; font-weight: 600; }
.link { font-size: 0.8rem; color: var(--gold); font-weight: 600; display: flex; align-items: center; gap: 6px; }

.appt-list { list-style: none; display: flex; flex-direction: column; gap: 10px; }

.appt-list li {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px;
  border-radius: 12px;
  transition: background 0.15s;
}

.appt-list li:hover { background: #1f1f27; }

.appt-time { font-size: 0.82rem; font-weight: 600; color: var(--text-dim); width: 44px; flex-shrink: 0; }

.avatar {
  width: 38px; height: 38px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.muted { color: var(--text-dimmer); }

.avatar-fallback {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #262630;
  color: var(--text-dimmer);
}

.photo-upload-box { display: flex; align-items: center; gap: 14px; }
.photo-upload-box .avatar, .photo-upload-box .avatar-fallback { width: 64px; height: 64px; font-size: 28px; }
.upload-preview { object-fit: cover; background: #101014; border: 1px solid var(--card-border); flex-shrink: 0; }

.appt-info { display: flex; flex-direction: column; flex: 1; min-width: 0; gap: 1px; }
.appt-info b { font-size: 0.88rem; font-weight: 600; }
.appt-info small { font-size: 0.76rem; color: var(--text-dimmer); }

.badge {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 20px;
  white-space: nowrap;
}

.badge.confirmed { background: rgba(34,197,94,0.15); color: var(--green); }
.badge.progress { background: rgba(59,130,246,0.15); color: var(--blue); }
.badge.waiting { background: #2a2a33; color: var(--text-dim); }

.dots { background: none; color: var(--text-dimmer); font-size: 0.9rem; padding: 4px; }

.row-menu-wrap { position: relative; }
.row-menu { min-width: 190px; top: calc(100% + 6px); }
.row-menu button {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: none;
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 500;
  text-align: left;
}
.row-menu button:hover { background: #1f1f27; }
.row-menu button.danger { color: #ef4444; }
.row-menu button.danger:hover { background: rgba(239,68,68,0.1); }

.btn-gold {
  width: 100%;
  margin-top: 16px;
  background: var(--gold);
  color: #1a1200;
  font-weight: 700;
  font-size: 0.9rem;
  padding: 13px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  transition: background 0.15s;
}

.btn-gold:hover { background: var(--gold-dark); }

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.two-col .card { margin-bottom: 0; }

.bar-list { list-style: none; display: flex; flex-direction: column; gap: 14px; }
.bar-list li { display: grid; grid-template-columns: 110px 1fr minmax(30px, auto); align-items: center; gap: 10px; }
.bar-list li span { font-size: 0.82rem; color: var(--text-dim); }
.bar-list li b { font-size: 0.85rem; text-align: right; }

.bar { height: 8px; background: #26262e; border-radius: 6px; overflow: hidden; }
.bar .fill { height: 100%; background: var(--gold); border-radius: 6px; }

.client-list { list-style: none; display: flex; flex-direction: column; gap: 14px; }
.client-list li { display: flex; align-items: center; gap: 12px; }

/* ===================== SIDE COLUMN ===================== */
.col-side { display: flex; flex-direction: column; }

.banner {
  border-radius: var(--radius);
  padding: 22px;
  margin-bottom: 20px;
  min-height: 150px;
  display: flex;
  align-items: flex-end;
  position: relative;
  overflow: hidden;
  background-size: cover;
  background-position: center;
}

.banner-1 { background: linear-gradient(135deg, #1a1a20, #2b2b33); }
.banner-2 { background: linear-gradient(135deg, #1a1a20, #2b2b33); }

.banner-text h4 {
  font-family: 'Poppins', sans-serif;
  font-weight: 800;
  font-size: 1.15rem;
  color: #fff;
  text-transform: uppercase;
  line-height: 1.2;
  margin-bottom: 6px;
}

.banner-text h4 span { color: var(--gold); }
.banner-text small { color: var(--text-dim); font-size: 0.65rem; font-weight: 600; letter-spacing: 0.5px; }

.quick-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.quick-actions button {
  background: #1f1f27;
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 14px 10px;
  color: var(--text);
  font-size: 0.78rem;
  font-weight: 600;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
  transition: background 0.15s, border-color 0.15s;
}

.quick-actions button i { font-size: 1.1rem; color: var(--gold); }
.quick-actions button:hover { background: #26262e; border-color: var(--gold); }

.footer {
  text-align: center;
  color: var(--text-dimmer);
  font-size: 0.72rem;
  letter-spacing: 1px;
  font-weight: 600;
  margin-top: 20px;
}

/* ===================== PAGE HEADER (páginas internas) ===================== */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 20px;
}

.page-header h1 {
  font-family: 'Poppins', sans-serif;
  font-size: 1.4rem;
  font-weight: 700;
}

.page-header p {
  color: var(--text-dim);
  font-size: 0.85rem;
  margin-top: 2px;
}

.page-header-actions { display: flex; gap: 10px; flex-wrap: wrap; }

.btn-gold.inline { width: auto; padding: 11px 20px; }

.btn-ghost {
  background: transparent;
  border: 1px solid var(--card-border);
  color: var(--text);
  font-weight: 600;
  font-size: 0.85rem;
  padding: 11px 18px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.btn-ghost:hover { background: #1f1f27; }

.btn-icon-sm {
  background: #1f1f27;
  border: 1px solid var(--card-border);
  color: var(--text-dim);
  width: 32px; height: 32px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.btn-icon-sm:hover { color: var(--text); border-color: var(--gold); }
.btn-icon-sm.danger:hover { color: #ef4444; border-color: #ef4444; }

/* ===================== VIEW SWITCH (Calendário / Lista) ===================== */
.view-switch {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
}

.view-switch-btn {
  background: var(--card);
  border: 1px solid var(--card-border);
  color: var(--text-dim);
  font-weight: 600;
  font-size: 0.85rem;
  padding: 10px 18px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.view-switch-btn:hover { color: var(--text); background: #1f1f27; }
.view-switch-btn.active { background: var(--gold); color: #1a1200; border-color: var(--gold); }
.view-switch-btn.active:hover { background: var(--gold-dark); }

/* ===================== CALENDÁRIO ===================== */
.cal-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px;
}

.cal-nav { display: flex; align-items: center; gap: 10px; }
.cal-nav strong {
  font-size: 1rem;
  font-family: 'Poppins', sans-serif;
  min-width: 160px;
}
.cal-nav .btn-ghost { padding: 8px 16px; font-size: 0.8rem; }

#calBody { padding: 0; overflow: hidden; }

.cal-month-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
}

.cal-weekday {
  text-align: center;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-dimmer);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 12px 4px;
  border-bottom: 1px solid var(--card-border);
}

.cal-day-cell {
  min-height: 108px;
  border-right: 1px solid var(--card-border);
  border-bottom: 1px solid var(--card-border);
  padding: 8px;
  position: relative;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.cal-day-cell:nth-child(7n) { border-right: none; }
.cal-day-cell:hover { background: #1c1c24; }
.cal-day-cell.muted-day { opacity: 0.35; }
.cal-day-cell.today .cal-day-num { background: var(--gold); color: #1a1200; }

.cal-day-num {
  font-size: 0.78rem;
  font-weight: 700;
  width: 22px; height: 22px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
}

.cal-add-btn {
  position: absolute;
  top: 8px; right: 8px;
  width: 20px; height: 20px;
  border-radius: 6px;
  background: #1f1f27;
  border: 1px solid var(--card-border);
  color: var(--text-dimmer);
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 0.62rem;
}
.cal-day-cell:hover .cal-add-btn { display: flex; }
.cal-add-btn:hover { color: var(--gold); border-color: var(--gold); }

.cal-chips { display: flex; flex-direction: column; gap: 3px; overflow: hidden; }

.cal-chip {
  background: #22222b;
  border-left: 3px solid var(--gold);
  border-radius: 5px;
  padding: 3px 6px;
  font-size: 0.66rem;
  font-weight: 600;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cal-chip.status-confirmed { border-left-color: var(--green); }
.cal-chip.status-progress { border-left-color: var(--blue); }
.cal-chip.status-waiting { border-left-color: var(--gold); }
.cal-chip.status-done { border-left-color: #94a3b8; opacity: 0.7; }
.cal-chip.status-canceled { border-left-color: #ef4444; text-decoration: line-through; opacity: 0.55; }

.cal-more {
  font-size: 0.66rem;
  color: var(--gold);
  font-weight: 700;
  padding-left: 6px;
}

.cal-week-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 12px;
  padding: 18px;
}

.cal-week-col-header {
  text-align: center;
  padding-bottom: 10px;
  margin-bottom: 10px;
  border-bottom: 1px solid var(--card-border);
  cursor: pointer;
  border-radius: 8px 8px 0 0;
}
.cal-week-col-header:hover { background: #1c1c24; }
.cal-week-col-header small { display: block; color: var(--text-dimmer); font-size: 0.66rem; text-transform: uppercase; font-weight: 700; letter-spacing: 0.5px; }
.cal-week-col-header b { font-size: 1.1rem; font-family: 'Poppins', sans-serif; }
.cal-week-col-header.today b { color: var(--gold); }

.cal-week-appt {
  background: #1f1f27;
  border: 1px solid var(--card-border);
  border-radius: 10px;
  padding: 8px 10px;
  margin-bottom: 8px;
  font-size: 0.75rem;
}
.cal-week-appt b { display: block; font-size: 0.8rem; margin: 4px 0 2px; }

.cal-week-empty {
  text-align: center;
  color: var(--text-dimmer);
  font-size: 0.7rem;
  padding: 16px 0;
}

/* ===================== FILTER TABS ===================== */
.tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.tabs button {
  background: var(--card);
  border: 1px solid var(--card-border);
  color: var(--text-dim);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: 20px;
}
.tabs button:hover { color: var(--text); }
.tabs button.active { background: var(--gold); color: #1a1200; border-color: var(--gold); }

/* ===================== TABELAS ===================== */
.table-wrap { overflow-x: auto; }

table.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.data-table th {
  text-align: left;
  color: var(--text-dimmer);
  font-weight: 600;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 0 12px 10px;
  border-bottom: 1px solid var(--card-border);
  white-space: nowrap;
}

.data-table td {
  padding: 12px;
  border-bottom: 1px solid var(--card-border);
  vertical-align: middle;
}

.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: #1c1c24; }

.data-table .row-name { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.data-table .actions-cell { display: flex; gap: 6px; justify-content: flex-end; }
.data-table .muted { color: var(--text-dimmer); }

.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-dimmer);
  font-size: 0.88rem;
}
.empty-state i { font-size: 1.8rem; display: block; margin-bottom: 10px; color: var(--text-dimmer); }

.badge.done { background: rgba(148,163,184,0.18); color: #cbd5e1; }
.badge.canceled { background: rgba(239,68,68,0.15); color: #ef4444; }

/* ===================== SEARCH FILTER (páginas internas) ===================== */
.filter-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 18px;
}

.filter-row .search-box { max-width: 320px; }
.filter-row input[type="date"] {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 10px 14px;
  color: var(--text);
  font-size: 0.85rem;
}

/* ===================== STAT MINI (financeiro/relatórios) ===================== */
.mini-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}

.mini-stat {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 16px 18px;
}
.mini-stat span { display: block; color: var(--text-dim); font-size: 0.75rem; font-weight: 600; margin-bottom: 6px; }
.mini-stat b { font-size: 1.35rem; font-family: 'Poppins', sans-serif; }
.mini-stat small { display: block; margin-top: 4px; font-size: 0.72rem; color: var(--green); font-weight: 600; }
.mini-stat small.neg { color: #ef4444; }

/* ===================== CARDS EM GRID (profissionais/serviços) ===================== */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 16px;
}

.entity-card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.entity-card .entity-head { display: flex; align-items: center; gap: 12px; }
.entity-card .entity-head img { width: 46px; height: 46px; border-radius: 50%; object-fit: cover; }
.entity-card .entity-head b { display: block; font-size: 0.95rem; }
.entity-card .entity-head small { color: var(--text-dimmer); font-size: 0.75rem; }
.entity-card .entity-meta { font-size: 0.8rem; color: var(--text-dim); display: flex; justify-content: space-between; }
.entity-card .entity-actions { display: flex; gap: 8px; margin-top: auto; padding-top: 8px; }

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 20px;
  width: fit-content;
}
.status-pill.on { background: rgba(34,197,94,0.15); color: var(--green); }
.status-pill.off { background: #2a2a33; color: var(--text-dimmer); }

/* ===================== MODAL ===================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(5,5,7,0.7);
  backdrop-filter: blur(2px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}

.modal {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px;
  border-bottom: 1px solid var(--card-border);
}
.modal-header h3 { font-size: 1.05rem; font-weight: 700; }
.modal-close { background: none; color: var(--text-dimmer); font-size: 1.1rem; }
.modal-close:hover { color: var(--text); }

.modal-body {
  padding: 20px 22px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.modal-body label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-dim);
}

.modal-body input[type="text"],
.modal-body input[type="email"],
.modal-body input[type="number"],
.modal-body input[type="date"],
.modal-body input[type="time"],
.modal-body input[type="file"],
.modal-body select,
.modal-body textarea {
  background: #101014;
  border: 1px solid var(--card-border);
  border-radius: 10px;
  padding: 11px 12px;
  color: var(--text);
  font-size: 0.88rem;
  font-family: inherit;
  font-weight: 500;
  width: 100%;
}

.modal-body textarea { resize: vertical; }
.modal-body input:focus, .modal-body select:focus, .modal-body textarea:focus { outline: 2px solid var(--gold); outline-offset: 1px; }

.field-group { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.checkbox-line {
  flex-direction: row !important;
  align-items: center;
  gap: 8px !important;
  font-weight: 500 !important;
  color: var(--text) !important;
}
.checkbox-line input[type="checkbox"] { width: auto; accent-color: var(--gold); }

.bh-row { display: flex; align-items: center; gap: 14px; padding: 11px 0; border-bottom: 1px solid var(--card-border); flex-wrap: wrap; }
.bh-row:last-child { border-bottom: none; }
.bh-row .checkbox-line { min-width: 118px; flex-shrink: 0; }
.bh-time-inputs { display: flex; align-items: center; gap: 8px; }
.bh-time-inputs input[type="time"] { width: 110px; background: #101014; border: 1px solid var(--card-border); border-radius: 10px; padding: 9px 10px; color: var(--text); font-size: 0.85rem; font-family: inherit; }
.bh-row.closed .bh-time-inputs { opacity: 0.4; pointer-events: none; }
.bh-row .muted { font-size: 0.78rem; }

.closed-date-item { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--card-border); }
.closed-date-item:last-child { border-bottom: none; }
.closed-date-item b { font-size: 0.88rem; }
.closed-date-item span { font-size: 0.78rem; color: var(--text-dim); }

.checkbox-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  background: #101014;
  border: 1px solid var(--card-border);
  border-radius: 10px;
  padding: 12px;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 22px;
  border-top: 1px solid var(--card-border);
}
.modal-footer .btn-gold { width: auto; padding: 11px 22px; margin-top: 0; }

/* ===================== TOAST ===================== */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: #1c1c24;
  border: 1px solid var(--card-border);
  color: var(--text);
  padding: 13px 22px;
  border-radius: 12px;
  font-size: 0.85rem;
  font-weight: 600;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
  z-index: 2000;
  box-shadow: 0 10px 30px rgba(0,0,0,0.4);
  border-left: 4px solid var(--green);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.error { border-left-color: #ef4444; }

/* ===================== DROPDOWNS (notificações / perfil) ===================== */
.icon-btn-wrap, .profile-wrap { position: relative; }

.dropdown-panel {
  display: none;
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 14px;
  min-width: 280px;
  box-shadow: 0 16px 40px rgba(0,0,0,0.45);
  z-index: 500;
  overflow: hidden;
}
.dropdown-panel.open { display: block; }

.dropdown-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--card-border);
  font-weight: 700;
  font-size: 0.85rem;
}

.link-btn { background: none; color: var(--gold); font-size: 0.72rem; font-weight: 600; }

.notif-list { list-style: none; max-height: 320px; overflow-y: auto; }
.notif-list li {
  padding: 12px 16px;
  border-bottom: 1px solid var(--card-border);
  font-size: 0.8rem;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.notif-list li:last-child { border-bottom: none; }
.notif-list li:hover { background: #1f1f27; }
.notif-list li.unread { position: relative; padding-left: 26px; }
.notif-list li.unread::before {
  content: '';
  position: absolute;
  left: 12px; top: 16px;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--gold);
}
.notif-list li small { color: var(--text-dimmer); }
.notif-list li.empty { color: var(--text-dimmer); text-align: center; cursor: default; }

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text);
}
.dropdown-item:hover { background: #1f1f27; }


/* ===================== RESPONSIVE ===================== */
@media (max-width: 1200px) {
  .content-grid { grid-template-columns: 1fr; }
  .two-col { grid-template-columns: 1fr; }
}

@media (max-width: 860px) {
  .hamburger-btn { display: flex; }
  .sidebar {
    position: fixed;
    top: 0; left: 0;
    z-index: 950;
    transform: translateX(-100%);
    transition: transform 0.25s ease;
    box-shadow: 20px 0 40px rgba(0,0,0,0.5);
  }
  .sidebar.open { transform: translateX(0); }
  .sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.55);
    z-index: 940;
  }
  .sidebar-backdrop.open { display: block; }
  .stats-row { grid-template-columns: 1fr 1fr; }
  .main { padding: 20px; }
  .cal-week-grid { grid-template-columns: 1fr; }
  .cal-day-cell { min-height: 70px; }
  .cal-chip { font-size: 0.6rem; }
}

@media (max-width: 520px) {
  .stats-row { grid-template-columns: 1fr; }
  .topbar { flex-wrap: wrap; }
  .profile-text { display: none; }
  .field-group { grid-template-columns: 1fr; }
  .checkbox-grid { grid-template-columns: 1fr; }
  .mini-stats { grid-template-columns: 1fr 1fr; }
  .cal-nav { width: 100%; justify-content: space-between; }
  .cal-nav strong { min-width: 0; font-size: 0.85rem; }
  .cal-day-num { font-size: 0.68rem; }
  .cal-day-cell { padding: 4px; gap: 3px; }
}
