/* ============================================================
   E-Multimedia — Portal de Reportes para Clientes
   Diseño limpio, responsivo, sin sidebar
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Sora:wght@300;400;500;600&family=DM+Mono:wght@400;500&display=swap');

:root {
  --primary:      #534AB7;
  --primary-h:    #3C3489;
  --primary-l:    #EEEDFE;
  --bg:           #F4F3F8;
  --card:         #FFFFFF;
  --border:       rgba(0,0,0,0.09);
  --border-s:     rgba(0,0,0,0.16);
  --text:         #1A1A2E;
  --text-sec:     #55546A;
  --text-muted:   #9896AE;
  --radius:       14px;
  --radius-sm:    8px;
  --shadow:       0 2px 16px rgba(0,0,0,0.07);

  --success-bg:   #E1F5EE; --success:  #0F6E56; --success-b: #9FE1CB;
  --warning-bg:   #FAEEDA; --warning:  #854F0B; --warning-b: #FAC775;
  --danger-bg:    #FCEBEB; --danger:   #A32D2D; --danger-b:  #F7C1C1;
  --info-bg:      #E6F1FB; --info:     #185FA5; --info-b:    #B5D4F4;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 14px; }
body {
  font-family: 'Sora', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* ── Layout ─────────────────────────────────────────────────── */
.topbar {
  background: var(--card);
  border-bottom: 0.5px solid var(--border);
  padding: 0 1.5rem;
  height: 52px;
  display: flex; align-items: center; justify-content: space-between;
  position: sticky; top: 0; z-index: 10;
}
.topbar-brand { font-size: 15px; font-weight: 600; color: var(--primary); letter-spacing: -0.3px; }
.topbar-brand span { color: var(--text-muted); font-weight: 300; }
.topbar-client { font-size: 12px; color: var(--text-sec); display: flex; align-items: center; gap: 10px; }
.topbar-client strong { color: var(--text); }

.page-wrap { max-width: 680px; margin: 0 auto; padding: 2rem 1rem 4rem; }

/* ── Tabs ────────────────────────────────────────────────────── */
.tabs { display: flex; gap: 0; border-bottom: 0.5px solid var(--border); margin-bottom: 1.5rem; }
.tab {
  font-size: 13px; font-weight: 500; padding: 10px 18px;
  color: var(--text-muted); border-bottom: 2px solid transparent;
  margin-bottom: -1px; cursor: pointer;
  text-decoration: none; transition: color 0.15s;
}
.tab:hover { color: var(--text); text-decoration: none; }
.tab.active { color: var(--primary); border-bottom-color: var(--primary); }

/* ── Cards ───────────────────────────────────────────────────── */
.card {
  background: var(--card); border: 0.5px solid var(--border);
  border-radius: var(--radius); padding: 1.5rem;
  box-shadow: var(--shadow);
}
.card + .card { margin-top: 12px; }
.card-title { font-size: 15px; font-weight: 600; margin-bottom: 0.25rem; }
.card-sub { font-size: 12px; color: var(--text-muted); margin-bottom: 1.25rem; }

/* ── Formulario ──────────────────────────────────────────────── */
.form-group { margin-bottom: 1rem; }
.form-label { display: block; font-size: 12px; font-weight: 500; color: var(--text-sec); margin-bottom: 5px; }
.form-control {
  width: 100%; padding: 9px 13px;
  font-family: 'Sora', sans-serif; font-size: 13px;
  background: var(--card); border: 0.5px solid var(--border-s);
  border-radius: var(--radius-sm); color: var(--text);
  outline: none; transition: border-color 0.15s, box-shadow 0.15s;
}
.form-control:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(83,74,183,0.12); }
.form-control::placeholder { color: var(--text-muted); }
textarea.form-control { resize: vertical; min-height: 130px; line-height: 1.6; }
.input-icon { position: relative; }
.input-icon i { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--text-muted); font-size: 15px; pointer-events: none; }
.input-icon .form-control { padding-left: 36px; }
.char-counter { font-size: 11px; color: var(--text-muted); text-align: right; margin-top: 4px; }

