:root { --accent:#ed6c30; --ink:#101114; --muted:#66707d; --panel:#fff; --bg:#f4f2ef; --line:#dfe2e7; --dark:#17191d; }
* { box-sizing: border-box; }
body { margin: 0; font-family: "DM Sans", sans-serif; color: var(--ink); background: var(--bg); overflow-x: hidden; }
a { color: inherit; text-decoration: none; }
button, input, textarea { font: inherit; }
.login-body { min-height: 100vh; display: grid; place-items: center; background: linear-gradient(135deg, #101114, #3a332c); }
.login-card { width: min(420px, calc(100vw - 32px)); background: #fff; border-radius: 8px; padding: 34px; box-shadow: 0 30px 90px rgba(0,0,0,.24); display: grid; gap: 18px; }
.login-card img { width: 96px; }
.login-card h1 { margin: 0; font: 800 32px "Outfit", sans-serif; }
.login-card button, .admin-form button, .upload-form button, .save-bar, [data-add], .quick-actions a, .message-card button {
    border: 0; border-radius: 6px; background: var(--accent); color: #fff; min-height: 44px; padding: 0 18px; font-weight: 800; cursor: pointer; transition: transform .2s ease, background .2s ease;
}
button:hover, .quick-actions a:hover { transform: translateY(-1px); background: #d5591f; }
label { display: grid; gap: 8px; font-weight: 800; color: #333; }
input, textarea { width: 100%; border: 1px solid var(--line); border-radius: 6px; padding: 12px 14px; outline: none; background: #fff; }
input:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(237,108,48,.14); }
.admin-sidebar { position: fixed; inset: 0 auto 0 0; width: 270px; padding: 22px; background: var(--dark); color: #fff; overflow-y: auto; }
.admin-brand { display: flex; align-items: center; gap: 12px; min-width: 0; font-weight: 900; margin-bottom: 28px; }
.admin-brand img { width: 72px; background: #fff; border-radius: 4px; padding: 4px; }
.admin-brand span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-sidebar nav { display: grid; gap: 8px; }
.admin-sidebar a { padding: 12px 14px; border-radius: 6px; color: rgba(255,255,255,.78); transition: background .2s ease, color .2s ease; }
.admin-sidebar a:hover { background: rgba(255,255,255,.1); color: #fff; }
.admin-main { margin-left: 270px; padding: 28px; }
.admin-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 22px; }
.admin-top p { margin: 0 0 6px; color: var(--accent); font-weight: 900; text-transform: uppercase; }
.admin-top h1 { margin: 0; font: 800 38px "Outfit", sans-serif; }
.admin-panel, .dashboard-grid article, .media-grid article, .message-card {
    background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 24px; box-shadow: 0 18px 50px rgba(16,17,20,.06);
}
.dashboard-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 22px; }
.dashboard-grid strong { display: block; color: var(--accent); font-size: 42px; }
.dashboard-grid span { color: var(--muted); font-weight: 800; }
.quick-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 18px; }
.quick-actions a { display: inline-flex; align-items: center; }
.admin-flash { background: #fff3eb; color: #803100; border: 1px solid #ffc9ad; padding: 14px 16px; border-radius: 6px; margin-bottom: 18px; font-weight: 800; }
.admin-form { display: grid; gap: 22px; }
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.wide-field { grid-column: 1 / -1; }
.check-row { display: flex; grid-template-columns: none; align-items: center; gap: 10px; margin-bottom: 16px; }
.check-row input { width: auto; }
.repeat-row { border: 1px solid var(--line); border-radius: 8px; padding: 16px; margin: 12px 0; display: grid; grid-template-columns: repeat(2, 1fr) auto; gap: 12px; align-items: end; background: #fbfaf8; }
.repeat-row label:has(textarea) { grid-column: span 2; }
[data-remove], .message-card button { background: #30343a; }
.save-bar { position: sticky; bottom: 20px; width: 100%; min-height: 56px; font-size: 18px; }
.upload-form { display: flex; gap: 12px; align-items: center; }
.media-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 20px; }
.media-grid img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 6px; margin-bottom: 12px; }
.message-card { margin-bottom: 14px; }
.message-card div { display: flex; justify-content: space-between; gap: 12px; color: var(--muted); }
.hint { color: var(--muted); }
@media (prefers-color-scheme: dark) {
    body { background: #111214; color: #f8f6f2; }
    .admin-panel, .dashboard-grid article, .media-grid article, .message-card { background: #1a1c20; border-color: #2c3036; }
    input, textarea, .repeat-row { background: #111214; color: #fff; border-color: #333842; }
    label { color: #f8f6f2; }
}
@media (max-width: 1024px) { .dashboard-grid, .media-grid { grid-template-columns: repeat(2, 1fr); } .repeat-row { grid-template-columns: 1fr; } .repeat-row label:has(textarea) { grid-column: auto; } }
@media (max-width: 768px) {
    .admin-sidebar { position: static; width: auto; padding: 16px; }
    .admin-sidebar nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .admin-sidebar a { text-align: center; }
    .admin-main { margin-left: 0; padding: 18px; }
    .admin-top { gap: 12px; }
    .admin-top h1 { font-size: 30px; }
    .form-grid, .dashboard-grid, .media-grid { grid-template-columns: 1fr; }
    .upload-form, .admin-top { flex-direction: column; align-items: stretch; }
    .admin-panel, .dashboard-grid article, .media-grid article, .message-card { padding: 18px; }
    .save-bar { bottom: 10px; }
}
@media (max-width: 420px) {
    .admin-sidebar nav { grid-template-columns: 1fr; }
    .login-card { padding: 24px; }
    .repeat-row { padding: 12px; }
    .admin-top h1 { font-size: 26px; }
}
