/* ==========================================
           BWIS DASHBOARD THEME STYLES
           ========================================== */
:root {
    --bwis-bg: #e3d8d8;
    /* Soft light sage background */
    --bwis-card-bg: #e8e2e2;
    /* Inner card container */
    --bwis-white: #ffffff;
    /* Pure white for inputs/boxes */
    --bwis-dark: #1a202c;
    /* Primary dark text/buttons */
    --bwis-green: #d32f2f;
    /* Emerald accent color */
    --bwis-green-hover: #b71c1c;
    /* Hover accent */
    --bwis-text-muted: #64748b;
    /* Muted gray text */
    --bwis-border: #c3d1c8;
    /* Subtle card border */
}



body {
    background-color: #e3e5e9;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--bwis-dark);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 20px;
}

/* Login Card Container */
.login-container {
    width: 100%;
    max-width: 440px;
}

.login-box {
    background: linear-gradient(135deg, #f8fafc 0%, #d1d5db 25%, #ffffff 50%, #cbd5e1 75%, #f1f5f9 100%);
    border-radius: 16px;
    padding: 32px 28px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--bwis-border);
}

/* Top Home Link */
.home-link {
    color: var(--bwis-dark) !important;
    font-size: 13px;
    font-weight: 700;
    transition: opacity 0.2s;
}

.home-link:hover {
    opacity: 0.7;
}

/* Header Logo & Titles */
.login-header h2 {
    font-weight: 900;
    font-size: 26px;
    color: var(--bwis-dark);
    margin-top: 10px;
    margin-bottom: 2px;
    letter-spacing: -0.5px;
}

.login-subtitle {
    font-size: 13px;
    color: var(--bwis-text-muted);
    font-weight: 600;
    margin-bottom: 0;
}

/* Tabs (Email / Phone) */
.login-tabs-wrapper {
    display: flex;
    border-bottom: 2px solid var(--bwis-border);
    margin-bottom: 24px;
}

.login-tab {
    flex: 1;
    padding: 10px 0;
    font-weight: 800;
    font-size: 14px;
    color: var(--bwis-text-muted);
    cursor: pointer;
    text-align: center;
    position: relative;
    transition: all 0.2s ease;
}

.login-tab.active {
    color: var(--bwis-dark);
}

.login-tab.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: var(--bwis-green);
    border-radius: 3px 3px 0 0;
}

/* Custom Alert Styling */
.custom-alert {
    background-color: #fee2e2;
    border: 1px solid #fca5a5;
    color: #991b1b;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

.custom-alert .alert-close {
    margin-left: auto;
    cursor: pointer;
}

/* Inputs Wrapper & Form Elements */
.login-input-wrapper {
    background-color: var(--bwis-white);
    border: 1px solid var(--bwis-border);
    border-radius: 8px;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    transition: border-color 0.2s ease;
}

.login-input-wrapper:focus-within {
    border-color: var(--bwis-green);
}

.login-input-wrapper i {
    color: #94a3b8;
    font-size: 15px;
}

.login-input {
    border: none;
    outline: none;
    background: transparent;
    width: 100%;
    font-size: 14px;
    font-weight: 600;
    color: var(--bwis-dark);
    padding: 0;
}

.login-input::placeholder {
    color: #cbd5e1;
    font-weight: 500;
}

/* Action Buttons */
.signin-btn {
    width: 100%;
    background: linear-gradient(135deg, #5a0f1d 0%, #801429 25%, #b3243c 50%, #801429 70%, #5a0f1d 100%);
    flex: 1;
    color: #ffffff;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.4), inset 0 1px 2px rgba(255, 255, 255, 0.25), 0 0 10px rgba(179, 36, 60, 0.4);
    border: none;
    border-radius: 8px;
    padding: 12px 0;
    font-size: 15px;
    font-weight: 800;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.1s ease;
}

.signin-btn:hover {
    background-color: var(--bwis-green-hover);
}

.signin-btn:active {
    transform: scale(0.99);
}

.loadingMore {
    background-color: #cbd5e1;
    color: #64748b;
    cursor: not-allowed;
    box-shadow: none;
}

/* Links (Forgot Password / Register) */
.auth-footer-links {
    font-size: 13px;
    font-weight: 600;
    color: var(--bwis-text-muted);
}

.auth-footer-links a {
    color: var(--bwis-dark);
    text-decoration: none;
    font-weight: 800;
}

.auth-footer-links a.primary-blue {
    color: #d32f2f;
    /* Deep green highlighting for Register */
    text-decoration: underline;
}

.auth-footer-links a:hover {
    opacity: 0.8;
}

/* Container & Split Layout Card */
.auth-container {
    width: 100%;
    max-width: 980px;
}

.auth-card {
    background: var(--bwis-card-bg);
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(18, 24, 36, 0.08);
    display: grid;
    grid-template-columns: 0.85fr 1.15fr;
}

@media (max-width: 850px) {
    .auth-card {
        grid-template-columns: 1fr;
    }

    .hero-panel {
        display: none;
        /* Collapses hero on small screens */
    }
}

/* Hero Panel (Left Side) */
.hero-panel {
    background: linear-gradient(135deg, #1a080c 0%, #331018 100%);
    padding: 48px;
    color: #ffffff;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
}

.hero-panel::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(179, 36, 60, 0.15) 0%, rgba(0, 0, 0, 0) 60%);
    pointer-events: none;
}

.hero-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.hero-brand img {
    width: 60px;
    height: auto;
}

.hero-brand h3 {
    font-size: 28px;
    font-weight: 800;
    margin: 0;
    letter-spacing: -0.5px;
}

.hero-body h1 {
    font-size: 32px;
    font-weight: 800;
    line-height: 1.25;
    margin-bottom: 16px;
}

.hero-body p {
    color: #94a3b8;
    font-size: 14px;
    line-height: 1.6;
}

.hero-features {
    list-style: none;
    padding: 0;
    margin: 24px 0 0 0;
}

.hero-features li {
    font-size: 13px;
    font-weight: 600;
    color: #cbd5e1;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.hero-features li i {
    color: var(--bwis-green);
}

.hero-footer {
    font-size: 12px;
    color: #64748b;
}

/* Form Area (Right Side) */
.form-panel {
    padding: 44px 40px;
    background: #ffffff;
}

.form-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.form-header h2 {
    font-size: 24px;
    font-weight: 800;
    margin: 0;
    letter-spacing: -0.5px;
}

.home-link {
    color: var(--bwis-dark);
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: opacity 0.2s;
}

.home-link:hover {
    opacity: 0.7;
}

/* Input Grid Layout */
.form-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
}

