/* ============================================
   Nigella-POS - Modern Login Page Styles
   Gradient animations, glassmorphism, floating cards
   ============================================ */

/* Import Inter Font */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

body.account-page,
body.login-page {
    font-family: 'Inter', sans-serif !important;
}

/* ============================================
   1. LOGIN PAGE LAYOUT
   ============================================ */

body.login-page {
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    min-height: 100vh;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.login-container {
    display: flex;
    height: 100vh;
    max-height: 100vh;
    overflow: hidden;
    position: relative;
}

/* Left Side - Branding Section */
.login-branding-section {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    overflow: hidden;
}

/* Right Side - Form Section */
.login-form-section {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.125rem;
    background: #f8f9fa;
}

/* ============================================
   2. ANIMATED GRADIENT BACKGROUND
   ============================================ */

@keyframes gradientShift {

    0%,
    100% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }
}

.gradient-animated-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg,
            #ee8135 0%,
            #ff9f5a 30%,
            #d9730d 60%,
            #ee8135 100%);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
    z-index: 1;
}

.gradient-animated-bg::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 30% 50%, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
    animation: float 6s ease-in-out infinite;
}

.branding-content {
    position: relative;
    z-index: 2;
    color: white;
    text-align: center;
    max-width: 600px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* ============================================
   3. LOGO AND TAGLINE ANIMATIONS
   ============================================ */

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.logo-pulse-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    animation: pulse 3s ease-in-out infinite;
}

.logo-pulse-wrapper i {
    font-size: 2.25rem;
    color: white;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.3));
}

.logo-pulse-wrapper h1 {
    font-size: 2.25rem;
    font-weight: 900;
    margin: 0;
    color: white;
    text-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    letter-spacing: 1.5px;
}

.tagline-fade-in {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.56rem;
    line-height: 1.2;
    animation: fadeIn 1s ease-out 0.4s backwards;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.subtitle-fade-in {
    font-size: 0.75rem;
    margin-bottom: 1.5rem;
    opacity: 0.95;
    animation: fadeIn 1s ease-out 0.6s backwards;
}

/* ============================================
   4. FLOATING FEATURE CARDS
   ============================================ */

@keyframes float {

    0%,
    100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-10px);
    }
}

.floating-features-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.feature-card {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    padding: 0.75rem;
    text-align: left;
    transition: all 0.3s ease;
    animation: float 3s ease-in-out infinite;
    cursor: pointer;
}

.feature-card:nth-child(1) {
    animation-delay: 0s;
}

.feature-card:nth-child(2) {
    animation-delay: 0.5s;
}

.feature-card:nth-child(3) {
    animation-delay: 1s;
}

.feature-card:nth-child(4) {
    animation-delay: 1.5s;
}

.feature-card:hover {
    transform: translateY(-15px) scale(1.05);
    background: rgba(255, 255, 255, 0.25);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.2);
}

.feature-icon {
    width: 30px;
    height: 30px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.75rem;
}

.feature-icon i {
    font-size: 0.95rem;
    color: white;
}

.feature-card h3 {
    font-size: 0.66rem;
    font-weight: 700;
    margin-bottom: 0.38rem;
    color: white;
}

.feature-card p {
    font-size: 0.56rem;
    margin: 0;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.3;
}

/* ============================================
   5. GLASSMORPHISM FORM CARD
   ============================================ */

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.glass-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border-radius: 18px;
    padding: 1.5rem;
    width: 100%;
    max-width: 420px;
    animation: slideInRight 0.8s ease-out 0.8s backwards;
}

.card-header-modern {
    text-align: center;
    margin-bottom: 1.75rem;
}

.card-header-modern h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 0.4rem;
}

.card-header-modern p {
    font-size: 0.85rem;
    color: #6b7280;
    margin: 0;
}

/* ============================================
   6. FLOATING LABEL INPUTS
   ============================================ */

.floating-label-input {
    position: relative;
    margin-bottom: 1rem;
}

.input-icon-wrapper {
    position: relative;
}

.input-icon {
    position: absolute;
    left: 0.875rem;
    top: 50%;
    transform: translateY(-50%);
    color: #6b7280;
    font-size: 1rem;
    transition: color 0.3s ease;
    z-index: 2;
}

