.admin-shell { min-height: 100vh; display: flex; flex-direction: column; }
.admin-header { position: sticky; top: 0; z-index: 30; background: rgba(10,10,10,0.95); backdrop-filter: blur(10px); border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 0.75rem; padding: 0.85rem 1.1rem; }
.admin-header h1 { font-size: 1rem; flex: 1; }
.admin-back { display: inline-flex; align-items: center; gap: 0.3rem; color: var(--text-secondary); font-size: 0.85rem; }
.admin-main { flex: 1; padding: 1.25rem 1.1rem 4rem; max-width: 720px; width: 100%; margin: 0 auto; }

/* Login */
.login-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 1.5rem; }
.login-card { width: 100%; max-width: 380px; background: var(--graphite); border: 1px solid var(--border); border-radius: var(--radius); padding: 2rem 1.5rem; text-align: center; }
.login-card h1 { font-size: 1.3rem; margin-bottom: 0.4rem; }
.login-card p { color: var(--text-secondary); font-size: 0.85rem; margin: 0 0 1.5rem; }
.login-form { text-align: left; }

/* Dashboard */
.stat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.8rem; margin-bottom: 1.5rem; }
.stat-card { background: var(--graphite); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.1rem; }
.stat-card .stat-value { font-family: var(--font-display); font-weight: 800; font-size: 1.8rem; color: var(--gold); }
.stat-card .stat-label { font-size: 0.75rem; color: var(--text-secondary); text-transform: uppercase; }
.dashboard-actions { display: flex; flex-direction: column; gap: 0.7rem; }
.dashboard-actions .btn { justify-content: flex-start; padding: 1rem 1.25rem; font-size: 0.95rem; }
.dashboard-actions .btn-primary { font-size: 1.05rem; padding: 1.15rem 1.25rem; }

/* Product list */
.admin-toolbar { display: flex; flex-direction: column; gap: 0.7rem; margin-bottom: 1.25rem; }
.admin-search { display: flex; align-items: center; gap: 0.5rem; background: var(--graphite); border: 1px solid var(--border); border-radius: 10px; padding: 0.7rem 0.9rem; }
.admin-search input { background: none; border: none; color: var(--text-primary); width: 100%; font-size: 0.9rem; }
.admin-search input:focus { outline: none; }
.admin-filter-chips { display: flex; gap: 0.5rem; overflow-x: auto; }
.admin-filter-chips button { flex-shrink: 0; padding: 0.5rem 0.9rem; border-radius: 999px; background: var(--graphite); border: 1px solid var(--border); font-size: 0.78rem; color: var(--text-secondary); }
.admin-filter-chips button.is-active { background: var(--gold); color: #1A1300; border-color: var(--gold); }

.admin-product-card { display: flex; gap: 0.9rem; background: var(--graphite); border: 1px solid var(--border); border-radius: var(--radius); padding: 0.9rem; margin-bottom: 0.8rem; }
.admin-product-thumb { width: 68px; height: 68px; border-radius: 10px; flex-shrink: 0; overflow: hidden; }
.admin-product-info { flex: 1; min-width: 0; }
.admin-product-info h3 { font-size: 0.9rem; font-family: var(--font-body); text-transform: none; margin: 0 0 0.2rem; }
.admin-product-meta { font-size: 0.75rem; color: var(--text-secondary); margin: 0 0 0.4rem; }
.admin-product-tags { display: flex; gap: 0.35rem; flex-wrap: wrap; margin-bottom: 0.5rem; }
.tag { font-size: 0.62rem; font-weight: 700; padding: 2px 7px; border-radius: 999px; text-transform: uppercase; }
.tag-active { background: rgba(52,214,122,0.15); color: var(--success); }
.tag-hidden { background: rgba(255,255,255,0.08); color: var(--text-secondary); }
.tag-soldout { background: rgba(229,72,77,0.15); color: var(--danger); }
.tag-low { background: rgba(212,175,55,0.15); color: var(--gold); }
.admin-product-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; }

