@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

/* Global Reset for Auth Pages */
.page-auth {
    font-family: 'Plus Jakarta Sans', sans-serif;
}

.page-auth #main-content {
    width: 100%;
    min-height: 100vh;
}

.page-login #main-content,
.page-register #main-content {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    /* The exact diagonal background: Orange top-left, Navy bottom-right */
    background: linear-gradient(115deg, #FF6000 0%, #FF6000 50%, #06152B 50%, #06152B 100%);
    padding: calc(var(--header-height, 80px) + 2rem) 2rem 2rem;
}

.page-password #main-content {
    background: linear-gradient(160deg, #eef4ff 0%, #f8fbff 45%, #e8f1ff 100%);
    padding: calc(var(--header-height, 80px) + 1.5rem) 1rem 2.5rem;
}

.page-password .page-hero {
    padding: 0 0 1rem;
    background: transparent;
}

.page-password .page-hero__content {
    text-align: center;
    max-width: 680px;
}

.page-password .page-hero__content p {
    color: #4E607A;
}

.page-password .auth-section {
    padding: 0;
}

.page-password .auth-form-shell {
    width: 100%;
    max-width: 620px;
    margin: 0 auto;
    padding: 1.5rem;
    border-radius: 16px;
    border: 1px solid rgba(11, 54, 104, 0.12);
    box-shadow: 0 20px 44px rgba(15, 23, 42, 0.1);
    background: #FFFFFF;
}

.page-password .auth-form-shell .button {
    width: 100%;
    justify-content: center;
}

.page-password .auth-switch-copy {
    text-align: center;
}

[x-cloak] {
    display: none !important;
}

.auth-page-topbar {
    position: fixed;
    top: 1rem;
    left: 1rem;
    right: 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    z-index: 200;
    pointer-events: none;
}

.auth-page-topbar__brand,
.auth-page-topbar__close {
    pointer-events: auto;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.22);
    box-shadow: 0 14px 30px rgba(6, 21, 43, 0.22);
    transition: transform 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

.auth-page-topbar__brand {
    display: inline-flex;
    align-items: center;
    padding: 0.65rem 1rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
}

.auth-page-topbar__logo {
    height: 34px;
    width: auto;
    object-fit: contain;
}

.auth-page-topbar__close {
    width: 46px;
    height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    color: #FFFFFF;
}

.auth-page-topbar__close svg {
    width: 18px;
    height: 18px;
}

.auth-page-topbar__brand:hover,
.auth-page-topbar__close:hover {
    transform: translateY(-1px);
    background: rgba(255, 255, 255, 0.22);
    border-color: rgba(255, 255, 255, 0.32);
}

/* Keep the standard site header on auth pages; hide footer to reduce clutter. */
.page-auth footer,
.page-auth .site-footer {
    display: none !important;
}

.page-auth .site-header {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    background: rgba(6, 21, 43, 0.85) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.16) !important;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.page-auth .site-header .main-nav a,
.page-auth .site-header .nav-submenu-toggle {
    color: rgba(255, 255, 255, 0.9);
}

.page-auth .site-header .main-nav a:hover,
.page-auth .site-header .nav-submenu-toggle:hover {
    color: #FFFFFF;
    background: rgba(255, 255, 255, 0.12);
}

.page-auth .site-header .main-nav a.is-active,
.page-auth .site-header .nav-submenu-toggle.is-active {
    color: #FFFFFF;
    background: rgba(255, 96, 0, 0.25);
}

/* Main Modal Card */
.auth-custom-card {
    display: flex;
    width: 100%;
    max-width: 1050px;
    margin: 0 auto;
    background: #FFFFFF;
    border-radius: 12px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.4);
    overflow: hidden;
}

/* Left Column - Navy */
.auth-col-left {
    flex: 1;
    max-width: 50%;
    background: #0B192C;
    padding: 3rem 3.5rem;
    color: #FFFFFF;
    display: flex;
    flex-direction: column;
}

