/* ========== AUTHENTICATION STYLES ========== */

/* ── Email Verification Banner ───────────────────────────────── */
.email-verify-banner {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: rgba(234, 179, 8, 0.08);
    border: 1px solid rgba(234, 179, 8, 0.25);
    border-radius: 14px;
    padding: 0.85rem 1.25rem;
    margin-bottom: 1.25rem;
    font-size: 0.88rem;
    color: rgba(255, 255, 255, 0.75);
    flex-wrap: wrap;
    gap: 0.6rem;
}

.email-verify-banner > i {
    color: #eab308;
    font-size: 1.05rem;
    flex-shrink: 0;
}

.email-verify-banner > span {
    flex: 1;
    min-width: 160px;
}

.evb-resend-btn {
    background: rgba(234, 179, 8, 0.15);
    border: 1px solid rgba(234, 179, 8, 0.3);
    color: #eab308;
    font-family: 'Raleway', sans-serif;
    font-size: 0.8rem;
    font-weight: 700;
    padding: 5px 14px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s;
    white-space: nowrap;
}

.evb-resend-btn:hover {
    background: rgba(234, 179, 8, 0.25);
}

.evb-resend-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.evb-separator {
    color: rgba(255, 255, 255, 0.2);
    flex-shrink: 0;
}

.evb-hint {
    color: rgba(255, 255, 255, 0.45);
    font-size: 0.8rem;
    white-space: nowrap;
    flex-shrink: 0;
}

.evb-close-btn {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.3);
    cursor: pointer;
    padding: 4px 6px;
    border-radius: 6px;
    font-size: 0.85rem;
    flex-shrink: 0;
    transition: color 0.2s;
}

.evb-close-btn:hover {
    color: rgba(255, 255, 255, 0.6);
}

/* Modal Dark Theme */
.modal-content.bg-dark {
    background-color: #1a1d24 !important;
    border: 1px solid #2a2d35;
}

.modal-header.border-secondary {
    border-bottom-color: #2a2d35 !important;
}

.modal-body .form-control {
    background-color: #0f1115;
    border: 1px solid #2a2d35;
    color: #ffffff;
}

.modal-body .form-control:focus {
    background-color: #14171c;
    border-color: #7ed956;
    color: #ffffff;
    box-shadow: 0 0 0 0.2rem rgba(126, 217, 86, 0.25);
}

.modal-body .form-label {
    color: #a0a3a8;
    font-weight: 500;
}

.modal-body .text-muted {
    color: #6b6e76 !important;
}

.modal-body .text-primary {
    color: #7ed956 !important;
}

.modal-body .text-primary:hover {
    color: #6bc246 !important;
    text-decoration: underline;
}

/* Alert Messages */
.modal-body .alert {
    border-radius: 8px;
    font-size: 0.9rem;
}

/* Dropdown Menu Dark Theme */
.dropdown-menu {
    background-color: #1a1d24;
    border: 1px solid #2a2d35;
}

.dropdown-item {
    color: #a0a3a8;
}

.dropdown-item:hover {
    background-color: #14171c;
    color: #ffffff;
}

.dropdown-item-text {
    color: #6b6e76 !important;
}

.dropdown-divider {
    border-top-color: #2a2d35;
}

/* User Menu */
#userMenu {
    border: 1px solid #c44536;
    border-radius: 50px;
}

#userMenu .nav-link {
    color: #ffffff;
}

#userMenu .nav-link:hover {
    color: #c44536;
}

/* Button Styles - Unified Format */
.btn-primary,
.btn-outline-light,
.btn-outline-primary {
    padding: 0.6rem 1.5rem;
    font-weight: 500;
    font-size: 1rem;
    border-radius: 50px;
    transition: all 0.3s;
}

.btn-outline-light {
    color: #ffffff;
    border-color: #ffffff;
}

.btn-outline-light:hover {
    background-color: #ffffff;
    color: #0a0a0a;
    transform: translateY(-2px);
}

.btn-outline-primary:hover {
    transform: translateY(-2px);
}

/* Loading Spinner in Button */
.btn .fa-spinner {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Form Validation */
.form-control:invalid:not(:placeholder-shown) {
    border-color: #dc3545;
}

.form-control:valid:not(:placeholder-shown) {
    border-color: #c44536;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .modal-dialog {
        margin: 1rem;
    }
    
    #loginBtn button,
    #userMenu .nav-link {
        width: 100%;
        margin-top: 0.5rem;
    }
    
    /* Login/Register navbar mobile fixes */
    .navbar .btn-link {
        font-size: 0;
        padding: 0.5rem;
        width: 40px;
    }
    
    .navbar .btn-link i {
        font-size: 1.25rem;
    }
    
    .navbar-logo-text {
        height: 24px !important;
    }
    
    .navbar-logo-icon {
        height: 32px !important;
        width: 32px !important;
    }
}
/* ═══════════════════════════════════════════════════════
   CRM NAVBAR  (authenticated pages)
   ═══════════════════════════════════════════════════════ */

