﻿@font-face {
    /* Shared WebTracker sign-in layout styles. */
    font-family: "Muli Regular";
    src: url("muli-regular-webfont.eot");
    src: url("muli-regular-webfont.eot?#iefix") format("embedded-opentype"),
         url("muli-regular-webfont.woff") format("woff"),
         url("muli-regular-webfont.ttf") format("truetype"),
         url("muli-regular-webfont.svg#svgFontName") format("svg");
    font-weight: normal;
    font-style: normal;
}

:root {
    color-scheme: light;
    font-family: "Muli Regular", "Segoe UI", Arial, sans-serif;
    color: #111;
    background: #f7f7f7;
}

* {
    box-sizing: border-box;
}

body {
    min-width: 320px;
    min-height: 100vh;
    margin: 0;
    background:
        linear-gradient(90deg, rgba(247, 247, 247, 0.08), rgba(247, 247, 247, 0.76)),
        url("bg1.jpg") center / cover fixed no-repeat,
        #f7f7f7;
}

.login-layout {
    width: min(1240px, calc(100% - 48px));
    min-height: 550px;
    margin: 0 auto;
    padding: 48px 0;
    display: grid;
    grid-template-columns: minmax(390px, 0.9fr) minmax(0, 1.1fr);
    align-items: center;
}

.signin-card {
    position: relative;
    z-index: 1;
    margin-right: -88px;
    padding: 0 34px 25px;
    border: 6px solid #001745;
    border-left: 0;
    border-radius: 0 54px 54px 0;
    background: #20399c;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.48);
    color: #fff;
}

.signin-heading {
    width: max-content;
    max-width: 100%;
    min-width: 285px;
    min-height: 76px;
    margin: -40px 0 24px -40px;
    padding: 8px 24px 8px 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    border: 5px solid #532e09;
    border-left: 0;
    border-radius: 0 30px 30px 0;
    background: #ff8e1e;
    box-shadow: 0 5px 14px rgba(0, 0, 0, 0.45);
    font-size: clamp(2rem, 4vw, 3.2rem);
    font-weight: 700;
    line-height: 1;
}

.signin-heading img {
    flex: 0 0 auto;
    width: 48px;
    height: 48px;
}

.signin-content {
    padding-left: 4px;
}

.form-row {
    display: grid;
    grid-template-columns: 155px minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.form-row label {
    font-size: clamp(1.1rem, 2vw, 1.45rem);
    text-shadow: 1px 2px 4px #000;
}

.input_login {
    width: 100%;
    min-width: 0;
    height: 42px;
    padding: 7px 12px;
    border: 0;
    border-radius: 11px;
    background: #fff;
    box-shadow: 1px 2px 7px #000;
    color: #111;
    font: inherit;
}

.input_login:focus {
    outline: 3px solid #ffb04e;
    outline-offset: 2px;
}

.form-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: 8px;
}

.forgot-link {
    color: #fff;
    font-size: clamp(1rem, 2vw, 1.35rem);
    text-decoration: none;
}

.forgot-link:hover,
.forgot-link:focus-visible {
    text-decoration: underline;
}

.login-submit {
    flex: 0 0 82px;
    width: 82px;
    height: 82px;
    border: 0;
    border-radius: 50%;
    background: transparent url("img/submit.png") center / contain no-repeat;
    cursor: pointer;
}

.login-submit:hover,
.login-submit:focus-visible {
    background-image: url("img/submit2.png");
}

.login-submit:active {
    background-image: url("img/submit3.png");
}

.info-card {
    min-height: 540px;
    padding: 50px 38px 24px 122px;
    display: flex;
    flex-direction: column;
    border: 5px solid rgba(150, 150, 150, 0.62);
    border-radius: 58px;
    background: rgba(250, 250, 250, 0.9);
}

.brand-logo {
    display: block;
    width: min(100%, 490px);
    height: auto;
    align-self: center;
    margin-bottom: 58px;
    border-radius: 14px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.25);
}

.info-content {
    margin-bottom: auto;
}

.features {
    margin: 0;
    padding: 0;
    list-style: none;
    font-size: clamp(1.25rem, 2.35vw, 1.85rem);
    line-height: 1.34;
}

