* {
    box-sizing: border-box;
}

:root {
    --navy: #17243a;
    --blue: #2563eb;
    --text: #172033;
    --muted: #667085;
    --border: #dfe5ec;
    --background: #f4f6f9;
    --white: #ffffff;
}

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

body {
    font-family:
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        Inter,
        Arial,
        sans-serif;
    background: var(--background);
    color: var(--text);
}

/* LOGIN */

.auth-page {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 30px;
    box-sizing: border-box;

    background-image: url("/login-background.png");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    overflow: hidden;
}

.auth-page::before {
    content: "";
    position: absolute;
    inset: 0;
    background: transparent;
    z-index: 0;
}

.auth-page > * {
    position: relative;
    z-index: 1;
}

.auth-card {
    width: min(440px, 100%);
    background: rgba(255, 255, 255, 0.62);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.70);
    border-radius: 14px;
    padding: 0px 44px 44px 44px;
    box-shadow:
        0 18px 45px rgba(23, 36, 58, .12);
}

.auth-brand {
    display: flex;
    justify-content: center;
    margin-bottom: -80px;
}

.auth-brand img {
    width: 400px;
    height: 400px;
    object-fit: contain;
}

.auth-eyebrow,
.eyebrow {
    color: var(--blue);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.8px;
    text-transform: uppercase;
}

.auth-eyebrow {
    text-align: center;
    margin-bottom: 12px;
}

.auth-card h1 {
    margin: 0;
    text-align: center;
    font-size: 34px;
    letter-spacing: -1px;
}

.auth-description {
    margin: 12px auto 30px;
    text-align: center;
    color: var(--muted);
    line-height: 1.6;
    max-width: 320px;
}

.portal-signin-button {
    display: block;
    width: 100%;
    border: 0;
    border-radius: 10px;
    padding: 14px 20px;
    margin: 0 auto;
    background: var(--blue);
    color: white;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.15s ease, opacity 0.15s ease;
}

.portal-signin-button:hover {
    opacity: 0.92;
    transform: translateY(-1px);
}

.portal-signin-button:active {
    transform: translateY(0);
}

.portal-signin-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}





.auth-note {
    text-align: center;
    margin-top: 20px;
    font-size: 11px;
    color: #98a2b3;
}

.auth-footer {
    margin-top: 28px;
    color: #98a2b3;
    font-size: 12px;
}

/* DASHBOARD */

.topbar {
    height: 76px;
    background: var(--navy);
    color: white;
}

.topbar-inner {
    max-width: 1280px;
    height: 100%;
    margin: auto;
    padding: 0 7%;

    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand {
    display: flex;
    align-items: center;
    gap: 14px;
}

.brand img {
    width: 44px;
    height: 44px;
    object-fit: contain;
    background: white;
    border-radius: 7px;
    padding: 3px;
}

.brand-name {
    font-size: 15px;
    font-weight: 700;
}

.brand-subtitle {
    color: #aeb9ca;
    font-size: 10px;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-top: 3px;
}

.user-area {
    display: flex;
    align-items: center;
    gap: 22px;
}

.user-info {
    display: flex;
    flex-direction: column;
    text-align: right;
}

.user-info strong {
    font-size: 13px;
}

.user-info span {
    font-size: 11px;
    color: #aeb9ca;
    margin-top: 3px;
}

.logout-button {
    border: 1px solid rgba(255,255,255,.2);
    background: transparent;
    color: white;
    border-radius: 6px;
    padding: 9px 14px;
    cursor: pointer;
}

.logout-button:hover {
    background: rgba(255,255,255,.08);
}

.dashboard {
    max-width: 1280px;
    margin: auto;
    padding: 62px 7% 70px;

}

.hero {
    margin-bottom: 42px;
}

.hero h1 {
    margin: 10px 0;
    font-size: clamp(32px, 4vw, 48px);
    letter-spacing: -1.7px;
    line-height: 1.1;
}

.hero h1 span {
    color: var(--blue);
}

.hero p {
    margin: 0;
    color: var(--muted);
    font-size: 16px;
}

.services {
    display: grid;
    grid-template-columns:
        repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.service-card {
    min-height: 270px;
    background: rgba(255, 255, 255, 0.55);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.65);
    border-radius: 12px;
    padding: 28px;

    text-decoration: none;
    color: var(--text);

    display: flex;
    flex-direction: column;

    transition:
        transform .18s ease,
        box-shadow .18s ease,
        border-color .18s ease;
}

.service-card:hover {
    transform: translateY(-4px);
    border-color: #c6d0dc;
    box-shadow:
        0 15px 35px rgba(23, 36, 58, .10);
}


.service-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.service-icon {
    width: 80px;
    height: 80px;
    border-radius: 9px;

    display: flex;
    align-items: center;
    justify-content: center;

    margin-bottom: 32px;

    background: transparent;
}

.service-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.service-content h2 {
    margin: 0 0 9px;
    font-size: 21px;
}

.service-content p {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.55;
}

.service-action {
    margin-top: auto;
    padding-top: 26px;

    color: var(--blue);
    font-size: 11px;
    font-weight: 750;
    letter-spacing: 1px;
}

.service-action span {
    margin-left: 5px;
    transition: margin .15s ease;
}

.service-card:hover .service-action span {
    margin-left: 9px;
}

.footer {
    border-top: 1px solid var(--border);
    background: white;

    padding: 20px 7%;

    display: flex;
    justify-content: space-between;

    color: #98a2b3;
    font-size: 11px;
    flex: 0 0 auto;
}

/* ERROR */

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

.error-card {
    max-width: 430px;
    width: 100%;
    background: white;
    border: 1px solid rgba(255, 255, 255, 0.65);
    border-radius: 14px;
    padding: 40px;
    text-align: center;
}

.error-card img {
    width: 65px;
    margin-bottom: 20px;
}

.error-card h1 {
    margin-bottom: 10px;
}

.error-card p {
    color: #667085;
    line-height: 1.5;
    margin-bottom: 25px;
}

@media (max-width: 900px) {
    .services {
        grid-template-columns: 1fr;
    }

    .service-card {
        min-height: 220px;
    }
}

@media (max-width: 650px) {
    .topbar-inner {
        padding: 0 20px;
    }

    .user-info {
        display: none;
    }

    .dashboard {
        padding: 45px 20px;
    }

    .footer {
        padding: 18px 20px;
        flex-direction: column;
        gap: 8px;
    }

    .auth-card {
        padding: 34px 25px;
    }
}


/* Full-width background for the authenticated services dashboard */
body.portal-dashboard {
    background-image: url("/bg2.png");
    background-size: cover;
    background-position: center top;
    background-repeat: no-repeat;
    background-attachment: fixed;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

body.portal-dashboard .dashboard {
    background: transparent;
    flex: 1 0 auto;
}

/* Login text color adjustment */
.auth-note,
.auth-footer {
    color: #000000 !important;
}
