/* ==========================================
   MOKED CRM - Dark Login Theme
   Applied via html.login-dark class
   ========================================== */

/* Body transparent so html gradient shows through */
html.login-dark body {
    background: transparent !important;
}

/* Background effects */
.login-bg-dots {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background-image: radial-gradient(circle, rgba(99,102,241,0.15) 1px, transparent 1px);
    background-size: 40px 40px;
    z-index: 0;
    pointer-events: none;
}

.login-glow {
    position: fixed;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
}
.login-glow-1 {
    top: -100px;
    right: -100px;
    background: radial-gradient(circle, rgba(99,102,241,0.12), transparent 70%);
}
.login-glow-2 {
    bottom: -150px;
    left: -100px;
    background: radial-gradient(circle, rgba(129,140,248,0.08), transparent 70%);
}

/* Content + wrapper positioning */
html.login-dark .content-page {
    margin-right: 0 !important;
}
html.login-dark #wrapper {
    min-height: unset !important;
}
html.login-dark .content,
html.login-dark .container {
    background: transparent !important;
}

html.login-dark .wrapper-page {
    position: relative;
    z-index: 10;
    width: 420px;
    margin: 0 auto;
    padding-top: 20px;
}

/* Card glass-morphism */
html.login-dark .card-box {
    background: rgba(255,255,255,0.04) !important;
    border: 1px solid rgba(255,255,255,0.08) !important;
    border-radius: 20px !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 8px 32px rgba(0,0,0,0.3) !important;
    padding: 32px !important;
}

/* Typography - white text on dark */
html.login-dark .card-box,
html.login-dark .card-box label,
html.login-dark .card-box small,
html.login-dark .card-box span,
html.login-dark .card-box p,
html.login-dark .panel-body,
html.login-dark .panel-heading {
    color: #e2e8f0 !important;
}

html.login-dark h2.text-center .text-custom,
html.login-dark .text-custom,
html.login-dark .panel-heading h3 {
    color: #e2e8f0 !important;
}

/* Form controls */
html.login-dark .form-control {
    background: rgba(255,255,255,0.06) !important;
    border: 1px solid rgba(255,255,255,0.12) !important;
    border-radius: 12px !important;
    color: #e2e8f0 !important;
    height: 48px !important;
    padding: 10px 16px !important;
    font-size: 15px !important;
    transition: border-color 0.25s, box-shadow 0.25s;
}

html.login-dark .form-control:focus {
    border-color: rgba(99,102,241,0.5) !important;
    box-shadow: 0 0 0 3px rgba(99,102,241,0.15) !important;
    background: rgba(255,255,255,0.08) !important;
}

/* When input inside input-group is focused: unified glow on the whole group */
html.login-dark .input-group:focus-within {
    border-radius: 12px !important;
    box-shadow: 0 0 0 3px rgba(99,102,241,0.15) !important;
}
html.login-dark .input-group:focus-within .form-control {
    border-color: rgba(99,102,241,0.5) !important;
    box-shadow: none !important;
    background: rgba(255,255,255,0.08) !important;
}
html.login-dark .input-group:focus-within .input-group-addon {
    border-color: rgba(99,102,241,0.5) !important;
    border-left: none !important;
    background: rgba(255,255,255,0.08) !important;
}

html.login-dark .form-control::placeholder {
    color: #64748b !important;
}

html.login-dark .form-control:-webkit-autofill,
html.login-dark .form-control:-webkit-autofill:hover,
html.login-dark .form-control:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0 30px #1e293b inset !important;
    -webkit-text-fill-color: #e2e8f0 !important;
    border: 1px solid rgba(255,255,255,0.12) !important;
}

/* Input group - force table layout to keep addon inline with input */
html.login-dark .input-group {
    display: table !important;
    width: 100%;
}

/* Input group addon (icon) - override custom.css #5fbeaa and .round_form white */
/* RTL: addon is on the right side, input on the left */
html.login-dark .input-group-addon,
html.login-dark .round_form .input-group .input-group-addon,
html.login-dark .input-group-addon.right-raduis {
    background: rgba(255,255,255,0.08) !important;
    border: 1px solid rgba(255,255,255,0.12) !important;
    border-left: none !important;
    color: #818cf8 !important;
    border-radius: 0 12px 12px 0 !important;
    font-size: 16px;
    height: 48px !important;
    line-height: 46px !important;
    padding: 0 14px !important;
    display: table-cell !important;
    vertical-align: middle !important;
    min-width: 48px;
    width: 1% !important;
    white-space: nowrap;
}

/* Input next to addon - round left side only, remove shared border */
html.login-dark .input-group .form-control,
html.login-dark .round_form .input-group .form-control {
    display: table-cell !important;
    border-radius: 12px 0 0 12px !important;
    border-right: none !important;
}

/* Standalone inputs (not in input-group) keep full radius */
html.login-dark .form-group > .form-control,
html.login-dark .form-group > div > .form-control:only-child {
    border-radius: 12px !important;
    border-right: 1px solid rgba(255,255,255,0.12) !important;
}

