/* ============================================================
   TatameHub — Design System Premium
   Tema: Preto / Grafite / Dourado
   ============================================================ */
:root {
  --gold:        #C9A84C;
  --gold-light:  #E8C96B;
  --gold-dark:   #9A7A2E;
  --bg-dark:     #0D0D0D;
  --bg-card:     #161616;
  --bg-card2:    #1E1E1E;
  --bg-sidebar:  #111111;
  --border:      rgba(255,255,255,0.07);
  --text:        #F0F0F0;
  --text-muted:  #7A7A7A;
  --red:         #E53E3E;
  --green:       #38A169;
  --blue:        #3182CE;
  --orange:      #DD6B20;
  --sidebar-w:   260px;
  --topbar-h:    64px;
  --radius:      12px;
  --radius-sm:   8px;
  --shadow:      0 4px 24px rgba(0,0,0,0.5);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg-dark);
  color: var(--text);
  min-height: 100vh;
  font-size: 14px;
  line-height: 1.6;
}

.text-gold { color: var(--gold) !important; }

/* LOGIN */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-dark);
  position: relative;
  overflow: hidden;
}

.login-bg-art {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 60% 40% at 80% 20%, rgba(201,168,76,0.12) 0%, transparent 60%),
              radial-gradient(ellipse 50% 60% at 10% 80%, rgba(201,168,76,0.06) 0%, transparent 60%);
  pointer-events: none;
}

.login-container {
  position: relative; z-index: 1;
  width: 100%; max-width: 440px;
  padding: 2rem 1.5rem;
  display: flex; flex-direction: column; align-items: center; gap: 1.5rem;
}

.login-brand { display: flex; align-items: center; gap: 1rem; }

.brand-icon {
  width: 56px; height: 56px;
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.6rem; color: #000;
  box-shadow: 0 4px 20px rgba(201,168,76,0.4);
}

.brand-name {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 2.2rem; letter-spacing: 2px;
  margin: 0; color: var(--text);
}
.brand-name span { color: var(--gold); }
.brand-tagline { font-size: 0.75rem; color: var(--text-muted); margin: 0; letter-spacing: 1px; text-transform: uppercase; }

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

.login-title { font-size: 1.3rem; font-weight: 700; margin-bottom: 0.25rem; }
.login-sub { color: var(--text-muted); font-size: 0.85rem; margin-bottom: 1.75rem; }

.form-label-custom {
  font-size: 0.8rem; font-weight: 600; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 6px; display: block;
}

