/* ============================================================
   FilexFlow - dashboard.css
   Estilos específicos para dashboard.html
   Usa el layout global definido en layout.css
   ============================================================ */

/* Contenido principal de la card izquierda */
.dashboard-main-left {
  padding: 4px 4px 10px 2px;
}

.dashboard-hero {
  margin-bottom: 16px;
}

.dashboard-hero-label {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #a5b4fc;
  background: rgba(37, 99, 235, 0.16);
  border: 1px solid rgba(129, 140, 248, 0.5);
  margin-bottom: 10px;
}

.dashboard-hero-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: #e5e7eb;
  margin-bottom: 6px;
}

.dashboard-hero-sub {
  font-size: 0.9rem;
  color: #9ca3af;
  max-width: 40rem;
}

/* Secciones genéricas */
.dashboard-section {
  margin-top: 14px;
}

.dashboard-section-title {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: #9ca3af;
  margin-bottom: 4px;
}

.dashboard-section-sub {
  font-size: 0.86rem;
  color: #9ca3af;
}

/* ------------------------------
   BALANCE
   ------------------------------ */

.dashboard-balance {
  margin-top: 18px;
  padding: 12px 14px;
  border-radius: 20px;
  border: 1px solid rgba(148, 163, 184, 0.65);
  background: radial-gradient(circle at top left, rgba(15, 23, 42, 0.96), #020617);
}

.dashboard-balance-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 10px;
}

.dashboard-balance-main {
  text-align: right;
}

.dashboard-balance-amount {
  display: block;
  font-size: 2.1rem;
  font-weight: 600;
  color: #f9fafb;
  line-height: 1;
}

.dashboard-balance-unit {
  font-size: 0.8rem;
  color: #9ca3af;
}

.dashboard-balance-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.dashboard-metric {
  border-radius: 14px;
  padding: 8px 10px;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(30, 64, 175, 0.65);
  text-align: center;
}

.dashboard-metric-label {
  display: block;
  font-size: 0.78rem;
  color: #9ca3af;
  margin-bottom: 4px;
}

.dashboard-metric-value {
  font-size: 0.95rem;
  font-weight: 500;
  color: #e5e7eb;
}

/* ------------------------------
   USAGE OVERVIEW
   ------------------------------ */

.dashboard-usage-grid {
  margin-top: 10px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.dashboard-usage-card {
  border-radius: 16px;
  padding: 10px 12px;
  border: 1px solid rgba(148, 163, 184, 0.6);
  background: rgba(15, 23, 42, 0.9);
  text-align: center;
}

.dashboard-usage-label {
  font-size: 0.82rem;
  color: #cbd5f5;
  margin-bottom: 4px;
}

.dashboard-usage-value {
  font-size: 1.2rem;
  font-weight: 600;
  color: #f9fafb;
  margin-bottom: 4px;
}

.dashboard-usage-caption {
  font-size: 0.78rem;
  color: #9ca3af;
}

/* ------------------------------
   ACTIVITY TABLE
   ------------------------------ */

.dashboard-activity-hint {
  margin-top: 2px;
}

.dashboard-table-wrapper {
  margin-top: 10px;
  border-radius: 18px;
  border: 1px solid rgba(148, 163, 184, 0.6);
  background: rgba(15, 23, 42, 0.9);
  overflow-x: auto;   /* permite ver todas las columnas */
  overflow-y: hidden;
}

.dashboard-table {
  width: 100%;
  min-width: 640px;   /* asegura espacio mínimo para todas las columnas */
  border-collapse: collapse;
  font-size: 0.78rem; /* fuente un poco más pequeña */
}

.dashboard-table thead {
  background: rgba(15, 23, 42, 0.95);
}

.dashboard-table th,
.dashboard-table td {
  padding: 7px 9px;
  text-align: left;
  border-bottom: 1px solid rgba(30, 64, 175, 0.35);
  font-size: 0.78rem;
  white-space: nowrap;
}

.dashboard-table th {
  font-weight: 500;
  color: #9ca3af;
}

.dashboard-table tbody tr:last-child td {
  border-bottom: none;
}

.dashboard-table td {
  color: #e5e7eb;
}

/* Badges de estado */
.dashboard-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 500;
}

.dashboard-status-ok {
  background: rgba(22, 163, 74, 0.16);
  color: #bbf7d0;
  border: 1px solid rgba(34, 197, 94, 0.7);
}

.dashboard-status-refunded {
  background: rgba(37, 99, 235, 0.16);
  color: #bfdbfe;
  border: 1px solid rgba(59, 130, 246, 0.8);
}

/* ------------------------------
   PAGINACIÓN
   ------------------------------ */

.dashboard-pagination {
  margin-top: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8rem;
  color: #9ca3af;
}

.dashboard-pagination-info {
  opacity: 0.9;
}

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

