/* =====================================================================
   SERVICELNINA - Hoja de estilos propia
   Diseno original creado para esta plataforma.
   Sin dependencias externas: no se carga ningun CSS de terceros.
   ===================================================================== */

:root {
  --sl-primary: #0f5cae;
  --sl-primary-dark: #0a4179;
  --sl-primary-600: #0d4f96;
  --sl-primary-700: #0a3f78;
  --sl-accent: #10b3a8;
  --sl-accent-dark: #0d928a;
  --sl-ink: #0f172a;
  --sl-body: #334155;
  --sl-muted: #64748b;
  --sl-line: #e2e8f0;
  --sl-bg: #f6f8fb;
  --sl-card: #ffffff;
  --sl-ok: #0f9d58;
  --sl-ok-bg: #e6f6ee;
  --sl-warn: #b45309;
  --sl-warn-bg: #fef3c7;
  --sl-bad: #c62828;
  --sl-bad-bg: #fdecea;
  --sl-info: #1565c0;
  --sl-info-bg: #e3f0fd;
  --sl-radius: 12px;
  --sl-radius-sm: 8px;
  --sl-shadow: 0 1px 2px rgba(15, 23, 42, .06), 0 4px 16px rgba(15, 23, 42, .06);
  --sl-shadow-lg: 0 12px 40px rgba(15, 23, 42, .14);
  --sl-sidebar: #0b2545;
  --sl-sidebar-hover: #14315c;
  --sl-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--sl-font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--sl-body);
  background: var(--sl-bg);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5 { color: var(--sl-ink); line-height: 1.25; margin: 0 0 .6rem; font-weight: 700; }
