/* ==========================================================================
   DESIGN TOKENS - shared with the Cost Estimator (cet/style.css)
   Keep this block in sync with cet/style.css so both tools theme alike.
   ========================================================================== */

:root {
  /* Brand */
  --brand:            #0d9488;
  --brand-dark:       #0f766e;
  --brand-light:      #f0fdfa;
  --brand-border:     #99f6e4;

  /* Neutrals */
  --zinc-50:          #fafafa;
  --zinc-100:         #f4f4f5;
  --zinc-200:         #e4e4e7;
  --zinc-300:         #d4d4d8;
  --zinc-400:         #a1a1aa;
  --zinc-500:         #71717a;
  --zinc-600:         #52525b;
  --zinc-700:         #3f3f46;
  --zinc-900:         #18181b;

  /* Semantic */
  --success:          #059669;
  --success-bg:       #f0fdf4;
  --success-border:   #bbf7d0;
  --danger:           #dc2626;
  --danger-bg:        #fef2f2;
  --danger-border:    #fecaca;
  --warning:          #d97706;
  --warning-bg:       #fffbeb;
  --warning-border:   #fde68a;
  --info:             #2563eb;
  --info-bg:          #eff6ff;
  --info-border:      #bfdbfe;

  /* Surfaces */
  --bg-page:          var(--zinc-50);
  --bg-surface:       #ffffff;
  --bg-subtle:        var(--zinc-100);
  --border:           var(--zinc-200);
  --border-strong:    var(--zinc-300);

  /* Text */
  --text-primary:     var(--zinc-900);
  --text-secondary:   var(--zinc-500);
  --text-muted:       var(--zinc-400);
  --text-on-brand:    #ffffff;

  /* Typography */
  --font-base:        -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  --text-xs:          11px;
  --text-sm:          12px;
  --text-base:        13px;
  --text-md:          14px;
  --text-lg:          16px;
  --text-xl:          20px;
  --text-2xl:         24px;

  /* Spacing */
  --space-1:          4px;
  --space-2:          8px;
  --space-3:          12px;
  --space-4:          16px;
  --space-5:          20px;
  --space-6:          24px;
  --space-8:          32px;

  /* Radius */
  --radius-sm:        4px;
  --radius-md:        6px;
  --radius-lg:        8px;
  --radius-xl:        12px;
  --radius-pill:      999px;

  /* Shadows */
  --shadow-sm:        0 1px 2px rgba(0,0,0,0.05);
  --shadow-md:        0 4px 12px rgba(0,0,0,0.08);
  --shadow-lg:        0 8px 24px rgba(0,0,0,0.12);

  /* Transitions */
  --transition:       0.15s ease;

  /* Layout */
  --header-height:    52px;
  --tabnav-height:    40px;
  --sidebar-width:    260px;
}

/* ==========================================================================
   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: var(--bg-page);
    color: var(--text-primary);
    line-height: 1.6;
}

.app-container {
    max-width: 1400px;
    margin: 0 auto;
    background-color: var(--bg-page);
    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: var(--bg-surface);
    color: var(--text-primary);
    height: var(--header-height);
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 0 var(--space-5);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-3);
    width: 100%;
}

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

/* 3x3 dot launcher linking back to the Zyantik apps home page */
.apps-home-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    flex-shrink: 0;
    transition: background-color var(--transition), color var(--transition);
}

.apps-home-link:hover {
    background: var(--bg-subtle);
    color: var(--brand);
}

.header-logo {
    flex-shrink: 0;
    height: 30px;
    padding: 0 var(--space-2);
    background: var(--brand);
    border-radius: var(--radius-md);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.header-logo img {
    height: 18px !important;
    width: auto;
    display: block;
    filter: brightness(0) invert(1);
}

.header-divider {
    width: 1px;
    height: 20px;
    background: var(--border);
}

.header-title {
    font-size: var(--text-md);
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: -0.2px;
    white-space: nowrap;
    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: var(--bg-surface);
    border: 1px solid var(--border);
    color: var(--zinc-600);
    padding: 0.5rem;
    border-radius: var(--radius-md);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    transition: background var(--transition), border-color var(--transition), color var(--transition);
    font-family: inherit;
}

.dropdown-toggle:hover {
    background: var(--bg-subtle);
    border-color: var(--border-strong);
    color: var(--text-primary);
}

.dropdown-toggle.active {
    background: var(--bg-subtle);
    border-color: var(--border-strong);
    color: var(--text-primary);
}

.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: var(--bg-subtle);
    transform: translateY(-2px);
}