/* Botones tipo status: pill azul con sombra, mismos en dark/light */
.dashboard-page-btn {
  border-radius: 999px;
  border: none;
  padding: 6px 14px;
  background: radial-gradient(circle at 0% 0%, #60a5fa, #2563eb);
  color: #ffffff;
  cursor: pointer;
  font-size: 0.7rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow:
    0 12px 28px rgba(37, 99, 235, 0.55),
    0 0 0 1px rgba(37, 99, 235, 0.4);
  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease,
    opacity 0.15s ease,
    background 0.15s ease;
}

.dashboard-page-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow:
    0 16px 34px rgba(37, 99, 235, 0.65),
    0 0 0 1px rgba(37, 99, 235, 0.45);
}

.dashboard-page-btn:active:not(:disabled) {
  transform: translateY(0);
  box-shadow:
    0 8px 20px rgba(37, 99, 235, 0.5),
    0 0 0 1px rgba(37, 99, 235, 0.4);
}

.dashboard-page-btn[disabled] {
  opacity: 0.35;
  cursor: default;
  box-shadow: none;
}

/* ------------------------------
   CARD DERECHA
   ------------------------------ */

.dashboard-right {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.dashboard-side-section {
  border-radius: 20px;
  padding: 14px 16px;
  background: radial-gradient(circle at top, rgba(15, 23, 42, 0.98), #020617 70%);
  border: 1px solid rgba(148, 163, 184, 0.7);
}

.dashboard-side-label {
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #9ca3af;
  margin-bottom: 6px;
}

.dashboard-side-title {
  font-size: 0.98rem;
  font-weight: 500;
  color: #f9fafb;
  margin-bottom: 4px;
}

.dashboard-side-text {
  font-size: 0.84rem;
  color: #cbd5f5;
  margin-bottom: 14px;
}

/* CTA principal en el side */
.dashboard-side-cta {
  margin-top: 4px;
  margin-bottom: 14px; /* más aire antes de los otros botones */
  font-size: 0.82rem;
  border-radius: 999px;
}

/* Botones secundarios con look de botón principal (tamaño pequeño) */
.btn-small {
  font-size: 0.78rem;
  padding: 6px 14px;
}

.dashboard-side-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;               /* espacio horizontal entre Buy / View API */
  margin-top: 18px !important;  /* aire vertical respecto a "Convert files now" */
}

/* Lista de expiraciones */
.dashboard-exp-list {
  list-style: none;
  padding: 0;
  margin: 4px 0 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.8rem;
  color: #e5e7eb;
}

/* ============================================================
   Fix final — separación elegante entre botones del Shortcuts
   ============================================================ */

/* Botón principal del shortcuts (Convert files now) */
.dashboard-side-cta {
  margin-top: 6px;
  margin-bottom: 16px !important; /* MÁS AIRE entre el CTA y los botones secundarios */
}

/* Botones secundarios (Buy credits, View API docs) */
.dashboard-side-links {
  display: flex;
  gap: 10px;           /* espacio horizontal */
  flex-wrap: wrap;
}

/* Los botones pequeños deben tener su propio padding consistente */
.dashboard-side-links .btn-small {
  margin-top: 4px;     /* pequeño respiro adicional */
}

/* ------------------------------
   RESPONSIVE
   ------------------------------ */

@media (max-width: 960px) {
  .dashboard-balance-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .dashboard-balance-main {
    text-align: left;
  }

  .dashboard-balance-metrics {
    grid-template-columns: minmax(0, 1fr);
  }

  .dashboard-usage-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .dashboard-pagination {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }
}

/* ------------------------------
   LIGHT MODE
   ------------------------------ */

body[data-theme="light"] .dashboard-hero-title {
  color: #111827;
}

body[data-theme="light"] .dashboard-hero-sub,
body[data-theme="light"] .dashboard-section-sub {
  color: #4b5563;
}

body[data-theme="light"] .dashboard-balance {
  background: linear-gradient(135deg, #eef2ff, #e5f0ff);
  border-color: rgba(148, 163, 184, 0.7);
}

body[data-theme="light"] .dashboard-balance-amount {
  color: #111827;
}

body[data-theme="light"] .dashboard-balance-unit {
  color: #4b5563;
}

body[data-theme="light"] .dashboard-metric {
  background: #f3f4ff;
  border-color: rgba(148, 163, 184, 0.7);
}

body[data-theme="light"] .dashboard-metric-label {
  color: #4b5563;
}

body[data-theme="light"] .dashboard-metric-value {
  color: #111827;
}

body[data-theme="light"] .dashboard-usage-card {
  background: #f3f5f9;
  border-color: rgba(148, 163, 184, 0.8);
}

body[data-theme="light"] .dashboard-usage-label {
  color: #374151;
}

body[data-theme="light"] .dashboard-usage-value {
  color: #111827;
}

body[data-theme="light"] .dashboard-usage-caption {
  color: #4b5563;
}

body[data-theme="light"] .dashboard-table-wrapper {
  background: #f9fafb;
  border-color: rgba(148, 163, 184, 0.7);
}

body[data-theme="light"] .dashboard-table thead {
  background: #e5e7eb;
}

body[data-theme="light"] .dashboard-table th {
  color: #4b5563;
}

body[data-theme="light"] .dashboard-table td {
  color: #111827;
}

/* Badges de estado en light: más contraste */
body[data-theme="light"] .dashboard-status-ok {
  background: #dcfce7;
  color: #166534;
  border-color: #16a34a;
}

body[data-theme="light"] .dashboard-status-refunded {
  background: #dbeafe;
  color: #1d4ed8;
  border-color: #2563eb;
}

/* Card derecha permanece oscura en light */
body[data-theme="light"] .dashboard-side-section {
  background: radial-gradient(circle at top, #020617, #020617 70%);
  border-color: rgba(15, 23, 42, 0.9);
}

body[data-theme="light"] .dashboard-side-title,
body[data-theme="light"] .dashboard-side-text,
body[data-theme="light"] .dashboard-exp-list {
  color: #e5e7eb;
}

.dashboard-side-cta {
  margin-bottom: 0;  /* el espacio lo manda ahora .dashboard-side-links */
}
/* ==============================
   REFERRALS (solo card derecho)
   ============================== */

.fx-exp-bullet {
  padding: 8px 10px;
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(30, 64, 175, 0.35);
  color: #cbd5f5;
}

.fx-ref-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.fx-ref-title {
  font-size: 0.86rem;
  font-weight: 600;
  color: #f9fafb;
  margin-bottom: 2px;
}

.fx-ref-sub {
  font-size: 0.82rem;
  color: #cbd5f5;
  line-height: 1.25;
}

.fx-ref-pill {
  flex: 0 0 auto;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  color: #e5e7eb;
  background: rgba(37, 99, 235, 0.14);
  border: 1px solid rgba(59, 130, 246, 0.35);
  white-space: nowrap;
}

.fx-ref-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.fx-ref-input {
  flex: 1;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: rgba(15, 23, 42, 0.7);
  color: #e5e7eb;
  font-size: 0.8rem;
}

.fx-ref-status {
  margin-top: 10px;
  font-size: 0.8rem;
  color: #bbf7d0;
}
/* =========================
   Account settings (right card only)
   ========================= */

.fx-set-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 4px;
}

.fx-set-left { min-width: 0; }

.fx-set-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: #f9fafb;
}

.fx-set-sub {
  font-size: 0.82rem;
  color: #cbd5f5;
  margin-top: 2px;
}

.fx-set-divider {
  height: 1px;
  margin: 12px 0;
  background: rgba(148, 163, 184, 0.22);
}

.fx-pass-grid {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 10px;
  align-items: center;
}

.fx-input {
  width: 100%;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: rgba(15, 23, 42, 0.9);
  color: #e5e7eb;
  outline: none;
}

.fx-input:focus {
  border-color: rgba(37, 99, 235, 0.75);
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.15);
}

