/* ========================================
   GLOBAL DESIGN SYSTEM
   ======================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&display=swap');

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

body {
    font-family: 'Inter', Arial, sans-serif;
    line-height: 1.6;
    color: #353432;
    background-color: #fff;
}

/* ========================================
   TYPOGRAPHY
   ======================================== */

h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #353432;
    margin-bottom: 1rem;
}

h2 {
    font-size: 1.4rem;
    font-weight: 500;
    color: #353432;
    margin-bottom: 1.5rem;
}

p {
    font-size: 1rem;
    color: #666;
    margin-bottom: 1rem;
    line-height: 1.5;
}

/* ========================================
   LAYOUT COMPONENTS
   ======================================== */

header {
    background-color: #fff;
    border-bottom: 1px solid #e0e0e0;
    padding: 1.25rem 2rem;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.nav-container {
    display: flex;
    align-items: center;
    position: relative;
}

/* hide the burger menu on desktop */
.burger-menu {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}

.navbar a {
    text-decoration: none;
    color: #333;
    font-size: 0.9rem;
    font-weight: 500;
    padding: 0.5rem 0;
    transition: color 0.2s ease;
}

.navbar a:hover {
    color: #000;
    border-bottom: 2px solid #000;
}

/* position logo on the left */
.logo-container {
    position: absolute;
    left: 2rem;
}

.header-logo {
    height: 40px;
    width: auto;
}

/* position login/logout button on the right */
header form {
    position: absolute;
    right: 2rem;
}

.container {
    padding: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

/* ========================================
   FORM COMPONENTS
   ======================================== */

input, select {
    width: 100%;
    padding: 0.75rem 0.85rem;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    font-size: 0.95rem;
    background: #fff;
    color: #353432;
    transition: all 0.2s ease;
    margin-bottom: 1rem;
}

input:focus, select:focus {
    outline: none;
    border-color: #353432;
}

input::placeholder {
    color: #999;
}

label {
    display: block;
    font-size: 0.9rem;
    font-weight: 500;
    color: #353432;
    margin-bottom: 0.5rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

input[type="radio"], input[type="checkbox"] {
    width: auto;
    margin-right: 0.5rem;
    margin-bottom: 0;
}

input[type="checkbox"] {
    transform: scale(1.1);
}

.radio-group {
    display: flex;
    gap: 1rem;
    align-items: center;
    margin-bottom: 1rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    font-size: 0.9rem;
    color: #353432;
    cursor: pointer;
}

/* ========================================
   BUTTONS
   ======================================== */

button, .btn {
    background-color: #353432;
    color: #fff;
    border: none;
    padding: 0.875rem 2rem;
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    border-radius: 40px;
    transition: all 0.2s ease;
}

button:hover, .btn:hover {
    background-color: #5f5f5e;
}

.btn-login {
    background-color: #ffffff;
    border: 1px solid #000000;
    color: #000000;
    padding: 0.65rem 1.8rem;

}
.btn-login:hover {
    background-color: #00000025;
}
.view-details-btn, .hide-details-btn {
    background-color: #ffffff;
    border: 1px solid #000000;
    color: #000000;
    padding: 0.65rem 1.8rem;

}

.view-details-btn:hover, .hide-details-btn:hover {
    background-color: #00000025;
}

/* ========================================
   MESSAGES
   ======================================== */

.error {
    padding: 0.75rem 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
    text-align: center;
}

.success {
    padding: 0.75rem 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    background: #f0fdf4;
    color: #16a34a;
    border: 1px solid #bbf7d0;
    text-align: center;
}

/* ========================================
   TABLES
   ======================================== */

table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1.5rem;
}

th {
    background: #f8f9fa;
    padding: 0.75rem 0.5rem;
    text-align: left;
    font-size: 0.8rem;
    font-weight: 600;
    color: #353432;
    border-bottom: 1px solid #e0e0e0;
}

td {
    padding: 0.75rem 0.5rem;
    font-size: 0.85rem;
    color: #353432;
    border-bottom: 1px solid #f0f0f0;
}

/* ========================================
   LAYOUT SYSTEM
   ======================================== */

.page-header {
    text-align: center;
    margin-bottom: 3rem;
}

.page-header h1 {
    margin-bottom: 0.75rem;
}

.page-header p {
    font-size: 1.1rem;
    color: #666;
    font-weight: 400;
}

.two-column-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 3rem 2rem;
    min-height: 80vh;
}

.two-column-layout .page-header {
    grid-column: 1 / 3;
}

.input-area {
    background: #fff;
    padding: 2.1rem;
    border-radius: 14px;
    border: 1px solid #e0e0e0;
    height: fit-content;
}

.results-card {
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    padding: 2.1rem;
    border: 1px solid #f0f0f0;
    height: fit-content;
    position: sticky;
    top: 2rem;
}

.result-summary {
    background: #e8eff8;
    padding: 1.5rem;
    border-radius: 10px;
    margin-bottom: 2rem;
}

.result-summary p {
    margin: 0 0 0.5rem 0;
    font-size: 0.95rem;
    color: #353432;
}

.result-summary strong {
    color: #353432;
    font-weight: 600;
}

.result-value {
    display: inline;
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0;
    margin-left: 0.20rem;
}

.table-note {
    font-size: 0.75rem;
    color: #666;
    margin-top: 1rem;
    line-height: 1.4;
}

.empty-state {
    color: #666;
    font-style: italic;
    text-align: center;
    padding: 2rem;
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */

@media (max-width: 1023px) and (min-width: 769px) {
    .two-column-layout {
        max-width: 1000px;
        padding: 2.5rem 1.5rem;
    }
    
    .input-area,
    .results-card {
        padding: 2rem;
    }
    
    .page-header h1 {
        font-size: 2.2rem;
    }
}

@media (max-width: 768px) {
    .two-column-layout {
        grid-template-columns: 1fr;
        gap: 2rem;
        padding: 2rem 1rem;
    }
    
    .two-column-layout .page-header {
        grid-column: 1;
    }
    
    .page-header h1 {
        font-size: 2rem;
    }
    
    .results-card {
        position: static;
    }
    
    .input-area,
    .results-card {
        padding: 2rem;
    }
}

/* large screens (≥1440px) - expand layout with breathing room */
@media (min-width: 1440px) {
    .container {
        max-width: 1350px;
    }
    
    .two-column-layout {
        max-width: 1350px;
        gap: 4rem;
        padding: 3.5rem 2.5rem;
    }
    
    .input-area,
    .results-card {
        padding: 3rem;
    }
    
    .page-header h1 {
        font-size: 2.8rem;
    }
    
    .page-header p {
        font-size: 1.2rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    p {
        font-size: 1.05rem;
    }
    
    input, select {
        padding: 1rem 1.2rem;
        font-size: 1rem;
    }
    
    button, .btn {
        padding: .75rem 1.8rem;
        font-size: 1.1rem;
    }
}

/* ========================================
   PAGE-SPECIFIC STYLES
   ======================================== */

.dashboard-carousel {
    width: 100%;
    height: 33.33vh;
    text-align: center;
    background-color: #fafafa;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

/* shared chart canvas styling */
.chart-canvas {
    max-width: 100%;
    height: auto;
}

/* responsive bar chart container */
.chart {
    position: relative;
    width: 100%;
    height: 400px;
    margin-bottom: 1rem;
}

/* responsive chart sizing for all chart types */
@media (max-width: 768px) {
    .chart {
        height: 350px;
    }
    
    .chart-canvas {
        max-height: 300px;
    }
}

@media (max-width: 480px) {
    .chart {
        height: 300px;
        min-height: 300px;
    }
    
    .chart-canvas {
        max-height: 250px;
    }
}

/* ========================================
   AUTH PAGES STYLES (login, signup)
   ======================================== */

.auth-card {
    max-width: 400px;
    margin: 0 auto;
}

/* ========================================
   FOOTER STYLES
   ======================================== */

footer {
    background-color: #ffffff;
    border-top: 1px solid #e0e0e0;
    padding: 3rem 2rem 2rem 2rem;
    margin-top: 4rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

.footer-nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.footer-nav a {
    text-decoration: none;
    color: #353432;
    font-size: 0.95rem;
    font-weight: 500;
    padding: 0.5rem 0;
    transition: all 0.2s ease;
}

.footer-nav a:hover {
    color: #666;
    text-decoration: underline;
}

/* footer responsive styles */
@media (max-width: 768px) {
    footer {
        padding: 2rem 1rem;
        margin-top: 3rem;
    }
    
    .footer-content h3 {
        font-size: 1.3rem;
        margin-bottom: 1.5rem;
    }
    
    .footer-nav ul {
        flex-direction: column;
        gap: 1rem;
    }
    
    .footer-nav a {
        font-size: 0.9rem;
    }
}

/* Mobile Nav Bar Burger Menu */ 
@media (max-width: 768px) {
    .burger-menu {
        display: block;
        background-color: #ffffff;
        border: 1px solid #000000;
        color: #000000;
 
    }
    
    .nav-links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        background-color: #fff;
        border: 1px solid #e0e0e0;
        padding: 1rem;

    }
    
    .nav-links.show {
        display: flex;
    }
    

}