/* RESET */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    transition: all 0.3s ease;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

html {
    scroll-behavior: smooth;
}

/* BODY LOAD ANIMATION */
body {
    opacity: 1;
    transition: opacity 0.8s ease, transform 0.8s ease;
}

body.loaded {
    opacity: 1;
    transform: translateY(0);
}

/* GENERAL TABLE & BOX STYLES */
.sap-box {
    border: 2px solid #000;
    padding: 20px;
    max-width: 500px;
    margin: auto;
    margin-bottom: 30px;
}

.table td,
.table th {
    vertical-align: middle;
}

.sap-header {
    background-color: #dce6c3;
    padding: 10px;
    font-weight: bold;
    font-style: italic;
}

table input {
    width: 100%;
    border: none;
    background-color: #f9f9f9;
}

.grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
}

.box {
    border: 1px solid green;
    padding: 15px;
    text-align: center;
    margin: 10px;
    border-radius: 5px;
    min-width: 180px;
}

.section-title {
    font-weight: bold;
    margin-top: 20px;
    font-size: 1.2rem;
}

.card:hover {
    transform: translateY(-3px);
}

.product-list ul {
    padding-left: 0;
}

.product-list ul li {
    padding: 5px 0;
    border-bottom: 1px dashed #ccc;
}

.product-list ul li:last-child {
    border-bottom: none;
}

.card-footer {
    background-color: transparent;
    border-top: none;
    padding: 0 1rem 1rem;
    justify-content: center;
    gap: 10px;
}

.action-buttons {
    display: flex;
    justify-content: center;
    gap: 10px;
}

.img-product {
    width: 300px;
    height: 300px;
    object-fit: contain;
}

/* DASHBOARD BUTTONS */
.btn-tile {
    border-radius: 12px;
    padding: 12px;
    color: #fff !important;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: transform 0.2s, box-shadow 0.2s;
    justify-content: center;
}

.btn-tile:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.15);
    color: black !important;
}

.btn-blue {
    background: #2196f3;
}

.btn-green {
    background: #4caf50;
}

.btn-orange {
    background: #ff9800;
}

.btn-purple {
    background: #673ab7;
}

.btn-teal {
    background: #009688;
}

/* TRUCK LANDING CARDS */
.card-tile {
    border-radius: 16px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card-tile:hover {
    transform: translateY(-6px) scale(1.02);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.card {
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.table-hover tbody tr:hover {
    background-color: #f8f9fa;
}

.status-badge {
    font-size: 0.85rem;
    padding: 5px 10px;
    border-radius: 8px;
}

/* ---------------------------
   SIDEBAR (OFF-SCREEN TOGGLE)
---------------------------- */
.sidebar {
    position: fixed;
    top: 0;
    left: -260px;
    /* hide by default */
    width: 260px;
    height: 100vh;
    background: #1e1e2d;
    padding-top: 20px;
    overflow-y: auto;
    transition: all 0.3s ease-in-out;
    z-index: 1050;
}

.sidebar.open {
    left: 0;
    /* show on toggle */
}

.sidebar a {
    display: block;
    padding: 10px 20px;
    color: #fff;
    text-decoration: none;
}

.sidebar a:hover,
.sidebar a.active {
    background: #34344a;
}

.nav-header {
    color: #aaa;
    padding: 10px 20px;
    font-size: 12px;
    text-transform: uppercase;
}

/* OVERLAY */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    display: none;
    z-index: 1040;
}

.overlay.show {
    display: block;
}

/* ---------------------------
   MAIN CONTENT
---------------------------- */
.content {
    padding: 80px 20px;
    margin-left: 0px;
    /* full width default */
    transition: margin-left 0.3s ease-in-out;
}

/* When sidebar opens → shift right */
.content.shift {
    margin-left: 260px;
}

/* TOPBAR */
.topbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 90px;
    color: #fff;
    z-index: 1100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
}

.toggle-btn {
    background: transparent;
    border: none;
    color: #fff;
    font-size: 20px;
    cursor: pointer;
}

a.navbar-brand img {
    width: 75px;
}

/* RESPONSIVE */
@media (max-width: 992px) {
    .content {
        margin-left: 0 !important;
    }
}

@media screen and (max-width: 768px) {
    .d-btns {
        flex-direction: column;
    }
}

/* LOADING SCREEN */
#loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--bg-color, #ffffff);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 1;
    transition: opacity 0.8s ease;
}

#loading-screen.hidden {
    opacity: 0;
    pointer-events: none;
}

#loading-screen img {
    width: 150px;
    height: 150px !important;
    border-radius: 50%;
    object-fit: contain;
    padding: 16px;
    animation: pulse 2s ease-out infinite;
}

/* Pulse animation */
@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0px rgb(0 69 145), 0 0 0 0px rgb(3 101 162);
    }

    50% {
        transform: scale(0.95);
    }

    100% {
        box-shadow: 0 0 0 15px rgba(0, 210, 255, 0),
            0 0 0 30px rgba(0, 210, 255, 0);
    }
}

footer {
    position: relative;
}

.alert-error {
    background: #cc2a2a36;
    color: red;
    border: 1px solid red;
}

.sb-img {
    padding: 10px;
    width: 100px !important;
    height: 100px !important;
    object-fit: contain;
    display: flex;
    margin: 0px auto !important;
    border-radius: 50% !important;
}