/* Primary & Success buttons → indigo gradient */
html.login-dark .btn-success.btn-block,
html.login-dark .btn-primary.btn-block {
    background: linear-gradient(135deg, #6366f1, #4f46e5) !important;
    border: none !important;
    border-radius: 14px !important;
    padding: 14px 28px !important;
    font-size: 17px !important;
    font-weight: 600 !important;
    letter-spacing: 0.5px;
    transition: all 0.25s !important;
    box-shadow: 0 4px 20px rgba(99,102,241,0.3) !important;
    color: #fff !important;
    height: auto !important;
}

html.login-dark .btn-success.btn-block:hover,
html.login-dark .btn-primary.btn-block:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(99,102,241,0.4) !important;
}

/* Non-block primary/success (OTP send buttons) */
html.login-dark .btn-primary:not(.btn-block),
html.login-dark .btn-info {
    background: linear-gradient(135deg, #6366f1, #4f46e5) !important;
    border: none !important;
    border-radius: 12px !important;
    color: #fff !important;
    font-weight: 600 !important;
    box-shadow: 0 4px 15px rgba(99,102,241,0.25) !important;
}

/* WhatsApp OTP button - keep green */
html.login-dark .btn-success:not(.btn-block) {
    background: linear-gradient(135deg, #25d366, #128c7e) !important;
    border: none !important;
    border-radius: 12px !important;
    color: #fff !important;
    font-weight: 600 !important;
    box-shadow: 0 4px 15px rgba(37,211,102,0.25) !important;
}

/* Google login button */
html.login-dark .btn-google {
    background: rgba(255,255,255,0.06) !important;
    border: 1px solid rgba(255,255,255,0.12) !important;
    border-radius: 14px !important;
    color: #e2e8f0 !important;
    transition: all 0.25s !important;
}
html.login-dark .btn-google:hover {
    background: rgba(255,255,255,0.1) !important;
    transform: translateY(-2px);
}

/* Back/inverse button */
html.login-dark .btn-inverse {
    background: rgba(255,255,255,0.06) !important;
    border: 1px solid rgba(255,255,255,0.12) !important;
    color: #e2e8f0 !important;
    border-radius: 12px !important;
}
html.login-dark .btn-inverse:hover {
    background: rgba(255,255,255,0.1) !important;
}

/* Pink button (signup) */
html.login-dark .btn-pink {
    background: linear-gradient(135deg, #6366f1, #4f46e5) !important;
    border: none !important;
    border-radius: 14px !important;
    color: #fff !important;
}

/* Links */
html.login-dark a.text-dark,
html.login-dark a.text-primary,
html.login-dark .form-group a,
html.login-dark .btn-link {
    color: #818cf8 !important;
    text-decoration: none;
    transition: color 0.25s;
}
html.login-dark a.text-dark:hover,
html.login-dark a.text-primary:hover,
html.login-dark .form-group a:hover,
html.login-dark .btn-link:hover {
    color: #a5b4fc !important;
    text-decoration: none;
}

/* Footer terms/privacy links */
html.login-dark .row .text-primary b {
    color: #64748b !important;
    font-weight: 400 !important;
}
html.login-dark .row a.text-primary:hover b {
    color: #818cf8 !important;
}

/* Error messages */
html.login-dark .text-danger {
    color: #fca5a5 !important;
}

/* Alert boxes */
html.login-dark .alert-info {
    background: rgba(99,102,241,0.1) !important;
    border-color: rgba(99,102,241,0.2) !important;
    color: #c7d2fe !important;
    border-radius: 12px !important;
}
html.login-dark .alert-info .close {
    color: #c7d2fe !important;
    text-shadow: none !important;
}

html.login-dark .alert-danger {
    background: rgba(239,68,68,0.1) !important;
    border-color: rgba(239,68,68,0.2) !important;
    color: #fca5a5 !important;
    border-radius: 12px !important;
}

html.login-dark .alert-success {
    background: rgba(34,197,94,0.1) !important;
    border-color: rgba(34,197,94,0.2) !important;
    color: #86efac !important;
    border-radius: 12px !important;
}

/* Panel overrides */
html.login-dark .panel {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}
html.login-dark .panel-primary {
    border: none !important;
}
html.login-dark .panel-body {
    background: transparent !important;
}

/* Logo image */
html.login-dark .img-responsive {
    filter: brightness(1.1);
    max-height: 180px !important;
}

/* Muted text */
html.login-dark .text-muted {
    color: #94a3b8 !important;
}

/* Generic headings & text on login pages */
html.login-dark h1,
html.login-dark h2,
html.login-dark h3,
html.login-dark h4,
html.login-dark p,
html.login-dark nav {
    color: #e2e8f0 !important;
}

/* Bold/ltr text in OTP */
html.login-dark bold,
html.login-dark .bold.ltr {
    color: #818cf8 !important;
}

/* Form validation icons */
html.login-dark .glyphicon-ok {
    color: #22c55e !important;
}
html.login-dark .glyphicon-remove {
    color: #ef4444 !important;
}

/* Branding footer for login pages */
.login-dark-footer {
    position: relative;
    z-index: 10;
    text-align: center;
    padding: 20px;
    color: #475569;
    font-size: 13px;
}
.login-dark-footer a {
    color: #64748b !important;
    text-decoration: none;
}
.login-dark-footer a:hover {
    color: #818cf8 !important;
}

/* Google Authenticator image */
html.login-dark .card-box img[src*="Authenticator"] {
    filter: brightness(1.2);
}

/* Responsive */
@media (max-width: 480px) {
    html.login-dark .wrapper-page {
        width: 92% !important;
        padding-top: 10px;
    }
    html.login-dark .card-box {
        padding: 24px 20px !important;
    }
}
