:root {
    --primary: #d97706;
    --primary-dark: #b45309;
    --primary-light: #f59e0b;
    --secondary: #64748b;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #3b82f6;
    --bg-primary: #1a1d29;
    --bg-secondary: #0f111a;
    --bg-tertiary: #252836;
    --bg-card: #1f2937;
    --bg-hover: #2d3748;
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-tertiary: #64748b;
    --border: #2d3748;
    --border-light: #374151;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.4), 0 1px 2px 0 rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4), 0 2px 4px -1px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5), 0 4px 6px -2px rgba(0, 0, 0, 0.3);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.5), 0 10px 10px -5px rgba(0, 0, 0, 0.4);
}

[data-theme="light"] {
    --bg-primary: #ffffff;
    --bg-secondary: #f5f6fa;
    --bg-tertiary: #eef0f4;
    --bg-card: #ffffff;
    --bg-hover: #e8ebf0;
    --text-primary: #1e293b;
    --text-secondary: #475569;
    --text-tertiary: #94a3b8;
    --border: #d1d5db;
    --border-light: #b8bfc9;
    --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.08);
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

[data-theme="light"] .sidebar {
    background: #ffffff;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .page-header {
    background: #ffffff;
    border: 1px solid #d1d5db;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .info-block {
    background: #ffffff;
    border: 1px solid #d1d5db;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .info-block-header {
    border-bottom: 2px solid #e5e7eb;
}

[data-theme="light"] .vehicle-card {
    background: #ffffff;
    border: 1px solid #d1d5db;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .nav-item.active {
    background: var(--primary);
    color: white;
}

[data-theme="light"] .modal {
    background: #ffffff;
    border: 1px solid #d1d5db;
}

[data-theme="light"] select,
[data-theme="light"] input,
[data-theme="light"] textarea {
    background: #ffffff;
    border-color: #d1d5db;
    color: #1e293b;
}

[data-theme="light"] .stat-card {
    background: #ffffff;
    border: 1px solid #d1d5db;
}

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

body {
    font-family: 'Urbanist', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-secondary);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.app-container {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 260px;
    background: var(--bg-primary);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.3);
}

.sidebar-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.logo-image {
    width: 100px;
    height: auto;
    margin-bottom: 0.75rem;
    display: block;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0.25rem;
}

.logo-subtitle {
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.sidebar-nav {
    padding: 1rem;
    flex: 1;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 0.5rem;
    margin-bottom: 0.25rem;
    transition: all 0.2s;
    font-weight: 500;
}

.nav-item:hover:not(.disabled) {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.nav-item.active {
    background: var(--primary);
    color: white;
    margin-left: 0.25rem;
    margin-right: 0.25rem;
}

.nav-item.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.nav-icon {
    flex-shrink: 0;
}

.badge {
    margin-left: auto;
    padding: 0.125rem 0.5rem;
    background: var(--bg-hover);
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.main-content {
    flex: 1;
    margin-left: 260px;
    padding: 2rem;
    max-width: 100%;
    width: 100%;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: var(--bg-primary);
    border-radius: 1rem;
    border: 1px solid var(--border);
}

.page-header > div {
    flex: 1;
}

.page-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
    line-height: 1.2;
}

.page-subtitle {
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    border: none;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    font-family: 'Urbanist', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

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

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-secondary {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border);
}

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

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

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

.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.8125rem;
}

.search-bar {
    position: relative;
    margin-bottom: 2rem;
}

.search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-tertiary);
}

#search-input {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 3rem;
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    font-size: 0.875rem;
    background: var(--bg-primary);
    color: var(--text-primary);
    transition: all 0.2s;
}

#search-input::placeholder {
    color: var(--text-tertiary);
}

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

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

.vehicle-card {
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    padding: 1.5rem;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: var(--shadow-sm);
}

.vehicle-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
    border-color: var(--primary);
}

.vehicle-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.vehicle-plate {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
}

