/* ================= BASE ================= */

html, body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

a,
.btn-link {
    color: #006bb7;
}

.content {
    padding-top: 1.1rem;
}

h1:focus {
    outline: none;
}

/* ================= BUTTONS / FOCUS ================= */

.btn-primary {
    color: #fff;
    background-color: #1b6ec2;
    border-color: #1861ac;
}

.btn:focus,
.btn:active:focus,
.btn-link.nav-link:focus,
.form-control:focus,
.form-check-input:focus {
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

/* ================= VALIDATION ================= */

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e50000;
}

.validation-message {
    color: #e50000;
}

/* ================= BLAZOR ERROR ================= */

.blazor-error-boundary {
    background-color: #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred.";
    }

#blazor-error-ui {
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0,0,0,0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

    #blazor-error-ui .dismiss {
        cursor: pointer;
        position: absolute;
        right: 0.75rem;
        top: 0.5rem;
    }

/* ================= GLOBAL FORM ================= */

label {
    font-weight: 600;
}

.form-control,
.form-select,
input,
select,
textarea {
    border: 2px solid #1f4e79 !important;
    border-radius: 6px;
    box-shadow: none;
}

    .form-control:focus,
    .form-select:focus,
    input:focus,
    select:focus,
    textarea:focus {
        border-color: #163a5a !important;
        box-shadow: 0 0 0 0.15rem rgba(31,78,121,0.25);
        outline: none;
    }

/* ================= CHECKBOX ================= */

.form-check-input {
    border: 2px solid #1f4e79 !important;
    border-radius: 4px;
    width: 1.2em;
    height: 1.2em;
    cursor: pointer;
}

    .form-check-input:checked {
        background-color: #1f4e79;
        border-color: #1f4e79;
    }

    .form-check-input:focus {
        box-shadow: 0 0 0 0.15rem rgba(31,78,121,0.25);
    }

/* ================= GENERAL INFO ================= */

.general-info-page .form-label {
    margin-bottom: 0.25rem;
    font-weight: 500;
    white-space: nowrap;
}

.general-info-page .form-control,
.general-info-page .form-select {
    min-height: 38px;
}

.general-info-page .short-field {
    max-width: 110px;
}

.general-info-page .form-control[readonly] {
    background-color: #f8fafc;
}

.general-info-page .row {
    margin-bottom: 6px;
}

.onboarding-section {
    border: 3px solid #1f4e79;
    background: #ffffff;
    border-radius: 1rem;
    padding: 24px;
}

/* ================= PROFILE BADGES ================= */

.profile-badge {
    font-size: 12px;
    padding: 3px 8px;
    border-radius: 12px;
    font-weight: 600;
}

.verified-badge {
    background: #e6f4ea;
    color: #1e7e34;
    border: 1px solid #c3e6cb;
}

.founder-badge {
    background: #fff4e0;
    color: #b36b00;
    border: 1px solid #ffd27a;
}

/* ================= PASSWORD ================= */

.password-toggle-btn {
    background: #ffffff;
    border: 1px solid #ced4da;
    border-left: none;
    color: #1f4e79;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 48px;
}

    .password-toggle-btn:hover {
        background-color: #f8fafc;
    }

    .password-toggle-btn:focus {
        box-shadow: none;
        outline: none;
    }

input[type="password"]::-ms-reveal,
input[type="password"]::-ms-clear,
input[type="password"]::-webkit-textfield-decoration-container {
    display: none !important;
}

/* ================= ACCOUNT ================= */

.account-page {
    min-height: 100vh;
    padding: 24px 16px 40px;
    background-color: #ffffff;
}

.account-shell {
    max-width: 820px;
    margin: 0 auto;
}

.account-header {
    border: 3px solid #1f4e79;
    border-radius: 1rem;
    padding: 12px 16px 8px;
    margin-bottom: 14px;
    text-align: center;
}

.account-logo {
    max-width: 440px;
    width: 100%;
}

.account-tagline {
    font-size: 1.1rem;
    color: #1f4e79;
}

.account-card {
    border: 3px solid #1f4e79;
    border-radius: 1rem;
    padding: 22px;
}

.account-title {
    color: #1f4e79;
    text-align: center;
    margin-bottom: 18px;
}

.form-grid {
    display: grid;
    gap: 12px;
}

.field {
    display: flex;
    flex-direction: column;
}

    .field label {
        margin-bottom: 0.25rem;
    }

/* ================= LEGACY PRIMARY BUTTON ================= */

.primary-btn {
    background-color: #1f4e79;
    color: #ffffff;
    border: none;
    border-radius: 0.5rem;
    padding: 10px 20px;
    margin-top: 16px;
}

    .primary-btn:hover {
        background-color: #173b5c;
    }

/* ================= INTEREST TILES ================= */