.form-control-modern {
    width: 100%;
    padding: 0.75rem 0.75rem 0.75rem 2.75rem;
    font-size: 0.875rem;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    background: transparent;
    color: #1f2937;
    transition: all 0.3s ease;
    outline: none;
}

.form-control-modern:focus {
    border-color: #ee8135;
    box-shadow: 0 0 0 4px rgba(238, 129, 53, 0.1);
}

.form-control-modern:focus~.floating-label,
.form-control-modern:not(:placeholder-shown)~.floating-label {
    transform: translateY(-34px) translateX(-20px) scale(0.85);
    color: #ee8135;
    background: #f8f9fa;
    padding: 0.25rem 0.625rem;
    border-radius: 4px;
}

.form-control-modern:focus~.input-icon {
    color: #ee8135;
}

/* Validation Error Styles */
.form-control-modern.is-invalid {
    border-color: #ef4444 !important;
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.1) !important;
}

.form-control-modern.is-invalid~.input-icon {
    color: #ef4444 !important;
}

.form-control-modern.is-invalid~.floating-label {
    color: #ef4444 !important;
}

.form-control-modern.is-invalid:focus {
    border-color: #ef4444 !important;
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.15) !important;
}

.floating-label {
    position: absolute;
    left: 2.875rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.85rem;
    color: #6b7280;
    pointer-events: none;
    transition: all 0.3s ease;
    background: transparent;
}

.validation-message {
    display: block;
    margin-top: 0.38rem;
    font-size: 0.66rem;
}

/* ============================================
   7. PASSWORD TOGGLE
   ============================================ */

.password-toggle {
    position: absolute;
    right: 0.875rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #6b7280;
    font-size: 1rem;
    cursor: pointer;
    padding: 0.2rem;
    transition: all 0.3s ease;
    z-index: 2;
}

.password-toggle:hover {
    color: #ee8135;
    transform: translateY(-50%) scale(1.1);
}

.password-toggle:active {
    transform: translateY(-50%) scale(0.95);
}

/* ============================================
   8. CUSTOM CHECKBOX
   ============================================ */

.custom-checkbox {
    display: flex;
    align-items: center;
}

.custom-checkbox-input {
    display: none;
}

.custom-checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    user-select: none;
}

.checkbox-box {
    width: 18px;
    height: 18px;
    border: 2px solid #e5e7eb;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 0.6rem;
    background: white;
    transition: all 0.3s ease;
}

.checkbox-box i {
    color: white;
    font-size: 0.75rem;
    opacity: 0;
    transform: scale(0);
    transition: all 0.3s ease;
}