.form-control-custom {
  background: var(--bg-card2) !important;
  border: 1px solid var(--border) !important;
  color: var(--text) !important;
  border-radius: var(--radius-sm) !important;
  padding: 0.65rem 0.9rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.form-control-custom:focus {
  border-color: var(--gold) !important;
  box-shadow: 0 0 0 3px rgba(201,168,76,0.15) !important;
  outline: none !important;
}

.input-password-wrapper { position: relative; }
.btn-toggle-pwd {
  position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
  background: none; border: none; color: var(--text-muted);
  cursor: pointer; padding: 4px; font-size: 1rem; transition: color 0.2s;
}
.btn-toggle-pwd:hover { color: var(--gold); }

.btn-login {
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  border: none; color: #000; font-weight: 700;
  font-size: 0.95rem; padding: 0.75rem;
  border-radius: var(--radius-sm); cursor: pointer; transition: all 0.2s;
}
.btn-login:hover {
  background: linear-gradient(135deg, var(--gold-light), var(--gold));
  box-shadow: 0 4px 16px rgba(201,168,76,0.4); transform: translateY(-1px);
}

.login-footer { font-size: 0.75rem; color: var(--text-muted); }

/* APP LAYOUT */
.app-layout { display: flex; min-height: 100vh; }

/* SIDEBAR */
.sidebar {
  width: var(--sidebar-w); min-height: 100vh;
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column;
  position: fixed; left: 0; top: 0; z-index: 100;
  transition: transform 0.3s ease;
}

.sidebar-header {
  padding: 1.25rem 1.25rem 1rem;
  display: flex; align-items: center; gap: 0.75rem;
  border-bottom: 1px solid var(--border);
}

.sidebar-brand-icon {
  width: 38px; height: 38px;
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem; color: #000; flex-shrink: 0;
}

.sidebar-academia-nome {
  display: block; font-size: 0.85rem; font-weight: 700;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 160px;
}
.sidebar-plan {
  background: rgba(201,168,76,0.15) !important;
  color: var(--gold) !important;
  font-size: 0.65rem; font-weight: 600; letter-spacing: 0.5px;
}

.sidebar-nav {
  flex: 1; padding: 1rem 0.75rem;
  display: flex; flex-direction: column; gap: 2px; overflow-y: auto;
}

.sidebar-link {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.6rem 0.75rem; border-radius: var(--radius-sm);
  color: var(--text-muted); text-decoration: none;
  font-size: 0.875rem; font-weight: 500; transition: all 0.15s;
}
.sidebar-link:hover { background: rgba(255,255,255,0.05); color: var(--text); }
.sidebar-link.active { background: rgba(201,168,76,0.12); color: var(--gold); font-weight: 600; }
.sidebar-link i { font-size: 1rem; flex-shrink: 0; }

.sidebar-footer {
  padding: 1rem 1.25rem; border-top: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
}
.sidebar-user { display: flex; align-items: center; gap: 0.6rem; }
.sidebar-avatar { font-size: 1.6rem; color: var(--text-muted); }
.sidebar-user-name { font-size: 0.85rem; font-weight: 600; }
.sidebar-user-role { font-size: 0.7rem; color: var(--text-muted); }
.sidebar-logout {
  color: var(--text-muted); font-size: 1.1rem; text-decoration: none;
  padding: 6px; border-radius: 6px; transition: all 0.15s;
}
.sidebar-logout:hover { color: var(--red); background: rgba(229,62,62,0.1); }

/* MAIN CONTENT */
.main-content { flex: 1; margin-left: var(--sidebar-w); display: flex; flex-direction: column; min-height: 100vh; }

/* TOPBAR */
.topbar {
  height: var(--topbar-h); background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 1rem;
  padding: 0 1.5rem; position: sticky; top: 0; z-index: 50;
}
.topbar-toggle {
  display: none; background: none; border: 1px solid var(--border);
  color: var(--text); padding: 6px 10px; border-radius: 6px; cursor: pointer; font-size: 1.1rem;
}
.topbar-title { font-size: 1.1rem; font-weight: 700; margin: 0; flex: 1; }
.topbar-actions { display: flex; gap: 0.5rem; align-items: center; }
.topbar-user { font-size: 0.85rem; color: var(--text-muted); align-items: center; }

/* PAGE BODY */
.page-body { padding: 1.75rem; flex: 1; }
.page-welcome h2 { font-size: 1.4rem; font-weight: 700; margin-bottom: 4px; }

/* STAT CARDS */
.stat-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.25rem 1rem;
  text-align: center; transition: transform 0.2s, box-shadow 0.2s;
  border-top: 3px solid;
}
.stat-card:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,0.4); }
.stat-card--blue   { border-top-color: var(--blue); }
.stat-card--green  { border-top-color: var(--green); }
.stat-card--red    { border-top-color: var(--red); }
.stat-card--yellow { border-top-color: #D69E2E; }
.stat-card--gold   { border-top-color: var(--gold); }
.stat-card--orange { border-top-color: var(--orange); }
.stat-icon { font-size: 1.4rem; margin-bottom: 0.4rem; opacity: 0.7; }
.stat-card--blue   .stat-icon { color: var(--blue); }
.stat-card--green  .stat-icon { color: var(--green); }
.stat-card--red    .stat-icon { color: var(--red); }
.stat-card--yellow .stat-icon { color: #D69E2E; }
.stat-card--gold   .stat-icon { color: var(--gold); }
.stat-card--orange .stat-icon { color: var(--orange); }
.stat-value { font-size: 2rem; font-weight: 800; line-height: 1; margin-bottom: 0.2rem; }
.stat-label { font-size: 0.72rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; }

/* CARD DARK */
.card-dark { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.card-dark-header { padding: 1rem 1.25rem; border-bottom: 1px solid var(--border); background: rgba(255,255,255,0.02); }
.card-dark-body { padding: 1.25rem; }

/* TABLE */
.table-tatame { color: var(--text) !important; margin-bottom: 0; }
.table-tatame thead th {
  font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.5px;
  color: var(--text-muted); font-weight: 600;
  border-bottom: 1px solid var(--border) !important;
  padding: 0.75rem 1rem; background: rgba(255,255,255,0.02);
}
.table-tatame tbody tr { border-bottom: 1px solid var(--border); transition: background 0.1s; }
.table-tatame tbody tr:hover { background: rgba(255,255,255,0.03); }
.table-tatame tbody td { padding: 0.8rem 1rem; vertical-align: middle; }
.table-tatame tbody tr:last-child { border-bottom: none; }

/* FAIXAS */
.faixa-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.faixa-dot.faixa-branca  { background: #E8E8E8; }
.faixa-dot.faixa-azul    { background: #2C6FB5; }
.faixa-dot.faixa-roxa    { background: #7B2D8B; }
.faixa-dot.faixa-marrom  { background: #7B4A1E; }
.faixa-dot.faixa-preta   { background: #2A2A2A; border: 1px solid #555; }

.faixa-badge { display: inline-block; font-size: 0.72rem; font-weight: 700; padding: 3px 8px; border-radius: 20px; color: #fff; text-transform: capitalize; }
.faixa-badge--branca { background: #E8E8E8; color: #111 !important; }
.faixa-badge--azul   { background: #2C6FB5; }
.faixa-badge--roxa   { background: #7B2D8B; }
.faixa-badge--marrom { background: #7B4A1E; }
.faixa-badge--preta  { background: #1a1a1a; border: 1px solid #555; }

.sequencia-badge { display: inline-flex; align-items: center; font-size: 0.8rem; font-weight: 700; color: var(--orange); }
.badge-gold { background: rgba(201,168,76,0.15) !important; color: var(--gold) !important; border: 1px solid rgba(201,168,76,0.3); }

/* BUTTONS */
.btn-gold { background: linear-gradient(135deg, var(--gold), var(--gold-dark)); border: none; color: #000; font-weight: 700; transition: all 0.2s; }
.btn-gold:hover { background: linear-gradient(135deg, var(--gold-light), var(--gold)); color: #000; box-shadow: 0 4px 12px rgba(201,168,76,0.35); }

/* FORM DARK */
.form-control-dark, .form-select-dark {
  background: var(--bg-card2) !important; border: 1px solid var(--border) !important;
  color: var(--text) !important; border-radius: var(--radius-sm) !important;
}
.form-control-dark:focus, .form-select-dark:focus {
  border-color: var(--gold) !important; box-shadow: 0 0 0 3px rgba(201,168,76,0.15) !important;
}
.form-select-dark option { background: var(--bg-card2); }
.input-group-dark .input-group-text { background: var(--bg-card2); border: 1px solid var(--border); color: var(--text-muted); }

.filter-bar { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem 1.25rem; }

/* RESPONSIVE */
@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.sidebar-open { transform: translateX(0); }
  .main-content { margin-left: 0; }
  .topbar-toggle { display: flex; }
  .page-body { padding: 1rem; }
  .stat-value { font-size: 1.5rem; }
}

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-dark); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }
.toast { border-radius: var(--radius-sm) !important; }
