﻿/* ================================================================
   SITE.CSS - ConceptEstimating
   Main stylesheet that imports all other stylesheets
   ================================================================ */

/* Import CSS architecture files in correct order */
@import url('theme.css');      /* Design tokens and CSS variables */
@import url('components.css'); /* Reusable UI components */

/* ================================================================
   PAGE-SPECIFIC OVERRIDES AND UTILITIES
   Only put styles here that don't belong in theme.css or components.css
   ================================================================ */

/* Modern Color Variables - TEMPORARY - These are duplicated from theme.css */
/* TODO: Remove these once we verify all pages are using theme.css variables */
:root {
    /* Primary Colors - Clean Blue Theme */
    --primary-50: #eff6ff;
    --primary-100: #dbeafe;
    --primary-200: #bfdbfe;
    --primary-300: #93c5fd;
    --primary-400: #60a5fa;
    --primary-500: #3b82f6;
    --primary-600: #2563eb;
    --primary-700: #1d4ed8;
    --primary-800: #1e40af;
    --primary-900: #1e3a8a;
    /* Neutral Colors */
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    /* Semantic Colors */
    --red-50: #fef2f2;
    --red-600: #dc2626;
    --red-700: #b91c1c;
    --green-50: #f0fdf4;
    --green-600: #16a34a;
    --green-700: #15803d;
    --yellow-50: #fefce8;
    --yellow-600: #ca8a04;
    --yellow-700: #a16207;
    /* Background and Text */
    --bg-white: #ffffff;
    --bg-light: #f9fafb;
    --text-primary: #111827;
    --text-secondary: #6b7280;
    --text-muted: #9ca3af;
    --border-color: #e5e7eb;
    --border-light: #f3f4f6;
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    /* Border Radius */
    --radius-sm: 0.25rem;
    --radius: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    /* Transitions */
    --transition: all 0.2s ease-in-out;
}

/* Basic Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    background-color: var(--bg-light);
    color: var(--text-primary);
    line-height: 1.6;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    margin-bottom: 0.5rem;
    font-weight: 600;
    line-height: 1.2;
    color: var(--text-primary);
}

/* Remove focus outline from all headers */
h1:focus, h2:focus, h3:focus, h4:focus, h5:focus, h6:focus,
h1:focus-visible, h2:focus-visible, h3:focus-visible, 
h4:focus-visible, h5:focus-visible, h6:focus-visible {
    outline: none !important;
    box-shadow: none !important;
}

.display-4 {
    font-size: 2.5rem;
    font-weight: 800;
}

.display-5 {
    font-size: 2rem;
    font-weight: 700;
}

.lead {
    font-size: 1.25rem;
    font-weight: 300;
    color: var(--text-secondary);
}

.fw-bold {
    font-weight: 700;
}

/* Top Navigation - Clean Modern Style */
.top-nav {
    background: var(--bg-white);
    color: var(--text-primary);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-sm);
    border-bottom: 1px solid var(--border-color);
}

.top-nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.page-info {
    display: flex;
    align-items: baseline;
    gap: 1rem;
}

.page-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
    color: var(--text-primary);
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    text-shadow: none !important;
}

    .page-title:focus {
        outline: none !important;
    }

.page-info:focus {
    outline: none !important;
}

.page-info * {
    outline: none !important;
}

.page-subtitle {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: var(--text-primary);
    font-weight: 500;
}

.auth-links {
    display: flex;
    gap: 0.75rem;
}

.auth-link {
    text-decoration: none;
    color: var(--primary-600);
    font-weight: 500;
    padding: 0.5rem 1rem;
    border: 1px solid var(--primary-600);
    border-radius: var(--radius);
    transition: var(--transition);
    font-size: 0.9rem;
    background: transparent;
}

    .auth-link:hover {
        background-color: var(--primary-600);
        color: var(--bg-white);
        text-decoration: none;
        transform: translateY(-1px);
    }

.logout-link {
    background: none;
    border: 1px solid var(--red-600);
    color: var(--red-600);
    padding: 0.5rem 1rem;
    border-radius: var(--radius);
    cursor: pointer;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--transition);
}

    .logout-link:hover {
        background-color: var(--red-600);
        color: var(--bg-white);
        transform: translateY(-1px);
    }