.grid-menu-item svg {
    width: 32px;
    height: 32px;
    margin-bottom: 0.5rem;
    color: var(--brand);
}

.grid-menu-item span {
    font-size: 0.75rem;
    color: var(--text-primary);
    font-weight: 500;
}

/* Regular Dropdown Items */
.dropdown-item {
    width: 100%;
    padding: 0.75rem 1rem;
    border: none;
    background: none;
    text-align: left;
    color: var(--text-primary);
    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: var(--bg-subtle);
}

.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 var(--bg-subtle);
}

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

.dropdown-divider {
    height: 1px;
    background-color: var(--border);
    margin: 0.25rem 0;
}

/* User Badge Button */
.user-badge {
    height: 32px;
    background: var(--bg-surface);
    color: var(--zinc-600);
    padding: 0 var(--space-3);
    border-radius: var(--radius-pill);
    font-size: var(--text-xs);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: var(--space-2);
    cursor: pointer;
    transition: background var(--transition), border-color var(--transition), color var(--transition);
    border: 1px solid var(--border);
    font-family: var(--font-base);
}

.user-badge:hover,
.user-badge.active {
    background: var(--bg-subtle);
    border-color: var(--border-strong);
    color: var(--text-primary);
}

/* ==========================================================================
   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 {
    height: 32px;
    padding: 0 var(--space-3);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    cursor: pointer;
    font-weight: 500;
    transition: background var(--transition), border-color var(--transition), color var(--transition);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-1);
    background: var(--bg-surface);
    color: var(--zinc-600);
    font-size: var(--text-sm);
    font-family: var(--font-base);
    white-space: nowrap;
}

.btn:hover {
    background: var(--bg-subtle);
    border-color: var(--border-strong);
    color: var(--text-primary);
}

.btn-primary {
    background-color: var(--brand);
    color: var(--text-on-brand);
    border-color: var(--brand);
}

.btn-primary:hover {
    background-color: var(--brand-dark);
    border-color: var(--brand-dark);
    color: var(--text-on-brand);
}

.btn-secondary {
    background: var(--bg-surface);
    color: var(--zinc-600);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: var(--bg-subtle);
    border-color: var(--border-strong);
    color: var(--text-primary);
}

.btn-danger {
    background-color: var(--danger);
    color: white;
    border-color: var(--danger);
}

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

.btn-small {
    height: 24px;
    padding: 0 var(--space-2);
    font-size: var(--text-xs);
}

.btn-icon {
    width: 32px;
    padding: 0;
    background: var(--bg-surface);
    color: var(--zinc-600);
    border: 1px solid var(--border);
}

.btn-icon:hover {
    background: var(--bg-subtle);
    border-color: var(--border-strong);
    color: var(--text-primary);
}

.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: var(--text-primary);
    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: var(--bg-subtle);
    border-bottom: 1px solid var(--border);
    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: var(--text-primary);
}

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

.user-sidebar {
    width: 280px;
    background-color: var(--bg-subtle);
    border-right: 1px solid var(--border);
    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: var(--text-secondary);
    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: var(--bg-subtle);
    color: var(--brand);
}

.user-nav-btn.active {
    background-color: white;
    color: var(--brand);
    border-left-color: var(--brand);
}

.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 var(--border);
    background-color: var(--bg-subtle);
    color: var(--text-secondary);
    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: var(--bg-subtle);
    border-color: var(--text-muted);
    color: var(--text-primary);
    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: var(--bg-page);  /* ← ADD THIS LINE */
}

.content h2 {
    color: var(--text-primary) !important;
}   

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: white;  /* Changed from var(--bg-page) */
    color: var(--text-primary);
    line-height: 1.6;
}

/* Settings Header */
.settings-header {
    background-color: var(--bg-subtle);
    border-bottom: 1px solid var(--border);
    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: var(--text-primary) !important;
    flex: 1;
}

h1.settings-header {
    color: var(--text-primary) !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: var(--bg-subtle);
    border-right: 1px solid var(--border);
    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: var(--text-secondary);
    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: var(--bg-subtle);
    color: var(--brand);
}

.settings-nav-btn.active {
    background-color: white;
    color: var(--brand);
    border-left-color: var(--brand);
}

.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: var(--text-primary) !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: var(--bg-subtle);
    border-bottom: 1px solid var(--border);
    padding: 0 2rem;
    display: flex;
    overflow-x: auto;
}

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

.tab-btn:hover {
    color: var(--brand);
    background-color: var(--bg-subtle);
}

.tab-btn.active {
    color: var(--brand);
    border-bottom-color: var(--brand);
    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 var(--border-strong);
    border-radius: 6px;
    font-size: 0.875rem;
    color: var(--text-primary) !important;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    font-family: inherit;
}

