/* nBSuits Authentication Styles */

/* Reset and base styles */
* {
    box-sizing: border-box;
}

/* Main container */
.nb-auth-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: #f7f8fa;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    color: #393a3d;
}

/* Header */
.nb-header {
    background: #ffffff;
    border-bottom: 1px solid #e6e7e8;
    padding: 16px 0;
    position: relative;
    z-index: 10;
}

.nb-header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nb-logo-img {
    height: 32px;
    width: auto;
}

/* Language dropdown styling */
.lang-dropdown-only-desk {
    list-style: none;
    margin: 0;
    padding: 0;
}

.lang-dropdown-only-desk .dropdown-toggle {
    background: transparent;
    border: 1px solid #d1d5db;
    color: #393a3d;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 14px;
    transition: all 0.2s ease;
}

.lang-dropdown-only-desk .dropdown-toggle:hover {
    border-color: #0077c5;
    background: #f8f9fa;
}

.lang-dropdown-only-desk .dropdown-menu {
    border: 1px solid #d1d5db;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    background: #ffffff;
}

/* Main content area */
.nb-main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 24px;
}

.nb-content {
    width: 100%;
    max-width: 400px;
}

/* Auth card */
.nb-auth-card {
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    padding: 40px;
    border: 1px solid #e6e7e8;
    position: relative;
    z-index: 1;
}

.nb-auth-card>* {
    position: relative;
    z-index: 2;
}

/* Background Logo */
.nb-auth-card::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 200px;
    height: 200px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    opacity: 0.03;
    z-index: 0;
    pointer-events: none;
}

/* Header section */
.nb-auth-header {
    text-align: center;
    margin-bottom: 32px;
}

.nb-auth-title {
    font-size: 28px;
    font-weight: 400;
    color: #393a3d;
    margin: 0 0 8px 0;
    line-height: 1.2;
}

.nb-auth-subtitle {
    font-size: 16px;
    color: #6b7280;
    margin: 0;
    line-height: 1.4;
}

/* Step indicator */
.nb-step-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
    gap: 8px;
}

.nb-step {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #d1d5db;
    transition: all 0.3s ease;
}

.nb-step.active {
    background: #0077c5;
    transform: scale(1.2);
}

.nb-step.completed {
    background: #10b981;
}

/* Form styles */
.nb-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.nb-form-group {
    position: relative;
    margin-bottom: 0;
}

.nb-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #d1d5db;
    border-radius: 4px;
    font-size: 15px;
    background: #ffffff;
    color: #393a3d;
    transition: all 0.2s ease;
    outline: none;
    height: 48px;
}

/* Badge-style input with icon */
.nb-input-with-badge {
    padding-left: 16px;
    border-radius: 0 4px 4px 0;
    border-left: none;
}

.nb-input-with-badge:focus {
    border-left: none;
}

.nb-input:focus {
    border-color: #0077c5;
    box-shadow: 0 0 0 3px rgba(0, 119, 197, 0.1);
}

.nb-input.error {
    border-color: #dc2626;
}

.nb-input.error:focus {
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

.nb-input:invalid {
    border-color: #dc2626;
}

.nb-input:valid {
    border-color: #10b981;
}

.nb-label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #393a3d;
    margin-bottom: 6px;
}

/* Input Icons */
.nb-input-group {
    position: relative;
}

.nb-input-icon {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: #6b7280;
    font-size: 15px;
    z-index: 2;
    pointer-events: none;
    transition: color 0.2s ease;
    width: 15px;
    text-align: center;
}

.nb-form-group:focus-within .nb-input-icon {
    color: #0077c5;
}

.nb-input:focus+.nb-input-icon {
    color: #0077c5;
}

