:root {
    --primary: #0d6efd;
    --sidebar-width: 260px;
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background-color: #f4f6f9;
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

main {
    flex: 1;
}

/* Cards */
.stat-card {
    border: none;
    border-radius: 12px;
    transition: transform 0.2s, box-shadow 0.2s;
}
.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.08);
}
.stat-card .icon-box {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

/* Map */
#map {
    height: 70vh;
    min-height: 450px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    z-index: 1;
}
.map-fullscreen #map {
    height: calc(100vh - 120px);
}

.leaflet-popup-content {
    margin: 10px 14px;
    min-width: 220px;
}
.popup-customer h6 {
    margin-bottom: 6px;
    font-weight: 600;
}
.popup-customer .badge {
    font-size: 0.7rem;
}

/* Tables */
.table-card {
    border: none;
    border-radius: 12px;
    overflow: hidden;
}
.table thead th {
    background-color: #f8f9fa;
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    border-bottom: 2px solid #dee2e6;
}
.table tbody tr:hover {
    background-color: #f1f5ff;
}

/* Status colors */
.bg-orange {
    background-color: #fd7e14 !important;
}

/* Login page */
.login-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0d6efd 0%, #0a58ca 50%, #084298 100%);
}
.login-card {
    width: 100%;
    max-width: 420px;
    border: none;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.25);
}
.login-card .card-body {
    padding: 2.5rem;
}

/* Forms */
.form-label {
    font-weight: 500;
    font-size: 0.9rem;
}
.required::after {
    content: " *";
    color: #dc3545;
}

/* Ticket priority & status */
.ticket-card {
    border-left: 4px solid #0d6efd;
    transition: all 0.2s;
}
.ticket-card.priority-tinggi { border-left-color: #ffc107; }
.ticket-card.priority-kritis { border-left-color: #dc3545; }
.ticket-card.priority-rendah { border-left-color: #6c757d; }

/* Responsive adjustments */
@media (max-width: 768px) {
    #map {
        height: 50vh;
    }
    .stat-card .icon-box {
        width: 42px;
        height: 42px;
        font-size: 1.2rem;
    }
}

/* Loading spinner */
.spinner-overlay {
    position: absolute;
    inset: 0;
    background: rgba(255,255,255,0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    border-radius: 12px;
}

/* Badge roles */
.badge-role-administrator { background-color: #6f42c1; }
.badge-role-helpdesk { background-color: #0dcaf0; color: #000; }
.badge-role-teknisi { background-color: #198754; }
