@layer reset, tokens, base, components, utilities;

@layer reset {
  *, *::before, *::after { box-sizing: border-box; }
  html { scroll-behavior: smooth; }
  body, h1, h2, h3, p { margin: 0; }
  img { max-width: 100%; display: block; }
  button, input { font: inherit; }
  a { color: inherit; text-decoration: none; }
}

@layer tokens {
  :root {
    --bg: #f5f7fb;
    --surface: #ffffff;
    --surface-soft: #eef2f8;
    --ink: #0b1424;
    --muted: #697386;
    --line: #dfe5ef;
    --brand: #1463ff;
    --brand-2: #53a1ff;
    --brand-dark: #0a234a;
    --success: #21a667;
    --shadow: 0 18px 50px rgb(15 28 53 / 8%);
    --radius-sm: 12px;
    --radius-md: 20px;
    --radius-lg: 30px;
    --page: min(1180px, calc(100% - 32px));
  }
}

@layer base {
  body {
    min-width: 320px;
    background: var(--bg);
    color: var(--ink);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.5;
    text-rendering: optimizeLegibility;
  }

  [x-cloak] { display: none !important; }

  :focus-visible {
    outline: 3px solid color-mix(in srgb, var(--brand) 35%, transparent);
    outline-offset: 3px;
    border-radius: 6px;
  }

  .skip-link {
    position: absolute;
    left: 12px;
    top: -60px;
    z-index: 1000;
    background: var(--ink);
    color: white;
    padding: 10px 14px;
    border-radius: 10px;
  }

  .skip-link:focus { top: 12px; }

  .sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }
}

