/**
 * Dashboard Stylesheet
 * File: src/frontend/styles/dashboard.css
 * Purpose: Responsive styling for customer dashboard
 * Responsive Breakpoints:
 *   - Mobile: 320px - 640px
 *   - Tablet: 641px - 1024px
 *   - Desktop: 1025px+
 */

:root {
    --dashboard-bg: #f9fafb;
    --dashboard-card-bg: #ffffff;
    --dashboard-sidebar-bg: #1f2937;
    --dashboard-sidebar-text: #e5e7eb;
    --dashboard-text: #111827; /* primary text on dashboard content */
    --dashboard-muted: #6b7280; /* secondary/muted text */
    --dashboard-border: #e5e7eb;
    --dashboard-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    --dashboard-transition: all 0.3s ease;

    --status-confirmed: #3b82f6;
    --status-confirmed-light: #dbeafe;
    --status-in-progress: #f59e0b;
    --status-in-progress-light: #fef3c7;
    --status-completed: #10b981;
    --status-completed-light: #d1fae5;
    --status-cancelled: #6b7280;
    --status-cancelled-light: #f3f4f6;
}

/* ===== LAYOUT ===== */

.dashboard-body {
    margin: 0;
    padding: 0;
    background-color: var(--dashboard-bg);
    max-width: 100vw;
    overflow-x: hidden;
}

.dashboard-container {
    display: flex;
    height: 100vh;
    height: 100dvh; /* Dynamic viewport height for mobile browsers */
    overflow: hidden;
}

.dashboard-sidebar {
    width: 280px;
    background-color: var(--dashboard-sidebar-bg);
    color: var(--dashboard-sidebar-text);
    display: flex;
    flex-direction: column;
    border-right: 1px solid var(--dashboard-border);
    overflow: hidden;
    transition: var(--dashboard-transition);
    z-index: 100;
    height: 100vh;
    height: 100dvh;
    flex-shrink: 0; /* Prevent sidebar from shrinking */
}

.dashboard-sidebar.sidebar-collapsed {
    width: 80px;
}

/* ===== SIDEBAR HEADER ===== */
.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    height: 64px;
}

.sidebar-header-spacer {
    flex: 1;
}

.sidebar-toggle-btn {
    background: none;
    border: none;
    color: var(--dashboard-sidebar-text);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 0.375rem;
    transition: var(--dashboard-transition);
}

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

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

/* ===== SIDEBAR USER INFO ===== */
.sidebar-user-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 0.5rem;
    overflow: hidden;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #3b82f6;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 1rem;
    flex-shrink: 0;
}

.user-details {
    flex: 1;
    overflow: hidden;
    transition: opacity 0.2s ease;
}

.sidebar-collapsed .user-details {
    display: none;
    opacity: 0;
}

.user-name {
    font-size: 0.9rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: white;
}

.user-email {
    font-size: 0.75rem;
    color: #9ca3af;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dashboard-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0; /* Prevents flex items from overflowing */
    overflow-y: auto;
    overflow-x: hidden;
    height: 100vh;
    height: 100dvh;
}

.page-content {
    padding: 2rem;
    width: 100%;
}

/* ... */

.sidebar-nav-links {
    list-style: none;
    padding: 1rem 0.5rem;
    flex: 1;
    margin: 0;
    overflow-y: auto; /* Enable scrolling for links area */
    min-height: 0; /* Critical for flexbox scrolling */
    scrollbar-width: thin; /* Firefox */
    scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}

/* Webkit scrollbar for sidebar */
.sidebar-nav-links::-webkit-scrollbar {
    width: 4px;
}
.sidebar-nav-links::-webkit-scrollbar-track {
    background: transparent;
}
.sidebar-nav-links::-webkit-scrollbar-thumb {
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 20px;
}

.sidebar-nav-links li {
    margin-bottom: 0.5rem;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: var(--dashboard-sidebar-text);
    text-decoration: none;
    border-radius: 0.375rem;
    transition: var(--dashboard-transition);
    position: relative;
    border: none;
    background: none;
    cursor: pointer;
    width: 100%;
    text-align: left;
    font-size: 0.95rem;
}

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

.nav-link.active {
    background-color: #3b82f6;
    color: white;
}

.nav-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.nav-label {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
}

.nav-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    background-color: #ef4444;
    color: white;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
    flex-shrink: 0;
}

.nav-link.secondary {
    opacity: 0.85;
}

.logout-btn {
    color: #fca5a5;
}

.logout-btn:hover {
    background-color: rgba(252, 165, 165, 0.1);
}

/* ===== SIDEBAR SECONDARY ACTIONS ===== */

