/* COAEXAMS.com — Custom Styles */
:root {
  /* Pharma Light palette */
  --bg-dark:     #FFFFFF;   /* fondo principal blanco */
  --bg-darker:   #F0F7FF;   /* secciones alternas azul muy pálido */
  --bg-card:     #FFFFFF;   /* cards blancas */
  --bg-light:    #EEF6FB;   /* highlight muy suave */
  --indigo:      #0284C7;   /* sky-600 — azul clínico */
  --indigo-dark: #0369A1;   /* sky-700 */
  --emerald:     #0D9488;   /* teal-600 — verified */
  --amber:       #D97706;   /* amber-600 — warnings */
  --red:         #DC2626;
  --text-light:  #0C1A2E;   /* texto principal — navy oscuro */
  --text-muted:  #4B6A85;   /* texto secundario */
  --border:      #C8DFF0;   /* borde azul pálido */
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg-dark);
  color: var(--text-light);
  line-height: 1.6;
  min-height: 100vh;
}

/* ── Layout ── */
.container { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }
.section    { padding: 5rem 0; }
.section-sm { padding: 3rem 0; }

/* ── Navbar ── */
.navbar {
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 100;
  padding: 1rem 0;
  box-shadow: 0 1px 12px rgba(2,132,199,0.07);
}
.navbar-inner {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
.navbar-brand {
  font-size: 1.5rem; font-weight: 800; letter-spacing: -0.5px;
  color: var(--text-light); text-decoration: none;
}
.navbar-brand span { color: var(--indigo); }
.navbar-nav { display: flex; align-items: center; gap: 1.5rem; list-style: none; }
.navbar-nav a {
  color: var(--text-muted); text-decoration: none; font-size: 0.9rem;
  font-weight: 500; transition: color 0.2s;
}
.navbar-nav a:hover { color: var(--indigo); }
.navbar-toggle { display: none; background: none; border: none; cursor: pointer; }
.hamburger { display: block; width: 22px; height: 2px; background: var(--text-light);
  position: relative; transition: background 0.2s; }
.hamburger::before, .hamburger::after {
  content: ''; position: absolute; left: 0; width: 22px; height: 2px;
  background: var(--text-light); transition: transform 0.2s;
}
.hamburger::before { top: -6px; }
.hamburger::after  { top: 6px; }

/* ── Buttons ── */
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.65rem 1.4rem; border-radius: 8px;
  font-weight: 600; font-size: 0.9rem; cursor: pointer;
  text-decoration: none; border: none; transition: all 0.2s;
}
.btn-primary { background: var(--indigo); color: #fff; box-shadow: 0 2px 8px rgba(2,132,199,0.25); }
.btn-primary:hover { background: var(--indigo-dark); transform: translateY(-1px); box-shadow: 0 4px 14px rgba(2,132,199,0.35); }
.btn-outline {
  background: transparent; color: var(--text-light);
  border: 1.5px solid var(--border);
}
.btn-outline:hover { border-color: var(--indigo); color: var(--indigo); }
.btn-emerald { background: var(--emerald); color: #fff; }
.btn-emerald:hover { background: #0F766E; }
.btn-sm { padding: 0.45rem 1rem; font-size: 0.8rem; }

/* ── Hero ── */
.hero {
  min-height: 88vh; display: flex; align-items: center;
  background: linear-gradient(150deg, #F0F9FF 0%, #E0F2FE 45%, #ECFDF5 100%);
  position: relative; overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse 55% 60% at 75% 40%, rgba(2,132,199,0.12) 0%, transparent 70%);
}
.hero-content { position: relative; max-width: 700px; }
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 0.5rem;
  background: rgba(2,132,199,0.1); border: 1px solid rgba(2,132,199,0.25);
  color: var(--indigo); border-radius: 999px; padding: 0.3rem 1rem;
  font-size: 0.8rem; font-weight: 600; letter-spacing: 0.05em;
  text-transform: uppercase; margin-bottom: 1.5rem;
}
.hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.8rem); font-weight: 800;
  line-height: 1.15; letter-spacing: -1px; margin-bottom: 1.25rem;
  color: #0C1A2E;
}
.hero h1 .gradient-text {
  background: linear-gradient(135deg, var(--indigo) 0%, #38BDF8 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero p { font-size: 1.15rem; color: var(--text-muted); max-width: 560px; margin-bottom: 2rem; }
.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; }
.hero-stats { display: flex; gap: 2.5rem; margin-top: 3.5rem; flex-wrap: wrap; }
.hero-stat-value { font-size: 2rem; font-weight: 800; color: var(--indigo); }
.hero-stat-label { font-size: 0.8rem; color: var(--text-muted); margin-top: 0.15rem; }

/* ── Cards ── */
.card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 12px; padding: 1.5rem;
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 1px 6px rgba(2,132,199,0.06);
}
.card:hover { border-color: rgba(2,132,199,0.4); transform: translateY(-2px); box-shadow: 0 6px 24px rgba(2,132,199,0.1); }

