/* =============================================
   Smash do Cabo — Comissões
   css/style.css
   ============================================= */

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

:root {
  --brand:       #D85A30;
  --brand-dark:  #B04420;
  --brand-light: #FAE9E2;

  --bg:          #F6F5F3;
  --surface:     #FFFFFF;
  --surface-2:   #F1EFE8;

  --text:        #1A1A18;
  --text-2:      #5A5A56;
  --text-3:      #8A8A84;

  --border:      rgba(0,0,0,0.10);
  --border-2:    rgba(0,0,0,0.18);

  --radius-sm:   6px;
  --radius-md:   10px;
  --radius-lg:   14px;

  --shadow-sm:   0 1px 3px rgba(0,0,0,0.08);
  --shadow-md:   0 4px 16px rgba(0,0,0,0.10);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg:        #1A1A18;
    --surface:   #242422;
    --surface-2: #2E2E2B;
    --text:      #F0EFE8;
    --text-2:    #A0A09A;
    --text-3:    #6A6A64;
    --border:    rgba(255,255,255,0.09);
    --border-2:  rgba(255,255,255,0.16);
    --brand-light: rgba(216,90,48,0.15);
  }
}

html { font-size: 16px; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  min-height: 100vh;
}

/* ---- LOGIN ---- */
.page-login {
  display: flex;
  align-items: center;
  justify-content: center;
}

.login-wrap {
  width: 100%;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
}

.login-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2.5rem 2rem;
  width: 100%;
  max-width: 380px;
  box-shadow: var(--shadow-md);
}

.brand { text-align: center; margin-bottom: 2rem; }
.brand-icon { font-size: 2.5rem; display: block; margin-bottom: 0.5rem; }
.brand-name {
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.02em;
}
.brand-sub { font-size: 0.85rem; color: var(--text-2); margin-top: 4px; }

.login-err {
  font-size: 0.8rem;
  color: var(--brand);
  text-align: center;
  margin-top: 10px;
  min-height: 18px;
}

/* ---- TOPBAR ---- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.25rem;
  height: 52px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.topbar-left { display: flex; align-items: center; gap: 8px; }
.topbar-logo { font-size: 1.3rem; }
.topbar-title { font-size: 0.95rem; font-weight: 600; color: var(--text); }
.topbar-badge {
  font-size: 0.7rem;
  font-weight: 600;
  background: var(--brand-light);
  color: var(--brand);
  padding: 2px 8px;
  border-radius: 20px;
  letter-spacing: 0.02em;
}

.topbar-right { display: flex; align-items: center; gap: 10px; }
.topbar-user { font-size: 0.82rem; color: var(--text-2); }

/* ---- TABS ---- */
.tabs-bar {
  display: flex;
  gap: 0;
  padding: 0 1.25rem;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.tab {
  padding: 10px 18px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-2);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
  margin-bottom: -1px;
}
.tab:hover { color: var(--text); }
.tab.active { color: var(--brand); border-bottom-color: var(--brand); }

.tab-content { display: none; }
.tab-content.active { display: block; }

/* ---- MAIN ---- */
.main-content {
  max-width: 960px;
  margin: 0 auto;
  padding: 1.5rem 1.25rem 3rem;
}

/* ---- SECTION ROW ---- */
.section-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  gap: 1rem;
}

.month-nav {
  display: flex;
  align-items: center;
  gap: 10px;
}

.mono-label {
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-3);
}

.section-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-2);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 1.5rem 0 0.75rem;
}

/* ---- SUMMARY CARDS ---- */
.summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px;
  margin-bottom: 1.5rem;
}

.s-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 16px;
}
.s-card-label { font-size: 0.75rem; color: var(--text-3); margin-bottom: 6px; }
.s-card-value { font-size: 1.4rem; font-weight: 600; color: var(--text); letter-spacing: -0.02em; }
.s-card-value.accent { color: var(--brand); }

/* ---- CARD ---- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  margin-bottom: 1.5rem;
}
.card-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 1rem;
}

/* ---- FORM ---- */
.field { display: flex; flex-direction: column; gap: 5px; }
.field label {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-2);
}

.field input,
.field select {
  padding: 8px 12px;
  font-size: 0.88rem;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border-2);
  border-radius: var(--radius-sm);
  outline: none;
  transition: border-color 0.15s;
  width: 100%;
}
.field input:focus, .field select:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(216,90,48,0.12);
}

.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.field-action { justify-content: flex-end; }

.form-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 1rem;
  gap: 1rem;
  flex-wrap: wrap;
}

