/* ==========================================================================
   COMPLETE STYLE.CSS - Merged with All Features
   Includes dropdown menu support and all GitHub styles
   ========================================================================== */

/* ==========================================================================
   1. RESET AND BASE STYLES
   ========================================================================== */

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: #f5f7fa;
    color: #2d3748;
    line-height: 1.6;
}

.app-container {
    max-width: 1400px;
    margin: 0 auto;
    background-color: white;
    min-height: 100vh;
    box-shadow: 0 0 20px rgba(0,0,0,0.1);
    position: relative;  /* Add this line */
}

/* ==========================================================================
   2. HEADER STYLES - UPDATED WITH DROPDOWN MENU SUPPORT
   ========================================================================== */

header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1rem 0;  /* Changed from "1rem 2rem" */
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    /* Add these lines to break out of the container */
    margin-left: calc(-50vw + 50%);
    margin-right: calc(-50vw + 50%);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;  /* Add padding here instead */
}

/* Header Left Section */
.header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
}

.header-logo {
    flex-shrink: 0;
}

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

.header-title {
    font-size: 1.5rem;
    font-weight: 500;
    color: white;
    margin: 0;
}

/* Header Controls - NEW DROPDOWN MENU STRUCTURE */
.header-controls {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

/* Desktop Menu - Alternative to header-controls */
.desktop-menu {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

/* Hide old header-actions to prevent conflicts */
.header-actions {
    display: none !important;
}

/* ==========================================================================
   3. DROPDOWN MENU STYLES - NEW
   ========================================================================== */

.dropdown-menu {
    position: relative;
}

/* Dropdown Toggle Button */
.dropdown-toggle {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 0.5rem;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    transition: all 0.2s ease;
    font-family: inherit;
}

.dropdown-toggle:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
}

.dropdown-toggle.active {
    background: rgba(255, 255, 255, 0.4);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.dropdown-toggle svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
    pointer-events: none;
}

/* Dropdown Content */
.dropdown-content {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: white;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    min-width: 200px;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

.dropdown-content.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Grid Menu Style for Project Functions */
.dropdown-content.grid-menu {
    min-width: 320px;
    padding: 1rem;
}

.grid-menu-items {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
}

.grid-menu-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1rem 0.5rem;
    border: none;
    background: none;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.2s ease;
    text-align: center;
    font-family: inherit;
}

.grid-menu-item:hover {
    background: #f3f4f6;
    transform: translateY(-2px);
}

.grid-menu-item svg {
    width: 32px;
    height: 32px;
    margin-bottom: 0.5rem;
    color: #667eea;
}

.grid-menu-item span {
    font-size: 0.75rem;
    color: #374151;
    font-weight: 500;
}

/* Regular Dropdown Items */
.dropdown-item {
    width: 100%;
    padding: 0.75rem 1rem;
    border: none;
    background: none;
    text-align: left;
    color: #374151;
    cursor: pointer;
    transition: background-color 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.875rem;
    font-family: inherit;
}

.dropdown-item:hover {
    background-color: #f9fafb;
}

.dropdown-item:first-child {
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
}

.dropdown-item:last-child {
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
}

.dropdown-item:not(:last-child) {
    border-bottom: 1px solid #f3f4f6;
}

.dropdown-item svg {
    width: 20px;
    height: 20px;
    opacity: 0.6;
    flex-shrink: 0;
}

.dropdown-divider {
    height: 1px;
    background-color: #e5e7eb;
    margin: 0.25rem 0;
}

/* User Badge Button */
.user-badge {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid rgba(255, 255, 255, 0.3);
    font-family: inherit;
}

.user-badge:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
}

