:root {
    --page: #f4f7fb;
    --panel: #ffffff;
    --panel-soft: #f8fafc;
    --navy: #12233f;
    --text: #26364f;
    --muted: #66758c;
    --line: #dce4ee;

    --blue: #2563eb;
    --blue-soft: #eaf1ff;
    --turquoise: #0f9fa8;
    --turquoise-soft: #e5f8f8;
    --violet: #7357d8;
    --violet-soft: #f0edff;
    --amber: #b97812;
    --amber-soft: #fff5dd;
    --green: #23835b;
    --green-soft: #e8f7ef;
    --red: #c54444;
    --red-soft: #fff0f0;

    --shadow-sm: 0 1px 2px rgba(18, 35, 63, 0.05);
    --shadow-md: 0 14px 34px rgba(18, 35, 63, 0.09);
    --radius-sm: 10px;
    --radius-md: 16px;
    --radius-lg: 22px;
    --content-width: 1440px;
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    background: var(--page);
}

body {
    min-height: 100vh;
    margin: 0;
    background:
        radial-gradient(circle at top left, rgba(37, 99, 235, 0.06), transparent 34rem),
        var(--page);
    color: var(--text);
    font-family:
        Inter,
        ui-sans-serif,
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;
    font-size: 16px;
    line-height: 1.55;
}

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

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

button,
a {
    -webkit-tap-highlight-color: transparent;
}

img,
svg {
    display: block;
    max-width: 100%;
}

.hfx-shell {
    min-height: 100vh;
}

.hfx-header {
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid rgba(220, 228, 238, 0.9);
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(18px);
}

.hfx-header-inner {
    display: flex;
    min-height: 76px;
    max-width: var(--content-width);
    margin: 0 auto;
    padding: 0 28px;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.hfx-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
}

.hfx-brand-mark {
    display: grid;
    width: 42px;
    height: 42px;
    border-radius: 13px;
    background: linear-gradient(145deg, var(--blue), var(--turquoise));
    box-shadow: 0 9px 20px rgba(37, 99, 235, 0.22);
    color: #fff;
    place-items: center;
    font-size: 18px;
    font-weight: 800;
    letter-spacing: -0.04em;
}

.hfx-brand-copy {
    display: grid;
    line-height: 1.15;
}

.hfx-brand-name {
    color: var(--navy);
    font-size: 18px;
    font-weight: 800;
    letter-spacing: -0.025em;
}

.hfx-brand-subtitle {
    margin-top: 4px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
}

.hfx-header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.hfx-nav-link,
.hfx-button {
    display: inline-flex;
    min-height: 42px;
    border: 1px solid transparent;
    border-radius: 11px;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0 16px;
    cursor: pointer;
    font-weight: 750;
    transition:
        transform 140ms ease,
        border-color 140ms ease,
        background 140ms ease,
        box-shadow 140ms ease;
}

.hfx-nav-link {
    border-color: var(--line);
    background: var(--panel);
    color: var(--navy);
}

.hfx-button {
    background: var(--blue);
    color: #fff;
    box-shadow: 0 8px 18px rgba(37, 99, 235, 0.18);
}

.hfx-button-secondary {
    border-color: var(--line);
    background: var(--panel);
    box-shadow: none;
    color: var(--navy);
}

.hfx-button:hover,
.hfx-nav-link:hover {
    transform: translateY(-1px);
}

.hfx-button:focus-visible,
.hfx-nav-link:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 3px solid rgba(37, 99, 235, 0.18);
    outline-offset: 2px;
}

.hfx-main {
    width: 100%;
    max-width: var(--content-width);
    margin: 0 auto;
    padding: 34px 28px 48px;
}

.hfx-page-head {
    display: flex;
    margin-bottom: 24px;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
}

.hfx-eyebrow {
    margin: 0 0 8px;
    color: var(--blue);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.hfx-page-title {
    margin: 0;
    color: var(--navy);
    font-size: clamp(30px, 4vw, 46px);
    line-height: 1.05;
    letter-spacing: -0.045em;
}

.hfx-page-description {
    max-width: 760px;
    margin: 12px 0 0;
    color: var(--muted);
    font-size: 16px;
}

.hfx-grid {
    display: grid;
    gap: 20px;
}

.hfx-grid-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.hfx-grid-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.hfx-grid-main {
    grid-template-columns: minmax(0, 1.7fr) minmax(300px, 0.7fr);
}

.hfx-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: var(--panel);
    box-shadow: var(--shadow-sm);
}