.vehicle-info {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

.vehicle-stats {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

.stat {
    flex: 1;
}

.stat-label {
    font-size: 0.55rem;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.stat-value {
    font-weight: 600;
    color: var(--text-primary);
    margin-top: 0.25rem;
}

.view {
    display: none;
}

.view.active {
    display: block;
}

.detail-header {
    background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
    border: 1px solid var(--border-light);
    border-radius: 1rem;
    padding: 2rem;
    margin-bottom: 2rem;
    color: white;
    box-shadow: var(--shadow-lg);
}

.detail-header .detail-label {
    color: rgba(255, 255, 255, 0.8);
}

.detail-header .detail-value {
    color: white;
    font-size: 1.125rem;
}

.detail-actions {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

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

.detail-item {
    display: flex;
    flex-direction: column;
}

.detail-label {
    font-size: 0.75rem;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

.detail-value {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-primary);
}

.section {
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: 1rem;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s;
}

.section:hover {
    box-shadow: var(--shadow-md);
}

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

.progress-container {
    margin-bottom: 1rem;
}

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

.progress-title {
    font-weight: 500;
    color: var(--text-primary);
}

.progress-info {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.progress-bar {
    height: 0.5rem;
    background: var(--bg-tertiary);
    border-radius: 1rem;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--success);
    transition: width 0.3s;
}

.progress-fill.warning {
    background: var(--warning);
}

.progress-fill.danger {
    background: var(--danger);
}

.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: 600;
}

.status-badge.ok {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
}

.status-badge.warning {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning);
}

.status-badge.overdue {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
}

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

.timeline-item {
    position: relative;
    padding-bottom: 2rem;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -1.5rem;
    top: 0.5rem;
    width: 0.75rem;
    height: 0.75rem;
    border-radius: 50%;
    background: var(--primary);
    border: 2px solid var(--bg-primary);
    box-shadow: 0 0 0 4px var(--bg-tertiary);
}

.timeline-item::after {
    content: '';
    position: absolute;
    left: -1.125rem;
    top: 1.25rem;
    width: 2px;
    height: calc(100% - 1rem);
    background: var(--border);
}

.timeline-item:last-child::after {
    display: none;
}

.timeline-content {
    background: var(--bg-tertiary);
    padding: 1rem;
    border-radius: 0.5rem;
    border: 1px solid var(--border);
}

.timeline-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.5rem;
}

.timeline-title {
    font-weight: 600;
    color: var(--text-primary);
}

.timeline-date {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.timeline-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-top: 0.5rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 0.625rem 0.875rem;
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-family: inherit;
    background: var(--bg-tertiary);
    color: var(--text-primary);
    transition: all 0.2s;
}

.form-input::placeholder,
.form-textarea::placeholder {
    color: var(--text-tertiary);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

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

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

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

.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal-overlay.active {
    display: flex;
}

.modal {
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-xl);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border);
}

.modal-header h3 {
    font-size: 1.25rem;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-secondary);
    padding: 0.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.25rem;
    transition: all 0.2s;
}

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

.modal-body {
    padding: 1.5rem;
}

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

.empty-state svg {
    width: 64px;
    height: 64px;
    margin-bottom: 1rem;
    opacity: 0.3;
}

.empty-state h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.table {
    width: 100%;
    border-collapse: collapse;
}

.table th {
    text-align: left;
    padding: 1rem 0.75rem;
    font-weight: 600;
    font-size: 0.8125rem;
    color: var(--text-secondary);
    background: var(--bg-tertiary);
    border-bottom: 2px solid var(--border-light);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    white-space: nowrap;
}

.table td {
    padding: 1rem 0.75rem;
    border-bottom: 1px solid var(--border);
    font-size: 0.875rem;
    vertical-align: middle;
}

.table tbody tr {
    transition: background 0.2s;
}

.table tbody tr:hover {
    background: var(--bg-tertiary);
}

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

.document-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--bg-secondary);
    border-radius: 0.5rem;
    margin-bottom: 0.75rem;
}

.document-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-primary);
    border-radius: 0.5rem;
    color: var(--primary);
}

.document-info {
    flex: 1;
}

