/**
 * Workshop Management System - Styles
 * 
 * @author David Rodrigues
 */

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

/* Screen reader only - visually hidden but accessible to screen readers */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

:root {
    /* Professional Automotive/Workshop Color Scheme */
    --primary-color: #374151;
    --primary-dark: #1f2937;
    --primary-light: #4b5563;
    --secondary-color: #64748b;
    --success-color: #059669;
    --danger-color: #dc2626;
    --warning-color: #d97706;
    --info-color: #0284c7;
    --bg-color: #f1f5f9;
    --bg-gradient: linear-gradient(135deg, #374151 0%, #4b5563 100%);
    --card-bg: #ffffff;
    --text-color: #0f172a;
    --text-light: #64748b;
    --border-color: #cbd5e1;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --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);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Inter', Oxygen, Ubuntu, Cantarell, sans-serif;
    background: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    font-size: 15px;
}

/* Screen Management */
.screen {
    display: block;
}

.screen.hidden {
    display: none;
}

.hidden {
    display: none !important;
}

/* Login Screen */
.login-container {
    max-width: 420px;
    margin: 120px auto;
    padding: 40px;
    background: var(--card-bg);
    border-radius: 16px;
    box-shadow: var(--shadow-xl);
    border: 1px solid var(--border-color);
}

.logo-container {
    text-align: center;
    margin-bottom: 30px;
}

.logo-img {
    max-width: 280px;
    max-height: 160px;
    height: auto;
    width: auto;
    object-fit: contain;
}

/* Login Form Button - Full Width */
#loginForm .btn-primary {
    width: 100%;
    padding: 14px 24px;
}

/* Header */
header {
    background: var(--card-bg);
    padding: 20px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow-md);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid var(--border-color);
}

.header-logo {
    transition: opacity 0.2s ease;
    display: flex;
    align-items: center;
    cursor: pointer;
}

.header-logo:hover {
    opacity: 0.7;
}

.header-logo:active {
    opacity: 0.5;
}

.logo-img-header {
    max-height: 50px;
    max-width: 200px;
    height: auto;
    width: auto;
    object-fit: contain;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* Language Selector */
.language-selector {
    display: flex;
    align-items: center;
}

.language-select {
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: var(--card-bg);
    color: var(--text-color);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.language-select:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-sm);
}

.language-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(55, 65, 81, 0.1);
}

/* Settings Button */
.btn-settings {
    background: #6b7280;
    color: white;
    padding: 10px;
    min-width: 40px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-settings i {
    font-size: 16px;
}

.btn-settings:hover {
    background: #4b5563;
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

/* Settings Modal - Uses same styling as other modals */

/* Global Search */
.global-search-container {
    background: var(--card-bg);
    padding: 20px 30px;
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.search-wrapper {
    position: relative;
    width: 100%;
    max-width: none;
    margin: 0;
}

.search-wrapper.search-small {
    max-width: 300px;
    margin: 0;
}

.search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 16px;
    color: var(--text-light);
    pointer-events: none;
}

.search-input {
    width: 100%;
    padding: 12px 16px 12px 48px;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    font-size: 15px;
    font-family: inherit;
    transition: all 0.3s ease;
    background: var(--bg-color);
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
    background: var(--card-bg);
}

.search-clear {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--secondary-color);
    color: white;
    border: none;
    border-radius: 50%;
    width: 22px;
    height: 22px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.search-clear i {
    font-size: 14px;
}

.search-clear:hover {
    background: var(--danger-color);
    transform: translateY(-50%) scale(1.1);
}

/* Tabs */
.tabs {
    display: flex;
    background: var(--card-bg);
    border-bottom: 2px solid var(--border-color);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding: 0;
    width: 100%;
}

.tab-btn {
    flex: 1;
    padding: 18px 24px;
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 15px;
    font-weight: 500;
    color: var(--text-light);
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
    white-space: nowrap;
    min-width: 140px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.tab-btn i {
    font-size: 18px;
}

.tab-btn .tab-text {
    display: inline;
}

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

.tab-btn.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
    font-weight: 600;
    background: var(--bg-color);
}

/* Tab Content */
.tab-content {
    display: none;
    padding: 30px;
    animation: fadeIn 0.3s ease;
}

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

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

.tab-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 16px;
}

.tab-header h2 {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-color);
}

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