/* Error messages */
.nb-error {
    color: #dc2626;
    font-size: 14px;
    margin-top: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.nb-error i {
    font-size: 16px;
}

/* Success messages */
.nb-success {
    color: #10b981;
    font-size: 14px;
    margin-top: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
    background: #f0fdf4;
    padding: 12px;
    border-radius: 4px;
    border-left: 4px solid #10b981;
}

/* Buttons */
.nb-btn {
    width: 100%;
    padding: 12px 16px;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s ease;
    outline: none;
}

.nb-btn-primary {
    background: #0077c5;
    color: #ffffff;
}

.nb-btn-primary:hover:not(:disabled) {
    background: #005a94;
}

.nb-btn-primary:focus {
    box-shadow: 0 0 0 3px rgba(0, 119, 197, 0.2);
}

.nb-btn-secondary {
    background: transparent;
    color: #0077c5;
    border: 2px solid #0077c5;
}

.nb-btn-secondary:hover:not(:disabled) {
    background: #f0f9ff;
}

.nb-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.nb-btn.loading {
    pointer-events: none;
    position: relative;
    color: transparent;
}

.nb-btn .btn-loader {
    display: none;
    animation: spin 1s linear infinite;
}

.nb-btn.loading .btn-loader {
    display: block;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: currentColor;
}

.nb-btn.loading .btn-text {
    opacity: 0.7;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* Links */
.nb-link {
    color: #0077c5;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s ease;
}

.nb-link:hover {
    color: #005a94;
    text-decoration: underline;
}

/* Navigation links */
.nb-nav-links {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid #e6e7e8;
}

.nb-nav-link {
    color: #0077c5;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.2s ease;
}

.nb-nav-link:hover {
    color: #005a94;
    text-decoration: underline;
}

/* Password toggle */
.nb-password-toggle {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #6b7280;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: color 0.2s ease;
    z-index: 3;
}

.nb-password-toggle:hover {
    color: #393a3d;
}

.nb-input.error+.nb-password-toggle {
    color: #dc2626;
}

/* User info display */
.nb-user-info {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: #f8f9fa;
    border-radius: 4px;
    margin-bottom: 20px;
    border: 1px solid #e9ecef;
}

.nb-user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #0077c5;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 500;
    font-size: 14px;
}

.nb-user-details h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 500;
    color: #393a3d;
}

.nb-user-details p {
    margin: 0;
    font-size: 14px;
    color: #6b7280;
}

.nb-change-user {
    margin-left: auto;
    color: #0077c5;
    text-decoration: none;
    font-size: 14px;
}

.nb-change-user:hover {
    text-decoration: underline;
}

/* Footer */
.nb-footer {
    background: #ffffff;
    border-top: 1px solid #e6e7e8;
    padding: 24px 0;
    margin-top: auto;
}

.nb-footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    text-align: center;
}

.recaptcha-notice {
    font-size: 12px;
    color: #6b7280;
    line-height: 1.4;
}

.recaptcha-notice a {
    color: #0077c5;
    text-decoration: none;
}

.recaptcha-notice a:hover {
    text-decoration: underline;
}

/* Checkbox styles */
.nb-checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
    font-size: 14px;
    line-height: 1.4;
}

.nb-checkbox {
    width: 18px;
    height: 18px;
    border: 2px solid #d1d5db;
    border-radius: 3px;
    background: #ffffff;
    cursor: pointer;
    position: relative;
    flex-shrink: 0;
    margin-top: 2px;
    transition: all 0.2s ease;
}

.nb-checkbox:checked {
    background: #0077c5;
    border-color: #0077c5;
}