.km-interest-tile {
    border: 2px solid #1f4e79;
    border-radius: 10px;
    padding: 8px 10px;
    background-color: #ffffff;
    cursor: pointer;
    transition: all 0.15s ease;
    min-height: 44px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

    .km-interest-tile:hover {
        background-color: #f5f9fd;
    }

    .km-interest-tile.selected {
        background-color: #eef5fb;
    }

    .km-interest-tile.disabled {
        opacity: 0.65;
        cursor: not-allowed;
    }

/* ================= PROFILE KEY / VALUE ================= */

.km-profile-kv-left,
.km-profile-kv-wide {
    display: grid;
    row-gap: 10px;
}

.km-profile-kv-left {
    grid-template-columns: 120px 1fr;
}

.km-profile-kv-wide {
    grid-template-columns: 175px 1fr;
}

.km-profile-label {
    font-weight: 600;
    white-space: nowrap;
}

.km-profile-value {
    white-space: nowrap;
}

/* ================= INTRO ================= */

.intro-label {
    display: block;
    font-weight: normal;
    border-top: 1px solid #ddd;
    padding-top: 8px;
    margin-bottom: 10px;
}

.intro-subtext {
    font-weight: 400;
}

/* ================= ICON BUTTONS ================= */

.icon-btn {
    height: 34px;
    padding: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #1f4e79;
    border: 2px solid #1f4e79;
    border-radius: 6px;
    background-color: #ffffff;
}

    .icon-btn:hover {
        background-color: #f5f9fd;
        border-color: #163a5c;
    }

    .icon-btn img {
        width: 30px;
        height: 40px;
        display: block;
    }

.km-icon {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* ================= PAGE SHELLS ================= */

.page-shell {
    margin: 0 auto;
    width: 100%;
}

.page-shell-vsm {
    max-width: 500px;
}

.page-shell-sm {
    max-width: 820px;
}

.page-shell-md {
    max-width: 975px;
}

.page-shell-lg {
    max-width: 1120px;
}

.page-shell-xl {
    max-width: 1280px;
}

/* ================= APP BUTTONS ================= */

.app-btn,
.app-btn-outline {
    height: 34px;
    border-radius: 8px;
    font-weight: 400;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 16px;
    white-space: nowrap;
    text-decoration: none;
    cursor: pointer;
}

.app-btn {
    border: none;
    background-color: #1f4e79;
    color: #ffffff;
}

    .app-btn:hover {
        background-color: #173b5c;
        color: #ffffff;
    }

.app-btn-outline {
    border: 2px solid #1f4e79;
    background-color: #1f4e79;
    color: #ffffff;
}

    .app-btn-outline:hover {
        background-color: #f5f9fd;
        color: #1f4e79;
        border-color: #163a5c;
    }

.app-btn-short,
.app-btn-outline-short {
    width: 110px;
}

.app-btn-medium,
.app-btn-outline-medium {
    width: 175px;
}

.app-btn-long,
.app-btn-outline-long {
    width: 230px;
}

.app-btn:disabled,
.app-btn-outline:disabled,
.app-btn-clr:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    box-shadow: none;
}

.app-btn-left,
.app-btn-outline-left,
.app-btn-clr-left {
    justify-content: flex-start;
    text-align: left;
}

/* ================= CLEAR BUTTONS ================= */

.app-btn-clr,
.app-btn-clr-short,
.app-btn-clr-medium,
.app-btn-clr-long {
    height: 34px;
    border-radius: 8px;
    background-color: transparent;
    color: #1f4e79;
    font-weight: 400;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 16px;
    white-space: nowrap;
    text-decoration: none;
    cursor: pointer;
}

    .app-btn-clr:hover {
        background-color: rgba(31, 78, 121, 0.08);
        color: #163a5c;
    }

    .app-btn-clr:disabled {
        opacity: 0.55;
        cursor: not-allowed;
        background-color: transparent !important;
        color: #8a949e !important;
    }

.app-btn-clr-short {
    width: 110px;
}

.app-btn-clr-medium {
    width: 175px;
}

.app-btn-clr-long {
    width: 230px;
}

/* ================= UTILITIES ================= */

.menu-container {
    width: fit-content;
    margin: 0 auto;
}

/* ================= PAGE HEADER ================= */

.page-header-shell {
    gap: 8px;
}

.page-header-side {
    width: 220px;
}

.page-header-logo {
    max-width: 200px;
    height: auto;
}

.page-header-title {
    color: #1f4e79;
    margin: 0;
}

/* ================= MOBILE RESPONSIVE ================= */

@media (max-width: 767.98px) {
    .page-shell {
        padding: 0.9rem !important;
    }

    .page-header-shell {
        margin-bottom: 1rem !important;
    }

    .km-mobile-page-header {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        text-align: center;
        gap: 6px;
        margin-bottom: 1rem !important;
    }

        .km-mobile-page-header .page-header-side {
            width: auto !important;
        }

            .km-mobile-page-header .page-header-side:last-child {
                display: none !important;
            }

        .km-mobile-page-header .page-header-logo {
            max-width: 145px;
        }

        .km-mobile-page-header .flex-grow-1 {
            flex: none !important;
            width: 100%;
        }

        .km-mobile-page-header .page-header-title {
            font-size: 1.1rem;
            line-height: 1.2;
            margin-top: 2px;
        }
}

/* ================= COMPACT LAYOUT ZONE ================= */
/* phone portrait + phone landscape + tablet portrait */

@media (max-width: 1024px) {
    .page-shell {
        padding: 1rem !important;
    }
}

/* ================= WIDE LANDSCAPE HEADER ================= */
/* tablet landscape + desktop stay wide */

@media (min-width: 1025px) {
    .page-header-side {
        width: 220px;
    }

    .page-header-logo {
        max-width: 200px;
    }

    .page-header-title {
        font-size: 2rem;
        line-height: 1.15;
    }
}