.custom-checkbox-input:checked~.custom-checkbox-label .checkbox-box {
    background: linear-gradient(135deg, #ee8135 0%, #ff6b9d 100%);
    border-color: #ee8135;
}

.custom-checkbox-input:checked~.custom-checkbox-label .checkbox-box i {
    opacity: 1;
    transform: scale(1);
}

.checkbox-text {
    color: #1f2937;
    font-size: 0.71rem;
}

/* ============================================
   9. ANIMATED LOGIN BUTTON
   ============================================ */

.btn-login {
    background: linear-gradient(135deg, #ee8135 0%, #ff7a3d 100%);
    border: none;
    border-radius: 10px;
    color: white;
    font-size: 0.95rem;
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-login::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(238, 129, 53, 0.4);
}

.btn-login:hover::before {
    width: 400px;
    height: 400px;
}

.btn-login:active {
    transform: translateY(0);
    box-shadow: 0 4px 12px rgba(238, 129, 53, 0.3);
}

.btn-login .btn-text {
    position: relative;
    z-index: 1;
}

.btn-login i {
    position: relative;
    z-index: 1;
    transition: transform 0.3s ease;
}

.btn-login:hover i {
    transform: translateX(4px);
}

.loading-spinner {
    position: relative;
    z-index: 1;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.spin-animation {
    animation: spin 1s linear infinite;
}

/* ============================================
   10. DIVIDER AND LINKS
   ============================================ */

.divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 1.13rem 0;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid #e5e7eb;
}

.divider span {
    padding: 0 0.875rem;
    color: #6b7280;
    font-size: 0.75rem;
}

.register-text {
    color: #6b7280;
    font-size: 0.8rem;
    margin: 0;
}

.register-link {
    color: #ee8135;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.register-link:hover {
    color: #ff6b9d;
    text-decoration: underline;
}

.register-link i {
    transition: transform 0.3s ease;
}

.register-link:hover i {
    transform: translateX(4px);
}

/* ============================================
   LOGIN FOOTER
   ============================================ */

.login-footer {
    position: absolute;
    bottom: 0.75rem;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 420px;
    padding: 0 1rem;
}

.login-footer-content {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: transparent;
    border-radius: 6px;
    border: none;
}

.login-footer-text {
    font-size: 0.65rem;
    color: #6b7280;
    text-align: center;
    line-height: 1.3;
    white-space: nowrap;
}

.login-footer-logo {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.login-footer-logo .powered-by {
    font-size: 0.6rem;
    color: #9ca3af;
    font-style: italic;
    white-space: nowrap;
}

.login-footer-logo .footer-logo-img {
    height: 18px;
    width: auto;
    object-fit: contain;
    filter: grayscale(20%);
    opacity: 0.9;
    transition: all 0.3s ease;
}

.login-footer-logo .footer-logo-img:hover {
    filter: grayscale(0%);
    opacity: 1;
}

/* ============================================
   11. LOADING OVERLAY
   ============================================ */

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loading-content {
    text-align: center;
    color: white;
}

.loading-content .spinner-border {
    width: 2.25rem;
    height: 2.25rem;
    border-width: 0.225rem;
}

.loading-content p {
    font-size: 0.84rem;
    font-weight: 600;
}

/* ============================================
   12. ALERTS
   ============================================ */

.alert {
    border-radius: 9px;
    padding: 0.75rem 0.94rem;
    margin-bottom: 1.13rem;
    border: none;
}

.alert-success {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1) 0%, rgba(16, 185, 129, 0.05) 100%);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.alert-danger {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.1) 0%, rgba(239, 68, 68, 0.05) 100%);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

/* ============================================
   13. RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 1024px) {
    .login-branding-section {
        padding: 1.5rem;
    }

    .logo-pulse-wrapper i {
        font-size: 2.25rem;
    }

    .logo-pulse-wrapper h1 {
        font-size: 2.25rem;
    }

    .tagline-fade-in {
        font-size: 1.5rem;
    }

    .floating-features-grid {
        gap: 0.75rem;
    }

    .feature-card {
        padding: 0.94rem;
    }
}

@media (max-width: 768px) {
    .login-container {
        flex-direction: column;
    }

    .login-branding-section {
        min-height: 60vh;
        padding: 1.5rem 1.13rem;
    }

    .logo-pulse-wrapper {
        flex-direction: column;
        gap: 0.38rem;
    }

    .logo-pulse-wrapper i {
        font-size: 1.88rem;
    }

    .logo-pulse-wrapper h1 {
        font-size: 2.5rem;
    }

    .tagline-fade-in {
        font-size: 1.5rem;
    }

    .subtitle-fade-in {
        font-size: 1rem;
    }

    .floating-features-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
        margin-top: 2rem;
    }

    .feature-card {
        animation: none;
    }

    .login-form-section {
        padding: 1.5rem;
        min-height: 40vh;
    }

    .glass-card {
        padding: 2rem 1.5rem;
        animation-delay: 0s;
    }

    .card-header-modern h2 {
        font-size: 1.75rem;
    }

    .login-footer {
        position: static;
        transform: none;
        margin-top: 1.5rem;
        padding: 0;
    }

    .login-footer-content {
        padding: 0.5rem;
    }

    .login-footer-text {
        font-size: 0.65rem;
    }

    .login-footer-logo .footer-logo-img {
        height: 18px;
    }

    /* Faster animations on mobile */
    .gradient-animated-bg {
        animation-duration: 10s;
    }
}

