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

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

html, body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 18px;
    background: #F5F7FA;
    color: #2C3E50;
    line-height: 1.6;
    height: 100%;
}

/* App Container */
.app-container {
    display: flex;
    height: 100vh;
}

/* Sidebar Navigation */
.sidebar {
    width: 260px;
    background: #1A5F7A;
    color: white;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
}

.sidebar-brand {
    padding: 1.75rem 1.5rem;
    font-size: 1.4rem;
    font-weight: 700;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.sidebar-nav {
    list-style: none;
    padding: 1rem 0;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    color: rgba(255,255,255,0.9);
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 500;
    transition: all 0.2s;
}

.sidebar-link:hover {
    background: rgba(255,255,255,0.1);
    color: white;
}

.sidebar-link .icon {
    font-size: 1.4rem;
}

/* Main Content Area */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.top-header {
    background: white;
    border-bottom: 1px solid #E5E7EB;
    padding: 1.25rem 2rem;
    display: flex;
    justify-content: flex-end;
}

.header-right {
    font-size: 1.1rem;
    color: #1A5F7A;
    font-weight: 500;
}

.content {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
}

/* Cards */
.card {
    background: white;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    padding: 1.75rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

h1, h2, .card-header {
    font-size: 2rem;
    font-weight: 600;
    color: #2C3E50;
    margin-bottom: 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #E5E7EB;
}

h3 {
    font-size: 1.4rem;
    font-weight: 600;
    color: #2C3E50;
    margin-bottom: 0.75rem;
}

/* Buttons */
.btn, button {
    padding: 0.875rem 1.75rem;
    font-size: 1.1rem;
    font-weight: 500;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
}

.btn-primary {
    background: #00BCD4;
    color: white;
}

.btn-primary:hover {
    background: #00ACC1;
}

.btn-secondary {
    background: #95A5A6;
    color: white;
}

.btn-success {
    background: #27AE60;
    color: white;
}

.btn-danger {
    background: #E74C3C;
    color: white;
}

/* Forms */
.form-group {
    margin-bottom: 1.25rem;
}

.form-label {
    display: block;
    font-size: 1.1rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: #2C3E50;
}

.form-control, .form-select {
    width: 100%;
    padding: 0.875rem 1rem;
    font-size: 1.1rem;
    border: 1px solid #E5E7EB;
    border-radius: 6px;
    background: white;
    color: #2C3E50;
    min-height: 48px;
}

.form-control:focus, .form-select:focus {
    outline: none;
    border-color: #00BCD4;
    box-shadow: 0 0 0 3px rgba(0, 188, 212, 0.1);
}

/* Tables */
.table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    font-size: 1.05rem;
}

.table th {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    font-size: 1rem;
    color: #7F8C8D;
    background: #F8F9FA;
    border-bottom: 2px solid #E5E7EB;
}

.table td {
    padding: 1rem;
    border-bottom: 1px solid #E5E7EB;
}

.table tr:hover {
    background: #F8F9FA;
}

/* Stats Cards */
.stat-card {
    background: #F8F9FA;
    padding: 1.5rem;
    border-radius: 8px;
    text-align: center;
    border: 1px solid #E5E7EB;
}

.stat-number {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.stat-label {
    font-size: 1.05rem;
    color: #7F8C8D;
    font-weight: 500;
}

/* Action Cards */
.action-card {
    background: white;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    padding: 1.5rem;
    text-align: center;
    transition: all 0.2s;
}

.action-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    transform: translateY(-2px);
}

.action-icon {
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
}

.action-card h3 {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    border: none;
    padding: 0;
}

.action-card p {
    color: #7F8C8D;
    margin-bottom: 1rem;
    font-size: 1rem;
}

/* Badges */
.badge {
    display: inline-flex;
    padding: 0.5rem 1rem;
    font-size: 1rem;
    font-weight: 500;
    border-radius: 12px;
}

.badge-success {
    background: #D5F5E3;
    color: #27AE60;
}

.badge-warning {
    background: #FCF3CF;
    color: #F39C12;
}

.badge-danger {
    background: #FADBD8;
    color: #E74C3C;
}

/* Alerts */
.alert {
    padding: 1.25rem 1.5rem;
    border-radius: 6px;
    margin-bottom: 1.25rem;
    font-size: 1.05rem;
    border-left: 4px solid;
}

.alert-info {
    background: #EBF5FB;
    color: #2874A6;
    border-color: #00BCD4;
}

/* Estimate Display */
.estimate-container {
    background: white;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    padding: 2rem;
}

.estimate-header {
    text-align: center;
    padding-bottom: 1.5rem;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid #E5E7EB;
}

.estimate-header h2 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.estimate-line {
    display: flex;
    justify-content: space-between;
    padding: 0.875rem 0;
    border-bottom: 1px solid #E5E7EB;
    font-size: 1.15rem;
}

.estimate-line.total {
    font-size: 1.75rem;
    font-weight: 700;
    color: #00BCD4;
    border-top: 3px solid #00BCD4;
    margin-top: 1rem;
    padding-top: 1.25rem;
}

/* Utilities */
.d-flex { display: flex; }
.gap-2 { gap: 1rem; }
.text-center { text-align: center; }

/* Mobile Responsive */
@media (max-width: 768px) {
    html, body {
        font-size: 16px;
    }
    
    .app-container {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        height: auto;
    }
    
    .sidebar-nav {
        display: flex;
        overflow-x: auto;
        padding: 0;
    }
    
    .sidebar-link {
        flex-direction: column;
        gap: 0.25rem;
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
        min-width: 80px;
    }
    
    .sidebar-link .icon {
        font-size: 1.5rem;
    }
    
    .sidebar-brand {
        padding: 1rem 1.5rem;
        font-size: 1.25rem;
    }
    
    .content {
        padding: 1rem;
    }
    
    .card {
        padding: 1.25rem;
    }
    
    h1, h2 {
        font-size: 1.5rem;
    }
    
    .btn {
        width: 100%;
        margin-bottom: 0.5rem;
    }
    
    .action-card {
        padding: 1.25rem;
    }
    
    .table {
        font-size: 0.95rem;
    }
    
    .table th, .table td {
        padding: 0.75rem 0.5rem;
    }
}

/* Tablet */
@media (min-width: 769px) and (max-width: 1024px) {
    .sidebar {
        width: 220px;
    }
    
    .content {
        padding: 1.25rem;
    }
}

/* ============================================
   TYPOGRAPHY SYSTEM - WCAG Accessibility
   ============================================ */

/* Typography Scale (Base: 18px) */
:root {
    --font-size-xs: 0.778rem;    /* 14px - minimum for small labels */
    --font-size-sm: 0.889rem;    /* 16px - small text */
    --font-size-base: 1rem;      /* 18px - body text */
    --font-size-md: 1.111rem;    /* 20px - emphasized text */
    --font-size-lg: 1.333rem;    /* 24px - h3, subheadings */
    --font-size-xl: 1.556rem;    /* 28px - h2, section titles */
    --font-size-2xl: 1.778rem;   /* 32px - h1, page titles */
    --font-size-3xl: 2.222rem;   /* 40px - hero titles */
    
    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 0.75rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    --spacing-2xl: 3rem;
}

/* Headings - Accessible Sizes */
h1, .h1 {
    font-size: var(--font-size-2xl) !important;  /* 32px */
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: var(--spacing-lg);
    color: #00BCD4;
}

h2, .h2 {
    font-size: var(--font-size-xl) !important;   /* 28px */
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: var(--spacing-md);
    color: #2C3E50;
}

h3, .h3 {
    font-size: var(--font-size-lg) !important;   /* 24px */
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: var(--spacing-sm);
    color: #333;
}

h4, .h4 {
    font-size: var(--font-size-md) !important;   /* 20px */
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: var(--spacing-sm);
    color: #444;
}

/* Body Text */
p, .body-text {
    font-size: var(--font-size-base);  /* 18px */
    line-height: 1.6;
    margin-bottom: var(--spacing-md);
}

/* Small Text - Never below 14px */
.text-small, small, .help-text {
    font-size: var(--font-size-xs) !important;  /* 14px minimum */
    line-height: 1.5;
}

/* Form Elements - Readable */
.form-control, .form-select, input, select, textarea {
    font-size: var(--font-size-base) !important;  /* 18px */
    padding: 0.625rem 0.875rem;
}

label {
    font-size: var(--font-size-base);  /* 18px */
    font-weight: 500;
    margin-bottom: var(--spacing-xs);
    display: block;
}

/* Buttons - Readable */
.btn, button {
    font-size: var(--font-size-base) !important;  /* 18px */
    padding: 0.75rem 1.5rem;
    font-weight: 500;
}

/* Tables - Readable */
.table th, .settings-table th {
    font-size: var(--font-size-base);  /* 18px */
    font-weight: 600;
}

.table td, .settings-table td {
    font-size: var(--font-size-base);  /* 18px */
}

/* Cards - Proper Spacing */
.settings-card, .card {
    padding: var(--spacing-xl);
    margin-bottom: var(--spacing-lg);
}

.settings-card h3, .card h3 {
    font-size: var(--font-size-lg) !important;  /* 24px */
    margin-bottom: var(--spacing-xs);
}

.settings-card .help-text {
    font-size: var(--font-size-sm) !important;  /* 16px - slightly larger for readability */
    color: #666;
    margin-bottom: var(--spacing-md);
    padding-bottom: var(--spacing-md);
    border-bottom: 1px solid #eee;
}

/* Navigation Section Headers */
.nav-section-title {
    font-size: var(--font-size-xs) !important;  /* 14px */
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: rgba(255,255,255,0.5);
    font-weight: 600;
    padding: 0.5rem 1.5rem;
    margin-top: 1rem;
}

/* Tier Badges - Readable */
.tier-badge {
    font-size: var(--font-size-sm) !important;  /* 16px */
    padding: 0.375rem 1rem;
}

/* Input Groups */
.input-prefix, .input-suffix {
    font-size: var(--font-size-base);  /* 18px */
}