.document-name {
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.document-meta {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.document-actions {
    display: flex;
    gap: 0.5rem;
}

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

.error-message {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
    padding: 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
}

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

.stat-card {
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s;
}

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

.stat-card-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.stat-card-icon {
    width: 48px;
    height: 48px;
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.stat-card-icon.primary {
    background: rgba(217, 119, 6, 0.15);
    color: var(--primary);
}

.stat-card-icon.success {
    background: rgba(16, 185, 129, 0.15);
    color: var(--success);
}

.stat-card-icon.warning {
    background: rgba(245, 158, 11, 0.15);
    color: var(--warning);
}

.stat-card-icon.danger {
    background: rgba(239, 68, 68, 0.15);
    color: var(--danger);
}

.stat-card-title {
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.stat-card-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.stat-card-change {
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.stat-card-change.positive {
    color: var(--success);
}

.stat-card-change.negative {
    color: var(--danger);
}

.detail-blocks {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.info-block {
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s;
}

.info-block:hover {
    box-shadow: var(--shadow-md);
}

.info-block-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border-light);
}

.info-block-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.info-block-icon {
    width: 40px;
    height: 40px;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(217, 119, 6, 0.15);
    color: var(--primary);
}

.info-block-content {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
}

.info-row:not(:last-child) {
    border-bottom: 1px solid var(--border-light);
}

.info-row-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.info-row-value {
    font-size: 0.9375rem;
    color: var(--text-primary);
    font-weight: 600;
}

.documents-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.document-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    transition: all 0.2s;
}

.document-card:hover {
    background: var(--bg-hover);
    border-color: var(--border-light);
}

.document-card-icon {
    width: 48px;
    height: 48px;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-primary);
    color: var(--primary);
    flex-shrink: 0;
}

.document-card-info {
    flex: 1;
    min-width: 0;
}

.document-card-name {
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.document-card-meta {
    font-size: 0.75rem;
    color: var(--text-tertiary);
}

.document-card-actions {
    display: flex;
    gap: 0.5rem;
}

.chart-container {
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: 1rem;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-sm);
}

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

.chart-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
}

.quick-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
}

.quick-action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    padding: 1.25rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    color: var(--text-primary);
}

.quick-action-btn:hover {
    background: var(--bg-hover);
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.quick-action-icon {
    width: 48px;
    height: 48px;
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary);
    color: white;
}

.quick-action-label {
    font-size: 0.875rem;
    font-weight: 500;
    text-align: center;
}

/* Mobile menu button */
.mobile-menu-btn {
    display: none;
    position: fixed;
    top: 1rem;
    left: 1rem;
    z-index: 1000;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 0.5rem;
    padding: 0.75rem;
    cursor: pointer;
    box-shadow: var(--shadow-lg);
    transition: all 0.2s;
}

.mobile-menu-btn:hover {
    background: var(--primary-dark);
    transform: scale(1.05);
}

.mobile-menu-btn:active {
    transform: scale(0.95);
}

.mobile-close-btn {
    display: none;
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 0.5rem;
    transition: all 0.2s;
    margin-left: auto;
}

.mobile-close-btn:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

/* Mobile overlay */
.mobile-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 998;
}

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

/* Styles pour les cartes de documents dans la page d'entité */
.entity-document-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-color: var(--primary) !important;
}

.entity-document-card:hover .entity-doc-download-btn {
    opacity: 1 !important;
}

.entity-doc-download-btn:hover {
    background: rgba(0, 0, 0, 0.8) !important;
    transform: scale(1.1);
}

/* Responsive mobile pour les documents d'entité */
@media (max-width: 768px) {
    .entity-document-card {
        height: 180px !important;
    }
    
    .entity-doc-download-btn {
        opacity: 1 !important;
        background: rgba(0, 0, 0, 0.5) !important;
    }
}

@media (max-width: 480px) {
    .entity-document-card {
        height: 160px !important;
    }
}