/* Main Layout */
.main-container {
    display: flex;
    min-height: calc(100vh - 80px);
}

/* Sidebar - Clean Modern Style */
.sidebar {
    width: 280px;
    flex-shrink: 0;
    background: var(--bg-white);
    border-right: 1px solid var(--border-color);
    padding: 0;
    overflow-y: auto;
    box-shadow: var(--shadow-sm);
}

/* Navigation Styles */
.nav-item {
    margin: 0.125rem 0;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1.5rem;
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition);
    border-left: 3px solid transparent;
    font-weight: 500;
    font-size: 0.9rem;
}

    .nav-link:hover {
        background: var(--gray-50);
        color: var(--primary-600);
        border-left-color: var(--primary-600);
        text-decoration: none;
    }

    .nav-link.active {
        background: var(--primary-50);
        color: var(--primary-700);
        border-left-color: var(--primary-600);
        font-weight: 600;
    }

.nav-icon {
    width: 20px;
    text-align: center;
    color: var(--text-muted);
}

.nav-link:hover .nav-icon {
    color: var(--primary-600);
}

.nav-link.active .nav-icon {
    color: var(--primary-600);
}

/* Main Content Area */
.content {
    flex: 1;
    padding: 2rem;
    background: var(--bg-light);
    /* Removed overflow-y: auto to prevent double scroll bars - pages scroll naturally */
}

/* Hierarchical Navigation Styles */
.nav-section {
    margin-bottom: 0.25rem;
}

.nav-section-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1.5rem;
    color: var(--text-primary);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border-left: 3px solid transparent;
    background: var(--gray-50);
    border-bottom: 1px solid var(--border-light);
}

    .nav-section-header:hover {
        background: var(--primary-50);
        border-left-color: var(--primary-600);
        color: var(--primary-700);
    }

    .nav-section-header span {
        flex: 1;
    }

.nav-toggle {
    transition: transform 0.2s ease;
    color: var(--text-muted);
}

    .nav-toggle.rotated {
        transform: rotate(90deg);
    }

.nav-subsection {
    background: var(--bg-white);
    border-left: 3px solid var(--primary-100);
    margin-left: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

    .nav-subsection.collapsed {
        max-height: 0;
    }

    .nav-subsection.expanded {
        max-height: 2000px; /* Increased to allow more items */
    }

.nav-sub-link {
    padding-left: 3rem !important;
    font-size: 0.85rem;
    background: var(--bg-white);
}

    .nav-sub-link:hover {
        background: var(--gray-50);
    }

/* Buttons - Modern Clean Style */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border: 1px solid transparent;
    border-radius: var(--radius);
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    font-weight: 500;
    font-size: 0.875rem;
    line-height: 1.25rem;
    font-family: inherit;
}

.btn-primary {
    background: var(--primary-600);
    border-color: var(--primary-600);
    color: var(--bg-white);
}

    .btn-primary:hover {
        background: var(--primary-700);
        border-color: var(--primary-700);
        color: var(--bg-white);
        text-decoration: none;
        transform: translateY(-1px);
        box-shadow: var(--shadow-md);
    }

.btn-outline-primary {
    color: var(--primary-600);
    border-color: var(--primary-600);
    background: transparent;
}

    .btn-outline-primary:hover {
        background-color: var(--primary-600);
        color: var(--bg-white);
        text-decoration: none;
        transform: translateY(-1px);
    }

.btn-secondary {
    background: var(--gray-200);
    border-color: var(--gray-200);
    color: var(--gray-800);
}

    .btn-secondary:hover {
        background: var(--gray-300);
        border-color: var(--gray-300);
        color: var(--gray-800);
        text-decoration: none;
    }

.btn-danger {
    background: var(--red-600);
    border-color: var(--red-600);
    color: var(--bg-white);
}

    .btn-danger:hover {
        background: var(--red-700);
        border-color: var(--red-700);
        color: var(--bg-white);
        text-decoration: none;
    }

.btn-outline {
    color: var(--primary-600);
    border-color: var(--primary-600);
    background: transparent;
}

    .btn-outline:hover {
        background: var(--primary-600);
        color: var(--bg-white);
        text-decoration: none;
    }

