/* ===========================================
   Login Page Modern Styles
   =========================================== */

/* Override body background for login/registration pages */
body.login-page-body {
    background: #f7f7f7;
}

/* Login page background - subtle gradient */
.login-page {
    min-height: calc(100vh - 100px);
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f5f7fa 0%, #e4e8ec 100%);
    padding: 20px;
}

/* Modern card container */
.login-card {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 420px;
    padding: 48px 40px;
}

/* Logo section */
.login-logo {
    text-align: center;
    margin-bottom: 32px;
}

.login-logo img {
    max-width: 280px;
    height: auto;
}

/* Release notification */
.login-release-notification {
    text-align: center;
    margin-top: 12px;
}

.login-release-notification a {
    color: #04b3ea;
    font-size: 14px;
}

/* Form container */
.login-form {
    width: 100%;
}

/* Form groups */
.login-form .form-group {
    margin-bottom: 24px;
}

.login-form .form-group:last-of-type {
    margin-bottom: 16px;
}

/* Labels */
.login-form .form-label {
    font-weight: 500;
    font-size: 14px;
    color: #33475b;
    margin-bottom: 8px;
    display: block;
}

/* Form controls */
.login-form .form-control {
    border-radius: 8px;
    border: 1px solid #e5e8ed;
    padding: 12px 16px;
    font-size: 15px;
    height: auto;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    background-color: #fff;
}

.login-form .form-control:focus {
    border-color: #61caeb;
    box-shadow: 0 0 0 3px rgba(97, 202, 235, 0.15);
    outline: none;
}

.login-form .form-control::placeholder {
    color: #a0aec0;
}

/* Password input wrapper with toggle */
.password-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.password-input-wrapper .form-control {
    padding-right: 48px;
    width: 100%;
}

.password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #7c98b6;
    cursor: pointer;
    padding: 4px 8px;
    font-size: 16px;
    line-height: 1;
    transition: color 0.2s ease;
}

.password-toggle:hover {
    color: #33475b;
}

.password-toggle:focus {
    outline: none;
    color: #61caeb;
}

