:root {
    --red: #b00012;
    --red-2: #74000c;
    --red-3: #280307;
    --dark: #08090b;
    --panel: #111318;
    --panel-2: #171a21;
    --text: #f5f7fb;
    --muted: #a4adbb;
    --line: rgba(255, 255, 255, .12);
    --gold: #d7a642;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--text);
    background: linear-gradient(135deg, #050506, #140205 44%, #350008);
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.login-shell {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
}

.login-card {
    width: min(100%, 430px);
    padding: 34px;
    background: rgba(17, 19, 24, .92);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: 0 30px 90px rgba(0, 0, 0, .45);
}

.badge {
    display: inline-flex;
    width: fit-content;
    padding: 7px 10px;
    color: #ffd6d6;
    background: rgba(176, 0, 18, .22);
    border: 1px solid rgba(255, 50, 70, .35);
    border-radius: 4px;
    font-size: .75rem;
    font-weight: 900;
}

h1, h2, p { margin-top: 0; }
p { color: var(--muted); }

label {
    display: grid;
    gap: 8px;
    margin-top: 16px;
    color: #d8dde7;
    font-size: .9rem;
    font-weight: 800;
}

input, textarea, select {
    width: 100%;
    border: 1px solid rgba(255, 255, 255, .13);
    border-radius: 6px;
    padding: 12px 13px;
    color: var(--text);
    background: rgba(255, 255, 255, .06);
    font: inherit;
}

textarea { resize: vertical; }

button, .preview, .save-bar a, .logout {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    border: 0;
    border-radius: 6px;
    padding: 0 18px;
    color: #fff;
    background: linear-gradient(135deg, var(--red), var(--red-2));
    font-weight: 900;
    cursor: pointer;
}

.admin-layout {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    min-height: 100vh;
}

.sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    padding: 22px;
    background: rgba(8, 9, 11, .94);
    border-right: 1px solid var(--line);
}

.mark {
    display: flex;
    gap: 12px;
    align-items: center;
    padding-bottom: 22px;
    border-bottom: 1px solid var(--line);
}

.mark img {
    width: 52px;
    height: 52px;
    object-fit: contain;
    background: #050505;
    border-radius: 8px;
}

.mark strong, .mark span { display: block; }
.mark span { margin-top: 3px; color: var(--muted); font-size: .78rem; }

.sidebar nav {
    display: grid;
    gap: 8px;
    margin-top: 24px;
}

.sidebar nav a {
    padding: 12px 13px;
    color: #d9dee8;
    border: 1px solid transparent;
    border-radius: 6px;
    font-weight: 800;
}

.sidebar nav a:hover {
    background: rgba(176, 0, 18, .2);
    border-color: rgba(255, 255, 255, .12);
}

.logout {
    position: absolute;
    left: 22px;
    right: 22px;
    bottom: 22px;
}

.dashboard {
    padding: 30px;
}

.dash-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 24px;
}

.dash-head h1 {
    margin: 12px 0 8px;
    font-size: clamp(1.9rem, 4vw, 3.4rem);
    line-height: 1;
}

.panel {
    margin-bottom: 22px;
    padding: 24px;
    background: rgba(17, 19, 24, .88);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: 0 20px 70px rgba(0, 0, 0, .2);
}

.panel h2 {
    margin-bottom: 18px;
}

.grid {
    display: grid;
    gap: 16px;
}

.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.uploads img {
    width: 100%;
    height: 170px;
    object-fit: cover;
    padding: 10px;
    background: rgba(0, 0, 0, .28);
    border: 1px solid var(--line);
    border-radius: 6px;
}

.service-editor {
    display: grid;
    grid-template-columns: 54px minmax(180px, .55fr) minmax(260px, 1fr);
    gap: 14px;
    align-items: start;
    padding: 14px 0;
    border-top: 1px solid var(--line);
}

.service-editor span {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    color: #fff;
    background: var(--red);
    border-radius: 6px;
    font-weight: 900;
}

.alert {
    margin-bottom: 18px;
    padding: 13px 15px;
    border-radius: 6px;
    font-weight: 800;
}

.alert.success {
    color: #c6ffde;
    background: rgba(9, 122, 60, .22);
    border: 1px solid rgba(77, 255, 160, .2);
}

.alert.danger {
    color: #ffd1d1;
    background: rgba(176, 0, 18, .22);
    border: 1px solid rgba(255, 72, 88, .3);
}

.save-bar {
    position: sticky;
    bottom: 0;
    z-index: 10;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 16px;
    margin-top: 18px;
    background: rgba(8, 9, 11, .84);
    border: 1px solid var(--line);
    border-radius: 8px;
    backdrop-filter: blur(14px);
}

.save-bar a {
    background: rgba(255, 255, 255, .09);
}

@media (max-width: 980px) {
    .admin-layout { grid-template-columns: 1fr; }
    .sidebar { position: relative; height: auto; }
    .logout { position: static; margin-top: 18px; width: 100%; }
    .grid.two, .grid.three, .service-editor { grid-template-columns: 1fr; }
    .dash-head { display: block; }
    .preview { margin-top: 14px; }
}