/* ── Botones ─────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 10px 20px; font-family: 'Sora', sans-serif;
  font-size: 13px; font-weight: 500; border-radius: var(--radius-sm);
  border: 0.5px solid transparent; cursor: pointer;
  text-decoration: none; transition: all 0.15s; white-space: nowrap;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-h); }
.btn-secondary { background: var(--bg); color: var(--text); border-color: var(--border-s); }
.btn-secondary:hover { background: #e8e7f0; }
.btn-sm { padding: 6px 12px; font-size: 12px; }
.w-full { width: 100%; justify-content: center; }

/* ── Mensajes ────────────────────────────────────────────────── */
.msg { border-radius: var(--radius-sm); padding: 11px 15px; font-size: 13px; margin-bottom: 1rem; display: flex; align-items: flex-start; gap: 9px; }
.msg i { font-size: 16px; flex-shrink: 0; margin-top: 1px; }
.msg-error   { background: var(--danger-bg);  color: var(--danger);  border: 0.5px solid var(--danger-b); }
.msg-success { background: var(--success-bg); color: var(--success); border: 0.5px solid var(--success-b); }
.msg-info    { background: var(--info-bg);    color: var(--info);    border: 0.5px solid var(--info-b); }
.msg-warning { background: var(--warning-bg); color: var(--warning); border: 0.5px solid var(--warning-b); }

/* ── Ticket card (visor) ─────────────────────────────────────── */
.ticket-card {
  background: var(--card); border: 0.5px solid var(--border);
  border-radius: var(--radius); padding: 1.25rem;
  box-shadow: var(--shadow); margin-bottom: 10px;
  cursor: pointer; transition: border-color 0.15s, box-shadow 0.15s;
  text-decoration: none; display: block; color: inherit;
}
.ticket-card:hover { border-color: var(--primary); box-shadow: 0 4px 20px rgba(83,74,183,0.12); text-decoration: none; }
.tc-header { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; flex-wrap: wrap; }
.tc-folio { font-family: 'DM Mono', monospace; font-size: 11px; color: var(--text-muted); }
.tc-title { font-size: 14px; font-weight: 600; color: var(--text); margin-bottom: 6px; line-height: 1.4; }
.tc-desc { font-size: 12px; color: var(--text-sec); margin-bottom: 10px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tc-footer { display: flex; gap: 12px; font-size: 11px; color: var(--text-muted); flex-wrap: wrap; }
.tc-footer i { font-size: 12px; }

/* Badge de estatus */
.badge-estatus {
  font-size: 11px; font-weight: 600; padding: 3px 10px;
  border-radius: 20px; white-space: nowrap;
}

/* ── Detalle de ticket ───────────────────────────────────────── */
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 1rem 0; }
.detail-item { background: var(--bg); border-radius: var(--radius-sm); padding: 10px 13px; }
.detail-label { font-size: 10px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 3px; }
.detail-value { font-size: 13px; color: var(--text); font-weight: 500; }

/* ── Timeline de notas ───────────────────────────────────────── */
.timeline { display: flex; flex-direction: column; gap: 0; }
.tl-item { display: flex; gap: 12px; padding-bottom: 18px; position: relative; }
.tl-item::before { content: ''; position: absolute; left: 15px; top: 30px; bottom: 0; width: 0.5px; background: var(--border); }
.tl-item:last-child::before { display: none; }
.tl-dot { width: 30px; height: 30px; border-radius: 50%; background: var(--primary-l); color: var(--primary); display: flex; align-items: center; justify-content: center; font-size: 14px; flex-shrink: 0; border: 0.5px solid var(--border); }
.tl-body { flex: 1; }
.tl-meta { font-size: 10px; color: var(--text-muted); margin-bottom: 5px; }
.tl-text { font-size: 13px; color: var(--text); background: var(--bg); border-radius: var(--radius-sm); padding: 9px 13px; line-height: 1.6; }

/* ── Login ───────────────────────────────────────────────────── */
.login-wrap { display: flex; align-items: center; justify-content: center; min-height: 100vh; padding: 1.5rem; }
.login-box { width: 100%; max-width: 400px; }
.login-logo { text-align: center; margin-bottom: 2rem; }
.login-brand { font-size: 22px; font-weight: 600; color: var(--primary); letter-spacing: -0.5px; }
.login-sub { font-size: 12px; color: var(--text-muted); margin-top: 3px; }

/* ── Separador ───────────────────────────────────────────────── */
hr.divider { border: none; border-top: 0.5px solid var(--border); margin: 1.25rem 0; }

/* ── Vacío ───────────────────────────────────────────────────── */
.empty-state { text-align: center; padding: 3rem 1rem; color: var(--text-muted); }
.empty-state i { font-size: 40px; display: block; margin-bottom: 0.75rem; }
.empty-state p { font-size: 13px; }

/* ── Footer ──────────────────────────────────────────────────── */
.portal-footer { text-align: center; font-size: 11px; color: var(--text-muted); margin-top: 3rem; }

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 560px) {
  .detail-grid { grid-template-columns: 1fr; }
  .topbar { padding: 0 1rem; }
  .page-wrap { padding: 1.25rem 0.75rem 3rem; }
  .card { padding: 1.25rem; }
}
