.admin-page { --bg:#070707; --panel:#101010; --panel-soft:#151515; --text:#f7f4f1; --muted:#a7a29e; --line:rgba(255,255,255,.1); --cream:#f5eee7; min-height: 100vh; color:var(--text); background: radial-gradient(circle at 84% 10%, rgba(223,31,45,.1), transparent 28rem), var(--bg); }
.admin-header, .admin-main { width: min(1280px, calc(100% - 36px)); margin-inline: auto; }
.admin-header { display: flex; height: 78px; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.admin-header .brand img { width: 220px; height: 48px; object-fit: contain; object-position: left center; }
.admin-header > a:last-child { color: var(--muted); font-size: 15px; }
.admin-main { padding: 52px 0; }
.admin-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; }
.admin-heading h1 { margin-bottom: 10px; }
.admin-heading p:last-child, .admin-note, .catalog-intro p { color: var(--muted); }
#access-form { display: flex; gap: 9px; }
#access-form input, .admin-toolbar input, .admin-toolbar select, .order-card select {
  color: var(--text); border: 1px solid var(--line); border-radius: 999px; background: var(--panel);
}
#access-form input { min-height: 46px; padding: 0 16px; }
.admin-tabs { display: flex; gap: 8px; margin-top: 34px; border-bottom: 1px solid var(--line); }
.admin-tabs button { padding: 14px 19px; color: var(--muted); border: 0; border-bottom: 2px solid transparent; background: transparent; font-size: 15px; font-weight: 800; }
.admin-tabs button.active { color: var(--cream); border-color: var(--accent); }
.dashboard-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 9px; margin-top: 24px; }
.dashboard-stats button { display: flex; align-items: end; justify-content: space-between; min-height: 105px; padding: 15px; color: var(--muted); border: 1px solid var(--line); border-radius: 17px; background: var(--panel); text-align: left; }
.dashboard-stats button:hover { border-color: rgba(223,31,45,.7); }
.dashboard-stats strong { color: var(--cream); font-size: 37px; letter-spacing: -2px; }
.admin-toolbar { display: grid; grid-template-columns: minmax(220px, 1fr) 220px; gap: 9px; margin-top: 19px; }
.admin-toolbar input, .admin-toolbar select { min-height: 45px; padding: 0 14px; outline: 0; }
.admin-note { margin: 18px 0 13px; font-size: 13px; }
.walkin-bar { display:flex; align-items:center; justify-content:space-between; gap:16px; margin-top:18px; padding:15px 16px; border:1px solid rgba(223,31,45,.26); border-radius:17px; background:rgba(223,31,45,.07); }
.walkin-bar div { display:grid; gap:5px; }
.walkin-bar span { color:var(--muted); font-size:12px; }
.walkin-form { margin-top:10px; grid-template-columns:repeat(3, 1fr); }
.walkin-form h2, .walkin-form button { grid-column:1 / -1; }
.orders-list, .manager-catalog { display: grid; gap: 9px; }
.order-card, .manager-product { border: 1px solid var(--line); border-radius: 17px; overflow: hidden; background: var(--panel); }
.order-card.is-new { border-color: rgba(223,31,45,.58); }
.order-card summary, .manager-product > summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px; cursor: pointer; list-style: none; }
.order-card summary::-webkit-details-marker, .manager-product > summary::-webkit-details-marker, .add-variant summary::-webkit-details-marker { display: none; }
.order-main, .order-summary-meta, .manager-product-title, .manager-product-meta { display: flex; align-items: center; gap: 11px; }
.manager-select { display:grid; width:24px; height:24px; flex:0 0 24px; place-items:center; }
.manager-select input { width:18px!important; height:18px; accent-color:var(--accent); }
.order-main small, .manager-product small { display: block; margin-top: 4px; color: var(--muted); }
.order-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 16px rgba(223,31,45,.8); }
.order-summary-meta b { color: var(--cream); font-size: 18px; }
.order-summary-meta i, .manager-product-meta i { color: var(--accent); font-size: 20px; font-style: normal; transition: .18s; }
details[open] > summary i { transform: rotate(180deg); }
.status-chip { padding: 6px 9px; border-radius: 999px; color: var(--muted); background: rgba(255,255,255,.07); font-size: 10px; font-style: normal; text-transform: uppercase; white-space: nowrap; }
.status-new, .status-preorder { color: #ffb4b7; background: rgba(223,31,45,.16); }
.status-ready, .status-visible { color: #8fdcaa; background: rgba(71,172,107,.14); }
.status-hidden { color: #c7c7c7; background: rgba(255,255,255,.08); }
.order-columns { display: grid; grid-template-columns: 260px 1fr; gap: 24px; padding: 17px; border-top: 1px solid var(--line); }
.order-card h2 { margin-bottom: 10px; color: var(--muted); font-size: 11px; letter-spacing: 1.4px; text-transform: uppercase; }
.order-card p { margin-bottom: 7px; }
.order-card a { color: var(--accent); }
.order-card section small { display: block; margin-top: 5px; color: var(--muted); }
.source-chip { display:inline-flex; margin:0 0 9px; padding:5px 8px; border-radius:999px; color:#ffb4b7; background:rgba(223,31,45,.14); font-size:10px; letter-spacing:.8px; text-transform:uppercase; }
.source-telegram { color:#98cbff; background:rgba(67,142,215,.14); }
.source-store { color:#8fdcaa; background:rgba(71,172,107,.14); }
.order-card section p b { margin-left: 4px; color: var(--muted); font-size: 13px; white-space: nowrap; }
.order-card footer { display: flex; align-items: center; justify-content: end; gap: 16px; padding: 13px 17px; border-top: 1px solid var(--line); }
.order-card label { color: var(--muted); font-size: 13px; }
.order-card select { margin-left: 6px; padding: 8px 11px; }
.bonus-row { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:12px 17px; color:var(--muted); border-top:1px solid var(--line); background:rgba(255,255,255,.025); font-size:12px; }
.bonus-row button { padding:8px 11px; color:white; border:0; border-radius:999px; background:var(--accent); font-weight:800; }
.bonus-row.is-issued strong { color:#8fdcaa; }
.catalog-intro { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 24px; }
.catalog-intro-actions { display: flex; gap: 8px; }
.catalog-intro h2 { margin-bottom: 6px; font-size: 30px; letter-spacing: -1px; }
.catalog-intro p { margin: 0; font-size: 14px; }
.sync-status-card { display:flex; align-items:center; justify-content:space-between; gap:16px; margin-top:14px; padding:14px 16px; border:1px solid rgba(71,172,107,.35); border-radius:15px; background:rgba(71,172,107,.08); }
.sync-status-card div { display:grid; gap:5px; }
.sync-status-card span { color:var(--muted); font-size:12px; }
.sync-status-card strong { color:#8fdcaa; font-size:13px; }
.sync-details-button { padding:9px 12px; color:#8fdcaa; border:1px solid rgba(71,172,107,.3); border-radius:999px; background:rgba(71,172,107,.1); font-size:12px; font-weight:800; white-space:nowrap; }
.sync-status-card.has-error { border-color:rgba(223,31,45,.55); background:rgba(223,31,45,.11); }
.sync-status-card.has-error strong { color:#ffb4b7; }
.add-product-form { margin-top: 16px; }
.admin-editor { display: grid; grid-template-columns: repeat(2, 1fr); gap: 9px; padding: 16px; border: 1px solid rgba(223,31,45,.4); border-radius: 17px; background: var(--panel); }
.admin-editor h2 { grid-column: 1 / -1; margin: 0; }
.catalog-toolbar { grid-template-columns: minmax(220px,1fr) 240px 200px 170px 170px; }
.manager-product.is-hidden { opacity: .7; }
.manager-product.has-price-mismatch { border-color: rgba(255, 194, 87, .7); box-shadow: 0 0 0 1px rgba(255,194,87,.12); }
.manager-product.is-missing-source { border-color: rgba(132, 162, 255, .55); }
.manager-product-title span, .manager-product-title img { display: grid; width: 104px; height: 104px; place-items: center; flex: 0 0 104px; border-radius: 16px; color: var(--accent); background: radial-gradient(circle at 50% 42%, #fbfaf7 0 48%, #ece8df 100%); object-fit: contain; padding:7px; font-weight: 900; }
.manager-product h2 { margin: 0; color: var(--cream); font-size: 17px; letter-spacing: -.5px; }
.catalog-badges { display:flex; flex-wrap:wrap; gap:5px; margin-top:6px; }
.catalog-badge { display:inline-flex; padding:4px 7px; border-radius:999px; font-size:9px; letter-spacing:.8px; text-transform:uppercase; }
.badge-import { color:#8fdcaa; background:rgba(71,172,107,.14); }
.badge-manual { color:#f0d6aa; background:rgba(184,117,20,.18); }
.badge-missing { color:#aebeff; background:rgba(80,113,220,.18); }
.badge-price { color:#ffd18a; background:rgba(255,194,87,.16); }
.manager-product-settings, .manager-variants { padding: 14px; border-top: 1px solid var(--line); }
.manager-product h3 { margin: 0 0 10px; color: var(--muted); font-size: 11px; letter-spacing: 1.2px; text-transform: uppercase; }
.manager-fields { display: grid; grid-template-columns: 1fr 1fr 1.4fr 170px; gap: 7px; }
.manager-actions { display: flex; align-items: center; justify-content: end; gap: 14px; margin-top: 10px; }
.source-link { margin-right: auto; color: var(--accent); font-size: 12px; font-weight: 800; }
.manager-product input, .manager-product select, .manager-product textarea, .admin-editor input, .admin-editor select, .admin-editor textarea {
  width: 100%; padding: 12px; color: var(--text); border: 1px solid var(--line); border-radius: 10px; outline: 0; background: var(--panel-soft); font-size: 14px;
}
.manager-product textarea, .admin-editor textarea { resize: vertical; }
.product-editor textarea { line-height:1.55; }
.manager-product button { padding: 10px 12px; color: white; border: 0; border-radius: 10px; background: var(--accent); font-size: 12px; font-weight: 800; }
.manager-product button.secondary-button { color:#ffd18a; background:rgba(255,194,87,.16); border:1px solid rgba(255,194,87,.3); }
.manager-product button.danger-button { background:#4b1719; color:#ffb4b7; }
.admin-check { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 12px; }
.admin-check input { width: auto; }
.variant-editor { display: grid; grid-template-columns: 112px repeat(4, minmax(120px, 1fr)); gap: 9px; margin-top: 9px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: #0c0c0c; }
.variant-editor.is-hidden { opacity: .58; }
.variant-editor-image { width:112px; height:112px; align-self:stretch; border-radius:12px; object-fit:contain; padding:5px; background:#f4f4f2; }
.variant-editor label { display:grid; gap:6px; color:var(--muted); font-size:12px; font-weight:800; }
.variant-editor textarea { min-height:92px; line-height:1.45; }
.variant-description { grid-column: span 2; }
.variant-editor-actions { grid-column:1 / -1; display:flex; flex-wrap:wrap; justify-content:flex-end; gap:7px; }
.merge-color-box { display:grid; grid-template-columns:minmax(220px,1fr) auto; gap:8px; width:min(560px,100%); padding:8px; border:1px solid rgba(255,255,255,.08); border-radius:12px; background:#0b0b0b; }
.merge-color-box input { min-height:38px; }
.merge-color-box button { min-height:38px; white-space:nowrap; }
.price-warning { grid-column: 1 / -1; display:flex; align-items:center; justify-content:space-between; gap:10px; padding:10px; color:#ffd18a; border:1px solid rgba(255,194,87,.35); border-radius:12px; background:rgba(255,194,87,.08); font-size:12px; }
.price-warning button { background:#b87514; }
.image-uploader { display: flex; min-height: 38px; align-items: center; justify-content: center; padding: 8px; color: var(--accent); border: 1px dashed rgba(223,31,45,.54); border-radius: 10px; cursor: pointer; font-size: 12px; font-weight: 800; text-align: center; }
.image-uploader input[type="file"] { display: none; }
.image-uploader.uploaded { color: #8fdcaa; border-color: rgba(71,172,107,.55); }
.image-uploader.upload-error { color: #ffb4b7; }
.add-variant { margin-top: 10px; padding: 10px; border: 1px dashed var(--line); border-radius: 12px; }
.add-variant summary { color: var(--accent); cursor: pointer; font-size: 13px; font-weight: 800; list-style: none; }
.product-editor { grid-template-columns: 1fr; gap: 14px; }
.editor-head { display:flex; align-items:flex-start; justify-content:space-between; gap:16px; }
.editor-head p { margin:5px 0 0; color:var(--muted); font-size:13px; }
.product-editor label { display:grid; gap:7px; color:var(--muted); font-size:12px; font-weight:800; }
.field-row { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:9px; align-items:end; }
.price-row { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:9px; }
.wide-field textarea { min-height:120px; }
.spec-editor { padding:14px; border:1px solid var(--line); border-radius:16px; background:#0c0c0c; }
.spec-editor-head { display:flex; align-items:center; justify-content:space-between; gap:14px; margin-bottom:10px; }
.spec-editor-head div { display:grid; gap:4px; }
.spec-editor-head span { color:var(--muted); font-size:12px; }
.spec-grid { display:grid; gap:8px; }
.spec-row { display:grid; grid-template-columns:minmax(160px,.55fr) minmax(220px,1fr) 38px; gap:8px; align-items:center; }
.spec-row button { width:38px; height:38px; color:#ffb4b7; border:1px solid rgba(223,31,45,.35); border-radius:10px; background:rgba(223,31,45,.12); font-size:20px; line-height:1; }
.photo-manager { padding:14px; border:1px solid var(--line); border-radius:16px; background:#0c0c0c; }
.photo-manager-head { display:flex; align-items:center; justify-content:space-between; gap:14px; }
.photo-manager-head div { display:grid; gap:4px; }
.photo-manager-head span { color:var(--muted); font-size:12px; }
.photo-upload { display:inline-flex!important; min-height:40px; align-items:center; justify-content:center; padding:0 14px; color:white!important; border-radius:999px; background:var(--accent); cursor:pointer; }
.photo-upload input { display:none; }
.photo-preview { display:grid; grid-template-columns:repeat(auto-fill,minmax(130px,1fr)); gap:10px; margin-top:13px; }
.photo-preview.is-loading { opacity:.65; }
.empty-photos { grid-column:1 / -1; padding:18px; color:var(--muted); border:1px dashed var(--line); border-radius:12px; text-align:center; }
.photo-tile { overflow:hidden; border:1px solid var(--line); border-radius:14px; background:var(--panel); }
.photo-tile.is-main { border-color:rgba(223,31,45,.8); box-shadow:0 0 0 1px rgba(223,31,45,.28); }
.photo-tile img { display:block; width:100%; aspect-ratio:1; object-fit:cover; background:#050505; }
.photo-tile div { display:grid; grid-template-columns:1fr 38px 38px; gap:6px; padding:7px; }
.photo-tile button { min-height:30px; padding:0 8px; color:var(--text); border:1px solid var(--line); border-radius:8px; background:var(--panel-soft); font-size:11px; font-weight:800; }
.photo-tile button:last-child { grid-column:1 / -1; color:#ffb4b7; border-color:rgba(223,31,45,.35); background:rgba(223,31,45,.12); }
.catalog-toolbar { grid-template-columns:minmax(220px,1fr) 180px 180px 190px; }
.bulk-actions-card {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  margin-top:12px;
  padding:14px 16px;
  border:1px solid rgba(223,31,45,.28);
  border-radius:17px;
  background:linear-gradient(135deg, rgba(223,31,45,.09), rgba(255,255,255,.035));
}
.bulk-actions-card div:first-child { display:grid; gap:5px; }
.bulk-actions-card b { color:var(--cream); }
.bulk-actions-card span { color:var(--muted); font-size:12px; }
.bulk-actions-controls { display:flex; flex-wrap:wrap; justify-content:flex-end; gap:8px; }
.bulk-actions-controls select {
  min-height:46px;
  min-width:230px;
  padding:0 14px;
  color:var(--text);
  border:1px solid var(--line);
  border-radius:999px;
  background:var(--panel);
}
.bulk-actions-controls .button { min-height:46px; padding-inline:17px; }
.danger-outline { color:#ffb4b7!important; border-color:rgba(223,31,45,.42)!important; background:rgba(75,23,25,.42)!important; }
.discount-actions { display:flex; align-items:center; gap:8px; }
.discount-actions input { width:160px; min-height:42px; padding:0 14px; color:var(--text); border:1px solid var(--line); border-radius:999px; background:var(--panel); }
.admin-toolbar .reset-filters.active { color:#fff; border-color:rgba(255,194,87,.55); background:rgba(255,194,87,.18); }
.discount-list { display:grid; gap:8px; margin-top:12px; }
.discount-row { display:grid; grid-template-columns:28px minmax(260px,1fr) 150px 160px; gap:14px; align-items:center; padding:14px; border:1px solid var(--line); border-radius:16px; background:var(--panel); }
.discount-row:hover { border-color:rgba(223,31,45,.48); }
.discount-row input { width:18px; height:18px; }
.discount-row span { display:grid; gap:5px; min-width:0; }
.discount-row strong { color:var(--cream); font-size:16px; }
.discount-row small { color:var(--muted); font-size:12px; }
.discount-row b { color:var(--cream); font-size:17px; white-space:nowrap; }
.discount-row i { color:#ffd18a; font-size:13px; font-style:normal; text-align:right; }
.promotion-editor { grid-template-columns:repeat(3,minmax(180px,1fr)); align-items:end; margin-top:18px; }
.promotion-editor h2, .promotion-editor .promotion-preview, .promotion-editor button { grid-column:auto; }
.promotion-editor .wide-field { grid-column:1 / -1; }
.promotion-preview { min-height:118px; display:grid; place-items:center; overflow:hidden; color:var(--muted); border:1px dashed var(--line); border-radius:14px; background:#0c0c0c; text-align:center; }
.promotion-preview img { display:block; width:100%; height:180px; object-fit:cover; }
.promotion-product-picker { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; max-height:260px; overflow:auto; padding:8px; border:1px solid var(--line); border-radius:12px; background:#0b0b0b; }
.promotion-product-picker label { display:grid; grid-template-columns:auto minmax(0,1fr); gap:3px 8px; align-items:center; min-height:54px; padding:8px; border:1px solid rgba(255,255,255,.06); border-radius:10px; background:#111; }
.promotion-product-picker input { width:auto; min-height:auto; }
.promotion-product-picker span, .promotion-product-picker small { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.promotion-product-picker small { grid-column:2; color:var(--muted); font-size:11px; }
.promotion-list { display:grid; gap:10px; margin-top:12px; }
.promotion-row { display:grid; grid-template-columns:220px minmax(220px,1fr) 130px 190px; gap:14px; align-items:center; padding:12px; border:1px solid var(--line); border-radius:18px; background:var(--panel); }
.promotion-row.is-hidden { opacity:.6; }
.promotion-row img { width:220px; height:104px; object-fit:cover; border-radius:12px; background:#f4f4f2; }
.promotion-row h3 { margin:0 0 6px; color:var(--cream); font-size:18px; letter-spacing:-.3px; }
.promotion-row p { margin:0; color:var(--muted); font-size:12px; overflow-wrap:anywhere; }
.promotion-row strong { color:var(--cream); }
.promotion-row-actions { display:flex; flex-wrap:wrap; justify-content:flex-end; gap:7px; }
.promotion-row-actions button { min-height:34px; padding:0 10px; color:white; border:0; border-radius:999px; background:#282828; font-size:12px; font-weight:800; }
.promotion-row-actions .danger-button { color:#ffb4b7; background:#4b1719; }
.category-tools { display:flex; gap:8px; margin-top:9px; }
.manager-catalog { gap:10px; }
.product-row { display:grid; grid-template-columns:72px minmax(240px,1fr) 130px 120px minmax(300px,auto); gap:14px; align-items:center; padding:12px; border:1px solid var(--line); border-radius:18px; background:rgba(255,255,255,.035); }
.product-row.is-hidden { opacity:.62; }
.product-row.has-price-mismatch { border-color:rgba(255,194,87,.55); }
.product-row > img { width:72px; height:72px; border-radius:14px; object-fit:cover; background:#050505; }
.product-row-main { min-width:0; }
.product-row-main h3 { margin:0 0 5px; color:var(--cream); font-size:17px; letter-spacing:-.3px; }
.product-row-main p { margin:0; color:var(--muted); font-size:13px; }
.product-row > strong { color:var(--cream); white-space:nowrap; }
.row-actions { display:flex; flex-wrap:wrap; justify-content:flex-end; gap:7px; }
.row-actions button { min-height:36px; padding:0 11px; color:white; border:0; border-radius:999px; background:#282828; font-size:12px; font-weight:800; }
.row-actions button:hover { background:#343434; }
.row-actions .danger-button { color:#ffb4b7; background:#4b1719; }
.taxonomy-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; margin-top:18px; }
.taxonomy-editor { grid-template-columns:1fr auto; align-items:end; }
.taxonomy-editor h2 { grid-column:1 / -1; }
.taxonomy-lists { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; margin-top:14px; }
.taxonomy-lists section { padding:16px; border:1px solid var(--line); border-radius:18px; background:var(--panel); }
.taxonomy-lists h3 { margin:0 0 10px; color:var(--muted); font-size:12px; letter-spacing:1.2px; text-transform:uppercase; }
.taxonomy-lists div { display:flex; flex-wrap:wrap; gap:7px; }
.taxonomy-lists span { padding:7px 10px; border:1px solid var(--line); border-radius:999px; background:rgba(255,255,255,.04); font-size:13px; }
@media (max-width: 820px) {
  .admin-heading, #access-form, .catalog-intro, .catalog-intro-actions, .discount-actions, .walkin-bar { align-items: stretch; flex-direction: column; }
  .dashboard-stats { grid-template-columns: repeat(2, 1fr); }
  .admin-toolbar, .catalog-toolbar, .admin-editor, .manager-fields, .variant-editor, .field-row, .price-row, .product-row, .taxonomy-grid, .taxonomy-lists, .taxonomy-editor, .spec-row, .discount-row, .promotion-editor, .promotion-row { grid-template-columns: 1fr; }
  .merge-color-box, .promotion-product-picker { grid-template-columns: 1fr; }
  .order-columns { grid-template-columns: 1fr; }
  .order-card summary, .manager-product > summary, .order-card footer { align-items: stretch; flex-direction: column; }
  .order-summary-meta, .manager-product-meta { justify-content: space-between; }
  .manager-actions { align-items: stretch; flex-direction: column; }
  .category-tools, .photo-manager-head, .editor-head, .row-actions, .bulk-actions-card, .bulk-actions-controls { align-items:stretch; flex-direction:column; }
  .bulk-actions-controls select { width:100%; min-width:0; }
  .product-row > img { width:100%; height:auto; aspect-ratio:16/10; }
  .promotion-row img { width:100%; height:auto; aspect-ratio:16/9; }
  .variant-editor-image { width:100%; height:auto; aspect-ratio:16/10; }
  .variant-description { grid-column:auto; }
  .discount-row i { text-align:left; }
  .row-actions { justify-content:stretch; }
}