/* Login button */
.btn-login {
    width: 100%;
    padding: 14px 24px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 8px;
    margin-top: 8px;
    margin-bottom: 0;
    /* background: linear-gradient(135deg, #61caeb 0%, #55b5d4 100%); **/
    border: none;
    color: #ffffff;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-login:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(97, 202, 235, 0.4);
    background: linear-gradient(135deg, #55b5d4 0%, #4aa8c7 100%);
}

.btn-login:active {
    transform: translateY(0);
}

.btn-login:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Links section */
.login-links {
    text-align: center;
    margin-top: 24px;
    font-size: 14px;
    color: #7c98b6;
}

.login-links a {
    color: #61caeb;
    text-decoration: none;
    transition: color 0.2s ease;
}

.login-links a:hover {
    color: #55b5d4;
    text-decoration: underline;
}

.login-links .separator {
    margin: 0 8px;
    color: #c5d0de;
}

/* Alert messages */
.login-form .alert {
    border-radius: 8px;
    margin-bottom: 24px;
    padding: 12px 16px;
    font-size: 14px;
    border: none;
    display: block;
    width: 100%;
}

.login-form .alert-danger {
    background-color: #fef2f2;
    color: #dc2626;
    border-left: 4px solid #dc2626;
}

.login-form .alert-warning {
    background-color: #fffbeb;
    color: #d97706;
    border-left: 4px solid #d97706;
}

/* Two Factor Authentication section */
.two-factor-section {
    background: #f7f9fc;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 24px;
    border: 1px solid #e5e8ed;
}

.two-factor-section .form-label {
    font-size: 14px;
    color: #506e91;
    margin-bottom: 12px;
}

.two-factor-section .form-control {
    letter-spacing: 4px;
    text-align: center;
    font-size: 18px;
    font-weight: 600;
}

/* Request new code link */
.request-code-link {
    display: inline-block;
    margin-top: 12px;
    font-size: 14px;
    color: #61caeb;
    text-decoration: underline;
    cursor: pointer;
}

.request-code-link:hover {
    color: #55b5d4;
}

/* New code sent message */
.new-code-message {
    margin-top: 12px;
    padding: 12px;
    background: #ecfdf5;
    border-radius: 6px;
    color: #059669;
    font-size: 14px;
}

/* Disabled account panel */
.login-disabled-panel {
    text-align: center;
    padding: 20px;
    background: #fef2f2;
    border-radius: 8px;
    color: #dc2626;
}

/* Forgot Password Page Styles */
.forgot-description {
    color: #506e91;
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 24px;
    text-align: center;
}

/* Info/Status Messages */
.info-message {
    padding: 16px 20px;
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 24px;
    text-align: center;
}

.info-message.success {
    background-color: #ecfdf5;
    color: #059669;
    border: 1px solid #a7f3d0;
}

.info-message.warning {
    background-color: #fffbeb;
    color: #d97706;
    border: 1px solid #fde68a;
}

.info-message a {
    color: inherit;
    text-decoration: underline;
}

.info-message a:hover {
    opacity: 0.8;
}

/* ===========================================
   Registration Page Styles
   =========================================== */

/* Split-screen registration layout */
.registration-page {
    position: relative;
    min-height: calc(100vh - 40px);
    width: 100%;
    display: flex;
    align-items: stretch;
}

.registration-split-container {
    display: flex;
    width: 100%;
    min-height: calc(100vh - 40px);
}

/* Left side - Marketing */
.registration-marketing {
    flex: 0 0 42%;
    background: linear-gradient(135deg, #e8f4f8 0%, #d4ebf2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

.marketing-content {
    max-width: 400px;
    text-align: center;
}

.marketing-hero-image {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    margin-bottom: 24px;
}

.marketing-headline {
    font-size: 28px;
    color: #33475b;
    font-weight: 400;
    margin-bottom: 24px;
}

.marketing-headline strong {
    font-weight: 700;
}

.marketing-benefits {
    list-style: none;
    padding: 0;
    margin: 0 0 32px 0;
    text-align: left;
}

.marketing-benefits li {
    font-size: 16px;
    color: #506e91;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.marketing-benefits i {
    color: #61caeb;
    font-size: 18px;
}

.marketing-testimonial {
    margin-top: 24px;
}

.testimonial-image {
    max-width: 100%;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

/* Right side - Form */
.registration-form-side {
    flex: 1;
    background: linear-gradient(135deg, #f5f7fa 0%, #e4e8ec 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    overflow-y: auto;
}

.registration-form-container {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 440px;
    padding: 40px 36px;
}

/* Hide marketing on mobile */
@media (max-width: 992px) {
    .registration-marketing {
        display: none;
    }

    .registration-form-side {
        flex: 1;
    }
}

@media (max-width: 480px) {
    .registration-form-container {
        padding: 32px 24px;
    }
}

/* Wider card for registration (fallback) */
.registration-card {
    max-width: 480px;
}

.registration-tagline {
    text-align: center;
    color: #506e91;
    font-size: 18px;
    margin-bottom: 24px;
}

.registration-tagline strong {
    color: #33475b;
}

/* Step indicator */
.step-indicator {
    text-align: center;
    font-size: 13px;
    color: #7c98b6;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e5e8ed;
}

/* Form row for side-by-side fields */
.form-row {
    display: flex;
    gap: 12px;
    margin-bottom: 0;
}

.form-row .form-group.half {
    flex: 1;
    margin-bottom: 16px;
}

/* Smaller form group margin for registration */
.registration-form .form-group {
    margin-bottom: 16px;
}

/* Password hint */
.password-hint {
    display: block;
    font-size: 12px;
    color: #7c98b6;
    margin-top: 6px;
}

.password-hint i {
    margin-right: 4px;
}

/* Terms checkbox group */
.terms-group {
    margin-top: 8px;
    margin-bottom: 20px;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 13px;
    color: #506e91;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    margin-top: 3px;
    flex-shrink: 0;
}

.checkbox-label a {
    color: #61caeb;
}

.checkbox-label a:hover {
    color: #55b5d4;
}

/* Select dropdown styling */
.registration-form select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%237c98b6' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding: 14px 40px 14px 16px;
    height: auto;
    min-height: 48px;
    line-height: 1.4;
    cursor: pointer;
}

/* Get Started button (green) */
.btn-get-started {
    background: linear-gradient(135deg, #6b9861 0%, #5a8750 100%) !important;
}

.btn-get-started:hover {
    background: linear-gradient(135deg, #5a8750 0%, #4a7640 100%) !important;
    box-shadow: 0 4px 12px rgba(107, 152, 97, 0.4) !important;
}

/* Save spinner */
.save-spinner {
    margin-top: 20px;
    color: #7c98b6;
}

/* Activation step styling */
.activation-icon {
    text-align: center;
    color: #61caeb;
    margin-bottom: 20px;
}

.activation-title {
    text-align: center;
    color: #33475b;
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 12px;
}

.activation-text {
    text-align: center;
    color: #506e91;
    margin-bottom: 24px;
}

.activation-help {
    background: #f7f9fc;
    border-radius: 8px;
    padding: 16px 20px;
    margin-bottom: 24px;
    font-size: 14px;
    color: #506e91;
}

.activation-help p {
    margin-bottom: 12px;
}

.activation-help ul {
    margin: 0;
    padding-left: 20px;
}

.activation-help li {
    margin-bottom: 6px;
}

/* Secondary button */
.btn-secondary,
.btn-resend {
    width: 100%;
    padding: 12px 24px;
    font-size: 15px;
    font-weight: 500;
    border-radius: 8px;
    background: #f7f9fc;
    border: 1px solid #e5e8ed;
    color: #506e91;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-secondary:hover,
.btn-resend:hover {
    background: #e5e8ed;
    color: #33475b;
}

/* Alert info style */
.alert-info {
    background-color: #e0f2fe;
    color: #0284c7;
    border-left: 4px solid #0284c7;
}

/* Responsive adjustments */
@media (max-width: 480px) {
    .login-card {
        padding: 32px 24px;
        margin: 16px;
        border-radius: 8px;
    }

    .login-logo img {
        max-width: 220px;
    }

    .login-form .form-control {
        padding: 10px 14px;
    }

    .btn-login {
        padding: 12px 20px;
        font-size: 15px;
    }
}

/* Hide sidebar and top bar on login page */
.body-flex.login-page-body .sidebar,
.body-flex.login-page-body .top-bar {
    display: none !important;
}

.body-flex.login-page-body .content,
.body-flex.login-page-body #main {
    margin-left: 0 !important;
    margin-right: 0 !important;
    margin-top: 0 !important;
    padding: 0 !important;
    max-width: 100% !important;
    width: 100% !important;
}

.body-flex.login-page-body #main > div {
    margin: 0 !important;
    padding: 0 !important;
}

/* Ensure login page fills entire viewport but leaves room for footer */
.body-flex.login-page-body {
    overflow-x: hidden;
    background: linear-gradient(135deg, #f5f7fa 0%, #e4e8ec 100%);
}

.body-flex.login-page-body .login-page {
    position: relative;
    min-height: calc(100vh - 40px);
    width: 100%;
}

/* Registration page */
.body-flex.login-page-body .registration-page {
    min-height: calc(100vh - 40px);
}

/* Style footer - inherits background from body */
.body-flex.login-page-body .footer,
.body-flex.login-page-body footer,
.body-flex.login-page-body #footer {
    background: transparent !important;
    border-top: none !important;
    color: #7c98b6 !important;
    position: relative !important;
    text-align: center !important;
    padding: 12px 0 !important;
    font-size: 13px !important;
    width: 100% !important;
    margin: 0 !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
}