.auth-logo-header {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-weight: 700;
    font-size: 1.3rem;
    color: #FFFFFF;
    margin-bottom: 2.5rem;
}
.auth-logo-icon {
    width: 24px;
    height: 24px;
    background: #FFFFFF;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}
.auth-logo-icon svg {
    color: #FF6000;
    width: 14px;
    height: 14px;
}

.auth-hero-arch {
    width: 100%;
    height: 240px;
    border-top-left-radius: 150px;
    border-top-right-radius: 150px;
    overflow: hidden;
    margin-bottom: 2rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}
.auth-hero-arch img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.auth-col-left h1 {
    font-size: 1.95rem;
    font-weight: 800;
    line-height: 1.25;
    margin-bottom: 1.25rem;
    color: #FFFFFF;
}

.auth-col-left p {
    font-size: 0.85rem;
    line-height: 1.6;
    color: #94A3B8;
    font-weight: 400;
}

/* Right Column - White */
.auth-col-right {
    flex: 1;
    padding: 3.5rem 4.5rem;
    background: #FFFFFF;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.auth-form {
    display: grid;
    gap: 1rem;
}

.auth-form .form-progress {
    width: 100%;
    height: 8px;
    margin-bottom: 0.4rem;
    border-radius: 999px;
    background: #E2E8F0;
    overflow: hidden;
}

.auth-form .form-progress-bar {
    width: 100% !important;
    height: 100%;
    background: transparent !important;
    border-radius: inherit;
    position: relative;
}

.auth-form .form-progress-bar::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: var(--progress, 25%);
    border-radius: inherit;
    background: linear-gradient(90deg, #FF6000 0%, #0F4DA8 100%);
    transition: width 0.3s ease;
}

.auth-step {
    margin: 0;
    padding: 1rem;
    border: 1px solid #E2E8F0;
    border-radius: 14px;
    background: #FFFFFF;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

.auth-step-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.auth-step-meta span {
    display: inline-flex;
    align-items: center;
    padding: 0.38rem 0.75rem;
    border-radius: 999px;
    background: #EFF6FF;
    color: #1D4ED8;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.auth-step-meta strong {
    color: #0F172A;
    font-size: 0.95rem;
    font-weight: 700;
}

.auth-step-note {
    margin: 0 0 0.75rem;
    color: #475569;
    font-size: 0.84rem;
    line-height: 1.6;
}

.auth-step-summary {
    margin: 0 0 1rem;
    padding-left: 1.1rem;
    color: #334155;
    font-size: 0.82rem;
    line-height: 1.6;
}

.auth-checkbox-list {
    display: grid;
    gap: 0.7rem;
    margin-bottom: 0.25rem;
}

.auth-checkbox-item {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    padding: 0.8rem 0.85rem;
    border-radius: 10px;
    border: 1px solid #E2E8F0;
    background: #F8FAFC;
    color: #334155;
    font-size: 0.8rem;
    line-height: 1.55;
}

.auth-checkbox-item input {
    width: 16px;
    height: 16px;
    margin-top: 0.15rem;
    accent-color: #FF6000;
}

.auth-step-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.7rem;
    margin-top: 1rem;
}

.auth-step-actions--single {
    justify-content: flex-end;
}

.btn-step {
    border: none;
    border-radius: 10px;
    padding: 0.8rem 1.15rem;
    min-width: 130px;
    font-size: 0.88rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-step--ghost {
    background: #E2E8F0;
    color: #334155;
}

.btn-step--ghost:hover {
    background: #CBD5E1;
}

.btn-step--primary {
    background: #FF6000;
    color: #FFFFFF;
    box-shadow: 0 8px 18px rgba(255, 96, 0, 0.2);
}

.btn-step--primary:hover {
    background: #E65600;
    box-shadow: 0 10px 22px rgba(255, 96, 0, 0.25);
    transform: translateY(-1px);
}

.auth-col-right h2 {
    font-size: 2.2rem;
    font-weight: 800;
    color: #0F172A;
    margin-bottom: 0.5rem;
    line-height: 1.2;
}
.auth-subtitle {
    font-size: 0.9rem;
    color: #64748B;
    margin-bottom: 2rem;
}

/* Workspace Dropdown */
.workspace-select-field {
    display: grid;
    gap: 0.48rem;
    margin-bottom: 1.35rem;
}

.workspace-select-field__label {
    display: block;
    color: #334155;
    font-size: 0.75rem;
    font-weight: 800;
}

.workspace-select-field__control {
    position: relative;
    display: flex;
    align-items: center;
}

.workspace-select-field__control select {
    width: 100%;
    height: 52px;
    padding: 0 2.9rem 0 2.85rem;
    border: 1.5px solid #E2E8F0;
    border-radius: 12px;
    appearance: none;
    -webkit-appearance: none;
    background: #FFFFFF;
    color: #0F172A;
    font-size: 0.92rem;
    font-weight: 700;
    line-height: 1.2;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.workspace-select-field__control select:hover {
    border-color: #CBD5E1;
    background: #F8FAFC;
}

.workspace-select-field__control select:focus {
    outline: none;
    border-color: #FF6000;
    background: #FFFFFF;
    box-shadow: 0 0 0 4px rgba(255, 96, 0, 0.11), 0 14px 28px rgba(15, 23, 42, 0.08);
}

.workspace-select-field__control.is-disabled select,
.workspace-select-field__control select:disabled {
    cursor: not-allowed;
    color: #94A3B8;
    background: #F8FAFC;
}

.workspace-select-field__icon,
.workspace-select-field__chevron {
    position: absolute;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.workspace-select-field__icon {
    left: 0.9rem;
    width: 24px;
    height: 24px;
    color: #FF6000;
}

.workspace-select-field__icon svg,
.workspace-select-field__chevron svg {
    width: 100%;
    height: 100%;
}

.workspace-select-field__chevron {
    right: 0.95rem;
    width: 18px;
    height: 18px;
    color: #64748B;
}

.workspace-select-field__hint,
.workspace-select-field__error,
.workspace-select-field__empty {
    margin: 0;
    font-size: 0.76rem;
    line-height: 1.5;
}

.workspace-select-field__hint {
    color: #64748B;
}

.workspace-select-field__error {
    padding: 0.62rem 0.72rem;
    border: 1px solid #FECACA;
    border-radius: 10px;
    background: #FEF2F2;
    color: #991B1B;
    font-weight: 700;
}

.workspace-select-field__empty {
    padding: 0.62rem 0.72rem;
    border: 1px dashed #CBD5E1;
    border-radius: 10px;
    background: #F8FAFC;
    color: #64748B;
    font-weight: 700;
}

.auth-role-helper {
    margin: -0.5rem 0 1.35rem;
    color: #64748B;
    font-size: 0.82rem;
    line-height: 1.6;
}

.auth-error-summary {
    margin-bottom: 1.2rem;
    padding: 1rem 1.05rem;
    border-radius: 12px;
    background: #FEF2F2;
    border: 1px solid #FECACA;
    color: #991B1B;
}

.auth-error-summary strong {
    display: block;
    margin-bottom: 0.45rem;
    font-size: 0.88rem;
}

.auth-error-summary ul {
    margin: 0;
    padding-left: 1rem;
    font-size: 0.82rem;
    line-height: 1.55;
}

.auth-section-divider {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 1.2rem 0 1rem;
}

.auth-section-divider::before,
.auth-section-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: #E2E8F0;
}

.auth-section-divider span {
    color: #64748B;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.auth-form-grid {
    display: grid;
    gap: 1rem;
}

.auth-form-grid--two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

/* Forms */
.form-group {
    margin-bottom: 1.25rem;
}

.auth-form-grid .form-group {
    margin-bottom: 0;
}

.form-group--full {
    grid-column: 1 / -1;
}

.form-group label {
    display: block;
    font-size: 0.75rem;
    font-weight: 700;
    color: #334155;
    margin-bottom: 0.4rem;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 0.85rem 1rem;
    border: 1.5px solid #F1F5F9;
    background: #FFFFFF;
    border-radius: 8px;
    font-size: 0.9rem;
    color: #0F172A;
    font-weight: 500;
    transition: all 0.2s;
}

.form-group input::placeholder,
.form-group select::placeholder {
    color: #94A3B8;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #FF6000;
    box-shadow: 0 0 0 4px rgba(255, 96, 0, 0.1);
}

.auth-upload-panel {
    padding: 1rem;
    border: 1.5px dashed #CBD5E1;
    border-radius: 12px;
    background: #F8FAFC;
}

.auth-upload-panel input[type="file"] {
    border: 0;
    padding: 0;
    background: transparent;
    box-shadow: none;
}

.auth-upload-panel small {
    display: block;
    margin-top: 0.55rem;
    color: #64748B;
    font-size: 0.75rem;
    line-height: 1.5;
}

.btn-submit {
    width: 100%;
    background: #FF6000;
    color: #FFFFFF;
    padding: 1rem;
    border: none;
    border-radius: 8px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    margin-top: 0.5rem;
    transition: all 0.2s;
}
.btn-submit:hover {
    background: #E65600;
    box-shadow: 0 6px 15px rgba(255, 96, 0, 0.25);
    transform: translateY(-1px);
}

.auth-bottom-links {
    text-align: center;
    margin-top: 1.5rem;
    font-size: 0.85rem;
    color: #64748B;
    font-weight: 500;
}
.auth-bottom-links a {
    color: #0F172A;
    font-weight: 800;
    text-decoration: none;
    margin-left: 0.25rem;
}
.auth-bottom-links a:hover {
    text-decoration: underline;
    color: #FF6000;
}

/* Responsive */
@media (max-width: 991px) {
    .auth-custom-card {
        flex-direction: column;
    }
    .auth-col-left {
        max-width: 100%;
        padding: 3rem 2rem;
    }
    .auth-hero-arch {
        height: 200px;
    }
    .auth-col-right {
        padding: 3rem 2rem;
    }
    .page-login #main-content,
    .page-register #main-content {
        padding: calc(var(--header-height-mobile, 64px) + 1.25rem) 0.75rem 1rem;
        background: #0B192C; /* Solid for mobile */
    }

    .page-password #main-content {
        padding: calc(var(--header-height-mobile, 64px) + 1rem) 0.75rem 1.25rem;
        background: linear-gradient(180deg, #f3f8ff 0%, #edf4ff 100%);
    }
    .auth-custom-card {
        border-radius: 0;
    }

    .auth-page-topbar {
        top: 0.75rem;
        left: 0.75rem;
        right: 0.75rem;
    }

    .auth-page-topbar__brand {
        padding: 0.55rem 0.85rem;
    }

    .auth-page-topbar__logo {
        height: 28px;
    }

    .auth-page-topbar__close {
        width: 42px;
        height: 42px;
    }

    .auth-form-grid--two {
        grid-template-columns: 1fr;
    }

    .workspace-select-field__control select {
        height: 50px;
        font-size: 0.9rem;
    }

    .auth-step-meta {
        flex-direction: column;
        align-items: flex-start;
    }

    .auth-step-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .btn-step {
        width: 100%;
    }
}