@layer components {
  .site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgb(255 255 255 / 88%);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid rgb(223 229 239 / 75%);
  }

  .header-shell,
  .footer-shell,
  .hero-shell,
  .section,
  .catalog-hero > div {
    width: var(--page);
    margin-inline: auto;
  }

  .header-shell {
    min-height: 72px;
    display: flex;
    align-items: center;
    gap: 32px;
  }

  .brand {
    display: inline-flex;
    align-items: center;
    gap: 11px;
    flex: 0 0 auto;
  }

  .brand-mark {
    width: 38px;
    height: 38px;
    border-radius: 11px;
    display: grid;
    place-items: center;
    background: linear-gradient(145deg, var(--brand), #083caa);
    color: #fff;
    font-weight: 800;
    box-shadow: 0 8px 22px rgb(20 99 255 / 25%);
  }

  .brand-copy { display: grid; line-height: 1.05; }
  .brand-copy strong { font-size: 1.15rem; letter-spacing: -.03em; }
  .brand-copy small { margin-top: 4px; color: var(--muted); font-size: .67rem; }

  .desktop-nav {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
  }

  .desktop-nav a,
  .account-link {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    padding: 0 13px;
    border-radius: 10px;
    color: #374151;
    font-size: .9rem;
    font-weight: 650;
  }

  .desktop-nav a:hover,
  .account-link:hover { background: var(--surface-soft); color: var(--ink); }

  .header-actions { display: flex; align-items: center; gap: 8px; }

  .menu-button {
    width: 44px;
    height: 44px;
    display: none;
    place-content: center;
    gap: 4px;
    border: 0;
    border-radius: 11px;
    background: var(--surface-soft);
    cursor: pointer;
  }

  .menu-button span:not(.sr-only) {
    width: 20px;
    height: 2px;
    background: var(--ink);
    border-radius: 2px;
  }

  .mobile-nav {
    width: var(--page);
    margin: 0 auto 14px;
    padding: 8px;
    background: white;
    border: 1px solid var(--line);
    border-radius: 16px;
    box-shadow: var(--shadow);
  }

  .mobile-nav a { display: block; padding: 13px 14px; border-radius: 10px; font-weight: 650; }
  .mobile-nav a:hover { background: var(--surface-soft); }

  .hero {
    padding: clamp(34px, 6vw, 82px) 0;
    background:
      radial-gradient(circle at 76% 26%, rgb(59 130 246 / 24%), transparent 31%),
      radial-gradient(circle at 18% 100%, rgb(36 99 235 / 16%), transparent 28%),
      #081120;
    color: #fff;
    overflow: clip;
  }

  .hero-shell {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(300px, .75fr);
    align-items: center;
    gap: clamp(34px, 6vw, 88px);
  }

  .eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--brand);
    font-size: .78rem;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
  }

  .hero .eyebrow { color: #82b5ff; }

  .hero h1,
  .catalog-hero h1 {
    max-width: 860px;
    margin-top: 16px;
    font-size: clamp(2.35rem, 6vw, 5.5rem);
    line-height: .97;
    letter-spacing: -.065em;
    text-wrap: balance;
  }

  .hero h1 span {
    color: transparent;
    background: linear-gradient(90deg, #7db2ff, #d7e8ff);
    -webkit-background-clip: text;
    background-clip: text;
  }

  .hero-copy > p {
    max-width: 660px;
    margin-top: 24px;
    color: #bac6d8;
    font-size: clamp(1rem, 1.5vw, 1.14rem);
  }

  .hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }

  .button {
    min-height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 20px;
    border-radius: 13px;
    font-weight: 780;
    transition: transform .2s ease, background .2s ease, border-color .2s ease;
  }

  .button:hover { transform: translateY(-2px); }
  .button-primary { background: var(--brand); color: white; }
  .button-primary:hover { background: #0f56dc; }
  .button-ghost { border: 1px solid rgb(255 255 255 / 20%); background: rgb(255 255 255 / 7%); color: white; }
  .button-light { background: white; color: var(--ink); }

  .trust-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 20px;
    margin-top: 32px;
    color: #9fb0c8;
    font-size: .84rem;
  }

  .trust-row span::before { content: "✓"; color: #63d79a; margin-right: 7px; font-weight: 900; }

  .hero-panel {
    padding: clamp(24px, 4vw, 38px);
    border: 1px solid rgb(255 255 255 / 12%);
    border-radius: var(--radius-lg);
    background: rgb(255 255 255 / 7%);
    backdrop-filter: blur(18px);
    box-shadow: 0 30px 90px rgb(0 0 0 / 20%);
  }

  .hero-panel h2 { margin-top: 20px; font-size: clamp(1.5rem, 2.4vw, 2.1rem); letter-spacing: -.04em; }
  .hero-panel p { margin-top: 10px; color: #aab9ce; }

  .status-dot {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: .8rem;
    font-weight: 750;
    color: #bcebd2;
  }

  .status-dot::before {
    content: "";
    width: 8px;
    height: 8px;
    background: #3ecf8e;
    border-radius: 50%;
    box-shadow: 0 0 0 5px rgb(62 207 142 / 12%);
  }

  .smart-search-card {
    margin-top: 24px;
    min-height: 60px;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    border: 1px solid rgb(255 255 255 / 13%);
    border-radius: 15px;
    background: rgb(255 255 255 / 8%);
  }

  .smart-search-card span { color: #b8c5d8; font-size: .9rem; }
  .smart-search-card strong { white-space: nowrap; }

  .section { padding-block: clamp(54px, 7vw, 92px); }

  .section-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 28px;
  }

  .section-heading h2,
  .support-banner h2 {
    margin-top: 8px;
    font-size: clamp(1.8rem, 3.5vw, 3rem);
    line-height: 1.05;
    letter-spacing: -.05em;
  }

  .text-link { color: var(--brand); font-weight: 750; white-space: nowrap; }

  .product-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
  }

  .product-card {
    min-width: 0;
    overflow: hidden;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    transition: transform .22s ease, border-color .22s ease, box-shadow .22s ease;
  }

  @media (hover:hover) and (pointer:fine) {
    .product-card:hover {
      transform: translateY(-4px);
      border-color: #c9d4e6;
      box-shadow: var(--shadow);
    }
  }

  .product-image {
    position: relative;
    aspect-ratio: 4 / 3;
    display: grid;
    place-items: center;
    background: linear-gradient(160deg, #f9fbff, #edf3fb);
    overflow: hidden;
  }

  .product-image img { width: 100%; height: 100%; object-fit: contain; padding: 20px; }
  .product-placeholder { font-size: 3rem; font-weight: 900; color: #acc0df; }

  .product-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 6px 9px;
    border-radius: 999px;
    background: #0d1a2e;
    color: #fff;
    font-size: .68rem;
    font-weight: 800;
  }

  .product-body { padding: 17px; }
  .product-meta { display: flex; justify-content: space-between; gap: 8px; color: var(--muted); font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
  .product-body h3 { margin-top: 8px; font-size: 1.02rem; line-height: 1.28; letter-spacing: -.02em; }
  .product-body > p { margin-top: 8px; color: var(--muted); font-size: .84rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

  .product-bottom {
    margin-top: 18px;
    padding-top: 15px;
    border-top: 1px solid var(--line);
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 12px;
  }

  .price { display: grid; }
  .price del { color: #9aa4b3; font-size: .74rem; }
  .price strong { font-size: 1.16rem; letter-spacing: -.03em; }
  .product-arrow { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 11px; background: var(--surface-soft); font-weight: 900; }

  .value-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
    padding-block: 0;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--line);
  }

  .value-grid article { padding: clamp(24px, 4vw, 40px); background: var(--surface); }
  .value-number { color: var(--brand); font-size: .74rem; font-weight: 900; }
  .value-grid h3 { margin-top: 38px; font-size: 1.3rem; letter-spacing: -.03em; }
  .value-grid p { margin-top: 8px; color: var(--muted); font-size: .92rem; }

  .support-banner {
    margin-top: clamp(54px, 7vw, 92px);
    margin-bottom: clamp(54px, 7vw, 92px);
    padding: clamp(28px, 5vw, 54px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
    border-radius: var(--radius-lg);
    background:
      radial-gradient(circle at 85% 20%, rgb(69 131 255 / 45%), transparent 24%),
      var(--brand-dark);
    color: white;
  }

  .support-banner .eyebrow { color: #91bdff; }
  .support-banner p { margin-top: 10px; color: #c2cede; }

  .catalog-hero { padding: clamp(48px, 8vw, 88px) 0 46px; background: #081120; color: white; }
  .catalog-hero h1 { font-size: clamp(2.2rem, 5vw, 4.6rem); }
  .catalog-hero p { max-width: 620px; margin-top: 16px; color: #aebbd0; }

  .catalog-layout { display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: 32px; align-items: start; }

  .catalog-sidebar {
    position: sticky;
    top: 96px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 17px;
    background: var(--surface);
  }

  .catalog-sidebar h2 { font-size: .82rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }

  .filter-stack { display: grid; gap: 5px; margin-top: 12px; }
  .filter-stack a { padding: 10px 11px; border-radius: 9px; font-size: .9rem; font-weight: 650; }
  .filter-stack a:hover, .filter-stack a.is-active { background: var(--surface-soft); color: var(--brand); }

  .catalog-search { margin-bottom: 22px; }
  .catalog-search > label { display: block; margin-bottom: 8px; font-size: .8rem; font-weight: 750; color: var(--muted); }
  .search-field {
    min-height: 54px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 16px;
    border: 1px solid var(--line);
    border-radius: 15px;
    background: var(--surface);
  }

  .search-field:focus-within { border-color: color-mix(in srgb, var(--brand) 55%, var(--line)); box-shadow: 0 0 0 4px rgb(20 99 255 / 8%); }
  .search-field svg { width: 20px; height: 20px; fill: none; stroke: var(--muted); stroke-width: 1.8; }
  .search-field input[type="search"] { width: 100%; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 1rem; }
  .search-status { display: inline-block; margin-top: 8px; color: var(--muted); font-size: .76rem; }

  .htmx-indicator { opacity: 0; transition: opacity .15s ease; }
  .htmx-request .htmx-indicator, .htmx-request.htmx-indicator { opacity: 1; }

  .empty-state {
    grid-column: 1 / -1;
    padding: 60px 24px;
    text-align: center;
    border: 1px dashed #cbd5e1;
    border-radius: 18px;
    background: var(--surface);
  }

  .empty-icon { display: inline-grid; width: 52px; height: 52px; place-items: center; border-radius: 50%; background: var(--surface-soft); font-size: 1.7rem; }
  .empty-state h3 { margin-top: 14px; }
  .empty-state p { margin-top: 6px; color: var(--muted); }

  .site-footer { padding: 42px 0; background: #07101e; color: #d7deea; }
  .footer-shell { display: grid; grid-template-columns: 1.3fr 1fr auto; gap: 40px; align-items: start; }
  .footer-brand { font-size: 1.25rem; }
  .footer-shell p { max-width: 390px; margin-top: 8px; color: #8899b2; font-size: .88rem; }
  .footer-links { display: grid; gap: 8px; font-size: .87rem; }
  .footer-contact { display: grid; justify-items: end; gap: 8px; color: #8fa0b7; font-size: .82rem; }
  .footer-contact a { color: white; font-weight: 800; }

  @container (max-width: 560px) {
    .product-card { border-radius: 16px; }
  }
}

@layer utilities {
  @media (max-width: 980px) {
    .desktop-nav { display: none; }
    .menu-button { display: grid; }
    .account-link { display: none; }
    .header-shell { min-height: 66px; }
    .hero-shell { grid-template-columns: 1fr; }
    .hero-panel { max-width: 620px; }
    .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .catalog-layout { grid-template-columns: 1fr; }
    .catalog-sidebar { position: static; }
    .filter-stack { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .filter-stack a { text-align: center; }
    .footer-shell { grid-template-columns: 1fr 1fr; }
    .footer-contact { grid-column: 1 / -1; justify-items: start; }
  }

  @media (max-width: 620px) {
    :root { --page: min(100% - 22px, 1180px); }
    .brand-copy small { display: none; }
    .hero { padding-top: 42px; }
    .hero h1 { font-size: clamp(2.55rem, 13vw, 4rem); }
    .section-heading { align-items: start; flex-direction: column; }
    .product-grid { grid-template-columns: 1fr; }
    .value-grid { grid-template-columns: 1fr; }
    .support-banner { flex-direction: column; align-items: stretch; }
    .filter-stack { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .footer-shell { grid-template-columns: 1fr; }
    .footer-contact { grid-column: auto; }
  }

  @media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
      scroll-behavior: auto !important;
      transition-duration: .001ms !important;
      animation-duration: .001ms !important;
      animation-iteration-count: 1 !important;
    }
  }
}

@layer components {
  .cart-link {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 0 10px;
    border-radius: 10px;
    color: #374151;
    font-size: .88rem;
    font-weight: 700;
  }
  .cart-link:hover { background: var(--surface-soft); color: var(--ink); }
  .cart-link b {
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    display: inline-grid;
    place-items: center;
    border-radius: 999px;
    background: var(--ink);
    color: white;
    font-size: .7rem;
  }

  .product-detail {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(340px, .9fr);
    gap: clamp(30px, 6vw, 76px);
    align-items: start;
  }
  .product-detail-media {
    min-height: 460px;
    display: grid;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: linear-gradient(155deg, #fff, #edf3fb);
    overflow: hidden;
  }
  .product-detail-media img { width: 100%; max-height: 560px; object-fit: contain; padding: clamp(26px, 5vw, 60px); }
  .product-detail-placeholder { font-size: clamp(5rem, 15vw, 10rem); font-weight: 900; color: #b8c9e3; }
  .product-detail-copy { padding-top: 14px; }
  .product-detail-copy h1 { margin-top: 12px; font-size: clamp(2rem, 4.6vw, 4.1rem); line-height: 1; letter-spacing: -.055em; }
  .product-lead { margin-top: 18px; color: var(--muted); font-size: 1.02rem; }
  .detail-price { display: grid; margin-top: 28px; }
  .detail-price del { color: #9aa4b3; font-size: .9rem; }
  .detail-price strong { font-size: 2rem; letter-spacing: -.04em; }
  .detail-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 24px; }
  .detail-facts span { padding: 13px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); font-size: .82rem; color: var(--muted); }
  .detail-facts b { display: block; margin-bottom: 3px; color: var(--ink); font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; }
  .purchase-button { width: 100%; margin-top: 20px; }
  .cart-feedback { min-height: 34px; margin-top: 10px; }
  .cart-success { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; border-radius: 10px; background: #eaf8f1; color: #136b44; font-size: .84rem; font-weight: 700; }
  .cart-success a { text-decoration: underline; }
  .product-description { margin-top: 24px; padding-top: 22px; border-top: 1px solid var(--line); color: #505c6d; font-size: .92rem; line-height: 1.75; }

  .cart-layout { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 26px; align-items: start; }
  .cart-list { display: grid; gap: 10px; }
  .cart-item { min-width: 0; display: grid; grid-template-columns: 82px minmax(0, 1fr) auto auto; gap: 16px; align-items: center; padding: 14px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
  .cart-item-media { width: 82px; aspect-ratio: 1; display: grid; place-items: center; overflow: hidden; border-radius: 12px; background: var(--surface-soft); font-weight: 900; color: #9fb4d3; font-size: 1.7rem; }
  .cart-item-media img { width: 100%; height: 100%; object-fit: contain; padding: 8px; }
  .cart-item-copy { min-width: 0; }
  .cart-item-copy > span { color: var(--muted); font-size: .68rem; font-weight: 800; text-transform: uppercase; }
  .cart-item-copy h3 { margin-top: 4px; font-size: .98rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .cart-item-copy small { color: var(--muted); }
  .cart-remove { min-height: 40px; padding: 0 12px; border: 0; border-radius: 9px; background: #fff1f1; color: #b42318; font-weight: 750; cursor: pointer; }
  .cart-summary { position: sticky; top: 96px; padding: 24px; border: 1px solid var(--line); border-radius: 20px; background: var(--surface); box-shadow: var(--shadow); }
  .cart-total-row { display: flex; justify-content: space-between; gap: 16px; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
  .cart-grand-total strong { font-size: 1.45rem; }
  .checkout-button { width: 100%; margin-top: 22px; }
  .cart-summary p { margin-top: 12px; color: var(--muted); font-size: .78rem; text-align: center; }
  .empty-action { margin-top: 18px; }
  .inline-error { grid-column: 1 / -1; padding: 10px 12px; border-radius: 10px; background: #fff1f1; color: #b42318; font-size: .84rem; }
}

@layer utilities {
  @media (max-width: 900px) {
    .product-detail { grid-template-columns: 1fr; }
    .product-detail-media { min-height: 340px; }
    .cart-layout { grid-template-columns: 1fr; }
    .cart-summary { position: static; }
  }
  @media (max-width: 620px) {
    .cart-link span { display: none; }
    .detail-facts { grid-template-columns: 1fr; }
    .cart-item { grid-template-columns: 64px minmax(0, 1fr) auto; }
    .cart-item-media { width: 64px; }
    .cart-item > strong { grid-column: 2; }
    .cart-remove { grid-column: 3; grid-row: 1 / span 2; }
  }
}

@layer components {
  .auth-shell {
    width: var(--page);
    margin-inline: auto;
    padding: clamp(48px, 8vw, 96px) 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(340px, 480px);
    gap: clamp(40px, 8vw, 110px);
    align-items: center;
  }
  .auth-copy h1 {
    margin-top: 14px;
    max-width: 700px;
    font-size: clamp(2.5rem, 5.5vw, 5rem);
    line-height: .98;
    letter-spacing: -.06em;
  }
  .auth-copy > p {
    max-width: 560px;
    margin-top: 18px;
    color: var(--muted);
    font-size: 1.02rem;
  }
  .auth-benefits {
    margin-top: 28px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
  }
  .auth-benefits span {
    padding: 8px 11px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--surface);
    color: #435066;
    font-size: .78rem;
    font-weight: 700;
  }
  .auth-card {
    padding: clamp(24px, 4vw, 36px);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--surface);
    box-shadow: var(--shadow);
  }
  .auth-card-head h2 { font-size: 1.55rem; letter-spacing: -.04em; }
  .auth-card-head p { margin-top: 6px; color: var(--muted); font-size: .88rem; }
  .auth-form { display: grid; gap: 15px; margin-top: 24px; }
  .auth-form label { display: grid; gap: 7px; }
  .auth-form label > span { color: #3f4a5c; font-size: .78rem; font-weight: 750; }
  .auth-form input {
    width: 100%;
    min-height: 49px;
    padding: 0 13px;
    border: 1px solid var(--line);
    border-radius: 11px;
    background: #fff;
    color: var(--ink);
    font-size: 1rem;
    outline: none;
  }
  .auth-form input:focus {
    border-color: color-mix(in srgb, var(--brand) 55%, var(--line));
    box-shadow: 0 0 0 4px rgb(20 99 255 / 8%);
  }
  .auth-form .button { width: 100%; border: 0; cursor: pointer; margin-top: 3px; }
  .form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .field-help { color: var(--muted); font-size: .75rem; }
  .auth-switch { margin-top: 20px; color: var(--muted); text-align: center; font-size: .84rem; }
  .auth-switch a { color: var(--brand); font-weight: 800; }

  .flash { margin: 16px 0; padding: 11px 13px; border-radius: 10px; font-size: .84rem; font-weight: 650; }
  .flash-error { background: #fff1f1; color: #a8261d; border: 1px solid #ffd2cf; }
  .flash-info { background: #eef5ff; color: #245a9f; border: 1px solid #d5e5ff; }
  .flash-success { background: #eaf8f1; color: #136b44; border: 1px solid #c7eedb; }

  .account-hero {
    padding: 48px 0;
    background: #081120;
    color: white;
  }
  .account-hero-inner {
    width: var(--page);
    margin-inline: auto;
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 24px;
  }
  .account-hero h1 { margin-top: 9px; font-size: clamp(2.2rem, 5vw, 4.4rem); letter-spacing: -.06em; line-height: 1; }
  .account-hero p { margin-top: 11px; color: #aebbd0; }
  .button-ghost-dark {
    border: 1px solid rgb(255 255 255 / 18%);
    background: rgb(255 255 255 / 8%);
    color: white;
    cursor: pointer;
  }
  .account-layout {
    display: grid;
    grid-template-columns: 240px minmax(0, 1fr);
    gap: 28px;
    align-items: start;
  }
  .account-sidebar {
    position: sticky;
    top: 96px;
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: var(--surface);
  }
  .account-avatar {
    width: 52px;
    height: 52px;
    display: grid;
    place-items: center;
    border-radius: 15px;
    background: var(--ink);
    color: white;
    font-size: 1.25rem;
    font-weight: 900;
  }
  .account-sidebar > strong { display: block; margin-top: 14px; }
  .account-sidebar > span { display: block; margin-top: 3px; color: var(--muted); font-size: .78rem; overflow-wrap: anywhere; }
  .account-sidebar nav { display: grid; gap: 4px; margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--line); }
  .account-sidebar nav a { padding: 10px; border-radius: 9px; font-size: .85rem; font-weight: 700; }
  .account-sidebar nav a:hover, .account-sidebar nav a.is-active { background: var(--surface-soft); color: var(--brand); }

  .account-stats {
    display: grid;
    grid-template-columns: .7fr 1.4fr 1fr;
    gap: 12px;
  }
  .account-stats article {
    min-width: 0;
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: var(--surface);
  }
  .account-stats span { display: block; color: var(--muted); font-size: .72rem; font-weight: 750; text-transform: uppercase; letter-spacing: .06em; }
  .account-stats strong { display: block; margin-top: 8px; font-size: 1.8rem; letter-spacing: -.04em; }
  .account-stats .stat-text { font-size: .9rem; overflow-wrap: anywhere; letter-spacing: 0; }
  .account-stats a { display: inline-block; margin-top: 10px; color: var(--brand); font-size: .86rem; font-weight: 800; }
  .account-section { margin-top: 34px; }
  .section-heading.compact { margin-bottom: 18px; }
  .section-heading.compact h2 { font-size: 1.8rem; }
  .order-list { display: grid; gap: 8px; }
  .order-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 18px;
    align-items: center;
    padding: 16px 18px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--surface);
  }
  .order-row > div { min-width: 0; }
  .order-number { display: block; font-weight: 800; font-size: .9rem; }
  .order-row small { color: var(--muted); font-size: .73rem; }
  .order-status { padding: 6px 9px; border-radius: 999px; font-size: .69rem; font-weight: 800; white-space: nowrap; }
  .status-pending { background: #fff6df; color: #8c5a00; }
  .status-paid { background: #eaf2ff; color: #245a9f; }
  .status-processing { background: #f2edff; color: #6840aa; }
  .status-delivered { background: #eaf8f1; color: #136b44; }
  .status-cancelled { background: #fff1f1; color: #a8261d; }
}

@layer utilities {
  @media (max-width: 900px) {
    .auth-shell { grid-template-columns: 1fr; }
    .auth-copy { max-width: 720px; }
    .auth-card { max-width: 620px; width: 100%; }
    .account-layout { grid-template-columns: 1fr; }
    .account-sidebar { position: static; }
    .account-stats { grid-template-columns: 1fr 1fr; }
    .account-stats article:last-child { grid-column: 1 / -1; }
  }
  @media (max-width: 620px) {
    .form-grid { grid-template-columns: 1fr; }
    .account-hero-inner { align-items: start; flex-direction: column; }
    .account-stats { grid-template-columns: 1fr; }
    .account-stats article:last-child { grid-column: auto; }
    .order-row { grid-template-columns: minmax(0, 1fr) auto; }
    .order-status { grid-column: 1; width: max-content; }
    .order-row > strong { grid-column: 2; grid-row: 1 / span 2; }
  }
}

@layer components {
  .checkout-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 28px;
    align-items: start;
  }
  .checkout-form { display: grid; gap: 16px; }
  .checkout-card {
    padding: clamp(20px, 4vw, 30px);
    border: 1px solid var(--line);
    border-radius: 20px;
    background: var(--surface);
  }
  .checkout-step { display: flex; gap: 14px; align-items: start; }
  .checkout-step > span {
    width: 32px; height: 32px; flex: 0 0 32px;
    display: grid; place-items: center;
    border-radius: 10px; background: var(--ink); color: white;
    font-size: .78rem; font-weight: 900;
  }
  .checkout-step h2 { font-size: 1.15rem; letter-spacing: -.03em; }
  .checkout-step p { margin-top: 3px; color: var(--muted); font-size: .82rem; }
  .checkout-fields { display: grid; gap: 14px; margin-top: 22px; }
  .checkout-fields label { display: grid; gap: 7px; }
  .checkout-fields label > span { color: #3f4a5c; font-size: .77rem; font-weight: 750; }
  .checkout-fields input {
    width: 100%; min-height: 50px; padding: 0 13px;
    border: 1px solid var(--line); border-radius: 11px; outline: none;
    background: #fff; color: var(--ink); font-size: 1rem;
  }
  .checkout-fields input:focus { border-color: var(--brand); box-shadow: 0 0 0 4px rgb(20 99 255 / 8%); }
  .payment-options { display: grid; gap: 10px; margin-top: 22px; }
  .payment-option {
    position: relative; display: grid;
    grid-template-columns: 22px minmax(0,1fr) auto;
    gap: 12px; align-items: center;
    padding: 16px; border: 1px solid var(--line); border-radius: 14px;
    background: #fff; cursor: pointer;
  }
  .payment-option.is-selected { border-color: color-mix(in srgb, var(--brand) 65%, white); box-shadow: 0 0 0 3px rgb(20 99 255 / 7%); }
  .payment-option input { position: absolute; opacity: 0; pointer-events: none; }
  .payment-radio { width: 20px; height: 20px; border: 2px solid #b5c0d1; border-radius: 50%; position: relative; }
  .payment-option.is-selected .payment-radio { border-color: var(--brand); }
  .payment-option.is-selected .payment-radio::after {
    content:""; position:absolute; inset:4px; border-radius:50%; background:var(--brand);
  }
  .payment-copy { display:grid; min-width:0; }
  .payment-copy strong { font-size:.92rem; }
  .payment-copy small { margin-top:2px; color:var(--muted); font-size:.76rem; }
  .payment-tag { padding:5px 8px; border-radius:999px; background:#eaf2ff; color:#245a9f; font-size:.65rem; font-weight:850; }
  .checkout-submit { width:100%; border:0; cursor:pointer; }
  .checkout-security { color:var(--muted); font-size:.74rem; text-align:center; }
  .checkout-summary {
    position:sticky; top:96px; padding:22px;
    border:1px solid var(--line); border-radius:20px; background:var(--surface); box-shadow:var(--shadow);
  }
  .checkout-items { display:grid; gap:14px; margin-top:18px; }
  .checkout-items article { display:grid; grid-template-columns:50px minmax(0,1fr) auto; gap:11px; align-items:center; }
  .checkout-item-media { position:relative; width:50px; aspect-ratio:1; display:grid; place-items:center; border-radius:10px; background:var(--surface-soft); color:#9fb4d3; font-weight:900; overflow:visible; }
  .checkout-item-media img { width:100%; height:100%; object-fit:contain; padding:5px; }
  .checkout-item-media b { position:absolute; right:-6px; top:-6px; min-width:19px; height:19px; padding:0 5px; display:grid; place-items:center; border-radius:999px; background:var(--ink); color:white; font-size:.6rem; }
  .checkout-items article > div:nth-child(2) { min-width:0; }
  .checkout-items article strong { display:block; font-size:.78rem; line-height:1.2; }
  .checkout-items article small { color:var(--muted); font-size:.68rem; }
  .checkout-items article > span { white-space:nowrap; font-size:.78rem; font-weight:800; }
  .checkout-total { display:flex; justify-content:space-between; align-items:end; gap:14px; margin-top:20px; padding-top:18px; border-top:1px solid var(--line); }
  .checkout-total span { color:var(--muted); font-size:.8rem; }
  .checkout-total strong { font-size:1.5rem; letter-spacing:-.04em; }
  .checkout-summary > p { margin-top:6px; color:var(--muted); font-size:.68rem; }

  .result-shell { width:var(--page); margin-inline:auto; padding:clamp(50px,8vw,100px) 0; }
  .result-card {
    max-width:780px; margin-inline:auto; padding:clamp(28px,5vw,52px);
    border:1px solid var(--line); border-radius:var(--radius-lg); background:var(--surface); box-shadow:var(--shadow);
  }
  .result-icon { width:56px; height:56px; display:grid; place-items:center; margin-bottom:22px; border-radius:17px; font-size:1.5rem; font-weight:900; }
  .result-success { background:#eaf8f1; color:#136b44; }
  .result-pending { background:#fff6df; color:#8c5a00; }
  .result-error { background:#fff1f1; color:#a8261d; }
  .result-card h1 { margin-top:10px; font-size:clamp(2rem,5vw,4rem); line-height:1; letter-spacing:-.055em; }
  .result-card > p { margin-top:14px; max-width:650px; color:var(--muted); }
  .result-order { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:1px; margin-top:28px; overflow:hidden; border:1px solid var(--line); border-radius:14px; background:var(--line); }
  .result-order > div { padding:15px; background:#fff; }
  .result-order span { display:block; color:var(--muted); font-size:.68rem; text-transform:uppercase; letter-spacing:.06em; font-weight:800; }
  .result-order strong { display:block; margin-top:5px; font-size:.9rem; overflow-wrap:anywhere; }
  .result-actions { display:flex; flex-wrap:wrap; gap:10px; margin-top:26px; }
  .button-secondary { background:var(--surface-soft); color:var(--ink); }
  .button-whatsapp { background:#eaf8f1; color:#136b44; }
  .plin-box { display:grid; grid-template-columns:180px minmax(0,1fr); gap:24px; align-items:center; margin-top:26px; padding:20px; border:1px solid var(--line); border-radius:18px; background:var(--surface-soft); }
  .plin-box img { width:180px; border-radius:14px; background:white; }
  .plin-box > div { display:grid; gap:5px; }
  .plin-box span { margin-top:8px; color:var(--muted); font-size:.72rem; text-transform:uppercase; letter-spacing:.06em; font-weight:800; }
  .plin-box strong { font-size:1.15rem; }
}
@layer utilities {
  @media (max-width:900px) {
    .checkout-layout { grid-template-columns:1fr; }
    .checkout-summary { position:static; }
  }
  @media (max-width:620px) {
    .payment-option { grid-template-columns:22px minmax(0,1fr); }
    .payment-tag { grid-column:2; width:max-content; }
    .result-order { grid-template-columns:1fr; }
    .plin-box { grid-template-columns:1fr; }
    .plin-box img { width:min(220px,100%); margin-inline:auto; }
  }
}


@layer components {
  .admin-hero { padding: 34px 0; background: #081120; color: #fff; }
  .admin-hero-inner { width: var(--page); margin-inline:auto; display:flex; align-items:center; justify-content:space-between; gap:24px; }
  .admin-hero h1 { margin-top:8px; font-size:clamp(2rem,4vw,3.5rem); letter-spacing:-.05em; }
  .admin-hero p { margin-top:8px; color:#aebbd0; }
  .button-ghost-dark { border:1px solid rgb(255 255 255 / 18%); color:#fff; background:rgb(255 255 255 / 7%); }

  .admin-dashboard { display:grid; gap:24px; }
  .admin-stat-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(150px,1fr)); gap:12px; }
  .admin-stat-grid article { padding:18px; border:1px solid var(--line); border-radius:16px; background:var(--surface); }
  .admin-stat-grid span { color:var(--muted); font-size:.75rem; font-weight:700; text-transform:uppercase; letter-spacing:.05em; }
  .admin-stat-grid strong { display:block; margin-top:8px; font-size:1.7rem; letter-spacing:-.04em; }

  .admin-grid { display:grid; grid-template-columns:minmax(0,1fr) 260px; gap:18px; align-items:start; }
  .admin-panel { padding:20px; border:1px solid var(--line); border-radius:18px; background:var(--surface); }
  .admin-panel h2 { margin-top:5px; font-size:1.35rem; letter-spacing:-.03em; }
  .admin-panel-head { display:flex; align-items:end; justify-content:space-between; gap:16px; margin-bottom:14px; }
  .quick-links { display:grid; gap:6px; margin-top:16px; }
  .quick-links a { display:flex; justify-content:space-between; gap:14px; padding:11px 12px; border-radius:10px; background:var(--surface-soft); font-weight:700; font-size:.88rem; }

  .admin-table-wrap { overflow:auto; border:1px solid var(--line); border-radius:14px; }
  .admin-table { width:100%; border-collapse:collapse; min-width:720px; background:#fff; }
  .admin-table th,.admin-table td { padding:12px 14px; border-bottom:1px solid var(--line); text-align:left; vertical-align:middle; }
  .admin-table th { position:sticky; top:0; background:#f8fafc; color:var(--muted); font-size:.7rem; text-transform:uppercase; letter-spacing:.06em; z-index:1; }
  .admin-table td { font-size:.86rem; }
  .admin-table td small { display:block; margin-top:3px; color:var(--muted); }
  .admin-table tr:last-child td { border-bottom:0; }

  .admin-list-page { display:grid; gap:18px; }
  .admin-toolbar { display:flex; align-items:center; justify-content:space-between; gap:14px; flex-wrap:wrap; }
  .admin-toolbar form { display:flex; gap:8px; flex:1 1 380px; max-width:620px; }
  .admin-toolbar input,.admin-toolbar select { min-height:44px; flex:1; border:1px solid var(--line); border-radius:11px; padding:0 12px; background:#fff; color:var(--ink); }
  .admin-toolbar button { min-height:44px; }
  .status-pill { display:inline-flex; padding:5px 8px; border-radius:999px; background:var(--surface-soft); font-size:.7rem; font-weight:800; }
  .stock-low { color:#b42318; font-weight:800; }

  .compact-empty { padding:32px 18px; }
}

@layer utilities {
  @media (max-width: 980px) {
    .admin-stat-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
    .admin-grid { grid-template-columns:1fr; }
  }
  @media (max-width: 620px) {
    .admin-hero-inner { align-items:flex-start; flex-direction:column; }
    .admin-stat-grid { grid-template-columns:1fr; }
    .admin-toolbar form { width:100%; flex-direction:column; }
  }
}


@layer components {
  .admin-form-page { max-width: 980px; }
  .admin-product-form { display:grid; gap:20px; padding:22px; border:1px solid var(--line); border-radius:20px; background:var(--surface); }
  .admin-form-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; }
  .admin-form-grid .span-2 { grid-column:1 / -1; }
  .admin-form-grid label { display:grid; gap:7px; }
  .admin-form-grid label > span { color:var(--muted); font-size:.78rem; font-weight:750; }
  .admin-form-grid input,
  .admin-form-grid textarea {
    width:100%;
    border:1px solid var(--line);
    border-radius:11px;
    background:#fff;
    color:var(--ink);
    padding:11px 12px;
    outline:0;
  }
  .admin-form-grid input { min-height:44px; }
  .admin-form-grid textarea { resize:vertical; min-height:96px; }
  .admin-form-grid input:focus,
  .admin-form-grid textarea:focus { border-color:var(--brand); box-shadow:0 0 0 4px rgb(20 99 255 / 8%); }
  .admin-switches { display:flex; flex-wrap:wrap; gap:14px 22px; padding-top:4px; }
  .admin-switches label { display:inline-flex; align-items:center; gap:8px; font-size:.88rem; font-weight:700; }
  .admin-switches input { width:18px; height:18px; accent-color:var(--brand); }
  .admin-form-actions { display:flex; flex-wrap:wrap; gap:10px; }
}
@layer utilities {
  @media (max-width: 700px) {
    .admin-form-grid { grid-template-columns:1fr; }
    .admin-form-grid .span-2 { grid-column:auto; }
  }
}


@layer components {
  .order-admin-summary { display:grid; gap:10px; margin-top:16px; }
  .order-admin-summary > div { display:flex; justify-content:space-between; gap:16px; padding:10px 0; border-bottom:1px solid var(--line); }
  .order-admin-summary span { color:var(--muted); font-size:.8rem; }
  .order-status-form { display:grid; gap:12px; margin-top:18px; }
  .order-status-form label { display:grid; gap:7px; }
  .order-status-form label > span { color:var(--muted); font-size:.78rem; font-weight:750; }
  .order-status-form select { min-height:44px; border:1px solid var(--line); border-radius:11px; padding:0 12px; background:#fff; color:var(--ink); }
  .admin-whatsapp { width:100%; margin-top:10px; }
}

@layer components {
  .admin-product-form select {
    width: 100%;
    min-height: 50px;
    padding: 0 13px;
    border: 1px solid var(--line);
    border-radius: 11px;
    background: #fff;
    color: var(--ink);
    font: inherit;
  }
  .ai-name-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
  }
  .ai-button {
    min-width: 190px;
    border: 1px solid color-mix(in srgb, var(--brand) 28%, var(--line));
    background: #eef5ff;
    color: #174f9a;
    cursor: pointer;
  }
  .ai-button[disabled] {
    opacity: .65;
    cursor: wait;
    transform: none;
  }
  .ai-status {
    color: var(--muted);
    font-size: .74rem;
  }
  .product-info-lists {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-top: 24px;
  }
  .product-info-lists section {
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--surface);
  }
  .product-info-lists h2 {
    font-size: .9rem;
    letter-spacing: -.02em;
  }
  .product-info-lists ul {
    margin: 12px 0 0;
    padding-left: 18px;
    color: #566174;
    font-size: .84rem;
  }
  .product-info-lists li + li { margin-top: 7px; }
}
@layer utilities {
  @media (max-width: 620px) {
    .ai-name-row { grid-template-columns: 1fr; }
    .ai-button { width: 100%; min-width: 0; }
    .product-info-lists { grid-template-columns: 1fr; }
  }
}


@layer components {
  .license-card-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
  .license-card { min-width:0; padding:18px; border:1px solid var(--line); border-radius:15px; background:linear-gradient(150deg,#fff,#f7faff); }
  .license-card > span { display:block; color:var(--muted); font-size:.76rem; font-weight:800; text-transform:uppercase; letter-spacing:.05em; }
  .license-card code { display:block; margin-top:10px; padding:11px 12px; overflow-wrap:anywhere; border-radius:10px; background:#0b1424; color:#f8fafc; font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace; font-size:.9rem; }
  .license-card small { display:block; margin-top:8px; color:var(--muted); line-height:1.5; }
  .delivered-licenses { display:grid; gap:18px; margin-top:28px; padding:22px; border:1px solid #bfe8d1; border-radius:18px; background:#f4fcf7; }
  .delivered-licenses h2 { margin-top:6px; font-size:1.35rem; letter-spacing:-.03em; }
  .delivered-licenses p { margin-top:6px; color:var(--muted); font-size:.86rem; }

  .license-create-panel { display:grid; grid-template-columns:260px minmax(0,1fr); gap:24px; }
  .license-create-panel > div > p { margin-top:7px; color:var(--muted); font-size:.86rem; }
  .license-create-form { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
  .license-create-form .span-2 { grid-column:1 / -1; }
  .license-create-form label { display:grid; gap:7px; }
  .license-create-form label > span { color:var(--muted); font-size:.78rem; font-weight:750; }
  .license-create-form input,
  .license-create-form select,
  .license-create-form textarea,
  .order-status-form textarea {
    width:100%;
    border:1px solid var(--line);
    border-radius:11px;
    background:#fff;
    color:var(--ink);
    padding:11px 12px;
    font:inherit;
  }
  .license-create-form input,
  .license-create-form select { min-height:44px; }
  .license-create-form button { grid-column:1 / -1; justify-self:start; }
}
@layer utilities {
  @media (max-width: 760px) {
    .license-card-grid { grid-template-columns:1fr; }
    .license-create-panel { grid-template-columns:1fr; }
    .license-create-form { grid-template-columns:1fr; }
    .license-create-form .span-2,
    .license-create-form button { grid-column:auto; }
  }
}


@layer components {
  .product-image-admin { display:flex; align-items:center; gap:14px; padding:12px; border:1px solid var(--line); border-radius:13px; background:var(--surface-soft); }
  .product-image-admin img { width:82px; height:82px; flex:0 0 auto; object-fit:contain; border-radius:10px; background:#fff; border:1px solid var(--line); }
  .product-image-admin > div { min-width:0; display:grid; gap:7px; flex:1; }
  .product-image-admin input[type="file"] { min-height:auto; padding:8px; background:#fff; }
  .product-image-admin small { color:var(--muted); font-size:.72rem; line-height:1.45; }
  .image-or { margin-top:4px; color:var(--muted); font-size:.7rem !important; font-weight:650 !important; }
}
@layer utilities {
  @media (max-width: 520px) {
    .product-image-admin { align-items:stretch; flex-direction:column; }
    .product-image-admin img { width:100%; height:160px; }
  }
}


@layer components {
  .product-card { position:relative; }
  .product-card-favorite { position:absolute; top:12px; right:12px; z-index:4; }
  .favorite-button {
    width:42px;
    height:42px;
    display:grid;
    place-items:center;
    border:1px solid rgb(210 219 232 / 90%);
    border-radius:12px;
    background:rgb(255 255 255 / 92%);
    color:#6c788b;
    box-shadow:0 8px 22px rgb(15 28 53 / 10%);
    cursor:pointer;
    transition:transform .18s ease, color .18s ease, background .18s ease, border-color .18s ease;
  }
  .favorite-button svg { width:20px; height:20px; fill:transparent; stroke:currentColor; stroke-width:1.8; }
  .favorite-button:hover { transform:translateY(-1px); color:var(--brand); }
  .favorite-button.is-favorite { color:#d72c54; border-color:#f2c3cf; background:#fff5f7; }
  .favorite-button.is-favorite svg { fill:currentColor; }
  .favorite-login { text-decoration:none; }
  .product-title-actions { display:flex; align-items:center; gap:10px; margin-top:14px; }
  .product-title-actions .favorite-button { box-shadow:none; }
  .account-section + .account-section { margin-top:38px; }
}


@layer components {
  .quantity-control { display:inline-flex; align-items:center; gap:3px; margin-top:9px; padding:3px; border:1px solid var(--line); border-radius:10px; background:#fff; }
  .quantity-control button { width:32px; height:32px; display:grid; place-items:center; border:0; border-radius:7px; background:var(--surface-soft); color:var(--ink); font-size:1.05rem; font-weight:850; cursor:pointer; }
  .quantity-control button:hover { background:#e2e9f4; }
  .quantity-control button:disabled { opacity:.4; cursor:not-allowed; }
  .quantity-control strong { min-width:28px; text-align:center; font-size:.86rem; }
}


@layer components {
  .guide-hero { padding:clamp(52px,8vw,94px) 0; overflow:clip; background:radial-gradient(circle at 78% 18%,rgb(45 117 255 / 28%),transparent 28%),#081120; color:#fff; }
  .guide-hero-inner { width:var(--page); margin-inline:auto; display:grid; grid-template-columns:minmax(0,1fr) minmax(320px,.75fr); gap:60px; align-items:center; }
  .guide-hero h1 { margin-top:14px; font-size:clamp(2.6rem,6vw,5.3rem); line-height:.96; letter-spacing:-.065em; }
  .guide-hero h1 span { color:#8bbcff; }
  .guide-hero p { max-width:650px; margin-top:20px; color:#b4c1d3; font-size:1.05rem; }
  .guide-mini-flow { display:grid; grid-template-columns:1fr auto 1fr; gap:8px; align-items:center; padding:24px; border:1px solid rgb(255 255 255 / 13%); border-radius:24px; background:rgb(255 255 255 / 7%); backdrop-filter:blur(14px); }
  .guide-mini-flow span { min-height:54px; display:grid; place-items:center; padding:10px; border:1px solid rgb(255 255 255 / 12%); border-radius:12px; background:rgb(255 255 255 / 7%); font-size:.8rem; font-weight:800; text-align:center; }
  .guide-mini-flow b { color:#7db2ff; }
  .guide-mini-flow span:nth-of-type(3),.guide-mini-flow span:nth-of-type(4) { grid-row:2; }
  .guide-steps { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:12px; }
  .guide-steps article { padding:24px; border:1px solid var(--line); border-radius:18px; background:var(--surface); }
  .guide-steps article > b { color:var(--brand); font-size:.76rem; letter-spacing:.08em; }
  .guide-steps h3 { margin-top:36px; font-size:1.17rem; letter-spacing:-.03em; }
  .guide-steps p { margin-top:8px; color:var(--muted); font-size:.88rem; }
  .guide-account { display:grid; grid-template-columns:minmax(0,1fr) minmax(300px,.7fr); gap:36px; align-items:center; padding:clamp(28px,5vw,52px); border-radius:var(--radius-lg); background:#0b1830; color:#fff; }
  .guide-account h2 { margin-top:8px; font-size:clamp(2rem,4vw,3.5rem); line-height:1; letter-spacing:-.05em; }
  .guide-account p { margin:12px 0 24px; color:#aebbd0; }
  .guide-status { display:grid; gap:8px; padding:18px; border:1px solid rgb(255 255 255 / 12%); border-radius:18px; background:rgb(255 255 255 / 6%); }
  .guide-status span { padding:12px 14px; border-radius:10px; background:rgb(255 255 255 / 6%); color:#aebbd0; font-size:.86rem; font-weight:700; }
  .guide-status .done { color:#bcf0d4; }
  .faq-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
  .faq-grid details { padding:18px 20px; border:1px solid var(--line); border-radius:14px; background:var(--surface); }
  .faq-grid summary { cursor:pointer; font-weight:800; }
  .faq-grid p { margin-top:12px; color:var(--muted); font-size:.88rem; }

  .contact-page-shell { width:var(--page); margin-inline:auto; padding:clamp(50px,8vw,96px) 0; display:grid; grid-template-columns:minmax(0,.8fr) minmax(420px,1fr); gap:clamp(34px,7vw,90px); align-items:start; }
  .contact-copy-new h1 { margin-top:12px; font-size:clamp(2.5rem,6vw,5rem); line-height:.96; letter-spacing:-.06em; }
  .contact-copy-new > p { max-width:500px; margin-top:18px; color:var(--muted); font-size:1rem; }
  .contact-channel-list { display:grid; gap:8px; margin-top:30px; }
  .contact-channel-list > * { min-height:64px; display:grid; grid-template-columns:90px minmax(0,1fr) auto; align-items:center; gap:14px; padding:12px 14px; border:1px solid var(--line); border-radius:13px; background:#fff; }
  .contact-channel-list span { color:var(--muted); font-size:.72rem; text-transform:uppercase; letter-spacing:.05em; font-weight:800; }
  .contact-channel-list strong { overflow-wrap:anywhere; font-size:.88rem; }
  .contact-form-new { display:grid; gap:14px; padding:clamp(22px,4vw,36px); border:1px solid var(--line); border-radius:24px; background:#fff; box-shadow:var(--shadow); }
  .contact-form-new h2 { margin-top:2px; font-size:1.75rem; letter-spacing:-.04em; }
  .contact-form-new label { display:grid; gap:7px; }
  .contact-form-new label > span { color:var(--muted); font-size:.77rem; font-weight:750; }
  .contact-form-new input,.contact-form-new select,.contact-form-new textarea { width:100%; border:1px solid var(--line); border-radius:11px; background:#fff; color:var(--ink); padding:11px 12px; font:inherit; outline:0; }
  .contact-form-new input,.contact-form-new select { min-height:46px; }
  .contact-form-new input:focus,.contact-form-new select:focus,.contact-form-new textarea:focus { border-color:var(--brand); box-shadow:0 0 0 4px rgb(20 99 255 / 8%); }
  .contact-form-row { display:grid; grid-template-columns:1fr 1fr; gap:12px; }
  .contact-form-new > small { color:var(--muted); font-size:.72rem; }
  .form-honeypot { position:absolute !important; left:-10000px !important; width:1px !important; height:1px !important; overflow:hidden !important; }

  .policy-hero { padding:clamp(48px,8vw,88px) 0; background:#081120; color:#fff; }
  .policy-hero > div { width:var(--page); margin-inline:auto; }
  .policy-hero h1 { margin-top:12px; font-size:clamp(2.6rem,6vw,5rem); line-height:.98; letter-spacing:-.06em; }
  .policy-hero p { max-width:720px; margin-top:18px; color:#b4c1d3; font-size:1rem; }
  .policy-hero small { display:block; margin-top:20px; color:#7f91aa; }
  .policy-layout { display:grid; grid-template-columns:220px minmax(0,760px); justify-content:center; gap:42px; align-items:start; }
  .policy-aside { position:sticky; top:96px; padding:18px; border:1px solid var(--line); border-radius:15px; background:#fff; }
  .policy-aside p { margin-top:8px; color:var(--muted); font-size:.8rem; }
  .policy-aside a { display:inline-block; margin-top:14px; color:var(--brand); font-size:.8rem; font-weight:800; }
  .policy-document { display:grid; gap:30px; }
  .policy-document section { padding-bottom:26px; border-bottom:1px solid var(--line); }
  .policy-document section:last-child { border-bottom:0; }
  .policy-document h2 { font-size:1.35rem; letter-spacing:-.035em; }
  .policy-document p,.policy-document li { color:#4f5b6c; line-height:1.75; font-size:.92rem; }
  .policy-document p { margin-top:12px; }
  .policy-document ul { margin:12px 0 0; padding-left:20px; }
  .policy-document li + li { margin-top:7px; }
}

@layer utilities {
  @media (max-width: 880px) {
    .guide-hero-inner,.guide-account,.contact-page-shell { grid-template-columns:1fr; }
    .guide-steps { grid-template-columns:repeat(2,minmax(0,1fr)); }
    .policy-layout { grid-template-columns:1fr; }
    .policy-aside { position:static; }
  }
  @media (max-width: 620px) {
    .guide-steps,.faq-grid,.contact-form-row { grid-template-columns:1fr; }
    .guide-mini-flow { grid-template-columns:1fr auto 1fr; padding:16px; }
    .contact-channel-list > * { grid-template-columns:72px minmax(0,1fr); }
    .contact-channel-list > * > b { display:none; }
  }
}


@layer components {
  .message-cards { display:grid; gap:10px; }
  .message-card { padding:18px; border:1px solid var(--line); border-radius:16px; background:#fff; }
  .message-card-head { display:flex; justify-content:space-between; gap:16px; align-items:flex-start; }
  .message-card-head > div { min-width:0; }
  .message-card-head span { color:var(--muted); font-size:.72rem; }
  .message-card-head h3 { margin-top:3px; font-size:1rem; letter-spacing:-.02em; }
  .message-card-head small { display:block; margin-top:3px; color:var(--muted); overflow-wrap:anywhere; }
  .message-card > p { margin-top:14px; color:#4f5b6c; white-space:pre-wrap; line-height:1.65; font-size:.88rem; }
  .message-card-actions { display:flex; justify-content:space-between; align-items:center; gap:12px; margin-top:14px; padding-top:12px; border-top:1px solid var(--line); }
  .message-card-actions form { display:flex; gap:7px; align-items:center; }
  .message-card-actions select { min-height:38px; border:1px solid var(--line); border-radius:9px; padding:0 9px; background:#fff; }
  .message-card-actions button { min-height:38px; padding:0 12px; border:0; border-radius:9px; background:var(--surface-soft); font-weight:800; cursor:pointer; }
  .message-status-new { color:#9a5d00; background:#fff6df; }
  .message-status-read { color:#174f9a; background:#eef5ff; }
  .message-status-resolved { color:#136b44; background:#eaf8f1; }
}
@layer utilities {
  @media (max-width:620px) {
    .message-card-head,.message-card-actions { flex-direction:column; align-items:stretch; }
    .message-card-actions form { width:100%; }
    .message-card-actions select { flex:1; min-width:0; }
  }
}


@layer components {
  .site-announcement { min-height:34px; display:grid; place-items:center; padding:7px 16px; background:#0d5de8; color:#fff; text-align:center; font-size:.76rem; font-weight:800; letter-spacing:.02em; }
  .admin-settings-page { display:grid; gap:18px; max-width:1040px; }
  .settings-form { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; }
  .settings-form .span-2 { grid-column:1 / -1; }
  .settings-form label { display:grid; gap:7px; }
  .settings-form label > span { color:var(--muted); font-size:.78rem; font-weight:750; }
  .settings-form input,.settings-form textarea,.settings-form select { width:100%; border:1px solid var(--line); border-radius:11px; background:#fff; color:var(--ink); padding:11px 12px; font:inherit; outline:0; }
  .settings-form input,.settings-form select { min-height:44px; }
  .settings-form input:focus,.settings-form textarea:focus,.settings-form select:focus { border-color:var(--brand); box-shadow:0 0 0 4px rgb(20 99 255 / 8%); }
  .settings-qr-row { display:flex; align-items:center; gap:14px; padding:12px; border:1px solid var(--line); border-radius:13px; background:var(--surface-soft); }
  .settings-qr-row img { width:110px; height:110px; object-fit:contain; border-radius:10px; background:#fff; border:1px solid var(--line); }
  .settings-qr-row > div { display:grid; gap:7px; min-width:0; flex:1; }
  .settings-qr-row small { color:var(--muted); font-size:.72rem; }
}
@layer utilities {
  @media (max-width:700px) {
    .settings-form { grid-template-columns:1fr; }
    .settings-form .span-2 { grid-column:auto; }
    .settings-qr-row { align-items:stretch; flex-direction:column; }
    .settings-qr-row img { width:100%; height:190px; }
  }
}


@layer components {
  .temporary-password-card { display:grid; grid-template-columns:minmax(0,1fr) minmax(220px,.7fr); gap:18px; align-items:center; padding:18px 20px; border:1px solid #f0d69a; border-radius:15px; background:#fff9e9; }
  .temporary-password-card span { display:block; color:#846414; font-size:.72rem; text-transform:uppercase; letter-spacing:.06em; font-weight:800; }
  .temporary-password-card strong { display:block; margin-top:6px; overflow-wrap:anywhere; font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace; font-size:1.08rem; }
  .temporary-password-card p { color:#765f27; font-size:.82rem; line-height:1.5; }

  .permission-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(150px,1fr)); gap:8px; margin:0; padding:14px; border:1px solid var(--line); border-radius:12px; }
  .permission-grid legend { padding:0 6px; color:var(--muted); font-size:.76rem; font-weight:800; }
  .permission-grid label { display:flex; align-items:center; gap:8px; min-height:38px; padding:8px 10px; border-radius:9px; background:var(--surface-soft); font-size:.8rem; font-weight:700; }
  .permission-grid input { width:17px; height:17px; accent-color:var(--brand); }

  .admin-user-list { display:grid; gap:12px; }
  .admin-user-card { border:1px solid var(--line); border-radius:16px; background:#fff; overflow:hidden; }
  .admin-user-head { display:grid; grid-template-columns:auto minmax(0,1fr) auto; gap:13px; align-items:center; padding:16px; border-bottom:1px solid var(--line); }
  .admin-user-avatar { width:46px; height:46px; display:grid; place-items:center; border-radius:13px; background:#0b1830; color:#fff; font-weight:850; }
  .admin-user-head > div:nth-child(2) { min-width:0; }
  .admin-user-head strong,.admin-user-head span,.admin-user-head small { display:block; }
  .admin-user-head span { margin-top:2px; color:var(--muted); font-size:.8rem; overflow-wrap:anywhere; }
  .admin-user-head small { margin-top:4px; color:var(--muted); font-size:.72rem; }
  .admin-user-permissions { display:grid; gap:12px; padding:16px; }
  .admin-active-switch { display:flex !important; align-items:center; gap:8px; width:max-content; font-size:.82rem; font-weight:800; }
  .admin-active-switch input { width:18px; height:18px; accent-color:var(--brand); }
  .admin-user-actions { display:flex; flex-wrap:wrap; gap:8px; }
  .admin-self-note { color:var(--muted); font-size:.76rem; }
}
@layer utilities {
  @media (max-width:700px) {
    .temporary-password-card { grid-template-columns:1fr; }
    .admin-user-head { grid-template-columns:auto minmax(0,1fr); }
    .admin-user-head > .status-pill { grid-column:1 / -1; justify-self:start; }
  }
}


@layer components {
  .repository-page { display:grid; gap:18px; }
  .repository-security { display:grid; grid-template-columns:auto minmax(0,1fr) auto; gap:12px; align-items:center; padding:14px 16px; border:1px solid #b9d4ff; border-radius:14px; background:#f2f7ff; }
  .repository-security > span { font-size:1.2rem; }
  .repository-security strong,.repository-security small { display:block; }
  .repository-security small { margin-top:2px; color:var(--muted); font-size:.74rem; }
  .repository-security b { color:#174f9a; font-size:.78rem; }
  .repository-grid { display:grid; grid-template-columns:300px minmax(0,1fr); gap:18px; align-items:start; }
  .repository-editor { position:sticky; top:92px; }
  .repository-editor h2 { margin-top:5px; }
  .repository-form { display:grid; gap:11px; margin-top:16px; }
  .repository-form label { display:grid; gap:6px; }
  .repository-form label > span { color:var(--muted); font-size:.75rem; font-weight:750; }
  .repository-form input,.repository-form select,.repository-form textarea { width:100%; border:1px solid var(--line); border-radius:10px; background:#fff; color:var(--ink); padding:10px 11px; font:inherit; }
  .repository-form input,.repository-form select { min-height:42px; }

  .repository-content { min-width:0; display:grid; gap:14px; }
  .repository-toolbar { display:grid; grid-template-columns:minmax(220px,1fr) 190px auto auto; gap:8px; align-items:center; }
  .repository-toolbar input,.repository-toolbar select { min-height:44px; border:1px solid var(--line); border-radius:11px; padding:0 12px; background:#fff; }
  .repository-favorite-filter { min-height:44px; display:flex; align-items:center; gap:7px; padding:0 12px; border:1px solid var(--line); border-radius:11px; background:#fff; font-size:.8rem; font-weight:750; white-space:nowrap; }
  .repository-favorite-filter input { width:17px; height:17px; accent-color:var(--brand); }

  .repository-cards { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
  .repository-card { min-width:0; padding:18px; border:1px solid var(--line); border-radius:17px; background:#fff; }
  .repository-card-head { display:grid; grid-template-columns:auto minmax(0,1fr) auto; gap:12px; align-items:start; }
  .repository-program-icon { width:48px; height:48px; display:grid; place-items:center; border-radius:13px; background:#0b1830; color:#fff; font-weight:850; }
  .repository-card-head > div:nth-child(2) { min-width:0; }
  .repository-card-head span { color:var(--brand); font-size:.67rem; text-transform:uppercase; letter-spacing:.05em; font-weight:850; }
  .repository-card-head h2 { margin-top:3px; overflow-wrap:anywhere; font-size:1.05rem; letter-spacing:-.025em; }
  .repository-card-head small { display:block; margin-top:3px; color:var(--muted); font-size:.72rem; }
  .repository-star { width:38px; height:38px; border:1px solid var(--line); border-radius:10px; background:#fff; color:#a3adbd; font-size:1.15rem; cursor:pointer; }
  .repository-star.is-favorite { color:#e09b00; background:#fff9e9; border-color:#f0d69a; }
  .repository-card > p { margin-top:14px; color:var(--muted); line-height:1.55; font-size:.82rem; white-space:pre-wrap; }
  .repository-link-preview { display:block; margin-top:14px; padding:10px 11px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; border-radius:9px; background:var(--surface-soft); color:#34516f; font-size:.75rem; }
  .repository-edit { margin-top:12px; border-top:1px solid var(--line); padding-top:10px; }
  .repository-edit summary { cursor:pointer; color:var(--brand); font-size:.78rem; font-weight:800; }
  .repository-card-actions { display:flex; gap:8px; margin-top:14px; }
  .repository-card-actions form { margin:0; }
}
@layer utilities {
  @media (max-width:980px) {
    .repository-grid { grid-template-columns:1fr; }
    .repository-editor { position:static; }
  }
  @media (max-width:760px) {
    .repository-toolbar { grid-template-columns:1fr; }
    .repository-cards { grid-template-columns:1fr; }
  }
  @media (max-width:520px) {
    .repository-security { grid-template-columns:auto minmax(0,1fr); }
    .repository-security > b { grid-column:2; }
  }
}


@layer components {
  .cms-admin-page { max-width:1080px; }
  .cms-admin-form { display:grid; gap:18px; }
  .cms-card { display:grid; gap:16px; }
  .cms-fields { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
  .cms-fields .span-2 { grid-column:1 / -1; }
  .cms-card label { display:grid; gap:6px; }
  .cms-card label > span { color:var(--muted); font-size:.76rem; font-weight:750; }
  .cms-card input,.cms-card textarea { width:100%; border:1px solid var(--line); border-radius:10px; background:#fff; color:var(--ink); padding:10px 11px; font:inherit; outline:0; }
  .cms-card input { min-height:43px; }
  .cms-card input:focus,.cms-card textarea:focus { border-color:var(--brand); box-shadow:0 0 0 4px rgb(20 99 255 / 8%); }
  .cms-helper { color:var(--muted); font-size:.78rem; }
  .cms-repeat-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
  .cms-repeat-grid article { display:grid; gap:9px; padding:14px; border:1px solid var(--line); border-radius:12px; background:var(--surface-soft); }
  .cms-repeat-grid article > strong { color:var(--brand); font-size:.72rem; text-transform:uppercase; letter-spacing:.05em; }
  .cms-save-bar { position:sticky; bottom:14px; z-index:6; display:flex; align-items:center; justify-content:space-between; gap:14px; padding:14px 16px; border:1px solid var(--line); border-radius:15px; background:rgb(255 255 255 / 94%); box-shadow:0 16px 40px rgb(15 28 53 / 14%); backdrop-filter:blur(12px); }
  .cms-save-bar span { color:var(--muted); font-size:.8rem; }
}
@layer utilities {
  @media (max-width:700px) {
    .cms-fields,.cms-repeat-grid { grid-template-columns:1fr; }
    .cms-fields .span-2 { grid-column:auto; }
    .cms-save-bar { align-items:stretch; flex-direction:column; }
  }
}


@layer components {
  .receipt-selector { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
  .receipt-selector label { position:relative; display:grid; gap:4px; min-height:82px; padding:15px 16px 15px 44px; border:1px solid var(--line); border-radius:13px; background:#fff; cursor:pointer; }
  .receipt-selector label.is-selected { border-color:var(--brand); box-shadow:0 0 0 3px rgb(20 99 255 / 7%); background:#f8fbff; }
  .receipt-selector input { position:absolute; top:18px; left:16px; width:17px; height:17px; accent-color:var(--brand); }
  .receipt-selector strong { font-size:.9rem; }
  .receipt-selector small { color:var(--muted); font-size:.75rem; line-height:1.45; }

  .plin-receipt-box { display:grid; gap:16px; margin-top:18px; padding:20px; border:1px solid #c9daef; border-radius:17px; background:#f8fbff; text-align:left; }
  .plin-receipt-box h2 { margin-top:5px; font-size:1.2rem; letter-spacing:-.03em; }
  .plin-receipt-box p { margin-top:6px; color:var(--muted); font-size:.84rem; }
  .plin-receipt-box > div > a { display:inline-block; margin-top:9px; color:var(--brand); font-size:.8rem; font-weight:800; }
  .plin-receipt-box form { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:10px; align-items:end; }
  .plin-receipt-box label { display:grid; gap:7px; }
  .plin-receipt-box label > span { color:var(--muted); font-size:.72rem; font-weight:750; }
  .plin-receipt-box input[type="file"] { width:100%; min-height:44px; padding:8px; border:1px solid var(--line); border-radius:10px; background:#fff; }
  .receipt-admin-link { display:block; margin-top:14px; padding:11px 12px; border:1px solid #c9daef; border-radius:10px; background:#f2f7ff; color:#174f9a; text-align:center; font-size:.8rem; font-weight:800; }
}
@layer utilities {
  @media (max-width:620px) {
    .receipt-selector { grid-template-columns:1fr; }
    .plin-receipt-box form { grid-template-columns:1fr; }
  }
}
