/* --- 1. GLOBAL RESET AND TYPOGRAPHY --- */
* {
    /* Simple reset to make cross-browser styling easier */
    margin: 0;
    padding: 0;
    /* 🔑 CRITICAL: Ensures padding/border are included in the element's total width */
    box-sizing: border-box; 
}

/* 🔑 RESPONSIVE TYPOGRAPHY ROOT: Use REM for scaling */
html {
    /* Base font size for REM calculation (1rem = 16px) */
    font-size: 100%; 
}

body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    background-color: #ffffff;
    color: #333;
}

/* 🔑 RESPONSIVE IMAGES */
img {
    max-width: 100%; 
    height: auto; 
    display: block;
}

/* Helper class to center content and control width */
.container {
    max-width: 1200px;
    margin: 0 auto; /* Center the container horizontally */
    /* 🔑 FLUID PADDING: Use REM or smaller PX for responsiveness */
    padding: 0 1.25rem; /* 20px -> 1.25rem */
    width: 90%; /* Added for fluid width on small screens */
}

/* Padding for all main content sections (replaces SizedBox(height: 30)) */
.section-padding {
    /* 🔑 FLUID PADDING: Convert fixed pixels to REM */
    padding: 1.875rem 0; /* 30px -> 1.875rem (Removing 20px side padding as .container handles it) */
    margin-top: 0;
    margin-bottom: 1.875rem; /* 30px -> 1.875rem */
}

/* Root variables (can be used site-wide) */
:root {
    --primary-color: #880E4F; /* Flutter's _kPrimaryColor */
    --footer-bg: #000000;
    --text-light: #ffffff;
    --text-muted: #808080;
    --text-heading: #bfbfbf;
}

/* 🔑 RESPONSIVE SPACING UTILITIES (Using REM units) */
.spacer-5 { height: 0.3125rem; } /* 5px */
.spacer-10 { height: 0.625rem; } /* 10px */
.spacer-15 { height: 0.9375rem; } /* 15px */
.spacer-20 { height: 1.25rem; } /* 20px */
.spacer-30 { height: 1.875rem; } /* 30px */

.color-primary {
    color: var(--primary-color) !important;
}

/* 🔑 FLUID HEADINGS (Using clamp() for smooth scaling) */
h1 {
    font-size: clamp(2rem, 6vw, 3.5rem); 
    line-height: 1.1;
    margin-bottom: 0.5em;
}
h2 {
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    margin-bottom: 0.5em;
}
h3 {
    font-size: clamp(1.25rem, 3vw, 1.75rem);
    margin-bottom: 0.5em;
}


/* --- ADMIN MODAL STYLES (REQUIRED for JavaScript) --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: none; /* Hidden by default */
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

.modal-content {
    background: white;
    /* 🔑 FLUID PADDING: Convert fixed pixels to REM */
    padding: 1.875rem; /* 30px -> 1.875rem */
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    max-width: 400px;
    width: 90%; /* Fluid width on mobile */
}

.input-group {
    display: flex;
    align-items: center;
    /* 🔑 FLUID MARGIN/PADDING: Convert fixed pixels to REM */
    margin-bottom: 0.9375rem; /* 15px -> 0.9375rem */
    border: 1px solid #ccc;
    padding: 0.3125rem; /* 5px -> 0.3125rem */
    border-radius: 4px;
}

.input-group i {
    /* 🔑 FLUID MARGIN: Convert fixed pixels to REM */
    margin-right: 0.625rem; /* 10px -> 0.625rem */
    color: #555;
}

.modal-content input {
    border: none;
    outline: none;
    flex-grow: 1;
    /* 🔑 FLUID PADDING/FONT: Convert fixed pixels to REM/clamp() */
    padding: 0.5rem 0; /* 8px -> 0.5rem */
    font-size: clamp(0.875rem, 1.5vw, 1rem); /* Fluid font size for inputs */
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    /* 🔑 FLUID GAP/MARGIN: Convert fixed pixels to REM */
    gap: 0.625rem; /* 10px -> 0.625rem */
    margin-top: 1.25rem; /* 20px -> 1.25rem */
}

.btn {
    /* 🔑 FLUID PADDING: Convert fixed pixels to REM */
    padding: 0.625rem 0.9375rem; /* 10px 15px -> 0.625rem 0.9375rem */
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
}

.btn-cancel {
    background-color: #ddd;
    color: #333;
}

.btn-login {
    background-color: var(--primary-color);
    color: white;
}

/* 🔑 OPTIONAL: Media query to adjust container padding on small screens */
@media (max-width: 768px) {
    .container {
        padding: 0 1rem; /* Reduced padding on mobile */
    }
}