.nb-checkbox:checked::after {
    content: '';
    position: absolute;
    left: 5px;
    top: 1px;
    width: 6px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.nb-checkbox:focus {
    outline: 2px solid #0077c5;
    outline-offset: 2px;
}

.nb-checkbox-text {
    color: #393a3d;
}

/* Language Dropdown Styles */
.lang-dropdown-only-desk .dropdown {
    position: relative;
}

.lang-dropdown-only-desk .dropdown-toggle {
    background: transparent;
    border: 1px solid #d1d5db;
    color: #393a3d;
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 14px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
    min-width: 60px;
    justify-content: center;
}

.lang-dropdown-only-desk .dropdown-toggle:hover,
.lang-dropdown-only-desk .dropdown-toggle:focus {
    border-color: #0077c5;
    background: #f8f9fa;
    color: #0077c5;
    text-decoration: none;
}

.lang-dropdown-only-desk .dropdown-toggle::after {
    content: '▼';
    font-size: 10px;
    margin-left: 4px;
}

.lang-dropdown-only-desk .dropdown-menu {
    border: 1px solid #d1d5db;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    background: #ffffff;
    padding: 4px 0;
    min-width: 120px;
    margin-top: 4px;
}

.lang-dropdown-only-desk .dropdown-item {
    padding: 8px 16px;
    color: #393a3d;
    text-decoration: none;
    display: block;
    font-size: 14px;
    transition: all 0.2s ease;
}

.lang-dropdown-only-desk .dropdown-item:hover,
.lang-dropdown-only-desk .dropdown-item:focus {
    background: #f8f9fa;
    color: #0077c5;
    text-decoration: none;
}

.lang-dropdown-only-desk .dropdown-item.text-primary {
    color: #0077c5;
    font-weight: 500;
}

/* Override Bootstrap dropdown positioning */
.dropdown-menu.show {
    display: block;
}

/* Ensure dropdown works without Bootstrap JS conflicts */
.dropdown:hover .dropdown-menu {
    display: block;
}

.dropdown .dropdown-menu {
    display: none;
}

/* Custom dropdown toggle for better UX */
.lang-dropdown-only-desk .dropdown-toggle[aria-expanded="true"] {
    border-color: #0077c5;
    background: #f8f9fa;
    color: #0077c5;
}

.lang-dropdown-only-desk .dropdown-toggle[aria-expanded="true"]::after {
    content: '▲';
}

/* Step transitions */
.auth-step {
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.auth-step.active {
    opacity: 1;
    transform: translateX(0);
}

.auth-step:not(.active) {
    opacity: 0;
    transform: translateX(20px);
}

/* Focus improvements */
.nb-input:focus,
.nb-btn:focus {
    outline: 2px solid #0077c5;
    outline-offset: 2px;
}

/* Responsive design */
@media (max-width: 768px) {
    .nb-header-content {
        padding: 0 16px;
    }

    .nb-main {
        padding: 24px 16px;
    }

    .nb-auth-card {
        padding: 32px 24px;
    }

    .nb-auth-title {
        font-size: 24px;
    }

    .nb-nav-links {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }

    .nb-footer-content {
        padding: 0 16px;
    }

    .lang-dropdown-only-desk .dropdown-toggle {
        padding: 6px 12px;
        font-size: 13px;
        min-width: 50px;
    }

    .lang-dropdown-only-desk .dropdown-menu {
        min-width: 100px;
    }

    .lang-dropdown-only-desk .dropdown-item {
        padding: 6px 12px;
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .nb-auth-card {
        padding: 24px 20px;
    }

    .nb-input {
        padding: 10px 14px 10px 40px;
        font-size: 16px;
        /* Prevent zoom on iOS */
        height: 44px;
    }

    .nb-input-icon {
        left: 14px;
        font-size: 15px;
    }

    .nb-btn {
        padding: 10px 14px;
        height: 44px;
    }

    .nb-auth-card::before {
        width: 150px;
        height: 150px;
        opacity: 0.02;
    }

    .nb-user-info {
        flex-direction: column;
        text-align: center;
        gap: 8px;
    }

    .nb-change-user {
        margin-left: 0;
        margin-top: 8px;
    }

    .nb-nav-links {
        gap: 12px;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .nb-auth-container {
        background: #1a1a1a;
        color: #ffffff;
    }

    .nb-header {
        background: #2d2d2d;
        border-bottom-color: #404040;
    }

    .nb-auth-card {
        background: #2d2d2d;
        border-color: #404040;
    }

    .nb-input {
        background: #1a1a1a;
        border-color: #404040;
        color: #ffffff;
    }

    .nb-footer {
        background: #2d2d2d;
        border-top-color: #404040;
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .nb-input {
        border-width: 3px;
    }

    .nb-btn {
        border-width: 3px;
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Mob
ile Responsive Styles */
@media (max-width: 768px) {
    .nb-header-content {
        padding: 0 16px;
    }

    .nb-main {
        padding: 24px 16px;
    }

    .nb-auth-card {
        padding: 32px 24px;
    }

    .nb-auth-title {
        font-size: 24px;
    }

    .nb-nav-links {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }

    .nb-footer-content {
        padding: 0 16px;
    }

    .lang-dropdown-only-desk .dropdown-toggle {
        padding: 6px 12px;
        font-size: 13px;
        min-width: 50px;
    }

    .lang-dropdown-only-desk .dropdown-menu {
        min-width: 100px;
    }

    .lang-dropdown-only-desk .dropdown-item {
        padding: 6px 12px;
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .nb-auth-card {
        padding: 24px 20px;
    }

    .nb-input {
        padding: 10px 14px 10px 45px;
        font-size: 16px;
        /* Prevent zoom on iOS */
        height: 44px;
    }

    .nb-input-icon {
        left: 16px;
        font-size: 14px;
        width: 14px;
    }

    .nb-btn {
        padding: 10px 14px;
        height: 44px;
    }

    .nb-auth-card::before {
        width: 150px;
        height: 150px;
        opacity: 0.02;
    }

    .nb-user-info {
        flex-direction: column;
        text-align: center;
        gap: 8px;
    }

    .nb-change-user {
        margin-left: 0;
        margin-top: 8px;
    }

    .nb-nav-links {
        gap: 12px;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .nb-auth-container {
        background: #1a1a1a;
        color: #ffffff;
    }

    .nb-header {
        background: #2d2d2d;
        border-bottom-color: #404040;
    }

    .nb-auth-card {
        background: #2d2d2d;
        border-color: #404040;
    }

    .nb-input {
        background: #1a1a1a;
        border-color: #404040;
        color: #ffffff;
    }

    .nb-footer {
        background: #2d2d2d;
        border-top-color: #404040;
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .nb-input {
        border-width: 3px;
    }

    .nb-btn {
        border-width: 3px;
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/ * Enhanced Input Icon Positioning */ .nb-input-group {
    position: relative;
    display: flex;
    align-items: center;
}

/* Ensure icons don't interfere with text */
.nb-input:focus {
    padding-left: 50px;
    /* Ensure consistent padding on focus */
}

/* Better icon alignment */
.nb-input-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
}

/* Password toggle positioning with icons */
.nb-password-toggle {
    right: 12px;
    z-index: 4;
}

/* Ensure proper spacing for inputs with both icon and toggle */
.nb-input-group .nb-input {
    padding-right: 45px;
    /* Space for password toggle */
}

.nb-input-group:not(:has(.nb-password-toggle)) .nb-input {
    padding-right: 16px;
    /* Normal right padding when no toggle */
}

/* Badge-style icons */
.nb-input-icon-badge {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    background: #f8f9fa;
    border: 2px solid #d1d5db;
    border-right: none;
    border-radius: 4px 0 0 4px;
    color: #6b7280;
    font-size: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    z-index: 2;
    transition: all 0.2s ease;
}

.nb-input-group:focus-within .nb-input-icon-badge {
    border-color: #0077c5;
    background: #f0f9ff;
    color: #0077c5;
}

.nb-input-group.error .nb-input-icon-badge {
    border-color: #dc2626;
    background: #fef2f2;
    color: #dc2626;
}

/* Password toggle for badge-style inputs */
.nb-password-toggle-badge {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    background: #f8f9fa;
    border: 2px solid #d1d5db;
    border-left: none;
    border-radius: 0 4px 4px 0;
    color: #6b7280;
    font-size: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 3;
}

.nb-password-toggle-badge:hover {
    background: #e5e7eb;
    color: #374151;
}

.nb-input-group:focus-within .nb-password-toggle-badge {
    border-color: #0077c5;
}

/* Input with both badge icon and password toggle */
.nb-input-with-both-badges {
    padding-left: 16px;
    padding-right: 16px;
    border-radius: 0;
    border-left: none;
    border-right: none;
}

/ * Background Logo Implementation */ .nb-auth-card::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 200px;
    height: 200px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    opacity: 0.03;
    z-index: 0;
    pointer-events: none;
}

/* Ensure auth card has proper positioning for background logo */
.nb-auth-card {
    position: relative;
    z-index: 1;
}

.nb-auth-card>* {
    position: relative;
    z-index: 2;
}

/* Mobile responsive background logo */
@media (max-width: 480px) {
    .nb-auth-card::before {
        width: 150px;
        height: 150px;
        opacity: 0.02;
    }
}

/ * Full Page Background Logo Enhancements */
/* Alternative positioning options */
.nb-auth-container.logo-top-right::before {
    top: 20%;
    left: 80%;
    transform: translate(-50%, -50%);
    width: 25vw;
    height: 25vh;
    opacity: 0.04;
}

.nb-auth-container.logo-bottom-left::before {
    top: 80%;
    left: 20%;
    transform: translate(-50%, -50%);
    width: 25vw;
    height: 25vh;
    opacity: 0.04;
}

.nb-auth-container.logo-pattern::before {
    width: 100vw;
    height: 100vh;
    top: 0;
    left: 0;
    transform: none;
    background-size: 200px 200px;
    background-repeat: repeat;
    opacity: 0.01;
}

/* Animated background logo (subtle) */
.nb-auth-container.logo-animated::before {
    animation: logoFloat 20s ease-in-out infinite;
}

@keyframes logoFloat {

    0%,
    100% {
        transform: translate(-50%, -50%) scale(1) rotate(0deg);
        opacity: 0.03;
    }

    50% {
        transform: translate(-50%, -50%) scale(1.05) rotate(1deg);
        opacity: 0.04;
    }
}

/* Gradient overlay for better text readability */
.nb-auth-container.with-overlay::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg,
            rgba(247, 248, 250, 0.8) 0%,
            rgba(247, 248, 250, 0.6) 50%,
            rgba(247, 248, 250, 0.8) 100%);
    z-index: 2;
    pointer-events: none;
}

/* Ensure content stays above overlay */
.nb-auth-container.with-overlay .nb-header,
.nb-auth-container.with-overlay .nb-main,
.nb-auth-container.with-overlay .nb-footer {
    z-index: 15;
}

/* Mobile responsive full page logo */
@media (max-width: 768px) {
    .nb-auth-container::before {
        width: 60vw;
        height: 30vh;
        opacity: 0.02;
    }

    .nb-auth-container.logo-top-right::before,
    .nb-auth-container.logo-bottom-left::before {
        width: 40vw;
        height: 20vh;
        opacity: 0.025;
    }
}

@media (max-width: 480px) {
    .nb-auth-container::before {
        width: 70vw;
        height: 25vh;
        opacity: 0.015;
    }
}