@media (max-width: 520px) {
    .form-grid {
        grid-template-columns: 1fr;
    }

    .form-panel {
        padding: 30px 20px;
    }
}

.full-width {
    grid-column: 1 / -1;
}

/* Clean Modern Input Field Wrapper */
.input-group-custom {
    background: #f8fafc;
    border: 1px solid var(--bwis-border);
    border-radius: 12px;
    padding: 10px 14px;
    display: flex;
    align-items: center;
    transition: all 0.2s ease;
}

.input-group-custom:focus-within {
    background: #ffffff;
    border-color: var(--bwis-green);
    box-shadow: 0 0 0 4px rgba(0, 208, 108, 0.12);
}

.input-group-custom i.icon-left {
    color: #94a3b8;
    font-size: 14px;
    margin-right: 12px;
}

.input-custom {
    border: none;
    outline: none;
    background: transparent;
    width: 100%;
    font-size: 13.5px;
    font-weight: 600;
    color: var(--bwis-dark);
}

.input-custom::placeholder {
    color: #94a3b8;
    font-weight: 400;
}

select.input-custom {
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
}

/* Action Button */
.btn-submit {
    width: 100%;
    background: linear-gradient(135deg, #5a0f1d 0%, #801429 25%, #b3243c 50%, #801429 70%, #5a0f1d 100%);
    flex: 1;
    color: #ffffff;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.4), inset 0 1px 2px rgba(255, 255, 255, 0.25), 0 0 10px rgba(179, 36, 60, 0.4);
    border: none;
    border-radius: 12px;
    padding: 14px 0;
    font-size: 15px;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 14px rgba(0, 208, 108, 0.25);
}

.btn-submit:hover {
    background-color: var(--bwis-green-hover);
    transform: translateY(-1px);
}

.btn-submit:active {
    transform: translateY(0);
}

/* Alerts */
.custom-alert {
    background-color: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
    padding: 10px 14px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

.custom-alert.alert-success {
    background-color: #ecfdf5;
    border-color: #a7f3d0;
    color: #065f46;
}

.custom-alert .alert-close {
    margin-left: auto;
    cursor: pointer;
}

/* Footer Links */
.auth-footer {
    margin-top: 20px;
    text-align: center;
    font-size: 13px;
    font-weight: 600;
    color: var(--bwis-text-muted);
}

.auth-footer a {
    color: #991b1b;
    text-decoration: underline;
    font-weight: 800;
}