:root {
  --ink: #201b29; --muted: #746e7b; --bg: #f5f4f7; --panel: #fff;
  --purple: #6544c6; --purple-dark: #3d2784; --lime: #c9f55b;
  --line: #e8e5eb; --danger: #b8454e; --success: #18825e;
  --font-title: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --font-body: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}
* {
  box-sizing: border-box;
  font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}
body { margin: 0; color: var(--ink); font-family: var(--font-body); line-height: 1.45; }
body, input, textarea, select, button { font-family: var(--font-body); }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
:focus-visible { outline: 3px solid var(--lime); outline-offset: 2px; }
.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; }
.skip-link { position: fixed; z-index: 999; top: -60px; left: 15px; background: var(--ink); color: #fff; padding: 10px 15px; }.skip-link:focus { top: 10px; }
.admin-body { background: var(--bg); min-height: 100vh; }
.admin-sidebar { width: 245px; position: fixed; z-index: 30; inset: 0 auto 0 0; display: flex; flex-direction: column; padding: 25px 17px; color: #fff; background: #21192e; transform: translateX(-100%); transition: transform .25s; }
.admin-sidebar.is-open { transform: translateX(0); }
.admin-brand { display: flex; align-items: center; gap: 11px; padding: 0 8px 28px; }
.admin-brand > span { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 11px; background: var(--purple); color: var(--lime); font-size: 21px; }
.admin-brand div { display: flex; flex-direction: column; line-height: 1; }
.admin-brand strong { font: 800 18px var(--font-title); }.admin-brand small { margin-top: 5px; color: #948ba2; text-transform: uppercase; letter-spacing: 2px; font-size: 9px; }
.admin-sidebar nav { display: grid; gap: 5px; }
.admin-sidebar nav a, .sidebar-bottom a { display: flex; align-items: center; gap: 12px; padding: 11px 13px; border-radius: 10px; color: #aaa2b4; font-size: 14px; font-weight: 600; }
.admin-sidebar nav a:hover, .sidebar-bottom a:hover { color: #fff; background: rgba(255,255,255,.06); }
.admin-sidebar nav a.is-active { color: #fff; background: var(--purple); }
.admin-sidebar nav a span, .sidebar-bottom a span { width: 19px; text-align: center; font-size: 18px; }
.sidebar-bottom { margin-top: auto; padding-top: 18px; border-top: 1px solid #3b3345; }
.admin-shell { min-height: 100vh; }
.admin-topbar { height: 70px; padding: 0 20px; display: flex; align-items: center; gap: 14px; background: #fff; border-bottom: 1px solid var(--line); }
.admin-menu-toggle { width: 40px; height: 40px; border: 1px solid var(--line); background: #fff; border-radius: 9px; cursor: pointer; }
.admin-topbar > div { margin-left: auto; display: flex; flex-direction: column; text-align: right; font-size: 12px; }
.admin-topbar span { color: var(--muted); }.admin-topbar strong { font-size: 13px; }
.admin-main { width: min(1280px, calc(100% - 28px)); margin-inline: auto; padding: 30px 0 70px; }
.admin-heading { display: flex; flex-direction: column; align-items: flex-start; gap: 20px; margin-bottom: 27px; }
.admin-heading span { color: var(--purple); text-transform: uppercase; letter-spacing: 1.5px; font-size: 11px; font-weight: 700; }
.admin-heading h1 { margin: 2px 0 4px; font: 800 32px var(--font-title); letter-spacing: -1.1px; }
.admin-heading p { margin: 0; color: var(--muted); }
.heading-back { display: inline-block; margin-bottom: 9px; color: var(--purple); font-size: 13px; font-weight: 600; }
.admin-button { min-height: 43px; display: inline-flex; justify-content: center; align-items: center; border: 0; border-radius: 10px; padding: 10px 17px; font-weight: 700; cursor: pointer; }
.admin-button-primary { background: var(--purple); color: #fff; box-shadow: 0 8px 20px rgba(101,68,198,.18); }
.admin-button-primary:hover { background: var(--purple-dark); }
.admin-button-secondary { border: 1px solid var(--line); background: #fff; color: var(--ink); }
.stats-grid { display: grid; gap: 13px; margin-bottom: 23px; }
.stats-grid article { display: flex; align-items: center; gap: 16px; padding: 19px; background: #fff; border: 1px solid var(--line); border-radius: 15px; }
.stat-icon { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 13px; font-size: 20px; }
.stat-purple { color: #6341c1; background: #eee9fa; }.stat-green { color: #13835b; background: #e5f7ef; }.stat-orange { color: #b86b23; background: #fff0dc; }.stat-blue { color: #3c73b2; background: #e7f1fc; }
.stats-grid article div { display: flex; flex-direction: column; }
.stats-grid strong { font: 800 26px var(--font-title); }.stats-grid small { color: var(--muted); }
.admin-panel { background: #fff; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.panel-heading { min-height: 78px; display: flex; justify-content: space-between; align-items: center; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.panel-heading h2 { margin: 0 0 3px; font: 700 17px var(--font-title); }.panel-heading p { margin: 0; color: var(--muted); font-size: 12px; }
.panel-heading > a { color: var(--purple); font-size: 13px; font-weight: 700; }
.admin-table-wrap { overflow-x: auto; }
.admin-table { width: 100%; border-collapse: collapse; white-space: nowrap; }
.admin-table th, .admin-table td { padding: 13px 18px; text-align: left; border-bottom: 1px solid var(--line); font-size: 13px; }
.admin-table th { background: #fbfafd; color: var(--muted); text-transform: uppercase; letter-spacing: .6px; font-size: 10px; }
.admin-table tbody tr:last-child td { border-bottom: 0; }.admin-table tbody tr:hover { background: #fcfbfe; }
.table-product { min-width: 220px; display: flex; align-items: center; gap: 11px; }
.table-thumb { width: 46px; height: 46px; flex: 0 0 auto; display: grid; place-items: center; overflow: hidden; border-radius: 9px; background: #efedf1; color: var(--purple); font-size: 10px; font-weight: 800; }
.table-thumb img { width: 100%; height: 100%; object-fit: contain; }
.status { display: inline-flex; padding: 5px 8px; border-radius: 20px; font-size: 10px; font-weight: 700; }
.status-success { color: #11744f; background: #e6f6ee; }.status-muted { color: #706a75; background: #eeecef; }
.featured-star { color: #926112; font-weight: 700; }
.icon-button { width: 34px; height: 34px; display: inline-grid; place-items: center; padding: 0; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--muted); cursor: pointer; }
.icon-button:hover { color: var(--purple); border-color: #c8bced; }.icon-danger:hover { color: var(--danger); border-color: #e4b5b9; }
.table-actions { display: flex; gap: 5px; }.table-actions form { display: contents; }
.admin-empty { padding: 60px 20px; text-align: center; color: var(--muted); }
.admin-empty > span { font-size: 38px; color: var(--purple); }.admin-empty h3 { color: var(--ink); margin-bottom: 5px; }.admin-empty p { margin: 0; }
.alert { margin-bottom: 20px; padding: 13px 16px; border-radius: 10px; font-size: 14px; }
.alert-success { color: #126d4c; background: #e4f6ed; border: 1px solid #bfe6d3; }.alert-error { color: #923b44; background: #fae9eb; border: 1px solid #edc7ca; }
.admin-two-columns { display: grid; gap: 20px; }
.admin-form { display: grid; gap: 17px; padding: 20px; }
.admin-form label { display: block; }
.admin-form label > span:first-child { display: block; margin-bottom: 7px; font-size: 12px; font-weight: 700; }
.admin-form fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
.admin-form fieldset > legend { margin-bottom: 7px; padding: 0; font-size: 12px; font-weight: 700; }
.admin-form input[type="text"], .admin-form input[type="password"], .admin-form input[type="number"], .admin-form textarea, .admin-form select,
.admin-filters input, .admin-filters select { width: 100%; border: 1px solid #dcd8df; background: #fff; color: var(--ink); border-radius: 9px; padding: 10px 12px; }
.admin-form input, .admin-form select { min-height: 43px; }.admin-form textarea { resize: vertical; line-height: 1.55; }
.admin-form small { display: block; margin-top: 5px; color: var(--muted); font-size: 11px; }
.form-actions { display: flex; justify-content: flex-end; gap: 9px; }
.switch-row { display: flex !important; align-items: center; gap: 12px; position: relative; }
.switch-row > span { margin: 0 auto 0 0 !important; }.switch-row > span strong { display: block; font-size: 13px; }.switch-row input { position: absolute; opacity: 0; }
.switch-row i { width: 42px; height: 24px; flex: 0 0 auto; border-radius: 20px; background: #cbc7ce; position: relative; cursor: pointer; }
.switch-row i::after { content: ""; width: 18px; height: 18px; position: absolute; top: 3px; left: 3px; background: #fff; border-radius: 50%; transition: transform .2s; box-shadow: 0 2px 5px rgba(0,0,0,.2); }
.switch-row input:checked + i { background: var(--purple); }.switch-row input:checked + i::after { transform: translateX(18px); }
.switch-row input:focus-visible + i { outline: 3px solid var(--lime); }
.category-form-panel { align-self: start; }
.category-list article { min-height: 77px; display: flex; align-items: center; gap: 11px; padding: 12px 17px; border-bottom: 1px solid var(--line); }
.category-list article:last-child { border-bottom: 0; }.category-list article form { display: contents; }
.category-symbol { width: 41px; height: 41px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 11px; background: #eee9fa; color: var(--purple); font-weight: 800; }
.category-symbol svg { width: 22px; height: 22px; }
.icon-picker { padding-top: 2px !important; }
.icon-options { max-height: 270px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; padding: 3px; overflow-y: auto; scrollbar-width: thin; }
.icon-options > label { min-width: 0; cursor: pointer; }
.icon-options input { position: absolute; opacity: 0; pointer-events: none; }
.icon-options label > span { min-height: 72px; display: flex !important; flex-direction: column; align-items: center; justify-content: center; gap: 6px; margin: 0 !important; padding: 8px 4px; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--muted); text-align: center; transition: border-color .15s, background .15s, color .15s; }
.icon-options svg { width: 23px; height: 23px; }
.icon-options small { width: 100%; margin: 0 !important; overflow: hidden; color: inherit !important; font-size: 9px !important; text-overflow: ellipsis; white-space: nowrap; }
.icon-options input:checked + span { border-color: var(--purple); background: #eee9fa; color: var(--purple); box-shadow: inset 0 0 0 1px var(--purple); }
.icon-options input:focus-visible + span { outline: 3px solid var(--lime); outline-offset: 1px; }
.icon-options label:hover > span { border-color: #bfb1e9; color: var(--purple); }
.category-list article > div { min-width: 0; margin-right: auto; display: flex; flex-direction: column; }
.category-list article > div strong { overflow: hidden; text-overflow: ellipsis; }.category-list article > div small { color: var(--muted); }
.category-list article > .category-order { min-width: auto; margin: 0; flex-direction: row; gap: 3px; }
.category-order form { display: block !important; }
.order-button { width: 29px; height: 29px; display: grid; place-items: center; padding: 0; border: 1px solid var(--line); border-radius: 7px; background: #fff; color: var(--purple); font-weight: 800; cursor: pointer; }
.order-button:hover:not(:disabled) { border-color: var(--purple); background: #eee9fa; }
.order-button:disabled { color: #c7c2ca; background: #f5f3f6; cursor: not-allowed; }
.admin-filters { display: grid; gap: 10px; padding: 16px; border-bottom: 1px solid var(--line); }
.admin-filters > a { align-self: center; color: var(--purple); text-decoration: underline; font-size: 13px; }
.product-editor { display: grid; gap: 20px; align-items: start; }
.editor-main, .editor-side { display: grid; gap: 20px; }
.form-section .admin-form { padding-top: 20px; }
.price-input { display: flex; align-items: center; border: 1px solid #dcd8df; border-radius: 9px; overflow: hidden; }
.price-input b { padding-left: 12px; color: var(--muted); }.price-input input { border: 0 !important; }
.check-row { display: flex !important; align-items: flex-start; gap: 10px; padding: 13px; background: var(--bg); border-radius: 9px; }
.check-row input { width: 18px; height: 18px; accent-color: var(--purple); }.check-row span { margin: 0 !important; }.check-row strong { display: block; font-size: 13px; }
.featured-section { border-color: #d8c8ff; background: #fdfbff; }
.featured-section .panel-heading h2 { color: var(--purple); }
.image-preview-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; }
.image-preview-grid div { aspect-ratio: 1; display: grid; place-items: center; overflow: hidden; border-radius: 9px; background: var(--bg); border: 1px solid var(--line); }
.image-preview-grid img { width: 100%; height: 100%; object-fit: contain; }.image-preview-grid span { color: var(--danger); font-size: 10px; }
.editor-actions { display: grid; grid-template-columns: 1fr 1.5fr; gap: 8px; }
.account-panel { max-width: 580px; }

.login-page { min-height: 100vh; display: grid; place-items: center; padding: 20px; background: radial-gradient(circle at 10% 10%, #7050bd, transparent 28%), radial-gradient(circle at 90% 90%, #402378, transparent 32%), #21182f; }
.login-card { width: min(430px, 100%); padding: 30px; background: #fff; border-radius: 22px; box-shadow: 0 30px 80px rgba(0,0,0,.25); }
.login-brand { display: inline-flex; align-items: center; gap: 10px; }
.login-brand > span { width: 39px; height: 39px; display: grid; place-items: center; border-radius: 11px; color: var(--lime); background: var(--purple); font-size: 21px; }
.login-brand div { display: flex; flex-direction: column; line-height: 1; }.login-brand strong { font: 800 18px var(--font-title); }.login-brand small { margin-top: 4px; color: var(--purple); font-size: 9px; letter-spacing: 2px; }
.login-heading { margin: 34px 0 6px; }.login-heading > span { color: var(--purple); text-transform: uppercase; letter-spacing: 1.5px; font-size: 10px; font-weight: 700; }
.login-heading h1 { margin: 5px 0; font: 800 31px var(--font-title); }.login-heading p { margin: 0; color: var(--muted); font-size: 14px; }
.login-card .admin-form { padding-inline: 0; }.login-card .admin-button { width: 100%; margin-top: 5px; }
.back-store { display: block; margin-top: 9px; color: var(--muted); text-align: center; font-size: 12px; }

@media (min-width: 650px) {
  .admin-main { width: min(1280px, calc(100% - 48px)); padding-top: 38px; }
  .admin-heading { flex-direction: row; align-items: center; justify-content: space-between; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .admin-filters { grid-template-columns: minmax(240px, 1fr) minmax(180px, .4fr) auto auto; }
}
@media (min-width: 960px) {
  .admin-sidebar { transform: none; }
  .admin-shell { margin-left: 245px; }
  .admin-menu-toggle { display: none; }
  .admin-topbar { height: 76px; padding-inline: 28px; }
  .stats-grid { grid-template-columns: repeat(4, 1fr); }
  .admin-two-columns { grid-template-columns: minmax(300px, .38fr) 1fr; }
  .product-editor { grid-template-columns: minmax(0, 1fr) 330px; }
}