.sidebar-secondary-actions {
    padding: 1rem 0.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-secondary-actions ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-secondary-actions li {
    margin-bottom: 0.5rem;
}

.sidebar-secondary-actions .nav-link {
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
}

/* ===== SIDEBAR OVERLAY (Mobile) ===== */

.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0s linear 0.3s;
    z-index: 50;
    pointer-events: none; /* don't block interactions when inactive */
}

.sidebar-overlay.active {
    opacity: 1;
    visibility: visible;
    transition-delay: 0s;
    pointer-events: auto;
}

/* ===== MOBILE HEADER ===== */

.mobile-header {
    display: none;
    background-color: var(--dashboard-card-bg);
    border-bottom: 1px solid var(--dashboard-border);
    padding: 1rem;
    gap: 1rem;
    align-items: center;
    justify-content: space-between;
}

.mobile-header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    color: #374151;
    width: 32px;
    height: 32px;
}

.mobile-menu-btn svg {
    width: 24px;
    height: 24px;
}

.mobile-page-title {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 700;
    color: #111827;
}

.mobile-header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Prevent body scroll when mobile sidebar/menu is open */
body.no-scroll {
    overflow: hidden;
    touch-action: none;
}

.notification-bell {
    position: relative;
    cursor: pointer;
    width: 24px;
    height: 24px;
    color: #374151;
    transition: var(--dashboard-transition);
}

.notification-bell:hover {
    color: #3b82f6;
}

.notification-bell svg {
    width: 24px;
    height: 24px;
}

.notification-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    background-color: #ef4444;
    color: white;
    border-radius: 999px;
    font-size: 0.65rem;
    font-weight: 700;
    border: 2px solid var(--dashboard-card-bg);
}

/* ===== DASHBOARD CARD STYLES ===== */

.dashboard-card {
    background: var(--dashboard-card-bg);
    border: 1px solid var(--dashboard-border);
    border-radius: 0.5rem;
    padding: 1.5rem;
    box-shadow: var(--dashboard-shadow);
    transition: var(--dashboard-transition);
}

.dashboard-card:hover {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* ===== STATUS BADGES ===== */

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.875rem;
    border-radius: 999px;
    font-size: 0.875rem;
    font-weight: 500;
    white-space: nowrap;
}

.status-badge.confirmed {
    background-color: var(--status-confirmed-light);
    color: #1e40af;
}

.status-badge.in-progress {
    background-color: var(--status-in-progress-light);
    color: #92400e;
}

.status-badge.completed {
    background-color: var(--status-completed-light);
    color: #065f46;
}

.status-badge.cancelled {
    background-color: var(--status-cancelled-light);
    color: #4b5563;
}

/* ===== SERVICE TIER BADGES ===== */

.service-tier-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.875rem;
    border-radius: 999px;
    font-size: 0.875rem;
    font-weight: 600;
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.service-tier-badge.materials_only {
    background-color: #10b981;
    color: white;
}

.service-tier-badge.byoi {
    background-color: #3b82f6;
    color: white;
}

/* Phase 6: BYOI Certified tier (replaces full_service) */
.service-tier-badge.byoi_certified,
.service-tier-badge.byoi-certified,
.service-tier-badge.full_service {
    background-color: #8b5cf6;
    color: white;
}

/* Tooltip on hover */
.service-tier-badge:hover {
    opacity: 0.9;
    cursor: help;
}

/* ===== BUTTONS ===== */

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1rem;
    border-radius: 0.375rem;
    font-weight: 500;
    border: none;
    cursor: pointer;
    transition: var(--dashboard-transition);
    font-size: 0.95rem;
}

.btn-primary {
    background-color: #3b82f6;
    color: white;
}

.btn-primary:hover {
    background-color: #1d4ed8;
}

.btn-secondary {
    background-color: var(--dashboard-card-bg);
    color: #374151;
    border: 1px solid var(--dashboard-border);
}

.btn-secondary:hover {
    background-color: var(--dashboard-bg);
}

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

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

/* ===== RESPONSIVE DESIGN ===== */

/* Tablet (641px - 1024px) */
@media (max-width: 1024px) {
    .page-content {
        padding: 1.5rem;
    }

    .dashboard-sidebar {
        width: 240px;
    }
}

