:root {
    --bg-primary: #1a1d2e;
    --bg-secondary: #2d3250;
    --bg-tertiary: #424769;
    --text-primary: #f6f6f6;
    --text-secondary: #b8b8b8;
    --accent: #676f9d;
    --accent-hover: #7d87ab;
    --success: #4caf50;
    --warning: #ff9800;
    --error: #f44336;
    --urgent: #e91e63;
    --border: #3d4059;
}

[data-theme="light"] {
    --bg-primary: #f5f5f5;
    --bg-secondary: #ffffff;
    --bg-tertiary: #e8e8e8;
    --text-primary: #2d3250;
    --text-secondary: #666666;
    --accent: #5865f2;
    --accent-hover: #4752c4;
    --border: #d0d0d0;
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
}

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

header {
    background: var(--bg-secondary);
    padding: 15px 30px;
    border-bottom: 2px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo img {
    width: 40px;
    height: 40px;
}

.logo h1 {
    font-size: 24px;
    font-weight: 600;
}

nav {
    display: flex;
    gap: 20px;
    align-items: center;
}

nav a {
    color: var(--text-primary);
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 5px;
    transition: background 0.3s;
}

nav a:hover, nav a.active {
    background: var(--accent);
}

.theme-toggle {
    background: var(--bg-tertiary);
    border: none;
    color: var(--text-primary);
    padding: 8px 16px;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s;
}

.theme-toggle:hover {
    background: var(--accent);
}

.card {
    background: var(--bg-secondary);
    border-radius: 10px;
    padding: 20px;
    margin: 20px 0;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.vehicle-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.vehicle-card {
    background: var(--bg-secondary);
    border-radius: 10px;
    padding: 15px;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
    position: relative;
}

.vehicle-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
}

.vehicle-card.sold::after {
    content: 'SOLD';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-15deg);
    font-size: 48px;
    font-weight: bold;
    color: var(--error);
    opacity: 0.7;
}

.vehicle-photo {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 10px;
}

.btn {
    background: var(--accent);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.3s;
}

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

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

.btn-success {
    background: var(--success);
}

table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

th, td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

th {
    background: var(--bg-tertiary);
    font-weight: 600;
}

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

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    justify-content: center;
    align-items: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--bg-secondary);
    padding: 30px;
    border-radius: 10px;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}

.form-group {
    margin: 15px 0;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: 5px;
    background: var(--bg-tertiary);
    color: var(--text-primary);
    font-size: 14px;
}

.kanban-board {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.kanban-column {
    background: var(--bg-secondary);
    border-radius: 10px;
    padding: 15px;
}

.kanban-column h3 {
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--accent);
}

.kanban-item {
    background: var(--bg-tertiary);
    padding: 12px;
    border-radius: 5px;
    margin: 10px 0;
    cursor: move;
}

.priority-high {
    border-left: 4px solid var(--error);
}

.priority-medium {
    border-left: 4px solid var(--warning);
}

.priority-low {
    border-left: 4px solid var(--success);
}

.urgency-very-urgent {
    background: var(--urgent);
}

.urgency-urgent {
    background: var(--warning);
}

.urgency-not-urgent {
    background: var(--success);
}

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

.stat-card {
    background: var(--bg-secondary);
    padding: 20px;
    border-radius: 10px;
    text-align: center;
}

.stat-value {
    font-size: 32px;
    font-weight: bold;
    color: var(--accent);
}

.stat-label {
    color: var(--text-secondary);
    margin-top: 5px;
}

.chart-container {
    background: var(--bg-secondary);
    padding: 20px;
    border-radius: 10px;
    margin: 20px 0;
}

.context-menu {
    position: fixed;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 5px;
    padding: 5px 0;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    display: none;
}

.context-menu.active {
    display: block;
}

.context-menu-item {
    padding: 10px 20px;
    cursor: pointer;
    transition: background 0.2s;
}

.context-menu-item:hover {
    background: var(--bg-tertiary);
}

@media (max-width: 768px) {
    header {
        flex-direction: column;
        gap: 15px;
    }
    
    nav {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .vehicle-grid {
        grid-template-columns: 1fr;
    }
    
    .kanban-board {
        grid-template-columns: 1fr;
    }
}