.user-badge.active {
    background: rgba(255, 255, 255, 0.4);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* ==========================================================================
   4. MOBILE MENU STYLES
   ========================================================================== */

.mobile-menu {
    display: none;
    position: relative;
}

.mobile-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    min-width: 200px;
    z-index: 1000;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

.mobile-dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* ==========================================================================
   5. BUTTON STYLES
   ========================================================================== */

.btn {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    font-family: inherit;
}

.btn-primary {
    background-color: #4f46e5;
    color: white;
}

.btn-primary:hover {
    background-color: #4338ca;
    transform: translateY(-1px);
}

.btn-secondary {
    background-color: rgba(255,255,255,0.2);
    color: white;
    border: 1px solid rgba(255,255,255,0.3);
}

.btn-secondary:hover {
    background-color: rgba(255,255,255,0.3);
}

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

.btn-danger:hover {
    background-color: #b91c1c;
}

.btn-small {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
}

.btn-icon {
    padding: 0.5rem;
    background-color: rgba(255,255,255,0.2);
    color: white;
    border: 1px solid rgba(255,255,255,0.3);
}

.btn-icon:hover {
    background-color: rgba(255,255,255,0.3);
}

.btn-icon svg {
    width: 20px;
    height: 20px;
}

.close-settings-btn {
    position: absolute;
    right: 2rem;
    top: 50%;
    transform: translateY(-50%);
    background-color: transparent !important;
    border: none !important;
    color: #374151;
    padding: 0.5rem;
    flex-shrink: 0;
}

.close-settings-btn:hover {
    background-color: rgba(0,0,0,0.05) !important;
    transform: translateY(-50%);
}

.close-settings-btn svg {
    width: 24px;
    height: 24px;
}

/* ==========================================================================
   6. USER VIEW STYLES
   ========================================================================== */

.user-view {
    display: none;
    height: calc(100vh - 80px);
    background: white;
}

.user-header {
    background-color: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    padding: 1.5rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
}

.user-header h1 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #374151;
}

.user-container {
    display: flex;
    height: calc(100vh - 140px);
}

.user-sidebar {
    width: 280px;
    background-color: #f8fafc;
    border-right: 1px solid #e2e8f0;
    padding: 1.5rem 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.user-nav-btn {
    background: none;
    border: none;
    padding: 1rem 1.5rem;
    text-align: left;
    cursor: pointer;
    color: #64748b;
    font-weight: 500;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    border-left: 3px solid transparent;
    font-family: inherit;
}

.user-nav-btn:hover {
    background-color: #f1f5f9;
    color: #4f46e5;
}

.user-nav-btn.active {
    background-color: white;
    color: #4f46e5;
    border-left-color: #4f46e5;
}

.user-nav-btn svg {
    width: 20px;
    height: 20px;
    opacity: 0.7;
}

.user-nav-btn.active svg {
    opacity: 1;
}

.user-content {
    flex: 1;
    padding: 2rem;
    overflow-y: auto;
}

.user-tab-content {
    display: none;
}

.user-tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

.user-display {
    animation: fadeIn 0.3s ease;
}

/* Close View Button */
.close-view-btn {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid #dee2e6;
    background-color: #f8f9fa;
    color: #6c757d;
    font-size: 20px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 0;
    line-height: 1;
    font-family: inherit;
}

.close-view-btn:hover {
    background-color: #e9ecef;
    border-color: #adb5bd;
    color: #495057;
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

/* ==========================================================================
   7. MAIN VIEWS AND CONTENT
   ========================================================================== */

.main-view {
    display: block;
    background-color: white;
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    margin-right: calc(-50vw + 50%);
}

.settings-view {
    display: block;
    height: calc(100vh - 80px);
    margin-left: calc(-50vw + 50%);
    margin-right: calc(-50vw + 50%);
}

.content {
    padding: 2rem;
    background-color: #f5f7fa;  /* ← ADD THIS LINE */
}

.content h2 {
    color: #374151 !important;
}   

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: white;  /* Changed from #f5f7fa */
    color: #2d3748;
    line-height: 1.6;
}

/* Settings Header */
.settings-header {
    background-color: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    padding: 1.5rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    max-width: 1400px;
    margin: 0 auto;
    position: relative; 
}

.settings-header h1 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #374151 !important;
    flex: 1;
}

h1.settings-header {
    color: #374151 !important;
    position: relative;
}

/* Settings Container */
.settings-container {
    display: flex;
    height: calc(100vh - 140px);
    max-width: 1400px;
    margin: 0 auto;
}