/* Mobile (320px - 640px) */
@media (max-width: 640px) {
    /* Keep flex layout but sidebar is position: fixed so it doesn't take up space */
    .dashboard-container {
        flex-direction: row;
    }

    .dashboard-sidebar {
        position: fixed;
        left: 0;
        top: 0;
        width: 280px;
        height: 100vh;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        z-index: 101;
    }

    /* When sidebarOpen = true, sidebar-collapsed class is NOT applied, so sidebar is visible */
    .dashboard-sidebar:not(.sidebar-collapsed) {
        width: 280px;
        transform: translateX(0);
    }
    
    /* When sidebarOpen = false, sidebar-collapsed class IS applied, sidebar stays hidden */
    .dashboard-sidebar.sidebar-collapsed {
        transform: translateX(-100%);
    }

/* Breadcrumb spacing so it sits below the sticky global header */
.dashboard-main .breadcrumb-section {
    margin-top: 0.75rem;
}

    .sidebar-overlay {
        display: block;
    }

    .sidebar-overlay.active {
        display: block;
    }

    .mobile-header {
        display: flex;
    }

    .mobile-menu-btn {
        display: flex;
    }

    .dashboard-main {
        flex: 1;
        min-height: 0;
    }

    .page-content {
        padding: 1rem;
        height: calc(100vh - 80px);
    }

    .logo-text {
        display: none;
    }

    .user-details {
        display: none;
    }

    /* On mobile: sidebarOpen === true => sidebar shown (translateX(0)).
       When sidebarOpen === false, sidebar-collapsed class is applied => sidebar hidden (translateX(-100%)). */

    .sidebar-nav-links {
        padding: 0.75rem 0.5rem;
    }

    .nav-link {
        padding: 0.625rem 0.75rem;
    }
}

/* Small Mobile (320px - 480px) */
@media (max-width: 480px) {
    .page-content {
        padding: 0.75rem;
    }

    .dashboard-card {
        padding: 1rem;
    }

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

    .mobile-page-title {
        font-size: 1.1rem;
    }
}

/* ===== ACCESSIBILITY ===== */

@media (prefers-reduced-motion: reduce) {
    * {
        transition: none !important;
        animation: none !important;
    }
}

/* High contrast mode support */
@media (prefers-contrast: more) {
    .nav-link {
        border: 1px solid transparent;
    }

    .nav-link:focus {
        outline: 2px solid #3b82f6;
        outline-offset: 2px;
    }
}

/* Focus visible for keyboard navigation */
.nav-link:focus-visible {
    outline: 2px solid #3b82f6;
    outline-offset: -2px;
}

/* Dark mode support (future enhancement) */
@media (prefers-color-scheme: dark) {
    :root {
        /* Keep overall dashboard background darker but keep card surfaces light for readability */
        --dashboard-bg: #0f1724;
        --dashboard-card-bg: #ffffff; /* ensure main cards/content remain light */
        --dashboard-border: #374151;
        --dashboard-sidebar-bg: #111827;
        --dashboard-sidebar-text: #e5e7eb;
        --dashboard-text: #e5e7eb;
        --dashboard-muted: #9ca3af;
    }
}

/* Apply readable text colors to main content and widgets */
.dashboard-main,
.page-content,
.page-container {
    color: var(--dashboard-text);
}

/* Muted text used for secondary labels */
.dashboard-main .muted,
.page-content .muted {
    color: var(--dashboard-muted);
}

/* Ensure headings are high contrast */
.page-content h1,
.page-content h2,
.page-content h3,
.page-content h4 {
    color: var(--dashboard-text);
}

/* For small widget areas that may sit directly on the background, ensure good contrast */
.small-widget,
.stat-tile,
.dashboard-card--bare {
    color: var(--dashboard-text);
}

/* ===== LOADING STATES ===== */

.loading {
    opacity: 0.6;
    pointer-events: none;
}