/* View Toggle Buttons */
.view-toggle {
    display: flex;
    gap: 4px;
    background: var(--card-bg);
    padding: 4px;
    border-radius: 10px;
    border: 2px solid var(--border-color);
}

.btn-view-toggle {
    background: transparent;
    border: none;
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    color: var(--text-light);
    font-size: 16px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-view-toggle:hover {
    background: var(--bg-color);
    color: var(--text-color);
}

.btn-view-toggle.active {
    background: var(--primary-color);
    color: white;
    box-shadow: var(--shadow-sm);
}

/* List Container */
.list-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 24px;
    align-items: start; /* Prevent cards from stretching to match tallest card */
}

.list-container.list-view {
    display: block;
    grid-template-columns: none;
    gap: 0;
}

/* List View */
.list-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--card-bg);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.list-table.modern-table {
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
}

.list-table thead {
    background: linear-gradient(135deg, #374151 0%, #4b5563 100%);
    color: white;
}

.list-table thead th {
    padding: 18px 20px;
    text-align: left;
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    position: relative;
    white-space: nowrap;
    vertical-align: middle;
}

.list-table thead th.sortable {
    cursor: pointer;
    user-select: none;
    transition: background-color 0.2s ease;
    position: relative;
    padding-right: 30px;
}

.list-table thead th.sortable:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.list-table thead th.sortable .sort-icon {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 14px;
    opacity: 0.5;
    transition: opacity 0.2s ease, color 0.2s ease;
}

.list-table thead th.sortable:hover .sort-icon {
    opacity: 0.8;
}

.list-table thead th.sortable .sort-icon.active {
    opacity: 1;
    color: #fbbf24;
}

.list-table thead th.actions-column {
    text-align: right;
    padding-right: 20px;
}

.list-table tbody td.list-actions {
    text-align: right;
    padding-right: 20px;
}

.list-table tbody tr {
    border-bottom: 1px solid #f1f5f9;
    transition: all 0.2s ease;
}

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

.list-table tbody tr:hover {
    background: #f8fafc;
    transform: translateX(2px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.list-table tbody td {
    padding: 18px 20px;
    font-size: 15px;
    color: var(--text-color);
    vertical-align: middle;
    line-height: 1.5;
    text-align: left;
}

.list-table tbody td:first-child {
    padding-left: 20px;
}

.list-table tbody td.name-cell {
    font-weight: 600;
    color: var(--primary-color);
}

.list-table tbody td.name-cell strong {
    color: var(--primary-color);
    font-weight: 600;
    font-size: 15px;
}

.list-table tbody td.address-cell,
.list-table tbody td.notes-cell,
.list-table tbody td.description-cell,
.list-table tbody td.motor-cell {
    color: var(--text-light);
    font-size: 14px;
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.list-table tbody td.vehicles-cell,
.list-table tbody td.photos-cell,
.list-table tbody td.records-cell {
    text-align: center;
}

.list-table tbody td.vehicles-cell .badge,
.list-table tbody td.photos-cell .badge,
.list-table tbody td.records-cell .badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 24px;
    padding: 0 10px;
    background: var(--primary-color);
    color: white;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 600;
}

.list-table tbody td strong {
    color: var(--text-color);
    font-weight: 600;
}

.list-table tbody td small {
    color: var(--text-light);
    font-size: 13px;
}

.list-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    justify-content: flex-end;
}

/* Dashboard */
.dashboard-container {
    padding: 10px 0;
}

.dashboard-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}

.stat-card {
    background: var(--card-bg);
    border: none;
    border-radius: 12px;
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
}

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

.stat-icon {
    width: 45px;
    height: 45px;
    border-radius: 10px;
    background: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.stat-content {
    flex: 1;
}

.stat-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 2px;
    line-height: 1.2;
}

.stat-label {
    font-size: 12px;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.3px;
    font-weight: 600;
    line-height: 1.3;
}

.stat-sublabel {
    font-size: 10px;
    color: var(--text-light);
    margin-top: 2px;
    line-height: 1.2;
}

.stat-completed .stat-icon {
    background: var(--success-color);
}

.stat-pending .stat-icon {
    background: var(--warning-color);
}

.stat-in-progress .stat-icon {
    background: #0284c7;
}

.stat-revenue .stat-icon {
    background: linear-gradient(135deg, #374151 0%, #4b5563 100%);
}

.stat-work .stat-icon {
    background: var(--secondary-color);
}

.stat-cancelled .stat-icon {
    background: #9ca3af;
}

.stat-success .stat-icon {
    background: var(--success-color);
}

.stat-warning .stat-icon {
    background: var(--warning-color);
}

.dashboard-sections {
    display: grid;
    gap: 16px;
}

.dashboard-section {
    background: var(--card-bg);
    border: none;
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
    margin-bottom: 20px;
}

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

.dashboard-recent-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-bottom: 20px;
}

.dashboard-recent-row .dashboard-section {
    margin-bottom: 0;
}

.dashboard-section h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: none;
    display: flex;
    align-items: center;
    gap: 8px;
}

