/* Importar módulos */
@import 'components.css';
@import 'sidebar.css';

/* ── Navigation bar (legacy pages) ── */
.navigation-bar {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.nav-btn {
  background: var(--surface-3);
  border: 1px solid var(--line);
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-weight: 600;
  font-size: 13.5px;
  font-family: var(--font-body);
  color: var(--text-muted);
  transition: all .2s;
}

.nav-btn:hover:not(:disabled) {
  background: var(--surface-2);
  color: var(--teal-300);
  border-color: var(--teal);
}

.nav-btn:disabled { opacity: .3; cursor: not-allowed; }

/* ── Permanent file checkbox ── */
.permanent-checkbox {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  background: var(--surface-3);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  margin: 14px 0;
}

.permanent-checkbox input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: var(--teal);
}

.permanent-checkbox label {
  cursor: pointer;
  user-select: none;
  font-size: 14px;
  color: var(--text-muted);
  font-family: var(--font-body);
}

/* ── Integrity indicator ── */
.integrity-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  background: rgba(16,185,129,.08);
  border: 1px solid rgba(16,185,129,.22);
  border-radius: var(--radius-sm);
  margin-top: 12px;
  font-size: 13.5px;
  color: #6ee7b7;
  font-family: var(--font-body);
}

.integrity-indicator.error {
  background: rgba(239,68,68,.08);
  border-color: rgba(239,68,68,.22);
  color: #f87171;
}

.integrity-indicator .icon { font-size: 1.1rem; }

/* ── Progress bar (override) ── */
.progress-bar {
  width: 100%;
  height: 8px;
  background: var(--surface-3);
  border-radius: 100px;
  overflow: hidden;
  margin: 14px 0;
  position: relative;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--teal), var(--teal-bright));
  transition: width 0.3s linear;
  border-radius: 100px;
  position: relative;
}

.progress-fill::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.3), transparent);
  animation: shimmer 2s infinite;
}

@keyframes shimmer {
  from { transform: translateX(-100%); }
  to   { transform: translateX(100%); }
}

.progress-text {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--text-muted);
  margin-top: 6px;
  text-align: center;
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .progress-bar  { height: 10px; }
  .progress-text { font-size: 12px; }
  .nav-btn       { padding: 10px 14px; font-size: 14px; }
}

/* ═══════════════════════════════════════════════════════════════
   PLANS & PRICING
   ═══════════════════════════════════════════════════════════════ */