.skeleton {
    background: linear-gradient(90deg, #e5e7eb 25%, #f3f4f6 50%, #e5e7eb 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
}

@keyframes skeleton-loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* ===== ANIMATIONS ===== */

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

@keyframes slideInLeft {
    from {
        transform: translateX(-20px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.fade-in {
    animation: fadeIn 0.3s ease;
}

.slide-in-left {
    animation: slideInLeft 0.3s ease;
}

/* ===== PRINT STYLES ===== */

@media print {
    .dashboard-sidebar,
    .mobile-header,
    .sidebar-overlay {
        display: none !important;
    }

    .dashboard-main {
        margin: 0;
    }

    .page-content {
        padding: 0;
    }
}

/* ===== DASHBOARD OVERVIEW STYLES ===== */

.page-heading {
    font-size: 2rem;
    font-weight: 700;
    color: #111827;
    margin: 0 0 0.5rem 0;
}

.page-subtitle {
    font-size: 0.95rem;
    color: #6b7280;
    margin: 0;
}

.welcome-section {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--dashboard-border);
}

.welcome-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

/* ===== ALERT STYLES ===== */

.alert {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    border-radius: 0.5rem;
    margin-bottom: 1.5rem;
    border: 1px solid transparent;
}

.alert-error {
    background-color: #fee2e2;
    border-color: #fecaca;
    color: #991b1b;
}

.alert-success {
    background-color: #dcfce7;
    border-color: #bbf7d0;
    color: #166534;
}

.alert-warning {
    background-color: #fef3c7;
    border-color: #fde68a;
    color: #92400e;
}

.alert-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

/* ===== SECTION HEADER ===== */

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.section-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1f2937;
    margin: 0;
}

.section-link {
    font-size: 0.9rem;
    color: #3b82f6;
    text-decoration: none;
    font-weight: 500;
    transition: var(--dashboard-transition);
}

.section-link:hover {
    color: #2563eb;
    text-decoration: underline;
}

/* ===== DASHBOARD SECTION ===== */

.dashboard-section {
    margin-bottom: 2rem;
}

/* ===== EMPTY STATE ===== */

.empty-state {
    text-align: center;
    padding: 3rem 2rem;
    background-color: var(--dashboard-card-bg);
    border: 2px dashed var(--dashboard-border);
    border-radius: 0.5rem;
}

.empty-icon {
    width: 64px;
    height: 64px;
    color: #d1d5db;
    margin: 0 auto 1rem;
}

.empty-state h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: #374151;
    margin: 0 0 0.5rem 0;
}

.empty-state p {
    color: #6b7280;
    margin: 0 0 1.5rem 0;
}

/* ===== BOOKINGS GRID ===== */

.bookings-grid {
    display: grid;
    gap: 1.5rem;
}

/* ===== BOOKING CARD ===== */

.booking-card {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.booking-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.booking-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.booking-title .card-title {
    margin: 0;
}

.booking-date {
    font-size: 0.85rem;
    color: #6b7280;
    margin: 0;
}

/* ===== INSTALLER INFO ===== */

.installer-info {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.installer-avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    border-radius: 0.5rem;
    color: white;
    font-weight: 600;
    flex-shrink: 0;
}

.installer-details {
    flex: 1;
}

.installer-name {
    font-weight: 600;
    color: #1f2937;
    margin: 0 0 0.25rem 0;
    font-size: 0.95rem;
}

.installer-business {
    color: #6b7280;
    margin: 0 0 0.5rem 0;
    font-size: 0.85rem;
}

.installer-rating {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.85rem;
}

.rating-stars {
    color: #f59e0b;
    font-weight: 600;
}

.rating-count {
    color: #6b7280;
}

/* ===== JOB DETAILS ===== */

.job-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    padding: 1rem;
    background-color: #f9fafb;
    border-radius: 0.375rem;
}

.detail-row {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.detail-label {
    font-size: 0.8rem;
    font-weight: 500;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.detail-value {
    font-size: 0.95rem;
    font-weight: 600;
    color: #1f2937;
}

.detail-value.urgent {
    color: #dc2626;
}

.detail-value.warning {
    color: #d97706;
}

.detail-value.info {
    color: #3b82f6;
}

/* ===== CARD ACTIONS ===== */

.card-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.625rem 1rem;
    border: none;
    border-radius: 0.375rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--dashboard-transition);
    font-size: 0.9rem;
    text-decoration: none;
}

.btn-primary {
    background-color: #3b82f6;
    color: white;
}

.btn-primary:hover {
    background-color: #2563eb;
}

.btn-secondary {
    background-color: var(--dashboard-card-bg);
    color: #374151;
    border: 1px solid var(--dashboard-border);
}

.btn-secondary:hover {
    background-color: #f3f4f6;
}

.btn-sm {
    padding: 0.5rem 0.75rem;
    font-size: 0.85rem;
}

.btn-icon {
    width: 16px;
    height: 16px;
}

/* ===== QUOTES GRID ===== */

.quotes-grid {
    display: grid;
    gap: 1.5rem;
}

/* ===== QUOTE CARD ===== */

.quote-card {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.quote-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.quote-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.quote-title .card-title {
    margin: 0;
}

.quote-info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    padding: 1rem;
    background-color: #f9fafb;
    border-radius: 0.375rem;
}

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

.quote-value {
    font-size: 0.95rem;
    font-weight: 600;
    color: #1f2937;
}

.quote-cost {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background-color: #f0f9ff;
    border-left: 4px solid #3b82f6;
    border-radius: 0.375rem;
}

.cost-label {
    font-size: 0.9rem;
    font-weight: 500;
    color: #374151;
}

.cost-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: #3b82f6;
}

.quote-status-info {
    padding: 0.75rem;
    background-color: #f9fafb;
    border-radius: 0.375rem;
    border-left: 3px solid #f59e0b;
}

.status-text {
    margin: 0;
    font-size: 0.9rem;
    color: #374151;
}

/* ===== STATS GRID ===== */

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.stat-card {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1.5rem;
}

.stat-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 0.5rem;
    flex-shrink: 0;
}

.stat-icon svg {
    width: 32px;
    height: 32px;
}

.stat-icon-completed {
    background-color: #d1fae5;
    color: #065f46;
}

.stat-icon-spent {
    background-color: #e0e7ff;
    color: #3730a3;
}

.stat-icon-saved {
    background-color: #fef3c7;
    color: #92400e;
}

.stat-content {
    flex: 1;
}