.dashboard-section h3 i {
    font-size: 18px;
    color: var(--primary-color);
}

.recent-work-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.recent-work-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: var(--bg-color);
    border-radius: 8px;
    border: none;
    transition: all 0.2s ease;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.recent-work-item:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    background: var(--card-bg);
}

.recent-work-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}

.recent-work-info strong {
    font-size: 13px;
    color: var(--text-color);
}

.recent-work-info span {
    font-size: 11px;
    color: var(--text-light);
}

.recent-work-plate {
    font-size: 10px;
    background: var(--card-bg);
    padding: 2px 6px;
    border-radius: 4px;
    display: inline-block;
    width: fit-content;
}

.recent-work-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.recent-work-date {
    font-size: 11px;
    color: var(--text-light);
}

.recent-work-kms {
    font-size: 11px;
    color: var(--text-light);
    font-weight: 500;
}

.recent-work-price {
    font-size: 12px;
    font-weight: 600;
    color: var(--success-color);
}

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

/* Cards */
.card {
    background: var(--card-bg);
    padding: 24px;
    border-radius: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    border: none;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    align-self: start; /* Prevent card from stretching in grid */
    height: auto; /* Allow card to grow naturally */
    width: 100%;
    max-width: 100%;
    overflow: hidden; /* Prevent content from breaking out of card */
    box-sizing: border-box;
}

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

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
}

.card-header > div:first-child {
    flex: 1;
    min-width: 0; /* Allows text to truncate */
    overflow: hidden;
}

.card-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--text-color);
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
}

.card-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.card-info {
    margin-bottom: 12px;
    display: flex;
    align-items: start;
}

.card-info strong {
    display: inline-block;
    min-width: 110px;
    color: var(--text-light);
    font-size: 13px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    flex-shrink: 0;
}

.card-info span {
    font-size: 15px;
    color: var(--text-color);
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    word-break: break-word;
    max-width: 100%;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    line-height: 1.5;
    min-width: 0;
}

/* Special handling for card-info with photos */
.card-info-with-photos {
    flex-direction: column;
    align-items: flex-start;
}

.card-info-with-photos strong {
    margin-bottom: 8px;
}

.card-info-with-photos .photos-preview {
    width: 100%;
    max-width: 100%;
    margin-top: 8px;
    margin-bottom: 0;
    margin-left: 0;
    box-sizing: border-box;
}

.card-info-with-photos .photos-preview .work-photo-thumb {
    max-width: 100%;
    width: 100%;
    box-sizing: border-box;
}

/* Buttons */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn-primary {
    background: var(--bg-gradient);
    color: white;
}

.btn-primary:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

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

