/* ===== USER LOGIN STYLES ===== */

/* Base and Variables */
:root {
    --primary-dark: #071a27;
    --primary-blue: #0e6b88;
    --accent-teal: #66d0e8;
    --accent-light: #8fe6ff;
    --text-light: #f6ded4;
    --text-lighter: #eaf6ff;
    --text-muted: #a8c5d6;
    --danger-red: #dc3545;
    --success-green: #28a745;
    --warning-orange: #ffc107;
    --gradient-primary: linear-gradient(135deg, var(--accent-teal), var(--primary-blue));
    --gradient-dark: linear-gradient(180deg, var(--primary-blue), var(--primary-dark));
    --gradient-card: linear-gradient(145deg, rgba(255,255,255,0.1), rgba(255,255,255,0.05));
    --radius-lg: 0.75rem;
    --shadow-strong: 0 10px 30px rgba(102, 208, 232, 0.25);
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    margin: 0;
    color: var(--text-lighter);
    background: var(--primary-dark);
    overflow-y: auto; /* Allow vertical scrolling */
    min-height: 100vh;
}

.login-container {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.login-background {
    position: fixed; /* Changed from absolute to fixed */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--gradient-dark);
    z-index: -1;
}

.login-wrapper {
    max-width: 450px;
    width: 100%;
    padding: 1rem;
    margin: auto;
}

.login-box {
    background: var(--gradient-card);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(143, 230, 255, 0.2);
    border-radius: var(--radius-lg);
    padding: 1.5rem; /* Reduced padding */
    box-shadow: var(--shadow-strong);
    max-height: 90vh; /* Limit height */
    overflow-y: auto; /* Allow scrolling within box if needed */
}

.login-header {
    text-align: center;
    margin-bottom: 1.5rem; /* Reduced margin */
}

.logo-icon {
    width: 50px; /* Reduced size */
    height: 50px; /* Reduced size */
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.25rem; /* Reduced font size */
    color: white;
    margin: 0 auto 0.75rem; /* Reduced margin */
}

.login-header h1 {
    color: var(--accent-light);
    margin-bottom: 0.5rem;
    font-size: 1.5rem; /* Reduced font size */
    line-height: 1.2;
}

.login-header p {
    color: var(--text-muted);
    margin: 0;
    font-size: 0.9rem; /* Reduced font size */
    line-height: 1.4;
}

.login-header h5 {
    color: var(--warning-orange);
    font-size: 0.75rem; /* Reduced font size */
    font-weight: 500;
    margin-top: 0.75rem; /* Reduced margin */
    line-height: 1.3; /* Better line height */
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0 0.5rem; /* Add some padding */
}

/* Bank Details Box - Made more compact */
.bank-details {
    background: rgba(14, 107, 136, 0.2);
    border: 1px solid rgba(102, 208, 232, 0.3);
    border-radius: 0.5rem;
    padding: 1rem; /* Reduced padding */
    margin-bottom: 1rem; /* Reduced margin */
    text-align: center;
}

.bank-details i {
    font-size: 1.25rem; /* Reduced size */
    color: var(--accent-teal);
    margin-bottom: 0.5rem; /* Reduced margin */
    display: block;
}

.bank-details h3 {
    font-size: 0.7rem; /* Reduced font size */
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    margin: 0.25rem 0; /* Reduced margin */
}

.bank-details label {
    font-size: 1rem; /* Reduced font size */
    font-weight: 600;
    color: var(--accent-light);
    display: block;
    margin-bottom: 0.25rem; /* Reduced margin */
    line-height: 1.2;
}

.bank-details label:last-child {
    margin-bottom: 0;
}

/* Form Styles - Made more compact */
#loginForm {
    display: flex;
    flex-direction: column;
    gap: 1rem; /* Reduced gap */
    margin-bottom: 1rem; /* Reduced margin */
    width: 100%;
    max-width: 450px;
    margin: 0 auto;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.25rem; /* Reduced gap */
}

.form-group label {
    font-size: 0.85rem; /* Reduced font size */
    font-weight: 500;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
}

.input-group {
    position: relative;
    display: flex;
    align-items: center;
}

.input-group i {
    position: absolute;
    left: 0.75rem; /* Reduced left spacing */
    color: var(--text-muted);
    font-size: 0.9rem; /* Reduced font size */
}

.form-control {
    width: 100%;
    padding: 0.7rem 0.75rem 0.7rem 2.25rem; /* Reduced padding */
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(143, 230, 255, 0.2);
    border-radius: 0.5rem;
    color: var(--text-lighter);
    font-family: inherit;
    font-size: 0.95rem; /* Reduced font size */
    transition: border-color 0.3s, box-shadow 0.3s;
}

.form-control::placeholder {
    color: rgb(18, 143, 201);
    opacity: 1;
    font-size: 0.9rem; /* Reduced font size */
}

.form-control:focus {
    outline: none;
    border-color: var(--accent-light);
    box-shadow: 0 0 0 3px rgba(102, 208, 232, 0.3);
}

