/* ROBERASIA · estilos (tienda + panel) */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Space+Grotesk:wght@500;600;700&display=swap');

:root {
  --bg: #FFFFFF; --bg2: #F8F6F8; --surface: #F4F1F4; --card: #FFFFFF;
  --text: #1B1620; --muted: #5E5866; --border: #E6E1E8; --border2: #D6CFD9;
  --primary: #C2185B; --primary-2: #8E1244; --on-primary: #FFFFFF; --primary-soft: #FDEBF2;
  --yellow: #FFE9A8; --yellow-ink: #6B4E00; --violet: #EFEAFF; --violet-ink: #5B21B6;
  --teal: #CDEFE8; --teal-ink: #0F4F4A; --peach: #FFD9C2; --sale: #C2410C;
  --dark: #1B1620; --on-dark: #FFFFFF; --ok: #166534; --danger: #9F1239;
  --radius: 18px; --shadow: 0 6px 24px rgba(27, 22, 32, .07);
  color-scheme: light;
}
[data-theme="dark"] {
  --bg: #141016; --bg2: #18131B; --surface: #221C26; --card: #1B161E;
  --text: #F3EEF4; --muted: #B6ADBB; --border: #2F2834; --border2: #43394A;
  --primary: #FF7AA8; --primary-2: #FFB3CC; --on-primary: #1A0B12; --primary-soft: #3A1530;
  --yellow: #3D3418; --yellow-ink: #FDE68A; --violet: #2A2340; --violet-ink: #C4B5FD;
  --teal: #16332F; --teal-ink: #99F6E4; --peach: #3B2618; --sale: #FB923C;
  --dark: #0B080D; --ok: #86EFAC; --danger: #FDA4AF; --shadow: none;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: Inter, system-ui, sans-serif; background: var(--bg); color: var(--text); font-size: 16px; line-height: 1.45; -webkit-font-smoothing: antialiased; }
h1, h2, h3, .display { font-family: 'Space Grotesk', Inter, sans-serif; letter-spacing: -.3px; }
a { color: var(--primary); }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
svg { width: 20px; height: 20px; flex-shrink: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wrap { max-width: 1280px; margin: 0 auto; padding: 0 20px; }
.muted { color: var(--muted); }
.hidden { display: none !important; }
:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; }

/* ---------- botones y campos ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 20px; border-radius: 14px; border: 1px solid transparent; font-weight: 600; text-decoration: none; transition: transform .08s, filter .15s; background: var(--surface); color: var(--text); }
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-primary { background: var(--primary); color: var(--on-primary); }
.btn-primary:hover { filter: brightness(1.07); }
.btn-dark { background: var(--dark); color: var(--on-dark); }
.btn-ghost { background: var(--card); border-color: var(--border2); }
.btn-danger { background: transparent; color: var(--danger); border-color: var(--border2); }
.btn-sm { min-height: 38px; padding: 0 14px; border-radius: 10px; font-size: 14px; }
.btn-block { width: 100%; }
.icon-btn { width: 44px; height: 44px; border-radius: 999px; border: 1px solid var(--border); background: var(--card); color: var(--text); display: inline-flex; align-items: center; justify-content: center; }
.field { display: flex; flex-direction: column; gap: 6px; font-size: 14px; font-weight: 600; }
.field input, .field select, .field textarea, .input { min-height: 46px; border: 1px solid var(--border2); border-radius: 12px; padding: 0 12px; background: var(--card); font-weight: 400; font-size: 15px; width: 100%; }
.field textarea { padding: 12px; min-height: 120px; resize: vertical; }
.field small { font-weight: 400; color: var(--muted); }
.row { display: flex; gap: 12px; flex-wrap: wrap; }
.row > * { flex: 1 1 160px; }

/* ---------- cabecera tienda ---------- */
.topbar { background: var(--dark); color: var(--on-dark); font-size: 13px; text-align: center; padding: 8px 16px; }
.hdr { background: var(--bg); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 20; }
.hdr-in { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; padding: 14px 0; }
.logo { font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: 26px; color: var(--text); text-decoration: none; letter-spacing: -.6px; }
.logo span { color: var(--primary); }
.search { flex: 1 1 320px; display: flex; align-items: center; gap: 8px; background: var(--surface); border: 1px solid var(--border); border-radius: 999px; padding: 4px 4px 4px 16px; order: 3; }
.search input { flex: 1; border: 0; background: transparent; outline: none; padding: 10px 0; font-size: 15px; min-width: 0; }
.search svg { color: var(--muted); }
.hdr-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; order: 2; }
.cart-btn { display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 16px; border-radius: 999px; background: var(--dark); color: var(--on-dark); text-decoration: none; font-weight: 600; font-size: 14px; }
[data-theme="dark"] .cart-btn { background: var(--primary); color: var(--on-primary); }
.count { background: #FDE68A; color: #1B1620; border-radius: 999px; font-size: 12px; font-weight: 700; padding: 2px 8px; }
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 0 0 14px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex-shrink: 0; font-size: 14px; font-weight: 600; padding: 8px 16px; border-radius: 999px; border: 2px solid transparent; color: #1B1620; text-decoration: none; background: #FFD6E5; }
.chip[aria-current="true"] { border-color: var(--text); }
[data-theme="dark"] .chip { filter: saturate(.9) brightness(.92); }
@media (min-width: 860px) { .search { order: 2; } .hdr-actions { order: 3; margin-left: 0; } }
@media (max-width: 600px) { .search { flex-basis: 100%; min-width: 0; } .topbar { font-size: 12px; } }

/* ---------- portada ---------- */
.shop { padding: 20px 0 40px; display: flex; flex-direction: column; gap: 36px; }
.hero { display: flex; flex-wrap: wrap; gap: 18px; }
.hero-main { flex: 2 1 480px; min-height: 300px; border-radius: 26px; background: var(--primary-soft); padding: 36px; display: flex; flex-direction: column; justify-content: center; gap: 14px; }
.hero-main h1 { margin: 0; font-size: clamp(32px, 4.6vw, 52px); line-height: 1.04; max-width: 640px; }
.hero-main p { margin: 0; font-size: 17px; color: var(--muted); max-width: 520px; }
.tag { align-self: flex-start; font-size: 13px; font-weight: 700; color: var(--primary); background: var(--card); padding: 6px 12px; border-radius: 999px; }
.hero-offer { flex: 1 1 280px; min-height: 300px; border-radius: 26px; background: var(--yellow); padding: 28px; display: flex; flex-direction: column; justify-content: space-between; gap: 16px; }
.hero-offer .k { font-size: 13px; font-weight: 700; color: var(--sale); text-transform: uppercase; letter-spacing: 1px; }
.hero-offer p { margin: 8px 0 0; font-family: 'Space Grotesk', sans-serif; font-size: 30px; font-weight: 700; line-height: 1.1; }
.code-box { display: flex; align-items: center; justify-content: space-between; gap: 10px; background: var(--card); border: 2px dashed #F2C66D; border-radius: 14px; padding: 12px 14px; }
.code-box b { font-family: 'Space Grotesk', sans-serif; font-size: 20px; letter-spacing: 2px; }
.promo { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 16px; border-radius: 12px; background: var(--primary-soft); font-weight: 600; font-size: 15px; }
.promo-code { font-size: 14px; font-weight: 500; }
.promo-code b { font-family: 'Space Grotesk', sans-serif; letter-spacing: 1.5px; background: var(--card); padding: 3px 9px; border-radius: 7px; border: 1px dashed var(--primary); margin-left: 4px; }
.sec { display: flex; flex-direction: column; gap: 18px; }
.sec-h { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.sec-h h2 { margin: 0; font-size: 28px; }
.sec-h svg { width: 22px; height: 22px; color: var(--primary); }
.sec-h .muted { font-size: 14px; }

/* ---------- tarjetas ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 18px; }
.card { display: flex; flex-direction: column; gap: 8px; border: 1px solid var(--border); border-radius: var(--radius); padding: 10px; background: var(--card); position: relative; }
.ph { position: relative; aspect-ratio: 1 / 1; border-radius: 12px; background: var(--surface); display: flex; align-items: center; justify-content: center; overflow: hidden; color: var(--muted); text-decoration: none; }
.ph img { width: 100%; height: 100%; object-fit: cover; }
.ph svg { width: 40px; height: 40px; opacity: .55; }
.ph.out img { filter: grayscale(.7); opacity: .7; }
.badges { position: absolute; top: 8px; left: 8px; display: flex; gap: 6px; flex-wrap: wrap; right: 8px; }
.b { font-size: 12px; font-weight: 700; padding: 4px 8px; border-radius: 7px; line-height: 1.2; }
.b-new { background: var(--primary); color: var(--on-primary); }
.b-sale { background: var(--sale); color: #FFFFFF; }
[data-theme="dark"] .b-sale { color: #1A0E05; }
.b-low { background: #FDE68A; color: #713F12; }
.b-out { background: #4B5563; color: #FFFFFF; }
.b-cond { background: var(--teal); color: var(--teal-ink); }
.card .nm { font-weight: 600; font-size: 15px; color: var(--text); text-decoration: none; line-height: 1.3; }
.card .nm::after { content: ''; position: absolute; inset: 0; border-radius: var(--radius); }
.card .cat { font-size: 12px; color: var(--muted); }
.price { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.price b { font-family: 'Space Grotesk', sans-serif; font-size: 19px; }
.price b.sale { color: var(--sale); }
.old { font-size: 13px; color: var(--muted); text-decoration: line-through; }
.card .add { position: relative; z-index: 1; margin-top: auto; }
.best-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 14px; }
.best { display: flex; align-items: center; gap: 14px; padding: 12px; border-radius: var(--radius); background: var(--violet); color: var(--text); text-decoration: none; }
.best .rk { font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: 30px; color: var(--violet-ink); width: 34px; text-align: center; }
.best .ph { width: 72px; height: 72px; flex-shrink: 0; background: var(--card); }
.best .ph svg { width: 28px; height: 28px; }
.best .tx { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.best .tx span:first-child { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.shop-layout { display: flex; flex-wrap: wrap; gap: 28px; align-items: flex-start; }
.filters { flex: 1 1 230px; max-width: 290px; display: flex; flex-direction: column; gap: 20px; border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; }
.filters h3 { margin: 0 0 8px; font-size: 15px; font-family: Inter, sans-serif; letter-spacing: 0; }
.check { display: flex; align-items: center; gap: 10px; font-size: 14px; min-height: 34px; }
.check input { width: 18px; height: 18px; accent-color: var(--primary); }
.shop-main { flex: 999 1 520px; min-width: 0; display: flex; flex-direction: column; gap: 18px; }
.empty { padding: 40px 20px; text-align: center; color: var(--muted); border: 2px dashed var(--border); border-radius: var(--radius); }
@media (max-width: 700px) { .filters { max-width: none; } }

/* carrito: quitar */
.cart-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.cart-head .btn svg, .rm-btn svg { width: 16px; height: 16px; }
.rm-btn { align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 0 12px; border-radius: 9px; border: 1px solid var(--border2); background: var(--card); color: var(--danger); font-size: 13px; font-weight: 600; margin-top: 2px; }
.rm-btn:hover { background: var(--primary-soft); }
.line .qty button svg { width: 16px; height: 16px; color: var(--danger); }

/* ---------- ficha ---------- */
.crumbs { font-size: 14px; color: var(--muted); display: flex; gap: 8px; flex-wrap: wrap; }
.pd { display: flex; flex-wrap: wrap; gap: 40px; align-items: flex-start; }
.gallery { flex: 1 1 440px; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.gallery .main-ph { aspect-ratio: 1 / 1; border-radius: 24px; }
.gallery .main-ph svg { width: 64px; height: 64px; }
.gal-nav { position: absolute; top: 50%; transform: translateY(-50%); }
.gal-nav.l { left: 10px; } .gal-nav.r { right: 10px; }
.thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); gap: 10px; }
.thumbs button { aspect-ratio: 1 / 1; padding: 0; border-radius: 12px; border: 1px solid var(--border); overflow: hidden; background: var(--surface); }
.thumbs button[aria-current="true"] { border: 3px solid var(--primary); }
.thumbs img { width: 100%; height: 100%; object-fit: cover; }
.pd-info { flex: 1 1 380px; min-width: 0; display: flex; flex-direction: column; gap: 18px; }
.pd-info h1 { margin: 0; font-size: clamp(28px, 3.4vw, 40px); line-height: 1.1; }
.pd-price b { font-size: 34px; }
.desc { white-space: pre-line; color: var(--muted); line-height: 1.6; margin: 0; }
.ship-box { display: flex; gap: 14px; align-items: center; padding: 14px; border-radius: 16px; background: var(--surface); }
.ship-box .ic { width: 46px; height: 46px; border-radius: 12px; background: var(--card); display: flex; align-items: center; justify-content: center; color: var(--primary); flex-shrink: 0; }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--border2); border-radius: 14px; height: 50px; }
.qty button { width: 46px; height: 48px; border: 0; background: transparent; font-size: 22px; }
.qty span { min-width: 30px; text-align: center; font-weight: 700; }
.specs { width: 100%; border-collapse: collapse; font-size: 15px; }
.specs th { text-align: left; font-weight: 500; color: var(--muted); padding: 11px 0; width: 40%; }
.specs td { padding: 11px 0; font-weight: 600; }
.specs tr { border-bottom: 1px solid var(--border); }

