﻿:root {
    --blue: #002b5c;
    --blue-2: #004a99;
    --muted: #eef2f6;
}

body {
    margin: 0;
    font-family: Inter, Roboto, Arial, sans-serif;
    background: var(--muted);
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 240px;
    background: var(--blue);
    color: #fff;
    position: fixed;
    height: 100vh;
    padding: 20px 12px;
    box-sizing: border-box;
}

    .sidebar h1 {
        font-size: 18px;
        margin: 4px 12px 18px;
        text-align: center;
        font-weight: 600;
    }

.nav {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

    .nav a {
        color: #fff;
        text-decoration: none;
        padding: 10px 12px;
        border-radius: 6px;
        display: block;
    }

        .nav a.active, .nav a:hover {
            background: var(--blue-2);
        }

.content {
    margin-left: 240px;
    padding: 22px;
    width: calc(100% - 240px);
    box-sizing: border-box;
}

.card {
    background: #fff;
    padding: 18px;
    border-radius: 10px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.06);
    margin-bottom: 18px;
}

h2 {
    margin: 0 0 10px 0;
    font-size: 18px;
}

label {
    display: block;
    margin-top: 10px;
    font-weight: 600;
    font-size: 13px;
}

input[type="text"], input[type="datetime-local"], input[type="date"], input[type="number"], select, textarea {
    width: 100%;
    padding: 9px 10px;
    margin-top: 6px;
    border-radius: 6px;
    border: 1px solid #cbd5e0;
    box-sizing: border-box;
}

button {
    padding: 10px 14px;
    border-radius: 8px;
    border: none;
    background: var(--blue);
    color: #fff;
    cursor: pointer;
    font-weight: 600;
}

    button.ghost {
        background: #f3f4f6;
        color: #111;
        border: 1px solid #e5e7eb;
    }

.two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 12px;
    font-size: 13px;
}

th, td {
    border: 1px solid #e6e9ef;
    padding: 10px;
    text-align: center;
    vertical-align: middle;
}

th {
    background: #f8fafc;
    font-weight: 700;
}

.status-active {
    color: green;
    font-weight: 700;
}

.status-inactive {
    color: crimson;
    font-weight: 700;
}

.small {
    font-size: 12px;
    color: #666;
}

.inline {
    display: inline-block;
    margin-right: 8px;
}

.hidden {
    display: none;
}

.flex {
    display: flex;
    gap: 8px;
    align-items: center;
}

.pill {
    padding: 6px 8px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 12px;
}

    .pill.pending {
        background: #fff4e6;
        color: #b45309;
        border: 1px solid #fde68a;
    }

    .pill.inyard {
        background: #e6f7ff;
        color: #0369a1;
        border: 1px solid #bbf7ff;
    }

    .pill.completed {
        background: #e6ffe6;
        color: #166534;
        border: 1px solid #bbf7d0;
    }

.note {
    font-size: 13px;
    color: #374151;
    margin-top: 8px;
}

.muted {
    color: #6b7280;
    font-size: 13px;
}

.row {
    display: flex;
    gap: 12px;
    align-items: center;
}

.right {
    margin-left: auto;
}

.weekday-grid {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 8px;
}

    .weekday-grid label {
        font-weight: 500;
        font-size: 13px;
        display: flex;
        align-items: center;
        gap: 6px;
    }

.actions-row {
    display: flex;
    gap: 8px;
    justify-content: center;
}

.btn-small {
    padding: 6px 8px;
    font-size: 13px;
    border-radius: 6px;
}
.modal {
    display: none;
    position: fixed;
    z-index: 999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.4);
}

.modal-content {
    background: #fff;
    width: 400px;
    padding: 20px;
    margin: 10% auto;
    border-radius: 6px;
}

    .modal-content input,
    .modal-content select {
        width: 100%;
        margin-bottom: 10px;
        padding: 6px;
    }
/* Recurring section card */
#recurringCard {
    padding: 15px;
    border-radius: 6px;
}

.weekdays {
    display: flex;
    flex-wrap: wrap; 
    gap: 10px; 
    margin-bottom: 10px;
}

    .weekdays label {
        display: flex;
        align-items: center;
        cursor: pointer; 
        user-select: none; 
        padding: 2px 5px;
        border-radius: 4px;
        transition: background-color 0.2s;
    }

        .weekdays label:hover {
            background-color: #f0f0f0;
        }

    .weekdays input[type="checkbox"] {
        margin-right: 5px;
    }

#selectAllDays {
    font-weight: bold;
}

.weekdays label {
    min-width: 50px;
    justify-content: flex-start;
}
.sidebar-logo {
    text-align: center;
    padding: 16px 10px;
}

    .sidebar-logo img {
        max-width: 100%;
        height: auto;
        max-height: 60px; 
    }

/* Button Variants */
.btn-primary {
    background: #16a34a; /* green */
}

.btn-warning {
    background: #f59e0b; /* amber */
}

.btn-secondary {
    background: #e5e7eb;
    color: #111;
}

.btn-info {
    background: #2563eb;
}

.btn-primary:hover {
    background: #15803d;
}

.btn-warning:hover {
    background: #d97706;
}

.btn-info:hover {
    background: #1d4ed8;
}

.btn-secondary:hover {
    background: #d1d5db;
}
.btn-danger {
    background: #dc2626; 
}

    .btn-danger:hover {
        background: #b91c1c;
    }
.actions-row button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.actions-row i {
    font-size: 12px;
}
.modal-content .actions-row {
    gap: 10px;
}

.modal-content button {
    min-width: 100px;
}
#bookinglistTableInner {
    table-layout: fixed;
    width: 100% !important;
}

    #bookinglistTableInner td,
    #bookinglistTableInner th {
        white-space: normal !important;
        word-break: break-word;
    }
.tank-list {
    max-width: 210px;
    max-height: 70px;
    overflow-y: auto;
    font-size: 12px;
    line-height: 1.4;
}
/* =========================
   MOBILE RESPONSIVE FIX
   ========================= */
@media (max-width: 768px) {

    body {
        flex-direction: column;
    }

    /* Sidebar becomes top bar */
    .sidebar {
        position: relative;
        width: 100%;
        height: auto;
        padding: 10px;
    }

    .sidebar-logo img {
        max-height: 40px;
    }

    .nav {
        flex-direction: row;
        overflow-x: auto;
        white-space: nowrap;
        gap: 4px;
    }

        .nav a {
            flex: 0 0 auto;
            padding: 8px 10px;
            font-size: 13px;
        }

    /* Main content full width */
    .content {
        margin-left: 0;
        width: 100%;
        padding: 12px;
    }

    /* Cards spacing */
    .card {
        padding: 14px;
    }

    /* Forms go single column */
    .two-col {
        grid-template-columns: 1fr;
    }

    /* Buttons stack nicely */
    .actions-row {
        flex-wrap: wrap;
        gap: 6px;
    }

        .actions-row button {
            flex: 1 1 auto;
            min-width: 90px;
        }

    /* Tables scroll instead of breaking */
    table {
        font-size: 12px;
    }

    #slotTable {
        overflow-x: auto;
    }

    /* DataTables wrapper fix */
    .dataTables_wrapper {
        overflow-x: auto;
    }

    /* Modals fit screen */
    .modal-content {
        width: 90%;
        margin: 20% auto;
    }

    /* Weekday checkboxes wrap */
    .weekdays {
        gap: 6px;
    }

        .weekdays label {
            min-width: auto;
            font-size: 12px;
        }
}