.crm-navbar {
    background-color: rgba(10, 10, 10, 0.97) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 0 !important;
    box-shadow: 0 2px 24px rgba(0, 0, 0, 0.55);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    min-height: 58px;
}

.crm-navbar > .container-fluid {
    min-height: 58px;
}

/* ── Brand ── */
.crm-nav-brand {
    display: flex;
    align-items: center;
    text-decoration: none;
    flex-shrink: 0;
    padding: 0;
}

.crm-nav-brand .crm-logo-icon {
    height: 34px;
    width: 34px;
    padding: 4px;
    background: linear-gradient(135deg, #c44536, #e05a48);
    border-radius: 9px;
    margin-right: 0.6rem;
    object-fit: contain;
}

.crm-nav-brand .crm-logo-text {
    height: 26px;
}

/* ── Desktop nav links ── */
.crm-nav-links {
    list-style: none;
    margin: 0;
    padding: 0;
}

.crm-nav-link {
    color: rgba(255, 255, 255, 0.58) !important;
    font-family: 'Raleway', sans-serif;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    padding: 0.42rem 0.8rem !important;
    border-radius: 8px;
    transition: color 0.18s, background 0.18s;
    white-space: nowrap;
    text-decoration: none !important;
    border-bottom: 2px solid transparent;
}

.crm-nav-link:hover {
    color: #fff !important;
    background: rgba(255, 255, 255, 0.07);
}

.crm-nav-link.active {
    color: #fff !important;
    background: rgba(196, 69, 54, 0.14);
    border-bottom-color: #c44536;
    border-radius: 8px 8px 0 0;
}

/* ── User dropdown button ── */
.crm-user-btn {
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.13);
    color: #fff;
    font-family: 'Raleway', sans-serif;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 0.36rem 0.8rem;
    border-radius: 8px;
    transition: background 0.18s, border-color 0.18s;
    display: flex;
    align-items: center;
    gap: 0.45rem;
}

.crm-user-btn:hover,
.crm-user-btn:focus,
.crm-user-btn.show {
    background: rgba(196, 69, 54, 0.18);
    border-color: rgba(196, 69, 54, 0.45);
    color: #fff;
    box-shadow: none;
}

.crm-user-name {
    max-width: 130px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ── Dropdown menu ── */
.crm-user-menu {
    background: #111 !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 12px !important;
    padding: 0.5rem 0 !important;
    min-width: 210px;
    box-shadow: 0 14px 36px rgba(0, 0, 0, 0.55) !important;
    margin-top: 0.5rem !important;
}

.crm-user-email {
    color: rgba(255, 255, 255, 0.38) !important;
    font-size: 0.75rem !important;
    padding: 0.25rem 1rem 0.5rem !important;
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.crm-dropdown-item {
    color: rgba(255, 255, 255, 0.75) !important;
    font-family: 'Raleway', sans-serif;
    font-size: 0.84rem;
    font-weight: 500;
    padding: 0.5rem 1rem !important;
    transition: background 0.15s, color 0.15s;
}

.crm-dropdown-item:hover {
    background: rgba(255, 255, 255, 0.07) !important;
    color: #fff !important;
}

.crm-logout-item {
    color: #e05a48 !important;
}

.crm-logout-item:hover {
    background: rgba(196, 69, 54, 0.1) !important;
    color: #ff7060 !important;
}

.crm-divider {
    border-color: rgba(255, 255, 255, 0.07) !important;
    margin: 0.3rem 0 !important;
}

/* ── Mobile toggler ── */
.crm-toggler {
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    padding: 0.35rem 0.5rem;
}

.crm-toggler:focus {
    box-shadow: none;
}

/* ── Mobile collapse menu ── */
#crmMobileMenu {
    background: rgba(10, 10, 10, 0.98);
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.crm-mobile-nav {
    list-style: none;
    padding: 0;
    margin: 0;
}

.crm-mobile-nav .crm-nav-link {
    font-size: 0.88rem;
    padding: 0.6rem 0.75rem !important;
    border-radius: 8px;
    border-bottom: none;
    display: block;
}

.crm-mobile-nav .crm-nav-link.active {
    border-radius: 8px;
    border-bottom: none;
    border-left: 3px solid #c44536;
    padding-left: calc(0.75rem - 3px) !important;
}