/* Workshop Inventory - Shared Styles */

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(rgba(250, 248, 245, 0.95), rgba(245, 242, 238, 0.97)), url('../workshop-bg-3.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    min-height: 100vh;
    color: #2C1810;
}

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

/* Header with Navigation */
.header {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid #E8E3DD;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 20px rgba(0,0,0,0.05);
}

.header-top {
    padding: 15px 0;
    border-bottom: 1px solid #F5F2EE;
}

.header-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.brand-section {
    display: flex;
    align-items: center;
}

.logo {
    height: 35px;
    margin-right: 15px;
}

.brand-name {
    font-size: 22px;
    font-weight: 600;
    color: #8B7355;
    letter-spacing: 0.5px;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    color: #8B7355;
    cursor: pointer;
    padding: 8px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.mobile-menu-toggle:hover {
    background: rgba(210, 180, 140, 0.2);
}

.search-bar {
    position: relative;
}

.header-search-input {
    background: rgba(245, 242, 238, 0.8);
    border: 1px solid #E8E3DD;
    padding: 10px 40px 10px 15px;
    border-radius: 8px;
    width: 300px;
    font-size: 14px;
    color: #2C1810;
    transition: all 0.3s ease;
}

.header-search-input:focus {
    outline: none;
    border-color: #D2B48C;
    background: white;
    box-shadow: 0 2px 10px rgba(210, 180, 140, 0.2);
}

.search-icon {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #8B7355;
    font-size: 14px;
    pointer-events: none;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 16px;
    border-radius: 25px;
    background: rgba(245, 242, 238, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.user-profile:hover {
    background: rgba(210, 180, 140, 0.2);
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, #D2B48C, #C4A484);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 14px;
}

.user-name {
    font-weight: 500;
    color: #2C1810;
    font-size: 14px;
}

/* User Dropdown Menu */
.user-dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border: 1px solid #E8E3DD;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    min-width: 200px;
    z-index: 1001;
    display: none;
    margin-top: 5px;
}

.user-dropdown-menu.show {
    display: block;
}

.user-dropdown-header {
    padding: 12px 16px;
    border-bottom: 1px solid #F5F2EE;
    font-size: 12px;
    color: #8B7355;
}

.user-dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    text-decoration: none;
    color: #2C1810;
    transition: background-color 0.2s;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    cursor: pointer;
    font-size: 14px;
}

.user-dropdown-item:hover {
    background: rgba(245, 242, 238, 0.5);
}

/* Main Navigation */
.main-nav {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(15px);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 30px;
}

.nav-menu {
    display: flex;
    list-style: none;
}

.nav-item {
    position: relative;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 18px 24px;
    text-decoration: none;
    color: #5D4037;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
}

.nav-link:hover,
.nav-link.active {
    color: #8B7355;
    background: rgba(210, 180, 140, 0.1);
    border-bottom-color: #D2B48C;
}

.nav-icon {
    font-size: 16px;
}

/* Main Content */
.main-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 30px;
}

/* Page Header Styles */
.page-header {
    margin-bottom: 40px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
}

.page-header-content {
    flex: 1;
}

