/* static/css/logbook.css */
:root {
    --bg-body: #f2f4f8;
    --primary-dark: #2c3e50;
    --accent-green: #27ae60;
    --accent-orange: #e67e22;
    --accent-blue: #3498db;
    --card-surface: #ffffff;
    --text-muted: #6c757d;
}

body {
    background-color: var(--bg-body);
    background-image: radial-gradient(var(--primary-dark) 0.5px, transparent 0.5px);
    background-size: 20px 20px;
    font-family: "Outfit", sans-serif;
    color: var(--primary-dark);
    padding-bottom: 80px;
    transition: background 0.3s ease;
}

.navbar {
    background-color: var(--primary-dark) !important;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.stat-box {
    background: linear-gradient(135deg, var(--accent-blue), #2980b9);
    color: white;
    border-radius: 16px;
    cursor: pointer;
    transition: transform 0.2s;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
    border: none;
}

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

.stat-box::after {
    content: "\F1D5";
    font-family: "bootstrap-icons";
    position: absolute;
    right: -15px;
    bottom: -25px;
    font-size: 6rem;
    opacity: 0.15;
    transform: rotate(20deg);
}

.status-badge {
    padding: 5px 10px;
    font-size: 0.7rem;
    font-weight: 800;
    border-radius: 6px;
    text-transform: uppercase;
}

.img-log-pc {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    border: 2px solid #e9ecef;
    transition: 0.2s;
}

.img-log-pc:hover {
    border-color: var(--accent-blue);
    transform: scale(1.05);
    z-index: 2;
}

/* ====== ELLEN FAB (GLOBAL) ====== */
.ellen-fab {
    position: fixed;
    bottom: 25px;
    right: 25px;
    width: 65px;
    height: 65px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    z-index: 1060;
    transition: 0.3s;
    border: 3px solid var(--accent-blue);
}

.ellen-fab:hover {
    transform: scale(1.1) rotate(5deg);
}

.ellen-fab img {
    width: 40px;
    height: 40px;
    object-fit: contain;
}

/* TOAST SYSTEM (ORIGINAL) */
#ellenToast {
    visibility: hidden;
    min-width: 280px;
    background-color: var(--primary-dark);
    color: #fff;
    text-align: center;
    border-radius: 12px;
    padding: 16px;
    position: fixed;
    z-index: 2000;
    left: 50%;
    bottom: 30px;
    transform: translateX(-50%);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    gap: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

#ellenToast.show {
    visibility: visible;
    animation:
        fadein 0.5s,
        fadeout 0.5s 2.5s;
}

@keyframes fadein {
    from {
        bottom: 0;
        opacity: 0;
    }
    to {
        bottom: 30px;
        opacity: 1;
    }
}
@keyframes fadeout {
    from {
        bottom: 30px;
        opacity: 1;
    }
    to {
        bottom: 0;
        opacity: 0;
    }
}

/* CREATIVE FOOTER (ORIGINAL) */
.creative-footer {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    padding: 60px 0 30px;
    position: relative;
    overflow: hidden;
    color: white;
    border-radius: 30px 30px 0 0;
    margin-top: 50px;
}

.footer-bg-grid {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: radial-gradient(rgba(255, 255, 255, 0.1) 1px, transparent 1px);
    background-size: 20px 20px;
    opacity: 0.3;
}

/* DARK MODE OVERRIDES */
[data-bs-theme="dark"] {
    --bg-body: #0f172a;
    --primary-dark: #f8f9fa;
    --card-surface: #1e293b;
    --text-muted: #94a3b8;
}

[data-bs-theme="dark"] body {
    background-image: radial-gradient(rgba(255, 255, 255, 0.1) 0.5px, transparent 0.5px);
    color: var(--primary-dark);
}

[data-bs-theme="dark"] .desktop-table {
    background: rgba(30, 41, 59, 0.95);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

[data-bs-theme="dark"] .desktop-table thead th {
    background: #0f172a !important;
    color: #94a3b8;
    border-bottom: 2px solid #334155;
}

[data-bs-theme="dark"] .log-row td {
    border-bottom: 1px solid #334155 !important;
    color: #e2e8f0;
}

[data-bs-theme="dark"] .log-row:hover td {
    background-color: #1e293b;
}

[data-bs-theme="dark"] .log-card {
    background: rgba(30, 41, 59, 0.95);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    color: #e2e8f0;
}

[data-bs-theme="dark"] .bg-white,
[data-bs-theme="dark"] .bg-light {
    background-color: #1e293b !important;
    color: #f8f9fa !important;
}

[data-bs-theme="dark"] .text-dark {
    color: #f8f9fa !important;
}

[data-bs-theme="dark"] .border,
[data-bs-theme="dark"] .border-white {
    border-color: #334155 !important;
}

[data-bs-theme="dark"] .text-muted {
    color: #94a3b8 !important;
}

[data-bs-theme="dark"] .ellen-fab {
    background: #1e293b;
    border-color: #3498db;
}

[data-bs-theme="dark"] .card {
    background-color: #1e293b !important;
}

@media (min-width: 769px) {
    .mobile-view,
    .sticky-bottom-nav {
        display: none !important;
    }

    .desktop-table {
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(2px);
        border-radius: 12px;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
        margin-bottom: 3rem;
        max-height: 60vh;
        overflow-y: auto;
    }

    .desktop-table thead th {
        position: sticky;
        top: 0;
        z-index: 10;
        background: #f8f9fa !important;
        padding: 15px;
        font-size: 0.75rem;
        color: #7f8c8d;
        text-transform: uppercase;
        font-weight: 700;
        border-bottom: 2px solid #e9ecef;
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.02);
    }

    .log-row td {
        padding: 12px 15px !important;
        border-bottom: 1px solid #f1f1f1 !important;
        vertical-align: middle;
    }

    .log-row:hover td {
        background-color: #fcfcfc;
    }
}

@media (max-width: 768px) {
    .desktop-table {
        display: none !important;
    }

    .log-card {
        border: none;
        border-left: 5px solid #ccc;
        border-radius: 8px;
        padding: 15px;
        margin-bottom: 15px;
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(2px);
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
        position: relative;
    }

    .log-card[data-status="Selesai"] {
        border-left-color: var(--accent-green);
    }

    .log-card[data-status="Proses"] {
        border-left-color: var(--accent-orange);
    }

    .sticky-bottom-nav {
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        background: #2c3e50 !important;
        backdrop-filter: blur(15px);
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        z-index: 1050;
        padding-bottom: env(safe-area-inset-bottom);
        display: flex;
        justify-content: space-around;
        align-items: center;
        box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.2);
    }

    .nav-item-mobile {
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        padding: 10px 0;
        text-decoration: none;
        color: rgba(255, 255, 255, 0.5);
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .nav-item-mobile i {
        font-size: 1.4rem;
        margin-bottom: 2px;
        transition: transform 0.3s ease;
    }

    .nav-item-mobile span {
        font-size: 0.65rem;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }

    .nav-item-mobile.active {
        color: #ffffff;
    }

    .nav-item-mobile.active i {
        transform: translateY(-3px) scale(1.1);
    }

    .active[href*="logbook"] {
        color: #e74c3c !important;
    }
    .active[href*="aset"] {
        color: #3498db !important;
    }
    .active[href*="jadwal"] {
        color: #8e44ad !important;
    }
    .active[href*="daya"] {
        color: #f1c40f !important;
    }

    .img-thumb-mobile {
        width: 60px;
        height: 60px;
        object-fit: cover;
        border-radius: 8px;
    }

    .ellen-fab {
        bottom: calc(85px + env(safe-area-inset-bottom)) !important;
    }

    body.modal-open .ellen-fab {
        display: none !important;
    }

    body {
        padding-bottom: 90px !important;
    }
}
