/* ============================================================
   PLATAFORMA PQRS — GRUPO FLA SAS
   Estilos personalizados
============================================================ */

:root {
  --fla-blue:       #1e3a8a;
  --fla-blue-light: #dbeafe;
  --fla-ink:        #0f172a;
  --fla-yellow:     #f59e0b;
  --fla-green:      #10b981;
  --fla-cream:      #fff7ed;
  --sidebar-w:      240px;
  --topbar-h:       56px;
  --bg-app:         #f1f5f9;
}

/* ============================================================
   GLOBAL
============================================================ */
body { font-family: 'Segoe UI', system-ui, sans-serif; }
a    { text-decoration: none; }
.text-fla-ink   { color: var(--fla-ink) !important; }
.text-fla-blue  { color: var(--fla-blue) !important; }
.bg-fla-blue    { background-color: var(--fla-blue) !important; }
.bg-fla-blue-light { background-color: var(--fla-blue-light) !important; }
.btn-fla {
  background: linear-gradient(135deg, var(--fla-blue) 0%, #1d4ed8 100%);
  color: #fff;
  border: none;
  box-shadow: 0 12px 24px rgba(30, 58, 138, .18);
}
.btn-fla:hover { background: linear-gradient(135deg, #1e40af 0%, #2563eb 100%); color: #fff; }

/* ============================================================
   LAYOUT AUTENTICADO
============================================================ */
.fla-body { background: var(--bg-app); }

/* Sidebar */
.fla-sidebar {
  position: fixed;
  top: 0; left: 0;
  width: var(--sidebar-w);
  height: 100vh;
  background: var(--fla-blue);
  color: #fff;
  display: flex;
  flex-direction: column;
  z-index: 1000;
  transition: transform .25s ease;
  overflow-y: auto;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 18px 10px;
}
.sidebar-logo { height: 38px; width: auto; object-fit: contain; }
.sidebar-logo-text { font-size: 1.8rem; line-height: 1; }
.sidebar-title { line-height: 1.2; font-size: .95rem; }

.sidebar-divider {
  border-color: rgba(255,255,255,.15);
  margin: 6px 16px;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 4px 10px;
  flex: 1;
}
.sidebar-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 8px;
  color: rgba(255,255,255,.8);
  font-size: .9rem;
  transition: background .15s, color .15s;
}
.sidebar-link:hover, .sidebar-link.active {
  background: rgba(255,255,255,.15);
  color: #fff;
}
.sidebar-link i { font-size: 1rem; }

@keyframes pulse-badge {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: .75; transform: scale(1.15); }
}

.sidebar-user {
  padding: 12px 14px 16px;
}
.sidebar-avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--fla-yellow);
  color: var(--fla-blue);
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  font-size: .85rem;
  flex-shrink: 0;
}

/* Overlay mobile */
.sidebar-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,.5);
  z-index: 999;
}

/* Contenido principal */
.fla-main {
  margin-left: var(--sidebar-w);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: margin .25s ease;
}

/* Topbar */
.fla-topbar {
  height: var(--topbar-h);
  background: #fff;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 100;
}
.topbar-title {
  flex: 1;
  font-weight: 600;
  font-size: 1rem;
  color: var(--fla-blue);
}
.topbar-right { font-size: .8rem; }

/* Contenido interior */
.fla-content { padding: 24px; flex: 1; }

/* Mobile sidebar */
@media (max-width: 991px) {
  .fla-sidebar { transform: translateX(-100%); }
  .fla-sidebar.open { transform: translateX(0); }
  .sidebar-overlay.open { display: block; }
  .fla-main { margin-left: 0; }
}

/* Columnas extra-anchas para las stat cards */
@media (min-width: 992px) {
  .col-lg-2-4 { width: 20%; float: left; padding: 0 6px; }
}

