body {
    margin: 0;
    font-family: 'Segoe UI', sans-serif;
    display: flex;
    height: 100vh;
    background-color: #222;
    color: white;
}

#map {
    flex: 2;
    height: calc(100vh - 40px);
    margin-top: 40px;
}

#sidebar-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: #1a1a1a;
    margin-top: 40px;
    /* Offset for header */
    border-left: 5px solid #00d664;
    height: calc(100vh - 40px);
}

/* Flashing Alert for New Jobs */
@keyframes flash-bg {
    0% {
        background-color: #ff5722;
        color: white;
        transform: scale(1.02);
    }

    50% {
        background-color: #222;
        color: white;
        transform: scale(1);
    }

    100% {
        background-color: #ff5722;
        color: white;
        transform: scale(1.02);
    }
}

.flash-alert {
    animation: flash-bg 1s infinite;
    border: 2px solid #ff5722 !important;
    z-index: 100;
}


.panel-section {
    flex: 1;
    padding: 10px 20px;
    border-bottom: 2px solid #444;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    /* Pin header, scroll list */
    min-height: 0;
    /* Important for flex nesting */
}

#driver-list,
#job-list {
    flex: 1;
    overflow-y: auto;
    padding-right: 5px;
    /* Space for scrollbar */
}

h2 {
    margin-top: 0;
    color: #00d664;
    font-size: 1.2rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card {
    background: #333;
    margin-bottom: 10px;
    padding: 12px;
    border-radius: 6px;
    font-size: 0.9rem;
    color: #ddd;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.driver-card {
    border-left: 4px solid #00d664;
}

.job-card {
    border-left: 4px solid orange;
}

.job-card.Assigned {
    border-left-color: #00d664;
}

.refresh-btn {
    background: #444;
    color: white;
    border: none;
    padding: 5px 10px;
    cursor: pointer;
    font-size: 0.8rem;
    border-radius: 4px;
}

.refresh-btn:hover {
    background: #666;
}

.modal {
    display: none;
    position: fixed;
    z-index: 3000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
}

.modal-content {
    background-color: #222;
    margin: 60px auto;
    padding: 20px;
    border: 1px solid #444;
    width: 80%;
    max-width: 400px;
    border-radius: 8px;
    color: white;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover {
    color: white;
}

.tabs {
    overflow: hidden;
    border-bottom: 1px solid #444;
    margin-bottom: 20px;
}

.tab-link {
    background-color: inherit;
    float: left;
    border: none;
    outline: none;
    cursor: pointer;
    padding: 10px 16px;
    transition: 0.3s;
    color: #ccc;
    font-size: 1rem;
}

.tab-link:hover {
    background-color: #333;
}

.tab-link.active {
    background-color: #00d664;
    color: black;
    font-weight: bold;
}

.tab-content {
    display: none;
    animation: fadeEffect 0.5s;
}

@keyframes fadeEffect {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.form-row {
    margin-bottom: 10px;
}

.form-row label {
    display: block;
    color: #aaa;
    margin-bottom: 4px;
    font-size: 0.8rem;
}

.form-row input {
    width: 95%;
    padding: 8px;
    border: 1px solid #555;
    background: #222;
    color: white;
}

.list-item {
    background: #333;
    padding: 10px;
    margin-bottom: 5px;
    border-left: 3px solid #555;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

@keyframes blinker {
    50% {
        opacity: 0;
    }
}

.blink {
    animation: blinker 1s linear infinite;
}

.save-btn {
    background: #00d664;
    color: #000;
    border: none;
    padding: 10px;
    width: 100%;
    cursor: pointer;
    font-weight: bold;
}

.save-btn:hover {
    background: #00b353;
}

/* Toast Notifications */
#admin-toast-container {
    position: fixed;
    top: 80px;
    left: 50%;
    transform: translateX(-50%);
    width: auto;
    min-width: 300px;
    max-width: 500px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.admin-toast-msg {
    background: #333;
    color: white;
    padding: 15px 35px 15px 20px;
    /* Right padding for close btn */
    border-left: 5px solid #00d664;
    border-radius: 4px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
    position: relative;
    pointer-events: auto;
    animation: slideDown 0.3s ease-out;
    font-size: 1rem;
    display: flex;
    flex-direction: column;
}

.admin-toast-close {
    position: absolute;
    top: 5px;
    right: 8px;
    cursor: pointer;
    color: #888;
    font-size: 1.2rem;
    font-weight: bold;
    line-height: 1;
}

.admin-toast-close:hover {
    color: white;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}