/* ---------- carrito ---------- */
.cart-layout { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; }
.cart-col { flex: 999 1 540px; min-width: 0; display: flex; flex-direction: column; gap: 18px; }
.box { background: var(--card); border: 1px solid var(--border); border-radius: 20px; padding: 20px; display: flex; flex-direction: column; gap: 14px; }
.box h2 { margin: 0; font-size: 19px; }
.line { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; padding: 12px; border: 1px solid var(--border); border-radius: 16px; background: var(--card); }
.line .ph { width: 80px; height: 80px; flex-shrink: 0; }
.line .ph svg { width: 28px; height: 28px; }
.line .info { flex: 1 1 200px; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.line .qty { height: 42px; }
.line .qty button { width: 40px; height: 40px; font-size: 18px; }
.link-danger { align-self: flex-start; border: 0; background: transparent; color: var(--danger); font-size: 13px; font-weight: 600; padding: 4px 0; }
.opts { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px; }
.opt { text-align: left; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 16px; border-radius: 14px; border: 1px solid var(--border2); background: var(--card); color: var(--text); }
.opt[aria-pressed="true"] { border: 2px solid var(--primary); background: var(--primary-soft); }
.opt .t { display: flex; flex-direction: column; gap: 2px; }
.opt .t b { font-size: 15px; }
.opt .t span { font-size: 13px; color: var(--muted); }
.opt .p { font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: 19px; }
.summary { flex: 1 1 320px; max-width: 420px; position: sticky; top: 96px; }
.sum { margin: 0; display: flex; flex-direction: column; gap: 10px; font-size: 15px; }
.sum div { display: flex; justify-content: space-between; gap: 10px; }
.sum dt { color: var(--muted); }
.sum dd { margin: 0; font-weight: 600; text-align: right; }
.sum .tot { border-top: 1px solid var(--border); padding-top: 12px; }
.sum .tot dt { color: var(--text); font-weight: 700; font-size: 18px; }
.sum .tot dd { font-family: 'Space Grotesk', sans-serif; font-size: 24px; font-weight: 700; }
.note { padding: 14px 16px; border-radius: 12px; background: var(--surface); font-size: 14px; line-height: 1.5; }
.ok-text { color: var(--ok); font-weight: 600; font-size: 13px; }
.err-text { color: var(--danger); font-weight: 600; font-size: 13px; }
@media (max-width: 860px) { .summary { position: static; max-width: none; } }

/* ---------- confirmación ---------- */
.done { max-width: 720px; margin: 0 auto; display: flex; flex-direction: column; gap: 18px; }
.done h1 { margin: 0; font-size: 34px; }
.pay-data { display: flex; flex-direction: column; gap: 10px; }
.pay-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px; border-radius: 12px; background: var(--surface); flex-wrap: wrap; }
.pay-row b { font-family: 'Space Grotesk', sans-serif; font-size: 18px; word-break: break-all; }

