/* ==========================================================================
   E-SULEKH LOGIN PAGE — Dark Navy + Education Icons
   ========================================================================== */

/* Override green theme variables for login page */
.es-login-bg {
    --es-primary: #6c63ff;
    --es-primary-hover: #5a52e0;
    --es-primary-light: #eeecff;
    --es-primary-soft: #ddd8ff;
    --es-primary-rgb: 108, 99, 255;
    --es-input-focus-border: #6c63ff;
}

/* Deep purple-navy background matching the button shade */
.es-login-bg {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: linear-gradient(135deg, #1a1b3a 0%, #2a2356 40%, #3b2d6e 70%, #2a2356 100%) !important;
    background-size: auto !important;
    animation: none !important;
    position: relative;
    overflow: hidden;
}

/* Tiling education icons pattern (used by both triangles) */
.es-login-bg::before,
.es-login-bg::after {
    background-image:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220' viewBox='0 0 220 220'%3E%3Cstyle%3E.a%7Bfill:rgba(255,255,255,0.09)%7D.b%7Bfill:rgba(255,255,255,0.15)%7D%3C/style%3E%3Cpath class='b' d='M30 20L45 12 60 20 45 28Z'/%3E%3Crect class='b' x='42' y='20' width='6' height='10' rx='1'/%3E%3Cline x1='60' y1='20' x2='60' y2='30' stroke='rgba(255,255,255,0.13)' stroke-width='1.5'/%3E%3Ccircle class='b' cx='60' cy='32' r='1.5'/%3E%3Crect class='a' x='120' y='15' width='40' height='26' rx='2'/%3E%3Crect class='a' x='113' y='41' width='54' height='4' rx='2'/%3E%3Ccircle class='b' cx='30' cy='80' r='11'/%3E%3Crect class='b' x='24' y='91' width='12' height='7' rx='2'/%3E%3Crect class='a' x='90' y='75' width='5' height='32' rx='1' transform='rotate(-25 93 91)'/%3E%3Cpolygon class='a' points='89,105 93,114 97,105' transform='rotate(-25 93 110)'/%3E%3Cpath class='b' d='M160 70Q175 78 175 94Q175 78 190 70L190 90Q175 98 175 98Q175 98 160 90Z'/%3E%3Crect class='a' x='25' y='140' width='24' height='32' rx='2'/%3E%3Cline x1='37' y1='140' x2='37' y2='172' stroke='rgba(255,255,255,0.09)' stroke-width='1'/%3E%3Crect class='a' x='100' y='140' width='44' height='7' rx='1'/%3E%3Cline x1='108' y1='140' x2='108' y2='144' stroke='rgba(255,255,255,0.09)' stroke-width='1'/%3E%3Cline x1='116' y1='140' x2='116' y2='144' stroke='rgba(255,255,255,0.09)' stroke-width='1'/%3E%3Cline x1='124' y1='140' x2='124' y2='144' stroke='rgba(255,255,255,0.09)' stroke-width='1'/%3E%3Cline x1='132' y1='140' x2='132' y2='144' stroke='rgba(255,255,255,0.09)' stroke-width='1'/%3E%3Cpath class='b' d='M175 140L190 132 205 140 190 148Z'/%3E%3Crect class='b' x='187' y='140' width='6' height='10' rx='1'/%3E%3Ccircle class='a' cx='175' cy='200' r='11'/%3E%3Crect class='a' x='169' y='211' width='12' height='7' rx='2'/%3E%3Crect class='b' x='70' y='190' width='40' height='26' rx='2'/%3E%3Crect class='b' x='63' y='216' width='54' height='4' rx='2'/%3E%3C/svg%3E");
    background-size: 220px 220px;
    background-repeat: repeat;
    pointer-events: none;
    z-index: 0;
}

/* Top-left triangle */
.es-login-bg::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    clip-path: polygon(0 0, 52% 0, 0 52%);
}

/* Bottom-right triangle */
.es-login-bg::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 100%;
    height: 100%;
    clip-path: polygon(100% 48%, 100% 100%, 48% 100%);
}

/* Teal/green splash glow behind the card */
.es-login-card-wrap {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 420px;
}

