/* ═══════════════════════════════════════════════
   SERLUTO — Portal do Cliente
   Design: Preto & Dourado | Elegante & Profissional
   ═══════════════════════════════════════════════ */

:root {
  --gold:         #C9A84C;
  --gold-light:   #E2C06B;
  --gold-dark:    #9A7B34;
  --gold-subtle:  rgba(201,168,76,0.12);
  --gold-border:  rgba(201,168,76,0.25);

  --black:        #0A0A0B;
  --bg:           #111114;
  --bg-card:      #18181D;
  --bg-card2:     #1F1F26;
  --border:       rgba(255,255,255,0.07);
  --border-light: rgba(255,255,255,0.12);

  --text:         #F0EDE6;
  --text-secondary: #9B9794;
  --text-muted:   #6B6865;

  --red:          #E05252;
  --red-subtle:   rgba(224,82,82,0.12);
  --green:        #52C47E;
  --green-subtle: rgba(82,196,126,0.12);
  --amber:        #F0A500;
  --amber-subtle: rgba(240,165,0,0.12);

  --font-serif:   'Cormorant Garamond', Georgia, serif;
  --font-sans:    'Montserrat', sans-serif;

  --radius:       10px;
  --radius-lg:    16px;
  --sidebar-w:    260px;
  --transition:   0.2s ease;
}

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

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--gold); text-decoration: none; }
a:hover { color: var(--gold-light); }

/* ─── SCREENS ─── */
.screen { display: none; }
.screen.active { display: flex; }
.screen.hidden { display: none !important; }

/* ══════════════════════════════
   LOGIN SCREEN
══════════════════════════════ */
#screen-login {
  min-height: 100vh;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.login-bg {
  position: fixed; inset: 0;
  background: radial-gradient(ellipse at 20% 50%, #1a1408 0%, var(--black) 60%),
              linear-gradient(180deg, #0e0c07 0%, #0a0a0b 100%);
  z-index: 0;
}

.login-overlay {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 600px 400px at 80% 20%, rgba(201,168,76,0.06) 0%, transparent 70%),
    radial-gradient(ellipse 400px 600px at 10% 80%, rgba(201,168,76,0.04) 0%, transparent 70%);
}

.login-particles {
  position: absolute; inset: 0;
  overflow: hidden;
}

.login-container {
  position: relative; z-index: 1;
  width: 100%; max-width: 480px;
  padding: 2rem 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
  animation: fadeInUp 0.7s ease both;
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Brand */
.login-brand {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.brand-logo {
  animation: floatY 4s ease-in-out infinite;
}
@keyframes floatY {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-6px); }
}

.brand-name {
  font-family: var(--font-serif);
  font-size: clamp(2.2rem, 5vw, 3rem);
  font-weight: 300;
  letter-spacing: 0.35em;
  color: var(--gold-light);
  text-shadow: 0 0 40px rgba(201,168,76,0.4);
}

.brand-tagline {
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  color: var(--text-muted);
  text-transform: uppercase;
}

/* Login Card */
.login-card {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--gold-border);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  box-shadow:
    0 0 0 1px rgba(201,168,76,0.05),
    0 24px 64px rgba(0,0,0,0.6),
    0 0 80px rgba(201,168,76,0.05);
}

