:root {
    --ink: #10201d;
    --muted: #65736d;
    --line: #d9e3dd;
    --paper: #f4f8f5;
    --white: #ffffff;
    --green: #0e302f;
    --green-2: #15594e;
    --coral: #df6f4c;
    --danger: #b91c1c;
    --success: #1f7a4e;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    color: var(--ink);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: var(--paper);
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
textarea,
select {
    font: inherit;
}

.admin-body {
    min-height: 100vh;
}

.admin-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: 260px;
    display: flex;
    flex-direction: column;
    padding: 22px;
    color: rgba(255, 255, 255, .78);
    background: var(--green);
}

.admin-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 30px;
    color: var(--white);
}

.admin-brand span {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    color: var(--green);
    background: var(--white);
    font-weight: 900;
}

.admin-brand span img {
    width: 78%;
    height: 78%;
    object-fit: contain;
}

.admin-sidebar nav {
    display: grid;
    gap: 6px;
}

.admin-sidebar nav a {
    min-height: 42px;
    display: flex;
    align-items: center;
    padding: 10px 12px;
    border-radius: 8px;
}

.admin-sidebar nav a:hover,
.admin-sidebar nav a.is-active {
    color: var(--white);
    background: rgba(255, 255, 255, .12);
}

.admin-profile {
    margin-top: auto;
    padding-top: 18px;
    border-top: 1px solid rgba(255, 255, 255, .14);
}

.admin-profile small,
.admin-profile strong {
    display: block;
}

.admin-profile button {
    width: 100%;
    min-height: 40px;
    margin-top: 12px;
    border: 1px solid rgba(255, 255, 255, .28);
    border-radius: 8px;
    color: var(--white);
    background: transparent;
    cursor: pointer;
}

.admin-main {
    margin-left: 260px;
    padding: 34px;
}

.admin-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 24px;
}

.admin-kicker {
    color: var(--coral);
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

h1,
h2,
h3,
p {
    margin-top: 0;
}

.admin-topbar h1 {
    margin-bottom: 0;
    font-size: 34px;
    line-height: 1.1;
}

.admin-btn {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--ink);
    background: var(--white);
    cursor: pointer;
    font-weight: 800;
}

.admin-btn-primary {
    color: var(--white);
    border-color: var(--green-2);
    background: var(--green-2);
}

.admin-muted-link {
    color: var(--green-2);
    font-weight: 800;
}

.admin-alert {
    margin-bottom: 18px;
    padding: 14px 16px;
    border-radius: 8px;
    border: 1px solid var(--line);
    background: var(--white);
    font-weight: 700;
}

.admin-alert-success {
    color: var(--success);
    border-color: #b9dfc9;
    background: #edf9f1;
}

.admin-alert-error {
    color: var(--danger);
    border-color: #f1b9b9;
    background: #fff1f1;
}

.admin-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 22px;
}

.admin-stats article,
.admin-panel,
.login-card {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--white);
    box-shadow: 0 18px 45px rgba(16, 32, 29, .07);
}

.admin-stats article {
    padding: 22px;
}

.admin-stats span,
.admin-stats strong {
    display: block;
}

.admin-stats span {
    color: var(--muted);
}

.admin-stats strong {
    margin-top: 6px;
    font-size: 34px;
}

.admin-panel {
    margin-bottom: 20px;
    padding: 24px;
}

.admin-panel-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 22px;
}

.admin-panel-head h2 {
    margin-bottom: 0;
}

.admin-table-wrap {
    overflow-x: auto;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
}

.admin-table th,
.admin-table td {
    padding: 14px 12px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: top;
}

.admin-table th {
    color: var(--muted);
    font-size: 12px;
    text-transform: uppercase;
}

.admin-table small {
    display: block;
    color: var(--muted);
}

.status {
    display: inline-flex;
    min-height: 28px;
    align-items: center;
    padding: 5px 9px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 900;
}

.status-published {
    color: var(--success);
    background: #eaf8ef;
}

.status-draft {
    color: #8a5b00;
    background: #fff6dd;
}

.table-actions {
    display: flex;
    gap: 10px;
}

.table-actions button {
    border: 0;
    color: var(--danger);
    background: transparent;
    cursor: pointer;
    font-weight: 800;
}

.admin-empty {
    padding: 30px;
    border: 1px dashed #b8cbc1;
    border-radius: 8px;
    background: var(--paper);
}

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

.login-card {
    width: min(440px, 100%);
    padding: 30px;
}

.login-brand {
    color: var(--ink);
}

.login-brand span {
    color: var(--white);
    background: var(--green);
}

.admin-form,
.editor-layout,
.landing-editor,
.editor-section {
    display: grid;
    gap: 16px;
}

.editor-layout {
    grid-template-columns: minmax(0, 1fr) 340px;
    align-items: start;
}

.editor-main,
.editor-side {
    display: grid;
    gap: 16px;
}

label,
.localized-field {
    display: grid;
    gap: 7px;
    color: #263531;
    font-weight: 800;
}

.localized-field {
    padding: 14px;
    border: 1px solid #e4ebe7;
    border-radius: 8px;
    background: #fbfdfb;
}

.localized-field span {
    color: var(--green);
}

.localized-field label {
    font-weight: 700;
}

input,
textarea,
select {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 11px 12px;
    color: var(--ink);
    background: var(--white);
}

textarea {
    resize: vertical;
}

label small {
    color: var(--muted);
    font-weight: 500;
}

.feature-preview {
    width: 100%;
    max-height: 210px;
    object-fit: cover;
    border: 1px solid var(--line);
    border-radius: 8px;
}

.large-preview {
    max-height: 360px;
}

.two-col {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(300px, .8fr);
    gap: 20px;
    align-items: start;
}

.repeatable-group {
    display: grid;
    gap: 14px;
    padding-top: 10px;
}

.repeatable-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.repeatable-head h3 {
    margin-bottom: 0;
}

[data-repeatable-list] {
    display: grid;
    gap: 14px;
}

.repeatable-item {
    position: relative;
    display: grid;
    gap: 12px;
    padding: 18px;
    border: 1px solid #dfe8e3;
    border-radius: 8px;
    background: #fbfdfb;
}

.compact-repeatable {
    grid-template-columns: minmax(0, 1fr);
}

.remove-item {
    justify-self: end;
    border: 0;
    color: var(--danger);
    background: transparent;
    cursor: pointer;
    font-weight: 900;
}

.check-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.check-row input[type="checkbox"] {
    width: 18px;
    height: 18px;
}

.sticky-save {
    position: sticky;
    bottom: 0;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin: 8px 0 24px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255, 255, 255, .94);
    box-shadow: 0 -12px 34px rgba(16, 32, 29, .09);
    backdrop-filter: blur(14px);
}

@media (max-width: 980px) {
    .admin-sidebar {
        position: static;
        width: auto;
    }

    .admin-main {
        margin-left: 0;
        padding: 22px;
    }

    .editor-layout,
    .two-col,
    .admin-stats {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 680px) {
    .admin-topbar,
    .admin-panel-head,
    .repeatable-head,
    .sticky-save {
        align-items: stretch;
        flex-direction: column;
    }
}