.btn-ghost {
    background: transparent;
    border-color: transparent;
    color: var(--text-secondary);
}

    .btn-ghost:hover {
        background: var(--gray-100);
        color: var(--text-primary);
    }

.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.75rem;
}

.btn-lg {
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
}

/* Form Controls - Modern Clean Style */
.form-control {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    font-size: 0.875rem;
    line-height: 1.25rem;
    transition: var(--transition);
    background: var(--bg-white);
    color: var(--text-primary);
}

    .form-control:focus {
        outline: none;
        border-color: var(--primary-500);
        box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    }

.form-label {
    display: block;
    margin-bottom: 0.25rem;
    font-weight: 500;
    color: var(--text-primary);
    font-size: 0.875rem;
}

.form-select {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    font-size: 0.875rem;
    line-height: 1.25rem;
    background: var(--bg-white);
    color: var(--text-primary);
    transition: var(--transition);
}

    .form-select:focus {
        outline: none;
        border-color: var(--primary-500);
        box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    }

/* Cards - Clean Modern Style */
.card {
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    margin-bottom: 1.5rem;
    overflow: hidden;
}

.card-body {
    padding: 1.5rem;
}

.card-title {
    margin-bottom: 1rem;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    text-align: center;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-light);
}

/* Feature Cards */
.feature-card {
    background: var(--bg-white);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow);
    padding: 2rem;
    text-align: center;
    transition: var(--transition);
    height: 100%;
    border: 1px solid var(--border-color);
}

    .feature-card:hover {
        transform: translateY(-4px);
        box-shadow: var(--shadow-lg);
    }

.feature-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem auto;
    background: var(--primary-100);
    color: var(--primary-600);
}

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.125rem 0.5rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
    line-height: 1rem;
}

.badge-danger {
    background: var(--red-600);
    color: var(--bg-white);
}

.badge-primary {
    background: var(--primary-600);
    color: var(--bg-white);
}

/* Utilities */
.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

.text-right {
    text-align: right;
}

.flex {
    display: flex;
}

.items-center {
    align-items: center;
}

.justify-between {
    justify-content: space-between;
}

.justify-center {
    justify-content: center;
}

.gap-1 {
    gap: 0.25rem;
}

.gap-2 {
    gap: 0.5rem;
}

.gap-3 {
    gap: 0.75rem;
}

.gap-4 {
    gap: 1rem;
}

.w-full {
    width: 100%;
}

.h-full {
    height: 100%;
}

.block {
    display: block;
}

.inline-block {
    display: inline-block;
}

/* Spacing */
.m-0 {
    margin: 0;
}

.m-1 {
    margin: 0.25rem;
}

.m-2 {
    margin: 0.5rem;
}

.m-3 {
    margin: 0.75rem;
}

.m-4 {
    margin: 1rem;
}

.mb-1 {
    margin-bottom: 0.25rem;
}

.mb-2 {
    margin-bottom: 0.5rem;
}

.mb-3 {
    margin-bottom: 0.75rem;
}

.mb-4 {
    margin-bottom: 1rem;
}

.mb-5 {
    margin-bottom: 1.25rem;
}

.mt-1 {
    margin-top: 0.25rem;
}

.mt-2 {
    margin-top: 0.5rem;
}

.mt-3 {
    margin-top: 0.75rem;
}

.mt-4 {
    margin-top: 1rem;
}

.p-0 {
    padding: 0;
}

.p-1 {
    padding: 0.25rem;
}

.p-2 {
    padding: 0.5rem;
}

.p-3 {
    padding: 0.75rem;
}

.p-4 {
    padding: 1rem;
}

.py-1 {
    padding-top: 0.25rem;
    padding-bottom: 0.25rem;
}

.py-2 {
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
}

.py-3 {
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
}

.py-4 {
    padding-top: 1rem;
    padding-bottom: 1rem;
}

.px-1 {
    padding-left: 0.25rem;
    padding-right: 0.25rem;
}

.px-2 {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
}

.px-3 {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
}

.px-4 {
    padding-left: 1rem;
    padding-right: 1rem;
}

/* Text Colors */
.text-primary {
    color: var(--text-primary);
}

.text-secondary {
    color: var(--text-secondary);
}

.text-muted {
    color: var(--text-muted);
}

.text-white {
    color: var(--bg-white);
}

