* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #147f86;
    --primary-dark: #0e646a;
    --primary-soft: #e6f4f4;

    --blue: #397fc4;
    --blue-soft: #edf5fd;

    --gold: #b98a42;
    --gold-soft: #fbf5e9;

    --text: #1f3442;
    --text-soft: #72828d;

    --border: #dfe8ec;
    --white: #ffffff;

    --shadow:
        0 18px 50px rgba(32, 66, 78, 0.09);
}

html {
    min-height: 100%;
}

body {
    min-height: 100vh;
    color: var(--text);
    font-family:
        "Segoe UI",
        Tahoma,
        Arial,
        sans-serif;

    background:
        radial-gradient(
            circle at 12% 15%,
            rgba(57, 127, 196, 0.10),
            transparent 28%
        ),
        radial-gradient(
            circle at 88% 85%,
            rgba(20, 127, 134, 0.10),
            transparent 30%
        ),
        #f4f8fa;
}

button,
input {
    font: inherit;
}

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

/* Portal */

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

.portal-box {
    width: min(760px, 100%);
    padding: 34px;
    border: 1px solid rgba(220, 232, 237, 0.9);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: var(--shadow);
}

.portal-header {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-bottom: 28px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border);
}

.portal-logo {
    width: 74px;
    height: 74px;
    object-fit: contain;
}

.portal-header h1 {
    margin-bottom: 7px;
    font-size: 23px;
    font-weight: 600;
    color: var(--text);
}

.portal-header p {
    font-size: 14px;
    color: var(--text-soft);
}

.portal-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.portal-option {
    min-height: 132px;
    display: grid;
    grid-template-columns: 48px 1fr 20px;
    align-items: center;
    gap: 13px;
    padding: 20px;
    border: 1px solid var(--border);
    border-radius: 15px;
    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        border-color 0.2s ease;
}

.portal-option:hover {
    transform: translateY(-2px);
    box-shadow:
        0 12px 28px rgba(30, 68, 80, 0.09);
}

.service-option {
    background: var(--blue-soft);
}

.service-option:hover {
    border-color: rgba(57, 127, 196, 0.45);
}

.confidential-option {
    background: var(--gold-soft);
}

.confidential-option:hover {
    border-color: rgba(185, 138, 66, 0.50);
}

.option-icon {
    width: 46px;
    height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 13px;
    background: var(--white);
}

.option-icon svg {
    width: 23px;
    height: 23px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.service-option .option-icon {
    color: var(--blue);
}

.confidential-option .option-icon {
    color: var(--gold);
}

.option-content {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.option-content strong {
    font-size: 16px;
    font-weight: 600;
}

.option-content small {
    line-height: 1.6;
    font-size: 12px;
    color: var(--text-soft);
}

.option-arrow {
    font-size: 19px;
    color: var(--text-soft);
}

.portal-footer {
    margin-top: 25px;
    text-align: center;
    font-size: 11px;
    letter-spacing: 0.5px;
    color: #9aa7af;
}

/* Login */

.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 28px 18px;
}

.login-card {
    position: relative;
    width: min(410px, 100%);
    padding: 32px;
    border: 1px solid var(--border);
    border-radius: 19px;
    background: var(--white);
    box-shadow: var(--shadow);
}

.back-link {
    position: absolute;
    top: 18px;
    left: 20px;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--text-soft);
}

.back-link:hover {
    color: var(--primary);
}

.login-brand {
    margin-bottom: 25px;
    text-align: center;
}

.login-logo {
    width: 76px;
    height: 76px;
    margin-bottom: 12px;
    object-fit: contain;
}

.login-brand h1 {
    margin-bottom: 7px;
    font-size: 21px;
    font-weight: 600;
}

.login-brand p {
    font-size: 13px;
    color: var(--text-soft);
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 17px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.form-group label {
    font-size: 13px;
    color: #435762;
}

.form-group input {
    width: 100%;
    height: 44px;
    padding: 0 13px;
    border: 1px solid #d9e3e7;
    border-radius: 10px;
    outline: none;
    background: #fbfcfd;
    color: var(--text);
    font-size: 13px;
    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}

.form-group input::placeholder {
    color: #a5b0b7;
}

.form-group input:focus {
    border-color: var(--primary);
    box-shadow:
        0 0 0 3px rgba(20, 127, 134, 0.10);
    background: var(--white);
}

.password-field {
    position: relative;
}

.password-field input {
    padding-right: 46px;
}

.password-toggle {
    position: absolute;
    top: 50%;
    right: 7px;
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #86949c;
    cursor: pointer;
    transform: translateY(-50%);
}

.password-toggle:hover {
    background: #edf4f5;
    color: var(--primary);
}

.password-toggle svg {
    width: 19px;
    height: 19px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
}

.login-button {
    height: 45px;
    margin-top: 2px;
    border: 0;
    border-radius: 10px;
    background: var(--primary);
    color: var(--white);
    font-size: 14px;
    cursor: pointer;
    transition:
        background 0.2s ease,
        transform 0.2s ease;
}

.login-button:hover {
    background: var(--primary-dark);
}

.login-button:active {
    transform: translateY(1px);
}

.login-button:disabled {
    cursor: wait;
    opacity: 0.68;
}

.form-message {
    display: none;
    min-height: 39px;
    padding: 10px 12px;
    border-radius: 9px;
    text-align: center;
    line-height: 1.5;
    font-size: 12px;
}

.form-message.error {
    display: block;
    border: 1px solid #f1cccc;
    background: #fff1f1;
    color: #a23b3b;
}

.form-message.success {
    display: block;
    border: 1px solid #bfe2d3;
    background: #edf9f5;
    color: #28745c;
}

@media (max-width: 680px) {
    .portal-box {
        padding: 24px 18px;
    }

    .portal-options {
        grid-template-columns: 1fr;
    }

    .portal-header {
        align-items: flex-start;
    }

    .portal-logo {
        width: 62px;
        height: 62px;
    }

    .portal-header h1 {
        font-size: 20px;
    }

    .portal-option {
        min-height: 115px;
    }
}

@media (max-width: 430px) {
    .portal-header {
        flex-direction: column;
        text-align: center;
        align-items: center;
    }

    .login-card {
        padding: 28px 20px 24px;
    }
}