:root {
    --color-bg: #f4f6f3;
    --color-surface: #ffffff;
    --color-text: #202124;
    --color-muted: #626761;
    --color-border: #d9ddd4;
    --color-accent: #315f87;
    --color-accent-dark: #203f5d;
    --color-accent-soft: #e8f0f7;
    --color-ink: #17211b;
    --color-warm: #f2b84b;
    --color-rose: #a94f5c;
    --color-error-bg: #fff1f0;
    --color-error-border: #e5a7a1;
    --shadow-soft: 0 16px 40px rgba(31, 41, 35, 0.08);
    --shadow-card: 0 22px 50px rgba(35, 48, 40, 0.13);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--color-bg);
    color: var(--color-text);
    font-family: Arial, Helvetica, sans-serif;
    font-size: 16px;
    line-height: 1.6;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    background:
        linear-gradient(135deg, rgba(49, 95, 135, 0.14), rgba(242, 184, 75, 0.1) 42%, rgba(169, 79, 92, 0.08)),
        linear-gradient(180deg, #fbfbf8 0%, #f4f6f3 58%, #eef2ed 100%);
}

a {
    color: var(--color-accent-dark);
}

a:hover {
    color: var(--color-accent);
}

.container {
    width: min(100% - 32px, 1100px);
    margin: 0 auto;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 10;
    background: rgba(255, 255, 255, 0.86);
    border-bottom: 1px solid var(--color-border);
    backdrop-filter: blur(14px);
}

.header-inner {
    min-height: 68px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.brand {
    color: var(--color-ink);
    font-size: 1.1rem;
    font-weight: 700;
    text-decoration: none;
}

.brand::before {
    content: "";
    display: inline-block;
    width: 10px;
    height: 10px;
    margin-right: 9px;
    border-radius: 50%;
    background: var(--color-warm);
    box-shadow: 0 0 0 5px rgba(242, 184, 75, 0.18);
    vertical-align: middle;
}

.site-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

.site-nav a {
    padding: 7px 10px;
    border-radius: 999px;
    color: var(--color-muted);
    font-weight: 600;
    text-decoration: none;
}

.site-nav a:hover {
    background: var(--color-accent-soft);
    color: var(--color-accent);
}

.hero {
    position: relative;
    margin-top: 30px;
    padding: 54px 42px 42px;
    overflow: hidden;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(250, 252, 248, 0.82)),
        linear-gradient(90deg, rgba(49, 95, 135, 0.14), rgba(242, 184, 75, 0.16));
    border: 1px solid rgba(217, 221, 212, 0.9);
    border-radius: 18px;
    box-shadow: var(--shadow-card);
}

.compact-hero {
    padding-bottom: 24px;
}

.hero h1 {
    max-width: 780px;
    margin: 0 0 12px;
    font-size: clamp(2.1rem, 4vw, 3.5rem);
    line-height: 1.12;
    color: var(--color-ink);
}

.hero p {
    max-width: 820px;
    margin: 0;
    color: var(--color-muted);
    font-size: 1.08rem;
}

.hero .data-status {
    display: inline-block;
    margin-top: 18px;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid var(--color-border);
    border-radius: 6px;
    color: var(--color-text);
    font-size: 0.95rem;
    font-weight: 700;
}

.back-link {
    display: inline-block;
    margin-bottom: 14px;
    color: var(--color-accent-dark);
    font-size: 0.95rem;
    font-weight: 700;
    text-decoration: none;
}

.section {
    margin: 36px 0 38px;
}

.section-heading {
    margin-bottom: 16px;
}

.section-heading h2 {
    margin: 0 0 6px;
    font-size: 1.55rem;
    line-height: 1.25;
}

.section-heading p {
    max-width: 780px;
    margin: 0;
    color: var(--color-muted);
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 22px;
}

.info-card {
    position: relative;
    display: block;
    min-height: 210px;
    padding: 28px;
    overflow: hidden;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 14px;
    box-shadow: var(--shadow-soft);
    color: var(--color-text);
    text-decoration: none;
    transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.info-card::after {
    content: "";
    position: absolute;
    right: 24px;
    bottom: 24px;
    width: 54px;
    height: 54px;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--color-accent), var(--color-rose));
    opacity: 0.12;
}

.info-card:hover {
    border-color: var(--color-accent);
    color: var(--color-text);
    transform: translateY(-3px);
    box-shadow: var(--shadow-card);
}

.card-label {
    display: inline-block;
    margin-bottom: 20px;
    padding: 5px 9px;
    background: var(--color-accent-soft);
    border-radius: 999px;
    color: var(--color-accent-dark);
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
}

.info-card h3 {
    margin: 0 0 8px;
    font-size: 1.35rem;
}

.info-card p {
    margin: 0 0 24px;
    color: var(--color-muted);
}

.card-link {
    display: inline-flex;
    align-items: center;
    min-height: 36px;
    padding: 0 13px;
    background: var(--color-accent);
    border-radius: 999px;
    color: #ffffff;
    font-size: 0.94rem;
    font-weight: 700;
}

.info-card:hover .card-link {
    background: var(--color-accent-dark);
    color: #ffffff;
}

.demo-card {
    opacity: 0.88;
}

.demo-card::after {
    background: linear-gradient(135deg, var(--color-warm), var(--color-rose));
}

.card-status {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 0 12px;
    background: #f4f1ea;
    border: 1px solid #e6ddca;
    border-radius: 999px;
    color: var(--color-muted);
    font-size: 0.9rem;
    font-weight: 700;
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin: 24px 0 24px;
}

.summary-card {
    padding: 18px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid var(--color-border);
    border-radius: 14px;
    box-shadow: var(--shadow-soft);
}

