/* Lana Banana — панель управления */
* { margin: 0; padding: 0; box-sizing: border-box; }
:root {
  --bg: #f6f5f2;
  --card: #ffffff;
  --ink: #191815;
  --dim: #87837a;
  --line: #e5e2da;
  --accent: #6644ff;
  --accent-soft: color-mix(in srgb, var(--accent) 10%, transparent);
  --danger: #d93a3a;
  --radius: 14px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #141414; --card: #1d1d1d; --ink: #f1efe9; --dim: #8f8b82; --line: #2e2e2e; --accent-soft: color-mix(in srgb, var(--accent) 22%, transparent); }
}
body { background: var(--bg); color: var(--ink); font-family: 'Inter', -apple-system, sans-serif; -webkit-font-smoothing: antialiased; }
button, input, textarea, select { font: inherit; color: inherit; }
a { color: var(--accent); }
.hidden { display: none !important; }

input:not([type=color]):not([type=checkbox]):not([type=file]):not([type=radio]):not([type=range]), textarea, select {
  border: 1px solid var(--line);
  background: var(--bg);
  border-radius: 12px;
  padding: 13px 15px;
  outline: none;
  resize: vertical;
  width: 100%;
  font-size: 14.5px;
  transition: border-color .2s, box-shadow .2s, background .2s;
}
input:not([type=color]):not([type=checkbox]):not([type=file]):not([type=radio]):not([type=range]), select { min-height: 48px; }
input[type=range] { width: 100%; accent-color: var(--accent); margin-top: 10px; }
input:not([type=color]):not([type=checkbox]):not([type=file]):not([type=radio]):focus, textarea:focus, select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); background: var(--card); }
input::placeholder, textarea::placeholder { color: color-mix(in srgb, var(--dim) 70%, transparent); }