@media (max-width: 480px) {
    .glass-card {
        padding: 1.13rem 0.75rem;
        border-radius: 12px;
    }

    .form-control-modern {
        padding: 0.66rem 0.66rem 0.66rem 2.25rem;
    }

    .input-icon {
        left: 0.66rem;
        font-size: 0.84rem;
    }

    .floating-label {
        left: 2.25rem;
    }
}

/* ============================================
   14. DARK MODE STYLES FOR LOGIN PAGE
   ============================================ */

/* Dark Mode - Right Side Form Section Background */
html[data-theme="dark"] .login-form-section {
    background: #1e293b !important;
}

/* Dark Mode - Glass Card */
html[data-theme="dark"] .glass-card {
    background: rgba(30, 41, 59, 0.95) !important;
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3) !important;
}

/* Dark Mode - Card Header */
html[data-theme="dark"] .card-header-modern h2 {
    color: #ffffff !important;
}

html[data-theme="dark"] .card-header-modern p {
    color: #cbd5e1 !important;
}

/* Dark Mode - Form Inputs */
html[data-theme="dark"] .form-control-modern {
    background: #334155 !important;
    border-color: #475569 !important;
    color: #ffffff !important;
}

html[data-theme="dark"] .form-control-modern:focus {
    border-color: #ee8135 !important;
    box-shadow: 0 0 0 4px rgba(238, 129, 53, 0.2) !important;
}

html[data-theme="dark"] .form-control-modern::placeholder {
    color: #94a3b8 !important;
}

/* Dark Mode - Floating Labels */
html[data-theme="dark"] .floating-label {
    color: #94a3b8 !important;
    background: transparent !important;
}

html[data-theme="dark"] .form-control-modern:focus ~ .floating-label,
html[data-theme="dark"] .form-control-modern:not(:placeholder-shown) ~ .floating-label {
    color: #ee8135 !important;
    background: #1e293b !important;
}

/* Dark Mode - Input Icons */
html[data-theme="dark"] .input-icon {
    color: #94a3b8 !important;
}

html[data-theme="dark"] .form-control-modern:focus ~ .input-icon {
    color: #ee8135 !important;
}

/* Dark Mode - Password Toggle */
html[data-theme="dark"] .password-toggle {
    color: #94a3b8 !important;
}

html[data-theme="dark"] .password-toggle:hover {
    color: #ee8135 !important;
}

/* Dark Mode - Checkbox */
html[data-theme="dark"] .checkbox-box {
    background: #334155 !important;
    border-color: #475569 !important;
}

html[data-theme="dark"] .checkbox-text {
    color: #cbd5e1 !important;
}

/* Dark Mode - Divider */
html[data-theme="dark"] .divider::before,
html[data-theme="dark"] .divider::after {
    border-bottom-color: #475569 !important;
}

html[data-theme="dark"] .divider span {
    color: #94a3b8 !important;
}

/* Dark Mode - Register Link */
html[data-theme="dark"] .register-text {
    color: #cbd5e1 !important;
}

html[data-theme="dark"] .register-link {
    color: #ee8135 !important;
}

html[data-theme="dark"] .register-link:hover {
    color: #ff9f5a !important;
}

/* Dark Mode - Footer */
html[data-theme="dark"] .login-footer-text {
    color: #94a3b8 !important;
}

html[data-theme="dark"] .login-footer-logo .powered-by {
    color: #64748b !important;
}

/* Dark Mode - Alerts */
html[data-theme="dark"] .alert-success {
    background: rgba(16, 185, 129, 0.15) !important;
    color: #34d399 !important;
    border-color: rgba(16, 185, 129, 0.3) !important;
}

html[data-theme="dark"] .alert-danger {
    background: rgba(239, 68, 68, 0.15) !important;
    color: #f87171 !important;
    border-color: rgba(239, 68, 68, 0.3) !important;
}

/* Dark Mode - Loading Overlay */
html[data-theme="dark"] .loading-overlay {
    background: rgba(0, 0, 0, 0.7) !important;
}

html[data-theme="dark"] .loading-content {
    color: #ffffff !important;
}

/* Dark Mode - Validation Messages */
html[data-theme="dark"] .validation-message {
    color: #f87171 !important;
}

/* ============================================
   15. PERFORMANCE OPTIMIZATIONS
   ============================================ */