/* ---------- pie ---------- */
.foot { background: var(--dark); color: #D9D2DC; margin-top: 30px; }
.foot-in { padding: 36px 20px; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 28px; }
.foot a { color: #D9D2DC; }
.foot .logo { color: #FFFFFF; }
.foot .url { color: #FFB3CC; font-weight: 600; }
.foot-col { display: flex; flex-direction: column; gap: 8px; font-size: 14px; }
.foot-col b { color: #FFFFFF; }

/* ---------- avisos ---------- */
#toasts { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; z-index: 100; width: min(92vw, 420px); }
.toast { background: var(--dark); color: #FFFFFF; padding: 12px 16px; border-radius: 12px; font-size: 14px; font-weight: 500; box-shadow: 0 8px 30px rgba(0, 0, 0, .25); transition: opacity .4s, transform .4s; }
.toast.err { background: #9F1239; }
.toast.hide { opacity: 0; transform: translateY(8px); }
.loading { padding: 60px 0; text-align: center; color: var(--muted); }

/* =================== PANEL =================== */
.adm { display: flex; min-height: 100vh; background: var(--bg2); }
.side { width: 250px; flex-shrink: 0; background: var(--dark); color: #D9D2DC; padding: 22px 14px; display: flex; flex-direction: column; gap: 4px; position: sticky; top: 0; height: 100vh; }
.side .logo { color: #FFFFFF; font-size: 21px; padding: 0 10px 16px; }
.side a, .side button.nav { display: flex; align-items: center; gap: 10px; padding: 11px 12px; border-radius: 12px; color: #D9D2DC; text-decoration: none; font-size: 15px; border: 0; background: transparent; text-align: left; width: 100%; }
.side a[aria-current="page"] { background: #3A2A33; color: #FFFFFF; font-weight: 600; }
.side .pill { margin-left: auto; background: #FDE68A; color: #1B1620; font-size: 12px; font-weight: 700; border-radius: 999px; padding: 1px 8px; }
.side .bottom { margin-top: auto; display: flex; flex-direction: column; gap: 4px; }
.side .store-link { color: #FF9FC0; }
.adm-main { flex: 1; min-width: 0; padding: 26px; display: flex; flex-direction: column; gap: 18px; max-width: 1200px; }
.adm-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.adm-top h1 { margin: 0; font-size: 30px; }
.panel { background: var(--card); border-radius: 18px; padding: 20px; display: flex; flex-direction: column; gap: 14px; border: 1px solid var(--border); }
.panel h2 { margin: 0; font-size: 18px; font-family: Inter, sans-serif; letter-spacing: 0; }
.panel .help { font-size: 14px; color: var(--muted); margin: -8px 0 0; }
.cols { display: flex; flex-wrap: wrap; gap: 18px; align-items: flex-start; }
.cols > .panel { flex: 1 1 340px; min-width: 0; }
.cols > .panel.wide { flex: 2 1 440px; }
.mob-bar { display: none; }
.demo-banner { background: #FDE68A; color: #3B2A05; padding: 10px 16px; font-size: 14px; text-align: center; }
@media (max-width: 900px) {
  .adm { flex-direction: column; }
  .side { width: auto; height: auto; position: static; flex-direction: row; flex-wrap: wrap; padding: 10px; gap: 4px; }
  .side .logo { width: 100%; padding: 4px 10px 8px; }
  .side a, .side button.nav { width: auto; padding: 9px 12px; font-size: 14px; }
  .side .bottom { margin: 0; flex-direction: row; flex-wrap: wrap; }
  .adm-main { padding: 16px; }
}

.plist { display: flex; flex-direction: column; gap: 8px; }
.prow { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 14px; border: 1px solid var(--border); background: var(--card); flex-wrap: wrap; }
.prow .ph { width: 58px; height: 58px; flex-shrink: 0; border-radius: 10px; }
.prow .ph svg { width: 22px; height: 22px; }
.prow .tx { flex: 1 1 200px; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.prow .tx b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.prow .meta { font-size: 13px; color: var(--muted); display: flex; gap: 10px; flex-wrap: wrap; }
.prow .acts { display: flex; gap: 6px; flex-wrap: wrap; }

.photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.ptile { display: flex; flex-direction: column; gap: 6px; border: 1px solid var(--border); border-radius: 14px; padding: 7px; background: var(--card); cursor: grab; user-select: none; touch-action: pan-y; }
.ptile.first { border: 2px solid var(--primary); }
.ptile.dragging { opacity: .45; }
.ptile.over { outline: 3px dashed var(--primary); outline-offset: 2px; }
.ptile .ph { cursor: grab; }
.ptile .pos { position: absolute; top: 6px; left: 6px; font-size: 12px; font-weight: 700; background: var(--card); color: var(--text); border-radius: 6px; padding: 2px 7px; }
.ptile .thumb-tag { position: absolute; bottom: 6px; left: 6px; right: 6px; text-align: center; font-size: 12px; font-weight: 700; background: var(--primary); color: var(--on-primary); border-radius: 6px; padding: 4px; }
.ptile .tb { display: flex; gap: 4px; }
.ptile .tb button { flex: 1; height: 36px; border-radius: 8px; border: 1px solid var(--border); background: var(--card); color: var(--text); display: flex; align-items: center; justify-content: center; }
.ptile .tb button svg { width: 16px; height: 16px; }
.ptile .tb .del { color: var(--danger); }
.ptile .tb .star { color: var(--primary); }
.drop { aspect-ratio: 1 / 1.2; border-radius: 14px; border: 2px dashed var(--border2); background: var(--bg2); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; font-weight: 600; color: var(--primary); text-align: center; padding: 10px; }
.drop.over { border-color: var(--primary); background: var(--primary-soft); }
.drop svg { width: 28px; height: 28px; }

.switch { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 46px; border: 1px solid var(--border2); border-radius: 12px; padding: 0 14px; background: var(--card); font-size: 15px; color: var(--text); width: 100%; text-align: left; }
.switch .tr { width: 44px; height: 26px; border-radius: 999px; background: #C7BFCB; display: flex; align-items: center; padding: 3px; flex-shrink: 0; transition: background .15s; }
.switch .tr i { width: 20px; height: 20px; border-radius: 999px; background: #FFFFFF; transition: transform .15s; }
.switch[aria-checked="true"] .tr { background: var(--primary); }
.switch[aria-checked="true"] .tr i { transform: translateX(18px); }
.seg { display: flex; flex-direction: column; gap: 6px; }
.seg button { text-align: left; display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--border2); background: var(--card); color: var(--text); }
.seg button b { font-size: 14px; }
.seg button span { font-size: 12px; color: var(--muted); }
.seg button[aria-checked="true"] { border: 2px solid var(--primary); background: var(--primary-soft); }
.tiers { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.tier { text-align: left; display: flex; flex-direction: column; gap: 8px; padding: 14px; border-radius: 14px; border: 1px solid var(--border2); background: var(--card); color: var(--text); }
.tier[aria-checked="true"] { border: 2px solid var(--primary); background: var(--primary-soft); }
.tier b { font-size: 15px; }
.tier .l { display: flex; justify-content: space-between; font-size: 14px; }
.tier .o { color: #B91C1C; font-weight: 600; }
.tier .c { color: #1E40AF; font-weight: 600; }
[data-theme="dark"] .tier .o { color: #FCA5A5; } [data-theme="dark"] .tier .c { color: #93C5FD; }
.spec-row { display: flex; gap: 8px; align-items: center; }
.spec-row input { flex: 1 1 0; min-width: 0; }
.spec-row .icon-btn { border-radius: 10px; color: var(--danger); }

.tabs { display: flex; flex-wrap: wrap; gap: 8px; }
.tabs button { min-height: 40px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--border2); background: var(--card); color: var(--text); font-size: 14px; font-weight: 600; }
.tabs button[aria-selected="true"] { background: var(--text); color: var(--bg); border-color: var(--text); }
.table-box { background: var(--card); border: 1px solid var(--border); border-radius: 18px; overflow-x: auto; }
table.tbl { width: 100%; min-width: 820px; border-collapse: collapse; font-size: 14px; }
.tbl th { text-align: left; color: var(--muted); font-weight: 600; padding: 13px 14px; border-bottom: 1px solid var(--border); }
.tbl td { padding: 12px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.tbl tr.open td { background: var(--bg2); }
.st { min-height: 34px; padding: 0 12px; border-radius: 999px; border: 0; font-size: 13px; font-weight: 700; white-space: nowrap; }
.st-pend { background: #FDE68A; color: #713F12; }
.st-paid { background: #DBEAFE; color: #1E3A8A; }
.st-sent { background: #EDE9FE; color: #5B21B6; }
.st-done { background: #DCFCE7; color: #166534; }
.st-cancel { background: #E5E7EB; color: #374151; }
.odetail { display: flex; flex-wrap: wrap; gap: 20px; padding: 6px 0; }
.odetail > div { flex: 1 1 260px; display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.odetail pre { margin: 0; font: inherit; white-space: pre-wrap; background: var(--card); border: 1px solid var(--border); border-radius: 10px; padding: 10px; }

.login { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px; background: var(--primary-soft); }
.login form { width: min(100%, 400px); background: var(--card); border-radius: 22px; padding: 28px; display: flex; flex-direction: column; gap: 14px; box-shadow: var(--shadow); }
.login h1 { margin: 0; font-size: 28px; }
/* móvil: 2 columnas, como en el navegador del PC */
@media (max-width: 600px) {
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .card { padding: 8px; gap: 6px; border-radius: 14px; }
  .card .nm { font-size: 14px; }
  .card .add { min-height: 38px; font-size: 13px; padding: 0 8px; }
  .badges .b { font-size: 11px; padding: 3px 6px; }
  .sec-h h2 { font-size: 22px; }
  .best-grid { grid-template-columns: 1fr; }
}