.fx-input::placeholder{
  font-size: 12px;
  line-height: 1.1;
  opacity: 0.85;
}


/* Toggle switch */
.fx-switch {
  position: relative;
  display: inline-block;
  width: 46px;
  height: 26px;
  flex: 0 0 auto;
}

.fx-switch input { display: none; }

.fx-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: rgba(148, 163, 184, 0.35);
  border: 1px solid rgba(148, 163, 184, 0.35);
  transition: 0.2s;
  border-radius: 999px;
}

.fx-slider:before {
  position: absolute;
  content: "";
  height: 20px;
  width: 20px;
  left: 3px;
  top: 50%;
  transform: translateY(-50%);
  background: #e5e7eb;
  transition: 0.2s;
  border-radius: 999px;
}

.fx-switch input:checked + .fx-slider {
  background: rgba(37, 99, 235, 0.55);
  border-color: rgba(37, 99, 235, 0.65);
}

.fx-switch input:checked + .fx-slider:before {
  transform: translate(20px, -50%);
}

.fx-danger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.fx-danger-btn {
  border: 1px solid rgba(239, 68, 68, 0.6);
  background: rgba(239, 68, 68, 0.12);
  color: #fecaca;
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  cursor: pointer;
}

.fx-danger-btn:hover {
  background: rgba(239, 68, 68, 0.18);
}

.fx-danger-btn:disabled {
  opacity: 0.5;
  cursor: default;
}

/* Responsive for password row */
@media (max-width: 960px) {
  .fx-pass-grid {
    grid-template-columns: 1fr;
  }
}


