:root {
    --black: #060504;
    --panel: #100b07;
    --panel-2: #181008;
    --line: rgba(255, 191, 60, 0.24);
    --gold: #d99a25;
    --gold-bright: #ffc447;
    --orange: #e16818;
    --white: #fffaf1;
    --muted: #bdb3a5;
    --danger: #f27777;
    --success: #73cc82;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

[hidden] {
    display: none !important;
}
html { min-height: 100%; }
body {
    min-height: 100vh;
    overflow-x: hidden;
    background: var(--black);
    color: var(--white);
    font-family: "Montserrat", Arial, sans-serif;
}
button, input, textarea, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }

.admin-background {
    position: fixed;
    inset: 0;
    z-index: -2;
    background:
        radial-gradient(circle at 15% 15%, rgba(224, 80, 18, 0.2), transparent 28%),
        radial-gradient(circle at 85% 75%, rgba(217, 154, 37, 0.13), transparent 28%),
        linear-gradient(145deg, #050403, #130a05 55%, #050403);
}

.admin-background::before {
    content: "";
    position: absolute;
    inset: 0;
    opacity: 0.1;
    background-image: repeating-linear-gradient(120deg, transparent 0 38px, rgba(255,255,255,0.04) 39px 40px);
}

.admin-shell { min-height: 100vh; }
.login-panel {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 32px 18px;
}
.login-card {
    width: min(470px, 100%);
    padding: 34px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: linear-gradient(145deg, rgba(18, 11, 7, 0.96), rgba(7, 6, 5, 0.98));
    box-shadow: 0 35px 100px rgba(0,0,0,0.62);
    text-align: center;
}
.admin-logo img { width: 165px; height: 110px; object-fit: contain; }
.admin-kicker {
    display: block;
    margin: 12px 0 9px;
    color: var(--gold-bright);
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}
.login-card h1, .dashboard-intro h1 {
    font-family: "Cinzel", Georgia, serif;
    font-size: clamp(1.75rem, 5vw, 2.6rem);
}
.login-card > p { margin: 12px auto 25px; color: var(--muted); line-height: 1.65; }
.admin-form { display: grid; gap: 16px; text-align: left; }
.admin-form label > span, .editor-field > span {
    display: block;
    margin-bottom: 7px;
    color: #ddd3c5;
    font-size: 0.76rem;
    font-weight: 700;
}
.input-with-icon { position: relative; }
.input-with-icon > i {
    position: absolute;
    top: 50%; left: 15px;
    color: var(--gold);
    transform: translateY(-50%);
}
.input-with-icon input { padding-left: 45px; padding-right: 45px; }
input, textarea, select {
    width: 100%;
    border: 1px solid rgba(255,255,255,0.11);
    border-radius: 11px;
    outline: none;
    background: rgba(255,255,255,0.045);
    color: var(--white);
    transition: border-color .2s, box-shadow .2s;
}
input, select { min-height: 48px; padding: 0 13px; }
textarea { min-height: 110px; padding: 13px; resize: vertical; }
input:focus, textarea:focus, select:focus {
    border-color: rgba(255, 190, 58, 0.58);
    box-shadow: 0 0 0 3px rgba(217,154,37,0.09);
}
.password-toggle {
    position: absolute; top: 50%; right: 10px;
    width: 34px; height: 34px;
    border: 0; background: transparent; color: var(--muted); cursor: pointer;
    transform: translateY(-50%);
}
.admin-button {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    padding: 10px 17px;
    border: 1px solid transparent;
    border-radius: 10px;
    cursor: pointer;
    text-decoration: none;
    font-weight: 800;
    transition: .22s ease;
}
.admin-button:hover { transform: translateY(-2px); }
.admin-button:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.admin-button-primary { background: linear-gradient(135deg, var(--gold-bright), #ee9a20); color: #130c05; }
.admin-button-outline { border-color: rgba(255,190,58,.35); background: rgba(217,154,37,.06); color: var(--gold-bright); }
.link-button { border: 0; background: transparent; color: var(--gold-bright); cursor: pointer; font-weight: 700; }
.back-site { display: inline-flex; gap: 8px; margin-top: 24px; color: var(--muted); text-decoration: none; font-size: .82rem; }
.status-message {
    margin-top: 18px;
    padding: 12px 14px;
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 10px;
    background: rgba(255,255,255,.04);
    color: var(--muted);
    font-size: .83rem;
    line-height: 1.5;
}
.status-message.success { border-color: rgba(115,204,130,.32); color: var(--success); }
.status-message.error { border-color: rgba(242,119,119,.34); color: var(--danger); }

.dashboard { min-height: 100vh; }
.dashboard-header {
    position: sticky; top: 0; z-index: 10;
    min-height: 82px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 25px;
    padding: 11px clamp(18px, 4vw, 58px);
    border-bottom: 1px solid var(--line);
    background: rgba(6,5,4,.9);
    backdrop-filter: blur(14px);
}
.dashboard-brand { display: flex; align-items: center; gap: 13px; color: var(--white); text-decoration: none; }
.dashboard-brand img { width: 74px; height: 57px; object-fit: contain; }
.dashboard-brand strong, .dashboard-brand span { display: block; }
.dashboard-brand strong { font-family: "Cinzel", Georgia, serif; }
.dashboard-brand span { margin-top: 3px; color: var(--muted); font-size: .72rem; }
.dashboard-user { display: flex; align-items: center; gap: 16px; }
.dashboard-user > div { text-align: right; }
.dashboard-user span, .dashboard-user strong { display: block; }
.dashboard-user span { color: var(--muted); font-size: .68rem; }
.dashboard-user strong { max-width: 280px; overflow: hidden; text-overflow: ellipsis; font-size: .78rem; }
.dashboard-content { width: min(1240px, calc(100% - 36px)); margin: 0 auto; padding: 46px 0 80px; }
.dashboard-intro { display: flex; justify-content: space-between; align-items: flex-end; gap: 30px; margin-bottom: 28px; }
.dashboard-intro p { max-width: 710px; margin-top: 10px; color: var(--muted); line-height: 1.65; }
.dashboard-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.dashboard-status { margin: 0 0 22px; }
.summary-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 15px; margin-bottom: 28px; }
.summary-grid article {
    display: flex; align-items: center; gap: 14px;
    padding: 18px;
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 15px;
    background: rgba(255,255,255,.035);
}
.summary-grid i { color: var(--gold-bright); font-size: 1.35rem; }
.summary-grid strong, .summary-grid span { display: block; }
.summary-grid strong { font-size: 1.35rem; }
.summary-grid span { margin-top: 2px; color: var(--muted); font-size: .72rem; }
.editor-list { display: grid; gap: 18px; }
.admin-loading { padding: 50px; text-align: center; color: var(--muted); }
.admin-loading i { margin-right: 8px; color: var(--gold); }

.oven-editor {
    overflow: hidden;
    border: 1px solid rgba(255,190,58,.18);
    border-radius: 18px;
    background: linear-gradient(145deg, rgba(18,11,7,.96), rgba(8,7,6,.97));
}
.oven-editor-header {
    display: flex; align-items: center; justify-content: space-between; gap: 18px;
    padding: 18px 20px;
    border-bottom: 1px solid rgba(255,255,255,.07);
}
.oven-editor-title { display: flex; align-items: center; gap: 13px; }
.oven-editor-title i { display: grid; width: 42px; height: 42px; place-items: center; border-radius: 12px; background: rgba(217,154,37,.1); color: var(--gold-bright); }
.oven-editor-title strong, .oven-editor-title span { display: block; }
.oven-editor-title strong { font-family: "Cinzel", Georgia, serif; }
.oven-editor-title span { margin-top: 4px; color: var(--muted); font-size: .7rem; }
.active-toggle { display: inline-flex; align-items: center; gap: 9px; color: var(--muted); font-size: .75rem; font-weight: 700; cursor: pointer; }
.active-toggle input { width: 18px; min-height: 18px; accent-color: var(--gold); }
.oven-editor-body { padding: 20px; }
.editor-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.editor-grid .span-2 { grid-column: span 2; }
.editor-grid .span-3 { grid-column: 1 / -1; }
.editor-field input[type="number"] { font-variant-numeric: tabular-nums; }
.editor-footer { display: flex; justify-content: flex-end; gap: 10px; padding-top: 18px; }
.editor-save-state { margin-right: auto; align-self: center; color: var(--muted); font-size: .76rem; }

@media (max-width: 900px) {
    .dashboard-intro { align-items: flex-start; flex-direction: column; }
    .dashboard-actions { justify-content: flex-start; }
    .summary-grid { grid-template-columns: 1fr; }
    .editor-grid { grid-template-columns: 1fr 1fr; }
    .editor-grid .span-3 { grid-column: 1 / -1; }
}

@media (max-width: 640px) {
    .login-card { padding: 27px 20px; }
    .dashboard-header { align-items: flex-start; flex-direction: column; }
    .dashboard-user { width: 100%; justify-content: space-between; }
    .dashboard-user > div { text-align: left; }
    .dashboard-user strong { max-width: 190px; }
    .dashboard-content { width: calc(100% - 24px); padding-top: 28px; }
    .dashboard-actions, .dashboard-actions .admin-button { width: 100%; }
    .editor-grid { grid-template-columns: 1fr; }
    .editor-grid .span-2, .editor-grid .span-3 { grid-column: auto; }
    .oven-editor-header { align-items: flex-start; flex-direction: column; }
    .editor-footer { flex-direction: column; }
    .editor-footer .admin-button { width: 100%; }
    .editor-save-state { margin: 0 0 5px; }
}
