/* ============================================================
   GAROME Portal Clientes — style.css
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --navy:      #1A2096;
  --navy-dark: #0D1260;
  --purple:    #6B60B2;
  --lavender:  #B8A0E0;
  --bg-light:  #F5F4FA;
  --text:      #3A3A4A;
  --white:     #fff;
  --green:     #16a34a;
  --red:       #dc2626;
  --font:      'Montserrat', Arial, sans-serif;
}
html { scroll-behavior: smooth; }
body { font-family: var(--font); color: var(--text); background: var(--bg-light); min-height: 100vh; }

/* ── Alertas ── */
.alert { padding: 0.85rem 1.1rem; border-radius: 8px; font-size: 0.88rem; line-height: 1.5; margin-bottom: 1rem; }
.alert-error   { background: rgba(220,38,38,0.08); border: 1px solid rgba(220,38,38,0.25); color: var(--red); }
.alert-success { background: rgba(22,163,74,0.08); border: 1px solid rgba(22,163,74,0.25); color: var(--green); }

/* ── Auth layout ── */
.auth-body { display: flex; align-items: center; justify-content: center; min-height: 100vh; background: var(--navy); }
.auth-wrap  { width: 100%; max-width: 420px; padding: 1.5rem; }
.auth-card  { background: #fff; border-radius: 16px; padding: 2.5rem; box-shadow: 0 20px 60px rgba(0,0,0,0.25); }

.auth-logo       { display: flex; align-items: center; gap: 12px; margin-bottom: 2rem; }
.auth-logo-mark  { width: 44px; height: 44px; border-radius: 50%; background: linear-gradient(135deg, var(--navy), var(--purple)); display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 700; font-size: 0.95rem; flex-shrink: 0; }
.auth-logo-name  { font-weight: 700; font-size: 1rem; color: var(--navy); letter-spacing: 0.5px; }
.auth-logo-sub   { font-size: 0.68rem; color: var(--purple); letter-spacing: 1.5px; text-transform: uppercase; }
.auth-title      { font-family: 'EB Garamond', Georgia, serif; font-size: 1.5rem; color: var(--navy); margin-bottom: 0.3rem; font-weight: 600; }
.auth-sub        { font-size: 0.84rem; color: #888; margin-bottom: 1.5rem; line-height: 1.5; }
.auth-footer     { margin-top: 1.5rem; display: flex; gap: 0.8rem; justify-content: center; font-size: 0.78rem; }
.auth-footer a   { color: var(--purple); text-decoration: none; }

/* ── Formularios ── */
.form-group            { display: flex; flex-direction: column; gap: 0.35rem; margin-bottom: 1rem; }
.form-group label      { font-size: 0.75rem; font-weight: 600; color: var(--text); text-transform: uppercase; letter-spacing: 0.8px; }
.form-group input      { border: 1.5px solid #e0dff5; border-radius: 6px; padding: 0.65rem 0.9rem; font-family: var(--font); font-size: 0.9rem; color: var(--text); outline: none; transition: border-color 0.2s; }
.form-group input:focus{ border-color: var(--purple); }
.btn-primary { width: 100%; background: var(--navy); color: #fff; font-family: var(--font); font-weight: 700; font-size: 0.9rem; padding: 0.8rem; border-radius: 6px; border: none; cursor: pointer; transition: background 0.2s, transform 0.15s; margin-top: 0.5rem; }
.btn-primary:hover { background: var(--purple); transform: translateY(-1px); }

/* ── Nav portal ── */
.portal-nav { background: var(--navy); padding: 0 5%; height: 62px; display: flex; align-items: center; justify-content: space-between; position: sticky; top: 0; z-index: 100; box-shadow: 0 2px 12px rgba(0,0,0,0.2); }
.portal-nav-logo { display: flex; align-items: center; gap: 10px; }
.nav-logo-mark   { width: 34px; height: 34px; border-radius: 50%; background: linear-gradient(135deg, #46628F, var(--purple)); display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 700; font-size: 0.82rem; }
.nav-logo-name   { font-weight: 700; font-size: 0.9rem; color: #fff; display: block; }
.nav-logo-sub    { font-size: 0.62rem; color: var(--lavender); letter-spacing: 1px; text-transform: uppercase; }
.portal-nav-user { display: flex; align-items: center; gap: 1rem; }
.nav-user-name   { font-size: 0.82rem; color: rgba(255,255,255,0.75); }
.btn-logout      { background: rgba(255,255,255,0.1); color: #fff; font-family: var(--font); font-size: 0.78rem; font-weight: 600; padding: 0.4rem 1rem; border-radius: 4px; text-decoration: none; transition: background 0.2s; }
.btn-logout:hover{ background: rgba(255,255,255,0.2); }

/* ── Portal main ── */
.portal-body { background: var(--bg-light); }
.portal-main { max-width: 780px; margin: 0 auto; padding: 3rem 5%; }
.portal-welcome { margin-bottom: 2rem; }
.portal-title { font-family: 'EB Garamond', Georgia, serif; font-size: 2rem; color: var(--navy); font-weight: 600; margin-bottom: 0.3rem; }
.portal-title em { font-style: italic; color: var(--purple); }
.portal-sub { font-size: 0.9rem; color: #888; }

/* ── Upload zone ── */
.upload-card { background: #fff; border-radius: 16px; padding: 2rem; box-shadow: 0 4px 20px rgba(26,32,150,0.07); margin-bottom: 2rem; }
.upload-zone { border: 2px dashed var(--lavender); border-radius: 12px; padding: 3rem 2rem; text-align: center; transition: border-color 0.2s, background 0.2s; cursor: default; }
.upload-zone.drag-over { border-color: var(--navy); background: rgba(26,32,150,0.03); }
.upload-icon { width: 64px; height: 64px; margin: 0 auto 1rem; color: var(--lavender); }
.upload-icon svg { width: 100%; height: 100%; }
.upload-label { font-size: 0.95rem; color: var(--text); margin-bottom: 0.8rem; }
.btn-select { display: inline-block; background: var(--navy); color: #fff; font-family: var(--font); font-weight: 600; font-size: 0.85rem; padding: 0.6rem 1.4rem; border-radius: 6px; cursor: pointer; transition: background 0.2s; margin-bottom: 0.8rem; }
.btn-select:hover { background: var(--purple); }
.upload-hint { font-size: 0.78rem; color: #aaa; }

/* ── Progress ── */
.upload-progress  { padding: 1rem 0; }
.progress-info    { display: flex; justify-content: space-between; font-size: 0.85rem; color: var(--text); margin-bottom: 0.6rem; font-weight: 500; }
.progress-bar-wrap{ background: #e0dff5; border-radius: 6px; height: 10px; overflow: hidden; margin-bottom: 0.6rem; }
.progress-bar     { background: linear-gradient(90deg, var(--navy), var(--purple)); height: 100%; width: 0; border-radius: 6px; transition: width 0.3s; }
.progress-status  { font-size: 0.78rem; color: #888; text-align: center; }

/* ── Info cards ── */
.info-cards  { display: grid; grid-template-columns: repeat(3,1fr); gap: 1rem; }
.info-card   { background: #fff; border-radius: 10px; padding: 1.2rem; display: flex; align-items: flex-start; gap: 0.8rem; box-shadow: 0 2px 10px rgba(26,32,150,0.05); }
.info-card-icon { font-size: 1.4rem; flex-shrink: 0; }
.info-card-text strong { display: block; font-size: 0.82rem; color: var(--navy); margin-bottom: 0.2rem; font-weight: 600; }
.info-card-text span   { font-size: 0.75rem; color: #888; line-height: 1.4; }

/* ── Portal footer ── */
.portal-footer { text-align: center; padding: 2rem 5%; font-size: 0.78rem; color: #aaa; display: flex; justify-content: center; gap: 1.5rem; }
.portal-footer a { color: var(--purple); text-decoration: none; }

/* ── Admin ── */
.admin-body    { background: #f0f0f8; }
.admin-main    { max-width: 1100px; margin: 0 auto; padding: 2.5rem 5%; }
.admin-section { background: #fff; border-radius: 12px; padding: 2rem; margin-bottom: 1.5rem; box-shadow: 0 2px 12px rgba(26,32,150,0.06); }
.admin-section-title { font-size: 1rem; font-weight: 700; color: var(--navy); margin-bottom: 1.2rem; padding-bottom: 0.6rem; border-bottom: 1px solid #e0dff5; }
.admin-form    { display: flex; flex-direction: column; gap: 0; }
.admin-form-row{ display: grid; grid-template-columns: repeat(3,1fr); gap: 1rem; margin-bottom: 1rem; }
.admin-form .form-group { margin-bottom: 0; }

.status-row    { display: flex; align-items: center; gap: 1.5rem; flex-wrap: wrap; }
.status-item   { font-size: 0.88rem; font-weight: 600; padding: 0.5rem 1rem; border-radius: 6px; }
.status-item.ok{ background: rgba(22,163,74,0.1); color: var(--green); }
.status-item.error { background: rgba(220,38,38,0.1); color: var(--red); }
.btn-connect   { background: var(--navy); color: #fff; font-family: var(--font); font-size: 0.82rem; font-weight: 600; padding: 0.5rem 1.2rem; border-radius: 6px; text-decoration: none; transition: background 0.2s; }
.btn-connect:hover { background: var(--purple); }

.clientes-table-wrap { overflow-x: auto; }
.clientes-table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
.clientes-table th { text-align: left; padding: 0.6rem 0.8rem; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 1px; color: #888; border-bottom: 2px solid #e0dff5; }
.clientes-table td { padding: 0.75rem 0.8rem; border-bottom: 1px solid #f0f0f8; vertical-align: top; }
.clientes-table tr:last-child td { border-bottom: none; }
.clientes-table tr.row-inactive td { opacity: 0.5; }
.clientes-table code { background: #f0f0f8; padding: 0.1rem 0.4rem; border-radius: 3px; font-size: 0.78rem; }
.actions-cell { display: flex; gap: 0.4rem; flex-wrap: wrap; align-items: flex-start; }

.badge         { font-size: 0.7rem; font-weight: 700; padding: 0.2rem 0.6rem; border-radius: 4px; text-transform: uppercase; letter-spacing: 0.5px; }
.badge-active  { background: rgba(22,163,74,0.12); color: var(--green); }
.badge-inactive{ background: rgba(220,38,38,0.10); color: var(--red); }

.btn-sm      { font-family: var(--font); font-size: 0.72rem; font-weight: 600; padding: 0.3rem 0.7rem; border-radius: 4px; border: none; cursor: pointer; transition: opacity 0.2s; }
.btn-sm:hover{ opacity: 0.85; }
.btn-ok      { background: rgba(22,163,74,0.12); color: var(--green); }
.btn-warn    { background: rgba(245,158,11,0.12); color: #b45309; }
.btn-danger  { background: rgba(220,38,38,0.10); color: var(--red); }
.btn-neutral { background: #e0dff5; color: var(--navy); }

/* ── Responsive ── */
@media (max-width: 768px) {
  .info-cards    { grid-template-columns: 1fr; }
  .admin-form-row{ grid-template-columns: 1fr; }
  .actions-cell  { flex-direction: column; }
}
@media (max-width: 480px) {
  .auth-card     { padding: 1.8rem; }
  .portal-main   { padding: 2rem 4%; }
  .upload-zone   { padding: 2rem 1rem; }
}
