/* === Universal Styles & Variables === */
:root {
    /* -- Light Theme Palette -- */
    --bg-color: #f7f7f8;
    --ui-color: #ffffff;
    --ui-hover-color: #f0f2f4;
    --text-primary: #202124;
    --text-secondary: #5f6368;
    --border-color: #d3d5d7;
    --accent-color: #1a73e8;
    --shadow-color: rgba(0, 0, 0, 0.05);
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    min-height: 100vh;
    /* Padding is removed from the body to allow the header to be full-width */
}

/* Main container for page content */
.main-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.header-text-container {
    text-align: center;
}

/* Utility to hide elements */
.hidden {
    display: none !important;
}

/* === Login Page Specific Styles (Floating Design) === */

#login-page .main-content {
    gap: 80px;
    justify-content: center;
    flex-grow: 1; 
    padding: 2rem;
}

#login-page .login-title {
    font-size: 2.75rem;
    font-weight: 500;
    margin-bottom: 0.75rem;
}

#login-page .login-subtitle {
    font-size: 1.125rem;
    color: var(--text-secondary);
}

#login-page #auth-container {
    width: 100%;
    max-width: 360px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

#login-page #loginButton {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    background-color: var(--ui-color);
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 500;
    width: 100%;
    padding: 14px 20px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

#login-page #loginButton:hover {
    background-color: var(--ui-hover-color);
}

#login-page .btn-icon {
    width: 20px;
    height: 20px;
}

#login-page .loader {
    width: 28px;
    height: 28px;
    border: 4px solid var(--ui-hover-color);
    border-bottom-color: var(--text-primary);
    border-radius: 50%;
    display: inline-block;
    box-sizing: border-box;
    animation: rotation 1s linear infinite;
    margin-top: 1.5rem;
}

@keyframes rotation {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}


/* === Report Selection Page Specific Styles (Minimalist List) === */

#select-report-page .main-content {
    gap: 60px;
    max-width: 900px;
    flex-grow: 1;
    justify-content: center;
    padding: 0 2rem 2rem 2rem; /* Add horizontal and bottom padding */
}

#select-report-page .greeting-title {
    font-size: 2.75rem;
    font-weight: 500;
    margin-bottom: 0.75rem;
}

#select-report-page .greeting-subtitle {
    font-size: 1.125rem;
    color: var(--text-secondary);
}

/* Changed from grid to flex column for a list layout */
#select-report-page .report-list-container {
    width: 100%;
    display: flex;
    flex-direction: column;
    background-color: var(--ui-color);
    border: 1px solid var(--border-color);
    border-radius: 12px;
}

/* Updated styles for list items instead of cards */
#select-report-page .report-card {
    display: flex;
    flex-direction: row; /* Align icon and text horizontally */
    align-items: center;
    gap: 1.5rem;
    padding: 1.25rem 1.5rem;
    text-decoration: none;
    color: inherit;
    border-bottom: 1px solid var(--border-color);
    transition: background-color 0.2s ease;
}

/* Remove border from the last item in the list */
#select-report-page .report-card:last-child {
    border-bottom: none;
}

#select-report-page .report-card:hover {
    background-color: var(--ui-hover-color);
}

#select-report-page .report-card-title {
    font-size: 1.125rem;
    font-weight: 500;
    color: var(--text-primary);
}

#select-report-page .report-card-description {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* === Universal Header Styles === */
.page-header {
    width: 100%;
    padding: 2rem; /* Give the header its own padding */
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-brand {
    font-weight: 500;
    color: var(--text-secondary);
    text-decoration: none;
}

.header-user-info {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.user-info {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.logout-btn {
    background: none;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s ease;
    text-decoration: none;
}

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

/* === Report Page Specific Styles (Updated for Full Screen) === */

#report-page {
    padding: 0; /* Remove body padding */
    height: 100vh; /* Make body full viewport height */
    overflow: hidden; /* Prevent scrolling */
}

#report-page .page-header {
    padding: 1rem 2rem;
    background-color: var(--ui-color);
    border-bottom: 1px solid var(--border-color);
    flex-shrink: 0; /* Prevent header from shrinking */
}

#report-page .main-content {
    padding: 0; /* Remove padding from main content area */
    flex-grow: 1; /* Make it fill remaining vertical space */
    max-width: 100%; /* Allow it to be full width */
}

#report-page #reportContainer {
    width: 100%;
    height: 100%;
    border: none; /* Remove border */
    border-radius: 0; /* Remove border-radius */
    background-color: var(--ui-color);
    display: flex;
    justify-content: center;
    align-items: center;
}

#report-page #reportContainer > iframe {
    border: none;
    width: 100%;
    height: 100%;
    border-radius: 0;
}

/* Consistent loader style for report page */
#report-page .loader {
    width: 32px;
    height: 32px;
    border: 4px solid var(--ui-hover-color);
    border-bottom-color: var(--text-primary);
    border-radius: 50%;
    display: inline-block;
    box-sizing: border-box;
    animation: rotation 1s linear infinite;
}

/* === STYLES FOR BIG SCREENS (NEW) === */
@media (min-width: 1200px) {
    /* Make login title 20% bigger */
    #login-page .login-title {
        font-size: 3.1rem; /* 2.75rem * 1.2 */
    }

    /* Shift the login content block up from the center */
    #login-page .main-content {
        transform: translateY(-5vh);
    }
}