/* ImaginIA Suite — Portal de clientes
   Tokens tomados 1:1 del mockup aprobado (design-portal/*.dc.html) */

:root {
  --accent: #46EBEB;
  --accent-ink: #003;
  --bg-app: #f7f8fa;
  --bg-card: #ffffff;
  --border: #e5e7eb;
  --text-strong: #1f2430;
  --text-muted: #6b7280;
  --text-faint: #9ca3af;
  --sidebar-bg: #141414;
  --sidebar-text: #9a9a9a;
  --sidebar-text-dim: #5a5a5a;
  --sidebar-pill-bg: #262626;
  --sidebar-pill-text: #7a7a7a;
  --success-bg: #ecfdf5;
  --success-text: #047857;
  --warn-bg: #fef3c7;
  --warn-text: #92400e;
  --radius-card: 14px;
  --radius-input: 9px;
  --shadow-card: 0 1px 3px rgba(0, 0, 0, 0.04);
}

* { box-sizing: border-box; }

[x-cloak] { display: none !important; }

/* Modo Gestión (equipo imaginia) — paleta distinta a propósito, para que
   nunca se confunda con la vista del cliente. Reemplaza --accent en toda
   la app: nav activo, botones primarios, badges, etc. */
.admin-mode {
  --accent: #f59e0b;
  --accent-ink: #451a03;
}
.admin-mode .sidebar-brand span { color: #fcd34d; }

html, body {
  margin: 0;
  height: 100%;
  background: var(--bg-app);
  color: var(--text-strong);
  font-family: -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

a { color: #1e6f6f; text-decoration: none; }
a:hover { color: #0f4f4f; text-decoration: underline; }

input::placeholder { color: var(--text-faint); }

button { font-family: inherit; cursor: pointer; }

/* ---------- Login (index.html) ---------- */

.login-shell {
  min-height: 100vh;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
}

.login-col {
  width: 380px;
  max-width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.brand-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 28px;
}

.brand-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
}

.brand-name {
  font-weight: 700;
  font-size: 16px;
  color: var(--text-strong);
}

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

.login-eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.login-title {
  font-size: 22px;
  font-weight: 700;
  margin: 0 0 6px;
}

.login-sub {
  font-size: 13.5px;
  color: var(--text-muted);
  margin: 0 0 28px;
  line-height: 1.5;
}

.field-group { display: flex; flex-direction: column; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field-label-row { display: flex; align-items: center; justify-content: space-between; }
.field label { font-size: 13px; font-weight: 600; }
.field small-link { font-size: 12px; }

.field input {
  font-size: 14px;
  padding: 11px 14px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  outline: none;
  font-family: inherit;
  color: var(--text-strong);
  width: 100%;
}
.field input:focus { border-color: var(--accent); }

.btn-primary {
  margin-top: 6px;
  width: 100%;
  padding: 12px;
  border-radius: var(--radius-input);
  border: none;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 700;
  font-size: 14.5px;
}
.btn-primary:disabled { opacity: .55; cursor: default; }

.login-footer {
  font-size: 12.5px;
  color: var(--text-faint);
  margin-top: 22px;
  text-align: center;
}

.form-error {
  background: #fef2f2;
  color: #b91c1c;
  font-size: 12.5px;
  padding: 9px 12px;
  border-radius: 8px;
  border: 1px solid #fecaca;
}

/* ---------- Portal shell (app.html) ---------- */

.portal-shell {
  height: 100vh;
  width: 100%;
  display: flex;
  overflow: hidden;
}

.sidebar {
  width: 220px;
  flex-shrink: 0;
  background: var(--sidebar-bg);
  display: flex;
  flex-direction: column;
  padding: 20px 0;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 20px 24px;
}
.sidebar-brand span { font-weight: 700; font-size: 14.5px; color: #fff; }

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 0 10px;
  flex: 1;
}

.navitem {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border-radius: 8px;
  font-size: 13.5px;
  cursor: pointer;
  color: var(--sidebar-text-dim);
  border: none;
  background: none;
  text-align: left;
  width: 100%;
}
.navitem svg { flex-shrink: 0; }
.navitem:hover:not(.active):not(.disabled) { background: #1f1f1f; color: #d4d4d4; }
.navitem.active { color: var(--accent-ink); background: var(--accent); font-weight: 700; }
.navitem.disabled { cursor: default; color: var(--sidebar-text-dim); }

.navitem .pill {
  margin-left: auto;
  font-size: 9px;
  background: var(--sidebar-pill-bg);
  color: var(--sidebar-pill-text);
  padding: 2px 6px;
  border-radius: 5px;
  font-weight: 700;
}

.sidebar-footer {
  padding: 10px;
  border-top: 1px solid #262626;
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.sidebar-footer .navitem { font-size: 12px; color: #6b6b6b; padding: 8px 16px; }
.sidebar-footer .navitem:hover { color: #a3a3a3; }

.main-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 28px;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.topbar-title { font-size: 15px; font-weight: 700; }
.topbar-right { display: flex; align-items: center; gap: 10px; }
.topbar-negocio { font-size: 13.5px; font-weight: 600; }
.avatar {
  width: 30px; height: 30px; border-radius: 50%;
  background: #f0fdfd; border: 1px solid var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; color: #0f4f4f;
  cursor: pointer;
}

.view-body {
  flex: 1;
  overflow: auto;
  padding: 30px;
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

.panel-card {
  width: 460px;
  max-width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 40px 36px;
  box-shadow: var(--shadow-card);
  text-align: center;
}

.panel-icon {
  width: 56px; height: 56px; border-radius: 16px;
  background: #f0fdfd;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 20px;
}

.panel-title { font-size: 20px; font-weight: 700; margin: 0 0 8px; }
.panel-desc { font-size: 13.5px; color: var(--text-muted); margin: 0 0 20px; line-height: 1.55; }

.status-pill {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 700;
  padding: 5px 12px; border-radius: 999px;
  margin-bottom: 22px;
}
.status-pill.connected { background: var(--success-bg); color: var(--success-text); }
.status-pill.pending { background: var(--warn-bg); color: var(--warn-text); }

.connected-box {
  background: var(--bg-app);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 22px;
  text-align: left;
}
.connected-box .label {
  font-size: 11px; color: var(--text-faint); text-transform: uppercase;
  letter-spacing: 0.04em; font-weight: 700; margin-bottom: 4px;
}
.connected-box .number { font-size: 14.5px; font-weight: 600; }
.connected-box .sub { font-size: 12px; color: var(--text-muted); margin-top: 2px; }

.btn-secondary {
  width: 100%; padding: 12px; border-radius: var(--radius-input);
  border: 1px solid var(--border); background: var(--bg-card);
  color: var(--text-muted); font-weight: 600; font-size: 14px;
}

.hint-small { font-size: 12px; color: var(--text-faint); margin: 14px 0 0; }

.placeholder-view {
  width: 460px; max-width: 100%; text-align: center;
  color: var(--text-muted); font-size: 14px; padding: 60px 20px;
}
