/* 
 * Batwa Billing System - Authentication Pages Stylesheet
 * Modern design with red/black brand theme
 */

:root {
    --primary-red: #FF0000;
    --black: #000000;
    --dark-gray: #333333;
    --light-gray: #666666;
    --border-gray: #DDDDDD;
    --bg-cream: #f1efe7;
    --white: #FFFFFF;
    --success-green: #28a745;
    --error-red: #dc3545;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', 'Roboto', 'Helvetica Neue', sans-serif;
    background: #f8f9fa;
    background-image: radial-gradient(#e9ecef 1px, transparent 1px);
    background-size: 20px 20px;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.auth-container {
    max-width: 980px;
    width: 100%;
}

/* Two-card layout */
.auth-cards-wrapper {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 24px;
    align-items: start;
}

.auth-card {
    background: var(--white);
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    animation: slideUp 0.5s ease-out forwards;
}

.auth-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.12);
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.auth-logo {
    text-align: center;
    padding: 40px 40px 10px;
    background: var(--white);
}

.auth-logo img {
    max-width: 160px;
    height: auto;
}

.auth-header {
    text-align: center;
    padding: 0 40px 30px;
}

.auth-header h2 {
    color: var(--black);
    font-size: 26px;
    font-weight: 800;
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

.auth-header p {
    color: var(--light-gray);
    font-size: 15px;
    line-height: 1.5;
}

.auth-body {
    padding: 0 40px 40px;
}

/* Social Login Buttons */
.social-login {
    margin-bottom: 25px;
}

.btn-google {
    width: 100%;
    padding: 14px 20px;
    background: var(--white);
    border: 1px solid #dadce0;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    color: #3c4043;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    position: relative;
}

.btn-google:hover {
    background: #f8f9fa;
    border-color: #dadce0;
    box-shadow: 0 1px 3px rgba(60, 64, 67, 0.3);
    transform: translateY(-1px);
}

.btn-google:active {
    background: #eff2f5;
    transform: translateY(0);
    box-shadow: none;
}

.btn-google img {
    width: 20px;
    height: 20px;
}

.divider {
    display: flex;
    align-items: center;
    margin: 25px 0;
    color: #9aa0a6;
    font-size: 13px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e8eaed;
}

.divider span {
    padding: 0 15px;
}

/* Form Elements */
.form-group {
    margin-bottom: 24px;
}

.form-label {
    display: block;
    color: var(--dark-gray);
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
}

.form-control {
    width: 100%;
    padding: 14px 16px;
    border: 1.5px solid #e0e0e0;
    border-radius: 10px;
    font-size: 15px;
    color: var(--black);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    background: #fff;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-red);
    box-shadow: 0 0 0 4px rgba(255, 0, 0, 0.08);
    background: #fff;
}

.form-control::placeholder {
    color: #AAAAAA;
}

.form-text {
    display: block;
    margin-top: 6px;
    font-size: 13px;
    color: var(--light-gray);
}

/* Password Strength */
.password-strength {
    height: 4px;
    border-radius: 2px;
    margin-top: 8px;
    background: var(--border-gray);
    overflow: hidden;
    transition: all 0.3s ease;
}

.password-strength-bar {
    height: 100%;
    transition: width 0.3s ease, background 0.3s ease;
}

/* User Type Selection Card */
.user-type-card {
    padding: 30px 20px;
}

.user-type-selection {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.type-card {
    padding: 28px 20px;
    border: 2px solid var(--border-gray);
    border-radius: 12px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: var(--white);
}

.type-card:hover {
    border-color: var(--primary-red);
    transform: scale(1.03);
    box-shadow: 0 6px 16px rgba(255, 0, 0, 0.15);
}

.type-card.active {
    border-color: var(--primary-red);
    background: #FFF5F5;
    box-shadow: 0 6px 16px rgba(255, 0, 0, 0.2);
}

.type-card i {
    font-size: 32px;
    color: var(--primary-red);
    margin-bottom: 10px;
}

.type-card h5 {
    color: var(--black);
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 4px;
}

.type-card p {
    color: var(--light-gray);
    font-size: 12px;
    margin: 0;
}

/* Buttons */
.btn-primary {
    width: 100%;
    padding: 16px 24px;
    background: var(--primary-red);
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 700;
    color: var(--white);
    cursor: pointer;
    transition: all 0.2s ease;
    letter-spacing: 0.3px;
    box-shadow: 0 4px 12px rgba(255, 0, 0, 0.2);
}

.btn-primary:hover {
    background: #e60000;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(255, 0, 0, 0.3);
}

.btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(255, 0, 0, 0.2);
}

.btn-secondary {
    width: 100%;
    padding: 14px 20px;
    background: var(--white);
    border: 1.5px solid var(--border-gray);
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    color: var(--dark-gray);
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-secondary:hover {
    border-color: var(--light-gray);
    background: #F9F9F9;
}

/* Checkbox */
.form-check {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    cursor: pointer;
}

.form-check-input {
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-gray);
    border-radius: 5px;
    margin-right: 12px;
    cursor: pointer;
    accent-color: var(--primary-red);
    transition: all 0.2s;
}

.form-check-label {
    font-size: 14px;
    color: var(--dark-gray);
    cursor: pointer;
    user-select: none;
}

/* Alerts */
.alert {
    padding: 14px 20px;
    border-radius: 10px;
    margin-bottom: 24px;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
}

.alert-danger {
    background: #FFF5F5;
    border: 1px solid #FFCCCC;
    color: var(--error-red);
}

.alert-success {
    background: #F0FFF4;
    border: 1px solid #C6F6D5;
    color: var(--success-green);
}

/* Footer Links */
.auth-footer {
    text-align: center;
    padding-top: 24px;
    margin-top: 24px;
    border-top: 1px solid #f0f0f0;
    color: var(--light-gray);
    font-size: 14px;
}

.auth-footer a {
    color: var(--primary-red);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
}

.auth-footer a:hover {
    color: #cc0000;
    text-decoration: underline;
}

/* Password Input Wrapper */
.password-input-wrapper {
    position: relative;
}

.password-toggle {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: var(--light-gray);
    transition: color 0.3s ease;
}

.password-toggle:hover {
    color: var(--primary-red);
}

/* Form Options (Remember Me & Forgot Password) */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.forgot-link {
    color: var(--primary-red);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
}

.forgot-link:hover {
    text-decoration: underline;
}

/* Footer Text */
.auth-footer-text {
    text-align: center;
    margin-top: 24px;
    color: var(--light-gray);
    font-size: 13px;
}

.otp-actions {
    display: flex;
    gap: 12px;
    margin-top: 20px;
}

.otp-actions button {
    flex: 1;
}

.otp-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: none;
    border: none;
    font-size: 24px;
    color: var(--light-gray);
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.otp-close:hover {
    background: #F5F5F5;
    color: var(--dark-gray);
}

/* OTP Modal */
.otp-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 9999;
    align-items: center;
    justify-content: center;
}

.otp-modal.show {
    display: flex;
}

.otp-content {
    background: var(--white);
    padding: 40px;
    border-radius: 16px;
    max-width: 420px;
    width: 90%;
    text-align: center;
}

.otp-content h4 {
    color: var(--black);
    font-size: 24px;
    margin-bottom: 12px;
}

.otp-content p {
    color: var(--light-gray);
    margin-bottom: 24px;
}

.otp-inputs {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin: 24px 0;
}

.otp-input {
    width: 50px;
    height: 50px;
    text-align: center;
    font-size: 20px;
    font-weight: 700;
    border: 2px solid var(--border-gray);
    border-radius: 8px;
    color: var(--black);
}

.otp-input:focus {
    outline: none;
    border-color: var(--primary-red);
    box-shadow: 0 0 0 3px rgba(255, 0, 0, 0.1);
}

/* Responsive */
@media (max-width: 900px) {
    .auth-cards-wrapper {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .user-type-selection {
        flex-direction: row;
    }
    
    .type-card {
        flex: 1;
    }
}

@media (max-width: 576px) {
    .auth-logo,
    .auth-header,
    .auth-body {
        padding-left: 24px;
        padding-right: 24px;
    }
    
    .auth-header h2 {
        font-size: 24px;
    }
    
    .user-type-selection {
        flex-direction: column;
    }
    
    .otp-content {
        padding: 30px 20px;
    }
    
    .otp-input {
        width: 44px;
        height: 44px;
        font-size: 18px;
    }
}