.es-login-card-wrap::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 160%;
    height: 160%;
    background: radial-gradient(ellipse at 40% 40%, rgba(56,200,190,0.50) 0%, rgba(42,185,175,0.35) 20%, rgba(30,165,160,0.18) 45%, transparent 70%),
                radial-gradient(ellipse at 65% 60%, rgba(60,215,200,0.40) 0%, rgba(45,195,185,0.22) 25%, transparent 55%),
                radial-gradient(ellipse at 50% 50%, rgba(50,200,190,0.30) 0%, transparent 65%);
    border-radius: 50%;
    filter: blur(35px);
    pointer-events: none;
    z-index: -1;
}

/* Clean white login card */
.es-login-card {
    width: 100%;
    max-width: 420px;
    background: #ffffff;
    border: none;
    border-radius: 18px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .25);
    overflow: hidden;
    position: relative;
    z-index: 1;
}

/* Card Header */
.es-login-header {
    text-align: center;
    padding: 40px 32px 16px;
}

.es-login-header .logo {
    display: inline-block;
    margin-bottom: 14px;
}

.es-login-header .logo img {
    height: 52px;
}

.es-login-header h2 {
    font-size: 24px !important;
    font-weight: 700;
    color: #1a1a2e !important;
    margin: 0 0 6px;
    letter-spacing: -0.3px;
}

.es-login-header p {
    color: #7a7a8e;
    font-size: 14px;
    margin: 0;
}

/* Card Body */
.es-login-body {
    padding: 16px 32px 32px;
}

.es-login-body .form-label {
    font-size: 12px !important;
    font-weight: 700 !important;
    color: #3a3a4a !important;
    text-transform: uppercase;
    letter-spacing: .5px;
}

.es-login-body .form-control {
    background: #ffffff !important;
    border: 1.5px solid #d8dce6 !important;
    padding: 11px 14px !important;
    font-size: 14px !important;
    border-radius: 8px !important;
    transition: border-color .2s, box-shadow .2s;
    color: #333 !important;
}

.es-login-body .form-control:focus,
.es-login-bg .form-control:focus {
    border-color: #6c63ff !important;
    box-shadow: 0 0 0 3px rgba(108,99,255,.12) !important;
    outline: none !important;
    background: #ffffff !important;
}

.es-login-body .input-group-text {
    background: #f8f9fc !important;
    border: 1.5px solid #d8dce6 !important;
    border-radius: 8px 0 0 8px !important;
    border-right: none !important;
    color: #8e8ea0 !important;
    font-size: 15px;
    width: 46px;
    justify-content: center;
    transition: border-color .2s;
}

/* When input is focused, also highlight the icon area */
.es-login-body .input-group:focus-within .input-group-text {
    border-color: #6c63ff !important;
}

.es-login-body .input-group .form-control {
    border-radius: 0 8px 8px 0 !important;
    border-left: none !important;
}