.page-back-btn {
    background: rgba(139, 115, 85, 0.1);
    color: #5D4037;
    border: 2px solid #E8E3DD;
    padding: 10px 20px;
    border-radius: 8px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.page-back-btn:hover {
    background: rgba(139, 115, 85, 0.2);
    border-color: #D2B48C;
    transform: translateY(-2px);
}

.page-title {
    font-size: 2.5rem;
    font-weight: 300;
    color: #2C1810;
    margin-bottom: 10px;
    letter-spacing: 1px;
}

.page-subtitle {
    color: #8B7355;
    font-size: 1.1rem;
    font-weight: 400;
}

/* Responsive Design - Mobile First Approach */
@media (max-width: 768px) {
    /* Page header responsive */
    .page-header {
        flex-direction: column;
        align-items: stretch;
    }

    .page-back-btn {
        align-self: flex-start;
        font-size: 13px;
        padding: 8px 16px;
    }

    .page-title {
        font-size: 1.8rem;
    }

    /* Header Layout - Keep elements on same line */
    .header-content {
        padding: 0 15px;
        flex-wrap: wrap;
        /* DO NOT use flex-direction: column - keeps toggle and hamburger on same line */
    }

    .brand-section {
        flex: 1;
        min-width: 0;
    }

    .brand-name {
        font-size: 18px;
    }

    .header-actions {
        gap: 10px;
        flex-shrink: 0;
    }

    /* Hide search on mobile to save space */
    .search-bar {
        display: none;
    }

    /* Simplify user profile on mobile */
    .user-profile {
        padding: 6px 10px;
        gap: 8px;
    }

    .user-name {
        display: none; /* Hide username on mobile */
    }

    .user-avatar {
        width: 28px;
        height: 28px;
        font-size: 12px;
    }

    /* Show mobile menu toggle */
    .mobile-menu-toggle {
        display: block;
        padding: 6px;
        font-size: 20px;
    }

    /* Hide navigation by default on mobile */
    .main-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(20px);
        box-shadow: 0 4px 20px rgba(0,0,0,0.1);
        z-index: 999;
    }

    /* Show navigation when active */
    .main-nav.mobile-active {
        display: block;
    }

    .nav-container {
        padding: 0;
    }

    .nav-menu {
        flex-direction: column;
    }

    .nav-link {
        padding: 15px 20px;
        border-bottom: 1px solid #F5F2EE;
        border-left: none;
    }

    .nav-link:hover,
    .nav-link.active {
        border-bottom: 1px solid #F5F2EE;
        border-left: 4px solid #D2B48C;
    }

    /* Main Content */
    .main-content {
        padding: 20px 15px;
    }

    /* Page Headers */
    .page-title {
        font-size: 2rem;
    }

    /* Form Controls - Responsive */
    .search-input,
    .header-search-input {
        width: 100%;
        max-width: 250px;
    }

    /* Category and Search Controls */
    .category-controls,
    .search-controls,
    .location-controls,
    .search-filters {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
    }

    /* Action Bars */
    .action-bar {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
    }

    .action-bar-left, 
    .action-bar-right {
        justify-content: center;
    }

    /* Filter Controls */
    .filter-controls {
        flex-direction: column;
    }

    .filter-controls select {
        width: 100%;
    }

    /* Table Responsiveness - All tables now have 3 columns: Item, Location, Actions */
    
    .inline-table-header,
    .inline-table-row {
        grid-template-columns: 2fr 1fr auto !important;
    }
    
    .action-buttons-cell .btn-small {
        padding: 6px 8px;
        font-size: 0.75rem;
        margin: 0 2px;
    }
    
    .type-filter-tabs {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .type-tab {
        flex: 1 1 calc(50% - 0.25rem);
        min-width: 120px;
        font-size: 0.875rem;
        padding: 10px 15px;
    }
    
    /* Data tables - horizontal scroll with sticky header */
    .data-table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .data-table {
        min-width: 600px;
    }
    
    .data-table thead {
        position: sticky;
        top: 0;
        z-index: 10;
        background: linear-gradient(135deg, #8B7355, #7A6B47);
    }

    /* Data Tables */
    .data-table-container {
        font-size: 12px;
    }

    .data-table {
        width: 100%;
        border-collapse: collapse;
        font-size: 14px;
        margin-top: 20px;
    }

    .data-table th {
        background: rgba(245, 242, 238, 0.8);
        padding: 15px;
        text-align: left;
        font-weight: 600;
        color: #2C1810;
        border-bottom: 1px solid #F5F2EE;
        font-size: 14px;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }

    .data-table td {
        padding: 15px;
        border-bottom: 1px solid #F5F2EE;
        color: #5D4037;
        vertical-align: middle;
    }

    /* Action Buttons */
    .action-buttons {
        flex-direction: column;
        gap: 4px;
    }

    .action-buttons-cell {
        flex-direction: column;
    }

    .btn-small {
        padding: 4px 8px;
        font-size: 11px;
    }

    /* Dashboard specific */
    .stats-grid {
        grid-template-columns: 1fr;
    }

    /* Project specific */
    .project-controls {
        flex-direction: column;
        gap: 10px;
    }

    /* Settings specific */
    .settings-grid {
        grid-template-columns: 1fr;
    }

    /* Coming soon containers */
    .coming-soon-container {
        padding: 40px 25px;
    }

    .coming-soon-title {
        font-size: 1.8rem;
    }

    /* Feature previews */
    .feature-preview,
    .resource-categories,
    .preview-charts {
        grid-template-columns: 1fr;
    }

    /* Email signup forms */
    .email-signup {
        flex-direction: column;
    }

    /* Pagination */
    .pagination {
        flex-direction: column;
        gap: 10px;
    }

    /* Modal Responsiveness */
    .modal {
        padding: 10px;
    }

    .modal-content {
        max-height: 95vh;
    }

    .modal-header,
    .modal-body,
    .modal-footer {
        padding: 20px;
    }

    .form-row {
        flex-direction: column;
        gap: 15px;
    }

    .modal-footer {
        flex-direction: column;
    }

    .modal-footer .btn {
        width: 100%;
        justify-content: center;
    }

    /* AI Assistant Sidebar */
    .ai-sidebar-trigger {
        position: fixed !important;
        right: 0 !important;
        top: 50% !important;
        transform: translateY(-50%) !important;
        width: 50px !important;
        height: 200px !important;
        background: linear-gradient(135deg, #8B7355 0%, #A1887F 100%) !important;
        border-radius: 25px 0 0 25px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        cursor: pointer !important;
        z-index: 9999 !important;
        transition: all 0.3s ease !important;
        box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1) !important;
        writing-mode: vertical-rl !important;
        text-orientation: mixed !important;
        color: white !important;
        font-weight: 600 !important;
        font-size: 14px !important;
        letter-spacing: 1px !important;
    }

    .ai-sidebar-trigger:hover {
        width: 60px;
        box-shadow: -4px 0 15px rgba(0, 0, 0, 0.2);
    }

    .ai-sidebar-trigger.expanded {
        transform: translateY(-50%) translateX(-400px);
    }

    .ai-sidebar {
        position: fixed !important;
        right: -400px !important;
        top: 0 !important;
        width: 400px !important;
        height: 100vh !important;
        background: white !important;
        box-shadow: -4px 0 20px rgba(0, 0, 0, 0.15) !important;
        z-index: 10000 !important;
        display: flex !important;
        flex-direction: column !important;
        transition: right 0.3s ease !important;
    }

    .ai-sidebar.expanded {
        right: 0;
    }

    .ai-sidebar-header {
        background: linear-gradient(135deg, #8B7355 0%, #A1887F 100%);
        color: white;
        padding: 20px;
        display: flex;
        justify-content: space-between;
        align-items: center;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    }

    .ai-sidebar-title {
        display: flex;
        align-items: center;
        gap: 10px;
    }

    .ai-sidebar-title h3 {
        margin: 0;
        font-size: 1.2rem;
        font-weight: 600;
    }

    .ai-sidebar-icon {
        font-size: 1.3rem;
        color: #D2B48C;
    }

    .ai-sidebar-controls {
        display: flex;
        align-items: center;
        gap: 5px;
    }

    .ai-sidebar-btn {
        background: none;
        border: none;
        color: white;
        font-size: 1rem;
        cursor: pointer;
        padding: 5px;
        border-radius: 4px;
        transition: background-color 0.2s;
    }

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

    .ai-sidebar-messages {
        flex: 1;
        overflow-y: auto;
        padding: 20px;
        background: #FAFAFA;
    }

    .ai-message, .user-message {
        display: flex;
        gap: 12px;
        margin-bottom: 20px;
        animation: fadeInUp 0.3s ease;
    }

    .ai-message-avatar {
        width: 36px;
        height: 36px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 14px;
        flex-shrink: 0;
        background: linear-gradient(135deg, #8B7355 0%, #A1887F 100%);
        color: white;
    }

    .user-message-avatar {
        width: 36px;
        height: 36px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 14px;
        flex-shrink: 0;
        background: #D2B48C;
        color: white;
    }

    .user-message {
        flex-direction: row-reverse;
    }

    .ai-message-content, .user-message-content {
        background: white;
        padding: 12px 16px;
        border-radius: 12px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
        max-width: 280px;
        line-height: 1.5;
        font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    }

    .user-message-content {
        background: #E8E3DD;
    }

    .ai-message-content h2, .ai-message-content h3, .ai-message-content h4 {
        margin: 0 0 8px 0;
        color: #8B7355;
        font-size: 14px;
        font-weight: 600;
    }

    .ai-message-content p, .user-message-content p {
        margin: 0 0 8px 0;
        font-size: 14px;
    }

    .ai-message-content p:last-child, .user-message-content p:last-child {
        margin-bottom: 0;
    }

    .ai-message-content ul, .user-message-content ul {
        margin: 8px 0;
        padding-left: 20px;
    }

    .ai-message-content li, .user-message-content li {
        margin-bottom: 4px;
        font-size: 14px;
    }

    .ai-message-content strong {
        color: #8B7355;
        font-weight: 600;
    }

    .ai-sidebar-input-container {
        padding: 20px;
        background: white;
        border-top: 1px solid #E8E3DD;
    }

    .ai-sidebar-input-wrapper {
        display: flex;
        gap: 10px;
        align-items: flex-end;
    }

    .ai-sidebar-input {
        flex: 1;
        border: 2px solid #E8E3DD;
        border-radius: 12px;
        padding: 12px 16px;
        font-family: inherit;
        font-size: 14px;
        resize: none;
        min-height: 44px;
        max-height: 120px;
        transition: border-color 0.2s;
    }

    .ai-sidebar-input:focus {
        outline: none;
        border-color: #D2B48C;
    }

    .ai-sidebar-send {
        background: linear-gradient(135deg, #8B7355 0%, #A1887F 100%);
        color: white;
        border: none;
        border-radius: 50%;
        width: 44px;
        height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        transition: transform 0.2s, box-shadow 0.2s;
        flex-shrink: 0;
    }

    .ai-sidebar-send:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(139, 115, 85, 0.3);
    }

    .ai-sidebar-send:disabled {
        opacity: 0.6;
        cursor: not-allowed;
        transform: none;
        box-shadow: none;
    }

    .ai-typing-indicator {
        display: flex;
        align-items: center;
        gap: 8px;
        color: #8B7355;
        font-style: italic;
        margin-bottom: 10px;
    }

    .ai-typing-dots {
        display: flex;
        gap: 4px;
    }

    .ai-typing-dot {
        width: 6px;
        height: 6px;
        background: #8B7355;
        border-radius: 50%;
        animation: typingDot 1.4s infinite;
    }

    .ai-typing-dot:nth-child(2) {
        animation-delay: 0.2s;
    }

    .ai-typing-dot:nth-child(3) {
        animation-delay: 0.4s;
    }

    @keyframes typingDot {
        0%, 60%, 100% {
            opacity: 0.3;
            transform: scale(0.8);
        }
        30% {
            opacity: 1;
            transform: scale(1);
        }
    }

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

    .ai-sidebar-actions {
        margin-top: 15px;
        display: flex;
        gap: 10px;
        justify-content: center;
    }

    .btn-small {
        padding: 8px 16px;
        font-size: 13px;
    }

    .intent-indicator {
        background: rgba(139, 115, 85, 0.1);
        color: #8B7355;
        padding: 6px 12px;
        border-radius: 20px;
        font-size: 12px;
        font-weight: 600;
        margin-bottom: 10px;
        display: inline-flex;
        align-items: center;
        gap: 6px;
    }

    @keyframes typingDot {
        0%, 60%, 100% {
            opacity: 0.3;
            transform: scale(0.8);
        }
        30% {
            opacity: 1;
            transform: scale(1);
        }
    }

    .ai-welcome-message {
        display: flex;
        gap: 12px;
        margin-bottom: 20px;
    }

    .ai-welcome-message .ai-avatar {
        width: 36px;
        height: 36px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 14px;
        flex-shrink: 0;
        background: linear-gradient(135deg, #8B7355 0%, #A1887F 100%);
        color: white;
    }

    .ai-welcome-message .ai-message-content {
        background: white;
        padding: 12px 16px;
        border-radius: 12px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
        max-width: 280px;
        line-height: 1.5;
    }

    .ai-welcome-message .ai-message-content p {
        margin: 0 0 8px 0;
    }

    .ai-welcome-message .ai-message-content p:last-child {
        margin-bottom: 0;
    }

    .ai-welcome-message .ai-message-content ul {
        margin: 8px 0;
        padding-left: 20px;
    }

    .ai-welcome-message .ai-message-content li {
        margin-bottom: 4px;
    }

    /* Mobile responsiveness for AI sidebar */
    @media (max-width: 768px) {
        .ai-sidebar {
            width: 100vw;
            right: -100vw;
        }
        
        .ai-sidebar-trigger.expanded {
            transform: translateY(-50%) translateX(-100vw);
        }
        
        .ai-sidebar-trigger {
            width: 40px;
            height: 150px;
            font-size: 12px;
        }
        
        .ai-sidebar-trigger:hover {
            width: 45px;
        }
    }

    /* Hide theme indicators on mobile */
    .theme-indicator {
        display: none;
    }
}

/* Data Tables - Global Styles */
.data-table-container {
    font-size: 12px;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    margin-top: 20px;
}

.data-table th {
    background: rgba(245, 242, 238, 0.8);
    padding: 15px;
    text-align: left;
    font-weight: 600;
    color: #2C1810;
    border-bottom: 1px solid #F5F2EE;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.data-table td {
    padding: 15px;
    border-bottom: 1px solid #F5F2EE;
    color: #5D4037;
    vertical-align: middle;
}

/* Status and Priority Badges */
.status-badge, .priority-badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: capitalize;
    white-space: nowrap;
}

/* Status Badge Colors */
.status-planning {
    background: rgba(52, 152, 219, 0.1);
    color: #3498DB;
}

.status-in-progress {
    background: rgba(243, 156, 18, 0.1);
    color: #F39C12;
}

.status-completed {
    background: rgba(39, 174, 96, 0.1);
    color: #27AE60;
}

.status-pending {
    background: rgba(52, 152, 219, 0.1);
    color: #3498DB;
}

/* Priority Badge Colors */
.priority-high {
    background: rgba(231, 76, 60, 0.1);
    color: #E74C3C;
}

.priority-critical {
    background: rgba(231, 76, 60, 0.2);
    color: #E74C3C;
    font-weight: 700;
}

.priority-medium {
    background: rgba(243, 156, 18, 0.1);
    color: #F39C12;
}

.priority-low {
    background: rgba(52, 152, 219, 0.1);
    color: #3498DB;
}

/* Overdue styling - shared across pages */
.overdue {
    color: #E74C3C !important;
    font-weight: 600;
}

.overdue-row {
    background: rgba(231, 76, 60, 0.05) !important;
}

/* Date formatting utilities */
.date-display {
    font-weight: 500;
}

.date-overdue {
    color: #E74C3C;
    font-weight: 600;
}

/* Utility Classes */
.btn {
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    text-decoration: none;
    border: none;
}

.btn-primary {
    background: linear-gradient(135deg, #D2B48C, #C4A484);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(210, 180, 140, 0.3);
}

.btn-secondary {
    background: rgba(210, 180, 140, 0.1);
    color: #8B7355;
    border: 1px solid #D2B48C;
}

.btn-secondary:hover {
    background: rgba(210, 180, 140, 0.2);
}

.btn-danger {
    background: rgba(231, 76, 60, 0.1);
    color: #E74C3C;
    border: 1px solid rgba(231, 76, 60, 0.2);
}

.btn-danger:hover {
    background: rgba(231, 76, 60, 0.2);
    border-color: #E74C3C;
}

/* Action Button Styles */
.action-btn {
    background: linear-gradient(135deg, #D2B48C, #C4A484);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(210, 180, 140, 0.3);
}

.action-btn.secondary {
    background: rgba(210, 180, 140, 0.1);
    color: #8B7355;
    border: 1px solid #D2B48C;
}

.action-btn.secondary:hover {
    background: rgba(210, 180, 140, 0.2);
}

/* Small Button Styles */
.btn-small {
    padding: 6px 8px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s ease;
}

.btn-edit {
    background: #007bff;
    color: white;
}

.btn-edit:hover {
    background: #0056b3;
}

.btn-delete {
    background: #dc3545;
    color: white;
}

.btn-delete:hover {
    background: #c82333;
}

/* Search Input Styles */
.search-input {
    background: rgba(245, 242, 238, 0.8);
    border: 1px solid #E8E3DD;
    padding: 10px 15px;
    border-radius: 8px;
    width: 300px;
    font-size: 14px;
    color: #2C1810;
    transition: all 0.3s ease;
}

.search-input:focus {
    outline: none;
    border-color: #D2B48C;
    background: white;
    box-shadow: 0 0 0 3px rgba(210, 180, 140, 0.1);
}

/* Control Layout Styles */
.category-controls, .search-controls, .location-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    flex-wrap: wrap;
    gap: 15px;
}

.search-controls {
    display: flex;
    gap: 15px;
    align-items: center;
}

.action-buttons {
    display: flex;
    gap: 10px;
}

/* Condition Badge Styles */
.condition-badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.condition-new { background: #d4edda; color: #155724; }
.condition-excellent { background: #cce5ff; color: #004085; }
.condition-good { background: #fff3cd; color: #856404; }
.condition-fair { background: #f8d7da; color: #721c24; }
.condition-poor { background: #f5c6cb; color: #721c24; }

/* Notification System */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    border-radius: 8px;
    color: white;
    font-weight: 500;
    z-index: 10000;
    transform: translateX(400px);
    transition: transform 0.3s ease;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.notification.show {
    transform: translateX(0);
}

.notification.success { background: #28a745; }
.notification.error { background: #dc3545; }
.notification.warning { background: #ffc107; color: #212529; }
.notification.info { background: #17a2b8; }

/* Form Inputs */
.form-input {
    background: rgba(245, 242, 238, 0.8);
    border: 1px solid #E8E3DD;
    padding: 10px 15px;
    border-radius: 8px;
    font-size: 14px;
    color: #2C1810;
    transition: all 0.3s ease;
}

.form-input:focus {
    outline: none;
    border-color: #D2B48C;
    background: white;
    box-shadow: 0 2px 10px rgba(210, 180, 140, 0.2);
}

.form-select {
    background: rgba(245, 242, 238, 0.8);
    border: 1px solid #E8E3DD;
    padding: 10px 15px;
    border-radius: 8px;
    font-size: 14px;
    color: #2C1810;
    cursor: pointer;
    transition: all 0.3s ease;
}

.form-select:focus {
    outline: none;
    border-color: #D2B48C;
    background: white;
    box-shadow: 0 2px 10px rgba(210, 180, 140, 0.2);
}

/* Content Sections */
.content-section {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(15px);
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 30px;
    border: 1px solid #F5F2EE;
    box-shadow: 0 4px 20px rgba(0,0,0,0.03);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid #F5F2EE;
}

.section-title {
    font-size: 1.4rem;
    font-weight: 600;
    color: #2C1810;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-icon {
    color: #D2B48C;
    font-size: 1.2rem;
}

/* Loading States */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #D2B48C;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Empty States */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #8B7355;
}

.empty-state i {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}

/* ===== UNIVERSAL SEARCH MODAL ===== */
.search-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
}

.search-modal-content {
    background-color: #fefefe;
    margin: 5% auto;
    padding: 0;
    border: none;
    border-radius: 12px;
    width: 90%;
    max-width: 800px;
    max-height: 80vh;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.search-modal-header {
    background: linear-gradient(135deg, #8B4513 0%, #A0522D 100%);
    color: white;
    padding: 20px;
    border-radius: 12px 12px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.search-modal-title {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
}

.search-modal-close {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s;
}

.search-modal-close:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.search-modal-body {
    padding: 20px;
    max-height: 60vh;
    overflow-y: auto;
}

.search-loading {
    text-align: center;
    padding: 40px;
    color: #666;
}

.search-loading .loading {
    width: 40px;
    height: 40px;
    margin: 0 auto 15px;
}

.search-results-section {
    margin-bottom: 25px;
}

.search-results-section:last-child {
    margin-bottom: 0;
}

.search-section-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: #8B4513;
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 2px solid #f0f0f0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.search-section-count {
    background: #8B4513;
    color: white;
    font-size: 0.8rem;
    padding: 2px 8px;
    border-radius: 12px;
    font-weight: 500;
}

.search-results-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.search-result-item {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 15px;
    cursor: pointer;
    transition: all 0.2s;
}

.search-result-item:hover {
    background: #e9ecef;
    border-color: #8B4513;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(139, 69, 19, 0.1);
}

.search-result-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
}

.search-result-title {
    font-weight: 600;
    color: #333;
    margin: 0;
    font-size: 1rem;
}

.search-result-type {
    background: #6c757d;
    color: white;
    font-size: 0.75rem;
    padding: 2px 6px;
    border-radius: 4px;
    text-transform: uppercase;
    font-weight: 500;
}

.search-result-type.items { background: #28a745; }
.search-result-type.projects { background: #007bff; }
.search-result-type.locations { background: #ffc107; color: #333; }

.search-result-details {
    color: #666;
    font-size: 0.9rem;
    line-height: 1.4;
}

.search-result-meta {
    display: flex;
    gap: 15px;
    margin-top: 8px;
    font-size: 0.8rem;
    color: #888;
}

.search-no-results {
    text-align: center;
    padding: 40px;
    color: #666;
}

.search-no-results i {
    font-size: 3rem;
    color: #ddd;
    margin-bottom: 15px;
}

.search-error {
    text-align: center;
    padding: 40px;
    color: #dc3545;
}

.search-error i {
    font-size: 3rem;
    margin-bottom: 15px;
}

/* Enhanced AI Chat Styles */

/* Enhanced Project Plan Display */
.project-plan-message {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 2px solid #D2B48C;
    border-radius: 12px;
    padding: 16px;
    margin: 10px 0;
}

.project-plan-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    color: #8B7355;
    font-weight: 600;
}

.project-plan-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    flex-wrap: wrap;
}

.project-plan-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.btn-add-project {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
}

.btn-add-project:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

.btn-modify-plan {
    background: rgba(108, 117, 125, 0.1);
    color: #6c757d;
    border: 1px solid #6c757d;
}

.btn-modify-plan:hover {
    background: rgba(108, 117, 125, 0.2);
}

/* Intent Indicators */
.intent-indicator {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
    margin-bottom: 8px;
}

.intent-lookup { background: rgba(52, 152, 219, 0.1); color: #3498DB; }
.intent-add_inventory { background: rgba(40, 167, 69, 0.1); color: #28a745; }
.intent-maintenance { background: rgba(255, 193, 7, 0.1); color: #ffc107; }
.intent-project_help { background: rgba(156, 39, 176, 0.1); color: #9c27b0; }
.intent-general_woodworking { background: rgba(108, 117, 125, 0.1); color: #6c757d; }

/* Mobile responsiveness */
@media (max-width: 768px) {
    .project-plan-actions {
        flex-direction: column;
    }
    
    .project-plan-btn {
        width: 100%;
        justify-content: center;
    }
    
    .search-modal-content {
        margin: 10px;
        width: calc(100% - 20px);
        max-height: 90vh;
    }
    
    .search-modal-header {
        padding: 15px;
    }
    
    .search-modal-title {
        font-size: 1.3rem;
    }
    
    .search-modal-body {
        padding: 15px;
        max-height: 70vh;
    }
    
    .search-result-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .search-result-meta {
        flex-direction: column;
        gap: 5px;
    }
}

/* Footer */
.main-footer {
    background: #4E342E;
    color: #FAFAFA;
    padding: 60px 0 20px;
    margin-top: 60px;
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    margin-bottom: 40px;
}

.footer-brand p {
    margin-top: 16px;
    opacity: 0.8;
}

.footer-logo {
    height: 40px;
    margin-bottom: 16px;
}

.footer-links {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;
}

.link-group h4 {
    margin-bottom: 16px;
    color: #A1887F;
}

.link-group a {
    display: block;
    color: #BCAAA4;
    text-decoration: none;
    margin-bottom: 8px;
    transition: color 0.3s ease;
    font-weight: 500;
}

.link-group a:hover {
    color: #D7CCC8;
}

.footer-bottom {
    border-top: 1px solid #6D4C41;
    padding-top: 20px;
    padding-bottom: 20px;
    text-align: center;
    opacity: 0.8;
}

.footer-bottom a {
    color: #BCAAA4;
    text-decoration: underline;
    font-weight: 500;
}

.footer-bottom a:hover {
    color: #A1887F;
    text-decoration: none;
}

/* Responsive data table visibility */
@media (max-width: 768px) {
  table.data-table {
    width: 100%;
    table-layout: fixed;
  }

  /* Hide non-essential columns on mobile */
  table.data-table th:nth-child(2),
  table.data-table td:nth-child(2), /* Category */
  table.data-table th:nth-child(3),
  table.data-table td:nth-child(3), /* Quantity */
  table.data-table th:nth-child(5),
  table.data-table td:nth-child(5), /* Unit Cost */
  table.data-table th:nth-child(6),
  table.data-table td:nth-child(6)  /* Total Cost */ {
    display: none !important;
  }

  /* Keep only Item (1), Location (4), and Actions (7) */
  table.data-table th:nth-child(1),
  table.data-table td:nth-child(1) {
    width: 50% !important;
  }

  table.data-table th:nth-child(4),
  table.data-table td:nth-child(4) {
    width: 30% !important;
  }

  table.data-table th:nth-child(7),
  table.data-table td:nth-child(7) {
    width: 20% !important;
    text-align: center !important;
  }

  /* Make action buttons smaller on mobile */
  table.data-table .btn {
    padding: 0.25rem 0.5rem !important;
    font-size: 0.8rem !important;
    margin: 0.1rem !important;
  }

  /* Ensure the table scrolls horizontally if it overflows */
  .data-table-container {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
  }
}