.summary-card strong {
    display: block;
    margin: 2px 0;
    color: var(--color-ink);
    font-size: 1.65rem;
    line-height: 1.2;
}

.summary-card span {
    color: var(--color-muted);
    font-size: 0.94rem;
}

.summary-label {
    color: var(--color-accent-dark) !important;
    font-size: 0.78rem !important;
    font-weight: 700;
    text-transform: uppercase;
}

.notice {
    margin: 0 0 28px;
    padding: 16px 18px;
    background: linear-gradient(135deg, #fff9e8, #fffdf6);
    border: 1px solid var(--color-warm);
    border-radius: 8px;
    box-shadow: 0 12px 28px rgba(96, 74, 24, 0.08);
}

.notice.guarantee {
    margin-bottom: 48px;
}

.notice.error {
    background: var(--color-error-bg);
    border-color: var(--color-error-border);
}

.table-wrap {
    width: 100%;
    overflow-x: auto;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 14px;
    box-shadow: var(--shadow-soft);
    -webkit-overflow-scrolling: touch;
}

table {
    width: 100%;
    min-width: 980px;
    border-collapse: collapse;
    table-layout: auto;
}

th,
td {
    padding: 13px 14px;
    border-bottom: 1px solid var(--color-border);
    text-align: left;
    vertical-align: top;
    overflow-wrap: anywhere;
}

th {
    background: #eaf1f7;
    color: #203f5d;
    font-size: 0.86rem;
    line-height: 1.35;
    white-space: normal;
}

td {
    font-size: 0.94rem;
    background: rgba(255, 255, 255, 0.72);
}

tbody tr:nth-child(even) td {
    background: #fbfcfa;
}

tbody tr:hover td {
    background: #f2f7fb;
}

tbody tr:last-child td {
    border-bottom: 0;
}

.table-note {
    display: block;
    margin-top: 4px;
    color: var(--color-muted);
    font-size: 0.84rem;
}

.empty-state {
    color: var(--color-muted);
    text-align: center;
}

.site-footer {
    padding: 28px 0;
    border-top: 1px solid var(--color-border);
    color: var(--color-muted);
}

.site-footer p {
    margin: 0;
}

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

.admin-page {
    padding-bottom: 48px;
}

.admin-panel {
    width: min(100%, 860px);
    padding: 24px;
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid var(--color-border);
    border-radius: 14px;
    box-shadow: var(--shadow-card);
}

.login-panel {
    max-width: 430px;
}

.admin-panel h1 {
    margin: 0 0 6px;
    color: var(--color-ink);
    font-size: 1.75rem;
}

.admin-panel p {
    margin: 0 0 20px;
    color: var(--color-muted);
}

.admin-panel label {
    display: grid;
    gap: 7px;
    margin-bottom: 15px;
    color: var(--color-ink);
    font-weight: 700;
}

.admin-panel input,
.admin-panel select,
.admin-panel textarea {
    width: 100%;
    min-height: 42px;
    padding: 9px 11px;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    background: #ffffff;
    color: var(--color-text);
    font: inherit;
}

.admin-panel textarea {
    resize: vertical;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 16px;
}

.checkbox-label {
    display: flex !important;
    grid-template-columns: none !important;
    align-items: center;
    gap: 10px !important;
}

.checkbox-label input {
    width: auto;
    min-height: auto;
}

.admin-actions,
.form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 24px 0;
}

.button-primary,
.button-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0 16px;
    border: 1px solid transparent;
    border-radius: 999px;
    font: inherit;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
}

.button-primary {
    background: var(--color-accent);
    color: #ffffff;
}

.button-primary:hover {
    background: var(--color-accent-dark);
    color: #ffffff;
}

.button-secondary {
    background: #ffffff;
    border-color: var(--color-border);
    color: var(--color-accent-dark);
}

.button-secondary:hover {
    border-color: var(--color-accent);
    color: var(--color-accent-dark);
}

.admin-table {
    min-width: 780px;
}

@media (max-width: 680px) {
    .container {
        width: min(100% - 24px, 1100px);
    }

    .header-inner {
        align-items: flex-start;
        flex-direction: column;
        gap: 8px;
        padding: 14px 0;
    }

    .hero {
        padding-top: 36px;
        padding-right: 20px;
        padding-left: 20px;
        border-radius: 14px;
    }

    .hero h1 {
        font-size: 2.1rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .info-card {
        min-height: 0;
    }

    .summary-grid {
        grid-template-columns: 1fr;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .table-wrap {
        overflow: visible;
        background: transparent;
        border: 0;
        box-shadow: none;
    }

    table,
    thead,
    tbody,
    tr,
    th,
    td {
        display: block;
        width: 100%;
    }

    table,
    .admin-table {
        min-width: 0;
    }

    thead {
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        margin: -1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
        border: 0;
    }

    tbody {
        display: grid;
        gap: 14px;
    }

    tr {
        overflow: hidden;
        background: rgba(255, 255, 255, 0.94);
        border: 1px solid var(--color-border);
        border-radius: 14px;
        box-shadow: var(--shadow-soft);
    }

    td {
        display: grid;
        grid-template-columns: minmax(112px, 42%) minmax(0, 1fr);
        gap: 12px;
        align-items: start;
        min-height: 44px;
        padding: 11px 14px;
        border-bottom: 1px solid var(--color-border);
        background: transparent !important;
        font-size: 0.93rem;
    }

    td::before {
        content: attr(data-label);
        color: var(--color-muted);
        font-size: 0.8rem;
        font-weight: 700;
        line-height: 1.35;
    }

    td:last-child {
        border-bottom: 0;
    }

    .empty-state {
        display: block;
        text-align: left;
    }

    .empty-state::before {
        content: none;
    }
}

@media (max-width: 420px) {
    td {
        grid-template-columns: 1fr;
        gap: 3px;
    }
}