.login-card-header {
  margin-bottom: 2rem;
  text-align: center;
}
.login-card-header h2 {
  font-family: var(--font-serif);
  font-size: 1.6rem;
  font-weight: 400;
  color: var(--text);
  margin-bottom: 0.35rem;
}
.login-card-header p {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.login-footer {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.75rem;
  line-height: 1.8;
}

/* ══════════════════════════════
   FORM ELEMENTS
══════════════════════════════ */
.form-group {
  margin-bottom: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.form-group label {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
  text-transform: uppercase;
}

.form-input {
  width: 100%;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 0.85rem 1rem;
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 1rem;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
  -webkit-appearance: none;
}
.form-input::placeholder { color: var(--text-muted); }
.form-input:focus {
  border-color: var(--gold);
  background: rgba(201,168,76,0.05);
  box-shadow: 0 0 0 3px rgba(201,168,76,0.12);
}
select.form-input { cursor: pointer; }
option { background: var(--bg-card2); }

.input-hint {
  font-size: 0.73rem;
  color: var(--text-muted);
}

.input-password-wrap {
  position: relative;
}
.input-password-wrap .form-input { padding-right: 3rem; }
.toggle-pass {
  position: absolute; right: 0.85rem; top: 50%;
  transform: translateY(-50%);
  background: none; border: none; cursor: pointer;
  color: var(--text-muted); padding: 0.2rem;
  transition: color var(--transition);
  display: flex; align-items: center;
}
.toggle-pass:hover { color: var(--gold); }

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

/* ══════════════════════════════
   BUTTONS
══════════════════════════════ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.8rem 1.5rem;
  border-radius: var(--radius);
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  cursor: pointer;
  border: none;
  transition: all var(--transition);
  text-transform: uppercase;
}

.btn-primary {
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dark) 100%);
  color: #0A0805;
  box-shadow: 0 4px 16px rgba(201,168,76,0.25);
}
.btn-primary:hover {
  background: linear-gradient(135deg, var(--gold-light) 0%, var(--gold) 100%);
  box-shadow: 0 6px 24px rgba(201,168,76,0.4);
  transform: translateY(-1px);
}
.btn-primary:active { transform: translateY(0); }

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border-light);
}
.btn-ghost:hover {
  color: var(--text);
  border-color: var(--text-muted);
  background: rgba(255,255,255,0.04);
}

.btn-outline {
  background: transparent;
  color: var(--gold);
  border: 1px solid var(--gold-border);
}
.btn-outline:hover {
  background: var(--gold-subtle);
  border-color: var(--gold);
}

.btn-full { width: 100%; margin-top: 0.5rem; }
.btn-sm { padding: 0.5rem 1rem; font-size: 0.75rem; }

.login-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-top: 1.25rem;
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* ══════════════════════════════
   ALERTS
══════════════════════════════ */
.alert {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.85rem 1rem;
  border-radius: var(--radius);
  font-size: 0.85rem;
  margin-bottom: 1rem;
}
.alert-error  { background: var(--red-subtle);   border: 1px solid rgba(224,82,82,0.25);   color: #ff8a8a; }
.alert-success{ background: var(--green-subtle); border: 1px solid rgba(82,196,126,0.25); color: #7febb0; }
.hidden { display: none !important; }

/* ══════════════════════════════
   LAYOUT: SIDEBAR + MAIN
══════════════════════════════ */
#screen-client,
#screen-admin {
  min-height: 100vh;
  display: none;
  flex-direction: row;
}
#screen-client.active,
#screen-admin.active { display: flex; }

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

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 1.5rem 1.5rem 1rem;
  border-bottom: 1px solid var(--border);
  font-family: var(--font-serif);
  font-size: 1.2rem;
  letter-spacing: 0.2em;
  color: var(--gold-light);
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  padding: 1rem 0.75rem;
  gap: 0.25rem;
  flex: 1;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 500;
  transition: all var(--transition);
  cursor: pointer;
}
.nav-item svg { width: 18px; height: 18px; flex-shrink: 0; }
.nav-item:hover {
  color: var(--text);
  background: rgba(255,255,255,0.04);
}
.nav-item.active {
  color: var(--gold-light);
  background: var(--gold-subtle);
  border: 1px solid var(--gold-border);
}

.sidebar-footer {
  padding: 1rem 0.75rem 1.5rem;
  border-top: 1px solid var(--border);
}

.btn-logout {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  padding: 0.75rem 1rem;
  background: none;
  border: none;
  border-radius: var(--radius);
  color: var(--text-muted);
  font-family: var(--font-sans);
  font-size: 0.85rem;
  cursor: pointer;
  transition: all var(--transition);
}
.btn-logout svg { width: 18px; height: 18px; }
.btn-logout:hover { color: var(--red); background: var(--red-subtle); }

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

/* Topbar */
.topbar {
  height: 64px;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 1.75rem;
  gap: 1rem;
  position: sticky;
  top: 0;
  z-index: 50;
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-secondary);
  padding: 0.4rem;
}
.menu-toggle svg { width: 22px; height: 22px; }

.topbar-greeting {
  font-size: 0.9rem;
  color: var(--text-secondary);
  flex: 1;
}
.topbar-greeting strong { color: var(--text); }

.topbar-right {
  display: flex; align-items: center; gap: 1rem;
}

.topbar-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--gold-subtle);
  border: 1px solid var(--gold-border);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 0.85rem; color: var(--gold-light);
}

