:root {
    --red: #d71920;
    --red-dark: #a70d12;
    --black: #111315;
    --charcoal: #1d2024;
    --muted: #6f7782;
    --line: #e4e7eb;
    --surface: #f5f6f7;
    --white: #ffffff;
    --green: #12805c;
    --amber: #b86800;
    --danger: #b42318;
    --shadow: 0 24px 70px rgba(17, 19, 21, 0.12);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--black);
    background: var(--white);
    font-family: Inter, "Segoe UI", Roboto, Arial, sans-serif;
    line-height: 1.6;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input {
    font: inherit;
}

.container {
    width: min(1180px, calc(100% - 40px));
    margin-inline: auto;
}

.site-header {
    position: relative;
    z-index: 5;
    color: var(--white);
    background: var(--black);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.header-inner,
.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    min-height: 82px;
}

.brand,
.admin-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
}

.brand-mark {
    display: grid;
    width: 46px;
    height: 46px;
    place-items: center;
    color: var(--white);
    background: var(--red);
    border-radius: 12px 3px 12px 3px;
    font-size: 26px;
    font-weight: 900;
}

.brand strong,
.admin-brand strong {
    display: block;
    letter-spacing: 0.08em;
}

.brand small,
.admin-brand small {
    display: block;
    margin-top: -2px;
    color: #aeb4bc;
    font-size: 11px;
}

.header-contact {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    font-size: 14px;
}

.header-contact strong {
    color: #ff5a5f;
}

.hero {
    position: relative;
    overflow: hidden;
    color: var(--white);
    background:
        radial-gradient(circle at 83% 20%, rgba(215, 25, 32, 0.28), transparent 30%),
        linear-gradient(130deg, #111315 0%, #1c1f23 58%, #101214 100%);
    padding: 88px 0;
}

.hero::before {
    position: absolute;
    inset: 0;
    content: "";
    opacity: 0.08;
    background-image: linear-gradient(120deg, transparent 0 48%, #fff 49% 50%, transparent 51% 100%);
    background-size: 34px 34px;
}

.hero-grid {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.65fr);
    gap: 70px;
    align-items: center;
}

.eyebrow {
    display: inline-block;
    color: var(--red);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.16em;
}

.hero h1,
.auth-card h1,
.admin-heading h1 {
    max-width: 760px;
    margin: 12px 0 18px;
    font-size: clamp(38px, 5vw, 68px);
    line-height: 1.02;
    letter-spacing: -0.045em;
}

.lead {
    max-width: 690px;
    color: #c6cbd1;
    font-size: 19px;
}

.actions {
    display: flex;
    gap: 12px;
    margin-top: 32px;
}

.button {
    display: inline-flex;
    min-height: 50px;
    align-items: center;
    justify-content: center;
    padding: 0 24px;
    border: 0;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 750;
    transition: transform 0.2s ease, background-color 0.2s ease;
}

.button:hover {
    transform: translateY(-2px);
}

.button-primary {
    color: var(--white);
    background: var(--red);
    box-shadow: 0 12px 30px rgba(215, 25, 32, 0.25);
}

.button-primary:hover {
    background: var(--red-dark);
}

.status-panel {
    padding: 28px;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 18px;
    backdrop-filter: blur(8px);
}

.status-panel h2 {
    margin: 0 0 20px;
    font-size: 20px;
}

.status-row {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 15px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.09);
}

.status-ok {
    color: #53e6b3;
}

.status-warn {
    color: #ffbb5c;
}

.status-error {
    color: #ff7478;
}

.feature-section {
    padding: 80px 0 100px;
    background: var(--surface);
}

.section-heading h2 {
    margin: 8px 0 30px;
    font-size: clamp(30px, 4vw, 48px);
    line-height: 1.08;
}

.card-grid,
.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}

.feature-card,
.stat-card,
.admin-panel-card {
    padding: 28px;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 14px;
    box-shadow: 0 12px 35px rgba(17, 19, 21, 0.05);
}

.card-number {
    color: var(--red);
    font-size: 13px;
    font-weight: 800;
}

.feature-card h3 {
    margin: 22px 0 8px;
    font-size: 22px;
}

.feature-card p,
.admin-heading p,
.admin-panel-card p {
    margin: 0;
    color: var(--muted);
}

.site-footer {
    color: #aeb4bc;
    background: var(--black);
    font-size: 13px;
}

.auth-section {
    display: grid;
    min-height: calc(100vh - 164px);
    place-items: center;
    padding: 60px 20px;
    background:
        radial-gradient(circle at 15% 10%, rgba(215, 25, 32, 0.11), transparent 30%),
        var(--surface);
}