.form-control:focus {
    outline: none;
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.1);
}

label {
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-primary);
}

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

small {
    margin-top: 0.25rem;
    color: var(--text-secondary);
    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: var(--bg-subtle);
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    color: var(--text-primary); !important;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}

.data-table td {
    padding: 1rem;
    color: var(--text-primary) !important;
    border-bottom: 1px solid var(--bg-subtle);
}

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

.data-table tbody tr:hover {
    background-color: var(--bg-subtle);
    color: var(--text-primary) !important;
}

.data-table input,
.data-table select {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid var(--border-strong);
    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: var(--brand);
    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: var(--bg-subtle);
    color: var(--text-primary);
    font-weight: 600;
    text-align: center;
    font-size: 0.8rem;
    padding: 0.4rem 0.5rem;
    border-bottom: 2px solid var(--border);
    white-space: nowrap;
}

.data-table thead tr.month-header-row th.fixed-column {
    background-color: var(--bg-subtle);
    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, var(--brand) 0%, var(--brand-dark) 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: var(--bg-subtle);
    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: var(--text-primary); 
}

.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: var(--text-primary);
}

.info-value {
    color: var(--text-secondary);
}

.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: var(--brand);
}

.scope-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    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: var(--text-secondary);
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--bg-subtle);
}

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

.breakdown-item.subtotal {
    font-weight: 600;
    border-top: 2px solid var(--border);
    margin-top: 1rem;
    padding-top: 1rem;
    color: var(--text-secondary);
}

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

.cost {
    font-weight: 600;
    color: var(--text-secondary);
}

/* ==========================================================================
   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: var(--text-secondary);
}

.close:hover {
    color: var(--text-primary);
}

#modalTitle {
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

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

/* ==========================================================================
   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: var(--success-bg);
    color: #065f46;
    border: 1px solid var(--success-border);
}

.alert-error,
.project-info-message.error {
    background-color: var(--danger-bg);
    color: #991b1b;
    border: 1px solid var(--danger-border);
}

.alert-info {
    background-color: var(--info-bg);
    color: var(--info);
    border: 1px solid var(--info-border);
}

.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 var(--border);
    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: var(--text-primary);
}

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

.cost-display {
    font-size: 1.1rem;
    color: var(--success);
}

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

.rate-card-section {
    background-color: var(--bg-subtle);
    padding: 1.5rem;
    border-radius: 8px;
}

.rate-card-section h3 {
    margin-bottom: 1rem;
    color: var(--text-primary);
}

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

/* Upload Section */
.upload-section {
    background-color: var(--bg-subtle);
    padding: 2rem;
    border-radius: 8px;
    border: 2px dashed var(--border-strong);
    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: var(--success-bg);
    color: #166534;
}

.category-external {
    background-color: var(--info-bg);
    color: var(--info);
}

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

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

.loading {
    text-align: center;
    padding: 2rem;
    color: var(--text-secondary);
}

.empty-state {
    text-align: center;
    padding: 3rem;
    color: var(--text-secondary);
}

.empty-state h3 {
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

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

.currency-section {
    background-color: var(--bg-subtle);
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.currency-section h3 {
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.section-description {
    color: var(--text-secondary);
    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 var(--border);
    color: var(--text-primary);
}

.currency-badge-large {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, var(--brand) 0%, var(--brand-dark) 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: var(--bg-subtle);
}

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

.currency-code {
    font-weight: 600;
    color: var(--brand);
}

.last-updated {
    color: var(--text-secondary);
    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: var(--brand);
    }
}

@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 var(--border);
        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: var(--brand);
    }
    
    .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: var(--text-secondary);
}

.text-primary {
    color: var(--brand);
}

.text-success {
    color: var(--success);
}

.text-danger {
    color: var(--danger);
}

/* ==========================================================================
   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 var(--border-strong);
    }
}

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

/* Focus visible for keyboard navigation */
*:focus-visible {
    outline: 2px solid var(--brand);
    outline-offset: 2px;
}

/* Skip link for screen readers */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--brand);
    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: var(--text-primary) !important;  /* Force dark text color */
    background-color: var(--bg-subtle);
}

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

.data-table tbody tr:hover {
    background-color: var(--bg-subtle);
}

.data-table tbody td {
    background-color: white;
    color: var(--text-primary) !important;
}

/* ========== FIX ISSUE 2: Remove Borders & Full Width Header ========== */
body {
    background-color: var(--bg-page);
    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;
}

.main-view {
    background-color: var(--bg-surface);
}

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