.btn-secondary:hover {
    background: #475569;
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

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

.btn-cancel:hover {
    background: #b91c1c;
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

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

.btn-danger:hover {
    background: #dc2626;
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.btn-logout {
    background: var(--danger-color);
    color: white;
    padding: 10px;
    min-width: 40px;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-logout i {
    font-size: 16px;
}

.btn-logout:hover {
    background: #b91c1c;
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

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

.btn-icon {
    padding: 6px;
    min-width: 32px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
}

.btn-icon i {
    font-size: 14px;
}

/* Add buttons (plus icon buttons) - bigger and different color */
.btn-primary.btn-icon[onclick*="open"][onclick*="Modal"],
.btn-primary.btn-icon[onclick*="open"][onclick*="Client"],
.btn-primary.btn-icon[onclick*="open"][onclick*="Vehicle"],
.btn-primary.btn-icon[onclick*="open"][onclick*="Work"],
.btn-primary.btn-icon[title*="Add"] {
    width: 40px;
    height: 40px;
    min-width: 40px;
    padding: 8px;
    background: var(--success-color);
    border: none;
}

.btn-primary.btn-icon[onclick*="open"][onclick*="Modal"]:hover,
.btn-primary.btn-icon[onclick*="open"][onclick*="Client"]:hover,
.btn-primary.btn-icon[onclick*="open"][onclick*="Vehicle"]:hover,
.btn-primary.btn-icon[onclick*="open"][onclick*="Work"]:hover,
.btn-primary.btn-icon[title*="Add"]:hover {
    background: #047857;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-primary.btn-icon[onclick*="open"][onclick*="Modal"] i,
.btn-primary.btn-icon[onclick*="open"][onclick*="Client"] i,
.btn-primary.btn-icon[onclick*="open"][onclick*="Vehicle"] i,
.btn-primary.btn-icon[onclick*="open"][onclick*="Work"] i,
.btn-primary.btn-icon[title*="Add"] i {
    font-size: 18px;
}

/* Export buttons - same design as add button but light green */
.btn-primary.btn-icon.btn-export {
    width: 40px;
    height: 40px;
    min-width: 40px;
    padding: 8px;
    background: #34d399;
    border: none;
}

.btn-primary.btn-icon.btn-export:hover {
    background: #10b981;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-primary.btn-icon.btn-export i {
    font-size: 18px;
}

/* Edit buttons in cards - same size as trash buttons */
.btn-primary.btn-icon[onclick*="edit"],
.btn-primary.btn-icon[onclick*="openQuoteModal"],
.btn-primary.btn-icon[title="Edit"] {
    width: 32px !important;
    height: 32px !important;
    min-width: 32px !important;
    padding: 6px !important;
    background: var(--primary-color) !important;
    border: none !important;
}

.btn-primary.btn-icon[onclick*="edit"]:hover,
.btn-primary.btn-icon[onclick*="openQuoteModal"]:hover,
.btn-primary.btn-icon[title="Edit"]:hover {
    background: var(--primary-dark) !important;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-primary.btn-icon[onclick*="edit"] i,
.btn-primary.btn-icon[onclick*="openQuoteModal"] i,
.btn-primary.btn-icon[title="Edit"] i {
    font-size: 14px !important;
}

/* Forms */
.form-group {
    margin-bottom: 20px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    font-size: 14px;
    color: var(--text-color);
}

/* Searchable Select */
.searchable-select {
    position: relative;
}

.select-search {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    font-size: 15px;
    background: var(--card-bg);
    color: var(--text-color);
    margin-bottom: 8px;
    transition: all 0.2s ease;
    position: relative;
    z-index: 5;
    pointer-events: auto;
    cursor: text;
}

.select-search:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(55, 65, 81, 0.1);
}

/* Hide the select visually but keep it functional - positioned behind the search input */
.searchable-select select {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 42px; /* Match input height */
    opacity: 0;
    cursor: pointer;
    z-index: 0;
    margin-bottom: 0;
    font-size: 14px;
    pointer-events: none;
    /* When closed, ensure it doesn't block the search input */
    overflow: hidden;
    /* Prevent select from being focusable via keyboard */
    outline: none;
}

.searchable-select select:focus + .select-search,
.searchable-select:focus-within .select-search {
    border-color: var(--primary-color);
}

/* Style for when select dropdown is open (size > 1) - show as listbox */
.searchable-select select[size]:not([size="1"]) {
    opacity: 1;
    position: absolute;
    top: 42px;
    left: 0;
    width: 100%;
    min-height: 150px;
    max-height: 300px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 10;
    overflow-y: auto;
    padding: 4px;
    pointer-events: auto;
}

.searchable-select select[size]:not([size="1"]) option {
    padding: 8px 12px;
    border-radius: 6px;
    margin: 2px 0;
    cursor: pointer;
}

.searchable-select select[size]:not([size="1"]) option:hover {
    background: var(--primary-color);
    color: white;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    font-size: 15px;
    font-family: inherit;
    transition: all 0.3s ease;
    background: var(--card-bg);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.form-group input:disabled,
.form-group select:disabled,
.form-group textarea:disabled {
    background-color: #f3f4f6;
    color: #6b7280;
    cursor: not-allowed;
    opacity: 0.7;
    border-color: #d1d5db;
}

.error-message {
    color: var(--danger-color);
    margin-top: 10px;
    font-size: 14px;
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 12px;
    pointer-events: none;
}

.toast {
    min-width: 320px;
    max-width: 420px;
    padding: 16px 20px;
    background: var(--card-bg);
    border-radius: 12px;
    box-shadow: var(--shadow-xl);
    border-left: 4px solid;
    display: flex;
    align-items: center;
    gap: 12px;
    pointer-events: auto;
    animation: slideInRight 0.3s ease-out;
    position: relative;
    overflow: hidden;
}

.toast.success {
    border-left-color: var(--success-color);
    color: #ffffff;
    background: rgba(5, 150, 105, 1);
}

.toast.error {
    border-left-color: var(--danger-color);
    color: #ffffff;
    background: rgba(220, 38, 38, 1);
}

.toast.warning {
    border-left-color: var(--warning-color);
    color: #ffffff;
    background: rgba(217, 119, 6, 1);
}

.toast.info {
    border-left-color: var(--info-color);
    color: #ffffff;
    background: rgba(2, 132, 199, 1);
}



.toast-icon {
    font-size: 20px;
    flex-shrink: 0;
}

.toast-content {
    flex: 1;
}

.toast-title {
    font-weight: 600;
    font-size: 15px;
    margin-bottom: 4px;
    color: #ffffff;
}

.toast-message {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.95);
    line-height: 1.4;
}

.toast-close {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.9);
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.toast-close:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}


.toast.hiding {
    animation: slideOutRight 0.3s ease-out forwards;
}

/* Modal */
body.modal-open {
    overflow: hidden;
    position: fixed;
    width: 100%;
    height: 100%;
    /* Prevent scroll on mobile */
    touch-action: none;
    -webkit-overflow-scrolling: none;
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    z-index: 1000;
    overflow-y: auto;
    padding: 20px;
    animation: fadeIn 0.2s ease;
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: var(--card-bg);
    border-radius: 20px;
    width: 100%;
    max-width: 600px;
    max-height: 90vh;
    overflow: hidden;
    position: relative;
    box-shadow: var(--shadow-xl);
    border: 1px solid var(--border-color);
    animation: slideUp 0.3s ease;
    display: flex;
    flex-direction: column;
}

.modal-content form {
    overflow-y: auto;
    overflow-x: hidden;
    /* Smooth scrolling for mobile */
    -webkit-overflow-scrolling: touch;
}

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

.modal-large {
    max-width: 900px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 28px;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-color);
    border-radius: 20px 20px 0 0;
}

.modal-header h2 {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-color);
}

.close-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-light);
    line-height: 1;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.close-btn i {
    font-size: 20px;
}

.close-btn:hover {
    color: var(--danger-color);
    background: rgba(239, 68, 68, 0.1);
}

form {
    padding: 28px;
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    /* Smooth scrolling for mobile */
    -webkit-overflow-scrolling: touch;
}

/* Add Photos button styling */
.btn-photos {
    width: 100%;
    background: var(--primary-color);
    color: white !important;
    padding: 12px 20px;
    display: flex !important;
    align-items: center;
    justify-content: center !important;
    gap: 8px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 15px;
    font-weight: 500;
}

.btn-photos:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
    color: white !important;
}

.btn-photos i {
    font-size: 24px;
    color: white !important;
}

/* Ensure text inside button is white */
.btn-photos,
.btn-photos * {
    color: white !important;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--border-color);
    flex-shrink: 0;
    background: var(--card-bg);
    margin-left: -28px;
    margin-right: -28px;
    padding-left: 28px;
    padding-right: 28px;
    padding-bottom: 28px;
    margin-bottom: -28px;
    border-radius: 0 0 20px 20px;
}