.auth-card {
    width: min(520px, 100%);
    padding: 38px;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 18px;
    box-shadow: var(--shadow);
}

.auth-card.wide {
    width: min(720px, 100%);
}

.auth-card.center {
    text-align: center;
}

.auth-card h1 {
    color: var(--black);
    font-size: clamp(32px, 5vw, 48px);
}

.auth-card > p {
    color: var(--muted);
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    margin-top: 28px;
}

.field {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.field-full {
    grid-column: 1 / -1;
}

.field label {
    font-size: 13px;
    font-weight: 750;
}

.field input {
    width: 100%;
    min-height: 50px;
    padding: 0 14px;
    color: var(--black);
    background: var(--white);
    border: 1px solid #cfd4da;
    border-radius: 8px;
    outline: 0;
}

.field input:focus {
    border-color: var(--red);
    box-shadow: 0 0 0 4px rgba(215, 25, 32, 0.1);
}

.field-error {
    color: var(--danger);
    font-weight: 650;
}

.password-note {
    padding: 12px 14px;
    color: #5b6470;
    background: #f3f5f7;
    border-radius: 8px;
    font-size: 13px;
}

.alert {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin: 20px 0;
    padding: 14px 16px;
    border-radius: 8px;
    font-size: 14px;
}

.alert-error {
    color: #7a271a;
    background: #fef3f2;
    border: 1px solid #fecdca;
}

.alert-warning {
    color: #7a4c00;
    background: #fff8e8;
    border: 1px solid #f6dda5;
}

.alert-success {
    color: #075d43;
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
}

.error-code {
    display: block;
    color: var(--red);
    font-size: 72px;
    font-weight: 900;
    line-height: 1;
}

.admin-body {
    min-height: 100vh;
    background: var(--surface);
}

.admin-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: 270px;
    padding: 26px 22px;
    color: var(--white);
    background: var(--black);
    overflow-y: auto;
}

.admin-brand {
    color: var(--white);
}

.admin-nav {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 42px;
}

.nav-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-bottom: 22px;
}

.nav-group > small {
    padding: 0 12px 6px;
    color: #747b84;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.13em;
}

.admin-nav a {
    padding: 12px 14px;
    border-radius: 8px;
}

.admin-nav a.active {
    background: var(--red);
}

.admin-nav span {
    margin-top: 14px;
    padding: 14px;
    color: #aeb4bc;
    border: 1px dashed #41454b;
    border-radius: 8px;
    font-size: 12px;
}

.admin-nav .nav-disabled {
    margin: 0;
    padding: 9px 14px;
    color: #777e87;
    border: 0;
    font-size: 13px;
    cursor: not-allowed;
}

.admin-shell {
    min-height: 100vh;
    margin-left: 270px;
}

.admin-topbar {
    display: flex;
    min-height: 76px;
    align-items: center;
    justify-content: space-between;
    padding: 0 34px;
    background: var(--white);
    border-bottom: 1px solid var(--line);
}

.admin-topbar strong,
.admin-topbar small {
    display: block;
}

.admin-topbar small {
    color: var(--muted);
}

.text-button {
    padding: 9px 13px;
    color: var(--danger);
    background: transparent;
    border: 1px solid #f4c7c7;
    border-radius: 7px;
    cursor: pointer;
    font-weight: 700;
}

.admin-content {
    padding: 38px;
}

.admin-page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 30px;
    margin-bottom: 28px;
}

.admin-page-header h1 {
    margin: 7px 0 5px;
    font-size: clamp(34px, 4vw, 50px);
    line-height: 1.08;
    letter-spacing: -0.04em;
}

.admin-page-header p,
.form-panel-heading p {
    margin: 0;
    color: var(--muted);
}

.button-secondary {
    color: var(--black);
    background: var(--white);
    border: 1px solid var(--line);
}

.admin-form-stack {
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.form-panel,
.table-panel {
    padding: 28px;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 14px;
    box-shadow: 0 10px 32px rgba(17, 19, 21, 0.04);
}

.form-panel-heading {
    margin-bottom: 24px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--line);
}

.form-panel h2,
.form-panel-heading h2 {
    margin: 0 0 4px;
    font-size: 21px;
}

.field textarea,
.field select {
    width: 100%;
    padding: 13px 14px;
    color: var(--black);
    background: var(--white);
    border: 1px solid #cfd4da;
    border-radius: 8px;
    outline: 0;
    font: inherit;
}

.field select {
    min-height: 50px;
}

.field textarea:focus,
.field select:focus {
    border-color: var(--red);
    box-shadow: 0 0 0 4px rgba(215, 25, 32, 0.1);
}

.field-help,
.character-note {
    color: var(--muted);
    font-size: 12px;
}