.hfx-card-header {
    display: flex;
    padding: 20px 22px 15px;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.hfx-card-body {
    padding: 0 22px 22px;
}

.hfx-card-title {
    margin: 0;
    color: var(--navy);
    font-size: 18px;
    line-height: 1.25;
    letter-spacing: -0.02em;
}

.hfx-card-copy {
    margin: 7px 0 0;
    color: var(--muted);
    font-size: 14px;
}

.hfx-stat {
    padding: 20px;
}

.hfx-stat-label {
    color: var(--muted);
    font-size: 12px;
    font-weight: 750;
    letter-spacing: 0.075em;
    text-transform: uppercase;
}

.hfx-stat-value {
    margin-top: 7px;
    color: var(--navy);
    font-size: 30px;
    font-weight: 850;
    line-height: 1.1;
    letter-spacing: -0.04em;
}

.hfx-stat-note {
    margin-top: 7px;
    color: var(--muted);
    font-size: 13px;
}

.hfx-badge {
    display: inline-flex;
    min-height: 28px;
    border-radius: 999px;
    align-items: center;
    padding: 0 11px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.055em;
    text-transform: uppercase;
}

.hfx-badge-blue {
    background: var(--blue-soft);
    color: var(--blue);
}

.hfx-badge-turquoise {
    background: var(--turquoise-soft);
    color: var(--turquoise);
}

.hfx-badge-violet {
    background: var(--violet-soft);
    color: var(--violet);
}

.hfx-badge-amber {
    background: var(--amber-soft);
    color: var(--amber);
}

.hfx-badge-green {
    background: var(--green-soft);
    color: var(--green);
}

.hfx-badge-red {
    background: var(--red-soft);
    color: var(--red);
}

.hfx-message-list {
    display: grid;
    margin: 0 0 20px;
    gap: 10px;
}

.hfx-message {
    border: 1px solid var(--line);
    border-left: 4px solid var(--blue);
    border-radius: var(--radius-sm);
    background: var(--panel);
    padding: 13px 16px;
    box-shadow: var(--shadow-sm);
}

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

.hfx-table {
    width: 100%;
    border-collapse: collapse;
    white-space: nowrap;
}

.hfx-table th {
    border-bottom: 1px solid var(--line);
    background: var(--panel-soft);
    color: var(--muted);
    padding: 12px 14px;
    text-align: left;
    font-size: 11px;
    letter-spacing: 0.075em;
    text-transform: uppercase;
}

.hfx-table td {
    border-bottom: 1px solid var(--line);
    color: var(--text);
    padding: 15px 14px;
    font-size: 14px;
}

.hfx-empty {
    display: grid;
    min-height: 220px;
    padding: 28px;
    align-content: center;
    justify-items: center;
    text-align: center;
}

.hfx-empty-icon {
    display: grid;
    width: 54px;
    height: 54px;
    border-radius: 17px;
    background: var(--blue-soft);
    color: var(--blue);
    place-items: center;
    font-size: 22px;
    font-weight: 850;
}

.hfx-empty h3 {
    margin: 15px 0 5px;
    color: var(--navy);
    font-size: 18px;
}

.hfx-empty p {
    max-width: 460px;
    margin: 0;
    color: var(--muted);
    font-size: 14px;
}

.hfx-form-card {
    width: min(100%, 480px);
    margin: 48px auto;
}

.hfx-form-field {
    display: grid;
    margin-bottom: 17px;
    gap: 7px;
}

.hfx-form-field label {
    color: var(--navy);
    font-size: 13px;
    font-weight: 750;
}

.hfx-form-field input,
.hfx-form-field select,
.hfx-form-field textarea {
    width: 100%;
    min-height: 46px;
    border: 1px solid var(--line);
    border-radius: 11px;
    background: var(--panel);
    color: var(--navy);
    padding: 10px 13px;
}

.hfx-form-errors {
    margin-bottom: 16px;
    border: 1px solid #f0c4c4;
    border-radius: var(--radius-sm);
    background: var(--red-soft);
    color: var(--red);
    padding: 12px 14px;
    font-size: 14px;
}

.hfx-detail-list {
    display: grid;
    margin: 0;
}

.hfx-detail-row {
    display: grid;
    grid-template-columns: minmax(150px, 0.6fr) minmax(0, 1.4fr);
    border-bottom: 1px solid var(--line);
    gap: 18px;
    padding: 14px 0;
}

.hfx-detail-row:last-child {
    border-bottom: 0;
}

.hfx-detail-label {
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.hfx-detail-value {
    color: var(--navy);
    font-size: 14px;
    font-weight: 750;
    overflow-wrap: anywhere;
}

.hfx-footer {
    border-top: 1px solid var(--line);
    color: var(--muted);
    padding: 24px 28px 34px;
    text-align: center;
    font-size: 12px;
}

.hfx-footer strong {
    color: var(--navy);
}

@media (max-width: 980px) {
    .hfx-grid-3,
    .hfx-grid-main {
        grid-template-columns: 1fr;
    }

    .hfx-grid-2 {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 680px) {
    .hfx-header-inner,
    .hfx-main {
        padding-left: 18px;
        padding-right: 18px;
    }

    .hfx-header-inner {
        min-height: 68px;
    }

    .hfx-brand-subtitle {
        display: none;
    }

    .hfx-header-actions {
        gap: 7px;
    }

    .hfx-nav-link,
    .hfx-button {
        min-height: 40px;
        padding: 0 12px;
        font-size: 13px;
    }

    .hfx-page-head {
        display: grid;
    }

    .hfx-page-title {
        font-size: 34px;
    }

    .hfx-card-header,
    .hfx-card-body {
        padding-left: 17px;
        padding-right: 17px;
    }

    .hfx-detail-row {
        grid-template-columns: 1fr;
        gap: 4px;
    }
}