/* Photos Preview */
.photos-preview {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 12px;
    margin-bottom: 20px;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
}

.photos-preview-small {
    grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
    gap: 6px;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
}

.work-photo-thumb {
    width: 100%;
    height: 60px;
    object-fit: cover;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
    display: block;
    max-width: 100%;
}

.work-photo-thumb:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.photo-item {
    position: relative;
    aspect-ratio: 1;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    border: 2px solid var(--border-color);
}

.photo-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.photo-item .remove-photo {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(239, 68, 68, 0.9);
    color: white;
    border: none;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    box-shadow: var(--shadow-md);
}

.photo-item .remove-photo:hover {
    background: var(--danger-color);
    transform: scale(1.1);
}

input[type="file"] {
    display: none;
}

/* Status Badges */
.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.status-badge-small {
    padding: 2px 6px;
    font-size: 7px;
    border-radius: 8px;
    letter-spacing: 0.2px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

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

.status-in_progress {
    background: #dbeafe;
    color: #1e40af;
    border: none;
}

.status-completed {
    background: #d1fae5;
    color: #065f46;
    border: none;
}

.status-cancelled {
    background: #f3f4f6;
    color: #6b7280;
    border: none;
}

/* Quote Status Badges */
.status-draft {
    background: #fef3c7;
    color: #92400e;
    border: none;
}

.status-sent {
    background: #dbeafe;
    color: #1e40af;
    border: none;
}

.status-accepted {
    background: #d1fae5;
    color: #065f46;
    border: none;
}

.status-rejected {
    background: #f3f4f6;
    color: #6b7280;
    border: none;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 40px;
    color: var(--text-light);
}

.empty-state p {
    font-size: 16px;
    margin-top: 12px;
}

/* Loading */
.loading {
    text-align: center;
    padding: 40px;
    color: var(--text-light);
}

/* Vehicle History Styles */
.vehicle-card {
    position: relative;
}

.card-body {
    padding-top: 0;
}

.vehicle-history-section {
    margin-top: 20px;
    padding-top: 20px;
    border-top: none;
}

.history-toggle-btn {
    width: 100%;
    padding: 14px 16px;
    background: var(--bg-color);
    border: none;
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-color);
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.03);
}