/* Plan badge inline */
.plan-badge {
  display: inline-block;
  padding: .25rem .75rem;
  border-radius: 99px;
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .02em;
}
.plan-badge--standard     { background: #edf2f7; color: #4a5568; }
.plan-badge--professional { background: #ebf4ff; color: #2b6cb0; }
.plan-badge--enterprise   { background: #faf5ff; color: #6b21a8; }

.plan-current-badge {
  display: inline-block;
  background: #c6f6d5;
  color: #276749;
  padding: .15rem .55rem;
  border-radius: 99px;
  font-size: .72rem;
  font-weight: 600;
}

/* Quota bars */
.quota-meters { border-top: 1px solid #e2e8f0; padding-top: 1rem; }
.quota-bar    { height: 8px; background: #e2e8f0; border-radius: 99px; overflow: hidden; }
.quota-bar__fill { height: 100%; background: var(--gradient-primary); border-radius: 99px; transition: width .4s ease; }

/* ═══════════════════════════════════════════════════════════════
   PRICING PAGE
   ═══════════════════════════════════════════════════════════════ */

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin: 0 auto 3rem;
}

.pricing-card {
  background: var(--bg-card);
  border: 1.5px solid var(--border-color);
  border-radius: 16px;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  position: relative;
  transition: box-shadow .2s;
}
.pricing-card:hover { box-shadow: 0 8px 24px rgba(0,0,0,.1); }

.pricing-card--featured {
  border-color: var(--primary);
  box-shadow: 0 4px 20px rgba(108,99,255,.15);
}

.pricing-card__badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--gradient-primary);
  color: #fff;
  padding: .3rem 1rem;
  border-radius: 99px;
  font-size: .75rem;
  font-weight: 700;
  white-space: nowrap;
}

.pricing-card__header h3 {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: .35rem;
}

.pricing-card__price {
  margin: .5rem 0;
}
.price-amount {
  font-size: 2.5rem;
  font-weight: 800;
  color: #fff;
}
.price-period {
  font-size: 1rem;
  color: var(--text-muted);
}

.pricing-card__desc { color: var(--text-muted); font-size: .9rem; }

.pricing-features {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: .6rem;
  flex: 1;
}
.pricing-features li { font-size: .9rem; }

.pricing-card__cta {
  margin-top: auto;
}
.pricing-card__cta button,
.pricing-card__cta a { width: 100%; text-align: center; }

.pricing-payment-methods {
  color: var(--text-muted);
  font-size: .78rem;
  text-align: center;
  margin: 0;
}

/* Enterprise calculator */
.pricing-card__enterprise-calc {
  background: var(--bg-secondary);
  border-radius: 10px;
  padding: 1rem;
}
.pricing-card__enterprise-calc label { font-size: .85rem; color: var(--text-muted); margin-bottom: .5rem; display: block; }
.enterprise-calc-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  justify-content: center;
}
.calc-btn {
  width: 36px;
  height: 36px;
  border: 1.5px solid var(--border-color);
  border-radius: 8px;
  background: var(--bg-card);
  color: #fff;
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.calc-btn:hover { background: var(--bg-secondary); }
#numUsersDisplay { font-size: 1.5rem; font-weight: 700; min-width: 2ch; text-align: center; }
.enterprise-total { text-align: center; margin: .5rem 0 0; font-size: .9rem; }

/* FAQ */
.pricing-faq { max-width: 900px; margin: 0 auto; }
.pricing-faq h3 { margin-bottom: 1.5rem; font-size: 1.4rem; }
.faq-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 1.25rem; }
.faq-item { background: var(--bg-card); border: 1px solid var(--border-color); border-radius: 12px; padding: 1.25rem; }
.faq-item h4 { font-size: 1rem; margin-bottom: .5rem; }
.faq-item p  { color: var(--text-muted); font-size: .9rem; margin: 0; }

/* ═══════════════════════════════════════════════════════════════
   ENTERPRISE ADMIN PANEL
   ═══════════════════════════════════════════════════════════════ */

.admin-tabs {
  display: flex;
  gap: .5rem;
  margin-bottom: 1.5rem;
  border-bottom: 2px solid var(--border-color);
  padding-bottom: 0;
  flex-wrap: wrap;
}
.admin-tab {
  background: none;
  border: none;
  padding: .75rem 1.25rem;
  font-size: .9rem;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  border-radius: 0;
  transition: color .15s, border-color .15s;
}
.admin-tab:hover { color: var(--text-primary); }
.admin-tab--active { color: var(--primary); border-bottom-color: var(--primary); font-weight: 600; }

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .9rem;
}
.admin-table th {
  text-align: left;
  padding: .6rem 1rem;
  border-bottom: 2px solid var(--border-color);
  color: var(--text-muted);
  font-weight: 600;
}
.admin-table td {
  padding: .75rem 1rem;
  border-bottom: 1px solid var(--border-color);
  vertical-align: middle;
}
.admin-table tr:last-child td { border-bottom: none; }
.table-responsive { overflow-x: auto; }

.role-badge {
  display: inline-block;
  padding: .2rem .6rem;
  border-radius: 99px;
  font-size: .75rem;
  font-weight: 600;
}
.role-badge--admin  { background: #fef3c7; color: #92400e; }
.role-badge--member { background: #e2e8f0; color: #4a5568; }

.admin-actions { display: flex; gap: .5rem; flex-wrap: wrap; }

.btn-xs {
  padding: .25rem .7rem;
  font-size: .78rem;
  border-radius: 6px;
  border: 1.5px solid;
  cursor: pointer;
  font-weight: 500;
  white-space: nowrap;
}
.btn-xs.btn-secondary { border-color: var(--border-color); background: var(--bg-secondary); color: var(--text-primary); }
.btn-xs.btn-danger    { border-color: #fc8181; background: #fff5f5; color: #c53030; }

/* Modal genérico */
.modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}
.modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.45);
}
.modal-box {
  position: relative;
  background: var(--bg-card);
  border-radius: 16px;
  padding: 2rem;
  max-width: 440px;
  width: 90%;
  box-shadow: 0 16px 48px rgba(0,0,0,.2);
  z-index: 1;
}
.modal-box h3 { margin-bottom: 1.25rem; }

/* SMTP config cards */
.smtp-config-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 1rem;
  margin-bottom: .75rem;
}

/* Stat rows */
.stat-row {
  display: flex;
  justify-content: space-between;
  padding: .6rem 0;
  border-bottom: 1px solid var(--border-color);
  font-size: .9rem;
}
.stat-row:last-child { border-bottom: none; }

/* Brand preview */
.brand-preview { margin-top: 1.5rem; }
.brand-preview h4 { margin-bottom: .75rem; }
.brand-preview-box {
  background: var(--bg-secondary);
  border-radius: 10px;
  padding: 1.5rem;
  text-align: center;
}

/* Form row 2-col */
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
@media (max-width: 860px) {
  .pricing-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .form-row { grid-template-columns: 1fr; }
  .faq-grid { grid-template-columns: 1fr; }
  .admin-tabs { gap: .25rem; }
  .admin-tab { padding: .6rem .75rem; font-size: .82rem; }
}
