/* Custom Styling for NRI Commission Auth Cards (Public & Official Login, Forgot Password) */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
    --auth-bg-gradient: linear-gradient(135deg, #f0f4fd 0%, #e2e8f0 50%, #eef2ff 100%);
    --auth-card-bg: rgba(255, 255, 255, 0.96);
    --auth-primary: #1e3a8a;
    --auth-primary-hover: #1e40af;
    --auth-accent: #2563eb;
    --auth-accent-glow: rgba(37, 99, 235, 0.25);
    --auth-text-main: #0f172a;
    --auth-text-muted: #64748b;
    --auth-border: #cbd5e1;
    --auth-border-focus: #3b82f6;
    --auth-radius: 18px;
    --auth-shadow: 0 20px 40px -15px rgba(15, 23, 42, 0.1), 0 0 1px rgba(0, 0, 0, 0.05);
}

body {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
}

/* Page background enhancement */
.nk-content {
    min-height: calc(100vh - 160px);
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--auth-bg-gradient);
    position: relative;
    padding: 40px 15px !important;
}

.nk-content::before {
    content: '';
    position: absolute;
    width: 380px;
    height: 380px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.15) 0%, rgba(255, 255, 255, 0) 70%);
    top: 5%;
    left: 10%;
    pointer-events: none;
    z-index: 0;
}

.nk-content::after {
    content: '';
    position: absolute;
    width: 420px;
    height: 420px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.12) 0%, rgba(255, 255, 255, 0) 70%);
    bottom: 5%;
    right: 10%;
    pointer-events: none;
    z-index: 0;
}

.nk-auth-body {
    position: relative;
    z-index: 1;
    max-width: 450px;
    width: 100%;
    margin: 0 auto;
}

.nk-auth-body.wide-md {
    max-width: 540px;
}

/* Auth Card Glassmorphic Container - STRICTLY UNTOUCHED FOR OTHER CARDS */
.auth-card {
    background: var(--auth-card-bg) !important;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(226, 232, 240, 0.9) !important;
    border-radius: var(--auth-radius) !important;
    box-shadow: var(--auth-shadow) !important;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
}

.auth-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #1e3a8a 0%, #3b82f6 50%, #06b6d4 100%);
    z-index: 2;
}

.auth-card .card-inner-lg {
    padding: 2.25rem 2.25rem !important;
}

/* Card Header - STRICTLY INSIDE .auth-card */
.auth-card .nk-block-head {
    margin-bottom: 1.75rem !important;
    text-align: center;
}

.auth-icon-badge {
    width: 58px;
    height: 58px;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(30, 58, 138, 0.08) 0%, rgba(59, 130, 246, 0.15) 100%);
    color: var(--auth-primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    margin: 0 auto 14px auto;
    box-shadow: 0 4px 12px rgba(30, 58, 138, 0.06);
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.auth-card .nk-block-title {
    font-size: 1.5rem !important;
    font-weight: 700 !important;
    color: var(--auth-text-main) !important;
    letter-spacing: -0.02em;
    margin-bottom: 6px !important;
}

.auth-card .nk-block-des p {
    color: var(--auth-text-muted) !important;
    font-size: 0.9rem !important;
    margin-bottom: 0 !important;
}

/* Form Controls - STRICTLY INSIDE .auth-card */
.auth-card .form-group {
    margin-bottom: 1.25rem !important;
}

.auth-card .form-label {
    font-size: 0.85rem !important;
    font-weight: 600 !important;
    color: #334155 !important;
    margin-bottom: 6px !important;
    display: inline-block;
    letter-spacing: 0.01em;
}

.auth-card .form-control-lg,
.auth-card .form-control {
    border-radius: 10px !important;
    border: 1px solid var(--auth-border) !important;
    background-color: #f8fafc !important;
    padding: 0.7rem 1rem !important;
    font-size: 0.925rem !important;
    color: var(--auth-text-main) !important;
    transition: all 0.2s ease-in-out !important;
    height: auto !important;
    box-shadow: none !important;
}

/* International Tel Input container & padding fixes */
.iti {
    width: 100% !important;
    display: block !important;
}

.iti input,
.iti input[type=tel],
.iti input[type=text],
.iti .form-control,
.iti .form-control-lg,
.auth-card .iti .form-control-lg,
.auth-card .iti .form-control {
    padding-left: 55px !important;
}

.auth-card .form-control-lg:focus,
.auth-card .form-control:focus {
    background-color: #ffffff !important;
    border-color: var(--auth-border-focus) !important;
    box-shadow: 0 0 0 4px var(--auth-accent-glow) !important;
    outline: none !important;
}

.auth-card .form-control-lg.is-invalid,
.auth-card .form-control.is-invalid {
    border-color: #ef4444 !important;
    background-color: #fff5f5 !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15) !important;
}

/* Passcode Switch Toggle */
.auth-card .passcode-switch {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    color: #94a3b8 !important;
    padding: 6px;
    border-radius: 6px;
    transition: color 0.2s ease, background-color 0.2s ease;
}

.auth-card .passcode-switch:hover {
    color: var(--auth-accent) !important;
    background-color: rgba(59, 130, 246, 0.08);
}

.auth-card .passcode-switch .icon {
    font-size: 1.25rem;
}

/* CAPTCHA Card Design */
.auth-card .captcha-container {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 12px 14px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.auth-card .captcha-image-wrapper {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
    border: 1px solid #cbd5e1;
    background: #ffffff;
    display: flex;
    align-items: center;
}

.auth-card #captchaImage {
    height: 44px !important;
    border: none !important;
    border-radius: 0 !important;
    display: block;
    object-fit: contain;
}

.auth-card #refreshCaptcha {
    border-radius: 8px !important;
    font-size: 0.825rem !important;
    font-weight: 600 !important;
    padding: 0.5rem 0.85rem !important;
    color: var(--auth-primary) !important;
    border: 1px solid rgba(30, 58, 138, 0.25) !important;
    background-color: #ffffff !important;
    transition: all 0.2s ease !important;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.auth-card #refreshCaptcha:hover {
    background-color: var(--auth-primary) !important;
    color: #ffffff !important;
    box-shadow: 0 4px 10px rgba(30, 58, 138, 0.2) !important;
}