.login-branding-section,
.glass-card,
.feature-card,
.btn-login {
    will-change: transform;
}

.gradient-animated-bg {
    will-change: background-position;
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ============================================
   REGISTRATION PAGE ADJUSTMENTS
   Tighter spacing for additional fields - Compact for no scroll
   ============================================ */

body.register-page .glass-card {
    padding: 0.81rem;
    max-height: 85vh;
    overflow-y: hidden;
}

body.register-page .card-header-modern {
    margin-bottom: 0.68rem;
}

body.register-page .card-header-modern h2 {
    font-size: 1.04rem;
    margin-bottom: 0.16rem;
}

body.register-page .card-header-modern p {
    font-size: 0.59rem;
}

body.register-page .floating-label-input {
    margin-bottom: 0.45rem;
}

body.register-page .form-control-modern {
    padding: 0.45rem 0.45rem 0.45rem 1.98rem;
    font-size: 0.63rem;
    height: auto;
    min-height: 31px;
}

body.register-page .input-icon {
    left: 0.54rem;
    font-size: 0.68rem;
}

body.register-page .floating-label {
    left: 1.98rem;
    font-size: 0.56rem;
}

body.register-page .form-control-modern::placeholder {
    font-size: 0.56rem;
}

body.register-page .password-toggle {
    right: 0.54rem;
    font-size: 0.68rem;
}

/* Side-by-side name fields */
body.register-page .name-fields-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.45rem;
    margin-bottom: 0;
}

body.register-page .name-fields-row .floating-label-input {
    margin-bottom: 0.45rem;
}

/* Compact profile image preview */
body.register-page .profile-preview-wrapper {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    margin-bottom: 0.45rem;
}

body.register-page .profile-preview {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #e5e7eb;
}

body.register-page .form-label {
    font-size: 0.59rem;
    margin-bottom: 0.2rem;
}

body.register-page .form-text {
    font-size: 0.5rem;
    line-height: 1.1;
}

/* Smaller password hint */
body.register-page .password-hint {
    font-size: 0.5rem;
    color: #6b7280;
    margin-top: 0.09rem;
    display: block;
    line-height: 1.1;
}

/* Button adjustments */
body.register-page .btn-login {
    padding: 0.5rem 1.04rem;
    font-size: 0.72rem;
    min-height: 32px;
}

body.register-page .d-grid {
    margin-bottom: 0.45rem;
}

/* Divider adjustments */
body.register-page .divider {
    margin: 0.59rem 0;
}

body.register-page .divider span {
    font-size: 0.54rem;
}

/* Register link adjustments */
body.register-page .register-text {
    font-size: 0.59rem;
    line-height: 1.2;
}

body.register-page .mt-3 {
    margin-top: 0.45rem !important;
}

/* Validation messages */
body.register-page .validation-message {
    font-size: 0.5rem;
    margin-top: 0.14rem;
    line-height: 1.1;
}

/* Registration Footer - Outside the card, centered at bottom of right section */
.register-footer {
    position: absolute;
    bottom: 0.75rem;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 420px;
    padding: 0 1rem;
    display: flex;
    justify-content: center;
    background: transparent;
}

.register-footer .login-footer-content {
    background: transparent;
}

@media (max-width: 768px) {
    .register-footer {
        position: static;
        transform: none;
        margin-top: 1rem;
        padding: 0;
    }
}

/* ============================================
   PROFILE PAGE STYLES (Account/Profile)
   ============================================ */

/* Ensure standard spacing and layout for the profile page */
body.account-page .profile-header {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

body.account-page .profile-header h5 {
    font-size: 1.1rem;
    font-weight: 600;
}

body.account-page #profileImagePreview {
    transition: all 0.3s ease;
}

body.account-page #profileImagePreview:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* ============================================
   DARK MODE FIXES FOR PROFILE PAGE
   ============================================ */

/* Main Backgrounds & Text */
html[data-theme="dark"] body.account-page {
    /* Background handled by global theme, but ensure contrast */
}

html[data-theme="dark"] body.account-page .card {
    background-color: #1e293b !important;
    border: 1px solid #334155 !important;
    color: #ffffff !important;
}