/* ── Product Grid ── */
.products-grid {
  display: grid; gap: 1.5rem;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}
.product-card { display: flex; flex-direction: column; }
.product-card-header {
  background: linear-gradient(135deg, rgba(2,132,199,0.07), rgba(13,148,136,0.05));
  border-radius: 8px; padding: 1.25rem; margin-bottom: 1rem;
  display: flex; align-items: center; gap: 0.75rem;
}
.product-icon {
  width: 40px; height: 40px; border-radius: 10px;
  background: rgba(2,132,199,0.12); display: flex; align-items: center;
  justify-content: center; font-size: 1.25rem;
}
.product-card h3 { font-size: 1rem; font-weight: 700; margin-bottom: 0.25rem; color: var(--text-light); }
.product-card .sku { font-size: 0.75rem; color: var(--text-muted); font-family: monospace; }
/* .product-card .price — removed, no pricing displayed */
.product-card p { font-size: 0.85rem; color: var(--text-muted); flex: 1; margin-bottom: 1rem; }
.product-card .card-footer { margin-top: auto; display: flex; gap: 0.75rem; }

/* ── COA Badge / Widget ── */
.coa-widget {
  background: #fff; border: 1px solid var(--border);
  border-radius: 12px; padding: 1.5rem;
  box-shadow: 0 2px 12px rgba(2,132,199,0.07);
}
.coa-widget-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 1.25rem;
}
.coa-widget-title { font-size: 0.75rem; font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--text-muted); }
.coa-badge-verified {
  display: inline-flex; align-items: center; gap: 0.4rem;
  background: rgba(13,148,136,0.1); color: var(--emerald);
  border: 1px solid rgba(13,148,136,0.25); border-radius: 999px;
  padding: 0.25rem 0.75rem; font-size: 0.75rem; font-weight: 700;
}
.coa-badge-pending {
  display: inline-flex; align-items: center; gap: 0.4rem;
  background: rgba(217,119,6,0.1); color: var(--amber);
  border: 1px solid rgba(217,119,6,0.25); border-radius: 999px;
  padding: 0.25rem 0.75rem; font-size: 0.75rem; font-weight: 700;
}
.coa-badge-expired {
  display: inline-flex; align-items: center; gap: 0.4rem;
  background: rgba(220,38,38,0.08); color: var(--red);
  border: 1px solid rgba(220,38,38,0.2); border-radius: 999px;
  padding: 0.25rem 0.75rem; font-size: 0.75rem; font-weight: 700;
}
.coa-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-bottom: 1.25rem; }
.coa-stat-label { font-size: 0.72rem; color: var(--text-muted); margin-bottom: 0.2rem; }
.coa-stat-value { font-size: 1.1rem; font-weight: 700; color: var(--text-light); }
.coa-purity-bar { height: 6px; background: var(--border); border-radius: 999px; overflow: hidden; margin-top: 0.35rem; }
.coa-purity-fill {
  height: 100%; background: linear-gradient(90deg, var(--emerald), #2DD4BF);
  border-radius: 999px; transition: width 0.8s ease;
}
.coa-task { font-family: monospace; font-size: 0.78rem; color: var(--text-muted);
  background: var(--bg-light); border: 1px solid var(--border);
  border-radius: 6px; padding: 0.4rem 0.75rem; margin-bottom: 1rem; }
.coa-loading { text-align: center; padding: 2rem; color: var(--text-muted); }
.coa-spinner {
  width: 28px; height: 28px; border: 3px solid var(--border);
  border-top-color: var(--indigo); border-radius: 50%;
  animation: spin 0.7s linear infinite; margin: 0 auto 0.75rem;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Quality Table (CU-04) ── */
.table-wrapper { overflow-x: auto; border-radius: 12px; border: 1px solid var(--border); box-shadow: 0 1px 6px rgba(2,132,199,0.05); }
table { width: 100%; border-collapse: collapse; }
thead { background: #F0F7FF; }
thead th { padding: 0.9rem 1rem; text-align: left; font-size: 0.75rem;
  font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--text-muted); white-space: nowrap; }
tbody tr { border-top: 1px solid var(--border); transition: background 0.15s; }
tbody tr:hover { background: #F0F9FF; }
td { padding: 0.85rem 1rem; font-size: 0.875rem; color: var(--text-light); }
.purity-high   { color: var(--emerald); font-weight: 700; }
.purity-medium { color: var(--amber);   font-weight: 700; }
.purity-low    { color: var(--red);     font-weight: 700; }
.ms-check      { color: var(--emerald); font-size: 1rem; }
.ms-cross      { color: var(--red);     font-size: 1rem; }

/* ── Filters ── */
.filters {
  display: flex; gap: 1rem; flex-wrap: wrap; align-items: flex-end;
  background: #F8FBFE; border: 1px solid var(--border);
  border-radius: 12px; padding: 1.25rem; margin-bottom: 1.5rem;
}
.filter-group { display: flex; flex-direction: column; gap: 0.4rem; flex: 1; min-width: 160px; }
.filter-group label { font-size: 0.75rem; font-weight: 600; color: var(--text-muted);
  letter-spacing: 0.04em; text-transform: uppercase; }
.filter-group input,
.filter-group select {
  background: #fff; border: 1px solid var(--border);
  color: var(--text-light); border-radius: 8px; padding: 0.55rem 0.85rem;
  font-size: 0.875rem; outline: none; font-family: inherit;
  transition: border-color 0.2s; width: 100%; box-sizing: border-box;
  height: 2.5rem;
}
.filter-group input:focus,
.filter-group select:focus { border-color: var(--indigo); box-shadow: 0 0 0 3px rgba(2,132,199,0.1); }

/* ── Auth Forms ── */
.auth-wrap {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  padding: 2rem; background: linear-gradient(150deg, #F0F9FF 0%, #E0F2FE 100%);
}
.auth-card {
  background: #fff; border: 1px solid var(--border);
  border-radius: 16px; padding: 2.5rem; width: 100%; max-width: 420px;
  box-shadow: 0 8px 32px rgba(2,132,199,0.1);
}
.auth-logo { text-align: center; margin-bottom: 2rem; }
.auth-logo .brand { font-size: 1.75rem; font-weight: 800; color: var(--text-light); }
.auth-logo .brand span { color: var(--indigo); }
.form-group { margin-bottom: 1.25rem; }
.form-group label { display: block; font-size: 0.82rem; font-weight: 600;
  color: var(--text-muted); margin-bottom: 0.5rem; }
.form-group input, .form-group select, .form-group textarea {
  width: 100%; background: #fff; border: 1px solid var(--border);
  color: var(--text-light); border-radius: 8px; padding: 0.7rem 1rem;
  font-size: 0.9rem; outline: none; font-family: inherit; transition: border-color 0.2s;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  border-color: var(--indigo); box-shadow: 0 0 0 3px rgba(2,132,199,0.1);
}
.form-group textarea { resize: vertical; min-height: 80px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

/* ── Alerts ── */
.alert { padding: 0.85rem 1.1rem; border-radius: 8px; font-size: 0.875rem;
  margin-bottom: 1rem; border: 1px solid; }
.alert-success { background: rgba(13,148,136,0.07); color: #0F766E; border-color: rgba(13,148,136,0.2); }
.alert-error   { background: rgba(220,38,38,0.07);  color: var(--red); border-color: rgba(220,38,38,0.2); }
.alert-warning { background: rgba(217,119,6,0.07);  color: var(--amber); border-color: rgba(217,119,6,0.2); }

/* ── Section Headers ── */
.section-header { margin-bottom: 3rem; }
.section-tag {
  display: inline-block; background: rgba(2,132,199,0.1);
  color: var(--indigo); border-radius: 999px; padding: 0.25rem 0.9rem;
  font-size: 0.75rem; font-weight: 700; letter-spacing: 0.06em;
  text-transform: uppercase; margin-bottom: 1rem;
}
.section-header h2 {
  font-size: clamp(1.6rem, 3vw, 2.4rem); font-weight: 800; letter-spacing: -0.5px;
  margin-bottom: 0.75rem; color: var(--text-light);
}
.section-header p { color: var(--text-muted); max-width: 560px; }

/* ── Footer ── */
.footer {
  border-top: 1px solid var(--border); padding: 3rem 0;
  background: #F0F7FF;
}
.footer-grid {
  display: grid; gap: 2.5rem;
  grid-template-columns: 1.5fr repeat(3, 1fr);
}
.footer-brand { font-size: 1.3rem; font-weight: 800; margin-bottom: 0.75rem; color: var(--text-light); }
.footer-brand span { color: var(--indigo); }
.footer-desc { font-size: 0.85rem; color: var(--text-muted); line-height: 1.7; }
.footer-col h4 { font-size: 0.75rem; font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--text-muted); margin-bottom: 1rem; }
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 0.6rem; }
.footer-col ul a { color: var(--text-muted); text-decoration: none; font-size: 0.875rem; transition: color 0.2s; }
.footer-col ul a:hover { color: var(--indigo); }
.footer-bottom { margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid var(--border);
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 0.75rem; }
.footer-bottom p { font-size: 0.8rem; color: var(--text-muted); }

/* ── Admin Panel ── */
.admin-layout { display: flex; min-height: 100vh; }
.admin-sidebar {
  width: 240px; flex-shrink: 0; background: #fff;
  border-right: 1px solid var(--border); padding: 1.5rem 0;
  display: flex; flex-direction: column;
}
.admin-logo { padding: 0 1.5rem; margin-bottom: 2rem; font-size: 1.1rem; font-weight: 800; color: var(--text-light); }
.admin-logo span { color: var(--indigo); }
.admin-nav { list-style: none; flex: 1; }
.admin-nav a {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.7rem 1.5rem; color: var(--text-muted);
  text-decoration: none; font-size: 0.875rem; font-weight: 500; transition: all 0.2s;
}
.admin-nav a:hover, .admin-nav a.active {
  color: var(--indigo); background: rgba(2,132,199,0.08);
  border-right: 2px solid var(--indigo);
}
.admin-main { flex: 1; overflow: auto; background: #F8FBFE; }
.admin-header {
  background: #fff; border-bottom: 1px solid var(--border);
  padding: 1rem 2rem; display: flex; align-items: center; justify-content: space-between;
}
.admin-header h1 { font-size: 1.1rem; font-weight: 700; color: var(--text-light); }
.admin-content { padding: 2rem; }
.stat-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px,1fr)); gap: 1rem; margin-bottom: 2rem; }
.stat-card { background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 1.25rem; }
.stat-card-value { font-size: 2rem; font-weight: 800; }
.stat-card-label { font-size: 0.8rem; color: var(--text-muted); margin-top: 0.25rem; }
.stat-card-active .stat-card-value  { color: var(--emerald); }
.stat-card-pending .stat-card-value { color: var(--amber); }
.stat-card-flagged .stat-card-value { color: var(--red); }

/* ── Status Badges ── */
.status { display: inline-block; border-radius: 999px; padding: 0.2rem 0.65rem; font-size: 0.72rem; font-weight: 700; }
.status-active  { background: rgba(13,148,136,0.1);  color: var(--emerald); }
.status-pending { background: rgba(217,119,6,0.1);   color: var(--amber); }
.status-flagged { background: rgba(220,38,38,0.1);   color: var(--red); }
.status-archived{ background: rgba(75,106,133,0.1);  color: var(--text-muted); }

/* ── Utilities ── */
.text-muted   { color: var(--text-muted); }
.text-indigo  { color: var(--indigo); }
.text-emerald { color: var(--emerald); }
.text-amber   { color: var(--amber); }
.text-center  { text-align: center; }
.mt-1 { margin-top: 0.5rem; }  .mt-2 { margin-top: 1rem; }    .mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }.mb-2 { margin-bottom: 1rem; } .mb-3 { margin-bottom: 1.5rem; }
.flex { display: flex; } .items-center { align-items: center; }
.gap-1 { gap: 0.5rem; } .gap-2 { gap: 1rem; }
.fw-700 { font-weight: 700; } .font-mono { font-family: monospace; } .w-full { width: 100%; }

/* ── Responsive ── */
@media (max-width: 768px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .coa-stats { grid-template-columns: 1fr; }
  .hero-stats { gap: 1.5rem; }
  .navbar-nav {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    background: #fff; border-top: 1px solid var(--border);
    flex-direction: column; align-items: flex-start;
    padding: 1rem 1.5rem; gap: 0.75rem;
    box-shadow: 0 8px 24px rgba(2,132,199,0.1);
  }
  .navbar-nav.open { display: flex; }
  .navbar-toggle { display: block; }
  .admin-layout { flex-direction: column; }
  .admin-sidebar { width: 100%; padding: 1rem 0; border-right: none; border-bottom: 1px solid var(--border); }
}
@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; }
  .hero-actions { flex-direction: column; }
}
