/* ==========================================================================
   CONSERVAÇÃO VISUAL DO CONTTA.AI — TEMA MASTER LUXURY DARK & OURO
   ========================================================================== */

:root {
  --bg: #0A0E17;
  --card: #121B2C;
  --card-border: #1F2B42;
  --gold: #D4AF37;
  --gold-light: #F5DE88;
  --gold-dark: #8F711C;
  --emerald: #10B981;
  --emerald-light: #34D399;
  --ruby: #EF4444;
  --ruby-light: #F87171;
  --blue: #3B82F6;
  --text-primary: #F8FAFC;
  --text-secondary: #94A3B8;
  --text-muted: #64748B;
  --input-bg: #182236;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

body {
  background-color: var(--bg);
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ==========================================================================
   TELA DE LOGIN DO MASTER
   ========================================================================== */

.screen-container {
  min-height: 100vh;
  width: 100%;
}

#loginScreen {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

.login-card {
  background-color: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 20px;
  padding: 40px;
  width: 100%;
  max-width: 440px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
  text-align: center;
}

.brand-badge {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(212, 175, 55, 0.15);
  border: 2px solid var(--gold);
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0 auto 16px;
  font-size: 28px;
  color: var(--gold);
}

.brand-title {
  font-size: 26px;
  font-weight: 800;
  color: var(--gold);
  letter-spacing: -0.5px;
}

.brand-subtitle {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 4px;
  margin-bottom: 16px;
}

.security-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background-color: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.3);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  color: var(--blue);
  margin-bottom: 24px;
}

.login-form {
  text-align: left;
}

.input-group {
  margin-bottom: 18px;
}

.input-group label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.5px;
  color: var(--text-secondary);
  margin-bottom: 6px;
  text-transform: uppercase;
}

.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.input-wrapper i {
  position: absolute;
  left: 14px;
  color: var(--gold);
  font-size: 14px;
}

.input-wrapper input,
.modal-input {
  width: 100%;
  background-color: var(--input-bg);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 12px 14px 12px 40px;
  color: var(--text-primary);
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s;
}

.modal-input {
  padding-left: 14px;
}

.input-wrapper input:focus,
.modal-input:focus {
  border-color: var(--gold);
}

.btn-primary {
  width: 100%;
  background-color: var(--gold);
  color: #0A0E17;
  border: none;
  border-radius: 12px;
  padding: 14px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  transition: all 0.2s;
  margin-top: 8px;
}

.btn-primary:hover {
  background-color: var(--gold-light);
  transform: translateY(-1px);
}

.alert-box {
  padding: 12px;
  border-radius: 10px;
  font-size: 12px;
  margin-bottom: 16px;
  text-align: left;
}

.alert-error {
  background-color: rgba(239, 68, 68, 0.15);
  border: 1px solid var(--ruby);
  color: var(--ruby-light);
}

/* ==========================================================================
   PAINEL DASHBOARD MASTER
   ========================================================================== */

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 32px;
  background-color: #0D1424;
  border-bottom: 1px solid var(--card-border);
}

.topbar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-icon-sm {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: rgba(212, 175, 55, 0.15);
  border: 1px solid var(--gold);
  display: flex;
  justify-content: center;
  align-items: center;
  color: var(--gold);
  font-size: 18px;
}

.topbar-title {
  font-size: 18px;
  font-weight: 800;
  color: var(--text-primary);
}

.topbar-title span {
  color: var(--gold);
}

.domain-tag {
  font-size: 11px;
  color: var(--text-muted);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn-secondary {
  background-color: var(--card);
  border: 1px solid var(--card-border);
  color: var(--text-primary);
  padding: 8px 16px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
}

.btn-secondary:hover {
  border-color: var(--gold);
  color: var(--gold);
}

.btn-logout {
  background: transparent;
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: var(--ruby-light);
  padding: 8px 14px;
  border-radius: 10px;
  font-size: 13px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
}

.btn-logout:hover {
  background-color: rgba(239, 68, 68, 0.1);
}

.dashboard-content {
  padding: 28px 32px;
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
}

/* ==========================================================================
   KPIS & ESTATÍSTICAS
   ========================================================================== */

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}

.kpi-card {
  background-color: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.kpi-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 20px;
}

.icon-users { background: rgba(248, 250, 252, 0.08); color: var(--text-primary); }
.icon-trial { background: rgba(59, 130, 246, 0.15); color: var(--blue); }
.icon-active { background: rgba(212, 175, 55, 0.15); color: var(--gold); }
.icon-expired { background: rgba(239, 68, 68, 0.15); color: var(--ruby-light); }
.icon-revenue { background: rgba(16, 185, 129, 0.15); color: var(--emerald); }