/* Tab content */
.tab-content {
  flex: 1;
  padding: 2rem 2rem 3rem;
  animation: fadeIn 0.3s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.page-header {
  margin-bottom: 2rem;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
}
.page-title {
  font-family: var(--font-serif);
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 400;
  color: var(--text);
  line-height: 1;
}
.page-subtitle {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-top: 0.35rem;
}

/* Cards grid */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 1.75rem;
}

.info-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.4rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  transition: border-color var(--transition), transform var(--transition);
}
.info-card:hover { transform: translateY(-2px); }
.info-card.card-gold {
  border-color: var(--gold-border);
  background: linear-gradient(135deg, rgba(201,168,76,0.08) 0%, var(--bg-card) 100%);
}
.info-card.card-alert { border-color: rgba(224,82,82,0.2); }

.info-card-icon {
  width: 44px; height: 44px;
  border-radius: 10px;
  background: var(--gold-subtle);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.card-alert .info-card-icon { background: var(--red-subtle); }
.info-card-icon svg { width: 20px; height: 20px; stroke: var(--gold-light); }
.card-alert .info-card-icon svg { stroke: var(--red); }

.info-card-label {
  display: block;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}
.info-card-value {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  color: var(--text);
}
.card-gold .info-card-value { color: var(--gold-light); }

/* Section card */
.section-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.section-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}
.section-card-header h3 {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 400;
  color: var(--text);
}
.link-gold { font-size: 0.82rem; color: var(--gold); }
.link-gold:hover { color: var(--gold-light); }

/* Table */
.table-wrap { overflow-x: auto; }
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}
.data-table th {
  text-align: left;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 0.6rem 1rem;
  border-bottom: 1px solid var(--border);
}
.data-table td {
  padding: 0.9rem 1rem;
  border-bottom: 1px solid var(--border);
  color: var(--text-secondary);
  vertical-align: middle;
}
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: rgba(255,255,255,0.02); color: var(--text); }

/* Status badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.25rem 0.75rem;
  border-radius: 99px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.badge::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: currentColor;
}
.badge-green  { background: var(--green-subtle); color: var(--green); }
.badge-red    { background: var(--red-subtle);   color: var(--red); }
.badge-amber  { background: var(--amber-subtle); color: var(--amber); }
.badge-gray   { background: rgba(255,255,255,0.06); color: var(--text-muted); }

.status-badge {
  display: inline-flex; align-items: center;
  font-size: 0.72rem; font-weight: 700;
  letter-spacing: 0.05em; text-transform: uppercase;
  padding: 0.25rem 0.75rem;
  border-radius: 99px;
}

/* Detail list */
.detail-list {
  display: grid;
  gap: 0;
}
.detail-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--border);
  gap: 1rem;
}
.detail-item:last-child { border-bottom: none; }
.detail-label {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-muted);
  flex-shrink: 0;
}
.detail-value {
  font-size: 0.9rem;
  color: var(--text);
  text-align: right;
}

/* Dados info */
.dados-info {
  margin-top: 1.5rem;
  padding: 1rem;
  background: var(--gold-subtle);
  border: 1px solid var(--gold-border);
  border-radius: var(--radius);
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.6;
}
.dados-info strong { color: var(--gold-light); }