.stat-label {
    font-size: 0.85rem;
    font-weight: 500;
    color: #6b7280;
    margin: 0 0 0.5rem 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: #1f2937;
    margin: 0;
}

/* ===== RESPONSIVE BOOKINGS GRID ===== */

@media (max-width: 1024px) {
    .bookings-grid,
    .quotes-grid {
        display: grid;
        gap: 1.5rem;
    }
}

@media (max-width: 640px) {
    .page-heading {
        font-size: 1.5rem;
    }

    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

    .job-details {
        grid-template-columns: 1fr;
    }

    .quote-info {
        grid-template-columns: 1fr;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .card-actions {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }

    .booking-card,
    .quote-card {
        gap: 0.75rem;
    }
}

/* ================================================
   PROJECT COMMAND CENTER STYLES
   ================================================ */

/* Project Timeline Widget */
.project-timeline-card {
    padding: 2rem;
}

.timeline-progress {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

.timeline-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    opacity: 0.4;
    transition: opacity 0.3s ease;
}

.timeline-step.completed,
.timeline-step.active {
    opacity: 1;
}

.timeline-step.active .step-icon {
    transform: scale(1.2);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1.2); }
    50% { transform: scale(1.3); }
}

.step-icon {
    font-size: 2rem;
    width: 3.5rem;
    height: 3.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gray-100);
    border-radius: 50%;
    border: 3px solid var(--gray-300);
    transition: all 0.3s ease;
}

.timeline-step.completed .step-icon {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.timeline-step.active .step-icon {
    background: var(--primary-light);
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px var(--primary-color-alpha);
}

.step-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--gray-600);
}

.timeline-step.completed .step-label,
.timeline-step.active .step-label {
    color: var(--gray-900);
}

.timeline-connector {
    flex: 1;
    height: 3px;
    background: var(--gray-300);
    margin: 0 0.5rem;
    transition: background 0.3s ease;
    position: relative; /* allow arrow pseudo-element */
}

.timeline-connector.completed {
    background: var(--primary-color);
}

/* Add arrowheads to connectors (desktop: right-pointing, mobile: down-pointing) */

/* Use small inline SVGs (via data URI) for crisp arrowheads. SVGs use currentColor so
   the arrow color follows the connector's `color` property (set below). */
.timeline-connector {
    color: var(--gray-300); /* used by the SVG via currentColor */
}


.timeline-connector::after {
    content: "";
    position: absolute;
    /* center horizontally within the connector */
    left: 50%;
    right: auto;
    top: 50%;
    transform: translate(-50%, -50%) translateX(-6px);
    width: 14px;
    height: 16px;
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    /* Right-pointing chevron SVG using currentColor for crisp strokes */
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 16'><polyline points='2,2 8,8 2,14' fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='2'/></svg>");
    opacity: 0;
    transition: opacity 360ms cubic-bezier(.2,.9,.2,1), transform 360ms cubic-bezier(.2,.9,.2,1), color 200ms ease;
}

.timeline-connector.completed {
    color: var(--primary-color);
}

/* When connector becomes completed, animate arrow in */
.timeline-connector.completed::after {
    opacity: 1;
    transform: translateY(-50%) translateX(0);
}

.timeline-status {
    text-align: center;
    padding: 1rem;
    background: var(--primary-light);
    border-radius: 0.5rem;
    color: var(--primary-dark);
    font-weight: 500;
}

/* Action Items Widget */
.action-items-card {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.action-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem;
    background: var(--gray-50);
    border-radius: 0.5rem;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.action-item:hover {
    background: white;
    border-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.action-item.urgent {
    background: #FFF3CD;
    border-color: #FFA500;
}

.action-icon {
    font-size: 2rem;
    min-width: 2.5rem;
}

.action-content {
    flex: 1;
}

.action-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 0.25rem;
}

.action-description {
    font-size: 0.875rem;
    color: var(--gray-600);
    margin: 0;
}

/* Installer Card Widget */
.installer-card-widget {
    padding: 2rem;
}

.installer-header {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.installer-avatar-large {
    width: 5rem;
    height: 5rem;
    border-radius: 50%;
    background: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 700;
}

.installer-info-main {
    flex: 1;
}

.installer-name-large {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 0.25rem;
}

.installer-business-large {
    font-size: 1rem;
    color: var(--gray-600);
    margin-bottom: 0.5rem;
}

.installer-rating-large {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.875rem;
}

.installer-actions {
    display: flex;
    gap: 1rem;
}

/* Visualizer Gallery Widget */
.visualizer-gallery {
    padding: 2rem;
}

.visualizer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}

.visualization-card {
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.visualization-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}

.visualization-image {
    width: 100%;
    height: 150px;
    object-fit: cover;
}

.visualization-info {
    padding: 1rem;
    background: white;
}

.visualization-info h4 {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 0.25rem;
}

.visualization-info p {
    font-size: 0.75rem;
    color: var(--gray-600);
    margin: 0;
}

/* Order History Link */
.order-history-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    background: var(--gray-100);
    border-radius: 0.5rem;
    color: var(--gray-700);
    text-decoration: none;
    transition: all 0.3s ease;
    font-weight: 500;
}

