:root {
    --blue: #087dcc;
    --blue-dark: #073f68;
    --cyan: #00a8ee;
    --navy: #032b4b;
    --text: #17384f;
    --muted: #6f8492;
    --line: #d8e9f3;
    --soft: #f3faff;
    --white: #ffffff;
    --success: #15975b;
    --danger: #c93f4e;
}

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

body,
button,
input {
    font-family: "Segoe UI", Arial, sans-serif;
}

body {
    color: var(--text);
}

a {
    color: inherit;
}

.auth-page {
    min-height: 100vh;
    padding: 32px;
    position: relative;
    overflow-x: hidden;
    display: grid;
    place-items: center;
    background:
        radial-gradient(circle at 10% 20%, rgba(0, 172, 238, 0.16), transparent 25%),
        radial-gradient(circle at 90% 85%, rgba(8, 125, 204, 0.13), transparent 27%),
        linear-gradient(140deg, #ecf9ff 0%, #f9fdff 48%, #eaf7ff 100%);
}

.auth-page::before,
.auth-page::after {
    content: "";
    position: fixed;
    border-radius: 50%;
    pointer-events: none;
}

.auth-page::before {
    top: -130px;
    right: -110px;
    width: 350px;
    height: 350px;
    border: 1px solid rgba(8, 125, 204, 0.12);
    box-shadow:
        0 0 0 45px rgba(8, 125, 204, 0.025),
        0 0 0 90px rgba(8, 125, 204, 0.018);
}

.auth-page::after {
    left: -100px;
    bottom: -100px;
    width: 260px;
    height: 260px;
    background: rgba(0, 168, 238, 0.06);
}

.auth-shell {
    width: min(980px, 100%);
    position: relative;
    z-index: 2;
    overflow: hidden;
    display: grid;
    grid-template-columns: minmax(300px, 0.9fr) minmax(390px, 1.1fr);
    background: var(--white);
    border: 1px solid rgba(8, 125, 204, 0.14);
    border-radius: 28px;
    box-shadow: 0 30px 80px rgba(3, 61, 103, 0.15);
}

.auth-shell-wide {
    width: min(1080px, 100%);
    grid-template-columns: minmax(320px, 0.82fr) minmax(500px, 1.18fr);
}

.auth-intro {
    min-height: 600px;
    padding: 45px;
    position: relative;
    isolation: isolate;
    overflow: hidden;
    color: var(--white);
    display: flex;
    flex-direction: column;
    justify-content: center;
    background:
        radial-gradient(circle at 85% 15%, rgba(92, 226, 255, 0.26), transparent 28%),
        linear-gradient(145deg, #032b4b 0%, #075f99 57%, #079ddd 100%);
}

.auth-intro::before {
    content: "";
    position: absolute;
    top: -100px;
    right: -130px;
    z-index: -1;
    width: 330px;
    height: 330px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 50%;
    box-shadow:
        0 0 0 45px rgba(255, 255, 255, 0.025),
        0 0 0 90px rgba(255, 255, 255, 0.018);
}

.auth-intro::after {
    content: "";
    position: absolute;
    left: 25px;
    bottom: 35px;
    z-index: -1;
    width: 180px;
    height: 45px;
    background: rgba(64, 213, 255, 0.20);
    border-radius: 50%;
    filter: blur(25px);
}

.auth-brand {
    margin-bottom: auto;
    display: inline-flex;
    align-items: center;
    gap: 11px;
    text-decoration: none;
}

.auth-brand img {
    width: 56px;
    height: 54px;
    object-fit: contain;
    filter: drop-shadow(0 7px 11px rgba(0, 15, 30, 0.22));
}

.auth-intro .auth-brand img {
    padding: 5px;
    background: rgba(255, 255, 255, 0.94);
    border-radius: 13px;
}

.auth-brand strong,
.auth-brand small {
    display: block;
}

.auth-brand strong {
    font-size: 18px;
    font-weight: 900;
    letter-spacing: 0.7px;
}

.auth-brand small {
    margin-top: 3px;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 4px;
}

.auth-kicker {
    margin-bottom: 13px;
    color: #8ee9ff;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 2.4px;
}

.auth-intro h1 {
    max-width: 390px;
    margin-bottom: 15px;
    font-size: clamp(34px, 5vw, 48px);
    line-height: 1.05;
    letter-spacing: -1.2px;
}

.auth-intro > p {
    max-width: 430px;
    color: #d5edfa;
    font-size: 14px;
    line-height: 1.75;
}

.auth-back {
    width: fit-content;
    margin-top: 24px;
    color: #ffffff;
    text-decoration: none;
    font-size: 13px;
    font-weight: 700;
}

.auth-benefits {
    margin-top: 25px;
    display: grid;
    gap: 10px;
    list-style: none;
    color: #e9f9ff;
    font-size: 13px;
    font-weight: 600;
}

.security-note {
    margin-top: 25px;
    padding: 14px 16px;
    color: #e9f9ff;
    background: rgba(255, 255, 255, 0.10);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 13px;
    font-size: 12px;
    line-height: 1.6;
}

.auth-card {
    padding: 48px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background:
        radial-gradient(circle at 100% 0%, rgba(0, 168, 238, 0.065), transparent 26%),
        var(--white);
}

.auth-card-heading {
    margin-bottom: 25px;
}

.auth-card-heading > span {
    display: block;
    margin-bottom: 5px;
    color: var(--blue);
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

.auth-card-heading h2 {
    margin-bottom: 6px;
    color: var(--blue-dark);
    font-size: 30px;
    letter-spacing: -0.6px;
}

.auth-card-heading p {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.5;
}

.auth-form {
    display: grid;
    gap: 17px;
}

.field-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.field label {
    display: block;
    margin-bottom: 6px;
    color: #315b76;
    font-size: 11px;
    font-weight: 800;
}

.field label span {
    color: #8b9da9;
    font-weight: 500;
}

.field input {
    width: 100%;
    min-width: 0;
    height: 46px;
    padding: 0 14px;
    color: #173d56;
    background: #f8fcff;
    border: 1px solid #d4e6f0;
    border-radius: 11px;
    outline: none;
    font-size: 13px;
    transition: 0.25s;
}

.field input:hover {
    border-color: #afd9ec;
}

.field input:focus {
    background: var(--white);
    border-color: var(--blue);
    box-shadow: 0 0 0 4px rgba(8, 125, 204, 0.08);
}

.auth-submit {
    width: 100%;
    min-height: 47px;
    padding: 12px 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    color: var(--white);
    background: linear-gradient(135deg, var(--blue), var(--cyan));
    border: none;
    border-radius: 12px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 11px 24px rgba(8, 125, 204, 0.24);
    transition: 0.3s;
}

.auth-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 30px rgba(8, 125, 204, 0.32);
}

.auth-submit span {
    transition: transform 0.3s;
}

.auth-submit:hover span {
    transform: translateX(4px);
}

.auth-switch {
    margin-top: 23px;
    color: var(--muted);
    text-align: center;
    font-size: 12px;
}

.auth-switch a,
.admin-login-link a {
    color: var(--blue);
    font-weight: 800;
    text-decoration: none;
}

.forgot-password-link {
    margin-top: 14px;
    text-align: right;
    font-size: 11px;
}

.forgot-password-link a {
    color: var(--blue);
    font-weight: 800;
    text-decoration: none;
}

.forgot-password-link a:hover,
.auth-switch a:hover {
    text-decoration: underline;
}

.admin-login-link {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #e4eff5;
    text-align: center;
    font-size: 11px;
}

.alert {
    margin-bottom: 19px;
    padding: 13px 15px;
    border: 1px solid transparent;
    border-radius: 11px;
    font-size: 12px;
    line-height: 1.55;
}

.alert ul {
    padding-left: 17px;
}

.alert-error {
    color: #9f2736;
    background: #fff2f3;
    border-color: #ffd1d6;
}

.alert-success {
    color: #087341;
    background: #edfff6;
    border-color: #bcebd4;
}

.setup-complete {
    padding: 25px;
    text-align: center;
    background: #f2fbff;
    border: 1px solid #d4eaf5;
    border-radius: 17px;
}

.setup-complete > span {
    width: 58px;
    height: 58px;
    margin: 0 auto 14px;
    display: grid;
    place-items: center;
    color: var(--white);
    background: var(--success);
    border-radius: 50%;
    font-size: 24px;
}

.setup-complete h3 {
    margin-bottom: 6px;
    color: var(--blue-dark);
}

.setup-complete p {
    margin-bottom: 20px;
    color: var(--muted);
    font-size: 13px;
}

.development-reset-box {
    margin-bottom: 18px;
    padding: 14px;
    color: #5f4c08;
    background: #fff9dc;
    border: 1px solid #f0dc78;
    border-radius: 11px;
    font-size: 11px;
    line-height: 1.5;
}

.development-reset-box strong {
    display: block;
    margin-bottom: 3px;
    color: #6d5700;
}

.development-reset-box p {
    margin-bottom: 8px;
}

.development-reset-box a {
    color: #075f9b;
    font-weight: 900;
    text-decoration: none;
}

.reset-link-invalid {
    padding: 24px;
    text-align: center;
    background: #fff7f8;
    border: 1px solid #ffd7dc;
    border-radius: 16px;
}

.reset-link-invalid > span {
    width: 50px;
    height: 50px;
    margin: 0 auto 13px;
    display: grid;
    place-items: center;
    color: #b52e3e;
    background: #ffe8eb;
    border-radius: 50%;
    font-size: 22px;
    font-weight: 900;
}

.reset-link-invalid h3 {
    margin-bottom: 6px;
    color: var(--blue-dark);
}

.reset-link-invalid p {
    margin-bottom: 18px;
    color: var(--muted);
    font-size: 12px;
}

/* CUSTOMER ACCOUNT */

.account-page {
    display: block;
}

.account-shell {
    width: min(1150px, 100%);
    margin: auto;
    position: relative;
    z-index: 2;
}

.account-header {
    margin-bottom: 35px;
    padding: 15px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(8, 125, 204, 0.14);
    border-radius: 18px;
    box-shadow: 0 12px 35px rgba(3, 61, 103, 0.08);
}

.account-header .auth-brand {
    margin: 0;
    color: var(--blue-dark);
}

.account-actions {
    display: flex;
    gap: 9px;
}

.button {
    padding: 10px 15px;
    border: 0;
    border-radius: 9px;
    cursor: pointer;
    text-decoration: none;
    font-family: inherit;
    font-size: 12px;
    font-weight: 800;
}

.inline-logout-form {
    margin: 0;
}

.inline-logout-form .button {
    width: 100%;
}

.button-light {
    color: var(--blue);
    background: #edf8ff;
}

.button-danger {
    color: #af3040;
    background: #fff0f2;
}

.account-welcome {
    margin-bottom: 27px;
}

.account-welcome > span {
    color: var(--blue);
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 2px;
}

.account-welcome h1 {
    margin: 7px 0;
    color: var(--blue-dark);
    font-size: clamp(30px, 5vw, 43px);
}

.account-welcome p {
    color: var(--muted);
}

.account-grid {
    display: grid;
    grid-template-columns: 1.3fr 1fr 1fr;
    gap: 20px;
}

.account-card {
    min-height: 260px;
    padding: 27px;
    position: relative;
    overflow: hidden;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 20px;
    box-shadow: 0 15px 38px rgba(3, 61, 103, 0.08);
}

.account-card-icon {
    width: 45px;
    height: 45px;
    margin-bottom: 18px;
    display: grid;
    place-items: center;
    background: #eaf8ff;
    border-radius: 13px;
    font-size: 20px;
}

.account-card h2 {
    margin-bottom: 15px;
    color: var(--blue-dark);
    font-size: 20px;
}

.account-card > p {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.7;
}

.account-card-muted {
    background: linear-gradient(145deg, #ffffff, #f5fbff);
}

.coming-soon {
    margin-top: 22px;
    display: inline-block;
    color: var(--blue);
    font-size: 9px;
    font-weight: 900;
    letter-spacing: 1.5px;
}

.profile-list {
    display: grid;
    gap: 11px;
}

.profile-list div {
    display: grid;
    grid-template-columns: 105px 1fr;
    gap: 10px;
}

.profile-list dt {
    color: var(--muted);
    font-size: 11px;
}

.profile-list dd {
    color: #254e68;
    font-size: 12px;
    font-weight: 800;
    overflow-wrap: anywhere;
}

/* ADMIN DASHBOARD */

.dashboard-page {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 255px minmax(0, 1fr);
    background: #f3f8fc;
}

.admin-sidebar {
    min-height: 100vh;
    padding: 25px 19px;
    position: sticky;
    top: 0;
    display: flex;
    flex-direction: column;
    color: var(--white);
    background:
        radial-gradient(circle at 100% 0%, rgba(0, 168, 238, 0.20), transparent 27%),
        linear-gradient(180deg, #032b4b, #064f7e);
}

.admin-brand {
    padding: 0 6px 25px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--white);
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    text-decoration: none;
}

.admin-brand img {
    width: 45px;
    height: 43px;
    padding: 4px;
    object-fit: contain;
    background: var(--white);
    border-radius: 11px;
}

.admin-brand strong,
.admin-brand small {
    display: block;
}

.admin-brand strong {
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.3px;
}

.admin-brand small {
    margin-top: 3px;
    color: #8edfff;
    font-size: 8px;
    font-weight: 800;
    letter-spacing: 2px;
}

.admin-nav {
    margin-top: 25px;
    display: grid;
    gap: 7px;
}

.admin-nav a,
.admin-nav span {
    padding: 12px 13px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    color: #cce7f5;
    border-radius: 10px;
    text-decoration: none;
    font-size: 12px;
    font-weight: 700;
}

.admin-nav a.active {
    color: var(--white);
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.11);
}

.admin-nav span {
    opacity: 0.58;
}

.admin-nav small {
    font-size: 7px;
    font-weight: 800;
    text-transform: uppercase;
}

.sidebar-bottom {
    margin-top: auto;
    padding-top: 20px;
    display: grid;
    gap: 7px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.sidebar-bottom a,
.sidebar-bottom button {
    width: 100%;
    padding: 10px 12px;
    display: block;
    color: #d9eff9;
    background: transparent;
    border: 0;
    border-radius: 9px;
    cursor: pointer;
    text-decoration: none;
    text-align: left;
    font-family: inherit;
    font-size: 11px;
    font-weight: 700;
}

.sidebar-bottom .sidebar-logout {
    color: #ffd2d7;
    background: rgba(255, 83, 104, 0.10);
}

.sidebar-logout-form {
    margin: 0;
}

.admin-main {
    min-width: 0;
    padding: 30px;
}

.admin-topbar {
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.admin-topbar > div:first-child > span {
    color: var(--blue);
    font-size: 9px;
    font-weight: 900;
    letter-spacing: 1.8px;
}

.admin-topbar h1 {
    margin-top: 4px;
    color: var(--blue-dark);
    font-size: 27px;
}

.admin-profile {
    padding: 8px 13px 8px 8px;
    display: flex;
    align-items: center;
    gap: 9px;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 13px;
}

.admin-profile > span {
    width: 37px;
    height: 37px;
    display: grid;
    place-items: center;
    color: var(--white);
    background: linear-gradient(135deg, var(--blue), var(--cyan));
    border-radius: 10px;
    font-weight: 900;
}

.admin-profile strong,
.admin-profile small {
    display: block;
}

.admin-profile strong {
    color: #234c66;
    font-size: 11px;
}

.admin-profile small {
    margin-top: 2px;
    color: var(--muted);
    font-size: 9px;
}

.dashboard-welcome {
    margin-bottom: 21px;
    padding: 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    color: var(--white);
    background:
        radial-gradient(circle at 92% 20%, rgba(83, 222, 255, 0.26), transparent 25%),
        linear-gradient(135deg, #064a77, #0788c7);
    border-radius: 19px;
    box-shadow: 0 15px 38px rgba(3, 73, 119, 0.17);
}

.dashboard-welcome div > span {
    color: #91e8ff;
    font-size: 8px;
    font-weight: 900;
    letter-spacing: 1.8px;
}

.dashboard-welcome h2 {
    margin: 6px 0;
    font-size: 25px;
}

.dashboard-welcome p {
    max-width: 650px;
    color: #d6effa;
    font-size: 12px;
    line-height: 1.6;
}

.status-badge {
    flex: 0 0 auto;
    padding: 9px 11px;
    color: #baf8d8;
    background: rgba(4, 49, 79, 0.30);
    border: 1px solid rgba(186, 248, 216, 0.18);
    border-radius: 30px;
    font-size: 8px;
    letter-spacing: 1px;
}

.stat-grid {
    margin-bottom: 21px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 17px;
}

.stat-card {
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 14px;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 16px;
    box-shadow: 0 9px 25px rgba(3, 61, 103, 0.05);
}

.stat-icon {
    width: 45px;
    height: 45px;
    flex: 0 0 45px;
    display: grid;
    place-items: center;
    color: var(--blue);
    background: #eaf8ff;
    border-radius: 13px;
    font-size: 19px;
}

.stat-card small,
.stat-card strong {
    display: block;
}

.stat-card small {
    margin-bottom: 3px;
    color: var(--muted);
    font-size: 10px;
}

.stat-card strong {
    color: var(--blue-dark);
    font-size: 21px;
}

.stat-card-next {
    background: linear-gradient(145deg, #ffffff, #f0faff);
}

.dashboard-grid {
    display: grid;
    grid-template-columns: 1.25fr 0.75fr;
    gap: 17px;
}

.dashboard-panel {
    padding: 23px;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 17px;
    box-shadow: 0 9px 25px rgba(3, 61, 103, 0.05);
}

.panel-heading {
    margin-bottom: 19px;
    display: flex;
    align-items: center;
    gap: 11px;
}

.panel-heading > span {
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    display: grid;
    place-items: center;
    color: var(--success);
    background: #eafff4;
    border-radius: 11px;
}

.panel-heading h3 {
    margin-bottom: 3px;
    color: var(--blue-dark);
    font-size: 15px;
}

.panel-heading p {
    color: var(--muted);
    font-size: 10px;
}

.check-list {
    display: grid;
    gap: 10px;
    list-style: none;
}

.check-list li {
    padding: 10px 12px 10px 34px;
    position: relative;
    color: #365c73;
    background: #f8fcff;
    border-radius: 9px;
    font-size: 11px;
}

.check-list li::before {
    content: "✓";
    position: absolute;
    left: 12px;
    color: var(--success);
    font-weight: 900;
}

@media (max-width: 950px) {
    .auth-shell,
    .auth-shell-wide {
        grid-template-columns: 1fr;
    }

    .auth-intro {
        min-height: 360px;
        padding: 35px;
    }

    .auth-brand {
        margin-bottom: 65px;
    }

    .account-grid {
        grid-template-columns: 1fr 1fr;
    }

    .account-grid .account-card:first-child {
        grid-column: 1 / -1;
    }

    .dashboard-page {
        grid-template-columns: 1fr;
    }

    .admin-sidebar {
        min-height: auto;
        position: static;
    }

    .admin-nav {
        grid-template-columns: repeat(4, minmax(150px, 1fr));
        overflow-x: auto;
    }

    .sidebar-bottom {
        margin-top: 20px;
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 700px) {
    .auth-page {
        padding: 16px;
    }

    .auth-shell {
        border-radius: 20px;
    }

    .auth-intro,
    .auth-card {
        padding: 28px 23px;
    }

    .auth-intro {
        min-height: 330px;
    }

    .auth-intro h1 {
        font-size: 34px;
    }

    .field-grid {
        grid-template-columns: 1fr;
    }

    .account-header,
    .admin-topbar,
    .dashboard-welcome {
        align-items: flex-start;
        flex-direction: column;
    }

    .account-header .auth-brand {
        margin: 0;
    }

    .account-grid,
    .stat-grid,
    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .account-grid .account-card:first-child {
        grid-column: auto;
    }

    .admin-main {
        padding: 20px 15px;
    }

    .status-badge {
        align-self: flex-start;
    }
}

@media (max-width: 430px) {
    .auth-page {
        padding: 0;
        display: block;
    }

    .auth-shell {
        min-height: 100vh;
        border: none;
        border-radius: 0;
    }

    .auth-intro {
        min-height: 310px;
    }

    .auth-brand img {
        width: 48px;
        height: 47px;
    }

    .auth-brand strong {
        font-size: 15px;
    }

    .account-page {
        padding: 14px;
    }

    .account-actions {
        width: 100%;
    }

    .account-actions .button {
        flex: 1;
        text-align: center;
    }

    .account-actions .inline-logout-form {
        flex: 1;
    }

    .profile-list div {
        grid-template-columns: 1fr;
        gap: 3px;
    }
}