.features li::before {
    content: "- ";
}

.request-access {
    display: inline-block;
    margin-top: 2px;
    color: #20399c;
    font-size: clamp(1.9rem, 3.5vw, 2.75rem);
    font-weight: 700;
    letter-spacing: -1.5px;
    line-height: 1.1;
    text-decoration: none;
}

.request-access:hover,
.request-access:focus-visible {
    text-decoration: underline;
}

.info-footer {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 24px;
    margin-top: 36px;
}

.help-link {
    width: 94px;
    display: flex;
    flex-direction: column;
    align-items: center;
    color: #20399c;
    font-size: 1rem;
    text-align: center;
    text-decoration: none;
}

.help-link img {
    width: 52px;
    height: 54px;
    object-fit: contain;
}

.help-link:hover span,
.help-link:focus-visible span {
    text-decoration: underline;
}

.designed-by {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    font-family: Arial, sans-serif;
    font-size: 1rem;
    font-weight: 700;
}

.designed-by img {
    display: block;
    max-width: 100%;
    height: auto;
}

@media (max-width: 900px) {
    .login-layout {
        width: min(660px, calc(100% - 32px));
        padding: 52px 0 32px;
        grid-template-columns: minmax(0, 1fr);
        gap: 30px;
    }

    .signin-card {
        margin: 0;
        border-left: 6px solid #001745;
        border-radius: 34px;
    }

    .signin-heading {
        margin-left: -16px;
    }

    .info-card {
        min-height: 0;
        padding: 32px;
        border-radius: 38px;
    }

    .brand-logo {
        margin-bottom: 32px;
    }
}

@media (max-width: 520px) {
    body {
        background-attachment: scroll;
    }

    .login-layout {
        width: calc(100% - 24px);
        padding-top: 44px;
        gap: 20px;
    }

    .signin-card {
        padding: 0 18px 20px;
        border-width: 4px;
        border-radius: 26px;
    }

    .signin-heading {
        min-width: 0;
        min-height: 62px;
        margin: -30px 0 22px -8px;
        padding: 6px 18px 6px 12px;
        border-width: 4px;
        font-size: 2.1rem;
    }

    .signin-heading img {
        width: 40px;
        height: 40px;
    }

    .signin-content {
        padding: 0;
    }

    .form-row {
        grid-template-columns: minmax(0, 1fr);
        gap: 6px;
        margin-bottom: 14px;
    }

    .form-row label {
        font-size: 1.1rem;
    }

    .form-actions {
        align-items: center;
    }

    .login-submit {
        flex-basis: 70px;
        width: 70px;
        height: 70px;
    }

    .info-card {
        padding: 24px 20px;
        border-radius: 28px;
    }

    .brand-logo {
        margin-bottom: 24px;
    }

    .features {
        font-size: 1.15rem;
    }

    .request-access {
        font-size: 2rem;
    }

    .info-footer {
        gap: 12px;
        margin-top: 28px;
    }
}


/* ==========================================================================
   Application shell (new-index.php and other signed-in views)
   ========================================================================== */

[hidden] { display: none !important; }

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
}