.password-toggle {
    position: absolute;
    right: 0.75rem; /* Reduced right spacing */
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 0.9rem; /* Reduced font size */
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px; /* Reduced width */
    height: 20px; /* Reduced height */
    z-index: 10;
}

.password-toggle:hover {
    color: var(--accent-light);
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem; /* Reduced font size */
    margin-top: 0.25rem; /* Reduced margin */
}

.checkbox {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-muted);
    cursor: pointer;
}

.checkbox input[type="checkbox"] {
    width: 14px; /* Reduced width */
    height: 14px; /* Reduced height */
    cursor: pointer;
}

.forgot-link {
    color: var(--accent-teal);
    text-decoration: none;
    transition: color 0.3s;
    font-size: 0.85rem; /* Reduced font size */
}

.forgot-link:hover {
    text-decoration: underline;
    color: var(--accent-light);
}

/* Buttons - Made more compact */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.7rem 1.25rem; /* Reduced padding */
    border: none;
    border-radius: 0.5rem;
    font-family: inherit;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 0.95rem; /* Reduced font size */
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-strong);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--accent-light); /* Reduced border thickness */
    color: var(--accent-light);
}

.btn-outline:hover {
    background: var(--accent-light);
    color: var(--primary-dark);
}

.btn-block {
    width: 100%;
}

/* Divider */
.divider {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 1rem 0; /* Reduced margin */
    color: var(--text-muted);
    font-size: 0.85rem; /* Reduced font size */
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(143, 230, 255, 0.2);
}

.divider span {
    padding: 0 0.75rem; /* Reduced padding */
    background: transparent;
}

.login-footer {
    text-align: center;
    margin-top: 1rem; /* Reduced margin */
    font-size: 0.85rem; /* Reduced font size */
    color: var(--text-muted);
}

.login-footer a {
    color: var(--accent-teal);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: color 0.3s;
}

.login-footer a:hover {
    text-decoration: underline;
    color: var(--accent-light);
}

/* Message & Loading */
.message {
    text-align: center;
    padding: 0.75rem; /* Reduced padding */
    border-radius: 0.5rem;
    margin-top: 0.75rem; /* Reduced margin */
    font-weight: 500;
    display: none;
    font-size: 0.9rem; /* Reduced font size */
}

.message.active {
    display: block;
}

.message.success { 
    background-color: rgba(40, 167, 69, 0.2); 
    color: var(--success-green); 
    border: 1px solid rgba(40, 167, 69, 0.3);
}

.message.error { 
    background-color: rgba(220, 53, 69, 0.2); 
    color: var(--danger-red); 
    border: 1px solid rgba(220, 53, 69, 0.3);
}

.message.info { 
    background-color: rgba(143, 230, 255, 0.2); 
    color: var(--accent-light); 
    border: 1px solid rgba(143, 230, 255, 0.3);
}

.message.warning { 
    background-color: rgba(255, 193, 7, 0.2); 
    color: var(--warning-orange); 
    border: 1px solid rgba(255, 193, 7, 0.3);
}

.loading-state {
    text-align: center;
    color: var(--text-muted);
    padding: 1.5rem; /* Reduced padding */
}

.loading-state .spinner i {
    font-size: 2rem; /* Reduced size */
    color: var(--accent-teal);
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.loading-state p {
    margin-top: 0.75rem; /* Reduced margin */
    font-weight: 500;
    font-size: 0.9rem; /* Reduced font size */
}

/* ===== RESPONSIVE (PHONE VIEW) ===== */
@media (max-width: 576px) {
    .login-container {
        padding: 0.5rem;
        align-items: flex-start; /* Align to top on mobile */
        padding-top: 1rem;
    }
    
    .login-wrapper {
        padding: 0.5rem;
    }

    .login-box {
        padding: 1.25rem;
        max-height: 95vh; /* Allow more height on mobile */
    }

    .login-header h1 {
        font-size: 1.3rem;
    }

    .login-header h5 {
        font-size: 0.7rem;
        margin-top: 0.5rem;
        padding: 0;
    }

    .bank-details {
        padding: 0.75rem;
        margin-bottom: 0.75rem;
    }

    .bank-details label {
        font-size: 0.9rem;
    }

    .form-control {
        font-size: 16px; /* Prevents auto-zoom on iOS inputs */
        padding: 0.65rem 0.75rem 0.65rem 2.25rem;
    }

    .btn {
        padding: 0.65rem 1rem;
        font-size: 0.9rem;
    }
    
    /* Make form options stack on very small screens */
    .form-options {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .forgot-link {
        align-self: flex-end;
    }
}

/* Extra small devices */
@media (max-width: 400px) {
    .login-box {
        padding: 1rem;
    }
    
    .logo-icon {
        width: 45px;
        height: 45px;
        font-size: 1.1rem;
    }
    
    .login-header h1 {
        font-size: 1.2rem;
    }
    
    .login-header p {
        font-size: 0.8rem;
    }
    
    .bank-details h3 {
        font-size: 0.65rem;
    }
    
    .bank-details label {
        font-size: 0.85rem;
    }
}