/* Form blocks */
.form-block { background: var(--graphite); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.1rem; margin-bottom: 1.1rem; }
.form-block h2 { font-size: 0.85rem; font-family: var(--font-body); text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-secondary); margin: 0 0 0.9rem; }
.form-row { display: grid; grid-template-columns: 1fr; gap: 0.9rem; }
.form-toggle-row { display: flex; align-items: center; justify-content: space-between; padding: 0.6rem 0; border-bottom: 1px solid var(--border); }
.form-toggle-row:last-child { border-bottom: none; }
.switch { position: relative; width: 44px; height: 26px; border-radius: 999px; background: var(--elevated); border: 1px solid var(--border); flex-shrink: 0; }
.switch.is-on { background: var(--gold); border-color: var(--gold); }
.switch-knob { position: absolute; top: 2px; left: 2px; width: 20px; height: 20px; border-radius: 999px; background: #fff; transition: transform 0.15s ease; }
.switch.is-on .switch-knob { transform: translateX(18px); background: #1A1300; }

.sticky-save-bar { position: sticky; bottom: 0; background: rgba(10,10,10,0.95); backdrop-filter: blur(10px); border-top: 1px solid var(--border); padding: 0.9rem 1.1rem; margin: 0 -1.1rem; display: flex; gap: 0.7rem; }

/* Photo uploader */
.photo-upload-actions { display: flex; gap: 0.6rem; margin-bottom: 1rem; }
.photo-upload-actions .btn { flex: 1; }
.photo-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.6rem; }
.photo-tile { position: relative; aspect-ratio: 1; border-radius: 10px; overflow: hidden; border: 1px solid var(--border); }
.photo-tile img { width: 100%; height: 100%; object-fit: cover; }
.photo-tile-primary-badge { position: absolute; top: 4px; left: 4px; background: var(--gold); color: #1A1300; font-size: 0.6rem; font-weight: 800; padding: 2px 6px; border-radius: 999px; }
.photo-tile-actions { position: absolute; inset: 0; background: rgba(0,0,0,0.55); opacity: 0; display: flex; align-items: center; justify-content: center; gap: 0.4rem; transition: opacity 0.15s ease; }
.photo-tile:active .photo-tile-actions, .photo-tile:focus-within .photo-tile-actions { opacity: 1; }
.photo-tile-actions button { width: 30px; height: 30px; border-radius: 999px; background: rgba(255,255,255,0.15); color: #fff; display: flex; align-items: center; justify-content: center; }
.photo-empty-hint { font-size: 0.78rem; color: var(--text-secondary); text-align: center; padding: 1rem; }

/* Stock editor */
.stock-row { display: flex; align-items: center; justify-content: space-between; padding: 0.7rem 0; border-bottom: 1px solid var(--border); }
.stock-row:last-child { border-bottom: none; }
.stock-size-label { font-weight: 700; font-size: 0.95rem; width: 46px; }
.stock-controls { display: flex; align-items: center; gap: 0.7rem; }
.stock-btn { width: 36px; height: 36px; border-radius: 999px; background: var(--elevated); border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; }
.stock-btn:disabled { opacity: 0.3; }
.stock-qty { min-width: 28px; text-align: center; font-weight: 700; }
.stock-remove-size { color: var(--text-secondary); }
.add-size-row { display: flex; gap: 0.6rem; align-items: center; margin-top: 0.8rem; }
.add-size-row select { flex: 1; }

/* Sale / entry modal */
.simple-modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.65); z-index: 90; display: flex; align-items: flex-end; justify-content: center; }
.simple-modal-panel { width: 100%; max-width: 420px; background: var(--graphite); border-radius: 20px 20px 0 0; padding: 1.25rem; }
.simple-modal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1rem; }
.stock-pick-grid { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1.25rem; }
.stock-pick-btn { border: 1px solid var(--border); padding: 0.6rem 0.9rem; border-radius: 10px; font-size: 0.85rem; text-align: center; min-width: 64px; }
.stock-pick-btn small { display: block; color: var(--text-secondary); font-size: 0.65rem; margin-top: 2px; }
.stock-pick-btn.is-active { border-color: var(--gold); background: rgba(212,175,55,0.1); }
.stock-pick-btn:disabled { opacity: 0.3; }

@media (min-width: 600px) {
  .form-row.two-col { grid-template-columns: 1fr 1fr; }
  .stat-grid { grid-template-columns: repeat(4, 1fr); }
}