.kpi-label {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.5px;
}

.kpi-value {
  font-size: 22px;
  font-weight: 800;
  margin-top: 4px;
}

.text-gold { color: var(--gold); }
.text-emerald { color: var(--emerald); }
.text-ruby { color: var(--ruby-light); }
.text-blue { color: var(--blue); }

/* ==========================================================================
   BANNER DE PREÇOS
   ========================================================================== */

.pricing-banner {
  background: linear-gradient(90deg, #111A2D 0%, #15223A 100%);
  border: 1px solid var(--gold-dark);
  border-radius: 14px;
  padding: 14px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.pricing-info {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
}

.pricing-info strong {
  color: var(--gold);
  margin-right: 6px;
}

.btn-gold-sm {
  background-color: var(--gold);
  color: #0A0E17;
  border: none;
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-gold-sm:hover {
  background-color: var(--gold-light);
}

/* ==========================================================================
   TABELA DE USUÁRIOS
   ========================================================================== */

.table-section {
  background-color: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 18px;
  padding: 24px;
}

.table-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 20px;
}

.section-title {
  font-size: 18px;
  font-weight: 700;
}

.section-subtitle {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 3px;
}

.table-filters {
  display: flex;
  gap: 10px;
  align-items: center;
}

.search-box {
  position: relative;
  display: flex;
  align-items: center;
}

.search-box i {
  position: absolute;
  left: 12px;
  color: var(--text-muted);
  font-size: 12px;
}

.search-box input {
  background-color: var(--input-bg);
  border: 1px solid var(--card-border);
  border-radius: 10px;
  padding: 8px 12px 8px 34px;
  color: var(--text-primary);
  font-size: 13px;
  outline: none;
  width: 240px;
}

.select-filter {
  background-color: var(--input-bg);
  border: 1px solid var(--card-border);
  color: var(--text-primary);
  padding: 8px 12px;
  border-radius: 10px;
  font-size: 13px;
  outline: none;
  cursor: pointer;
}

.table-responsive {
  overflow-x: auto;
}

.user-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.user-table th {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.5px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--card-border);
}

.user-table td {
  padding: 14px;
  font-size: 13px;
  border-bottom: 1px solid var(--card-border);
  vertical-align: middle;
}

.user-name {
  font-weight: 600;
  color: var(--text-primary);
}

.user-email {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
}

.badge-trial { background: rgba(59, 130, 246, 0.15); color: var(--blue); }
.badge-active { background: rgba(212, 175, 55, 0.15); color: var(--gold); }
.badge-expired { background: rgba(239, 68, 68, 0.15); color: var(--ruby-light); }
.badge-blocked { background: rgba(100, 116, 139, 0.2); color: var(--text-muted); }

.action-buttons {
  display: flex;
  gap: 8px;
}

.btn-action {
  border: none;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.btn-extend { background: var(--gold); color: #0A0E17; }
.btn-extend:hover { background: var(--gold-light); }

.btn-block { background: rgba(239, 68, 68, 0.15); color: var(--ruby-light); border: 1px solid var(--ruby); }
.btn-block:hover { background: var(--ruby); color: #FFF; }

.btn-unblock { background: rgba(16, 185, 129, 0.15); color: var(--emerald); border: 1px solid var(--emerald); }
.btn-unblock:hover { background: var(--emerald); color: #FFF; }

/* ==========================================================================
   MODAIS
   ========================================================================== */

.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.75);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  padding: 20px;
}

.modal-card {
  background-color: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 20px;
  padding: 28px;
  width: 100%;
  max-width: 500px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.7);
}

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

.modal-header h3 {
  font-size: 17px;
  font-weight: 700;
}

.close-modal {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 24px;
  cursor: pointer;
}

.close-modal:hover {
  color: var(--text-primary);
}

.modal-label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  margin: 14px 0 8px;
}

.preset-buttons {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.btn-preset {
  background-color: var(--input-bg);
  border: 1px solid var(--card-border);
  color: var(--text-primary);
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 12px;
  cursor: pointer;
}

.btn-preset:hover {
  border-color: var(--gold);
}

.preset-gold {
  border-color: var(--gold);
  color: var(--gold);
  font-weight: 700;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 24px;
}

.btn-cancel {
  background: transparent;
  border: 1px solid var(--card-border);
  color: var(--text-muted);
  padding: 10px 16px;
  border-radius: 10px;
  font-size: 13px;
  cursor: pointer;
}

.btn-cancel:hover {
  color: var(--text-primary);
}
