:root {
  color-scheme: dark;
  --ink: #07100f;
  --surface: #0d1615;
  --surface-raised: #111d1b;
  --surface-soft: #14211f;
  --line: #28403a;
  --line-soft: #1c2d29;
  --text: #f4f8f6;
  --muted: #a6b4b0;
  --green: #00ef92;
  --green-deep: #006d47;
  --green-wash: rgba(0, 239, 146, .1);
  --danger: #ffa1a1;
  --danger-bg: #281719;
  --info: #b5d4ff;
  --info-bg: #102337;
  --shadow: 0 24px 70px rgba(0, 0, 0, .28);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { min-width: 320px; margin: 0; background: radial-gradient(circle at 78% -18%, #08442e 0, transparent 31rem), var(--ink); color: var(--text); }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .58; transform: none !important; }
svg { display: block; width: 1.25rem; height: 1.25rem; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }
a { color: inherit; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { letter-spacing: -.045em; }
h1 { margin-bottom: 16px; font-size: clamp(2.05rem, 5vw, 3.72rem); line-height: 1.04; }
h2 { margin-bottom: 7px; font-size: clamp(1.22rem, 2.5vw, 1.7rem); line-height: 1.2; }
h3 { margin-bottom: 7px; font-size: 1.05rem; line-height: 1.25; }
p { color: var(--muted); line-height: 1.58; }
.hidden { display: none !important; }
.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; }

.site-shell { width: min(1390px, calc(100% - 44px)); margin: 0 auto; }
.site-header { display: grid; grid-template-columns: auto minmax(240px, 1fr) auto; gap: 30px; align-items: center; min-height: 86px; border-bottom: 1px solid var(--line-soft); }
.brand { display: inline-grid; color: var(--text); font-size: 1.37rem; font-weight: 850; letter-spacing: -.07em; line-height: .9; text-decoration: none; }
.brand span { color: var(--green); }
.brand small { margin-top: 8px; color: var(--muted); font-size: .61rem; font-weight: 800; letter-spacing: .15em; text-transform: uppercase; }
.header-search { display: flex; align-items: center; gap: 10px; max-width: 690px; width: 100%; height: 45px; padding: 0 14px; border: 1px solid var(--line); border-radius: 10px; background: rgba(8, 15, 14, .6); color: var(--muted); }
.header-search:focus-within { border-color: var(--green); box-shadow: 0 0 0 3px rgba(0, 239, 146, .1); }
.header-search input { width: 100%; border: 0; outline: 0; background: transparent; color: var(--text); }
.header-search input::placeholder { color: #879691; }
.account-nav, .text-button, .footer-admin-link, .back-link { border: 0; background: transparent; color: var(--text); }
.account-nav { display: inline-flex; align-items: center; gap: 8px; padding: 10px 0; font-weight: 760; white-space: nowrap; }
.account-nav:hover, .text-button:hover, .footer-admin-link:hover, .back-link:hover { color: var(--green); }

.status { margin: 18px 0 0; padding: 13px 15px; border: 1px solid; border-radius: 10px; line-height: 1.42; }
.status-info { border-color: #335b87; background: var(--info-bg); color: var(--info); }
.status-success { border-color: #16764c; background: #0a281c; color: var(--green); }
.status-error { border-color: #813942; background: var(--danger-bg); color: var(--danger); }

.store-hero { display: grid; grid-template-columns: minmax(0, .98fr) minmax(280px, .52fr); align-items: center; min-height: 330px; padding: 54px 6.1vw; margin: 40px 0 48px; overflow: hidden; border: 1px solid rgba(31, 77, 61, .8); border-radius: 24px; background: linear-gradient(120deg, #0d1917 0%, #0a1713 58%, #062d1d 100%); box-shadow: var(--shadow); }
.store-hero p { max-width: 600px; margin-bottom: 25px; font-size: 1.05rem; }
.hero-art { position: relative; width: min(300px, 80%); aspect-ratio: 1; justify-self: end; display: grid; place-items: center; color: var(--green); }
.hero-art > svg { width: 42%; height: 42%; fill: currentColor; stroke: none; filter: drop-shadow(0 0 22px rgba(0, 239, 146, .45)); }
.hero-orbit { position: absolute; inset: 4%; border: 1px solid rgba(0, 239, 146, .32); border-radius: 50%; }
.orbit-one { transform: rotate(42deg) scaleX(.55); }
.orbit-two { inset: 19%; border-color: rgba(0, 239, 146, .52); transform: rotate(-45deg) scaleX(.65); }

.button { display: inline-flex; min-height: 42px; align-items: center; justify-content: center; gap: 8px; padding: 10px 16px; border: 1px solid transparent; border-radius: 9px; font-weight: 820; line-height: 1.1; text-decoration: none; transition: border-color .16s ease, transform .16s ease, background .16s ease; }
.button:hover { transform: translateY(-1px); }
.primary { background: var(--green); color: #022417; }
.primary:hover { background: #21f7a4; }
.secondary { border-color: var(--line); background: var(--surface-soft); color: var(--text); }
.secondary:hover, .outline:hover { border-color: var(--green-deep); background: var(--green-wash); }
.outline { border-color: var(--green-deep); background: transparent; color: var(--text); }

.catalog-section { margin: 0 0 48px; }
.section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 20px; }
.section-heading h2 { margin-bottom: 4px; }
.section-heading p { margin-bottom: 0; }
.text-button { padding: 8px 0; font-weight: 780; }
.catalog-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.catalog-card { min-width: 0; overflow: hidden; border: 1px solid var(--line-soft); border-radius: 16px; background: rgba(13, 22, 21, .82); transition: transform .2s ease, border-color .2s ease, background .2s ease; }
.catalog-card:hover { transform: translateY(-3px); border-color: #397160; background: var(--surface-raised); }
.catalog-card-link { display: block; width: 100%; padding: 0; border: 0; background: transparent; color: inherit; text-align: left; }
.catalog-image { display: block; width: 100%; aspect-ratio: 1.3 / 1; object-fit: cover; background: #e8edeb; }
.catalog-image-placeholder { display: grid; place-items: center; background: radial-gradient(circle at 50% 30%, #16382c, #101a18 60%); color: rgba(0, 239, 146, .72); font-size: 2.6rem; font-weight: 900; letter-spacing: -.12em; }
.catalog-card-body { padding: 19px; }
.catalog-card-body h3 { margin-top: 10px; }
.catalog-card-body p { display: -webkit-box; min-height: 50px; margin-bottom: 17px; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 2; font-size: .91rem; }
.catalog-card-body strong { font-size: 1.24rem; }
.availability { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; padding: 4px 8px; color: var(--muted); font-size: .7rem; font-weight: 800; letter-spacing: .04em; }
.availability-ready { border-color: rgba(0, 239, 146, .5); color: var(--green); }
.catalog-empty { grid-column: 1 / -1; display: grid; place-items: center; min-height: 270px; padding: 32px; border: 1px dashed #3a5d52; border-radius: 16px; background: rgba(13, 24, 21, .62); text-align: center; }
.catalog-empty h3 { margin: 7px 0 0; font-size: 1.3rem; }
.catalog-empty p { max-width: 440px; margin: 7px 0 0; }
.empty-icon { color: var(--green); font-size: 3.2rem; line-height: 1; }

.account-callout { display: grid; grid-template-columns: auto 1fr auto; gap: 18px; align-items: center; padding: 24px 27px; margin-bottom: 45px; border: 1px solid #2d5045; border-radius: 16px; background: linear-gradient(100deg, #0f201c, #10211c); }
.account-callout h2 { margin-bottom: 4px; font-size: 1.17rem; }
.account-callout p { margin-bottom: 0; font-size: .92rem; }
.account-icon { display: grid; place-items: center; width: 48px; height: 48px; border: 1px solid var(--green); border-radius: 50%; color: var(--green); }

.view { min-height: 570px; padding: 31px 0 20px; }
.back-link { display: inline-flex; padding: 0; margin-bottom: 31px; font-weight: 760; }
.account-layout { display: grid; grid-template-columns: minmax(220px, .7fr) minmax(560px, 1.3fr); gap: 44px; align-items: start; }
.account-intro { padding: 15px 0; }
.account-intro p { max-width: 390px; font-size: 1.02rem; }
.auth-panels { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 17px; }
.form-card, .panel, .orders-panel { border: 1px solid var(--line); border-radius: 15px; background: rgba(13, 23, 21, .9); box-shadow: 0 16px 48px rgba(0, 0, 0, .14); }
.form-card { display: grid; gap: 14px; padding: 25px; }
.form-card h2 { margin: 0 0 4px; font-size: 1.22rem; }
label { display: grid; gap: 7px; color: #e5ece9; font-size: .85rem; font-weight: 760; }
label span { color: var(--muted); font-size: .74rem; font-weight: 600; }
input, textarea, select { width: 100%; border: 1px solid #344b44; border-radius: 8px; outline: 0; padding: 10px 11px; background: #09110f; color: var(--text); }
textarea { min-height: 90px; resize: vertical; }
input:focus, textarea:focus, select:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(0, 239, 146, .1); }
.form-helper { margin: 0; font-size: .82rem; }
.form-helper.error { color: var(--danger); }

.account-dashboard-header, .admin-workspace-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; margin-bottom: 25px; }
.account-dashboard-header p, .admin-workspace-header p { max-width: 690px; margin-bottom: 0; }
.section-label { margin-bottom: 8px; color: var(--green); font-size: .72rem; font-weight: 850; letter-spacing: .15em; }
.orders-panel { padding: 25px; }
.orders-empty, .admin-empty { padding: 27px; border: 1px dashed #365c4f; border-radius: 12px; color: var(--muted); text-align: center; }
.orders-empty h3 { margin-bottom: 6px; color: var(--text); }
.orders-empty p { margin-bottom: 18px; }
.order-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 15px; align-items: center; padding: 14px 0; border-top: 1px solid var(--line-soft); }
.order-row span { display: block; color: var(--muted); font-size: .82rem; }
.order-status { border: 1px solid var(--line); border-radius: 999px; padding: 4px 8px; }

.admin-login { display: grid; grid-template-columns: minmax(250px, .95fr) minmax(350px, .75fr); gap: 60px; max-width: 1020px; margin: 30px auto 0; padding: 42px; border: 1px solid var(--line); border-radius: 20px; background: linear-gradient(140deg, #101d1a, #0d1514); }
.admin-login p { max-width: 470px; }
.inline-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.admin-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(300px, .8fr); gap: 18px; align-items: start; }
.panel { padding: 24px; }
.panel-description { margin-bottom: 20px; font-size: .91rem; }
.product-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; }
.wide { grid-column: 1 / -1; }
.check-row { display: flex; align-items: center; gap: 8px; }
.check-row input { width: 16px; height: 16px; accent-color: var(--green); }
.freight-form { display: grid; gap: 13px; }
.freight-result { min-height: 98px; margin-top: 19px; padding-top: 18px; border-top: 1px solid var(--line-soft); color: var(--muted); }
.freight-result strong { display: block; color: var(--text); }
.freight-result p { margin: 5px 0 0; font-size: .86rem; }
.quote-list { display: grid; gap: 9px; }
.quote-item { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px; border: 1px solid var(--line); border-radius: 9px; background: #0a1110; color: var(--text); }
.quote-item small { display: block; margin-top: 3px; color: var(--muted); }
.quote-item strong { color: var(--green); }
.admin-products-panel { margin-top: 18px; }
.admin-products-list { display: grid; gap: 10px; }
.admin-product-row { display: grid; grid-template-columns: 58px minmax(0, 1fr) auto auto; gap: 13px; align-items: center; padding: 10px; border: 1px solid var(--line-soft); border-radius: 11px; background: #0a1110; }
.admin-product-row img, .admin-product-thumb { width: 58px; height: 58px; border-radius: 8px; object-fit: cover; background: #e9eeec; }
.admin-product-thumb { display: grid; place-items: center; background: #17362b; color: var(--green); font-weight: 900; }
.admin-product-row h3 { margin: 0 0 4px; font-size: .98rem; }
.admin-product-row p { margin: 0; font-size: .8rem; }

.site-footer { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 88px; border-top: 1px solid var(--line-soft); color: var(--muted); font-size: .85rem; }
.footer-admin-link { padding: 8px 0; color: var(--muted); font-size: .8rem; }

.modal-backdrop { position: fixed; z-index: 10; inset: 0; display: grid; place-items: center; padding: 22px; background: rgba(0, 0, 0, .76); backdrop-filter: blur(5px); }
.product-modal { position: relative; width: min(840px, 100%); max-height: calc(100vh - 44px); overflow: auto; border: 1px solid var(--line); border-radius: 17px; background: #101a18; box-shadow: var(--shadow); }
.modal-close { position: absolute; z-index: 1; top: 12px; right: 12px; width: 35px; height: 35px; border: 1px solid var(--line); border-radius: 50%; background: rgba(5, 10, 9, .84); color: var(--text); font-size: 1.45rem; line-height: 1; }
.modal-product-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(270px, .84fr); }
.modal-product-image { width: 100%; min-height: 360px; height: 100%; object-fit: cover; background: #e8edeb; }
.modal-product-grid > div:last-child { padding: 43px 34px 34px; }
.modal-product-grid p:not(.section-label) { font-size: .96rem; }
.modal-price { display: block; margin: 22px 0 16px; font-size: 1.7rem; }
.product-security { padding-top: 15px; border-top: 1px solid var(--line-soft); font-size: .78rem !important; }

@media (max-width: 960px) {
  .site-header { grid-template-columns: auto 1fr auto; gap: 18px; }
  .catalog-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .account-layout, .admin-login { grid-template-columns: 1fr; gap: 28px; }
  .admin-login { padding: 30px; }
  .store-hero { padding-inline: 38px; }
}

@media (max-width: 720px) {
  .site-shell { width: min(100% - 26px, 610px); }
  .site-header { grid-template-columns: 1fr auto; padding: 15px 0; }
  .header-search { grid-column: 1 / -1; grid-row: 2; max-width: none; }
  .store-hero { grid-template-columns: 1fr; min-height: 0; gap: 22px; padding: 35px 24px; margin-top: 25px; }
  .hero-art { width: 165px; justify-self: start; }
  .account-callout { grid-template-columns: auto 1fr; padding: 20px; }
  .account-callout .button { grid-column: 1 / -1; width: 100%; }
  .auth-panels, .admin-grid, .modal-product-grid { grid-template-columns: 1fr; }
  .account-dashboard-header, .admin-workspace-header { flex-direction: column; }
  .product-form { grid-template-columns: 1fr; }
  .wide { grid-column: auto; }
  .modal-product-image { min-height: 240px; max-height: 330px; }
  .modal-product-grid > div:last-child { padding: 28px 24px; }
}

@media (max-width: 480px) {
  .site-shell { width: min(100% - 20px, 480px); }
  h1 { font-size: 2rem; }
  .site-header { gap: 12px; }
  .brand { font-size: 1.19rem; }
  .account-nav span { display: none; }
  .catalog-grid { grid-template-columns: 1fr; }
  .section-heading { align-items: flex-start; flex-direction: column; gap: 6px; }
  .account-callout { grid-template-columns: 1fr; }
  .account-icon { display: none; }
  .admin-login { padding: 22px; }
  .panel { padding: 18px; }
  .admin-product-row { grid-template-columns: 48px minmax(0, 1fr); }
  .admin-product-row img, .admin-product-thumb { width: 48px; height: 48px; }
  .admin-product-row > strong, .admin-product-row > button { grid-column: 2; justify-self: start; }
  .order-row { grid-template-columns: 1fr; gap: 7px; }
}

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