.dotr-blue { background-color: #003399; }
.tab-active { border-bottom: 4px solid #facc15; background-color: rgba(255,255,255,0.1); }

/* Visibility Control */
.admin-only { 
    display: none !important; 
}


body.admin-mode .admin-only { 
    display: table-cell !important; 
}

body.admin-mode button.admin-only { 
    display: inline-block !important; 
}

/* Button Styling */
.btn-edit {
    background-color: #2563eb;
    color: white;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: bold;
    margin-right: 8px;
    cursor: pointer;
    transition: background 0.2s;
}
.btn-edit:hover { background-color: #1d4ed8; }

.btn-delete {
    background-color: #dc2626;
    color: white;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.2s;
}
.btn-delete:hover { background-color: #b91c1c; }

#pst-display { font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; }

@media print {
    header, nav, .admin-only, button, #tableSearch, .fas, #pst-display {
        display: none !important;
    }

    #sect-utility .grid {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        gap: 10px !important;
        margin-bottom: 20px !important;
    }

    #sect-utility .grid > div {
        flex: 1 !important;
        min-width: 0 !important;
        padding: 10px !important;
        border: 1px solid #e2e8f0 !important; 
    }

    .tab-content.hidden {
        display: none !important;
    }
    
    .tab-content:not(.hidden) {
        display: block !important;
    }

    body {
        background: white !important;
        font-size: 12pt !important;
    }

    .shadow-sm, .shadow-xl, .shadow-lg {
        box-shadow: none !important;
    }
}

/* Sidebar Layout Style */
/* Flexible Sidebar */
aside {
    width: 260px;
    background-color: #1e293b; 
    color: white;
    flex-shrink: 0;
    transition: all 0.3s;
}

.main-container {
    display: flex;
    height: 100vh;
    overflow: hidden;
}

/* MOBILE FIX: Kapag maliit ang screen (Phone) */
@media (max-width: 768px) {
    .main-container {
        flex-direction: column; /* Magiging top-to-bottom */
        height: auto;
        overflow: visible;
    }

    aside {
        width: 100%; /* Full width sa phone */
        height: auto;
    }

    .content-area {
        height: auto;
        overflow-y: visible;
    }
}

.content-area {
    flex-grow: 1;
    overflow-y: auto;
}

iframe {
    width: 100%;
    height: 100%;
    border-radius: 12px;
}

/* --- Hanapin mo itong part sa CSS mo --- */

table {
    width: 100%;
    border-collapse: collapse;
}

/* --- DITO MO ILAGAY YUNG STEP 1 --- */
table th, 
table td {
    text-align: center !important;
    vertical-align: middle !important;
    padding: 12px 8px !important; /* Nilagyan natin ng padding para hindi siksikan */
}

/* --- Kung gusto mong i-left align lang ang CP column sa Overall --- */
#cp-tbody td:first-child {
    text-align: center !important;
}

@media print {
    /* 1. Itago ang Navigation at Interactive Elements */
    header, nav, aside, button, .fas, 
    #tableSearch, #pst-display, .admin-only, 
    .hide-on-print, #authBtn {
        display: none !important;
    }

    /* 2. Tanggalin ang Scrollbar at i-fix ang container */
    .main-container, .content-area, .table-container {
        display: block !important;
        overflow: visible !important;
        width: 100% !important;
    }

    /* 3. Table Layout: Siguraduhin na sakop ang buong papel */
    table {
        width: 100% !important;
        min-width: 0 !important;
        table-layout: fixed !important;
        border-collapse: collapse !important;
    }

    /* 4. TANGGALIN ANG RELOCATION PLAN (Pang-apat na Column) */
    table th:nth-child(4),
    #utility-tbody td:nth-child(4),
    #cp-tbody td:nth-child(4) {
        display: none !important;
    }

    /* 5. PAKIGITNA ANG WORK ORDER, STATUS, AT LOCATION */
    /* Target lahat ng Header at Data cells para mag-center */
    table th, 
    table td {
        text-align: center !important; /* Dito ang magic para mag-gitna */
        vertical-align: middle !important;
        padding: 10px 5px !important;
        border-bottom: 1px solid #f3f4f6 !important;
    }

    /* 6. Text at Background Styling */
    body {
        background: white !important;
        font-size: 10pt !important;
    }

    .shadow-sm, .shadow-xl, .shadow-lg {
        box-shadow: none !important;
    }
}