:root {
    --primary-color: #800000;
    --primary-hover: #660000;
    --bg-color: #F3F4F6;
    --card-bg: #FFFFFF;
    --text-main: #111827;
    --text-muted: #6B7280;
    --border-color: #E5E7EB;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --radius: 0.75rem;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

/* Glassmorphism Background Pattern */
body::before {
    content: '';
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 50% 50%, rgba(128, 0, 0, 0.1) 0%, transparent 50%),
                radial-gradient(circle at 80% 20%, rgba(165, 42, 42, 0.1) 0%, transparent 40%);
    z-index: -1;
}

.login-container {
    width: 100%;
    max-width: 28rem;
    padding: 1.5rem;
}

.login-card {
    background-color: var(--card-bg);
    border-radius: var(--radius);
    padding: 2.5rem;
    box-shadow: var(--shadow-lg);
    border: 1px solid rgba(255,255,255,0.6);
    backdrop-filter: blur(10px);
}

.logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 1.5rem;
}

.logo-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--primary-color), #B22222);
    border-radius: 12px;
    margin-bottom: 1rem;
    box-shadow: var(--shadow-md);
}

.logo h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-main);
}

.subtitle {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.875rem;
    margin-bottom: 2rem;
}

.oauth-section {
    display: flex;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 1.5rem 0;
    color: var(--text-muted);
    font-size: 0.875rem;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid var(--border-color);
}

.divider span {
    padding: 0 1rem;
}

.fallback-login-form .input-group {
    margin-bottom: 1.25rem;
}

.fallback-login-form label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--text-main);
}

.fallback-login-form input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    font-size: 1rem;
    transition: all 0.2s ease;
    outline: none;
}

.fallback-login-form input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(128, 0, 0, 0.1);
}

.btn-primary {
    width: 100%;
    padding: 0.75rem 1rem;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 0.5rem;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.1s ease;
    box-shadow: var(--shadow-md);
}

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

.btn-primary:active {
    transform: translateY(1px);
}

.btn-logout {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.4rem 1rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--primary-color);
    background-color: transparent;
    border: 1.5px solid var(--primary-color);
    border-radius: 9999px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.btn-logout:hover {
    background-color: var(--primary-color);
    color: #fff;
    box-shadow: 0 4px 6px -1px rgba(128, 0, 0, 0.2);
    text-decoration: none;
}

.footer-text {
    text-align: center;
    margin-top: 1.5rem;
    font-size: 0.875rem;
    color: var(--text-muted);
}

.footer-text a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

.footer-text a:hover {
    text-decoration: underline;
}

/* Mobile Responsiveness */
@media screen and (max-width: 640px) {
    .login-container, .dashboard-container {
        padding: 1rem !important;
    }
    .login-card {
        padding: 1.5rem !important;
    }
    
    /* Login Page Overrides */
    .logo img {
        width: 48px !important;
        height: 48px !important;
    }
    .logo h2 {
        font-size: 1.25rem !important;
        text-align: center;
    }

    /* Dashboard Header Overrides */
    .header {
        flex-direction: column !important;
        align-items: center !important;
        gap: 1rem;
        text-align: center;
    }
    .header .logo {
        flex-direction: column !important;
        margin-bottom: 0 !important;
    }
    .header > a {
        align-self: center !important;
        background: #F1F5F9;
        padding: 0.5rem 1rem;
        border-radius: 0.5rem;
        width: 100%;
        text-align: center;
    }

    /* User Profile Section */
    .user-info {
        flex-direction: column !important;
        text-align: center !important;
    }
    .user-info img, .user-info > div:first-child {
        margin: 0 auto !important;
    }
    .user-info h3 {
        text-align: center !important;
        font-size: 1.1rem !important;
    }
    .user-info p {
        text-align: center !important;
    }

    /* Credentials Box */
    .credentials-box {
        padding: 1rem !important;
    }
    
    .status-card {
        padding: 1rem !important;
    }
}