html[data-theme="dark"] body.account-page .card-header {
    background-color: #0f172a !important;
    /* Darker header */
    border-bottom-color: #334155 !important;
    color: #ffffff !important;
}

/* Headings and Typography */
html[data-theme="dark"] body.account-page h2,
html[data-theme="dark"] body.account-page h3,
html[data-theme="dark"] body.account-page h5 {
    color: #ffffff !important;
}

html[data-theme="dark"] body.account-page .text-muted,
html[data-theme="dark"] body.account-page small.form-text,
html[data-theme="dark"] body.account-page label {
    color: #cbd5e1 !important;
}

/* Form Controls */
html[data-theme="dark"] body.account-page .form-control {
    background-color: #334155 !important;
    border-color: #475569 !important;
    color: #ffffff !important;
}

html[data-theme="dark"] body.account-page .form-control:focus {
    border-color: #ee8135 !important;
    box-shadow: 0 0 0 0.25rem rgba(238, 129, 53, 0.25) !important;
}

html[data-theme="dark"] body.account-page .form-control::placeholder {
    color: #94a3b8 !important;
}

/* Alerts - ensure visibility */
html[data-theme="dark"] body.account-page .alert {
    background-color: #334155 !important;
    /* Base dark background for alerts */
    border-color: #475569 !important;
    color: #fff !important;
}

html[data-theme="dark"] body.account-page .alert-success {
    background-color: rgba(16, 185, 129, 0.2) !important;
    color: #34d399 !important;
    /* Brighter green text */
    border-color: rgba(16, 185, 129, 0.3) !important;
}

html[data-theme="dark"] body.account-page .alert-danger {
    background-color: rgba(239, 68, 68, 0.2) !important;
    color: #f87171 !important;
    /* Brighter red text */
    border-color: rgba(239, 68, 68, 0.3) !important;
}

html[data-theme="dark"] body.account-page .alert-info {
    background-color: rgba(59, 130, 246, 0.2) !important;
    color: #60a5fa !important;
    /* Brighter blue text */
    border-color: rgba(59, 130, 246, 0.3) !important;
}

/* Buttons */
html[data-theme="dark"] body.account-page .btn-secondary {
    background-color: #475569 !important;
    border-color: #64748b !important;
    color: #fff !important;
}

html[data-theme="dark"] body.account-page .btn-secondary:hover {
    background-color: #334155 !important;
}

html[data-theme="dark"] body.account-page .btn-outline-danger {
    color: #f87171 !important;
    border-color: #f87171 !important;
}

html[data-theme="dark"] body.account-page .btn-outline-danger:hover {
    background-color: #ef4444 !important;
    color: #fff !important;
}

/* Profile Image Border */
html[data-theme="dark"] body.account-page #profileImagePreview {
    border-color: #475569 !important;
}

/* ============================================
   REGISTER PAGE SPECIFIC STYLES
   ============================================ */

body.register-page {
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    min-height: 100vh;
    font-family: 'Inter', sans-serif !important;
}

/* Register form adjustments for additional fields */
.register-page .glass-card {
    max-width: 480px;
    width: 100%;
}

/* Row layout for name fields */
.register-page .row {
    margin-left: -0.5rem;
    margin-right: -0.5rem;
}

.register-page .row .col-md-6 {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
}