h1 { font-size: 2rem; letter-spacing: -.02em; }
h2 { font-size: 1.5rem; letter-spacing: -.01em; }
h3 { font-size: 1.15rem; }
h4 { font-size: 1rem; }
p { margin: 0 0 1rem; }
a { color: var(--sl-primary); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; display: block; }
hr { border: 0; border-top: 1px solid var(--sl-line); margin: 1.5rem 0; }
small { font-size: .82rem; }
code, pre, .mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .88em; }
pre { background: #0b1220; color: #e2e8f0; padding: 1rem; border-radius: var(--sl-radius-sm); overflow-x: auto; }

.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 1.25rem; }
.container-narrow { max-width: 820px; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.muted { color: var(--sl-muted); }
.small { font-size: .85rem; }
.strong { font-weight: 600; color: var(--sl-ink); }
.nowrap { white-space: nowrap; }
.mt-0 { margin-top: 0; } .mt-1 { margin-top: .5rem; } .mt-2 { margin-top: 1rem; } .mt-3 { margin-top: 1.5rem; } .mt-4 { margin-top: 2.5rem; }
.mb-0 { margin-bottom: 0; } .mb-1 { margin-bottom: .5rem; } .mb-2 { margin-bottom: 1rem; } .mb-3 { margin-bottom: 1.5rem; }
.hide { display: none !important; }

/* ------------------------------- Botones ------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .7rem 1.25rem; border-radius: var(--sl-radius-sm); border: 1px solid transparent;
  font-weight: 600; font-size: .95rem; cursor: pointer; text-decoration: none;
  transition: background .15s ease, box-shadow .15s ease, transform .05s ease;
  line-height: 1.2; font-family: inherit;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: 3px solid rgba(15, 92, 174, .35); outline-offset: 2px; }
.btn-primary { background: var(--sl-primary); color: #fff; }
.btn-primary:hover { background: var(--sl-primary-600); color: #fff; }
.btn-accent { background: var(--sl-accent); color: #04302d; }
.btn-accent:hover { background: var(--sl-accent-dark); color: #fff; }
.btn-ghost { background: #fff; color: var(--sl-ink); border-color: var(--sl-line); }
.btn-ghost:hover { background: #f1f5f9; color: var(--sl-ink); }
.btn-outline { background: transparent; color: var(--sl-primary); border-color: var(--sl-primary); }
.btn-outline:hover { background: rgba(15, 92, 174, .08); color: var(--sl-primary); }
.btn-danger { background: var(--sl-bad); color: #fff; }
.btn-danger:hover { background: #a51f1f; color: #fff; }
.btn-success { background: var(--sl-ok); color: #fff; }
.btn-success:hover { background: #0b7f46; color: #fff; }
.btn-light { background: rgba(255,255,255,.16); color: #fff; border-color: rgba(255,255,255,.4); }
.btn-light:hover { background: rgba(255,255,255,.26); color: #fff; }
.btn-sm { padding: .42rem .8rem; font-size: .84rem; }
.btn-lg { padding: .95rem 1.9rem; font-size: 1.05rem; }
.btn-block { width: 100%; }
.btn[disabled], .btn.disabled { opacity: .55; cursor: not-allowed; }
.btn-row { display: flex; flex-wrap: wrap; gap: .6rem; }

/* ------------------------------- Tarjetas ------------------------------ */
.card {
  background: var(--sl-card); border: 1px solid var(--sl-line);
  border-radius: var(--sl-radius); box-shadow: var(--sl-shadow);
}
.card-body { padding: 1.35rem; }
.card-head {
  padding: 1rem 1.35rem; border-bottom: 1px solid var(--sl-line);
  display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
}
.card-head h2, .card-head h3 { margin: 0; font-size: 1.05rem; }
.card-foot { padding: .9rem 1.35rem; border-top: 1px solid var(--sl-line); background: #fafbfc; border-radius: 0 0 var(--sl-radius) var(--sl-radius); }

.grid { display: grid; gap: 1.25rem; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-auto { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.split { display: grid; grid-template-columns: 2fr 1fr; gap: 1.25rem; align-items: start; }

/* -------------------------------- Badges ------------------------------- */
.badge {
  display: inline-block; padding: .22rem .6rem; border-radius: 999px;
  font-size: .74rem; font-weight: 700; letter-spacing: .03em; text-transform: uppercase;
  white-space: nowrap;
}
.badge-ok { background: var(--sl-ok-bg); color: var(--sl-ok); }
.badge-warn { background: var(--sl-warn-bg); color: var(--sl-warn); }
.badge-bad { background: var(--sl-bad-bg); color: var(--sl-bad); }
.badge-info { background: var(--sl-info-bg); color: var(--sl-info); }
.badge-muted { background: #eef2f7; color: var(--sl-muted); }
.pill { display: inline-block; padding: .3rem .75rem; border-radius: 999px; background: #eef2f7; color: var(--sl-body); font-size: .82rem; font-weight: 600; }

/* ------------------------------ Formularios ---------------------------- */
.field { margin-bottom: 1.05rem; }
.field > label, .label {
  display: block; font-weight: 600; color: var(--sl-ink);
  margin-bottom: .35rem; font-size: .9rem;
}
.field .hint { display: block; color: var(--sl-muted); font-size: .82rem; margin-top: .3rem; }
.field .error { display: block; color: var(--sl-bad); font-size: .82rem; margin-top: .3rem; font-weight: 600; }
input[type=text], input[type=email], input[type=password], input[type=number],
input[type=tel], input[type=date], input[type=url], input[type=search], input[type=file], select, textarea {
  width: 100%; padding: .68rem .85rem; border: 1px solid #cbd5e1; border-radius: var(--sl-radius-sm);
  font-size: .95rem; font-family: inherit; color: var(--sl-ink); background: #fff; transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--sl-primary); box-shadow: 0 0 0 3px rgba(15, 92, 174, .14);
}
input[aria-invalid=true], .has-error input, .has-error select, .has-error textarea { border-color: var(--sl-bad); }
textarea { min-height: 110px; resize: vertical; }
select { appearance: none; background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath fill='%2364748b' d='M1 1l5 5 5-5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right .8rem center; background-size: 11px; padding-right: 2.2rem; }
.check { display: flex; align-items: flex-start; gap: .6rem; font-size: .92rem; }
.check input { width: 18px; height: 18px; margin: .2rem 0 0; flex-shrink: 0; accent-color: var(--sl-primary); }
.form-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 1rem; }
.form-row-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 1rem; }
.input-group { display: flex; gap: .5rem; }
.input-group input { flex: 1; }
.required { color: var(--sl-bad); }

/* -------------------------------- Tablas ------------------------------- */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.data { width: 100%; border-collapse: collapse; font-size: .92rem; }
table.data th {
  text-align: left; padding: .7rem .85rem; background: #f1f5f9; color: var(--sl-ink);
  font-weight: 700; font-size: .78rem; text-transform: uppercase; letter-spacing: .04em;
  border-bottom: 1px solid var(--sl-line); white-space: nowrap;
}
table.data td { padding: .72rem .85rem; border-bottom: 1px solid #eef2f7; vertical-align: middle; }
table.data tbody tr:hover { background: #f8fafc; }
table.data tbody tr:last-child td { border-bottom: 0; }
table.data td.num, table.data th.num { text-align: right; font-variant-numeric: tabular-nums; }
.empty { padding: 2.5rem 1rem; text-align: center; color: var(--sl-muted); }
.empty strong { display: block; color: var(--sl-ink); margin-bottom: .35rem; }

/* ------------------------------- Alertas ------------------------------- */
.alert { padding: .9rem 1.1rem; border-radius: var(--sl-radius-sm); margin-bottom: 1.1rem; border-left: 4px solid; font-size: .93rem; }
.alert-ok { background: var(--sl-ok-bg); border-color: var(--sl-ok); color: #0b5d36; }
.alert-error { background: var(--sl-bad-bg); border-color: var(--sl-bad); color: #8f1d1d; }
.alert-warn { background: var(--sl-warn-bg); border-color: var(--sl-warn); color: #7c4a06; }
.alert-info { background: var(--sl-info-bg); border-color: var(--sl-info); color: #0d4a8f; }

/* ----------------------------- Cabecera web ---------------------------- */
.site-header { background: #fff; border-bottom: 1px solid var(--sl-line); position: sticky; top: 0; z-index: 40; }
.site-header .container { display: flex; align-items: center; gap: 1.5rem; height: 68px; }
.brand { display: flex; align-items: center; gap: .6rem; font-weight: 800; color: var(--sl-ink); font-size: 1.15rem; letter-spacing: -.02em; }
.brand:hover { text-decoration: none; }
.brand-mark {
  width: 36px; height: 36px; border-radius: 9px; flex-shrink: 0;
  background: linear-gradient(135deg, var(--sl-primary), var(--sl-accent));
  color: #fff; display: grid; place-items: center; font-weight: 800; font-size: .95rem;
}
.brand-name { color: var(--sl-ink); }
.brand-name span { color: var(--sl-primary); }
.main-nav { display: flex; gap: .25rem; margin-left: auto; align-items: center; }
.main-nav a { padding: .5rem .8rem; border-radius: var(--sl-radius-sm); color: var(--sl-body); font-weight: 500; font-size: .93rem; }
.main-nav a:hover { background: #f1f5f9; text-decoration: none; color: var(--sl-ink); }
.main-nav a.active { color: var(--sl-primary); background: rgba(15,92,174,.08); font-weight: 600; }
.header-actions { display: flex; gap: .6rem; align-items: center; }
.nav-toggle { display: none; background: none; border: 1px solid var(--sl-line); border-radius: 8px; padding: .5rem .65rem; cursor: pointer; margin-left: auto; }
.nav-toggle span { display: block; width: 20px; height: 2px; background: var(--sl-ink); margin: 4px 0; border-radius: 2px; }

/* --------------------------------- Hero -------------------------------- */
.hero {
  background: linear-gradient(140deg, #0b2545 0%, var(--sl-primary) 55%, #1183a8 100%);
  color: #fff; padding: 4.5rem 0 4rem; position: relative; overflow: hidden;
}
.hero::after {
  content: ''; position: absolute; right: -160px; top: -120px; width: 520px; height: 520px;
  background: radial-gradient(circle, rgba(16,179,168,.35), transparent 65%); pointer-events: none;
}
.hero-inner { display: grid; grid-template-columns: 1.15fr .85fr; gap: 3rem; align-items: center; position: relative; z-index: 1; }
.hero h1 { color: #fff; font-size: 2.9rem; margin-bottom: .4rem; }
.hero .kicker { display: inline-block; background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.24); padding: .35rem .85rem; border-radius: 999px; font-size: .82rem; font-weight: 600; margin-bottom: 1.1rem; letter-spacing: .02em; }
.hero .lead { font-size: 1.15rem; color: rgba(255,255,255,.9); max-width: 34rem; }
.hero-card { background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.2); border-radius: var(--sl-radius); padding: 1.5rem; backdrop-filter: blur(6px); }
.hero-card h3 { color: #fff; font-size: 1rem; margin-bottom: 1rem; }
.hero-steps { list-style: none; margin: 0; padding: 0; counter-reset: paso; }
.hero-steps li { counter-increment: paso; padding: .6rem 0 .6rem 2.6rem; position: relative; color: rgba(255,255,255,.92); font-size: .93rem; border-bottom: 1px solid rgba(255,255,255,.12); }
.hero-steps li:last-child { border-bottom: 0; }
.hero-steps li::before {
  content: counter(paso); position: absolute; left: 0; top: .55rem; width: 26px; height: 26px;
  border-radius: 50%; background: rgba(255,255,255,.2); display: grid; place-items: center;
  font-weight: 700; font-size: .8rem; color: #fff;
}

.section { padding: 3.5rem 0; }
.section-alt { background: #fff; }
.section-head { max-width: 40rem; margin-bottom: 2rem; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head .eyebrow { color: var(--sl-primary); font-weight: 700; font-size: .82rem; letter-spacing: .08em; text-transform: uppercase; margin-bottom: .4rem; }

.stat-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--sl-line); border: 1px solid var(--sl-line); border-radius: var(--sl-radius); overflow: hidden; }
.stat-strip div { background: #fff; padding: 1.4rem 1rem; text-align: center; }
.stat-strip strong { display: block; font-size: 1.8rem; color: var(--sl-primary); font-weight: 800; line-height: 1.1; }
.stat-strip span { font-size: .85rem; color: var(--sl-muted); }

/* ------------------------------- Catalogo ------------------------------ */
.catalog { display: grid; grid-template-columns: 260px 1fr; gap: 2rem; align-items: start; }
.filters { position: sticky; top: 90px; }
.filter-list { list-style: none; margin: 0; padding: 0; }
.filter-list a { display: flex; justify-content: space-between; gap: .5rem; padding: .5rem .7rem; border-radius: var(--sl-radius-sm); color: var(--sl-body); font-size: .92rem; }
.filter-list a:hover { background: #f1f5f9; text-decoration: none; }
.filter-list a.active { background: rgba(15,92,174,.1); color: var(--sl-primary); font-weight: 600; }
.filter-list .count { color: var(--sl-muted); font-size: .82rem; }

.item-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 1.25rem; }
.item-card { background: #fff; border: 1px solid var(--sl-line); border-radius: var(--sl-radius); overflow: hidden; display: flex; flex-direction: column; transition: box-shadow .18s, transform .18s; }
.item-card:hover { box-shadow: var(--sl-shadow-lg); transform: translateY(-2px); }
.item-thumb { aspect-ratio: 16 / 10; background: linear-gradient(135deg, #eef2f7, #dbe6f3); display: grid; place-items: center; overflow: hidden; }
.item-thumb img { width: 100%; height: 100%; object-fit: cover; }
.item-thumb .ph { font-size: 1.7rem; font-weight: 800; color: var(--sl-primary); opacity: .5; letter-spacing: .1em; }
.item-body { padding: 1.05rem; display: flex; flex-direction: column; flex: 1; gap: .5rem; }
.item-body h3 { font-size: 1rem; margin: 0; }
.item-body h3 a { color: var(--sl-ink); }
.item-cat { font-size: .76rem; color: var(--sl-primary); font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
.item-desc { font-size: .88rem; color: var(--sl-muted); margin: 0; flex: 1; }
.item-foot { display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding-top: .6rem; border-top: 1px solid #eef2f7; }
.price { font-size: 1.2rem; font-weight: 800; color: var(--sl-ink); font-variant-numeric: tabular-nums; }
.price small { font-size: .72rem; color: var(--sl-muted); font-weight: 600; display: block; }

.detail { display: grid; grid-template-columns: 1.35fr .65fr; gap: 2rem; align-items: start; }
.detail-media { border-radius: var(--sl-radius); overflow: hidden; border: 1px solid var(--sl-line); background: #fff; }
.buy-box { position: sticky; top: 90px; }
.spec-list { list-style: none; margin: 0; padding: 0; }
.spec-list li { display: flex; justify-content: space-between; gap: 1rem; padding: .6rem 0; border-bottom: 1px solid #eef2f7; font-size: .9rem; }
.spec-list li:last-child { border-bottom: 0; }
.spec-list .k { color: var(--sl-muted); }
.spec-list .v { font-weight: 600; color: var(--sl-ink); text-align: right; }

.breadcrumbs { font-size: .85rem; color: var(--sl-muted); padding: 1rem 0; }
.breadcrumbs a { color: var(--sl-muted); }
.breadcrumbs span { margin: 0 .4rem; opacity: .6; }

/* --------------------------------- FAQ --------------------------------- */
.faq-item { border: 1px solid var(--sl-line); border-radius: var(--sl-radius-sm); margin-bottom: .75rem; background: #fff; }
.faq-item summary { padding: 1rem 1.2rem; font-weight: 600; color: var(--sl-ink); cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 1rem; align-items: center; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: '+'; font-size: 1.3rem; color: var(--sl-primary); font-weight: 400; line-height: 1; }
.faq-item[open] summary::after { content: '\2212'; }
.faq-item .answer { padding: 0 1.2rem 1.1rem; color: var(--sl-body); font-size: .94rem; }

/* --------------------------------- Pie --------------------------------- */
.site-footer { background: #0b1b31; color: #a8bacf; padding: 3rem 0 1.5rem; margin-top: 3rem; font-size: .92rem; }
.site-footer h4 { color: #fff; font-size: .95rem; margin-bottom: .9rem; }
.site-footer a { color: #a8bacf; }
.site-footer a:hover { color: #fff; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 2rem; }
.footer-links { list-style: none; margin: 0; padding: 0; }
.footer-links li { margin-bottom: .45rem; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); margin-top: 2.2rem; padding-top: 1.2rem; display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; font-size: .85rem; }

/* ------------------------------ Panel / App ---------------------------- */
.app { display: grid; grid-template-columns: 250px 1fr; min-height: 100vh; }
.sidebar { background: var(--sl-sidebar); color: #cbd8e8; padding: 1.1rem 0; display: flex; flex-direction: column; }
.sidebar .brand { color: #fff; padding: 0 1.2rem 1.1rem; border-bottom: 1px solid rgba(255,255,255,.09); margin-bottom: .8rem; }
.sidebar .brand .brand-name { color: #fff; }
.sidebar .brand .brand-name span { color: var(--sl-accent); }
.side-nav { list-style: none; margin: 0; padding: 0 .7rem; flex: 1; overflow-y: auto; }
.side-nav li { margin-bottom: 2px; }
.side-nav a { display: flex; align-items: center; gap: .65rem; padding: .6rem .8rem; border-radius: var(--sl-radius-sm); color: #b9c9dd; font-size: .92rem; font-weight: 500; }
.side-nav a:hover { background: var(--sl-sidebar-hover); color: #fff; text-decoration: none; }
.side-nav a.active { background: var(--sl-primary); color: #fff; font-weight: 600; }
.side-nav .group { padding: 1rem .8rem .35rem; font-size: .7rem; text-transform: uppercase; letter-spacing: .1em; color: #6f8bad; font-weight: 700; }
.side-nav .chip { margin-left: auto; background: var(--sl-accent); color: #04302d; border-radius: 999px; padding: .05rem .45rem; font-size: .72rem; font-weight: 800; }
.side-nav .chip-bad { background: #ef5350; color: #fff; }
.sidebar-foot { padding: 1rem 1.2rem 0; border-top: 1px solid rgba(255,255,255,.09); font-size: .8rem; color: #7d97b8; }

.app-main { display: flex; flex-direction: column; min-width: 0; }
.topbar {
  background: #fff; border-bottom: 1px solid var(--sl-line); padding: .85rem 1.5rem;
  display: flex; align-items: center; gap: 1rem; position: sticky; top: 0; z-index: 30;
}
.topbar h1 { font-size: 1.15rem; margin: 0; }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: .7rem; }
.balance-chip {
  background: linear-gradient(135deg, var(--sl-primary), var(--sl-accent)); color: #fff;
  padding: .4rem .9rem; border-radius: 999px; font-weight: 700; font-size: .9rem; white-space: nowrap;
}
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--sl-primary); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: .85rem; }
.app-content { padding: 1.5rem; flex: 1; }
.sidebar-toggle { display: none; background: none; border: 1px solid var(--sl-line); border-radius: 8px; padding: .45rem .6rem; cursor: pointer; }
.sidebar-toggle span { display: block; width: 18px; height: 2px; background: var(--sl-ink); margin: 3px 0; border-radius: 2px; }

.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.35rem; }
.page-head h1 { margin: 0 0 .2rem; font-size: 1.5rem; }
.page-head p { margin: 0; color: var(--sl-muted); font-size: .92rem; }

/* ------------------------------ Indicadores ---------------------------- */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 1rem; margin-bottom: 1.5rem; }
.kpi { background: #fff; border: 1px solid var(--sl-line); border-radius: var(--sl-radius); padding: 1.1rem 1.2rem; box-shadow: var(--sl-shadow); }
.kpi .k { font-size: .74rem; text-transform: uppercase; letter-spacing: .06em; color: var(--sl-muted); font-weight: 700; }
.kpi .v { font-size: 1.6rem; font-weight: 800; color: var(--sl-ink); line-height: 1.2; margin-top: .3rem; font-variant-numeric: tabular-nums; }
.kpi .d { font-size: .82rem; color: var(--sl-muted); margin-top: .2rem; }
.kpi.accent { border-left: 4px solid var(--sl-primary); }
.kpi.ok { border-left: 4px solid var(--sl-ok); }
.kpi.warn { border-left: 4px solid var(--sl-warn); }
.kpi.bad { border-left: 4px solid var(--sl-bad); }
.kpi a { display: block; }
.kpi a:hover { text-decoration: none; }

/* --------------------------------- Chart ------------------------------- */
.chart { display: flex; align-items: flex-end; gap: 6px; height: 170px; padding-top: 1rem; }
.chart .bar { flex: 1; background: linear-gradient(180deg, var(--sl-primary), var(--sl-accent)); border-radius: 4px 4px 0 0; min-height: 3px; position: relative; }
.chart .bar span { position: absolute; bottom: -1.4rem; left: 50%; transform: translateX(-50%); font-size: .68rem; color: var(--sl-muted); white-space: nowrap; }
.chart-wrap { padding-bottom: 1.6rem; }

/* ------------------------------ Paginacion ----------------------------- */
.pagination { display: flex; gap: .35rem; justify-content: center; align-items: center; margin-top: 1.5rem; flex-wrap: wrap; }
.pagination a, .pagination span {
  padding: .45rem .78rem; border-radius: var(--sl-radius-sm); border: 1px solid var(--sl-line);
  background: #fff; color: var(--sl-body); font-size: .88rem; font-weight: 600;
}
.pagination a:hover { background: #f1f5f9; text-decoration: none; }
.pagination .current { background: var(--sl-primary); border-color: var(--sl-primary); color: #fff; }
.pagination .disabled { opacity: .45; }

/* ------------------------------ Utilidades ----------------------------- */
.toolbar { display: flex; gap: .6rem; flex-wrap: wrap; align-items: flex-end; margin-bottom: 1.1rem; }
.toolbar .field { margin-bottom: 0; }
.toolbar input, .toolbar select { min-width: 150px; }
.tabs { display: flex; gap: .3rem; border-bottom: 1px solid var(--sl-line); margin-bottom: 1.35rem; overflow-x: auto; }
.tabs a { padding: .65rem 1rem; color: var(--sl-muted); font-weight: 600; font-size: .92rem; border-bottom: 3px solid transparent; white-space: nowrap; }
.tabs a:hover { color: var(--sl-ink); text-decoration: none; }
.tabs a.active { color: var(--sl-primary); border-bottom-color: var(--sl-primary); }

.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { position: relative; padding: 0 0 1.2rem 1.6rem; border-left: 2px solid var(--sl-line); }
.timeline li:last-child { border-left-color: transparent; padding-bottom: 0; }
.timeline li::before { content: ''; position: absolute; left: -7px; top: .35rem; width: 12px; height: 12px; border-radius: 50%; background: var(--sl-primary); border: 2px solid #fff; }

.msg { border: 1px solid var(--sl-line); border-radius: var(--sl-radius-sm); padding: .9rem 1.1rem; margin-bottom: .85rem; background: #fff; }
.msg.staff { background: #f0f7ff; border-color: #cfe2f7; }
.msg .meta { font-size: .8rem; color: var(--sl-muted); margin-bottom: .35rem; display: flex; gap: .6rem; flex-wrap: wrap; }
.msg .body { white-space: pre-wrap; word-break: break-word; font-size: .93rem; }

.result-box { background: #0b1220; color: #d7e3f4; padding: 1rem 1.2rem; border-radius: var(--sl-radius-sm); white-space: pre-wrap; word-break: break-word; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .86rem; max-height: 420px; overflow: auto; }
.copy-field { display: flex; gap: .5rem; }
.copy-field input { font-family: ui-monospace, monospace; font-size: .85rem; }

.auth-wrap { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; }
.auth-side { background: linear-gradient(150deg, #0b2545, var(--sl-primary) 60%, #1183a8); color: #fff; padding: 3rem; display: flex; flex-direction: column; justify-content: center; }
.auth-side h2 { color: #fff; font-size: 1.9rem; }
.auth-side ul { list-style: none; padding: 0; margin: 1.5rem 0 0; }
.auth-side li { padding: .5rem 0 .5rem 1.8rem; position: relative; color: rgba(255,255,255,.9); font-size: .95rem; }
.auth-side li::before { content: '\2713'; position: absolute; left: 0; color: var(--sl-accent); font-weight: 800; }
.auth-main { display: flex; align-items: center; justify-content: center; padding: 2.5rem 1.5rem; background: var(--sl-bg); }
.auth-card { width: 100%; max-width: 440px; }

.qr-preview { max-width: 200px; border: 1px solid var(--sl-line); border-radius: var(--sl-radius-sm); padding: .5rem; background: #fff; }
.file-note { font-size: .82rem; color: var(--sl-muted); }
.divider-text { display: flex; align-items: center; gap: 1rem; color: var(--sl-muted); font-size: .85rem; margin: 1.2rem 0; }
.divider-text::before, .divider-text::after { content: ''; flex: 1; height: 1px; background: var(--sl-line); }

.progress { height: 8px; background: #eef2f7; border-radius: 999px; overflow: hidden; }
.progress > div { height: 100%; background: linear-gradient(90deg, var(--sl-primary), var(--sl-accent)); }

.skip-link { position: absolute; left: -9999px; }
.skip-link:focus { left: 1rem; top: 1rem; z-index: 100; background: #fff; padding: .6rem 1rem; border-radius: 8px; box-shadow: var(--sl-shadow); }

/* ------------------------------ Responsive ----------------------------- */
@media (max-width: 1024px) {
  .hero-inner { grid-template-columns: 1fr; gap: 2rem; }
  .hero h1 { font-size: 2.2rem; }
  .catalog { grid-template-columns: 1fr; }
  .filters { position: static; }
  .detail { grid-template-columns: 1fr; }
  .buy-box { position: static; }
  .split { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
  .auth-wrap { grid-template-columns: 1fr; }
  .auth-side { display: none; }
}

@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed; inset: 0 auto 0 0; width: 260px; z-index: 60;
    transform: translateX(-100%); transition: transform .22s ease; box-shadow: var(--sl-shadow-lg);
  }
  .app.nav-open .sidebar { transform: translateX(0); }
  .app.nav-open::after { content: ''; position: fixed; inset: 0; background: rgba(15,23,42,.5); z-index: 50; }
  .sidebar-toggle { display: block; }
}

@media (max-width: 768px) {
  h1 { font-size: 1.6rem; }
  .hero { padding: 3rem 0 2.5rem; }
  .hero h1 { font-size: 1.9rem; }
  .nav-toggle { display: block; }
  .main-nav {
    display: none; position: absolute; top: 68px; left: 0; right: 0; background: #fff;
    flex-direction: column; padding: .8rem 1.25rem; border-bottom: 1px solid var(--sl-line);
    box-shadow: var(--sl-shadow); gap: .1rem; align-items: stretch;
  }
  .site-header.open .main-nav { display: flex; }
  .site-header.open .header-actions { display: none; }
  .header-actions .btn { padding: .5rem .85rem; font-size: .85rem; }
  .grid-2, .grid-3, .grid-4, .form-row, .form-row-3 { grid-template-columns: 1fr; }
  .stat-strip { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr; }
  .app-content { padding: 1rem; }
  .topbar { padding: .7rem 1rem; }
  .card-body { padding: 1.05rem; }
  .item-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
  .btn-row .btn { flex: 1 1 auto; }
}

@media (max-width: 480px) {
  body { font-size: 15px; }
  .hero h1 { font-size: 1.65rem; }
  .kpi .v { font-size: 1.35rem; }
  .item-grid { grid-template-columns: 1fr; }
  .stat-strip { grid-template-columns: 1fr; }
}

/* ---------------------------------------------------------------------------
   Barra de pedidos del panel del cliente (layouts/order-bar.php).
   Dos menus desplegables hechos con <details>: sin JavaScript.
--------------------------------------------------------------------------- */
.order-bar {
  display: flex; flex-wrap: wrap; align-items: center; gap: .6rem;
  padding: .7rem 1.5rem; background: var(--sl-card);
  border-bottom: 1px solid var(--sl-line); position: relative; z-index: 30;
}
.order-menu { position: relative; }
.order-menu > summary {
  display: inline-flex; align-items: center; gap: .55rem; cursor: pointer;
  padding: .55rem 1rem; border-radius: var(--sl-radius-sm);
  border: 1px solid var(--sl-primary); background: var(--sl-primary); color: #fff;
  font-weight: 600; font-size: .9rem; line-height: 1.2; list-style: none;
  user-select: none; transition: background .15s ease;
}
.order-menu > summary::-webkit-details-marker { display: none; }
.order-menu > summary:hover { background: var(--sl-primary-600); }
.order-menu > summary:focus-visible { outline: 3px solid rgba(15, 92, 174, .35); outline-offset: 2px; }
.order-menu + .order-menu > summary { background: #fff; color: var(--sl-ink); border-color: var(--sl-line); }
.order-menu + .order-menu > summary:hover { background: #f1f5f9; }
.order-menu.is-active > summary { box-shadow: 0 0 0 3px rgba(15, 92, 174, .18); }
.order-menu-icon { font-size: 1.05em; line-height: 1; }
.order-menu-caret {
  width: 0; height: 0; margin-left: .15rem;
  border-left: 4px solid transparent; border-right: 4px solid transparent;
  border-top: 5px solid currentColor; transition: transform .15s ease;
}
.order-menu[open] .order-menu-caret { transform: rotate(180deg); }

.order-menu-panel {
  position: absolute; top: calc(100% + .45rem); left: 0; min-width: 290px;
  background: var(--sl-card); border: 1px solid var(--sl-line);
  border-radius: var(--sl-radius-sm); box-shadow: 0 12px 32px rgba(15, 23, 42, .14);
  padding: .4rem; display: flex; flex-direction: column; z-index: 40;
}
.order-menu-panel a {
  display: flex; align-items: center; gap: .55rem;
  padding: .6rem .75rem; border-radius: 6px;
  color: var(--sl-ink); font-size: .9rem; font-weight: 500; text-decoration: none;
}
.order-menu-panel a:hover { background: #f1f5f9; text-decoration: none; }
.order-menu-all { border-top: 1px solid var(--sl-line); margin-top: .25rem; color: var(--sl-primary) !important; }
.order-menu-empty { margin: 0; padding: .7rem .75rem; font-size: .85rem; color: var(--sl-muted); }

/* Puntito de color por estado de orden. */
.order-dot { width: 9px; height: 9px; border-radius: 50%; flex: 0 0 auto; background: var(--sl-muted); }
.is-pending .order-dot { background: var(--sl-warn); }
.is-running .order-dot { background: var(--sl-primary); }
.is-done    .order-dot { background: var(--sl-ok); }
.is-error   .order-dot { background: var(--sl-bad); }
.is-refund  .order-dot { background: var(--sl-accent); }

.order-bar-link {
  padding: .55rem .85rem; border-radius: var(--sl-radius-sm);
  color: var(--sl-body); font-size: .9rem; font-weight: 500;
}
.order-bar-link:hover { background: #f1f5f9; text-decoration: none; }

@media (max-width: 640px) {
  .order-bar { padding: .6rem .9rem; }
  .order-menu { flex: 1 1 100%; }
  .order-menu > summary { width: 100%; justify-content: center; }
  .order-menu-panel { left: 0; right: 0; min-width: 0; }
}

@media print {
  .site-header, .site-footer, .sidebar, .topbar, .btn, .pagination, .toolbar, .order-bar { display: none !important; }
  body { background: #fff; }
  .app { grid-template-columns: 1fr; }
  .card { box-shadow: none; border-color: #ccc; }
}