.history-toggle-btn:hover {
    background: var(--card-bg);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.08);
}

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

.history-text {
    flex: 1;
    text-align: left;
}

.history-count {
    background: var(--primary-color);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
}

.history-arrow {
    transition: transform 0.3s ease;
    font-size: 14px;
    color: var(--text-light);
}

.history-arrow i {
    font-size: 14px;
}

.vehicle-history {
    display: none;
    animation: slideDown 0.3s ease;
}

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

.history-item {
    background: var(--bg-color);
    border: none;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 12px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.03);
}

.history-item:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.08);
    background: var(--card-bg);
}

.history-item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
    gap: 16px;
}

.history-item-main {
    flex: 1;
    min-width: 0;
}

.history-item-title-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.history-item-date-text {
    font-size: 15px;
    color: var(--text-color);
    font-weight: 600;
}

.history-item-description {
    margin-bottom: 8px;
    color: var(--text-color);
    line-height: 1.6;
    font-size: 14px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    max-width: 100%;
}

.history-item-price {
    font-size: 16px;
    font-weight: 700;
    color: var(--success-color);
    margin-top: 4px;
}

.history-item-actions {
    flex-shrink: 0;
    margin-top: 0;
    padding-top: 0;
    border-top: none;
}

.history-item-meta {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    margin-top: 8px;
    padding-top: 12px;
    border-top: 1px solid var(--border-color);
}

.history-item-meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--text-light);
}

.history-item-meta-item i {
    font-size: 14px;
    color: var(--text-light);
}

.history-item-meta-item span {
    color: var(--text-light);
}

.history-item-photos {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
    flex-wrap: wrap;
    align-items: center;
}

.history-photo-thumb {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.history-photo-thumb:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.history-more-photos {
    font-size: 12px;
    color: var(--text-light);
    padding: 8px 12px;
    background: var(--bg-color);
    border-radius: 8px;
}

.empty-history {
    text-align: center;
    padding: 30px 20px;
    color: var(--text-light);
}

.empty-history p {
    margin-bottom: 16px;
    font-size: 14px;
}

/* Photo Viewer Modal */
.photo-viewer {
    z-index: 2000;
}

.photo-modal-content {
    max-width: 95vw;
    max-height: 95vh;
    width: 100%;
}

.photo-modal-content .modal-header {
    flex-shrink: 0;
}

.photo-modal-content img {
    max-width: 100%;
    max-height: calc(95vh - 120px);
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
}

/* Client Vehicles Styles */
.client-card {
    position: relative;
}

.client-vehicles-section {
    margin-top: 20px;
    padding-top: 20px;
    border-top: none;
}

.vehicles-toggle-btn {
    width: 100%;
    padding: 14px 16px;
    background: var(--bg-color);
    border: none;
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-color);
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.03);
}

.vehicles-toggle-btn:hover {
    background: var(--card-bg);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.08);
}

.client-vehicles {
    display: none;
    animation: slideDown 0.3s ease;
    max-height: none;
    overflow: visible;
}

.vehicle-item {
    background: var(--bg-color);
    border: none;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 12px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.03);
}

.vehicle-item:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.08);
    background: var(--card-bg);
}

.vehicle-item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
    gap: 16px;
}

.vehicle-item-main {
    flex: 1;
    min-width: 0;
}