/* Responsive adjustments for register page */
@media (max-width: 768px) {
    .register-page .row .col-md-6 {
        margin-bottom: 1rem;
    }
    
    .register-page .glass-card {
        max-width: 100%;
        margin: 1rem;
        padding: 1.5rem;
    }
    
    .register-page .floating-features-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

/* Dark mode support for register page */
[data-theme="dark"] .register-page .login-form-section {
    background: #1a1a1a;
}

/* ============================================
   RTL SUPPORT FOR ARABIC
   ============================================ */

/* RTL Layout Support */
[dir="rtl"] .login-container {
    direction: rtl;
}

[dir="rtl"] .login-branding-section {
    order: 2;
}

[dir="rtl"] .login-form-section {
    order: 1;
}

/* RTL Form Elements */
[dir="rtl"] .floating-label-input .input-icon-wrapper {
    direction: rtl;
}

[dir="rtl"] .floating-label-input .input-icon {
    right: auto;
    left: 1rem;
}

[dir="rtl"] .floating-label-input .password-toggle {
    right: auto;
    left: 1rem;
}

[dir="rtl"] .floating-label-input .form-control-modern {
    padding-right: 1rem;
    padding-left: 3rem;
    text-align: right;
}

[dir="rtl"] .floating-label {
    right: 3rem;
    left: auto;
    transform-origin: right center;
}

[dir="rtl"] .form-control-modern:focus + .floating-label,
[dir="rtl"] .form-control-modern:not(:placeholder-shown) + .floating-label {
    transform: translateY(-1.5rem) translateX(0.5rem) scale(0.85);
}

/* RTL Checkbox */
[dir="rtl"] .custom-checkbox-label {
    flex-direction: row-reverse;
}

[dir="rtl"] .checkbox-text {
    margin-right: 0.75rem;
    margin-left: 0;
}

/* RTL Button Icons */
[dir="rtl"] .btn-login i {
    margin-right: 0.5rem;
    margin-left: 0;
}

[dir="rtl"] .register-link i {
    margin-right: 0.25rem;
    margin-left: 0;
    transform: rotate(180deg);
}

/* RTL Feature Cards */
[dir="rtl"] .floating-features-grid {
    direction: rtl;
}

[dir="rtl"] .feature-card {
    text-align: right;
}

/* RTL Logo */
[dir="rtl"] .logo-pulse-wrapper {
    text-align: right;
}

/* RTL Validation Messages */
[dir="rtl"] .validation-message {
    text-align: right;
}

/* RTL Alert Messages */
[dir="rtl"] .alert {
    text-align: right;
}

[dir="rtl"] .alert i {
    margin-right: 0;
    margin-left: 0.5rem;
}

/* RTL Footer */
[dir="rtl"] .login-footer-content {
    direction: rtl;
    text-align: center;
}

/* RTL Mobile Responsive */
@media (max-width: 768px) {
    [dir="rtl"] .login-branding-section {
        order: 1;
    }
    
    [dir="rtl"] .login-form-section {
        order: 2;
    }
}
/* ============================================
   LANGUAGE SWITCHER FOR AUTH PAGES
   ============================================ */

.login-language-switcher {
    position: absolute;
    top: 1rem;
    left: 1rem;
    z-index: 1000;
}

.language-switcher-auth .dropdown-toggle {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    backdrop-filter: blur(10px);
    border-radius: 0.5rem;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    transition: all 0.3s ease;
}

.language-switcher-auth .dropdown-toggle:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
    color: white;
}

.language-switcher-auth .dropdown-toggle:focus {
    box-shadow: 0 0 0 0.2rem rgba(255, 255, 255, 0.25);
    color: white;
}

.language-switcher-auth .dropdown-menu {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 0.5rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    min-width: 120px;
}

.language-switcher-auth .dropdown-item {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    color: #333;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    transition: all 0.2s ease;
}

.language-switcher-auth .dropdown-item:hover {
    background: rgba(0, 123, 255, 0.1);
    color: #007bff;
}

.language-switcher-auth .dropdown-item.active {
    background: rgba(0, 123, 255, 0.1);
    color: #007bff;
    font-weight: 500;
}

.language-switcher-auth .language-form {
    margin: 0;
}

/* RTL Language Switcher */
[dir="rtl"] .login-language-switcher {
    left: auto;
    right: 1rem;
}

[dir="rtl"] .language-switcher-auth .dropdown-item {
    text-align: right;
}

[dir="rtl"] .language-switcher-auth .dropdown-item i {
    margin-right: 0;
    margin-left: 0.5rem;
}

/* Mobile Language Switcher */
@media (max-width: 768px) {
    .login-language-switcher {
        top: 0.5rem;
        left: 0.5rem;
    }
    
    [dir="rtl"] .login-language-switcher {
        left: auto;
        right: 0.5rem;
    }
    
    .language-switcher-auth .dropdown-toggle {
        padding: 0.375rem 0.75rem;
        font-size: 0.8rem;
    }
}