/* ============================================================
   STAT CARDS (dashboard)
============================================================ */
.stat-card { border-radius: 12px; transition: box-shadow .2s; }
.stat-card:hover { box-shadow: 0 4px 20px rgba(0,0,0,.1) !important; }
.stat-icon {
  width: 48px; height: 48px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
}
.stat-number { font-size: 1.8rem; font-weight: 700; line-height: 1; }
.stat-label  { font-size: .8rem; color: #64748b; }

/* ============================================================
   TABLA CRM
============================================================ */
.crm-table thead th {
  background: #f8fafc;
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: #64748b;
  font-weight: 600;
  border-bottom: 2px solid #e2e8f0;
  padding: 10px 14px;
}
.crm-table tbody td { padding: 10px 14px; vertical-align: middle; }
.crm-row { cursor: pointer; transition: background .1s; }
.crm-row:hover { background: #f0f9ff !important; }

/* ============================================================
   LOGIN
============================================================ */
.login-bg {
  min-height: 100vh;
  background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 50%, #1d4ed8 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.login-wrapper { width: 100%; max-width: 400px; padding: 16px; }
.login-card    { border-radius: 16px; overflow: hidden; }
.login-logo    { height: 60px; width: auto; object-fit: contain; }
.login-logo-wrap { background: linear-gradient(135deg, #f8fafc, #dbeafe); }
.login-logo-fallback { height: 60px; }

/* ============================================================
   PÁGINAS PÚBLICAS
============================================================ */
.public-bg     {
  background:
    radial-gradient(circle at top left, rgba(148, 163, 184, .09), transparent 26%),
    radial-gradient(circle at top right, rgba(30, 58, 138, .10), transparent 34%),
    linear-gradient(180deg, #f8fbff 0%, #f8fafc 48%, #f1f5f9 100%);
  min-height: 100vh;
}
.fla-main-public { min-height: 100vh; }

.public-header {
  background: rgba(255,255,255,.88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(226,232,240,.8);
  position: sticky; top: 0; z-index: 100;
}
.public-hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 15% 25%, rgba(148, 163, 184, .20), transparent 20%),
    radial-gradient(circle at 85% 25%, rgba(255,255,255,.12), transparent 18%),
    linear-gradient(135deg, #10285f 0%, var(--fla-blue) 52%, #1d4ed8 100%);
}
.public-hero::after {
  content: "";
  position: absolute;
  inset: auto -10% -65px;
  height: 150px;
  background: linear-gradient(180deg, rgba(255,255,255,0), rgba(255,255,255,.18));
  transform: rotate(-3deg);
}
.public-hero > .container { position: relative; z-index: 1; }

.public-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.public-brand-text { line-height: 1.1; }
.public-brand-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #c7d2fe;
}
.public-brand-title {
  color: var(--fla-blue);
  font-weight: 800;
  font-size: 1.15rem;
}
.public-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.2);
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  font-weight: 700;
}
.public-trust-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 24px;
}
.trust-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(255,255,255,.14);
  border: 1px solid rgba(255,255,255,.18);
  color: #fff;
  font-size: .92rem;
  backdrop-filter: blur(6px);
}

.public-card {
  background: rgba(255,255,255,.92);
  border: 1px solid #dbe4f0;
  box-shadow: 0 20px 60px rgba(15, 23, 42, .08);
}
.public-card-soft {
  background: linear-gradient(180deg, rgba(255,255,255,.95), rgba(248,250,252,.98));
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  box-shadow: 0 14px 34px rgba(15, 23, 42, .06);
}
.intro-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: -28px auto 28px;
}
.intro-card { padding: 18px; }
.intro-card i { font-size: 1.35rem; color: var(--fla-blue); }
.intro-card h6 {
  margin: 10px 0 6px;
  color: var(--fla-ink);
  font-weight: 700;
}
.intro-card p {
  margin: 0;
  color: #64748b;
  font-size: .92rem;
}
.section-help {
  background: linear-gradient(135deg, #eff6ff 0%, #f8fafc 100%);
  border: 1px solid #dbeafe;
  border-radius: 16px;
  padding: 18px 20px;
}
.section-help h6 {
  margin-bottom: 6px;
  color: var(--fla-ink);
  font-weight: 800;
}
.section-help p { margin: 0; color: #475569; }
.support-note {
  background: linear-gradient(135deg, #f8fafc 0%, #eff6ff 100%);
  border: 1px solid #cbd5e1;
  border-radius: 14px;
  padding: 16px 18px;
}
.support-note strong { color: var(--fla-blue); }

/* Número de caso en confirmación */
.caso-numero-box {
  background: linear-gradient(135deg, #eff6ff, #fff7ed);
  border: 2px dashed rgba(30, 58, 138, .45);
  border-radius: 18px;
  padding: 24px;
}
.caso-numero-display {
  font-size: 2.4rem;
  font-weight: 900;
  color: var(--fla-blue);
  letter-spacing: .05em;
  font-family: monospace;
}

/* ============================================================
   BADGES Y ESTADO
============================================================ */
.badge { font-weight: 500; }

/* Scrollbar personalizado */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: #f1f5f9; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

/* ============================================================
   FORMULARIO PÚBLICO — SECCIONES
============================================================ */
.section-title {
  color: #475569;
  text-transform: uppercase;
  font-weight: 700;
  font-size: .78rem;
  letter-spacing: .06em;
  border-bottom: 2px solid #e2e8f0;
  padding-bottom: 8px;
  margin-bottom: 16px;
}

.confirm-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.confirm-step {
  text-align: left;
  padding: 16px 18px;
  border-radius: 14px;
  border: 1px solid #e2e8f0;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}
.confirm-step i {
  color: var(--fla-blue);
  font-size: 1.1rem;
}
.consult-tip {
  background: linear-gradient(135deg, #eff6ff 0%, #f8fafc 100%);
  border: 1px solid #dbeafe;
  border-radius: 16px;
  padding: 18px 20px;
}
.consult-tip ul {
  margin: 10px 0 0;
  padding-left: 18px;
  color: #475569;
}

.panel-card {
  border: 1px solid #e2e8f0;
  box-shadow: 0 10px 26px rgba(15, 23, 42, .05);
}
.panel-card .card-header {
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}
.page-subtitle {
  color: #64748b;
  font-size: .92rem;
}

/* ============================================================
   UTILITARIOS
============================================================ */
.cursor-pointer { cursor: pointer; }
.fw-black { font-weight: 900; }
.rounded-3  { border-radius: .75rem !important; }

@media (max-width: 767px) {
  .intro-grid,
  .confirm-grid {
    grid-template-columns: 1fr;
  }
  .public-brand-title {
    font-size: 1rem;
  }
}