.text-blue {
    color: var(--primary-600);
}

.text-red {
    color: var(--red-600);
}

.text-green {
    color: var(--green-600);
}

/* Background Colors */
.bg-white {
    background-color: var(--bg-white);
}

.bg-light {
    background-color: var(--bg-light);
}

.bg-primary {
    background-color: var(--primary-600);
}

.bg-red {
    background-color: var(--red-600);
}

.bg-green {
    background-color: var(--green-600);
}

/* Borders */
.border {
    border: 1px solid var(--border-color);
}

.border-light {
    border: 1px solid var(--border-light);
}

.border-primary {
    border: 1px solid var(--primary-600);
}

.rounded {
    border-radius: var(--radius);
}

.rounded-md {
    border-radius: var(--radius-md);
}

.rounded-lg {
    border-radius: var(--radius-lg);
}

.rounded-full {
    border-radius: 9999px;
}

/* Shadows */
.shadow-sm {
    box-shadow: var(--shadow-sm);
}

.shadow {
    box-shadow: var(--shadow);
}

.shadow-md {
    box-shadow: var(--shadow-md);
}

.shadow-lg {
    box-shadow: var(--shadow-lg);
}

/* Dropdown Styles */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    min-width: 200px;
    z-index: 1000;
    padding: 0.5rem 0;
    margin-top: 0.25rem;
}

.dropdown-item {
    display: block;
    width: 100%;
    padding: 0.5rem 1rem;
    color: var(--text-primary);
    text-decoration: none;
    border: none;
    background: none;
    text-align: left;
    cursor: pointer;
    transition: var(--transition);
}

    .dropdown-item:hover {
        background: var(--gray-50);
        color: var(--primary-600);
    }

.dropdown-header {
    padding: 0.5rem 1rem;
    font-weight: 600;
    color: var(--text-muted);
    font-size: 0.875rem;
}

.dropdown-divider {
    border: none;
    border-top: 1px solid var(--border-color);
    margin: 0.5rem 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .main-container {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        order: 2;
    }

    .content {
        order: 1;
        padding: 1rem;
    }

    .top-nav-content {
        padding: 0 1rem;
        flex-direction: column;
        gap: 1rem;
    }

    .page-subtitle {
        display: none;
    }

    .auth-links {
        flex-direction: column;
        gap: 0.5rem;
    }

    .display-4 {
        font-size: 2rem;
    }

    .display-5 {
        font-size: 1.75rem;
    }

    .btn-lg {
        padding: 0.75rem 1.25rem;
    }
}

/* Replace Bootstrap functionality with custom CSS */
.row {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin: 0;
}

.col-lg-4 {
    flex: 1 1 300px;
    max-width: 400px;
}

.col-md-6 {
    flex: 1 1 300px;
    max-width: 500px;
}

.g-4 {
    gap: 1.5rem;
}

.d-flex {
    display: flex;
}

.justify-content-between {
    justify-content: space-between;
}

.align-items-center {
    align-items: center;
}

.mb-4 {
    margin-bottom: 1.5rem;
}

.card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
}

.card-body {
    padding: 1.5rem;
}

/* Custom Tab Styles */
.nav-tabs-custom {
    display: flex;
    background: var(--gray-50);
    border-bottom: 1px solid var(--border-color);
}

.tab-button {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 1.5rem;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
    font-weight: 500;
    font-size: 0.875rem;
    border-bottom: 3px solid transparent;
}

    .tab-button:hover {
        background: var(--bg-white);
        color: var(--primary-600);
        border-bottom-color: var(--primary-300);
    }

    .tab-button.active {
        background: var(--bg-white);
        color: var(--primary-600);
        border-bottom-color: var(--primary-600);
        font-weight: 600;
    }

    .tab-button.disabled {
        color: var(--text-muted);
        cursor: not-allowed;
        opacity: 0.6;
    }

        .tab-button.disabled:hover {
            background: transparent;
            border-bottom-color: transparent;
        }

.border-bottom {
    border-bottom: 1px solid var(--border-light);
}

.text-red {
    color: var(--red-600);
}

.form-section {
    margin-bottom: 1rem;
}

    .form-section .form-label {
        font-weight: 500;
        margin-bottom: 0.5rem;
        color: var(--text-primary);
    }
