:root {
    /* Цвета в стиле НМИЦ эндокринологии:
       тёмно-синий + светлый фон + акцентный синий */
    --color-bg: #f5f7fb;
    --color-header: #103b6f;
    --color-accent: #0d63c9; /* синие кнопки */
    --color-text: #222;
    --color-muted: #666;
    --color-card-bg: #ffffff;
    --color-border: #dde2ee;

    --radius-lg: 16px;
    --radius-md: 10px;

    --shadow-soft: 0 10px 20px rgba(0, 0, 0, 0.06);
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: var(--color-bg);
    color: var(--color-text);
    font-size: 16px;
    line-height: 1.5;
}

a {
    color: var(--color-accent);
    text-decoration: none;
}
a:hover {
    text-decoration: underline;
}

.container {
    width: 100%;
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 16px;
}

.site-header {
    background: var(--color-header);
    color: #fff;
    padding: 12px 0;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.logo-title {
    font-weight: 600;
    font-size: 18px;
}

.logo-subtitle {
    font-size: 13px;
    opacity: 0.9;
}

.main-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.main-nav a {
    color: #fff;
    font-size: 14px;
    padding: 6px 10px;
    border-radius: 999px;
}
.main-nav a:hover {
    background: rgba(255,255,255,0.12);
    text-decoration: none;
}

.site-footer {
    margin-top: 40px;
    background: #0b2a4f;
    color: #e3e9f5;
    padding: 16px 0;
    font-size: 13px;
}

.footer-inner {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    justify-content: space-between;
    align-items: flex-start;
}

.footer-contacts div,
.footer-inner > div {
    margin-bottom: 4px;
}

.footer-admin a {
    color: #fff;
    font-weight: 500;
}

/* Блок на главной */

.hero {
    margin-top: 24px;
    padding: 24px;
    background: var(--color-card-bg);
    box-shadow: var(--shadow-soft);
    border-radius: var(--radius-lg);
}

.hero h1 {
    margin-top: 0;
    font-size: 22px;
}

.hero p {
    margin-top: 8px;
    color: var(--color-muted);
}

.hero-actions {
    margin-top: 16px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

/* Карточки */

.cards-row {
    margin-top: 24px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 16px;
}

.card {
    background: var(--color-card-bg);
    border-radius: var(--radius-md);
    padding: 16px;
    box-shadow: var(--shadow-soft);
}

.card h2 {
    margin-top: 0;
    font-size: 18px;
}

.card p {
    margin-bottom: 8px;
}

/* КНОПКИ — крупные, синие, удобные для пальца */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    min-height: 48px;          /* удобно нажимать пальцем */
    min-width: 140px;
    border-radius: 999px;
    font-size: 15px;
    border: none;
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
}

.btn-primary {
    background: var(--color-accent);
    color: #fff;
}
.btn-primary:hover {
    background: #0a4fa3;
}

.btn-outline {
    background: transparent;
    color: var(--color-accent);
    border: 1px solid var(--color-accent);
}
.btn-outline:hover {
    background: rgba(13, 99, 201, 0.08);
}

.btn-link {
    padding: 0;
    min-height: auto;
    min-width: auto;
    border: none;
    background: none;
    color: var(--color-accent);
    font-weight: 500;
}

/* Формы */

.form-card {
    margin-top: 16px;
    background: var(--color-card-bg);
    border-radius: var(--radius-lg);
    padding: 16px;
    box-shadow: var(--shadow-soft);
}

.small-form {
    max-width: 400px;
}

.form-row {
    margin-bottom: 12px;
    display: flex;
    flex-direction: column;
}

.form-row label {
    font-size: 14px;
    margin-bottom: 4px;
}

.form-row input,
.form-row select,
.form-row textarea {
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid var(--color-border);
    font: inherit;
    min-height: 44px;  /* тоже удобно тыкать пальцем */
}

.form-row textarea {
    resize: vertical;
    min-height: 80px;
}

.checkbox-row label {
    flex-direction: row;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}
.checkbox-row input[type="checkbox"] {
    width: auto;
    min-height: auto;
}

.table-wrapper {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    background: var(--color-card-bg);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-soft);
}

.data-table th,
.data-table td {
    padding: 8px 10px;
    border-bottom: 1px solid var(--color-border);
    text-align: left;
}

.data-table thead {
    background: #e7edf7;
}

/* Инфоблоки (госпитализация, политика) */

.info-block {
    margin-top: 24px;
    background: var(--color-card-bg);
    padding: 16px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
}

.info-block h2 {
    margin-top: 0;
    font-size: 18px;
}

.info-block h3 {
    margin-top: 12px;
    font-size: 16px;
}

.warning-block {
    border-left: 4px solid var(--color-accent);
}

/* Статусы */

.status-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 500;
}

.status-active {
    background: #e0f8e7;
    color: #1c7c35;
}

.status-canceled {
    background: #fde3e3;
    color: #b62020;
}

/* Flash-сообщения */

.flash-block {
    margin-top: 16px;
}

.flash {
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 13px;
    margin-bottom: 6px;
}

.flash-error {
    background: #fde3e3;
    color: #821313;
}

.flash-success {
    background: #e0f8e7;
    color: #1c7c35;
}

.success-box {
    margin-top: 16px;
    background: #e0f8e7;
    color: #1c7c35;
    border-radius: var(--radius-md);
    padding: 12px;
}

.form-note {
    font-size: 12px;
    color: var(--color-muted);
}

/* Адаптация под мобильные устройства */

@media (max-width: 768px) {
    .header-inner {
        flex-direction: column;
        align-items: flex-start;
    }

    .hero {
        padding: 16px;
    }

    .hero h1 {
        font-size: 19px;
    }

    .cards-row {
        grid-template-columns: 1fr;
    }

    .btn {
        width: 100%;      /* кнопки на телефоне на всю ширину */
        justify-content: center;
    }

    .form-card {
        padding: 14px;
    }
}

@media (max-width: 480px) {
    body {
        font-size: 15px;
    }

    .logo-title {
        font-size: 16px;
    }

    .logo-subtitle {
        font-size: 12px;
    }

    .main-nav a {
        font-size: 13px;
        padding: 4px 8px;
    }
}