/* Responsive Design - Mobile First */
@media (max-width: 768px) {
    /* Show mobile menu button */
    .mobile-menu-btn {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .mobile-close-btn {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    /* Sidebar - Transform to mobile menu */
    .sidebar {
        width: 280px;
        max-width: 85%;
        position: fixed;
        height: 100vh;
        max-height: 100vh;
        z-index: 999;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        box-shadow: 2px 0 20px rgba(0, 0, 0, 0.5);
    }

    .sidebar.mobile-open {
        transform: translateX(0);
    }

    .sidebar-header {
        padding: 1.5rem 1rem;
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        text-align: left;
    }

    .logo-image {
        width: 80px;
        margin-bottom: 0;
    }

    .logo {
        font-size: 1.25rem;
    }

    /* Main content */
    .main-content {
        margin-left: 0;
        padding: 1rem;
        width: 100%;
    }

    /* Page header */
    .page-header {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
        padding: 1rem;
    }

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

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

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

    .detail-actions .btn {
        width: 100%;
    }

    /* Grids */
    .vehicles-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

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

    .detail-blocks {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .detail-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    /* Forms */
    .form-row {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .form-actions {
        flex-direction: column-reverse;
    }

    .form-actions .btn {
        width: 100%;
    }

    /* Modal */
    .modal {
        width: 95%;
        max-width: none;
        margin: 1rem;
        max-height: 85vh;
    }

    .modal-header {
        padding: 1rem;
    }

    .modal-body {
        padding: 1rem;
        overflow-y: auto;
    }
    
    /* Document detail view dans la modale */
    .modal-body .document-detail-view {
        display: flex;
        flex-direction: column;
        gap: 1rem;
    }
    
    .modal-body .document-preview {
        max-height: 40vh;
    }
    
    .modal-body .document-preview img,
    .modal-body .document-preview iframe {
        max-height: 40vh;
        width: 100%;
        object-fit: contain;
    }

    /* Cards */
    .vehicle-card,
    .stat-card,
    .info-block {
        padding: 1rem;
    }

    /* Detail header */
    .detail-header {
        padding: 1.5rem 1rem;
    }

    /* Section */
    .section {
        padding: 1rem;
        margin-bottom: 1rem;
    }

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

    /* Timeline */
    .timeline {
        padding-left: 1.5rem;
    }

    .timeline-item {
        padding-bottom: 1.5rem;
    }

    .timeline-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    /* Table - Make scrollable */
    .table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .table {
        min-width: 600px;
    }

    .table th,
    .table td {
        padding: 0.75rem 0.5rem;
        font-size: 0.8125rem;
    }

    /* Quick actions */
    .quick-actions {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }

    .quick-action-btn {
        padding: 1rem;
    }

    .quick-action-icon {
        width: 40px;
        height: 40px;
    }

    /* Info rows */
    .info-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .info-row-label,
    .info-row-value {
        width: 100%;
    }

    /* Document cards */
    .document-card {
        padding: 0.75rem;
    }

    .document-card-icon {
        width: 40px;
        height: 40px;
    }

    /* Search bar */
    .search-bar {
        margin-bottom: 1.5rem;
    }

    #search-input {
        font-size: 1rem; /* Prevent zoom on iOS */
    }

    /* Vehicle stats */
    .vehicle-stats {
        flex-wrap: wrap;
    }

    .stat {
        min-width: calc(50% - 0.5rem);
    }

    /* Progress */
    .progress-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    /* Chart */
    .chart-container {
        padding: 1rem;
    }

    .chart-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
}

/* Small mobile devices */
@media (max-width: 480px) {
    .page-title {
        font-size: 1.25rem;
    }

    .page-subtitle {
        font-size: 0.8125rem;
    }

    .btn {
        padding: 0.5rem 1rem;
        font-size: 0.8125rem;
    }

    .modal {
        width: 100%;
        height: 100%;
        max-height: 100vh;
        border-radius: 0;
        margin: 0;
    }
    
    .modal-body {
        max-height: calc(100vh - 60px);
        overflow-y: auto;
    }
    
    /* Document detail view sur très petits écrans */
    .modal-body .document-preview {
        max-height: 35vh;
    }
    
    .modal-body .document-preview img,
    .modal-body .document-preview iframe {
        max-height: 35vh;
    }

    .quick-actions {
        grid-template-columns: 1fr;
    }

    .stat-card-value {
        font-size: 1.5rem;
    }

    .vehicle-card-header {
        flex-direction: column;
        gap: 0.75rem;
    }

    .detail-header .detail-grid {
        grid-template-columns: 1fr;
    }
}

/* Landscape mobile */
@media (max-width: 768px) and (orientation: landscape) {
    .sidebar {
        max-height: 100vh;
        overflow-y: auto;
    }

    .main-content {
        padding: 1rem;
    }
}

/* Tablet */
@media (min-width: 769px) and (max-width: 1024px) {
    .sidebar {
        width: 220px;
    }

    .main-content {
        margin-left: 220px;
        padding: 1.5rem;
    }

    .vehicles-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .detail-blocks {
        grid-template-columns: 1fr;
    }
}

/* Tab content management */
.tab-content {
    display: none;
}

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

/* Admin sub-tabs */
.admin-sub-tab {
    position: relative;
    font-family: 'Urbanist', sans-serif;
}

.admin-sub-tab.active {
    color: var(--primary) !important;
    border-bottom-color: var(--primary) !important;
}

.admin-sub-tab:hover {
    color: var(--text-primary);
}

.admin-section {
    display: none;
}

.admin-section.active {
    display: block;
}

/* Category filter buttons */
.category-filter-btn {
    font-family: 'Urbanist', sans-serif;
}

/* Document cards */
.document-card {
    overflow: hidden;
}

.document-card:hover {
    border-color: var(--primary) !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Nanny layout */
.nanny-layout {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 2rem;
    align-items: start;
}

.nanny-left-column {
    display: flex;
    flex-direction: column;
}

.nanny-right-column {
    position: sticky;
    top: 2rem;
}

/* Responsive pour l'onglet Nounou */
@media (max-width: 1200px) {
    .nanny-layout {
        grid-template-columns: 1fr 350px;
    }
}

@media (max-width: 968px) {
    .nanny-layout {
        grid-template-columns: 1fr;
    }
    
    .nanny-right-column {
        position: static;
    }
}

/* Child selector container */
.child-selector-container {
    margin-bottom: 2rem;
}

.child-selector-container .form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-primary);
}

.child-selector-container .form-input {
    width: 100%;
    max-width: 400px;
}

/* Sous-navigation pour le module Maison */
.sub-nav {
    display: flex;
    gap: 0.5rem;
    border-bottom: 2px solid var(--border);
    padding-bottom: 0.5rem;
}

.sub-nav-item {
    padding: 0.5rem 1rem;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-family: inherit;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    border-radius: 0.375rem;
    transition: all 0.2s;
    position: relative;
}

.sub-nav-item:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.sub-nav-item.active {
    color: var(--primary);
    background: rgba(251, 146, 60, 0.1);
}

.sub-nav-item.active::after {
    content: '';
    position: absolute;
    bottom: -0.6rem;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--primary);
}

/* Sections du module Maison */
.home-section {
    animation: fadeIn 0.3s ease-in;
}

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

/* Cartes d'items (équipements, contrats, maintenances, travaux) */
.item-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    padding: 1.25rem;
    transition: all 0.3s;
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.item-card:hover {
    border-color: var(--primary);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.item-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
}

.item-card-info {
    flex: 1;
    min-width: 0;
}

.item-card-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 0.25rem 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.item-card-subtitle {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin: 0;
}

.item-card-actions {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
}

.action-btn {
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 0.375rem;
    padding: 0.5rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.action-btn:hover {
    background: var(--bg-tertiary);
    border-color: var(--primary);
    color: var(--primary);
}

.action-btn svg {
    display: block;
}

.item-card-body {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.item-card-details {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.detail-row .detail-label {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    flex-shrink: 0;
}

.detail-row .detail-value {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-primary);
    text-align: right;
}

.item-card-status {
    display: flex;
    justify-content: flex-end;
}

/* Cartes de maisons */
.home-card {
    background: var(--bg-secondary);
    border: 2px solid var(--border);
    border-radius: 0.75rem;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

.home-card:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.home-card.active {
    border-color: var(--primary);
    background: rgba(251, 146, 60, 0.05);
    box-shadow: 0 0 0 3px rgba(251, 146, 60, 0.1);
}

.home-card-image {
    width: 100%;
    height: 150px;
    background-size: cover;
    background-position: center;
    position: relative;
}

.home-card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.1), rgba(0,0,0,0.3));
}

.home-card-content {
    padding: 1.5rem;
}

.home-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

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

.home-card-title svg {
    color: var(--primary);
}

.home-card-title h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.home-card-actions {
    display: flex;
    gap: 0.5rem;
}

.icon-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 0.25rem;
    transition: all 0.2s;
}

.icon-btn:hover {
    background: var(--bg-tertiary);
    color: var(--primary);
}

.icon-btn svg[fill="currentColor"] {
    color: var(--primary);
}

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

.home-card-address {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin: 0;
}

.home-card-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 1rem;
}

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

.detail-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.detail-value {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
}

.home-card-badge {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: white;
    padding: 0.375rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(251, 146, 60, 0.3);
    z-index: 1;
}
