/* ====================================================
   UNIVERSAL HEADER
==================================================== */
header.main-header {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    background: linear-gradient(90deg, #0F1F5C, #1E3A8A);
    padding: 15px 25px 40px;
    color: white;
    position: relative;
    z-index: 10;
}
.header-left { display: flex; gap: 15px; }
.header-center { justify-self: center; font-size: 32px; font-weight: bold; white-space: nowrap; }
.header-right { display: flex; align-items: center; }
.header-logo { height: 80px; width: auto; }
.header-waves { position: absolute; bottom: 0; left: 0; width: 100%; overflow: hidden; }
.header-waves svg { width: 100%; height: 45px; display: block; }

/* ====================================================
   NAV BUTTONS
==================================================== */
.nav-btn {
    background: transparent;
    padding: 10px;
    margin: 0 15px;
    border-radius: 6px;
    transition: 0.25s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none !important;
    outline: none !important;
}
.nav-btn:hover { background: rgba(255,255,255,0.12); transform: translateY(-2px); }
.nav-icon { width: 40px; height: 40px; filter: brightness(0) invert(1) !important; }

/* ====================================================
   GLOBAL MENU OVERLAY
==================================================== */
#globalMenu { display: none; position: fixed; top:0; left:0; width:100%; height:100%; background: rgba(15,31,92,0.95); z-index:9999; }
.global-menu-inner { max-width:400px; margin:60px auto; background:white; padding:25px; border-radius:8px; box-shadow:0 4px 12px rgba(0,0,0,0.2); }
.global-menu-inner h2, .global-menu-inner a, .global-menu-inner li { color:#000 !important; }
.global-menu-inner a:hover { color:#333 !important; }

/* ====================================================
   GLOBAL BUTTONS — TRANSPORT HUB BLUE
==================================================== */
.btn, .save-btn, .account-btn {
    background-color: #0A2A66 !important;
    color: #fff !important;
    padding: 10px 18px !important;
    border-radius: 6px !important;
    font-weight: 600 !important;
    border: none !important;
    cursor: pointer !important;
    transition: 0.2s ease-in-out !important;
    text-decoration: none !important;
}

/* Remove broken rule that forced full-width buttons */
form .btn {
    width: auto !important;
}


/* Transport Hub locked blue */
.chat-outer {
    background: #0A2A66 !important;
    color: #ffffff;        /* white text for readability */
    border-radius: 6px;    /* optional rounded corners */
    padding: 15px;         /* optional spacing */
}

/* ====================================================
   TABLES
==================================================== */
.weekly-scroll { max-height:75vh; overflow:auto; }
.weekly-table { width:100%; border-collapse:collapse; }
.weekly-table th, .weekly-table td { border:1px solid #061A44; padding:8px; text-align:center; }
.weekly-table thead th { background:#0A2A66; color:#fff; font-weight:700; padding:10px; position:sticky; top:0; }

/* ====================================================
   SECTIONS
==================================================== */
.welcome-section, .info-section {
    background:white; margin:20px auto; padding:30px 20px; max-width:900px;
    border-radius:6px; box-shadow:0 2px 6px rgba(0,0,0,0.05);
}
.welcome-section h2 { color:#1E3A8A; font-size:36px; }
.info-section h3 { color:#1E3A8A; }

/* ====================================================
   DASHBOARD CARDS
==================================================== */
.dashboard-grid { display:grid; grid-template-columns:repeat(5,1fr); gap:20px; margin-top:25px; }
.dash-card { background:#0F1F5C; color:white; padding:20px; border-radius:8px; transition:0.25s ease; }
.dash-card:hover { background:#3B82F6; transform:translateY(-4px); }

/* ====================================================
   PROFILE / EDIT
==================================================== */
.profile-container { display:flex; flex-direction:column; align-items:center; text-align:center; }
.profile-edit-btn { background:#1E3A8A; color:white; padding:12px; border-radius:6px; width:100%; }
.edit-container { display:flex; justify-content:center; margin-top:40px; }
.edit-form { background:white; padding:30px; width:450px; border-radius:12px; box-shadow:0 0 10px rgba(0,0,0,0.15); text-align:center; }

/* ====================================================
   SETTINGS
==================================================== */
.settings-layout { display:flex; gap:20px; padding:30px; background:#fff; }
.settings-sidebar { width:260px; background:#F5F7FB; border-right:2px solid #1E88E5; padding:20px; border-radius:8px; }
.settings-sidebar h3 { color:#1E3A8A; margin-bottom:15px; }
.settings-sidebar a { display:block; padding:10px; margin-bottom:8px; border-radius:6px; text-decoration:none; color:#000; transition:0.2s ease-in-out; }
.settings-sidebar a:hover { background:#1E88E5; color:#fff; }
.settings-content { flex:1; background:#fff; padding:25px 30px; border-radius:10px; border:2px solid #1E88E5; }

/* ====================================================
   ACCOUNT SETTINGS — BUTTONS
==================================================== */

/* Base small button (Change Password, Upload Photo) */
.settings-small-btn {
    display: inline-block;
    padding: 10px 18px;
    font-size: 15px;
    font-weight: 600;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    text-decoration: none;
    background-color: #0A2A66;  /* your deep blue */
    color: #ffffff;
    margin-top: 10px;
    transition: 0.2s ease-in-out;
}

.settings-small-btn:hover {
    background-color: #1E3A8A;
    transform: translateY(-2px);
}

/* Logout button override (Log Out) */
.logout-red {
    background-color: #C62828 !important;
    color: #ffffff !important;
}

.logout-red:hover {
    background-color: #8E0000 !important;
    transform: translateY(-2px);
}

/* Optional: file input spacing */
.profile-file-input {
    margin-bottom: 10px;
}
/* Pay Rate Settings */
#settings-payrates h1,
#settings-payrates .section-desc {
    text-align: center;
}
#settings-payrates h1 {
    text-align: center;
    color: #003A75;   /* your Transport Hub blue */
    margin-bottom: 10px;
}


.settings-form {
    max-width: 600px;     /* controls the width of the top section */
    margin: 0 auto;       /* centres it */
}


.settings-form input[type="date"] {
    max-width: 180px;   /* set the width you want */
    width: 180px;       /* forces the width */
}

.section-desc {
    margin-bottom: 20px;
    color: #666;
}

.settings-block {
    background: #f9f9f9;
    padding: 20px;
    margin-bottom: 25px;
    border-radius: 6px;
    border: 1px solid #ddd;
}

.block-title {
    margin-bottom: 15px;
    font-size: 1.2rem;
    color: #1E88E5;
}

.settings-table-container {
    width: 100%;
    max-width: none;     /* break out of the 1500px parent */
}

.settings-table {
    width: 100%;
    table-layout: fixed;
}

.settings-table th,
.settings-table td {
    font-size: 0.75rem;   /* smaller text */
    white-space: normal;
    overflow-wrap: anywhere;
}

.settings-table td:first-child {
    white-space: nowrap;
}


.form-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    gap: 15px;
}

.form-row label {
    flex: 1;
    font-weight: 600;
}

.form-row input {
    flex: 1;
    max-width: 100px;
}


.settings-footer {
    text-align: right;
    margin-top: 15px;
}

#settings-payrates .settings-table {
    width: 100%;
}

#settings-payrates {
    width: 100%;
    max-width: none;
}

.settings-table {
    width: 200%;
    table-layout: fixed;
}

.settings-table th,
.settings-table td {
    padding: 8px 6px;
    text-align: center;
}

.settings-table th {
    white-space: normal;
    word-wrap: break-word;
    overflow-wrap: anywhere;
}

.delete-bin-btn {
    background: none;
    border: none;
    color: #d9534f;      /* red */
    font-size: 22px;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.delete-bin-btn:hover {
    color: #b52b27;
}

.delete-bin-btn {
    background: none;
    border: none;
    color: #d9534f;
    font-size: 22px;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.delete-bin-btn:hover {
    color: #b52b27;
}

#settings-specialdays .settings-table {
    width: 75%;
    margin: 0 auto;
    table-layout: fixed;
    border-collapse: collapse;
}

#settings-specialdays .settings-table th,
#settings-specialdays .settings-table td {
    padding: 10px 12px;
    white-space: nowrap;
    font-size: 20px;      /* bigger font ONLY here */
}




/* ====================================================
   FILE INPUTS
==================================================== */
input[type="file"] {
    border:2px solid #1E88E5; border-radius:6px; padding:6px;
    background:#F5F7FB; cursor:pointer; transition:0.2s ease-in-out;
}
input[type="file"]:hover { background:#E0E7F9; }

/* ====================================================
   HOMEPAGE BUTTON GROUP — CENTER BUTTONS
==================================================== */
.button-group {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 25px;
}


/* ====================================================
   FOOTER (sticky)
==================================================== */
html, body {
    height: 100%;
    margin: 0;
}
body {
    display: flex;
    flex-direction: column;
}
main {
    flex: 1;
}
footer {
    margin-top: auto;
    text-align:center;
    padding:25px;
    color:#555;
    font-size:14px;
}

/* ====================================================
   AUTH PAGES — FINAL FIX
==================================================== */
.form-card {
    max-width: 400px;
    margin: 0 auto;
    padding: 20px;
}

.form-card .btn {
    display: block !important;
    width: 200px !important;
    margin: 15px auto !important;
    text-align: center !important;
}

/* ====================================================
   DUTY ENTRY PAGE — WIDER CONTAINER
==================================================== */

.duty-container {
    max-width: 1100px;     /* wider layout */
    margin: 40px auto;
    padding: 20px;
}

/* Make each section full width */
.duty-section {
    width: 100%;
    margin-bottom: 30px;
}

/* Ensure rows don’t squash */
.duty-row {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}
#duty-entry .info-section {
    max-width: 1100px !important;
}

/* ====================================================
   DUTY HOURS CHECKER — FIX WIDTH
==================================================== */

form[action="/duty-hours-checker"] {
    max-width: 1100px !important;
    width: 100% !important;
    margin: 40px auto !important;
    padding: 20px !important;
}

/* ====================================================
   STATUS BADGES — TRAFFIC LIGHT COLOURS
==================================================== */

.status-badge {
    display: inline-block;
    padding: 6px 10px;
    border-radius: 6px;
    font-weight: 600;
    color: #fff;
}

.status-badge.green {
    background: #4CAF50;
}

.status-badge.amber {
    background: #FFC107;
    color: #000;
}

.status-badge.red {
    background: #F44336;
}

/* WEEKLY HEADER BAR FIX */
.weekly-header-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #F5F7FB;
    padding: 15px 20px;
    margin-bottom: 25px;
    border-radius: 6px;
    border: 2px solid #1E88E5;
}

/* ============================
   TRANSPORT HUB — HOME PAGE STYLING
   ============================ */

:root {
    --hub-blue: #0A2A66;        /* Main Transport Hub navy */
    --hub-blue-dark: #061B44;   /* Hover navy */
    --hub-grey: #f5f5f5;
    --hub-text: #333;
}

/* ============================
   GENERAL PAGE LAYOUT
   ============================ */

section {
    margin-bottom: 40px;
}

h2, h3, h4 {
    color: var(--hub-blue);
    font-weight: 700;
}

/* ============================
   WELCOME SECTION
   ============================ */

.welcome-section h2 {
    font-size: 2rem;
    margin-bottom: 10px;
}

.welcome-section p {
    font-size: 1.1rem;
    line-height: 1.6;
    color: var(--hub-text);
}

/* ============================
   BUTTONS (Transport Hub Style)
   ============================ */

.btn {
    background: var(--hub-blue);
    color: #fff;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    margin-right: 10px;
    transition: background 0.2s ease;
}

.btn:hover {
    background: var(--hub-blue-dark);
}

/* ============================
   USEFUL LINKS — MATCH DRIVERS HUB CARDS
   ============================ */
.useful-links h2 {
    text-align: center;
    width: 100%;
    margin-bottom: 20px;
}
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;

    /* Centre the grid */
    max-width: 1200px;
    margin: 25px auto;
    padding: 0 20px;
}
.dash-card h3 {
    color: #ffffff !important;
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 8px;
    display: block;
}

/* ============================
   PETITION TO SUPPORT COOLER BUSES
============================ */   

.petition-section {
    max-width: 900px;
    margin: 40px auto;
    padding: 30px;
    background: #ffffff;
    border: 1px solid #d0d0d0;
    border-radius: 10px;
    box-shadow: 0 3px 8px rgba(0,0,0,0.10);
    text-align: center;
}

.petition-section h2 {
    color: var(--hub-blue);
    font-size: 1.9rem;
    font-weight: 700;
    margin-bottom: 18px;
}

.petition-section p {
    font-size: 1.1rem;
    line-height: 1.65;
    color: #333;
    margin-bottom: 18px;
}

.petition-btn {
    display: inline-block;
    background: var(--hub-blue);
    color: #fff;
    padding: 12px 26px;
    border-radius: 6px;
    font-size: 1.1rem;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.25s ease;
}

.petition-btn:hover {
    background: var(--hub-blue-dark);
}


/* ============================
   SCROLLABLE RULE CONTAINER
   ============================ */

.rule-container {
    max-width: 900px;
    margin: 40px auto;
    padding: 25px;
    background: #fff;
    border: 1px solid #d0d0d0;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
    max-height: 600px;
    overflow-y: auto;

    /* Centre headings + quirky text */
    text-align: center;
}

/* Centre ONLY headings + quirky text */
.rule-container h2,
.rule-container p.quirky-sub {
    width: 100%;
    margin-left: auto;
    margin-right: auto;
}

/* Keep rule list left-aligned */
.rule-container ul {
    list-style: none;
    padding-left: 0;
    font-size: 1.15rem;
    line-height: 1.9;
    text-align: left;
}

/* Rule links */
.rule-link {
    text-decoration: none;
    font-weight: 600;
    color: var(--hub-blue);
}

.rule-link:hover {
    color: var(--hub-blue-dark);
}

.rule-link:visited {
    color: var(--hub-blue); /* Prevent purple visited links */
}


/* ============================
   DRIVER EDUCATION FULL WRITE-UP
   ============================ */

.driver-education h2 {
    font-size: 1.8rem;
    margin-bottom: 15px;
}

.driver-education h3 {
    font-size: 1.4rem;
    margin-top: 25px;
    margin-bottom: 10px;
}

.driver-education h4 {
    font-size: 1.2rem;
    margin-top: 20px;
    margin-bottom: 10px;
}

.driver-education p {
    font-size: 1.1rem;
    line-height: 1.7;
    margin-bottom: 10px;
    color: var(--hub-text);
}

.driver-education ul {
    list-style: square;
    padding-left: 25px;
    margin-bottom: 15px;
}

.driver-education ul li {
    margin-bottom: 6px;
}

/* ============================
   STOPPING DISTANCE TABLE
   ============================ */

.driver-education table {
    width: 100%;
    max-width: 650px;
    border-collapse: collapse;
    margin-top: 15px;
    margin-bottom: 20px;
}

.driver-education table th,
.driver-education table td {
    border: 1px solid #ccc;
    padding: 10px;
    text-align: center;
}

.driver-education table th {
    background: var(--hub-blue);
    color: #fff;
}

.driver-education table tr:nth-child(even) {
    background: var(--hub-grey);
}

/* ============================
   INCIDENT IMAGE CARDS
   ============================ */

.incident-card {
    background: #fff;
    border-left: 4px solid var(--hub-blue);
    padding: 10px;
    border-radius: 6px;
    text-align: center;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.incident-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.incident-card img {
    width: 100%;
    max-width: 150px;
    border-radius: 4px;
}

.incident-card h5 {
    margin-top: 10px;
    font-size: 1rem;
    color: var(--hub-blue);
}

.incident-card p {
    font-size: 0.85rem;
    color: #555;
}

/* ============================
   LEGAL NOTICE
   ============================ */

.legal-note {
    font-size: 0.95rem;
    color: #555;
    margin-top: 20px;
    line-height: 1.5;
}

/* ============================
   DRIVERS INFO (ARTICLES)
============================ */   

.article-container {
    max-width: 900px;
    margin: 40px auto;
    padding: 0 20px;
    color: #000;
}
.section-header {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 15px;
    margin: 30px 0 15px 0;
    white-space: nowrap;        /* prevents header from wrapping */
}

.section-header img {
    flex-shrink: 0;             /* prevents icon from shrinking */
}

.section-header h1,
.section-header h2 {
    margin: 0;
    padding: 0;
}
/* Reduce icon sizes across all article headers */
.article-header-image,
.what-icon,
.thinking-icon {
    width: 100px !important;     /* smaller icon size */
    height: auto !important;
    flex-shrink: 0 !important;  /* prevents distortion */
    display: block !important;
}

.article-btn {
    display: inline-block !important;
    background: #0A2A66 !important;
    color: #fff !important;
    padding: 12px 20px !important;
    border-radius: 6px !important;
    font-weight: 600 !important;
    text-decoration: none !important;
    transition: 0.2s ease-in-out !important;
    margin-bottom: 20px !important;
    border: none !important;
}
.article-btn:hover {
    background: #1E3A8A !important;
    transform: translateY(-2px) !important;
}

.article-nav-btn {
    background: #0A2A66 !important;
    color: #fff !important;
    padding: 10px 18px !important;
    border-radius: 6px !important;
    font-weight: 600 !important;
    text-decoration: none !important;
    transition: 0.2s ease-in-out !important;
    border: none !important;
}
.article-nav-btn:hover {
    background: #1E3A8A !important;
    transform: translateY(-2px) !important;
}

.article-nav {
    display: flex !important;
    justify-content: space-between !important;
    margin: 25px 0 !important;
}

/* ====================================================
   UNIVERSAL PAGE TITLE — CENTRED
==================================================== */

.page-title {
    text-align: center !important;
    width: 100% !important;
    display: block !important;
    margin-left: auto !important;
    margin-right: auto !important;
    margin-top: 20px !important;
    margin-bottom: 20px !important;
    font-size: 36px !important;
    font-weight: 700 !important;
    color: #1E3A8A !important;
}

/* ============================
   MOBILE LAYOUT (GLOBAL)
   ============================ */
@media (max-width: 768px) {

    body {
        padding: 0;
        margin: 0;
        font-size: 16px;
    }

    .settings-layout {
        padding: 15px;
    }

    h2 {
        font-size: 22px;
        margin-bottom: 15px;
    }

    h3 {
        font-size: 18px;
        margin-top: 20px;
    }

    .legal-section {
        padding: 10px;
    }

    .nav-btn {
        display: inline-block;
        padding: 10px 14px;
        font-size: 16px;
        margin-bottom: 15px;
    }

    /* Sidebar collapses cleanly */
    aside {
        width: 100%;
        margin-bottom: 20px;
    }

    aside ul {
        padding-left: 0;
    }

    aside li {
        margin-bottom: 10px;
    }

    aside a {
        font-size: 16px;
    }

    /* Tables scroll horizontally */
    table {
        width: 100%;
        display: block;
        overflow-x: auto;
        border-collapse: collapse;
    }
}

/* ====================================================
   PLATFORM MESSAGES
==================================================== */
.chat-window {
    background: #f5f5f5;
    padding: 20px;
    height: 60vh;
    overflow-y: auto;
    border-radius: 10px;
}

.chat-message {
    margin: 10px 0;
    padding: 12px;
    border-radius: 10px;
    max-width: 70%;
}

.admin-msg {
    background: #e3f2fd;
    border-left: 4px solid #1e88e5;
    margin-right: auto;
}

.user-msg {
    background: #fff3e0;
    border-right: 4px solid #fb8c00;
    margin-left: auto;
}

.msg-header {
    font-weight: bold;
    margin-bottom: 5px;
}

.timestamp {
    font-size: 0.8em;
    color: #777;
    margin-left: 10px;
}

.chat-input {
    margin-top: 20px;
    display: flex;
    gap: 10px;
}

.chat-input textarea {
    flex: 1;
    height: 80px;
}

.chat-input button {
    padding: 10px 20px;
}

/* ==========================================
   PROFESSIONAL SCENARIO SECTION STYLING
   ========================================== */

.scenario-section {
    margin: 50px 0;
    padding: 40px 20px;
    background: #f8f9fa;
    border-top: 4px solid #1E88E5;
    border-bottom: 4px solid #1E88E5;
}

.scenario-container-inner {
    max-width: 900px;
    margin: 0 auto;
}

.scenario-row {
    display: flex;
    align-items: center;
    gap: 30px;
    margin-bottom: 35px;
}

.scenario-row.reverse {
    flex-direction: row-reverse;
}

.scenario-avatar {
    flex: 0 0 110px;
    text-align: center;
}

.scenario-avatar i {
    font-size: 2.8rem;
    color: #1E88E5;
}

.scenario-avatar p {
    margin-top: 8px;
    font-weight: 700;
    font-size: 0.85rem;
    color: #555;
    text-transform: uppercase;
}

/* Speech Bubble Box */
.speech-bubble {
    position: relative;
    background: #ffffff;
    border: 2px solid #cbd5e1;
    border-radius: 12px;
    padding: 20px 25px;
    font-size: 1.05rem;
    color: #1e293b;
    line-height: 1.6;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.03);
    flex: 1;
}

/* Left-pointing speech bubble tail */
.speech-bubble.left-tail::after {
    content: "";
    position: absolute;
    left: -14px;
    top: 25px;
    border-style: solid;
    border-width: 10px 14px 10px 0;
    border-color: transparent #ffffff transparent transparent;
    display: block;
    width: 0;
    z-index: 1;
}
.speech-bubble.left-tail::before {
    content: "";
    position: absolute;
    left: -17px;
    top: 24px;
    border-style: solid;
    border-width: 11px 15px 11px 0;
    border-color: transparent #cbd5e1 transparent transparent;
    display: block;
    width: 0;
    z-index: 0;
}

/* Right-pointing speech bubble tail */
.speech-bubble.right-tail::after {
    content: "";
    position: absolute;
    right: -14px;
    top: 25px;
    border-style: solid;
    border-width: 10px 0 10px 14px;
    border-color: transparent transparent transparent #ffffff;
    display: block;
    width: 0;
    z-index: 1;
}
.speech-bubble.right-tail::before {
    content: "";
    position: absolute;
    right: -17px;
    top: 24px;
    border-style: solid;
    border-width: 11px 0 11px 15px;
    border-color: transparent transparent transparent #cbd5e1;
    display: block;
    width: 0;
    z-index: 0;
}