.btn { background: var(--accent); color: #fff; border: 0; border-radius: 10px; padding: 11px 18px; font-weight: 600; cursor: pointer; transition: filter .2s, transform .15s var(--ease); white-space: nowrap; }
.btn:hover { filter: brightness(1.08); }
.btn:active { transform: scale(.98); }
.btn.ghost, .ghost { background: var(--card); color: var(--ink); border: 1px solid var(--line); }
.ghost { border-radius: 10px; padding: 10px 16px; cursor: pointer; text-decoration: none; display: inline-block; }
.ghost:hover { border-color: var(--accent); color: var(--accent); }
.sm { padding: 7px 12px; font-size: 13px; }
.danger { color: var(--danger) !important; }
.error { color: var(--danger); font-size: 13px; min-height: 18px; }
.hint { color: var(--dim); font-size: 13px; line-height: 1.5; }
h2 { font-size: 24px; letter-spacing: -0.02em; font-weight: 700; }
h3 { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: var(--dim); margin-bottom: 14px; }
.pagehead { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 8px; }
.pagehead__actions { display: flex; gap: 8px; }

/* login */
.login { min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.login__card { width: min(380px, 100%); background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 36px 32px; display: flex; flex-direction: column; gap: 14px; box-shadow: 0 30px 60px rgba(0,0,0,.08); position: relative; }
.login-banana { position: absolute; right: -34px; bottom: -30px; width: 150px; pointer-events: none; display: block; transform: rotate(-18deg); filter: drop-shadow(0 16px 26px rgba(0, 0, 0, 0.28)); z-index: 2; animation: login-float 8s ease-in-out infinite; }
.login-banana img { width: 100%; display: block; }
@keyframes login-float { 0%, 100% { transform: rotate(-18deg) translateY(0); } 50% { transform: rotate(-14deg) translateY(-10px); } }
@media (prefers-reduced-motion: reduce) { .login-banana { animation: none; } }
@media (max-width: 460px) { .login-banana { width: 110px; right: -16px; bottom: -20px; } }
.login__card h1 { font-size: 24px; letter-spacing: -0.02em; display: flex; flex-direction: column; margin-bottom: 6px; }
.login__card h1 span { font-size: 11px; color: var(--dim); letter-spacing: .2em; text-transform: uppercase; margin-top: 6px; font-weight: 500; }

/* layout */
.panel { display: flex; min-height: 100vh; }
.side { width: 240px; flex: none; position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 6px; padding: 22px 16px; background: var(--card); border-right: 1px solid var(--line); }
.side__brand { font-weight: 700; font-size: 16px; letter-spacing: -0.01em; display: flex; flex-direction: column; padding: 4px 10px 16px; }
.side__brand span { color: var(--dim); font-weight: 500; font-size: 10px; text-transform: uppercase; letter-spacing: .16em; margin-top: 4px; }
.side__nav { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.snav { text-align: left; background: none; border: 0; border-radius: 10px; padding: 10px 14px; cursor: pointer; color: var(--dim); font-weight: 600; font-size: 14px; transition: background .2s, color .2s; display: flex; align-items: center; gap: 11px; }
.snav .ico { width: 17px; height: 17px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.snav:hover { color: var(--ink); background: color-mix(in srgb, var(--ink) 5%, transparent); }
.snav.is-active { background: var(--accent-soft); color: var(--accent); }
.snav em { font-style: normal; background: var(--danger); color: #fff; border-radius: 99px; padding: 1px 7px; font-size: 11px; margin-left: 4px; }
.side__foot { display: flex; flex-direction: column; gap: 8px; font-size: 13px; color: var(--dim); border-top: 1px solid var(--line); padding-top: 14px; }
.side__url { font-size: 11px; letter-spacing: 0.02em; opacity: 0.7; text-align: center; margin-top: -4px; }
.content { flex: 1; padding: 32px 36px 100px; max-width: 1100px; }
@media (max-width: 940px) {
  .panel { flex-direction: column; }
  .side { width: 100%; height: auto; position: static; flex-direction: row; align-items: center; flex-wrap: wrap; gap: 6px; padding: 12px 16px; }
  .side__brand { padding: 0 12px 0 0; flex-direction: row; align-items: baseline; gap: 8px; }
  .side__nav { flex-direction: row; flex-wrap: wrap; flex: 0; }
  .side__foot { flex-direction: row; border: 0; padding: 0; margin-left: auto; align-items: center; }
  .content { padding: 20px 16px 70px; }
}

/* cards & settings */
.settings { display: flex; flex-direction: column; gap: 18px; margin-top: 18px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; }
.card__head { display: flex; justify-content: space-between; align-items: center; }
.card__head h3 { margin-bottom: 0; }
.card h3 { margin-bottom: 16px; }
.count { color: var(--dim); font-size: 13px; }

/* RU|EN rows */
.langhead { display: grid; grid-template-columns: 130px 1fr 1fr; gap: 10px; margin-bottom: 8px; }
.langhead span:not(:empty) { font-size: 11px; font-weight: 700; letter-spacing: .08em; color: var(--dim); text-transform: none; }
.irow { display: grid; grid-template-columns: 130px 1fr 1fr; gap: 10px; align-items: start; margin-bottom: 10px; }
.irow__label { font-size: 13px; font-weight: 600; color: var(--dim); padding-top: 14px; line-height: 1.25; }
.irow__label small { font-weight: 400; font-size: 11px; }
.irow--tall .irow__label { padding-top: 13px; }
@media (max-width: 860px) {
  .langhead { grid-template-columns: 110px 1fr 1fr; }
  .irow { grid-template-columns: 110px 1fr 1fr; }
}
@media (max-width: 640px) {
  .langhead { display: none; }
  .irow { grid-template-columns: 1fr; }
  .irow__label { padding-top: 0; }
}

.frow { display: grid; gap: 12px; margin-bottom: 12px; }
.frow label, .field { display: block; font-size: 13px; font-weight: 600; color: var(--dim); }
.frow label small, .field small { display: block; font-weight: 400; margin: 2px 0 6px; }
.frow label input, .frow label select, .frow label textarea, .field input, .field select { margin-top: 6px; font-weight: 400; color: var(--ink); }
.frow--wide { grid-template-columns: 1fr 1fr; }
@media (max-width: 640px) { .frow--wide { grid-template-columns: 1fr; } }

/* switches */
.switch { display: flex; align-items: center; gap: 12px; cursor: pointer; padding: 8px 0; font-size: 14px; font-weight: 500; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch__track { width: 44px; height: 26px; border-radius: 99px; background: var(--line); position: relative; transition: background .25s var(--ease); flex: none; }
.switch__track::after { content: ''; position: absolute; left: 3px; top: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .25s var(--ease); }
.switch input:checked + .switch__track { background: var(--accent); }
.switch input:checked + .switch__track::after { transform: translateX(18px); }
.switch input:focus-visible + .switch__track { box-shadow: 0 0 0 3px var(--accent-soft); }

/* colors */
.colors { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
@media (max-width: 760px) { .colors { grid-template-columns: 1fr; } }
.colorfield { display: grid; grid-template-columns: 54px 1fr; grid-template-rows: auto auto; gap: 8px; align-items: center; }
.colorfield input[type=color] { grid-row: span 2; width: 54px; height: 54px; border: 1px solid var(--line); border-radius: 14px; padding: 4px; background: var(--bg); cursor: pointer; }
.colorfield input[type=text] { font-size: 13px; }
.colorfield span { font-size: 12px; color: var(--dim); }

/* about photo picker */
.photo-pick { display: grid; grid-template-columns: 200px 1fr; gap: 20px; align-items: center; }
@media (max-width: 760px) { .photo-pick { grid-template-columns: 1fr; } }
.photo-pick__stage { position: relative; aspect-ratio: 4/5; border-radius: 16px; overflow: hidden; background: var(--bg); border: 1px dashed var(--line); }
.photo-pick__stage img { width: 100%; height: 100%; object-fit: cover; display: block; transition: filter .3s; }
.photo-pick__empty { position: absolute; inset: 0; display: none; place-items: center; color: var(--dim); font-size: 13px; pointer-events: none; }
.photo-pick__stage.has-photo .photo-pick__empty { display: none; }
.photo-pick__overlay { position: absolute; inset: 0; display: flex; flex-direction: column; gap: 10px; align-items: center; justify-content: center; background: rgba(10,10,10,.5); opacity: 0; transition: opacity .25s; }
.photo-pick__stage:hover .photo-pick__overlay, .photo-pick__stage:focus-within .photo-pick__overlay { opacity: 1; }
.photo-pick__stage:not(.has-photo) .photo-pick__overlay { opacity: 1; background: transparent; }
.photo-pick__stage:not(.has-photo) .photo-pick__remove { display: none; }
.photo-pick__stage:not(.has-photo) .photo-pick__replace { background: transparent; color: var(--ink); border: 1.5px dashed var(--line); padding: 14px 22px; }
.photo-pick__stage:not(.has-photo) .photo-pick__replace:hover { border-color: var(--accent); color: var(--accent); }
.photo-pick__replace { cursor: pointer; background: #fff; color: #111; font-weight: 600; font-size: 14px; border-radius: 99px; padding: 10px 20px; transition: transform .2s var(--ease); }
.photo-pick__replace:hover { transform: scale(1.04); }
.photo-pick__remove { border: 0; background: transparent; color: #fff; font-size: 13px; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.photo-pick__side p { font-size: 14px; margin-bottom: 10px; }
.photo-pick__side select { max-width: 260px; }

/* product gallery */
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 10px; margin: 14px 0; }
.ph { position: relative; border-radius: 12px; overflow: hidden; aspect-ratio: 4/5; background: var(--bg); }
.ph img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ph button { position: absolute; right: 6px; bottom: 6px; width: 30px; height: 30px; border-radius: 8px; border: 0; background: rgba(0,0,0,.55); color: #fff; cursor: pointer; }
.ph button.danger { right: 6px; bottom: 42px; }
.ph__star { position: absolute; left: 6px; top: 6px; background: var(--accent); color: #fff; font-size: 10px; font-weight: 700; border-radius: 7px; padding: 3px 8px; text-transform: uppercase; letter-spacing: .04em; }
.dropzone { display: grid; place-items: center; border: 1.5px dashed var(--line); border-radius: 14px; padding: 22px 16px; text-align: center; color: var(--dim); font-size: 14px; cursor: pointer; transition: border-color .2s, color .2s, background .2s; line-height: 1.5; }
.dropzone small { font-size: 12px; opacity: .8; }
.dropzone:hover, .dropzone.drag { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }

/* products list */
.plist { display: flex; flex-direction: column; gap: 10px; margin-top: 16px; }
.prow { display: grid; grid-template-columns: 30px 60px 1fr auto; gap: 14px; align-items: center; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 16px; transition: box-shadow .2s; }
.prow:hover { box-shadow: 0 6px 20px rgba(0,0,0,.05); }
.prow__pos { color: var(--dim); font-weight: 700; text-align: center; }
.prow__thumb { width: 60px; height: 76px; object-fit: cover; border-radius: 10px; background: var(--bg); }
.prow__name { font-weight: 700; letter-spacing: -0.01em; }
.prow__meta { color: var(--dim); font-size: 13px; margin-top: 3px; }
.badge { font-style: normal; font-size: 11px; font-weight: 700; border-radius: 99px; padding: 3px 9px; margin-left: 8px; vertical-align: 2px; }
.badge.feat { background: var(--accent-soft); color: var(--accent); }
.badge.off { background: color-mix(in srgb, var(--danger) 12%, transparent); color: var(--danger); }
.badge.hold { background: #ffb02022; color: #b07810; }
.badge.sold { background: #d92b2b; color: #fff; letter-spacing: .08em; }
@media (prefers-color-scheme: dark) { .badge.hold { color: #ffc861; } }
.prow__controls { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.prow__controls button { border: 1px solid var(--line); background: var(--bg); border-radius: 9px; padding: 8px 11px; cursor: pointer; font-size: 13px; transition: border-color .2s, background .2s; }
.prow__controls button:hover { border-color: var(--accent); }
.prow__controls button.on { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); font-weight: 700; }
.prow__controls button.danger:hover { border-color: var(--danger); color: var(--danger); }

/* editor */
.edit-grid { display: grid; grid-template-columns: 1.35fr 1fr; gap: 16px; margin-top: 18px; align-items: start; }
@media (max-width: 960px) { .edit-grid { grid-template-columns: 1fr; } }

/* orders */
.olist { display: flex; flex-direction: column; gap: 12px; margin-top: 16px; }
.ocard { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; display: flex; flex-direction: column; gap: 8px; }
.ocard__head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.ocard .date { color: var(--dim); font-size: 13px; }
.ocard select { width: auto; font-weight: 700; }
.ocard__who { font-weight: 700; }
.ocard__items { color: var(--dim); font-size: 14px; }
.ocard__comment { font-size: 14px; }
.ocard .note { width: 100%; }
.ocard__foot { display: flex; gap: 8px; }
.ocard__del.danger { border-color: color-mix(in srgb, var(--danger) 35%, transparent); }

/* dashboard */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin: 18px 0 22px; }
.dcard { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.dcard b { font-size: 30px; letter-spacing: -0.03em; display: block; line-height: 1.1; }
.dcard span { color: var(--dim); font-size: 12px; text-transform: uppercase; letter-spacing: .06em; }
.dcard i { font-style: normal; color: var(--dim); font-size: 12px; display: block; margin-top: 6px; }
.dash-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 22px; }
@media (max-width: 800px) { .dash-cols { grid-template-columns: 1fr; } }
.dbox { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; min-height: 120px; }
.dlist { display: flex; flex-direction: column; }
.ditem { display: flex; gap: 10px; justify-content: space-between; align-items: baseline; padding: 8px 0; border-bottom: 1px dashed var(--line); font-size: 13.5px; }
.ditem:last-child { border: 0; }
.ditem .date { color: var(--dim); font-size: 12px; white-space: nowrap; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; }
.dash-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* users */
.ulist { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }
.urow { display: grid; grid-template-columns: 1.4fr 140px 1.4fr auto auto auto; gap: 10px; align-items: center; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 16px; }
.urow select, .urow input { padding: 9px 10px; }
@media (max-width: 960px) { .urow { grid-template-columns: 1fr 1fr; } .prow { grid-template-columns: 26px 48px 1fr; } .prow__controls { grid-column: 1 / -1; } }

/* notify */
.notify { display: flex; flex-direction: column; gap: 12px; }
.notify__row { display: flex; gap: 10px; }
.notify__row input { flex: 1; }

/* audit */
.audit { max-height: 420px; overflow: auto; }
.alog { font-size: 12.5px; padding: 6px 0; border-bottom: 1px dashed var(--line); color: var(--dim); }
.alog b { color: var(--ink); }
.alog span { opacity: .7; }

/* toast */
.toast { position: fixed; left: 50%; bottom: 26px; transform: translate(-50%, 120px); background: var(--ink); color: var(--bg); padding: 12px 22px; border-radius: 99px; font-weight: 600; font-size: 14px; transition: transform .4s var(--ease); z-index: 50; }
.toast.show { transform: translate(-50%, 0); }
.toast.bad { background: var(--danger); color: #fff; }