/* Settings Sidebar */
.settings-sidebar {
    width: 280px;
    background-color: #f8fafc;
    border-right: 1px solid #e2e8f0;
    padding: 1.5rem 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.settings-nav-btn {
    background: none;
    border: none;
    padding: 1rem 1.5rem;
    text-align: left;
    cursor: pointer;
    color: #64748b;
    font-weight: 500;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    border-left: 3px solid transparent;
    font-family: inherit;
    visibility: visible !important; 
}

.settings-nav-btn[data-settings-tab="currency"] {
    display: flex !important;
    visibility: visible !important;
}

.settings-nav-btn:hover {
    background-color: #f1f5f9;
    color: #4f46e5;
}

.settings-nav-btn.active {
    background-color: white;
    color: #4f46e5;
    border-left-color: #4f46e5;
}

.settings-nav-btn svg {
    width: 20px;
    height: 20px;
    opacity: 0.7;
}

.settings-nav-btn.active svg {
    opacity: 1;
}

/* Settings Content */
.settings-content h2,
.settings-tab-content h2 {
    color: #374151 !important;
}

.settings-content {
    flex: 1;
    padding: 2rem;
    overflow-y: auto;
    background-color: white;
}

.settings-tab-content {
    display: none;
}

.settings-tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

/* Navigation Tabs */
.tab-navigation {
    background-color: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    padding: 0 2rem;
    display: flex;
    overflow-x: auto;
}

.tab-btn {
    background: none;
    border: none;
    padding: 1rem 1.5rem;
    cursor: pointer;
    font-weight: 500;
    color: #64748b;
    border-bottom: 3px solid transparent;
    transition: all 0.2s ease;
    white-space: nowrap;
    font-family: inherit;
}

.tab-btn:hover {
    color: #4f46e5;
    background-color: #f1f5f9;
}

.tab-btn.active {
    color: #4f46e5;
    border-bottom-color: #4f46e5;
    background-color: white;
}

/* Content Area */
.content {
    padding: 2rem;
}

.tab-content {
    display: none;
    animation: fadeIn 0.3s ease;
}

.tab-content.active {
    display: block;
}

/* ==========================================================================
   8. ANIMATIONS
   ========================================================================== */

@keyframes fadeIn {
    from { 
        opacity: 0; 
        transform: translateY(10px); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0); 
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
    }
    to {
        transform: translateX(0);
    }
}

/* ==========================================================================
   9. FORMS
   ========================================================================== */

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-control {
    padding: 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.875rem;
    color: #374151 !important;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    font-family: inherit;
}

