:root {
    --ec-primary: #059669;
    --ec-primary-dark: #047857;
    --ec-primary-soft: #ecfdf5;
    --ec-blue: #2563eb;
    --ec-danger: #dc2626;
    --ec-warning: #d97706;
    --ec-dark: #0f172a;
    --ec-text: #334155;
    --ec-muted: #64748b;
    --ec-border: #e2e8f0;
    --ec-bg: #f8fafc;
    --ec-white: #ffffff;
    --ec-shadow: 0 10px 30px rgba(15, 23, 42, .08);
}

.ec-page {
    width: 100%;
    max-width: 1440px;
    margin: 0 auto;
    padding: 26px;
    color: var(--ec-text);
}

.ec-section {
    margin-top: 22px;
}

.ec-grid {
    display: grid;
    gap: 24px;
}

.ec-grid--clinical {
    grid-template-columns: minmax(0, 1fr) 330px;
    align-items: start;
}

.ec-sticky {
    position: sticky;
    top: 24px;
}

.ec-card {
    background: var(--ec-white);
    border: 1px solid var(--ec-border);
    border-radius: 18px;
    padding: 24px;
    box-shadow: var(--ec-shadow);
}

.ec-card__header {
    margin-bottom: 20px;
}

.ec-card__title {
    margin: 0;
    font-size: 20px;
    font-weight: 800;
    color: var(--ec-dark);
}

.ec-card__subtitle {
    margin: 6px 0 0;
    font-size: 14px;
    color: var(--ec-muted);
}

.ec-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 24px;
    padding: 28px;
    border-radius: 22px;
    background: linear-gradient(135deg, #047857, #059669);
    color: white;
    box-shadow: 0 14px 32px rgba(5, 150, 105, .22);
}

.ec-header__eyebrow {
    margin-bottom: 6px;
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .08em;
    opacity: .85;
}

.ec-header__title {
    margin: 0;
    font-size: 30px;
    line-height: 1.15;
    font-weight: 900;
    color: white;
}

.ec-header__subtitle {
    margin: 8px 0 0;
    font-size: 15px;
    color: rgba(255,255,255,.88);
}

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

.ec-info {
    padding: 16px;
    border: 1px solid var(--ec-border);
    border-radius: 14px;
    background: var(--ec-bg);
}

.ec-info__label {
    display: block;
    margin-bottom: 5px;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    color: var(--ec-muted);
}

.ec-info__value {
    font-size: 15px;
    font-weight: 700;
    color: var(--ec-dark);
}

.ec-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ec-field label {
    font-size: 14px;
    font-weight: 800;
    color: var(--ec-dark);
}

.ec-input,
.ec-select,
.ec-textarea {
    width: 100%;
    min-height: 46px;
    padding: 11px 13px;
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    background: white;
    color: var(--ec-dark);
    font-size: 14px;
    outline: none;
    transition: border-color .2s, box-shadow .2s;
}

.ec-input:focus,
.ec-select:focus,
.ec-textarea:focus {
    border-color: var(--ec-primary);
    box-shadow: 0 0 0 3px rgba(5, 150, 105, .14);
}

.ec-input[type="file"] {
    padding: 9px;
}

.ec-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 42px;
    padding: 10px 18px;
    border: 0;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 800;
    text-decoration: none;
    cursor: pointer;
    transition: transform .15s, opacity .15s, box-shadow .15s;
}

.ec-btn:hover {
    transform: translateY(-1px);
    opacity: .96;
}

.ec-btn--primary {
    background: var(--ec-primary);
    color: white;
    box-shadow: 0 8px 18px rgba(5, 150, 105, .22);
}

.ec-btn--soft {
    background: var(--ec-primary-soft);
    color: var(--ec-primary-dark);
    border: 1px solid #a7f3d0;
}

.ec-btn--light {
    background: rgba(255,255,255,.16);
    color: white;
    border: 1px solid rgba(255,255,255,.28);
}

.ec-btn--blue {
    background: var(--ec-blue);
    color: white;
}

.ec-btn--danger {
    background: var(--ec-danger);
    color: white;
}

.ec-btn--dark {
    background: var(--ec-dark);
    color: white;
}

.ec-btn--full {
    width: 100%;
}

.ec-action-bar {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 18px;
    background: white;
    border: 1px solid var(--ec-border);
    border-radius: 16px;
    box-shadow: var(--ec-shadow);
}

.ec-alert {
    padding: 14px 16px;
    border-radius: 12px;
    border: 1px solid transparent;
    font-size: 14px;
}

.ec-alert--success {
    background: #ecfdf5;
    border-color: #a7f3d0;
    color: #065f46;
}

.ec-alert--warning {
    background: #fffbeb;
    border-color: #fde68a;
    color: #92400e;
}

.ec-alert--danger {
    background: #fef2f2;
    border-color: #fecaca;
    color: #991b1b;
}

.ec-list {
    display: grid;
    gap: 10px;
}

@media (max-width: 980px) {
    .ec-grid--clinical {
        grid-template-columns: 1fr;
    }

    .ec-sticky {
        position: static;
    }
}

@media (max-width: 700px) {
    .ec-page {
        padding: 14px;
    }

    .ec-header {
        flex-direction: column;
        align-items: flex-start;
        padding: 20px;
    }

    .ec-header__title {
        font-size: 24px;
    }

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

    .ec-action-bar {
        flex-direction: column;
    }

    .ec-action-bar .ec-btn {
        width: 100%;
    }
}