body.app-body {
    background: linear-gradient(180deg, #e9ebee 0%, #f7f7f7 45%, #e9ebee 100%) fixed;
    color: #111;
}

.app-header {
    display: grid;
    grid-template-columns: auto minmax(220px, 1fr) auto;
    grid-template-areas: "brand search tools";
    align-items: center;
    gap: 16px 28px;
    padding: 14px clamp(12px, 3vw, 40px);
    background: rgba(255, 255, 255, 0.85);
    border-bottom: 1px solid #c9ced6;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    position: sticky;
    top: 0;
    z-index: 20;
}

.app-brand { grid-area: brand; display: block; }
.app-brand img { display: block; max-width: 100%; height: auto; }

.app-search {
    grid-area: search;
    position: relative;
    width: 100%;
    max-width: 560px;
    justify-self: center;
}

.app-search input[type="search"] {
    width: 100%;
    height: 46px;
    padding: 0 52px 0 16px;
    border: 1px solid #b9c0ca;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.25);
    font: inherit;
    font-size: 1rem;
}

.app-search input[type="search"]:focus { outline: 3px solid #ffb04e; outline-offset: 1px; }

.app-search button {
    position: absolute;
    top: 50%;
    right: 8px;
    transform: translateY(-50%);
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
    line-height: 0;
}

.app-tools {
    grid-area: tools;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    min-width: 0;
}

.app-account {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    margin-right: 8px;
    padding: 4px 10px 4px 4px;
    border: 0;
    border-radius: 30px;
    background: transparent;
    color: #111;
    font: inherit;
    font-size: clamp(1.1rem, 2vw, 1.5rem);
    letter-spacing: -1px;
    cursor: pointer;
}

.app-account span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 260px; }
.app-account:hover, .app-account:focus-visible { background: #dfe6f3; }

.icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    cursor: pointer;
    line-height: 0;
    text-decoration: none;
}

.icon-btn:hover, .icon-btn:focus-visible { background: #dfe6f3; }
.icon-btn.disabled { opacity: 0.4; cursor: default; background: transparent; }

.app-layout {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 28px;
    width: min(1280px, 100%);
    margin: 0 auto;
    padding: 28px clamp(12px, 3vw, 40px) 48px;
}

.app-sidebar h2 {
    margin: 0 0 6px;
    font-size: 2rem;
    font-weight: 400;
    letter-spacing: -1.5px;
}

.app-sidebar section { margin-bottom: 28px; }

.side-links { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; }

.side-links a, .side-btn {
    padding: 4px 8px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #111;
    font: inherit;
    font-size: 1.1rem;
    letter-spacing: -0.5px;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
}

.side-links a:hover, .side-btn:hover, .side-links a:focus-visible, .side-btn:focus-visible { background: #dfe6f3; }
.side-links a.active, .side-btn.active { color: #20399c; font-weight: 700; }
.muted { color: #666; font-size: 0.95rem; }

.app-main { min-width: 0; }

.notice {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
    padding: 12px 16px;
    border: 1px solid #ffd54f;
    border-radius: 8px;
    background: #fffbe6;
    color: #333;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 0.9rem;
    letter-spacing: normal;
}

.notice p { margin: 0; }
.notice-error { border-color: #e57373; background: #fdecea; color: #8a1c1c; }

.notice-close {
    flex: 0 0 auto;
    padding: 0 6px;
    border: 0;
    background: transparent;
    color: #666;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
}

.link-btn {
    padding: 0;
    border: 0;
    background: none;
    color: #1a73e8;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}

.pwd-reminder { max-width: 100%; }

.results-card { min-width: 0; }

.results-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px;
    padding-bottom: 6px;
    border-bottom: 2px solid #111;
}

.results-head h1 { margin: 0; font-size: 1.15rem; font-weight: 700; letter-spacing: -0.5px; }
.results-head small { display: block; font-weight: 400; color: #444; }

.print-only { display: none; }

/* DataTables theme */
.app-main .dataTables_wrapper { font-size: 1rem; padding-top: 10px; }
.app-main .dataTables_wrapper .dataTables_length,
.app-main .dataTables_wrapper .dataTables_filter { margin-bottom: 8px; }
.app-main .dataTables_wrapper select,
.app-main .dataTables_wrapper input[type="search"] {
    padding: 4px 8px;
    border: 1px solid #b9c0ca;
    border-radius: 8px;
    background: #fff;
}

.app-main .dataTables_wrapper .dataTables_paginate .paginate_button.current,
.app-main .dataTables_wrapper .dataTables_paginate .paginate_button.current:hover {
    border: 1px solid #20399c;
    background: #20399c;
    color: #fff !important;
}

table.app-table { border-collapse: separate; border-spacing: 0 4px; }
table.app-table thead th {
    padding: 8px 12px;
    border-bottom: 0;
    color: #20399c;
    font-size: 0.95rem;
    letter-spacing: 0;
}
table.app-table.dataTable.no-footer { border-bottom: 0; }
table.app-table tbody tr { background: transparent; }
table.app-table tbody td { padding: 6px 12px; vertical-align: middle; border: 0; }
table.app-table tbody tr.odd > td { background: #aec3d6; }
table.app-table tbody tr.even > td { background: #fafafa; }
table.app-table tbody tr > td:first-child { border-radius: 14px 0 0 14px; }
table.app-table tbody tr > td:last-child { border-radius: 0 14px 14px 0; }
table.app-table tbody tr:hover > td { background: #d3e0ee; }
table.app-table tbody tr.child > td { border-radius: 14px; background: #f1f4f8; }
table.app-table tbody td.dataTables_empty { text-align: center; background: #fafafa; }
table.app-table td.dtr-control { padding-left: 28px; }
table.dataTable.dtr-inline.collapsed > tbody > tr > td.dtr-control:before,
table.dataTable.dtr-inline.collapsed > tbody > tr > th.dtr-control:before { top: 50%; }

.cargo-cell {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #111;
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.cargo-cell strong { display: block; font-size: 1.5rem; font-weight: 400; letter-spacing: -1px; line-height: 1.1; }
.cargo-cell small { display: block; font-size: 1rem; letter-spacing: -0.5px; }
.cargo-cell:hover strong, .cargo-cell:focus-visible strong { text-decoration: underline; }

.row-actions { white-space: nowrap; text-align: right; }

/* Dialogs */
.app-dialog {
    width: min(420px, calc(100% - 24px));
    max-height: calc(100vh - 24px);
    padding: 0;
    border: 0;
    border-radius: 16px;
    background: #fff;
    color: #111;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
    font-family: Arial, Helvetica, sans-serif;
    font-size: 0.95rem;
    letter-spacing: normal;
    overflow: auto;
}

.app-dialog-wide { width: min(900px, calc(100% - 24px)); }
.app-dialog::backdrop { background: rgba(0, 0, 0, 0.55); }
.dialog-body { padding: 20px 22px; }
.dialog-body h2 { margin: 0 0 12px; font-size: 1.4rem; color: #20399c; }
.dialog-head { display: flex; align-items: center; justify-content: space-between; }

.dialog-body label { display: block; margin: 12px 0 4px; font-weight: 600; text-shadow: none; float: none; width: auto; }
.dialog-body label.check { display: flex; align-items: center; gap: 8px; font-weight: 400; }

.dialog-body input[type="text"],
.dialog-body input[type="email"],
.dialog-body input[type="password"],
.dialog-body input[type="date"] {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d0d7de;
    border-radius: 8px;
    background: #fff;
    font: inherit;
}

.dialog-body input:focus { outline: none; border-color: #80bdff; box-shadow: 0 0 0 4px rgba(0, 123, 255, 0.12); }

.hint { margin: 4px 0 0; color: #666; font-size: 0.8rem; }
.form-msg { min-height: 1.3em; margin: 12px 0 0; }
.form-msg.bad, .pw-rules .bad { color: #c00; }
.form-msg.ok, .pw-rules .ok { color: #1a7f2e; }
.pw-rules { margin: 0; padding: 0; list-style: none; }
.pw-rules li::before { content: "\2022\00a0"; }
.pw-rules li.ok::before { content: "\2713\00a0"; }

.dialog-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }

.btn {
    padding: 9px 18px;
    border: 1px solid #b9c0ca;
    border-radius: 8px;
    background: #f1f3f6;
    color: #111;
    font: inherit;
    cursor: pointer;
}

.btn:hover, .btn:focus-visible { background: #e3e7ed; }
.btn-primary { border-color: #20399c; background: #20399c; color: #fff; }
.btn-primary:hover, .btn-primary:focus-visible { background: #17297a; }

.help-links { display: flex; justify-content: space-around; gap: 16px; margin: 16px 0; }
.help-links a { display: flex; flex-direction: column; align-items: center; gap: 6px; color: #20399c; text-decoration: none; }
.help-links a:hover span { text-decoration: underline; }

@media (max-width: 900px) {
    .app-header {
        grid-template-columns: minmax(0, 1fr) auto;
        grid-template-areas:
            "brand tools"
            "search search";
        position: static;
    }

    .app-search { max-width: none; justify-self: stretch; }

    .app-layout { grid-template-columns: minmax(0, 1fr); gap: 12px; padding-top: 16px; }

    .app-sidebar { display: flex; flex-wrap: wrap; gap: 4px 24px; }
    .app-sidebar section { margin-bottom: 8px; }
    .app-sidebar h2 { font-size: 1.3rem; }
    .side-links { flex-direction: row; flex-wrap: wrap; gap: 4px; }
    .side-links a, .side-btn { padding: 6px 12px; border: 1px solid #c9ced6; background: #fff; font-size: 1rem; }
    .side-links a.active, .side-btn.active { border-color: #20399c; background: #20399c; color: #fff; }
}

@media (max-width: 520px) {
    .app-account span { display: none; }
    .app-account { margin-right: 0; }
    .app-tools { gap: 0; }
    .app-brand img { width: 200px; }
    .cargo-cell strong { font-size: 1.2rem; }
    .results-head h1 { font-size: 1rem; }
    .row-actions { text-align: left; }
}

@media print {
    body.app-body { background: #fff; }
    .app-header, .app-sidebar, .notice, .pwd-reminder, .icon-btn[title="Print"],
    .dataTables_length, .dataTables_filter, .dataTables_paginate, .dataTables_info,
    .row-actions, th.no-sort, dialog { display: none !important; }
    .app-layout { display: block; padding: 0; }
    .print-only { display: block; margin: 6px 0; font-size: 0.85rem; }
    table.app-table tbody tr > td { background: #fff !important; border-bottom: 1px solid #ccc; }
}

/* Container detail fragment (container.php) inside the dialog */
#container-detail { font-family: Arial, Helvetica, sans-serif; color: #111; }
#container-detail #cd_title {
    display: flex; align-items: center; gap: 14px; height: auto; overflow: visible;
    letter-spacing: normal; padding-bottom: 12px; border-bottom: 1px solid #e3e7ed;
}
#container-detail #cd_title img { float: none; position: static; flex: none; }
#container-detail #cd_head, #container-detail #cd_sub {
    float: none; position: static; width: auto; letter-spacing: normal; text-align: left; overflow: visible;
}
#container-detail #cd_head { font-size: 1.5rem; text-shadow: none; }
#container-detail #cd_sub { font-size: 0.95rem; color: #555; }
#container-detail #cd_title > div:not(#cd_head) { display: block; }
#container-detail #detail { padding: 16px 0; letter-spacing: normal; }
#container-detail #detail img { vertical-align: middle; margin-right: 10px; }
#container-detail #detail br { display: none; }
#container-detail #detail > span:nth-of-type(2) { display: block; margin-top: 6px; color: #555; }
#container-detail #detail span {
    position: static !important; padding: 0 !important; letter-spacing: normal !important;
    text-shadow: none !important; font-size: 1rem !important; line-height: 1.4;
}
#container-detail #detail > span:first-of-type { font-size: 1.4rem !important; color: #20399c !important; }
#container-detail #dt_left, #container-detail #dt_mid, #container-detail #dt_right {
    float: none; display: inline-block; width: 32%; vertical-align: top; text-align: center;
    font-size: 0.9rem; line-height: 1.3;
}
#container-detail #dt_left a, #container-detail #dt_mid a, #container-detail #dt_right a { display: block; }
@media (max-width: 600px) {
    #container-detail #dt_left, #container-detail #dt_mid, #container-detail #dt_right { width: 100%; margin-bottom: 12px; }
}


.signin-content label.show-password {
    display: flex; align-items: center; gap: 8px; margin-top: 8px;
    float: none; width: auto; font-size: 0.9rem; font-weight: 400; cursor: pointer;
}

.app-footer { padding: 16px; border-top: 1px solid #c9ced6; text-align: center; color: #555; font-size: 0.85rem; }
@media print { .app-footer { display: none; } }

.signin-content .error { color: #c00; font-weight: 600; }

#container-detail .disabled { color: #888; opacity: 0.7; }
#container-detail #dt_left, #container-detail #dt_mid, #container-detail #dt_right { color: #111; }
#container-detail #cd_title > div { min-width: 0; }
#container-detail .error { color: #c00; font-weight: 600; }