.order-history-link:hover {
    background: var(--gray-200);
    color: var(--primary-color);
}

.order-history-link svg {
    width: 1.25rem;
    height: 1.25rem;
}

/* Responsive Design for New Widgets */
@media (max-width: 640px) {
    .timeline-progress {
        flex-direction: column;
        gap: 1rem;
    }
    
    .timeline-connector {
        width: 3px;
        height: 2rem;
        margin: 0;
    }

    /* Mobile: arrow points down — swap to a down-pointing chevron SVG and animate vertically */
    .timeline-connector::after {
        /* center vertically within the vertical connector */
        right: auto;
        left: 50%;
        top: 50%;
        bottom: auto;
        transform: translateX(-50%) translateY(-6px);
        width: 16px;
        height: 12px;
        background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 10'><polyline points='2,2 8,8 14,2' fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='2'/></svg>");
        opacity: 0;
        transition: opacity 360ms cubic-bezier(.2,.9,.2,1), transform 360ms cubic-bezier(.2,.9,.2,1), color 200ms ease;
    }

    .timeline-connector.completed::after {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
    
    .action-item {
        flex-direction: column;
        text-align: center;
    }
    
    .installer-header {
        flex-direction: column;
        text-align: center;
    }
    
    .installer-actions {
        flex-direction: column;
        width: 100%;
    }
    
    .installer-actions .btn {
        width: 100%;
    }
}

/* ===== BOOKINGS PAGE STYLES ===== */

/* Filter Tabs */
.booking-filters {
    display: flex;
    gap: 1rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--dashboard-border);
    overflow-x: auto;
    margin-bottom: 2rem;
}

.filter-tab {
    padding: 0.75rem 1rem;
    border: none;
    background: transparent;
    color: #6b7280;
    cursor: pointer;
    font-weight: 500;
    transition: var(--dashboard-transition);
    position: relative;
    white-space: nowrap;
}

.filter-tab:hover {
    color: #111827;
}

.filter-tab.active {
    color: var(--status-confirmed);
    font-weight: 600;
}

.filter-tab.active::after {
    content: '';
    position: absolute;
    bottom: -1rem;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--status-confirmed);
}

.filter-count {
    display: inline-block;
    margin-left: 0.5rem;
    padding: 0.125rem 0.5rem;
    background: #e5e7eb;
    color: #374151;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
}

/* Booking Cards */
.booking-card {
    background: var(--dashboard-card-bg);
    border: 1px solid var(--dashboard-border);
    border-radius: 0.5rem;
    overflow: hidden;
    margin-bottom: 1.5rem;
    box-shadow: var(--dashboard-shadow);
    transition: var(--dashboard-transition);
}

.booking-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border-color: var(--status-confirmed);
}

