:root { font-family: Inter, ui-sans-serif, system-ui, sans-serif; color: #2a211c; background: #f5f1ed; --dark:#201915; --accent:#c96b3b; --line:#ded5ce; --muted:#75675f; }
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; display: grid; grid-template-columns: 240px 1fr; }
button, input, textarea, select { font: inherit; }
.sidebar { position: sticky; top: 0; height: 100vh; background: var(--dark); color: white; padding: 24px 18px; display: flex; flex-direction: column; }
.admin-brand { color: white; text-decoration: none; display: flex; align-items: center; gap: 12px; margin-bottom: 34px; }
.admin-brand span { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 13px; background: var(--accent); font-weight: 900; }
.sidebar nav { display: grid; gap: 7px; }
.nav-button, .logout { text-align: left; color: #d9cec8; border: 0; background: transparent; padding: 12px 14px; border-radius: 11px; cursor: pointer; }
.nav-button.active, .nav-button:hover { background: rgba(255,255,255,.1); color: white; }
.logout { margin-top: auto; color: #e8a49b; }
.admin-main { padding: 34px clamp(20px, 4vw, 60px) 80px; min-width: 0; }
.admin-header { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 28px; }
.admin-header p { margin: 0; color: var(--muted); text-transform: uppercase; letter-spacing: .14em; font-size: .73rem; font-weight: 850; }
.admin-header h1 { margin: 2px 0 0; font-size: clamp(2rem, 4vw, 3.5rem); }
.admin-header a { color: var(--accent); font-weight: 800; }
.hidden { display: none !important; }
.login-card { max-width: 580px; margin: 8vh auto; padding: 30px; background: white; border: 1px solid var(--line); border-radius: 22px; box-shadow: 0 20px 50px rgba(40,25,16,.09); }
.login-card h2 { margin-top: 0; }
.login-card p { color: var(--muted); line-height: 1.6; }
.login-card form { display: flex; gap: 10px; }
input, textarea, select { width: 100%; border: 1px solid var(--line); background: white; border-radius: 11px; padding: 11px 12px; outline: none; }
textarea { min-height: 90px; resize: vertical; }
input:focus, textarea:focus, select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(201,107,59,.12); }
button { border: 1px solid var(--line); background: white; border-radius: 11px; padding: 10px 14px; cursor: pointer; font-weight: 750; }
.primary, .login-card button { background: var(--accent); color: white; border-color: var(--accent); }
.toolbar { display: flex; align-items: center; justify-content: flex-end; gap: 10px; margin-bottom: 18px; }
.toolbar select { width: auto; min-width: 180px; }
.orders-list { display: grid; gap: 15px; }
.order-card { background: white; border: 1px solid var(--line); border-radius: 18px; padding: 20px; }
.order-top { display: flex; justify-content: space-between; gap: 15px; }
.order-top h3 { margin: 0; }
.order-meta { color: var(--muted); margin: 6px 0; }
.order-items { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin: 15px 0; padding: 12px 0; display: grid; gap: 6px; }
.order-item { display: flex; justify-content: space-between; gap: 15px; }
.order-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.order-actions select { width: auto; }
.status { border-radius: 999px; padding: 6px 10px; background: #f2e4da; font-size: .76rem; font-weight: 850; text-transform: uppercase; }
.data-grid { display: grid; gap: 10px; }
.data-row { display: grid; grid-template-columns: minmax(180px, 2fr) minmax(120px, 1fr) auto; gap: 15px; align-items: center; background: white; border: 1px solid var(--line); padding: 15px; border-radius: 14px; }
.data-row p { margin: 4px 0 0; color: var(--muted); }
.row-actions { display: flex; gap: 8px; }
.danger { color: #9c342b; }
.settings-form, .dialog-card { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.settings-form { background: white; border: 1px solid var(--line); border-radius: 18px; padding: 22px; }
label { display: grid; gap: 7px; font-weight: 750; }
.wide { grid-column: 1 / -1; }
.checkbox { display: flex; flex-direction: row; align-items: center; gap: 9px; }
.checkbox input { width: auto; }
.dialog { position: fixed; inset: 0; z-index: 40; display: grid; place-items: center; padding: 18px; }
.dialog-backdrop { position: absolute; inset: 0; background: rgba(25,18,14,.55); }
.dialog-card { position: relative; width: min(700px, 100%); max-height: calc(100vh - 36px); overflow: auto; background: #f9f6f3; border-radius: 20px; padding: 22px; box-shadow: 0 25px 80px rgba(0,0,0,.22); }
.dialog-card header { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--line); padding-bottom: 12px; }
.dialog-card header h2 { margin: 0; }
.dialog-card header button { font-size: 1.2rem; }
.admin-alert { background: #ffe5df; color: #872c24; border: 1px solid #efb1a9; border-radius: 12px; padding: 12px 14px; margin-bottom: 18px; }
@media (max-width: 800px) { body { display: block; } .sidebar { position: static; width: 100%; height: auto; padding: 14px; } .sidebar nav { display: flex; overflow-x: auto; } .admin-brand { margin-bottom: 12px; } .logout { margin-top: 10px; } .admin-main { padding-top: 24px; } .data-row { grid-template-columns: 1fr; } }
@media (max-width: 600px) { .admin-header { align-items: flex-start; flex-direction: column; } .settings-form, .dialog-card { grid-template-columns: 1fr; } .wide, .dialog-card header { grid-column: 1; } .login-card form { flex-direction: column; } }

.image-upload-field { display: grid; gap: 10px; padding: 14px; border: 1px dashed var(--line); border-radius: 14px; background: white; }
.image-upload-field input[type="file"] { padding: 9px; background: #faf8f6; }
.image-upload-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.image-upload-actions button { padding: 7px 10px; }
.image-upload-actions span { color: var(--muted); font-size: .85rem; }
.image-preview-wrap { width: min(220px, 100%); aspect-ratio: 4 / 3; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: #f3eeea; }
.image-preview-wrap img { width: 100%; height: 100%; object-fit: cover; display: block; }
.image-url-alternative { font-size: .86rem; color: var(--muted); }
.item-with-thumb { display: flex; align-items: center; gap: 12px; min-width: 0; }
.item-thumb { width: 58px; height: 58px; border-radius: 10px; object-fit: cover; flex: 0 0 auto; border: 1px solid var(--line); background: #f3eeea; }
