/* Aurora admin surface — intentionally uses the same palette as the public site. */
.admin-page { min-height: 100vh; background: #060606; color-scheme: dark; }
.admin-shell { width: min(1240px, 100%); margin: 0 auto; padding: 30px clamp(16px, 4vw, 32px) 70px; }
.admin-topbar { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 4px 0 28px; border-bottom: 1px solid var(--border); }
.admin-brand { display: flex; align-items: center; gap: 13px; }
.admin-brand img { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 2px rgba(220,20,60,.48), 0 0 22px rgba(220,20,60,.2); }
.admin-brand h1 { font-size: 21px; }
.admin-brand p { color: var(--fg-muted); font-size: 10px; letter-spacing: .18em; text-transform: uppercase; margin-top: 3px; }
.admin-top-actions { display: flex; gap: 9px; align-items: center; }
.admin-btn { border: 1px solid var(--border-strong); border-radius: 7px; padding: 10px 14px; color: var(--fg); background: rgba(255,255,255,.045); font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; transition: .22s; }
.admin-btn:hover { border-color: var(--primary); color: var(--primary); transform: translateY(-1px); }
.admin-btn.primary { background: var(--primary); border-color: var(--primary); color: #fff; box-shadow: 0 5px 18px rgba(220,20,60,.22); }
.admin-btn.primary:hover { background: #ff1f50; color: #fff; }
.admin-btn.danger:hover { border-color: #ff536e; color: #ff536e; }
.admin-heading { display: flex; justify-content: space-between; gap: 20px; align-items: end; padding: 38px 0 22px; }
.admin-heading h2 { font-size: clamp(27px, 4vw, 42px); }
.admin-heading p { color: var(--fg-muted); font-size: 13px; margin-top: 7px; }
.stats-grid-admin { display: grid; grid-template-columns: repeat(4, 1fr); gap: 13px; margin-bottom: 20px; }
.admin-stat { padding: 18px; border: 1px solid var(--border); border-radius: 11px; background: linear-gradient(145deg, rgba(255,255,255,.045), rgba(255,255,255,.018)); }
.admin-stat-label { color: var(--fg-muted); font-size: 10px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.admin-stat-value { color: var(--accent); font-family: var(--font-serif); font-size: 30px; font-weight: 800; line-height: 1.1; margin-top: 6px; }
.admin-toolbar { display: grid; grid-template-columns: minmax(240px, 1fr) minmax(165px, 190px) minmax(165px, 190px) auto; align-items: center; gap: 10px; padding: 15px; border: 1px solid var(--border); border-radius: 11px; background: rgba(255,255,255,.025); margin-bottom: 20px; }
.admin-search, .admin-filter { display: block; min-width: 0; }
.admin-control, .admin-search input { width: 100%; min-width: 0; height: 42px; border: 1px solid var(--border-strong); border-radius: 7px; background: rgba(0,0,0,.42); color: var(--fg); padding: 11px 12px; font: inherit; font-size: 12px; outline: none; }
.admin-control { appearance: none; -webkit-appearance: none; color-scheme: dark; padding-right: 34px; background-image: linear-gradient(45deg, transparent 50%, var(--fg-muted) 50%), linear-gradient(135deg, var(--fg-muted) 50%, transparent 50%); background-position: calc(100% - 16px) 18px, calc(100% - 11px) 18px; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; }
.admin-control:focus, .admin-search input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(220,20,60,.11); }
.admin-control option { background-color: #151515; color: #ede5d4; color-scheme: dark; }
.admin-filter { position: relative; }
.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; }
.admin-status { color: var(--fg-muted); font-size: 11px; padding: 0 3px; }
.data-source { margin: -7px 0 20px; color: var(--fg-muted); font-size: 11px; }
.data-source strong { color: var(--accent); }
.admin-items { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.admin-item { display: grid; grid-template-columns: 108px 1fr; gap: 14px; padding: 12px; border: 1px solid var(--border); border-radius: 11px; background: rgba(14,14,14,.72); min-width: 0; transition: .25s; }
.admin-item:hover { border-color: rgba(220,20,60,.35); box-shadow: 0 12px 30px rgba(0,0,0,.22); }
.admin-item-image { width: 108px; height: 108px; border-radius: 8px; object-fit: cover; background: #111; border: 1px solid var(--border); }
.admin-item-main { min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.admin-item-head { display: flex; justify-content: space-between; gap: 10px; align-items: start; }
.admin-item h3 { font-size: 17px; line-height: 1.25; }
.admin-item-price { color: var(--accent); font-size: 15px; font-weight: 800; white-space: nowrap; }
.admin-item-meta { color: var(--primary); font-size: 10px; letter-spacing: .13em; text-transform: uppercase; font-weight: 700; }
.admin-item-desc { color: var(--fg-muted); font-size: 11px; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.admin-item-actions { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; padding-top: 7px; }
.item-action-group { display: flex; gap: 6px; }
.mini-btn { border: 1px solid var(--border-strong); border-radius: 6px; padding: 7px 9px; background: transparent; color: var(--fg-muted); font-size: 10px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.mini-btn:hover { border-color: var(--primary); color: var(--primary); }
.mini-btn.delete:hover { border-color: #ff536e; color: #ff536e; }
.availability { display: inline-flex; align-items: center; gap: 7px; color: var(--fg-muted); font-size: 10px; font-weight: 700; white-space: nowrap; cursor: pointer; }
.availability input { position: absolute; opacity: 0; pointer-events: none; }
.availability-track { width: 34px; height: 19px; border-radius: 20px; background: #333; position: relative; transition: .2s; }
.availability-track::after { content: ''; width: 13px; height: 13px; border-radius: 50%; background: #aaa; position: absolute; left: 3px; top: 3px; transition: .2s; }
.availability input:checked + .availability-track { background: #15833f; box-shadow: 0 0 10px rgba(34,197,94,.25); }
.availability input:checked + .availability-track::after { transform: translateX(15px); background: #caffd8; }
.admin-empty { grid-column: 1 / -1; text-align: center; padding: 65px 20px; color: var(--fg-muted); border: 1px dashed var(--border-strong); border-radius: 11px; }
.admin-empty strong { color: var(--fg); display: block; font-family: var(--font-serif); font-size: 21px; margin-bottom: 5px; }

.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: radial-gradient(circle at 50% 0, rgba(230,10,62,.12), transparent 38%); }
.login-card { width: min(420px, 100%); padding: clamp(26px, 6vw, 42px); border: 1px solid var(--border-strong); border-radius: 15px; background: rgba(14,14,14,.9); box-shadow: 0 24px 80px rgba(0,0,0,.5), 0 0 70px rgba(220,20,60,.07); }
.login-logo { width: 76px; height: 76px; border-radius: 50%; object-fit: cover; display: block; margin: 0 auto 18px; box-shadow: 0 0 0 2px rgba(220,20,60,.5), 0 0 32px rgba(220,20,60,.35); }
.login-card h1 { text-align: center; font-size: 27px; }
.login-card > p { text-align: center; color: var(--fg-muted); font-size: 12px; margin: 7px 0 28px; }
.login-field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 15px; }
.login-field label, .form-label { color: var(--fg-muted); font-size: 10px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.login-field input, .form-control { width: 100%; border: 1px solid var(--border-strong); border-radius: 8px; background: rgba(255,255,255,.035); color: var(--fg); padding: 12px; outline: none; font: inherit; font-size: 13px; }
.login-field input:focus, .form-control:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(220,20,60,.11); }
.login-error { color: #ff7e94; min-height: 18px; font-size: 11px; text-align: center; margin: 7px 0 10px; }
.login-note { text-align: center; color: rgba(255,255,255,.28); font-size: 10px; margin-top: 18px; }

.modal-backdrop { position: fixed; inset: 0; display: none; place-items: center; z-index: 500; padding: 18px; background: rgba(0,0,0,.8); backdrop-filter: blur(7px); }
.modal-backdrop.show { display: grid; }
.admin-modal { width: min(580px, 100%); max-height: min(740px, 92vh); overflow: auto; border: 1px solid var(--border-strong); border-radius: 13px; background: #101010; box-shadow: 0 30px 90px rgba(0,0,0,.7); }
.modal-head { display: flex; justify-content: space-between; align-items: center; padding: 17px 20px; border-bottom: 1px solid var(--border); }
.modal-head h2 { font-size: 21px; }
.modal-close { width: 31px; height: 31px; border-radius: 50%; border: 1px solid var(--border-strong); background: transparent; color: var(--fg-muted); font-size: 19px; }
.modal-close:hover { background: var(--primary); color: #fff; }
.modal-body { padding: 20px; display: grid; gap: 14px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; }
.form-field { display: grid; gap: 6px; }
.form-field.full { grid-column: 1 / -1; }
.optional-label { color: var(--fg-muted); font-size: 10px; font-weight: 400; letter-spacing: normal; text-transform: none; }
.field-help { color: var(--fg-muted); font-size: 10px; line-height: 1.4; }
.form-control { font-size: 12px; }
.form-control[type="url"], .form-control[type="number"], .form-control[type="text"], .form-control[type="search"] { min-width: 0; }
select.form-control { appearance: none; -webkit-appearance: none; color-scheme: dark; padding-right: 34px; background-color: #171717; background-image: linear-gradient(45deg, transparent 50%, var(--fg-muted) 50%), linear-gradient(135deg, var(--fg-muted) 50%, transparent 50%); background-position: calc(100% - 16px) 18px, calc(100% - 11px) 18px; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; }
select.form-control option { background-color: #151515; color: #ede5d4; color-scheme: dark; }
textarea.form-control { min-height: 86px; resize: vertical; }
.image-input-row { display: flex; gap: 10px; align-items: center; min-width: 0; }
.image-input-row input { flex: 1; }
.preview-image { width: 62px; height: 62px; border-radius: 7px; object-fit: cover; border: 1px solid var(--border-strong); background: #090909; }
.modal-foot { display: flex; justify-content: flex-end; gap: 9px; padding: 15px 20px; border-top: 1px solid var(--border); }
.toast { position: fixed; right: 20px; bottom: 20px; z-index: 600; max-width: min(380px, calc(100vw - 40px)); padding: 12px 16px; border-radius: 8px; background: #171717; border: 1px solid rgba(34,197,94,.5); color: #caffd8; font-size: 12px; box-shadow: 0 12px 28px rgba(0,0,0,.45); transform: translateY(18px); opacity: 0; pointer-events: none; transition: .25s; }
.toast.show { transform: translateY(0); opacity: 1; }
.toast.error { border-color: rgba(230,10,62,.6); color: #ffb1be; }

@media (max-width: 850px) {
  .stats-grid-admin { grid-template-columns: repeat(2, 1fr); }
  .admin-items { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .admin-toolbar { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .admin-search { grid-column: 1 / -1; }
  .admin-status { justify-self: end; }
}
@media (max-width: 560px) {
  .admin-shell { padding-top: 18px; }
  .admin-topbar, .admin-heading { align-items: flex-start; flex-direction: column; }
  .admin-top-actions { width: 100%; }
  .admin-top-actions .admin-btn { flex: 1; }
  .admin-heading { padding-top: 28px; }
  .admin-item { grid-template-columns: 84px 1fr; gap: 10px; }
  .admin-item-image { width: 84px; height: 84px; }
  .admin-item h3 { font-size: 15px; }
  .admin-item-actions { align-items: flex-start; flex-direction: column; }
  .form-grid { grid-template-columns: 1fr; }
  .form-field.full { grid-column: auto; }
  .admin-toolbar { grid-template-columns: 1fr; gap: 9px; padding: 12px; }
  .admin-search { grid-column: auto; }
  .admin-status { justify-self: start; padding: 2px 0 0; }
  .admin-control, .admin-search input { height: 44px; }
  .image-input-row { flex-wrap: wrap; }
  .image-input-row input { flex: 1 1 calc(100% - 74px); min-width: 0; }
  .image-input-row .mini-btn { flex: 0 0 auto; }
}