.booking-header {
    background: #f9fafb;
    padding: 1.25rem;
    border-bottom: 1px solid var(--dashboard-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.booking-id {
    font-weight: 600;
    color: #111827;
    font-size: 0.95rem;
}

.booking-date {
    font-size: 0.875rem;
    color: #6b7280;
    margin-top: 0.25rem;
}

.status-badge {
    padding: 0.375rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.85rem;
    font-weight: 600;
    white-space: nowrap;
}

.status-badge.confirmed {
    background: var(--status-confirmed-light);
    color: var(--status-confirmed);
}

.status-badge.in-progress {
    background: var(--status-in-progress-light);
    color: var(--status-in-progress);
}

.status-badge.completed {
    background: var(--status-completed-light);
    color: var(--status-completed);
}

.status-badge.cancelled {
    background: var(--status-cancelled-light);
    color: var(--status-cancelled);
}

/* Booking Content */
.booking-content {
    padding: 1.5rem;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

@media (max-width: 1024px) {
    .booking-content {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .booking-content {
        grid-template-columns: 1fr;
    }
}

/* Booking Section */
.booking-section-title {
    font-size: 0.75rem;
    font-weight: 700;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.75rem;
}

.booking-section {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

/* Installer Info */
.installer-info {
    display: flex;
    gap: 0.75rem;
}

.installer-avatar {
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.installer-details {
    flex: 1;
}

.installer-name {
    font-weight: 600;
    color: #111827;
    font-size: 0.95rem;
}

.installer-business {
    font-size: 0.875rem;
    color: #6b7280;
    margin-top: 0.125rem;
}

.installer-rating {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    margin-top: 0.375rem;
    font-size: 0.875rem;
}

.installer-rating .star {
    color: #f59e0b;
}

.installer-rating .score {
    font-weight: 600;
    color: #111827;
}

.installer-rating .count {
    color: #6b7280;
    font-size: 0.8rem;
}

.installer-jobs {
    font-size: 0.875rem;
    color: #6b7280;
    margin-top: 0.25rem;
}

/* Job Details */
.detail-row {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.detail-label {
    font-size: 0.875rem;
    color: #6b7280;
}

.detail-value {
    font-weight: 500;
    color: #111827;
    word-break: break-word;
}

.detail-value.price {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--status-confirmed);
}

.payment-status {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: 0.375rem;
    font-size: 0.75rem;
    font-weight: 600;
}

.payment-status.pending {
    background: #fef3c7;
    color: #92400e;
}

.payment-status.partial {
    background: #dbeafe;
    color: #1e40af;
}

.payment-status.paid {
    background: var(--status-completed-light);
    color: var(--status-completed);
}

.payment-status.failed {
    background: #fee2e2;
    color: #991b1b;
}

/* Timeline */
.booking-timeline {
    padding: 1.5rem;
    background: #f9fafb;
    border-top: 1px solid var(--dashboard-border);
}

.timeline-title {
    font-size: 0.75rem;
    font-weight: 700;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1rem;
}

.timeline-events {
    position: relative;
    padding-left: 1.5rem;
}

.timeline-events::before {
    content: '';
    position: absolute;
    left: 0.375rem;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #e5e7eb;
}

.timeline-event {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    position: relative;
}

.timeline-event::before {
    content: '';
    position: absolute;
    left: -1.375rem;
    top: 0.25rem;
    width: 0.75rem;
    height: 0.75rem;
    border-radius: 50%;
    background: var(--status-confirmed);
    border: 2px solid white;
    box-shadow: 0 0 0 2px var(--dashboard-sidebar-bg);
}

.timeline-event-name {
    font-size: 0.95rem;
    font-weight: 500;
    color: #111827;
}

.timeline-event-time {
    font-size: 0.875rem;
    color: #6b7280;
    margin-top: 0.125rem;
}

/* Actions */
.booking-actions {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--dashboard-border);
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.action-btn {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: 0.375rem;
    border: 1px solid var(--dashboard-border);
    background: white;
    cursor: pointer;
    transition: var(--dashboard-transition);
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    text-decoration: none;
    color: #374151;
}

.action-btn:hover {
    background: #f9fafb;
    border-color: var(--status-confirmed);
    color: var(--status-confirmed);
}

.action-btn.primary {
    background: var(--status-confirmed);
    color: white;
    border-color: var(--status-confirmed);
}

.action-btn.primary:hover {
    background: #1d4ed8;
    border-color: #1d4ed8;
}

.action-btn.danger {
    color: #dc2626;
    border-color: #fca5a5;
}

.action-btn.danger:hover {
    background: #fee2e2;
    border-color: #dc2626;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 3rem 2rem;
    background: var(--dashboard-card-bg);
    border: 1px solid var(--dashboard-border);
    border-radius: 0.5rem;
    color: #6b7280;
}

.empty-state-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.empty-state-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #111827;
    margin-bottom: 0.5rem;
}

.empty-state-text {
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
}

.empty-state-btn {
    padding: 0.5rem 1.5rem;
    background: var(--status-confirmed);
    color: white;
    border: none;
    border-radius: 0.375rem;
    cursor: pointer;
    font-weight: 500;
    transition: var(--dashboard-transition);
    display: inline-block;
    text-decoration: none;
}

.empty-state-btn:hover {
    background: #1d4ed8;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-top: 2rem;
}

.pagination-btn {
    padding: 0.5rem 1rem;
    border: 1px solid var(--dashboard-border);
    background: white;
    cursor: pointer;
    border-radius: 0.375rem;
    font-weight: 500;
    transition: var(--dashboard-transition);
}

.pagination-btn:hover:not(:disabled) {
    background: #f9fafb;
    border-color: var(--status-confirmed);
    color: var(--status-confirmed);
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination-info {
    color: #6b7280;
    font-size: 0.95rem;
}

/* Modals */
.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 50;
    padding: 1rem;
}

.modal-content {
    background: var(--dashboard-card-bg);
    border-radius: 0.5rem;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    max-width: 500px;
    width: 100%;
    padding: 1.5rem;
}

.modal-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #111827;
    margin-bottom: 1rem;
}

.modal-body {
    margin-bottom: 1.5rem;
}

.modal-footer {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
}

.modal-btn {
    padding: 0.5rem 1rem;
    border: 1px solid var(--dashboard-border);
    border-radius: 0.375rem;
    cursor: pointer;
    font-weight: 500;
    transition: var(--dashboard-transition);
}

.modal-btn.primary {
    background: var(--status-confirmed);
    color: white;
    border-color: var(--status-confirmed);
}

.modal-btn.primary:hover {
    background: #1d4ed8;
}

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

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

/* Loading Animation */
.skeleton-loader {
    background: linear-gradient(90deg, #e5e7eb 0%, #f3f4f6 50%, #e5e7eb 100%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

.animate-pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

/* ===== BREADCRUMB NAVIGATION ===== */

.breadcrumb-section {
    padding: 12px 0;
    border-bottom: 1px solid var(--dashboard-border);
    background-color: var(--dashboard-bg);
}

.breadcrumb-nav {
    padding: 0 16px;
}

.breadcrumb-list {
    display: flex;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
    font-size: 14px;
}

.breadcrumb-list li {
    display: flex;
    align-items: center;
}

.breadcrumb-link {
    color: #2563eb;
    text-decoration: none;
    padding: 4px 8px;
    border-radius: 4px;
    transition: background-color 0.2s ease;
}

.breadcrumb-link:hover {
    background-color: #dbeafe;
    text-decoration: underline;
}

.breadcrumb-current {
    color: #6b7280;
    padding: 4px 8px;
    font-weight: 500;
}

.breadcrumb-separator {
    margin: 0 4px;
    color: #d1d5db;
}

/* Mobile breadcrumb adjustments */
@media (max-width: 768px) {
    .breadcrumb-nav {
        padding: 0 12px;
    }

    .breadcrumb-list {
        font-size: 12px;
        overflow-x: auto;
        white-space: nowrap;
    }

    .breadcrumb-link,
    .breadcrumb-current {
        padding: 4px 6px;
    }
}

/* ===== SERVICE TIER BADGES ===== */

.tier-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

/* Phase 6: BYOI Certified tier badge (replaces full-service) */
.tier-badge.byoi-certified,
.tier-badge.full-service {
    background-color: #dcfce7;
    color: #166534;
}

.tier-badge.byoi {
    background-color: #dbeafe;
    color: #1e40af;
}

.tier-badge.materials-only {
    background-color: #fef3c7;
    color: #92400e;
}

/* ===== INSTALLER DASHBOARD STYLES ===== */

/* Page Header */
.dashboard-page-header {
    padding: 1.5rem 2rem;
    background-color: var(--dashboard-card-bg);
    border-bottom: 1px solid var(--dashboard-border);
}

.dashboard-page-header .page-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: #111827;
    margin: 0;
}

/* Content Section */
.content-section {
    padding: 1.5rem 2rem;
}

/* Card Styles for Installer Dashboard */
.card .card-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

.card .card-value {
    font-size: 2rem;
    font-weight: 700;
    color: #111827;
    line-height: 1.2;
}

.card .card-subtext {
    font-size: 0.875rem;
    color: #6b7280;
    margin-top: 0.25rem;
}

/* Form Elements */
.label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
    margin-bottom: 0.375rem;
}

.input {
    display: block;
    width: 100%;
    padding: 0.625rem 0.875rem;
    font-size: 0.95rem;
    line-height: 1.5;
    color: #111827;
    background-color: #ffffff;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.input:disabled {
    background-color: #f3f4f6;
    cursor: not-allowed;
}

select.input {
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.5rem center;
    background-repeat: no-repeat;
    background-size: 1.5em 1.5em;
    padding-right: 2.5rem;
}

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

/* Table Styles */
.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.table thead {
    background-color: #f9fafb;
    border-bottom: 2px solid #e5e7eb;
}

.table th {
    padding: 0.75rem 1rem;
    text-align: left;
    font-weight: 600;
    color: #374151;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
}

.table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #e5e7eb;
    color: #111827;
}

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

.table tbody tr:last-child td {
    border-bottom: none;
}

/* Certification Level Badges */
.cert-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.cert-badge.none {
    background-color: #f3f4f6;
    color: #6b7280;
}

.cert-badge.basic {
    background-color: #dbeafe;
    color: #1e40af;
}

.cert-badge.certified {
    background-color: #d1fae5;
    color: #065f46;
}

.cert-badge.premium {
    background-color: #fef3c7;
    color: #92400e;
    border: 1px solid #f59e0b;
}

/* Alert Styles */
.alert {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
}

.alert-success {
    background-color: #d1fae5;
    color: #065f46;
    border: 1px solid #10b981;
}

.alert-error {
    background-color: #fee2e2;
    color: #991b1b;
    border: 1px solid #ef4444;
}

.alert-warning {
    background-color: #fef3c7;
    color: #92400e;
    border: 1px solid #f59e0b;
}

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

/* Installer Dashboard Responsive */
@media (max-width: 640px) {
    .dashboard-page-header {
        padding: 1rem;
    }
    
    .dashboard-page-header .page-title {
        font-size: 1.25rem;
    }
    
    .content-section {
        padding: 1rem;
    }
    
    .table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
}