/* Plano detail */
.plano-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.cobertura-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.cobertura-list li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.88rem;
  color: var(--text-secondary);
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border);
}
.cobertura-list li:last-child { border-bottom: none; }
.cobertura-list li::before {
  content: '';
  width: 18px; height: 18px; flex-shrink: 0;
  background: var(--gold-subtle);
  border: 1px solid var(--gold-border);
  border-radius: 50%;
  background-image: url("data:image/svg+xml,%3Csvg width='10' height='8' viewBox='0 0 10 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 4L3.5 6.5L9 1' stroke='%23C9A84C' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
}

/* Filter bar */
.filter-bar {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}
.filter-btn {
  padding: 0.45rem 1.1rem;
  border-radius: 99px;
  border: 1px solid var(--border-light);
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  font-family: var(--font-sans);
}
.filter-btn.active {
  background: var(--gold-subtle);
  border-color: var(--gold-border);
  color: var(--gold-light);
}
.filter-btn:hover:not(.active) {
  color: var(--text);
  border-color: var(--border-light);
  background: rgba(255,255,255,0.04);
}

/* ══════════════════════════════
   PAYMENT
══════════════════════════════ */
.payment-layout {
  max-width: 620px;
}

.payment-methods {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
  margin-bottom: 1.75rem;
}

.method-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem 0.75rem;
  background: var(--bg-card2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: all var(--transition);
}
.method-btn svg { width: 22px; height: 22px; }
.method-btn:hover { border-color: var(--gold-border); color: var(--text); }
.method-btn.active {
  border-color: var(--gold);
  background: var(--gold-subtle);
  color: var(--gold-light);
}

.payment-area { margin-top: 0.5rem; }

.payment-info {
  font-size: 0.88rem;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  line-height: 1.7;
}

.pix-qr-wrap {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.pix-qr {
  background: white;
  border-radius: var(--radius);
  padding: 0.75rem;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid var(--gold-border);
}

.pix-key-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.pix-key-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}
.pix-key-box {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--bg-card2);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
}
.pix-key-box span {
  flex: 1;
  font-size: 0.9rem;
  color: var(--text);
  font-family: monospace;
}
.btn-copy {
  background: var(--gold-subtle);
  border: 1px solid var(--gold-border);
  color: var(--gold-light);
  border-radius: 6px;
  padding: 0.35rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  font-family: var(--font-sans);
  transition: all var(--transition);
}
.btn-copy:hover { background: var(--gold); color: #0a0805; }
.pix-amount { font-size: 0.88rem; color: var(--text-secondary); }
.pix-amount strong { color: var(--gold-light); font-size: 1.1rem; }

.no-selection {
  font-size: 0.9rem;
  color: var(--text-muted);
  text-align: center;
  padding: 2rem;
}

/* Fatura selecionada */
.fatura-info-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  background: var(--gold-subtle);
  border: 1px solid var(--gold-border);
  border-radius: var(--radius);
  margin-bottom: 0.5rem;
}
.fatura-info-box .fi-ref { font-size: 0.8rem; color: var(--text-muted); margin-bottom: 0.2rem; }
.fatura-info-box .fi-val { font-family: var(--font-serif); font-size: 1.5rem; color: var(--gold-light); }

/* ══════════════════════════════
   ADMIN
══════════════════════════════ */
.sidebar-admin { border-right-color: rgba(201,168,76,0.2); }

.relatorios-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
}
.relatorio-card {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}
.relatorio-icon { color: var(--gold); margin-bottom: 0.5rem; }
.relatorio-card h4 { font-family: var(--font-serif); font-size: 1.1rem; color: var(--text); }
.relatorio-card p { font-size: 0.82rem; color: var(--text-secondary); line-height: 1.5; }
.relatorio-btns { display: flex; gap: 0.5rem; margin-top: 0.25rem; }

/* ══════════════════════════════
   MODAL
══════════════════════════════ */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.75);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  animation: fadeIn 0.2s ease;
}

.modal {
  background: var(--bg-card);
  border: 1px solid var(--gold-border);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 32px 80px rgba(0,0,0,0.7);
  animation: slideUp 0.3s ease;
}
.modal-small { max-width: 400px; }

@keyframes slideUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem;
  border-bottom: 1px solid var(--border);
}
.modal-header h3 {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 400;
}
.modal-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.1rem;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
  transition: all var(--transition);
}
.modal-close:hover { color: var(--text); background: rgba(255,255,255,0.06); }

.modal-body { padding: 1.5rem; }
.modal-footer {
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
  padding: 1.25rem 1.5rem;
  border-top: 1px solid var(--border);
}

.success-icon {
  width: 80px; height: 80px;
  border-radius: 50%;
  background: var(--green-subtle);
  border: 1px solid rgba(82,196,126,0.25);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto;
  color: var(--green);
}