.field-hint {
  font-size: 0.82rem;
  color: var(--text-2);
}
.field-hint strong { color: var(--brand); }

.form-err {
  font-size: 0.8rem;
  color: var(--brand);
  margin-top: 8px;
  min-height: 18px;
}

/* ---- GARCONS CHIPS ---- */
.garcons-check-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
}

.gc-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 20px;
  cursor: pointer;
  font-size: 0.85rem;
  color: var(--text-2);
  transition: background 0.12s, border-color 0.12s, color 0.12s;
  user-select: none;
}
.gc-chip:hover { border-color: var(--brand); color: var(--text); }
.gc-chip.selected {
  background: var(--brand-light);
  border-color: var(--brand);
  color: var(--brand);
  font-weight: 600;
}
.gc-chip input[type="checkbox"] { display: none; }

.hint-text {
  font-size: 0.82rem;
  color: var(--text-3);
  padding: 4px 0;
}

/* ---- BOTÕES DE AÇÃO DA EQUIPE ---- */
.td-acoes { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }

.btn-acao {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  border: 1px solid;
  cursor: pointer;
  transition: opacity 0.12s, transform 0.1s;
  white-space: nowrap;
}
.btn-acao:active { transform: scale(0.97); }

.btn-pausar {
  background: #FFF8E6;
  border-color: #EF9F27;
  color: #854F0B;
}
.btn-pausar:hover { background: #FAC775; }

.btn-reativar {
  background: #EAF3DE;
  border-color: #639922;
  color: #3B6D11;
}
.btn-reativar:hover { background: #C0DD97; }

.btn-demitir {
  background: #FEF2F2;
  border-color: #E24B4A;
  color: #A32D2D;
}
.btn-demitir:hover { background: #F7C1C1; }

.btn-excluir {
  background: var(--surface-2);
  border-color: var(--border-2);
  color: var(--text-3);
}
.btn-excluir:hover { background: var(--brand-light); border-color: var(--brand); color: var(--brand); }

/* ---- TABLE ---- */
.table-wrap {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: 1rem;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  table-layout: fixed;
}

th {
  padding: 9px 12px;
  text-align: left;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-3);
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

td {
  padding: 10px 12px;
  color: var(--text);
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

tr:last-child td { border-bottom: none; }
tbody tr:hover td { background: var(--surface-2); }

.td-name { font-weight: 500; }
.td-accent { color: var(--brand); font-weight: 600; }
.td-muted { color: var(--text-2); font-size: 0.8rem; }

/* ---- BADGES ---- */
.badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 20px;
  letter-spacing: 0.02em;
}
.badge-active   { background: #EAF3DE; color: #3B6D11; }
.badge-pausado  { background: #FFF8E6; color: #854F0B; max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.badge-demitido { background: var(--surface-2); color: var(--text-3); }

/* ---- BUTTONS ---- */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 20px;
  font-size: 0.88rem;
  font-weight: 600;
  color: #fff;
  background: var(--brand);
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
  white-space: nowrap;
}
.btn-primary:hover { background: var(--brand-dark); }
.btn-primary:active { transform: scale(0.98); }

.btn-ghost {
  padding: 7px 14px;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-2);
  background: transparent;
  border: 1px solid var(--border-2);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.12s, color 0.12s;
}
.btn-ghost:hover {
  background: var(--surface-2);
  color: var(--text);
}

.btn-del {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-3);
  font-size: 1rem;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  transition: color 0.12s, background 0.12s;
}
.btn-del:hover { color: var(--brand); background: var(--brand-light); }

.btn-icon {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-2);
  font-size: 0.8rem;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  transition: color 0.12s;
}
.btn-icon:hover { color: var(--brand); }

/* ---- MISC ---- */
.footnote {
  font-size: 0.78rem;
  color: var(--text-3);
  margin-top: 0.75rem;
}

.empty-state {
  text-align: center;
  padding: 2rem;
  color: var(--text-3);
  font-size: 0.85rem;
}

/* ---- RESPONSIVE ---- */
@media (max-width: 600px) {
  .main-content { padding: 1rem 0.75rem 3rem; }
  .form-row { grid-template-columns: 1fr; }
  .topbar { padding: 0 0.75rem; }
  .tabs-bar { padding: 0 0.75rem; overflow-x: auto; }
  .tab { padding: 10px 12px; font-size: 0.8rem; white-space: nowrap; }
  .s-card-value { font-size: 1.2rem; }
}