.three-columns {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.sticky-save-bar {
    position: sticky;
    bottom: 18px;
    z-index: 4;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 16px 18px;
    background: rgba(17, 19, 21, 0.96);
    color: #c6cbd1;
    border-radius: 12px;
    box-shadow: 0 18px 50px rgba(17, 19, 21, 0.25);
}

.table-panel {
    padding: 0;
    overflow: hidden;
}

.table-scroll {
    overflow-x: auto;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
}

.admin-table th,
.admin-table td {
    padding: 17px 18px;
    text-align: left;
    vertical-align: middle;
    border-bottom: 1px solid var(--line);
}

.admin-table th {
    color: var(--muted);
    background: #fafbfc;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.admin-table tr:last-child td {
    border-bottom: 0;
}

.admin-table code {
    padding: 5px 7px;
    color: #4f5660;
    background: #f0f2f4;
    border-radius: 5px;
    font-size: 12px;
}

.table-note {
    display: block;
    max-width: 440px;
    margin-top: 4px;
    color: var(--muted);
    font-size: 12px;
}

.table-actions a {
    color: var(--red);
    font-weight: 750;
}

.status-badge {
    display: inline-flex;
    padding: 5px 9px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 750;
}

.status-draft {
    color: #4f5660;
    background: #eceff2;
}

.status-review {
    color: #7a4c00;
    background: #fff0ca;
}

.status-published {
    color: #075d43;
    background: #d9faeb;
}

.status-archived {
    color: #7a271a;
    background: #fee4e2;
}

.editor-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 22px;
    align-items: start;
}

.editor-main {
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.editor-sidebar {
    position: sticky;
    top: 24px;
}

.compact-panel {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.check-row {
    display: flex;
    align-items: center;
    gap: 9px;
    color: #4f5660;
    font-size: 13px;
}

.check-row input {
    width: 18px;
    height: 18px;
    accent-color: var(--red);
}

.full-button {
    width: 100%;
}

.slug-field {
    display: flex;
    align-items: center;
    min-height: 50px;
    overflow: hidden;
    background: #f3f5f7;
    border: 1px solid #cfd4da;
    border-radius: 8px;
}

.slug-field span {
    padding-left: 13px;
    color: var(--muted);
    white-space: nowrap;
    font-size: 13px;
}

.slug-field input {
    min-height: 48px;
    background: transparent;
    border: 0;
    box-shadow: none;
}

.content-editor {
    min-height: 420px;
    resize: vertical;
}

.admin-heading h1 {
    margin-bottom: 10px;
    font-size: clamp(32px, 5vw, 50px);
}

.stats-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-top: 28px;
}

.stat-card {
    min-height: 170px;
}

.stat-card > span,
.stat-card > small {
    display: block;
    color: var(--muted);
}

.stat-card strong {
    display: block;
    margin: 10px 0;
    font-size: 42px;
    line-height: 1;
}

.stat-card.accent {
    color: var(--white);
    background: linear-gradient(140deg, var(--red), #8f090e);
    border-color: transparent;
}

.stat-card.accent span,
.stat-card.accent small {
    color: #ffd7d8;
}

.admin-panel-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
    margin-top: 24px;
}

.admin-panel-card h2 {
    margin: 7px 0;
}

.large-check {
    display: grid;
    width: 72px;
    height: 72px;
    flex: 0 0 72px;
    place-items: center;
    color: var(--white);
    background: var(--green);
    border-radius: 50%;
    font-size: 36px;
    font-weight: 900;
}

@media (max-width: 980px) {
    .hero-grid,
    .card-grid,
    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }

    .hero-grid {
        gap: 36px;
    }

    .admin-sidebar {
        position: static;
        width: 100%;
    }

    .admin-nav {
        display: none;
    }

    .admin-shell {
        margin-left: 0;
    }

    .editor-layout {
        grid-template-columns: 1fr;
    }

    .editor-sidebar {
        position: static;
    }
}

@media (max-width: 680px) {
    .header-contact {
        display: none;
    }

    .hero {
        padding: 60px 0;
    }

    .hero-grid,
    .card-grid,
    .stats-grid,
    .form-grid {
        grid-template-columns: 1fr;
    }

    .field-full {
        grid-column: auto;
    }

    .auth-card {
        padding: 28px 22px;
    }

    .admin-content,
    .admin-topbar {
        padding-left: 20px;
        padding-right: 20px;
    }

    .admin-panel-card {
        align-items: flex-start;
    }

    .admin-page-header,
    .sticky-save-bar {
        align-items: stretch;
        flex-direction: column;
    }

    .three-columns {
        grid-template-columns: 1fr;
    }

    .footer-inner {
        flex-direction: column;
        justify-content: center;
        padding: 20px 0;
    }
}