/* ══════════════════════════════
   TOAST
══════════════════════════════ */
.toast {
  position: fixed;
  bottom: 2rem; right: 2rem;
  background: var(--bg-card2);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 0.9rem 1.5rem;
  font-size: 0.88rem;
  color: var(--text);
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
  z-index: 2000;
  animation: slideInRight 0.3s ease;
  max-width: 320px;
}
@keyframes slideInRight {
  from { opacity: 0; transform: translateX(20px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* Forgot password */
.forgot-info {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 1.5rem;
}

/* Action buttons in table */
.table-actions { display: flex; gap: 0.4rem; flex-wrap: wrap; }
.btn-table {
  padding: 0.3rem 0.65rem;
  font-size: 0.72rem;
  font-weight: 600;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: transparent;
  cursor: pointer;
  font-family: var(--font-sans);
  transition: all var(--transition);
  color: var(--text-secondary);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.btn-table:hover { color: var(--text); border-color: var(--border-light); background: rgba(255,255,255,0.04); }
.btn-table.btn-pay { color: var(--gold); border-color: var(--gold-border); }
.btn-table.btn-pay:hover { background: var(--gold-subtle); }
.btn-table.btn-danger { color: var(--red); border-color: rgba(224,82,82,0.2); }
.btn-table.btn-danger:hover { background: var(--red-subtle); }

/* ══════════════════════════════
   SCROLLBAR
══════════════════════════════ */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-light); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* ══════════════════════════════
   RESPONSIVE
══════════════════════════════ */
@media (max-width: 900px) {
  .sidebar {
    transform: translateX(-100%);
  }
  .sidebar.open {
    transform: translateX(0);
    box-shadow: 4px 0 40px rgba(0,0,0,0.5);
  }
  .main-content { margin-left: 0; }
  .menu-toggle { display: flex; }

  .plano-detail-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .payment-methods { grid-template-columns: repeat(2, 1fr); }
  .tab-content { padding: 1.5rem 1rem 3rem; }
  .page-header { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 580px) {
  .login-card { padding: 1.75rem 1.25rem; }
  .cards-grid { grid-template-columns: 1fr 1fr; }
  .pix-qr-wrap { flex-direction: column; align-items: center; }
  .payment-methods { grid-template-columns: repeat(2, 1fr); }
  .modal { margin: 0.5rem; }
  .table-wrap { font-size: 0.82rem; }
  .data-table th, .data-table td { padding: 0.7rem 0.6rem; }
}

@media (max-width: 400px) {
  .cards-grid { grid-template-columns: 1fr; }
  .brand-name { font-size: 2rem; }
}

/* Overlay mobile sidebar */
.sidebar-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 99;
}
.sidebar-overlay.active { display: block; }

/* ══════════════════════════════
   MERCADO PAGO — ÁREA DE PAGAMENTO
══════════════════════════════ */
.mp-info-box {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background: rgba(82,196,126,0.07);
  border: 1px solid rgba(82,196,126,0.2);
  border-radius: var(--radius);
  margin: 1.25rem 0;
  color: var(--green);
}
.mp-info-box svg { flex-shrink: 0; margin-top: 2px; }
.mp-info-box strong { display: block; font-size: 0.88rem; margin-bottom: 0.2rem; color: var(--green); }
.mp-info-box span   { font-size: 0.8rem; color: var(--text-secondary); }

.mp-metodos {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-bottom: 1.5rem;
}
.mp-metodo-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.88rem;
  color: var(--text-secondary);
  padding: 0.6rem 0.85rem;
  background: var(--bg-card2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.mp-metodo-item svg { color: var(--gold); flex-shrink: 0; }

.btn-pagar-mp {
  font-size: 1rem;
  padding: 1rem;
  letter-spacing: 0.03em;
  gap: 0.75rem;
  margin-top: 0;
}

.mp-disclaimer {
  text-align: center;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.85rem;
  line-height: 1.6;
}

.mp-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  padding: 2rem;
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.88rem;
}
.mp-spinner {
  width: 36px; height: 36px;
  border: 3px solid var(--border);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.fatura-info-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  background: var(--gold-subtle);
  border: 1px solid var(--gold-border);
  border-radius: var(--radius);
  margin-bottom: 0.5rem;
}
.fatura-info-box .fi-ref { font-size: 0.8rem; color: var(--text-muted); margin-bottom: 0.2rem; }
.fatura-info-box .fi-val { font-family: var(--font-serif); font-size: 1.5rem; color: var(--gold-light); }
