:root {
    --brand: #004d3d;
    --brand-dark: #04372c;
    --ink: #102923;
    --muted: #7b8079;
    --line: #e4e2dc;
    --bg: #fbfbf9;
    --card: #ffffff;
    --danger: #b42318;
    --ok: #165c45;
    --radius: 14px;
    --font: "DM Sans", ui-sans-serif, system-ui, sans-serif;
    --heading: "Manrope", sans-serif;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--heading);
    color: #21362e;
}

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

html,
body {
    margin: 0;
    min-height: 100%;
}

body.portal-body {
    background: var(--bg);
    color: var(--ink);
    font-family: var(--font);
    -webkit-font-smoothing: antialiased;
}

.portal-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 20px 32px;
}

.portal-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    margin-bottom: 36px;
    color: var(--brand);
}

.hab-mark {
    width: 132px;
    height: auto;
    display: block;
}

.portal-brand-rule {
    width: 1px;
    height: 42px;
    background: #d5d2cb;
}

.portal-brand-label {
    color: #8b8f89;
    font-size: 15px;
    font-weight: 500;
}

.portal-card {
    width: 100%;
    max-width: 420px;
    text-align: center;
}

.portal-title {
    margin: 0;
    font-family: var(--heading);
    font-size: clamp(32px, 3.2vw, 40px);
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.15;
    color: #21362e;
}

.portal-lede {
    margin: 12px auto 28px;
    max-width: 320px;
    color: var(--muted);
    font-size: 15px;
    line-height: 1.5;
}

.portal-form {
    text-align: left;
}

.portal-field {
    margin-bottom: 18px;
}

.portal-field label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 600;
    color: var(--ink);
}

.portal-input {
    position: relative;
    display: flex;
    align-items: center;
}

.portal-input input {
    width: 100%;
    height: 50px;
    padding: 0 44px 0 44px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--card);
    color: var(--ink);
    font: inherit;
    font-size: 15px;
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.portal-input input::placeholder {
    color: #b0b4ae;
}

.portal-input input:focus,
.portal-input select:focus,
.portal-input textarea:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 4px rgba(22, 92, 69, 0.12);
}

.portal-input select,
.portal-input textarea {
    width: 100%;
    padding: 0 16px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--card);
    color: var(--ink);
    font: inherit;
    font-size: 15px;
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.portal-input select {
    height: 50px;
}

.portal-input textarea {
    min-height: 110px;
    padding: 14px 16px;
    resize: vertical;
}

.portal-hint {
    margin: 8px 0 0;
    color: var(--muted);
    font-size: 13px;
}

.portal-input-icon,
.portal-input-action {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 50px;
    color: #b0b4ae;
}

.portal-input-icon {
    left: 0;
    pointer-events: none;
}

.portal-input-action {
    right: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
    padding: 0;
}

.portal-input-action:hover {
    color: var(--brand);
}

.portal-input-icon svg,
.portal-input-action svg {
    width: 18px;
    height: 18px;
}

.portal-input-action .icon-hide {
    display: none;
}

.portal-input-action.is-on .icon-show {
    display: none;
}

.portal-input-action.is-on .icon-hide {
    display: block;
}

.portal-error {
    margin: 8px 0 0;
    color: var(--danger);
    font-size: 13px;
}

.portal-status {
    margin: 0 0 20px;
    padding: 12px 14px;
    border-radius: 12px;
    background: #e8f4ee;
    color: var(--ok);
    font-size: 14px;
    line-height: 1.4;
}

.portal-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    height: 50px;
    margin-top: 8px;
    border: 0;
    border-radius: 999px;
    background: var(--brand);
    color: #fff;
    font: inherit;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s ease;
}

.portal-button:hover {
    background: var(--brand-dark);
}

.portal-button-secondary {
    background: #fff;
    color: var(--brand);
    border: 1px solid #d7e3dc;
}

.portal-button-secondary:hover {
    background: #f3faf6;
}

.portal-button-danger {
    background: var(--danger);
}

.portal-button-danger:hover {
    background: #8f1d14;
}

.portal-text-link {
    display: inline-block;
    margin-top: 18px;
    color: var(--brand);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
}

.portal-text-link:hover {
    text-decoration: underline;
}

.portal-copy {
    margin-top: 48px;
    color: #c0c3bd;
    font-size: 13px;
}

@media (max-width: 480px) {
    .portal-brand {
        gap: 12px;
        margin-bottom: 28px;
    }

    .hab-mark {
        width: 96px;
    }
}