.auth-card #refreshCaptcha i,
.auth-card #refreshCaptcha em {
    transition: transform 0.4s ease;
}

.auth-card #refreshCaptcha:hover i,
.auth-card #refreshCaptcha:hover em {
    transform: rotate(180deg);
}

/* Buttons - STRICTLY INSIDE .auth-card */
.auth-card .btn-primary.btn-block,
.auth-card .btn-primary {
    background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 100%) !important;
    border: none !important;
    border-radius: 10px !important;
    padding: 0.75rem 1.5rem !important;
    font-size: 0.95rem !important;
    font-weight: 600 !important;
    letter-spacing: 0.02em !important;
    color: #ffffff !important;
    box-shadow: 0 4px 14px 0 rgba(37, 99, 235, 0.35) !important;
    transition: all 0.25s ease !important;
    cursor: pointer;
}

.auth-card .btn-primary:hover,
.auth-card .btn-primary:focus {
    background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px 0 rgba(37, 99, 235, 0.45) !important;
}

.auth-card .btn-primary:active {
    transform: translateY(0) !important;
}

/* Alert Boxes & Validation Errors */
.auth-card .alert {
    border-radius: 10px !important;
    font-size: 0.875rem !important;
    font-weight: 500 !important;
    padding: 0.75rem 1rem !important;
    border: none !important;
    margin-bottom: 1.25rem !important;
}

.auth-card .alert-success {
    background-color: #ecfdf5 !important;
    color: #065f46 !important;
    border-left: 4px solid #10b981 !important;
}

.auth-card .alert-danger,
.auth-card .login-error-box {
    background-color: #fef2f2 !important;
    color: #991b1b !important;
    border-left: 4px solid #ef4444 !important;
    padding: 0.75rem 1rem !important;
    border-radius: 10px !important;
    font-size: 0.875rem !important;
    margin-bottom: 1.25rem !important;
}

.auth-card .login-error-text,
.auth-card .error {
    font-size: 0.825rem !important;
    font-weight: 500 !important;
    color: #ef4444 !important;
    margin-top: 5px !important;
    display: block;
}

/* Form Footer Links */
.auth-card .form-note-s2 {
    color: var(--auth-text-muted) !important;
    font-size: 0.875rem !important;
}

.auth-card .form-note-s2 a,
.auth-card .link-primary {
    color: var(--auth-accent) !important;
    font-weight: 600 !important;
    transition: color 0.2s ease, text-decoration 0.2s ease;
}

.auth-card .form-note-s2 a:hover,
.auth-card .link-primary:hover {
    color: var(--auth-primary) !important;
    text-decoration: underline !important;
}
