:root {
  --blue: #a9d0e3;
  --white: #ffffff;
  --pink: #ef73a7;
  --ink: #20252d;
  --muted: #667085;
  --line: #d9e1e8;
  --soft: #f5f8fa;
  --danger: #c9364f;
  --success: #18865b;
  --shadow: 0 12px 36px rgba(31, 48, 61, .10);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--soft); }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
.boot { min-height: 100vh; display: grid; place-items: center; color: var(--muted); }
.login-shell { min-height: 100vh; display: grid; grid-template-columns: minmax(320px, 1fr) minmax(420px, 1.12fr); background: var(--white); }
.brand-panel { padding: clamp(32px, 6vw, 84px); background: linear-gradient(145deg, var(--blue), #d8ecf5); display: flex; flex-direction: column; justify-content: space-between; }
.brand-panel img { width: min(310px, 75%); mix-blend-mode: multiply; }
.brand-panel h1 { max-width: 620px; font-size: clamp(38px, 5vw, 72px); line-height: .98; letter-spacing: -.05em; margin: 40px 0 18px; }
.brand-panel p { font-size: 18px; max-width: 540px; line-height: 1.7; }
.stripe { display: grid; grid-template-columns: 1fr 1fr 1fr; height: 12px; border-radius: 999px; overflow: hidden; max-width: 280px; }
.stripe i:nth-child(1) { background: var(--blue); }.stripe i:nth-child(2) { background: var(--white); }.stripe i:nth-child(3) { background: var(--pink); }
.login-panel { display: grid; place-items: center; padding: 32px; }
.login-card { width: min(430px, 100%); }
.eyebrow { color: #a92f66; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; font-size: 12px; }
h2 { font-size: clamp(28px, 3vw, 40px); letter-spacing: -.035em; margin: 10px 0; }
.subtle { color: var(--muted); line-height: 1.6; }
.field { display: grid; gap: 7px; margin: 18px 0; }
.field label { font-size: 13px; font-weight: 750; }
input, select, textarea { width: 100%; border: 1px solid var(--line); border-radius: 12px; background: var(--white); padding: 12px 14px; color: var(--ink); outline: none; }
input:focus, select:focus, textarea:focus { border-color: var(--pink); box-shadow: 0 0 0 4px color-mix(in srgb, var(--pink) 18%, transparent); }
textarea { min-height: 110px; resize: vertical; }
.btn { border: 0; border-radius: 12px; padding: 11px 16px; font-weight: 800; background: var(--ink); color: white; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.btn:hover { transform: translateY(-1px); }
.btn.primary { background: var(--pink); color: #311020; }
.btn.secondary { color: var(--ink); background: var(--blue); }
.btn.ghost { color: var(--ink); background: transparent; border: 1px solid var(--line); }
.btn.danger { background: var(--danger); color: white; }
.btn.small { padding: 7px 10px; font-size: 12px; border-radius: 9px; }
.btn.full { width: 100%; }
.app-shell { min-height: 100vh; }
.topbar { height: 78px; display: flex; align-items: center; gap: 22px; padding: 0 clamp(18px, 4vw, 56px); background: var(--white); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.topbar .logo { width: 94px; height: 62px; object-fit: contain; }
.topbar .name { font-weight: 900; letter-spacing: -.02em; }
.topbar .spacer { flex: 1; }
.role-pill, .status-pill { font-size: 11px; font-weight: 850; padding: 6px 9px; border-radius: 999px; background: var(--blue); text-transform: uppercase; letter-spacing: .06em; }
.status-pill { background: #e8f7ef; color: #116641; }
.page { width: min(1240px, calc(100% - 36px)); margin: 0 auto; padding: 34px 0 70px; }
.hero { display: grid; grid-template-columns: 1.2fr .8fr; min-height: 310px; border-radius: 28px; overflow: hidden; background: var(--blue); box-shadow: var(--shadow); }
.hero-copy { padding: clamp(28px, 5vw, 62px); align-self: center; }
.hero h1 { font-size: clamp(36px, 5vw, 66px); line-height: 1; letter-spacing: -.055em; margin: 8px 0 16px; }
.hero p { font-size: 17px; line-height: 1.7; max-width: 650px; }
.hero-visual { background: linear-gradient(145deg, var(--pink), #f5a6c7); display: grid; place-items: center; min-height: 270px; overflow: hidden; }
.hero-visual img { width: 72%; max-height: 260px; object-fit: contain; filter: drop-shadow(0 18px 22px rgba(0,0,0,.12)); }
.announcement { margin: 22px 0; padding: 15px 18px; border-left: 5px solid var(--pink); background: var(--white); border-radius: 12px; box-shadow: 0 5px 18px rgba(31,48,61,.05); }
.search-wrap { margin: 30px 0 18px; position: relative; }
.search-wrap input { font-size: 17px; padding: 16px 18px 16px 50px; border-radius: 16px; box-shadow: var(--shadow); }
.search-wrap::before { content: "⌕"; position: absolute; left: 18px; top: 10px; font-size: 28px; z-index: 1; color: var(--muted); }
.search-results { position: absolute; top: calc(100% + 8px); left: 0; right: 0; background: white; border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); max-height: 360px; overflow: auto; z-index: 12; }
.search-item { padding: 13px 16px; border-bottom: 1px solid var(--line); cursor: pointer; }
.search-item:hover { background: var(--soft); }.search-item:last-child { border-bottom: 0; }
.search-item small { display: block; color: var(--muted); margin-top: 3px; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin: 34px 0 16px; }
.section-head h2 { margin: 0; font-size: 30px; }.section-head p { margin: 4px 0 0; color: var(--muted); }
.category-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.category-card { background: var(--white); border: 1px solid var(--line); border-radius: 20px; overflow: hidden; cursor: pointer; transition: .2s ease; }
.category-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: transparent; }
.category-image, .option-image { background: linear-gradient(135deg, color-mix(in srgb, var(--blue) 75%, white), color-mix(in srgb, var(--pink) 40%, white)); display: grid; place-items: center; color: #48606b; font-weight: 850; text-align: center; }
.category-image { height: 160px; }.category-image img, .option-image img { width: 100%; height: 100%; object-fit: cover; }
.category-card .body { padding: 18px; }.category-card h3 { margin: 0 0 7px; font-size: 19px; }.category-card p { margin: 0; color: var(--muted); font-size: 13px; }
.lookup-head { display: flex; align-items: center; gap: 16px; margin-bottom: 22px; }
.lookup-head .category-image { width: 86px; height: 70px; border-radius: 14px; flex: none; }
.lookup-layout { display: grid; grid-template-columns: minmax(0, 1fr) 390px; gap: 22px; align-items: start; }
.panel { background: var(--white); border: 1px solid var(--line); border-radius: 20px; padding: 22px; box-shadow: 0 7px 22px rgba(31,48,61,.05); }
.selector-row { display: grid; grid-template-columns: minmax(190px, .8fr) 1.2fr; gap: 16px; align-items: center; border-bottom: 1px solid var(--line); padding: 15px 0; }
.selector-row:first-child { padding-top: 0; }.selector-row:last-child { border-bottom: 0; padding-bottom: 0; }
.option-preview { display: flex; align-items: center; gap: 12px; min-width: 0; }
.option-image { width: 70px; height: 56px; border-radius: 10px; flex: none; font-size: 10px; overflow: hidden; }
.option-preview strong { font-size: 13px; word-break: break-word; }
.price-panel { position: sticky; top: 100px; }
.price-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; margin: 18px 0; }
.price-card { border-radius: 14px; padding: 14px 8px; background: var(--soft); text-align: center; }
.price-card.gold { background: #fff4ca; }.price-card.premium { background: #fde3ee; }
.price-card span { display: block; color: var(--muted); font-size: 11px; font-weight: 800; text-transform: uppercase; }
.price-card strong { display: block; font-size: 21px; margin-top: 5px; letter-spacing: -.03em; }
.rule-box { background: var(--soft); border-radius: 14px; padding: 16px; margin-top: 14px; }
.rule-box h4 { margin: 0 0 8px; }.rule-box p { margin: 0 0 12px; line-height: 1.6; font-size: 13px; }
.rule-metrics { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }.metric { background: white; padding: 10px; border-radius: 10px; }.metric small { color: var(--muted); display: block; }.metric strong { display: block; margin-top: 3px; }
.size-tool { margin-top: 16px; border-top: 1px solid var(--line); padding-top: 18px; }
.size-tool-head { display: flex; align-items: start; justify-content: space-between; gap: 12px; }.size-tool-head h4 { margin: 4px 0 0; font-size: 19px; }
.inch-size-row { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; margin-top: 14px; }.inch-size-row > b { font-size: 23px; }
.inch-size-row label { display: grid; grid-template-columns: auto 1fr auto; align-items: center; border: 1px solid var(--line); border-radius: 11px; overflow: hidden; background: white; }
.inch-size-row label span, .inch-size-row label em { padding: 10px 8px; background: var(--soft); color: var(--muted); font-size: 11px; font-weight: 850; font-style: normal; }
.inch-size-row label input { min-width: 0; border: 0; border-radius: 0; padding: 10px 6px; text-align: center; box-shadow: none; }
.area-result { display: grid; grid-template-columns: auto auto 1fr; align-items: baseline; gap: 8px; background: var(--ink); color: white; padding: 13px 14px; border-radius: 12px; margin-top: 10px; }.area-result strong { font-size: 25px; }.area-result small { color: #cdd5df; }
.converter-box { margin-top: 14px; padding: 14px; border-radius: 12px; background: color-mix(in srgb, var(--blue) 38%, white); }.converter-box p { color: var(--muted); font-size: 11px; margin: 4px 0 10px; line-height: 1.45; }
.converter-row { display: grid; grid-template-columns: 1fr auto 1fr 92px; gap: 7px; align-items: center; }.converter-row input, .converter-row select { min-width: 0; padding: 9px 8px; }
.size-alert { margin-top: 9px; padding: 10px 11px; border-radius: 10px; font-size: 11px; line-height: 1.5; font-weight: 700; }.size-alert.notice { background: #fff4ca; color: #745a00; }.size-alert.danger { background: #fde4e8; color: #962038; }
.empty { padding: 34px 16px; text-align: center; color: var(--muted); border: 1px dashed var(--line); border-radius: 14px; }
.admin-layout { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 24px; }
.admin-nav { position: sticky; top: 100px; align-self: start; background: white; padding: 10px; border: 1px solid var(--line); border-radius: 16px; }
.admin-nav button { width: 100%; border: 0; background: transparent; text-align: left; padding: 11px 12px; border-radius: 10px; color: var(--muted); font-weight: 700; }
.admin-nav button.active, .admin-nav button:hover { background: var(--blue); color: var(--ink); }
.admin-title { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 18px; }
.admin-title h2 { margin: 0; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 13px; }
.stat { padding: 18px; border-radius: 16px; background: white; border: 1px solid var(--line); }.stat strong { display: block; font-size: 28px; }.stat span { color: var(--muted); font-size: 12px; }
.table-wrap { overflow: auto; border: 1px solid var(--line); border-radius: 15px; background: white; }
table { width: 100%; border-collapse: collapse; min-width: 760px; }
th, td { padding: 12px 13px; text-align: left; border-bottom: 1px solid var(--line); font-size: 13px; vertical-align: top; }
th { background: var(--soft); color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .05em; position: sticky; top: 0; }
tr:last-child td { border-bottom: 0; }.actions { display: flex; gap: 6px; flex-wrap: wrap; }
.admin-filters { display: flex; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }.admin-filters > * { width: auto; min-width: 180px; }
.swatches { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }.swatch { border: 1px solid var(--line); border-radius: 14px; padding: 14px; }.swatch input { padding: 3px; height: 55px; }
.upload-card { border: 1px solid var(--line); border-radius: 14px; padding: 15px; display: grid; grid-template-columns: 80px 1fr auto; align-items: center; gap: 14px; background: white; }.upload-card .option-image { width: 80px; height: 64px; }
.upload-list { display: grid; gap: 10px; }
.modal-backdrop { position: fixed; inset: 0; background: rgba(18,24,32,.62); display: grid; place-items: center; padding: 20px; z-index: 100; }
.modal { width: min(620px, 100%); max-height: 90vh; overflow: auto; background: white; border-radius: 20px; padding: 24px; box-shadow: 0 30px 90px rgba(0,0,0,.25); }
.modal h3 { font-size: 24px; margin: 0 0 8px; }.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px; }
.change-preview { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }.change-preview pre { white-space: pre-wrap; overflow-wrap: anywhere; background: var(--soft); padding: 12px; border-radius: 10px; font-size: 11px; }
.toast { position: fixed; right: 20px; bottom: 20px; z-index: 120; background: var(--ink); color: white; padding: 13px 17px; border-radius: 12px; box-shadow: var(--shadow); animation: toast .25s ease; }
@keyframes toast { from { transform: translateY(10px); opacity: 0; } }
.footer { text-align: center; color: var(--muted); padding: 28px 0 0; font-size: 12px; }
.mobile-nav { display: none; }
@media (max-width: 900px) {
  .login-shell { grid-template-columns: 1fr; }.brand-panel { min-height: 340px; }.login-panel { padding: 50px 22px; }
  .category-grid { grid-template-columns: repeat(2, 1fr); }.hero { grid-template-columns: 1fr; }.hero-visual { min-height: 180px; }
  .lookup-layout { grid-template-columns: 1fr; }.price-panel { position: static; }.admin-layout { grid-template-columns: 1fr; }.admin-nav { position: static; display: flex; overflow-x: auto; }.admin-nav button { width: auto; white-space: nowrap; }.stats { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .topbar { height: 66px; padding: 0 14px; gap: 10px; }.topbar .logo { width: 68px; height: 48px; }.topbar .name { display: none; }
  .page { width: min(100% - 24px, 1240px); padding-top: 20px; }.hero { border-radius: 20px; }.hero-copy { padding: 28px 22px; }.hero h1 { font-size: 39px; }
  .category-grid { grid-template-columns: 1fr; }.category-image { height: 150px; }.selector-row { grid-template-columns: 1fr; }.price-grid { gap: 6px; }.price-card strong { font-size: 17px; }
  .panel { padding: 16px; border-radius: 16px; }.lookup-head { align-items: flex-start; }.stats { grid-template-columns: 1fr 1fr; }.stat { padding: 14px; }.stat strong { font-size: 22px; }
  .size-tool-head { align-items: flex-start; }.size-tool-head .status-pill { white-space: nowrap; }.inch-size-row { grid-template-columns: 1fr; }.inch-size-row > b { text-align: center; line-height: .7; }.converter-row { grid-template-columns: 1fr auto 1fr; }.converter-row select { grid-column: 1 / -1; }
  .swatches { grid-template-columns: 1fr; }.upload-card { grid-template-columns: 62px 1fr; }.upload-card .actions { grid-column: 1 / -1; }.change-preview { grid-template-columns: 1fr; }
}
