/* Triune AV Planner — extras (Dashboard, Estoque, Configurações, Ajuda)
   Scoped a .dash / .est / .cfg / .hlp. */

/* ===== reuso: pills, btn, field (caso planos.css não carregue antes) ===== */
.ta-right { text-align: right; }

/* ===================== DASHBOARD ===================== */
.dash { display: flex; flex-direction: column; gap: 16px; }
.dash-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.dash-stat { background: var(--bg-2); border: 1px solid var(--line-2); border-radius: var(--r-lg); padding: 15px 16px; }
.dash-stat-ico { width: 28px; height: 28px; border-radius: 8px; background: rgba(255,255,255,.04); border: 1px solid var(--line-2); display: flex; align-items: center; justify-content: center; margin-bottom: 10px; }
.dash-stat-lbl { font-size: 11px; font-weight: 300; color: var(--txt-3); margin-bottom: 4px; }
.dash-stat-val { font-size: 26px; font-weight: 600; color: var(--txt); }
.dash-cols { display: grid; grid-template-columns: 1.4fr 1fr; gap: 16px; align-items: start; }
.dash-card { background: var(--bg-2); border: 1px solid var(--line-2); border-radius: var(--r-lg); padding: 18px; }
.dash-card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.dash-card-head > span { font-size: 14px; font-weight: 600; color: var(--txt); }
.dash-link { font-size: 12px; font-weight: 500; color: var(--red); }
.dash-events { display: flex; flex-direction: column; gap: 10px; }
.dash-event { display: flex; align-items: center; gap: 13px; background: var(--bg); border: 1px solid var(--line-2); border-radius: var(--r-md); padding: 13px 14px; }
.dash-event:hover { border-color: var(--line); }
.dash-event-date { width: 42px; text-align: center; flex-shrink: 0; }
.dash-event-date b { display: block; font-size: 15px; font-weight: 600; color: var(--txt); }
.dash-event-date i { font-style: normal; font-size: 9px; color: var(--txt-3); }
.dash-event-div { width: 1px; height: 30px; background: var(--line-2); }
.dash-event-main { flex: 1; min-width: 0; }
.dash-event-main b { display: block; font-size: 13.5px; font-weight: 500; color: var(--txt); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dash-event-main i { font-style: normal; font-size: 11.5px; color: var(--txt-3); }
.dash-activity { display: flex; flex-direction: column; }
.dash-act { display: flex; gap: 11px; padding: 9px 0; border-bottom: 1px solid var(--line-2); }
.dash-act.last { border-bottom: none; }
.dash-act-dot { width: 8px; height: 8px; border-radius: 50%; margin-top: 5px; flex-shrink: 0; }
.dash-act-main { flex: 1; }
.dash-act-main b { display: block; font-size: 12.5px; font-weight: 400; color: var(--txt-2); }
.dash-act-main i { font-style: normal; font-size: 11px; color: var(--txt-3); }
.dash-act-time { font-size: 10px; color: var(--txt-4); white-space: nowrap; }
.dash-empty { padding: 24px; text-align: center; color: var(--txt-3); font-size: 13px; }

/* ===================== ESTOQUE ===================== */
.est { display: flex; flex-direction: column; gap: 18px; }
.est-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.est-select select { height: 36px; padding: 0 12px; background: var(--bg-2); border: 1px solid var(--line-3); border-radius: 8px; color: var(--txt-2); font-size: 13px; width: auto; }
.est-empty { padding: 50px 24px; text-align: center; }
.est-empty-title { font-size: 15px; font-weight: 600; color: var(--txt); margin-bottom: 6px; }
.est-empty-desc { font-size: 13px; color: var(--txt-3); }
.est-edit { width: 30px; height: 30px; border-radius: 7px; display: flex; align-items: center; justify-content: center; color: var(--txt-3); background: var(--bg-3); border: 1px solid var(--line-2); }
.est-edit:hover { color: var(--red); border-color: var(--red); background: var(--red-soft); }
.est-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.est-card { background: var(--bg-2); border: 1px solid var(--line-2); border-radius: var(--r-lg); padding: 14px 16px; }
.est-card-lbl { font-size: 11px; font-weight: 300; color: var(--txt-3); margin-bottom: 6px; }
.est-card-val { font-size: 22px; font-weight: 600; }
.est-table { background: var(--bg-2); border: 1px solid var(--line-2); border-radius: var(--r-lg); overflow: hidden; }
.est-h, .est-row { display: grid; grid-template-columns: 1.6fr 1fr .6fr .6fr .6fr .9fr 38px; gap: 12px; align-items: center; padding: 12px 18px; }
.est-h { border-bottom: 1px solid var(--line-2); font-size: 10px; font-weight: 600; letter-spacing: .7px; color: var(--txt-4); text-transform: uppercase; }
.est-row { border-bottom: 1px solid var(--line-2); }
.est-row:last-child { border-bottom: none; }
.est-name { display: flex; align-items: center; gap: 10px; }
.est-dot { width: 8px; height: 8px; border-radius: 2px; flex-shrink: 0; }
.est-name b { display: block; font-size: 13.5px; font-weight: 500; color: var(--txt); }
.est-name i { font-style: normal; font-size: 9.5px; color: var(--txt-3); }
.est-cat { font-size: 12.5px; color: var(--txt-2); }
.est-strong { font-weight: 600; color: var(--txt); }
.est-disp b { font-size: 13px; }
.est-disp i { font-style: normal; font-size: 10.5px; color: var(--txt-3); margin-left: 4px; }
/* Badge de disponibilidade (verde/amarelo/vermelho) — scan visual rápido */
.est-badge {
  display: inline-block; font-family: var(--font-mono);
  font-size: 10.5px; font-weight: 600; padding: 3px 8px; border-radius: 5px;
  white-space: nowrap;
}
.est-badge-ok  { background: rgba(46,204,113,0.13); color: #2ECC71; border: 1px solid rgba(46,204,113,0.3); }
.est-badge-low { background: rgba(243,156,18,0.13); color: #F39C12; border: 1px solid rgba(243,156,18,0.4); }
.est-badge-out { background: rgba(221,42,27,0.15); color: #E74C3C; border: 1px solid rgba(221,42,27,0.4); }

/* ===================== CONFIGURAÇÕES ===================== */
.cfg { display: flex; gap: 0; border: 1px solid var(--line-2); border-radius: var(--r-lg); overflow: hidden; min-height: 520px; }
.cfg-nav { width: 200px; flex-shrink: 0; border-right: 1px solid var(--line-2); padding: 16px 12px; display: flex; flex-direction: column; gap: 2px; background: var(--bg); }
.cfg-nav-item { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 8px; font-size: 13px; color: var(--txt-3); background: none; text-align: left; }
.cfg-nav-item:hover { color: var(--txt-2); background: var(--bg-3); }
.cfg-nav-item.is-active { color: var(--txt); background: var(--red-soft); }
.cfg-nav-item.is-active svg { stroke: var(--red); }
.cfg-content { flex: 1; padding: 24px 28px; min-width: 0; }
.cfg-sec-lbl { font-size: 11px; font-weight: 600; letter-spacing: .8px; color: var(--txt-4); text-transform: uppercase; margin-bottom: 16px; }
.cfg-profile { display: flex; align-items: center; gap: 16px; margin-bottom: 24px; }
.cfg-avatar { width: 64px; height: 64px; border-radius: 50%; background: linear-gradient(135deg, #DD2A1B, #7a1610); display: flex; align-items: center; justify-content: center; font-size: 22px; font-weight: 600; color: #fff; }
.cfg-name { font-size: 16px; font-weight: 600; color: var(--txt); }
.cfg-role { font-size: 12.5px; color: var(--txt-3); margin-top: 2px; }
.cfg-photo-link { display: inline-block; margin-top: 8px; font-size: 12px; font-weight: 500; color: var(--red); cursor: pointer; }
.cfg-form { max-width: 640px; }
.cfg-divider { height: 1px; background: var(--line-2); margin: 28px 0; }
.cfg-themes { display: flex; gap: 14px; }
.cfg-theme { width: 170px; border: 1px solid var(--line); border-radius: var(--r-lg); padding: 12px; background: none; text-align: left; }
.cfg-theme.is-active { border-color: var(--red); background: var(--red-soft); }
.cfg-theme-prev { height: 54px; border-radius: 7px; margin-bottom: 9px; border: 1px solid var(--line-2); display: flex; overflow: hidden; }
.cfg-theme-prev span { width: 32px; height: 100%; border-right: 1px solid var(--line-2); }
.cfg-theme-dark { background: #0E1418; } .cfg-theme-dark span { background: #101820; }
.cfg-theme-light { background: #F4F6F9; } .cfg-theme-light span { background: #fff; border-right-color: #DDE3EB; }
.cfg-theme-row { display: flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 500; color: var(--txt); }
.cfg-radio { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--txt-4); display: inline-block; position: relative; }
.cfg-radio.is-on { border-color: var(--red); }
.cfg-radio.is-on::after { content: ''; position: absolute; inset: 2px; border-radius: 50%; background: var(--red); }
.cfg-adr { font-size: 9px; color: var(--txt-4); }
.cfg-actions { margin-top: 22px; }
.cfg-hint { font-size: 12px; color: var(--txt-3); margin-bottom: 16px; max-width: 560px; line-height: 1.5; }
.cfg-sec-mt { margin-top: 26px; }
.cfg-grp-lbl { font-size: 11px; font-weight: 600; color: var(--txt-2); margin: 14px 0 8px; }
.cfg-swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.cfg-swatch { display: flex; align-items: center; gap: 8px; background: var(--bg-2); border: 1px solid var(--line-2); border-radius: 8px; padding: 7px 10px; }
.cfg-swatch span { width: 16px; height: 16px; border-radius: 4px; flex-shrink: 0; }
.cfg-swatch b { font-size: 11.5px; font-weight: 500; color: var(--txt); flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cfg-swatch i { font-style: normal; font-size: 9.5px; color: var(--txt-4); }
.cfg-toggles { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 8px; max-width: 760px; }
.cfg-toggle { display: flex; align-items: center; justify-content: space-between; gap: 12px; background: var(--bg-2); border: 1px solid var(--line-2); border-radius: 8px; padding: 11px 14px; font-size: 12.5px; color: var(--txt-2); cursor: pointer; }
.cfg-switch { width: 34px; height: 20px; border-radius: 12px; background: var(--bg-3); border: 1px solid var(--line); position: relative; flex-shrink: 0; transition: background .15s; }
.cfg-switch i { position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: var(--txt-3); transition: transform .15s, background .15s; }
.cfg-switch.is-on { background: var(--red-soft); border-color: var(--red); }
.cfg-switch.is-on i { transform: translateX(14px); background: var(--red); }

/* ===================== AJUDA ===================== */
.hlp { max-width: 640px; }
.hlp-search { display: flex; align-items: center; gap: 10px; height: 44px; padding: 0 14px; background: var(--bg-3); border: 1px solid var(--line); border-radius: var(--r-lg); margin-bottom: 22px; color: var(--txt-4); }
.hlp-search input { border: none; background: none; padding: 0; height: auto; color: var(--txt-2); font-size: 14px; }
.hlp-search input:focus { outline: none; box-shadow: none; }
.hlp-sec-lbl { font-size: 11px; font-weight: 600; letter-spacing: .6px; color: var(--txt-4); text-transform: uppercase; margin-bottom: 12px; }
.hlp-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 22px; }
.hlp-item { display: flex; align-items: center; gap: 13px; background: var(--bg-2); border: 1px solid var(--line-2); border-radius: var(--r-lg); padding: 13px 15px; cursor: pointer; }
.hlp-item:hover { border-color: var(--line); }
.hlp-ico { width: 34px; height: 34px; border-radius: 9px; background: rgba(255,255,255,.04); border: 1px solid; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.hlp-main { flex: 1; }
.hlp-main b { display: block; font-size: 13.5px; font-weight: 500; color: var(--txt); }
.hlp-main i { font-style: normal; font-size: 11.5px; color: var(--txt-3); }
.hlp-chev { color: var(--txt-4); }
.hlp-cards { display: flex; gap: 12px; }
.hlp-card { flex: 1; background: var(--bg-2); border: 1px solid var(--line-2); border-radius: var(--r-lg); padding: 16px; }
.hlp-card svg { margin-bottom: 10px; }
.hlp-card b { display: block; font-size: 13.5px; font-weight: 600; color: var(--txt); }
.hlp-card i { font-style: normal; font-size: 11.5px; color: var(--txt-3); margin-top: 3px; display: block; }

@media (max-width: 900px) {
  .dash-stats, .est-stats { grid-template-columns: repeat(2, 1fr); }
  .dash-cols { grid-template-columns: 1fr; }
}

/* ===== Dashboard: gráfico de barras horizontais ===== */
.dash-bars { display: flex; flex-direction: column; gap: 8px; }
.dash-bar { display: grid; grid-template-columns: 80px 1fr 40px; gap: 10px; align-items: center; }
.dash-bar-lbl { font-size: 11px; color: var(--txt-3); text-transform: uppercase; letter-spacing: 0.5px; }
.dash-bar-track { background: var(--bg-3); border-radius: 4px; height: 10px; overflow: hidden; }
.dash-bar-fill { display: block; height: 100%; border-radius: 4px; transition: width 0.4s ease; }
.dash-bar-val { font-size: 12px; color: var(--txt-2); text-align: right; }
.dash-empty-hint { font-size: 11px; color: var(--txt-4); }

/* ===== Ajuda (extras) ===== */
.hlp-item { text-decoration: none; color: inherit; }
.hlp-item:hover { background: var(--bg-3); }
.hlp-empty { padding: 24px; text-align: center; color: var(--txt-3); font-size: 13px; background: var(--bg-2); border-radius: var(--r-md); border: 1px dashed var(--line); }
.hlp-empty-clear { background: none; border: none; color: var(--red); cursor: pointer; font-size: 13px; padding: 0; text-decoration: underline; }
.hlp-kbd-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 8px; }
.hlp-kbd-row { display: flex; align-items: center; gap: 12px; padding: 8px 12px; background: var(--bg-2); border: 1px solid var(--line-2); border-radius: var(--r-md); font-size: 13px; }
.hlp-kbd-row kbd { background: var(--bg-3); border: 1px solid var(--line); border-radius: 4px; padding: 2px 8px; font-family: var(--font-mono); font-size: 11px; color: var(--txt-2); min-width: 80px; text-align: center; }
.hlp-card { text-decoration: none; color: inherit; cursor: pointer; }
.hlp-card:hover { transform: translateY(-2px); transition: transform 0.15s ease; }
.hlp-version { margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--line-2); font-size: 11px; color: var(--txt-4); text-align: center; }

@media (max-width: 768px) {
  .hlp-kbd-grid { grid-template-columns: 1fr; }
}

/* ===== Config: foto de perfil + logo da empresa ===== */
.cfg-profile { display: flex; align-items: center; gap: 18px; margin-bottom: 20px; padding-bottom: 20px; border-bottom: 1px solid var(--line-2); }
.cfg-photo-wrap { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.cfg-photo-img { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; border: 2px solid var(--line); }
.cfg-avatar { width: 72px; height: 72px; border-radius: 50%; background: var(--red); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 24px; font-weight: 600; }
.cfg-photo-actions { display: flex; gap: 6px; }
.cfg-photo-link { background: none; border: none; color: var(--red); font-size: 11px; cursor: pointer; text-decoration: underline; font-family: inherit; padding: 0; }
.cfg-photo-link.cfg-photo-clear { color: var(--txt-4); }
.cfg-photo-link:hover { color: #c4241a; }
.cfg-name { font-size: 17px; font-weight: 600; color: var(--txt); }
.cfg-role { font-size: 13px; color: var(--txt-3); margin-top: 2px; }

/* Logo da empresa */
.cfg-logo-area { display: flex; flex-direction: column; gap: 16px; align-items: flex-start; }
.cfg-logo-preview { max-width: 280px; max-height: 100px; background: #fff; padding: 12px 18px; border-radius: var(--r-md); border: 1px solid var(--line); object-fit: contain; }
.cfg-logo-placeholder { display: flex; align-items: center; justify-content: center; width: 280px; height: 100px; background: var(--bg-3); border: 2px dashed var(--line); border-radius: var(--r-md); color: var(--txt-4); font-size: 13px; }
.cfg-logo-actions { display: flex; gap: 10px; }

/* ===================== ESTATÍSTICAS (#13) ===================== */
.stats { display: flex; flex-direction: column; gap: 18px; }
.stats-loading { padding: 40px; text-align: center; color: var(--txt-3); font-size: 13px; }
.stats-cols { display: grid; grid-template-columns: 1.4fr 1fr; gap: 18px; }
@media (max-width: 880px) { .stats-cols { grid-template-columns: 1fr; } }

.stats-card {
  background: var(--bg-2); border: 1px solid var(--line-2);
  border-radius: var(--r-lg); padding: 18px 20px;
}
.stats-card-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 12px; margin-bottom: 16px;
}
.stats-card-title { font-size: 13px; font-weight: 600; color: var(--txt); }
.stats-card-hint { font-size: 10.5px; color: var(--txt-4); text-transform: uppercase; letter-spacing: 0.4px; }
.stats-link { font-size: 12px; color: var(--red); font-weight: 500; }
.stats-empty { padding: 30px 12px; text-align: center; color: var(--txt-4); font-size: 12px; }

/* Barras verticais (eventos/mês) */
.stats-bars-vert { display: flex; align-items: flex-end; gap: 6px; height: 180px; padding-bottom: 24px; position: relative; }
.sbv-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; height: 100%; min-width: 0; }
.sbv-bar { flex: 1; width: 100%; max-width: 32px; display: flex; align-items: flex-end; background: var(--bg-3); border-radius: 6px 6px 0 0; overflow: hidden; }
.sbv-bar i { width: 100%; background: linear-gradient(to top, var(--red), #ff5747); border-radius: 6px 6px 0 0; transition: height 0.3s; min-height: 1px; }
.sbv-n { position: absolute; bottom: 24px; transform: translateY(-4px); font-size: 10px; color: var(--txt-3); opacity: 0; }
.sbv-col:hover .sbv-n { opacity: 1; }
.sbv-lbl { font-size: 9px; color: var(--txt-4); text-transform: uppercase; letter-spacing: 0.4px; }

/* Barras horizontais (top categorias) */
.stats-hbars { display: flex; flex-direction: column; gap: 8px; }
.shb-row { display: grid; grid-template-columns: 110px 1fr auto; gap: 10px; align-items: center; font-size: 12.5px; }
.shb-lbl { color: var(--txt-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.shb-bar { background: var(--bg-3); border-radius: 4px; height: 10px; overflow: hidden; }
.shb-bar i { display: block; height: 100%; border-radius: 4px; transition: width 0.3s; }
.shb-n { font-size: 12px; color: var(--txt); font-weight: 600; min-width: 32px; text-align: right; }

/* Donut (status projetos) */
.stats-donut { display: flex; align-items: center; gap: 24px; }
.stats-donut svg { flex-shrink: 0; }
.stats-donut-legend { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 7px; flex: 1; }
.stats-donut-legend li { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--txt-2); }
.stats-donut-legend .dot { width: 9px; height: 9px; border-radius: 2px; flex-shrink: 0; }
.stats-donut-legend b { flex: 1; font-weight: 500; }
.stats-donut-legend .mono { color: var(--txt-3); font-weight: 600; }

/* Lista de próximos eventos */
.stats-events { display: flex; flex-direction: column; gap: 9px; }
.stats-event {
  display: flex; align-items: center; gap: 14px;
  padding: 13px 14px; background: var(--bg); border: 1px solid var(--line-2);
  border-radius: var(--r-md); transition: border-color 0.12s;
}
.stats-event:hover { border-color: var(--line); }
.stats-event-date { width: 42px; text-align: center; flex-shrink: 0; }
.stats-event-date b { display: block; font-size: 15px; font-weight: 600; color: var(--txt); }
.stats-event-date i { font-style: normal; font-size: 9px; color: var(--txt-3); letter-spacing: 0.4px; }
.stats-event-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.stats-event-main b { font-size: 13.5px; font-weight: 500; color: var(--txt); }
.stats-event-main i { font-style: normal; font-size: 11.5px; color: var(--txt-3); }