.vehicle-item-title-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.vehicle-item-name {
    font-size: 15px;
    color: var(--text-color);
    font-weight: 600;
}

.vehicle-plate-badge {
    background: var(--primary-color);
    color: white;
}

.vehicle-item-actions {
    flex-shrink: 0;
    margin-top: 0;
    padding-top: 0;
    border-top: none;
}

.vehicle-item-meta {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    margin-top: 8px;
    padding-top: 12px;
    border-top: 1px solid var(--border-color);
}

.vehicle-item-meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--text-light);
}

.vehicle-item-meta-item i {
    font-size: 14px;
    color: var(--text-light);
}

.vehicle-item-meta-item span {
    color: var(--text-light);
}

.empty-vehicles {
    text-align: center;
    padding: 30px 20px;
    color: var(--text-light);
}

.empty-vehicles p {
    margin-bottom: 16px;
    font-size: 14px;
}

/* Responsive */
@media (max-width: 768px) {
    header {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        padding: 16px 20px;
        gap: 16px;
    }

    .logo-img-header {
        max-height: 40px;
    }

    .logo-img {
        max-width: 180px;
        max-height: 100px;
    }

    .user-info {
        width: auto;
        justify-content: flex-end;
        gap: 12px;
    }

    /* Hide welcome message on mobile/tablet */
    #usernameDisplay {
        display: none;
    }

    .global-search-container {
        padding: 16px 20px;
    }

    .tabs {
        padding: 0;
    }

    .tab-btn {
        padding: 14px 12px;
        min-width: auto;
        flex: 1;
        font-size: 14px;
    }
    
    /* Hide tab text on mobile, show only icons */
    .tab-btn .tab-text {
        display: none;
    }
    
    .tab-btn i {
        font-size: 20px;
    }

    .tab-content {
        padding: 20px;
    }

    .tab-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    /* Hide page title on mobile/tablet */
    .tab-header h2 {
        display: none;
    }

    .tab-header-actions {
        width: 100%;
        display: flex;
        flex-direction: row;
        align-items: center;
        gap: 12px;
        flex-wrap: wrap;
    }

    .search-wrapper.search-small {
        flex: 1;
        min-width: 0;
        max-width: 100%;
        order: 1;
    }
    
    .view-toggle {
        order: 2;
        flex-shrink: 0;
    }
    
    /* Align + button with view toggle icons */
    .tab-header-actions > .btn-primary.btn-icon {
        order: 3;
        flex-shrink: 0;
    }
    
    /* List view improvements - prevent horizontal scroll */
    .list-container.list-view {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        width: 100%;
    }
    
    .list-table {
        font-size: 11px;
        min-width: 800px; /* Minimum width to prevent too much compression */
        display: table;
    }
    
    .list-table thead th,
    .list-table tbody td {
        padding: 10px 6px;
        white-space: nowrap;
    }
    
    .list-table tbody td {
        font-size: 11px;
    }
    
    /* Make some columns smaller or hide on very small screens */
    @media (max-width: 480px) {
        .list-table thead th:nth-child(4),
        .list-table tbody td:nth-child(4),
        .list-table thead th:nth-child(5),
        .list-table tbody td:nth-child(5) {
            display: none;
        }
        
        .list-table {
            min-width: 600px;
        }
    }

    .modal-content {
        margin: 10px;
        max-width: calc(100% - 20px);
        border-radius: 16px;
    }

    .modal-header {
        padding: 20px;
    }

    .modal-header h2 {
        font-size: 20px;
    }

    form {
        padding: 20px;
    }

    .history-item-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .history-item-actions {
        align-self: flex-end;
    }

    .history-item-meta {
        flex-direction: column;
        gap: 8px;
    }

    .vehicle-item-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .vehicle-item-actions {
        align-self: flex-end;
    }

    .vehicle-item-meta {
        flex-direction: column;
        gap: 8px;
    }

    .history-photo-thumb {
        width: 50px;
        height: 50px;
    }
    
    .work-photo-thumb {
        height: 50px;
    }
    
    .photos-preview-small {
        grid-template-columns: repeat(auto-fill, minmax(50px, 1fr));
        gap: 5px;
    }
    
    .photo-modal-content {
        max-width: 98vw;
        max-height: 98vh;
    }
    
    .photo-modal-content img {
        max-height: calc(98vh - 100px);
    }
    
    .status-badge-small {
        padding: 2px 5px;
        font-size: 6px;
    }
    
    .dashboard-stats-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .stat-card {
        padding: 12px;
        gap: 10px;
    }
    
    .stat-icon {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }
    
    .stat-value {
        font-size: 20px;
    }
    
    .stat-label {
        font-size: 11px;
    }
    
    .stat-sublabel {
        font-size: 9px;
    }
    
    .dashboard-recent-row {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .dashboard-section {
        padding: 12px;
        margin-bottom: 16px;
    }
    
    .dashboard-section h3 {
        font-size: 14px;
        margin-bottom: 10px;
        padding-bottom: 6px;
    }
    
    .dashboard-section h3 i {
        font-size: 16px;
    }
    
    .recent-work-item {
        padding: 10px;
    }
}

