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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #0d1117;
    color: #c9d1d9;
    overflow: hidden;
    height: 100vh;
}

.app {
    display: grid;
    grid-template-areas: 
        "header header"
        "sidebar main"
        "status status";
    grid-template-rows: 48px 1fr 28px;
    grid-template-columns: 240px 1fr;
    height: 100vh;
    opacity: 1;
}

.header {
    grid-area: header;
    background: #161b22;
    border-bottom: 2px solid #30363d;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.2rem;
}

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

.badge {
    width: 28px;
    height: 28px;
    background: #1f6feb;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.9rem;
    color: white;
}

.header-title {
    font-size: 1rem;
    font-weight: 600;
    color: #f0f6fc;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 1.2rem;
    font-size: 0.8rem;
    color: #8b949e;
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #3fb950;
}

.clock {
    font-family: 'Courier New', monospace;
    font-weight: bold;
    color: #f0f6fc;
}

.logout-btn {
    padding: 0.3rem 0.8rem;
    background: #21262d;
    border: 1px solid #30363d;
    border-radius: 4px;
    color: #8b949e;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

.logout-btn:hover {
    background: #da3633;
    color: white;
    border-color: #da3633;
}

.sidebar {
    grid-area: sidebar;
    background: #161b22;
    border-right: 1px solid #30363d;
    display: flex;
    flex-direction: column;
}

.profile {
    padding: 1.2rem;
    border-bottom: 1px solid #30363d;
    text-align: center;
}

.avatar {
    width: 70px;
    height: 70px;
    background: #21262d;
    border-radius: 50%;
    margin: 0 auto 0.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    border: 2px solid #1f6feb;
    overflow: hidden;
}

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

.profile-name {
    font-weight: 600;
    font-size: 1rem;
    color: #f0f6fc;
    margin-bottom: 0.2rem;
}

.profile-rank {
    color: #8b949e;
    font-size: 0.75rem;
    text-transform: uppercase;
}

.profile-unit {
    margin-top: 0.4rem;
    font-size: 0.75rem;
    color: #58a6ff;
}

.nav {
    padding: 0.8rem 0;
    flex: 1;
}

.nav-item {
    padding: 0.8rem 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.7rem;
    font-size: 0.9rem;
    color: #8b949e;
    border-left: 3px solid transparent;
    transition: all 0.2s;
    text-decoration: none;
}

.nav-item:hover {
    background: rgba(31, 111, 235, 0.1);
    color: #c9d1d9;
}

.nav-item.active {
    background: rgba(31, 111, 235, 0.15);
    border-left-color: #1f6feb;
    color: #f0f6fc;
}

.nav-badge {
    margin-left: auto;
    background: #da3633;
    color: white;
    font-size: 0.7rem;
    padding: 0.15rem 0.5rem;
    border-radius: 10px;
    font-weight: bold;
}

.sidebar-footer {
    padding: 0.8rem;
    border-top: 1px solid #30363d;
    font-size: 0.7rem;
    color: #484f58;
    text-align: center;
}

.main {
    grid-area: main;
    overflow-y: auto;
    padding: 1.2rem;
    background: #0d1117;
}

.page-header {
    margin-bottom: 1.2rem;
}

.page-header h1 {
    font-size: 1.3rem;
    font-weight: 600;
    color: #f0f6fc;
    margin-bottom: 0.3rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.page-header p {
    color: #8b949e;
    font-size: 0.85rem;
}

.card {
    background: #161b22;
    border: 1px solid #30363d;
    border-radius: 6px;
    padding: 1rem;
    margin-bottom: 0.8rem;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.8rem;
    padding-bottom: 0.6rem;
    border-bottom: 1px solid #30363d;
}

.card-title {
    font-weight: 600;
    font-size: 1rem;
    color: #f0f6fc;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.card-badge {
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
}

.badge-red {
    background: rgba(218, 54, 51, 0.2);
    color: #f85149;
    border: 1px solid rgba(218, 54, 51, 0.4);
}

.badge-blue {
    background: rgba(31, 111, 235, 0.2);
    color: #58a6ff;
    border: 1px solid rgba(31, 111, 235, 0.4);
}

.badge-green {
    background: rgba(35, 197, 94, 0.2);
    color: #3fb950;
    border: 1px solid rgba(35, 197, 94, 0.4);
}

.badge-orange {
    background: rgba(210, 153, 34, 0.2);
    color: #d29922;
    border: 1px solid rgba(210, 153, 34, 0.4);
}

.stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.8rem;
    margin-bottom: 1.2rem;
}

.stat {
    background: #161b22;
    border: 1px solid #30363d;
    border-radius: 6px;
    padding: 1rem;
    text-align: center;
}

.stat-value {
    font-size: 1.8rem;
    font-weight: bold;
    color: #58a6ff;
    margin-bottom: 0.2rem;
}

.stat-label {
    font-size: 0.7rem;
    color: #8b949e;
    text-transform: uppercase;
}

.melding {
    background: #161b22;
    border: 1px solid #30363d;
    border-radius: 6px;
    padding: 0.9rem;
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 0.8rem;
    align-items: center;
    margin-bottom: 0.6rem;
}

.melding-prio {
    width: 4px;
    height: 40px;
    border-radius: 2px;
}

.prio-1 { background: #f85149; }
.prio-2 { background: #d29922; }
.prio-3 { background: #58a6ff; }

.melding-info h3 {
    font-size: 0.95rem;
    color: #f0f6fc;
    margin-bottom: 0.2rem;
}

.melding-meta {
    font-size: 0.8rem;
    color: #8b949e;
}

.melding-status {
    display: inline-flex;
    align-items: center;
    margin-top: 0.35rem;
    padding: 0.15rem 0.5rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    width: fit-content;
}

.melding-status-actief {
    background: rgba(248, 81, 73, 0.16);
    color: #f85149;
}

.melding-status-afgerond {
    background: rgba(63, 185, 80, 0.16);
    color: #3fb950;
}

.melding-afgerond-door {
    margin-top: 0.4rem;
    font-size: 0.78rem;
    color: #8b949e;
}

.melding-afgerond-label {
    display: inline-block;
    margin-right: 0.35rem;
    font-weight: 600;
    color: #c9d1d9;
}

.melding-afgerond-value {
    color: #58a6ff;
    font-weight: 600;
}

.melding-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.45rem;
}

.melding-time {
    font-family: 'Courier New', monospace;
    font-size: 0.8rem;
    color: #8b949e;
}

.melding-btn {
    padding: 0.45rem 0.75rem;
    border: 1px solid #3fb950;
    border-radius: 4px;
    background: rgba(63, 185, 80, 0.12);
    color: #3fb950;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.melding-btn:hover {
    background: #3fb950;
    color: #0d1117;
}

.flash-stack {
    display: grid;
    gap: 0.5rem;
    margin-bottom: 0.8rem;
}

.flash {
    padding: 0.8rem 1rem;
    border-radius: 6px;
    border: 1px solid #30363d;
    background: #161b22;
    font-size: 0.85rem;
}

.flash-success {
    border-color: rgba(63, 185, 80, 0.45);
    color: #3fb950;
}

.flash-error {
    border-color: rgba(248, 81, 73, 0.45);
    color: #f85149;
}

.flash-info {
    border-color: rgba(88, 166, 255, 0.45);
    color: #58a6ff;
}

.gezocht-card {
    background: #161b22;
    border: 1px solid #30363d;
    border-radius: 6px;
    padding: 1rem;
    display: grid;
    grid-template-columns: 80px 1fr;
    gap: 1rem;
    margin-bottom: 0.6rem;
    align-items: start;
}

.gezocht-foto {
    width: 80px;
    height: 100px;
    background: #21262d;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    border: 2px solid #f85149;
}

.gezocht-info h3 {
    font-size: 1rem;
    color: #f85149;
    margin-bottom: 0.3rem;
}

.gezocht-detail {
    font-size: 0.85rem;
    color: #8b949e;
    line-height: 1.6;
}

.gezocht-detail span {
    color: #c9d1d9;
}

.gezocht-reason {
    margin-top: 0.5rem;
    padding: 0.5rem;
    background: rgba(218, 54, 51, 0.1);
    border-left: 3px solid #f85149;
    border-radius: 0 4px 4px 0;
    font-size: 0.85rem;
    color: #f85149;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

th {
    color: #8b949e;
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    padding: 0.6rem;
    text-align: left;
    border-bottom: 1px solid #30363d;
}

td {
    padding: 0.6rem;
    border-bottom: 1px solid #21262d;
    color: #c9d1d9;
}

.boete-input {
    width: 100%;
    padding: 0.45rem 0.55rem;
    border: 1px solid #30363d;
    border-radius: 4px;
    background: #0d1117;
    color: #c9d1d9;
    font-size: 0.8rem;
}

.boete-input:focus {
    outline: none;
    border-color: #58a6ff;
    box-shadow: 0 0 0 1px rgba(88, 166, 255, 0.2);
}

.boete-input-small {
    min-width: 90px;
}

.boete-actions {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
}

.boete-btn {
    padding: 0.42rem 0.7rem;
    border-radius: 4px;
    border: 1px solid transparent;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.boete-save-btn {
    background: rgba(63, 185, 80, 0.12);
    border-color: #3fb950;
    color: #3fb950;
}

.boete-save-btn:hover {
    background: #3fb950;
    color: #0d1117;
}

.boete-delete-btn {
    background: rgba(248, 81, 73, 0.12);
    border-color: #f85149;
    color: #f85149;
}

.boete-delete-btn:hover {
    background: #f85149;
    color: #0d1117;
}

.status-bar {
    grid-area: status;
    background: #161b22;
    border-top: 1px solid #30363d;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.2rem;
    font-size: 0.7rem;
    color: #484f58;
}

.status-left, .status-right {
    display: flex;
    gap: 1.2rem;
}

::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: #0d1117;
}

::-webkit-scrollbar-thumb {
    background: #30363d;
    border-radius: 3px;
}

.map-box {
    background: #161b22;
    border: 1px solid #30363d;
    border-radius: 6px;
    height: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.map-grid {
    position: absolute;
    width: 200%;
    height: 200%;
    background-image: 
        linear-gradient(rgba(31, 111, 235, 0.08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(31, 111, 235, 0.08) 1px, transparent 1px);
    background-size: 40px 40px;
}

.map-text {
    z-index: 1;
    text-align: center;
    color: #484f58;
}

.map-text div:first-child {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

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

.voertuig-card {
    background: #161b22;
    border: 1px solid #30363d;
    border-radius: 6px;
    overflow: hidden;
}

.voertuig-header {
    padding: 0.8rem;
    background: rgba(31, 111, 235, 0.1);
    border-bottom: 1px solid #30363d;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.kenteken {
    font-family: 'Courier New', monospace;
    font-weight: bold;
    font-size: 1rem;
    background: #ffcc00;
    color: #000;
    padding: 0.2rem 0.5rem;
    border-radius: 3px;
}

.voertuig-body {
    padding: 0.8rem;
    font-size: 0.85rem;
}

.voertuig-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.4rem;
}

.voertuig-row span:first-child {
    color: #8b949e;
}

.v-status {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    border-radius: 3px;
    font-size: 0.7rem;
    font-weight: 600;
}

.v-beschikbaar {
    background: rgba(35, 197, 94, 0.2);
    color: #3fb950;
}

.v-uitgerukt {
    background: rgba(31, 111, 235, 0.2);
    color: #58a6ff;
}

.v-onderhoud {
    background: rgba(210, 153, 34, 0.2);
    color: #d29922;
}

.nav-buttons {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.nav-btn {
    flex: 1;
    min-width: 180px;
    padding: 1rem 1.2rem;
    border-radius: 8px;
    border: 2px solid transparent;
    background: linear-gradient(135deg, #21262d 0%, #161b22 100%);
    color: #8b949e;
    text-align: center;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    position: relative;
    overflow: hidden;
}

.nav-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
    transition: left 0.5s;
}

.nav-btn:hover::before {
    left: 100%;
}

.nav-btn:hover {
    color: #c9d1d9;
    border-color: #30363d;
    background: linear-gradient(135deg, #30363d 0%, #21262d 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(31, 111, 235, 0.2);
}

.nav-btn.active {
    color: #fff;
    border-color: #1f6feb;
    background: linear-gradient(135deg, #1f6feb 0%, #0d47a1 100%);
    box-shadow: 0 0 20px rgba(31, 111, 235, 0.4);
}

.nav-btn.active:hover {
    transform: translateY(-3px);
    box-shadow: 0 0 25px rgba(31, 111, 235, 0.6);
}

.nav-btn span:first-child {
    font-size: 1.3rem;
}

.nav-btn span:last-child {
    font-weight: 500;
}

.action-buttons {
    display: flex;
    gap: 0.8rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.btn-delete {
    width: 36px;
    height: 36px;
    padding: 0;
    border-radius: 6px;
    background: rgba(218, 54, 51, 0.15);
    border: 1px solid rgba(218, 54, 51, 0.3);
    color: #f85149;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.btn-delete:hover {
    background: #da3633;
    color: white;
    border-color: #da3633;
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(218, 54, 51, 0.3);
}

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