.form-control:focus {
    outline: none;
    border-color: #4f46e5;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

label {
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #374151;
}

textarea.form-control {
    resize: vertical;
    min-height: 100px;
}

small {
    margin-top: 0.25rem;
    color: #6b7280;
    font-size: 0.75rem;
}

/* ==========================================================================
   10. TABLES
   ========================================================================== */

.table-container {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th {
    background-color: #f8fafc;
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    color: #374151; !important;
    border-bottom: 1px solid #e5e7eb;
    white-space: nowrap;
}

.data-table td {
    padding: 1rem;
    color: #374151 !important;
    border-bottom: 1px solid #f3f4f6;
}

.data-table tbody tr {
    background-color: white;
}

.data-table tbody tr:hover {
    background-color: #f9fafb;
    color: #374151 !important;
}

.data-table input,
.data-table select {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    font-size: 0.875rem;
    font-family: inherit;
}

.data-table select {
    background-color: white;
}

/* Two-row header styling */
.data-table thead tr.year-header-row th {
    background-color: #667eea;
    color: white;
    font-weight: 700;
    text-align: center;
    font-size: 0.9rem;
    padding: 0.4rem 1rem;
    border-bottom: 1px solid rgba(255,255,255,0.3);
}

.data-table thead tr.month-header-row th {
    background-color: #f1f5f9;
    color: #374151;
    font-weight: 600;
    text-align: center;
    font-size: 0.8rem;
    padding: 0.4rem 0.5rem;
    border-bottom: 2px solid #e5e7eb;
    white-space: nowrap;
}

.data-table thead tr.month-header-row th.fixed-column {
    background-color: #f8fafc;
    font-size: 0.875rem;
    font-weight: 600;
    padding: 1rem;
    text-align: left;
}

/* ==========================================================================
   11. SUMMARY AND COST CARDS
   ========================================================================== */

.summary-overview {
    max-width: 1200px;
    margin: 0 auto;
}

.cost-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.summary-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1.5rem;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.summary-card h3 {
    font-size: 0.875rem;
    font-weight: 500;
    opacity: 0.9;
    margin-bottom: 0.5rem;
}

.cost-amount {
    font-size: 2rem;
    font-weight: 700;
}

.summary-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.project-info-summary {
    background: #f8fafc;
    padding: 1.5rem;
    border-radius: 8px;
}

.summary-section {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    color: #2d3748; 
}

.info-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.info-item {
    display: grid;
    grid-template-columns: 140px 1fr;
    align-items: start;
    gap: 1rem;
}

.info-item.full-width {
    grid-column: 1 / -1;
    grid-template-columns: 140px 1fr;
}

.info-label {
    font-weight: 600;
    color: #374151;
}

.info-value {
    color: #6b7280;
}

.scope-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.scope-item {
    text-align: center;
    padding: 1rem;
    background: white;
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.scope-number {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: #4f46e5;
}

.scope-label {
    font-size: 0.75rem;
    color: #6b7280;
    text-transform: uppercase;
    font-weight: 500;
}

.cost-breakdown {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.breakdown-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #6b7280;
    padding: 0.75rem 0;
    border-bottom: 1px solid #f3f4f6;
}

.breakdown-item:last-child {
    border-bottom: none;
}

.breakdown-item.subtotal {
    font-weight: 600;
    border-top: 2px solid #e5e7eb;
    margin-top: 1rem;
    padding-top: 1rem;
    color: #6b7280;
}

.breakdown-item.total {
    font-weight: 700;
    font-size: 1.1rem;
    color: #059669;
    border-top: 2px solid #059669;
    margin-top: 1rem;
    padding-top: 1rem;
}

.cost {
    font-weight: 600;
    color: #6b7280;
}

/* ==========================================================================
   12. MODAL
   ========================================================================== */

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 2rem;
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.close {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    font-size: 2rem;
    font-weight: bold;
    cursor: pointer;
    color: #6b7280;
}

.close:hover {
    color: #374151;
}

#modalTitle {
    margin-bottom: 1.5rem;
    color: #374151;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e5e7eb;
}

/* ==========================================================================
   13. MESSAGES AND ALERTS
   ========================================================================== */

.alert,
.project-info-message {
    padding: 1rem;
    border-radius: 6px;
    margin-bottom: 1rem;
    font-weight: 500;
    animation: slideDown 0.3s ease;
}

.alert-success,
.project-info-message.success {
    background-color: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.alert-error,
.project-info-message.error {
    background-color: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

.alert-info {
    background-color: #dbeafe;
    color: #1e40af;
    border: 1px solid #93c5fd;
}

.project-info-message ul {
    margin: 0.5rem 0 0 1.5rem;
    padding: 0;
}

.project-info-message li {
    margin: 0.25rem 0;
}

.project-info-message.fade-out {
    animation: fadeOut 0.3s ease forwards;
}

/* ==========================================================================
   14. FEATURE SPECIFIC STYLES
   ========================================================================== */

/* Section Actions */
.section-actions {
    margin-bottom: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Settings Actions */
.settings-actions {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    gap: 15px;
}

#saveProjectInfoBtn {
    min-width: 180px;
}

/* Forecast Section */
.forecast-section {
    margin-top: 2rem;
}

.forecast-section h3 {
    margin-bottom: 1rem;
    color: #374151;
}

/* Risk Summary */
.risk-summary {
    background-color: #f8fafc;
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 2rem;
}

.cost-display {
    font-size: 1.1rem;
    color: #059669;
}

/* Rate Cards */
.rate-cards-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
    gap: 2rem;
}

.rate-card-section {
    background-color: #f8fafc;
    padding: 1.5rem;
    border-radius: 8px;
}

.rate-card-section h3 {
    margin-bottom: 1rem;
    color: #374151;
}

.rate-card-section table {
    width: 100%;
    margin-bottom: 1rem;
}

/* Upload Section */
.upload-section {
    background-color: #f8fafc;
    padding: 2rem;
    border-radius: 8px;
    border: 2px dashed #cbd5e1;
    text-align: center;
    margin-bottom: 2rem;
}

.upload-section input[type="file"] {
    margin: 1rem 0;
}

/* Action Buttons Container */
.action-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

/* ==========================================================================
   15. CATEGORY AND STATUS BADGES
   ========================================================================== */

.category-badge {
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.category-internal {
    background-color: #dcfce7;
    color: #166534;
}

.category-external {
    background-color: #dbeafe;
    color: #1e40af;
}

.role-badge {
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ==========================================================================
   16. LOADING AND EMPTY STATES
   ========================================================================== */

.loading {
    text-align: center;
    padding: 2rem;
    color: #6b7280;
}

.empty-state {
    text-align: center;
    padding: 3rem;
    color: #6b7280;
}

.empty-state h3 {
    margin-bottom: 0.5rem;
    color: #374151;
}

/* ==========================================================================
   17. CURRENCY SETTINGS STYLES
   ========================================================================== */

.currency-section {
    background-color: #f8fafc;
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.currency-section h3 {
    color: #374151;
    margin-bottom: 0.5rem;
}

.section-description {
    color: #6b7280;
    font-size: 0.875rem;
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

.currency-preview {
    margin-top: 1rem;
    padding: 1rem;
    background: white;
    border-radius: 6px;
    border: 1px solid #e5e7eb;
    color: #374151;
}

.currency-badge-large {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 6px;
    font-weight: 600;
    margin-left: 0.5rem;
}

/* ==========================================================================
   18. EXCHANGE RATE STYLES
   ========================================================================== */

.exchange-rate-row {
    transition: background-color 0.2s ease;
}

.exchange-rate-row:hover {
    background-color: #f9fafb;
}

.rate-input {
    max-width: 150px;
}

.currency-code {
    font-weight: 600;
    color: #4f46e5;
}

.last-updated {
    color: #6b7280;
    font-size: 0.875rem;
}

/* ==========================================================================
   19. FEATURE TOGGLE ADMIN STYLES
   ========================================================================== */

.feature-toggles-view {
    animation: slideIn 0.3s ease;
}

.toggle-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

/* ==========================================================================
   20. RESPONSIVE DESIGN
   ========================================================================== */

@media (max-width: 1024px) {
    .summary-columns {
        grid-template-columns: 1fr;
    }
    
    .rate-cards-container {
        grid-template-columns: 1fr;
    }
    
    .scope-grid {
        grid-template-columns: 1fr;
    }
    
    .settings-container {
        flex-direction: column;
        height: auto;
    }
    
    .settings-sidebar {
        width: 100%;
        display: flex;
        flex-direction: row;
        overflow-x: auto;
        padding: 1rem 0;
        gap: 0;
    }
    
    .settings-nav-btn {
        padding: 1rem 1.5rem;
        white-space: nowrap;
        border-left: none;
        border-bottom: 3px solid transparent;
    }
    
    .settings-nav-btn.active {
        border-left: none;
        border-bottom-color: #4f46e5;
    }
}

@media (max-width: 768px) {
    header {
        padding: 1rem;
    }
    
    .header-title {
        font-size: 1.25rem;
    }
    
    .header-logo img {
        height: 32px;
    }
    
    /* Hide desktop controls, show mobile menu */
    .header-controls,
    .desktop-menu {
        display: none;
    }
    
    .mobile-menu {
        display: block;
    }
    
    /* Adjust dropdowns for mobile */
    .dropdown-content {
        right: 0;
        left: auto;
        min-width: 280px;
    }
    
    .grid-menu-items {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* Content adjustments */
    .content {
        padding: 1rem;
    }
    
    .tab-navigation {
        padding: 0 1rem;
    }
    
    .tab-btn {
        padding: 0.75rem 1rem;
    }
    
    /* Settings and user views */
    .settings-container,
    .user-container {
        flex-direction: column;
    }
    
    .settings-sidebar,
    .user-sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid #e2e8f0;
        padding: 1rem;
        flex-direction: row;
        overflow-x: auto;
    }
    
    .settings-nav-btn,
    .user-nav-btn {
        padding: 0.75rem 1rem;
        border-left: none;
        border-bottom: 3px solid transparent;
        white-space: nowrap;
    }
    
    .settings-nav-btn.active,
    .user-nav-btn.active {
        border-left-color: transparent;
        border-bottom-color: #4f46e5;
    }
    
    .settings-content,
    .user-content {
        padding: 1rem;
    }
    
    .settings-header {
        padding: 1rem;
    }
    
    .settings-header h1 {
        font-size: 1.25rem;
    }
    
    /* Form adjustments */
    .form-grid {
        grid-template-columns: 1fr;
    }
    
    /* Table adjustments */
    .table-container {
        overflow-x: auto;
    }
    
    .data-table {
        min-width: 600px;
    }
    
    /* Mobile-specific two-row header adjustments */
    .data-table thead tr.year-header-row th {
        padding: 0.5rem 0.3rem;
        font-size: 0.8rem;
    }
    
    .data-table thead tr.month-header-row th {
        padding: 0.5rem 0.3rem;
        font-size: 0.7rem;
    }
    
    .data-table thead tr.month-header-row th.fixed-column {
        padding: 0.75rem 0.5rem;
        font-size: 0.8rem;
    }
    
    /* Modal adjustments */
    .modal-content {
        width: 95%;
        margin: 10% auto;
        padding: 1.5rem;
    }
    
    /* Cost summary */
    .cost-summary {
        grid-template-columns: 1fr;
    }
    
    .section-actions {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }
    
    .info-item {
        grid-template-columns: 1fr;
        gap: 0.25rem;
    }
    
    .info-item.full-width {
        grid-template-columns: 1fr;
    }
    
    .app-container {
        margin: 0;
        box-shadow: none;
    }
}

@media (max-width: 480px) {
    .header-title {
        font-size: 1rem;
    }
    
    .btn {
        font-size: 0.75rem;
        padding: 0.4rem 0.8rem;
    }
    
    .tab-btn {
        padding: 0.75rem 1rem;
        font-size: 0.875rem;
    }
    
    .grid-menu-items {
        grid-template-columns: 1fr;
    }
    
    .modal-content {
        margin: 5% auto;
    }
}

/* ==========================================================================
   21. UTILITY CLASSES
   ========================================================================== */

.hidden {
    display: none !important;
}

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

.text-right {
    text-align: right;
}

/* Spacing utilities with corrected values */
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 1rem; }
.mt-4 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 2rem; }

.p-1 { padding: 0.25rem; }
.p-2 { padding: 0.5rem; }
.p-3 { padding: 1rem; }
.p-4 { padding: 2rem; }

.fw-bold {
    font-weight: 700;
}

.fw-semibold {
    font-weight: 600;
}

.fw-medium {
    font-weight: 500;
}

.text-muted {
    color: #6b7280;
}

.text-primary {
    color: #4f46e5;
}

.text-success {
    color: #059669;
}

.text-danger {
    color: #dc2626;
}

/* ==========================================================================
   22. PRINT STYLES
   ========================================================================== */

@media print {
    header,
    .header-controls,
    .desktop-menu,
    .mobile-menu,
    .tab-navigation,
    .section-actions,
    .settings-actions,
    .btn,
    button {
        display: none !important;
    }
    
    .app-container {
        box-shadow: none;
    }
    
    .content {
        padding: 0;
    }
    
    .data-table {
        page-break-inside: avoid;
    }
    
    .summary-card {
        background: white !important;
        color: black !important;
        border: 1px solid #ccc;
    }
}

/* ==========================================================================
   23. ACCESSIBILITY
   ========================================================================== */

/* Focus visible for keyboard navigation */
*:focus-visible {
    outline: 2px solid #4f46e5;
    outline-offset: 2px;
}

/* Skip link for screen readers */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: #4f46e5;
    color: white;
    padding: 8px;
    text-decoration: none;
    z-index: 100;
}

.skip-link:focus {
    top: 0;
}

/* Reduced motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
/* ==========================================================================
   Bug Fixes 
   ========================================================================== */

/* ========== FIX ISSUE 1: Table Text Visibility ========== */
.data-table th,
.data-table td {
    color: #374151 !important;  /* Force dark text color */
    background-color: #f8fafc;
}

.data-table tbody tr {
    background-color: white;
}

.data-table tbody tr:hover {
    background-color: #f9fafb;
}

.data-table tbody td {
    background-color: white;
    color: #374151 !important;
}

/* ========== FIX ISSUE 2: Remove Borders & Full Width Header ========== */
body {
    background-color: white;  /* Changed from #f5f7fa */
    margin: 0;
    padding: 0;
}

.app-container {
    max-width: none;  /* Remove max-width restriction */
    margin: 0;  /* Remove centering */
    box-shadow: none;  /* Remove shadow borders */
}

header {
    margin: 0;
    /* padding: 1rem 2rem;
    width: 100%;
}

.main-view {
    background-color: white;
}

/* ==========================================================================
   END OF STYLESHEET
   ========================================================================== */