/* Tablet specific styles */
@media (min-width: 481px) and (max-width: 1024px) {
    /* Hide welcome message on tablet */
    #usernameDisplay {
        display: none;
    }
    
    /* Hide page title on tablet */
    .tab-header h2 {
        display: none;
    }
    
    /* Hide tab text on tablet, show only icons */
    .tab-btn .tab-text {
        display: none;
    }
    
    .tab-btn {
        padding: 14px 12px;
        min-width: auto;
    }
    
    .tab-btn i {
        font-size: 20px;
    }
    
    /* Align + button with view toggle icons on tablet */
    .tab-header-actions {
        flex-direction: row;
        align-items: center;
        gap: 12px;
    }
    
    .search-wrapper.search-small {
        flex: 1;
        min-width: 0;
        max-width: 100%;
    }
    
    .view-toggle {
        flex-shrink: 0;
    }
    
    .tab-header-actions > .btn-primary.btn-icon {
        flex-shrink: 0;
    }
    
    /* List view improvements for tablet */
    .list-container.list-view {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        width: 100%;
    }
    
    .list-table {
        font-size: 12px;
        min-width: 900px;
    }
    
    .list-table thead th,
    .list-table tbody td {
        padding: 12px 8px;
    }
    
    /* Header layout for tablet */
    header {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
    
    .user-info {
        width: auto;
        justify-content: flex-end;
        gap: 12px;
    }
}

/* Pagination */
.pagination-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    margin-top: 24px;
    padding: 20px;
}

.pagination-info {
    color: var(--text-light);
    font-size: 14px;
}

/* Quote Items */
.quote-items-list {
    margin-bottom: 16px;
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 12px;
    background: var(--bg-color);
}

.quote-items-list .empty-items-message {
    text-align: center;
    color: var(--text-light);
    padding: 20px;
}

.quote-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: var(--card-bg);
    border-radius: 6px;
    margin-bottom: 8px;
    border: 1px solid var(--border-color);
    transition: all 0.2s ease;
}

.quote-item:last-child {
    margin-bottom: 0;
}

.quote-item:hover {
    box-shadow: var(--shadow-sm);
    border-color: var(--primary-color);
}

.quote-item-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.quote-item-description {
    font-weight: 500;
    color: var(--text-color);
}

.quote-item-value {
    color: var(--text-light);
    font-size: 14px;
}

.quote-item-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.quote-item-actions .btn {
    padding: 6px 12px;
    font-size: 13px;
}

.quote-total {
    text-align: right;
    padding: 16px;
    background: var(--bg-color);
    border-radius: 8px;
    border: 1px solid var(--border-color);
    font-size: 18px;
    color: var(--text-color);
}

.quote-total strong {
    color: var(--primary-color);
}

#quoteTotalAmount {
    color: var(--primary-color);
    font-size: 20px;
}

/* Item Input Row */
.items-input-row {
    display: flex;
    gap: 12px;
    align-items: flex-end;
    margin-bottom: 12px;
    margin-top: 8px;
}

.items-input-row .form-group {
    margin-bottom: 0;
}

.items-input-row .form-group:first-child {
    flex: 1;
}

.items-input-row .form-group:nth-child(2) {
    flex: 0 0 150px;
}

.items-input-row .form-group input {
    width: 100%;
}

.items-input-button {
    flex: 0 0 auto;
    display: flex;
    align-items: flex-end;
    padding-bottom: 0;
}

.items-input-button .btn {
    margin-top: 0;
    white-space: nowrap;
}

.items-total-wrapper {
    margin-top: 12px;
}

#workTotalAmount {
    color: var(--primary-color);
    font-size: 20px;
}