.es-login-body .btn-primary {
    background: linear-gradient(135deg, #1a2744 0%, #6c63ff 50%, #38c8be 100%) !important;
    border: none !important;
    border-radius: 8px !important;
    padding: 12px 24px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    letter-spacing: .3px;
    box-shadow: 0 4px 14px rgba(108,99,255,.35) !important;
    transition: transform .15s ease, box-shadow .15s ease, background .2s ease;
    color: #fff !important;
}

.es-login-body .btn-primary:hover,
.es-login-body .btn.btn-primary:hover {
    background: linear-gradient(135deg, #141e36 0%, #5a52e0 50%, #2fb8ae 100%) !important;
    border-color: transparent !important;
    transform: translateY(-1px);
    box-shadow: 0 6px 22px rgba(108,99,255,.45) !important;
}

.es-login-body .btn-primary:focus,
.es-login-body .btn.btn-primary:focus {
    background: linear-gradient(135deg, #1a2744 0%, #6c63ff 50%, #38c8be 100%) !important;
    border-color: transparent !important;
    box-shadow: 0 0 0 3px rgba(108,99,255,.25) !important;
}

.es-login-body .btn-primary:active {
    transform: translateY(0);
}

.es-login-body .btn-success {
    background: linear-gradient(135deg, #1a2744 0%, #6c63ff 50%, #38c8be 100%) !important;
    border: none !important;
    border-radius: 8px !important;
    padding: 12px 24px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    box-shadow: 0 4px 14px rgba(108,99,255,.35) !important;
    color: #fff !important;
}

.es-login-body .btn-success:hover,
.es-login-body .btn.btn-success:hover {
    background: linear-gradient(135deg, #141e36 0%, #5a52e0 50%, #2fb8ae 100%) !important;
    border-color: transparent !important;
    box-shadow: 0 6px 22px rgba(108,99,255,.45) !important;
}

.es-login-body .btn-success:focus,
.es-login-body .btn.btn-success:focus {
    background: linear-gradient(135deg, #1a2744 0%, #6c63ff 50%, #38c8be 100%) !important;
    box-shadow: 0 0 0 3px rgba(108,99,255,.25) !important;
}

/* OTP Separate Boxes */
.es-otp-boxes {
    display: flex;
    gap: 8px;
    justify-content: center;
}
.es-otp-box {
    width: 46px !important;
    height: 54px !important;
    text-align: center;
    font-size: 22px !important;
    font-weight: 700 !important;
    border: 1.5px solid #d8dce6 !important;
    border-radius: 10px !important;
    background: #fff !important;
    color: #1a1a2e !important;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    padding: 0 !important;
}
.es-otp-box:focus {
    border-color: #6c63ff !important;
    box-shadow: 0 0 0 3px rgba(108,99,255,.15) !important;
}
.es-otp-box.es-otp-filled {
    border-color: #6c63ff !important;
    background: #f5f3ff !important;
}

/* Transition between panels */
.es-login-body .transitblock {
    transition: opacity .3s ease, transform .3s ease;
}

.es-login-body .transitblock.hidden {
    opacity: 0;
    transform: translateY(8px);
    pointer-events: none;
    position: absolute;
    width: 100%;
}

/* Loading overlay */
.es-login-body .loading-overlay {
    position: absolute;
    inset: 0;
    background: rgba(255,255,255,.85);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 20px;
    z-index: 10;
    opacity: 0;
    pointer-events: none;
    transition: opacity .3s ease;
}

.es-login-body .loading-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.es-login-body .loading-text {
    font-size: 14px;
    font-weight: 500;
    color: #475569;
}

/* Card Footer */
.es-login-footer {
    text-align: center;
    padding: 14px 32px;
    border-top: 1px solid #eef0f5;
    background: #fafbfc;
}

.es-login-footer small {
    color: #a0a0b0;
    font-size: 12px;
    letter-spacing: .2px;
}

/* Error styling — message text suppressed; invalid state shown via red border + soft shake */
.es-login-body label.error,
.es-login-body label.cus-error,
.es-login-body .input-group + label.text-danger {
    display: none !important;
}

.es-login-body .input-group.es-input-invalid .form-control,
.es-login-body .input-group.es-input-invalid .input-group-text {
    border-color: #ef4444 !important;
    background: #fff5f5 !important;
}

.es-login-body .input-group.es-input-invalid .form-control {
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.12) !important;
    color: #b91c1c !important;
}

.es-login-body .input-group.es-input-invalid .input-group-text {
    color: #ef4444 !important;
}

.es-login-body .input-group.es-shake {
    animation: es-shake-soft 0.55s ease-in-out;
}

@keyframes es-shake-soft {
    0%, 100% { transform: translateX(0); }
    15% { transform: translateX(-4px); }
    30% { transform: translateX(4px); }
    45% { transform: translateX(-3px); }
    60% { transform: translateX(3px); }
    75% { transform: translateX(-2px); }
    90% { transform: translateX(2px); }
}

.es-login-body .alert {
    font-size: 12.5px;
    padding: 8px 14px;
    border-radius: 8px;
}

/* OTP verification icon */
.es-otp-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    background: linear-gradient(135deg, #eeecff, #ddd8ff);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
}

.es-otp-icon i {
    font-size: 24px;
    color: #6c63ff;
}

/* Timer text */
.es-login-body .font-16 { font-size: 16px !important; }
.es-login-body .font-12 { font-size: 12px !important; }
.es-login-body .font-13 { font-size: 13px !important; }

/* Back link */
.es-login-body .es-back-link {
    color: #64748b;
    font-size: 13px;
    text-decoration: none;
    transition: color .15s;
}
.es-login-body .es-back-link:hover { color: #6c63ff; }

/* Responsive */
@media (max-width: 480px) {
    .es-login-card { margin: 10px; border-radius: 16px; }
    .es-login-header { padding: 24px 20px 16px; }
    .es-login-body { padding: 8px 20px 24px; }
    .es-login-header h2 { font-size: 20px !important; }
}

/* Spinner */
.es-spinner {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2px solid #e2e8f0;
    border-top-color: #6c63ff;
    border-radius: 50%;
    animation: es-spin .6s linear infinite;
}

@keyframes es-spin {
    to { transform: rotate(360deg); }
}

/* ==========================================================================
   EXAM SESSION & TASK PROVIDER SELECTION PAGES
   These pages use LoginLayout + legacy HTML classes. Styled here to match
   the modern login aesthetic.
   ========================================================================== */

/* Section wrapper */
.gradient-form {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 0;
}

.gradient-form .container-fluid {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Main card */
.gradient-form .card {
    background: rgba(255, 255, 255, .94) !important;
    backdrop-filter: blur(24px) saturate(1.4);
    -webkit-backdrop-filter: blur(24px) saturate(1.4);
    border: 1px solid rgba(255, 255, 255, .45) !important;
    border-radius: 20px !important;
    box-shadow: 0 25px 60px rgba(0, 0, 0, .3), 0 0 0 1px rgba(255,255,255,.15) inset !important;
    overflow: hidden;
    max-width: 800px;
    margin: 0 auto;
}

/* Left panel — brand section */
.gradient-form .bg-customblue,
.gradient-form .taskprovider {
    background: linear-gradient(135deg, #1a2744 0%, #243356 50%, #6c63ff 100%) !important;
    position: relative;
    min-height: 300px;
    overflow: hidden;
    border-radius: 20px 0 0 20px !important;
}

.gradient-form .bg-left-logo {
    position: relative;
    z-index: 2;
}

.gradient-form .bg-left-logo img {
    max-height: 64px;
    filter: brightness(0) invert(1);
}

.gradient-form .card-img-absolute-inner {
    position: absolute !important;
    right: -30px !important;
    bottom: -30px !important;
    opacity: 0.08 !important;
    width: 160px !important;
    pointer-events: none !important;
}

/* Right panel — form section */
.gradient-form .col-lg-7 .card-body {
    padding: 40px !important;
}

/* Icon circle */
.gradient-form .login-logo-box {
    margin-bottom: 8px;
}

.gradient-form .login-logo-box i,
.gradient-form .login-logo-box .icofont {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    background: linear-gradient(135deg, #eeecff, #ddd8ff) !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    font-size: 24px !important;
    color: #6c63ff !important;
}

.gradient-form .i-color,
.gradient-form .icofont {
    color: #6c63ff !important;
}

.gradient-form .f-28 {
    font-size: 24px !important;
}

/* Auth box */
.gradient-form .auth-box1 {
    max-width: 320px;
    margin: 0 auto;
}

.gradient-form .auth-box1 .card-header {
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
}

.gradient-form .auth-box1 h4 {
    font-size: 20px !important;
    font-weight: 700 !important;
    color: #0f172a !important;
    margin-bottom: 4px !important;
    letter-spacing: -0.3px;
    padding: 8px 0 16px !important;
}

/* Form elements */
.gradient-form .card-block {
    padding: 0;
    margin-bottom: 16px;
}

.gradient-form .form-group {
    margin-bottom: 20px;
}

.gradient-form .form-select,
.gradient-form .form-control {
    background: rgba(255,255,255,.8) !important;
    border: 1.5px solid #cbd5e1 !important;
    border-radius: 6px !important;
    padding: 10px 14px !important;
    font-size: 14px !important;
    color: #334155 !important;
    transition: border-color .2s, box-shadow .2s;
    height: auto !important;
}


.gradient-form .form-select:focus,
.gradient-form .form-control:focus {
    border-color: #6c63ff !important;
    box-shadow: 0 0 0 4px rgba(108,99,255,.12) !important;
    background: #ffffff !important;
}

/* Buttons row */
.gradient-form .card-block:last-child {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-top: 24px;
    padding-top: 0;
}

.gradient-form .card-block .btn {
    border-radius: 6px !important;
    padding: 9px 28px !important;
    font-size: 13.5px !important;
    font-weight: 600 !important;
    letter-spacing: .3px;
    border: none !important;
    flex: none !important;
    display: inline-flex !important;
    align-items: center;
    gap: 6px;
    transition: background .2s, transform .1s, box-shadow .2s, color .2s;
}

.gradient-form .btn-danger,
.gradient-form .card-block .es-btn-outline-danger {
    background: transparent !important;
    color: #dc2626 !important;
    border: 1.5px solid #dc2626 !important;
    box-shadow: none !important;
}

.gradient-form .btn-danger:hover,
.gradient-form .card-block .es-btn-outline-danger:hover {
    background: #dc2626 !important;
    color: #fff !important;
    box-shadow: 0 4px 12px rgba(220,38,38,.2) !important;
}

.gradient-form .btn-success,
.gradient-form .card-block .es-btn-primary {
    background: #6c63ff !important;
    color: #fff !important;
    box-shadow: 0 2px 8px rgba(108,99,255,.2) !important;
}

.gradient-form .btn-success:hover,
.gradient-form .card-block .es-btn-primary:hover {
    background: #5a52e0 !important;
    box-shadow: 0 4px 14px rgba(108,99,255,.3) !important;
}

.gradient-form .btn:hover {
    transform: translateY(-1px);
}

.gradient-form .btn:active {
    transform: scale(.97) !important;
}

/* Fix the left panel border */
.gradient-form .card {
    border: none !important;
}

.gradient-form .row.g-0 {
    overflow: hidden;
    border-radius: 20px;
}

/* Responsive — stack on mobile */
@media (max-width: 991.98px) {
    .gradient-form .bg-customblue,
    .gradient-form .taskprovider {
        border-radius: 20px 20px 0 0 !important;
        min-height: 160px;
    }

    .gradient-form .col-lg-7 .card-body {
        padding: 24px !important;
    }

    .gradient-form .card {
        max-width: 480px;
    }
}

/* Hide legacy font-size helpers that collide */
.gradient-form .m-t-30 { margin-top: 0 !important; }

/* ==========================================================================
   EXAM SESSION PAGE — Glass Card Variant
   ========================================================================== */

/* Session dropdown — full width with icon prefix */
.es-login-card .es-session-select {
    border-radius: 0 10px 10px 0 !important;
    border-left: none !important;
    cursor: pointer;
}

.es-login-card .es-session-select:focus {
    border-color: #22c55e !important;
    box-shadow: 0 0 0 3px rgba(34,197,94,.12) !important;
    background: #fff !important;
}
.es-login-card .es-session-select option:checked {
    background: #22c55e !important;
    color: #fff !important;
}
.es-login-card .es-session-select option:hover {
    background: #f0fdf4 !important;
}

/* Action button row */
.es-session-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

/* Filled Logout button */
.es-login-card .es-btn-outline-danger {
    background: #dc2626 !important;
    color: #fff !important;
    border: 1.5px solid #dc2626 !important;
    border-radius: 10px !important;
    padding: 10px 24px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    letter-spacing: .3px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    box-shadow: none !important;
    transition: background .2s, color .2s, transform .15s, box-shadow .15s;
}

.es-login-card .es-btn-outline-danger:hover {
    background: #b91c1c !important;
    color: #fff !important;
    box-shadow: 0 4px 12px rgba(220,38,38,.35) !important;
    transform: translateY(-1px);
}

.es-login-card .es-btn-outline-danger:active {
    transform: scale(.97);
}

/* Solid Proceed button */
.es-login-card .es-btn-primary {
    background: linear-gradient(135deg, #6c63ff, #8b78ff) !important;
    color: #fff !important;
    border: none !important;
    border-radius: 8px !important;
    padding: 10px 28px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    letter-spacing: .3px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 4px 12px rgba(108,99,255,.35) !important;
    transition: transform .15s, box-shadow .15s;
}

.es-login-card .es-btn-primary:hover {
    box-shadow: 0 6px 20px rgba(108,99,255,.4) !important;
    transform: translateY(-1px);
}

.es-login-card .es-btn-primary:active {
    transform: scale(.97);
}
