/* ============================================
   JEE Question Bank - Login Page Styles
   Matches the SAS Reviewer login card design
   ============================================ */

/* ---------- Reset & Base ---------- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    width: 100%;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 14px;
    color: #333;
    background: #d2d6de;
    overflow: hidden;
}

/* ---------- Full-page wrapper ---------- */
.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    width: 100%;
    background: #d2d6de;
}

/* ---------- Login card ---------- */
.login-box {
    width: 360px;
    background: #ffffff;
    border-radius: 6px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12),
                0 0 40px rgba(0, 0, 0, 0.06);
    padding: 30px 30px 25px 30px;
}

/* ---------- Header ---------- */
.login-header {
    text-align: center;
    margin-bottom: 22px;
}

.login-header h1 {
    font-size: 32px;
    font-weight: 300;
    margin-bottom: 4px;
    color: #444;
    letter-spacing: 0.5px;
}

.login-header h1 span.brand-bold {
    font-weight: 700;
    color: #3c8dbc;
}

.login-header p {
    font-size: 14px;
    color: #999;
    margin-top: 2px;
}

/* ---------- Form ---------- */
.login-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Input group: input + icon side by side */
.input-group {
    display: flex;
    align-items: stretch;
    border: 1px solid #d2d6de;
    border-radius: 4px;
    overflow: hidden;
    transition: border-color 0.2s;
}

.input-group:focus-within {
    border-color: #3c8dbc;
}

.input-group input {
    flex: 1;
    border: none;
    outline: none;
    padding: 10px 14px;
    font-size: 14px;
    font-family: inherit;
    color: #555;
    background: #fff;
}

.input-group input::placeholder {
    color: #aaa;
}

.input-group .input-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    background: #f7f7f7;
    border-left: 1px solid #d2d6de;
    color: #888;
    font-size: 14px;
}

/* ---------- Error message ---------- */
.error-message {
    display: none;
    background: #dd4b39;
    color: #fff;
    padding: 10px 14px;
    border-radius: 4px;
    font-size: 13px;
    text-align: center;
    animation: shakeError 0.4s ease;
}

.error-message.visible {
    display: block;
}

@keyframes shakeError {
    0%, 100% { transform: translateX(0); }
    20%      { transform: translateX(-6px); }
    40%      { transform: translateX(6px); }
    60%      { transform: translateX(-4px); }
    80%      { transform: translateX(4px); }
}

/* ---------- Button row ---------- */
.btn-row {
    display: flex;
    justify-content: flex-end;
    margin-top: 2px;
}

.btn-signin {
    background: #3c8dbc;
    color: #fff;
    border: none;
    border-radius: 4px;
    padding: 8px 28px;
    font-size: 14px;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.2s, box-shadow 0.2s;
}

.btn-signin:hover {
    background: #367ea9;
    box-shadow: 0 2px 6px rgba(60, 141, 188, 0.35);
}

.btn-signin:active {
    background: #317296;
}

/* ---------- Loading spinner on button ---------- */
.btn-signin.loading {
    pointer-events: none;
    opacity: 0.75;
    position: relative;
    padding-left: 38px;
}

.btn-signin.loading::before {
    content: '';
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,0.4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to { transform: translateY(-50%) rotate(360deg); }
}
