/* ============================================================

   SerClean Vehicle Inspection System

   Main application theme

   ============================================================ */


/* ------------------------------------------------------------

   Global

   ------------------------------------------------------------ */


html {

    min-height: 100%;

}


body {

    min-height: 100vh;

    margin: 0;

    background: #f4f6f8;

    color: #212529;

    display: flex;

    flex-direction: column;

}


.serclean-main {

    flex: 1;

    padding: 32px 0 48px;

}


/* ------------------------------------------------------------

   Application content width

   ------------------------------------------------------------ */


.serclean-main > .container,

.serclean-nav > .container {

    max-width: 1440px;

}


.serclean-header > .container {

    max-width: 1240px;

}


/* ------------------------------------------------------------

   Header

   ------------------------------------------------------------ */


.serclean-header {

    background: #111820;

    border-bottom: 4px solid #54c92d;

    padding: 14px 0;

}


.serclean-brand-row {

    display: flex;

    align-items: center;

}


.serclean-brand {

    display: flex;

    align-items: center;

    gap: 24px;

    color: #ffffff;

    text-decoration: none;

}


.serclean-brand:hover {

    color: #ffffff;

    text-decoration: none;

}


.serclean-logo {

    width: 165px;

    height: auto;

    display: block;

}


.serclean-title {

    display: flex;

    flex-direction: column;

    border-left: 1px solid rgba(255, 255, 255, 0.25);

    padding-left: 24px;

}


.serclean-title-main {

    color: #ffffff;

    font-size: 1.65rem;

    font-weight: 600;

    line-height: 1.1;

    letter-spacing: 0.02em;

}


.serclean-title-sub {

    color: #aeb8c2;

    font-size: 0.9rem;

    margin-top: 5px;

    text-transform: uppercase;

    letter-spacing: 0.12em;

}


/* ------------------------------------------------------------

   Navigation

   ------------------------------------------------------------ */


.serclean-nav {

    background: #1b2632;

    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.15);

}


.serclean-nav .navbar-nav {

    gap: 2px;

}


.serclean-nav .nav-link {

    color: #e8edf2;

    padding: 14px 20px;

    font-weight: 500;

    transition:

        background-color 0.15s ease,

        color 0.15s ease;

}


.serclean-nav a.nav-link:hover {

    color: #ffffff;

    background: #0874e8;

}


.serclean-nav a.nav-link:focus {

    color: #ffffff;

}


.serclean-nav-disabled {

    color: #77828d !important;

    cursor: default;

}


.serclean-nav-toggle {

    display: none;

    color: #ffffff;

    border: 1px solid #65717d;

    margin: 8px 0;

}


/* ------------------------------------------------------------

   Headings

   ------------------------------------------------------------ */


.serclean-main h1 {

    color: #18232e;

    font-weight: 600;

    margin-bottom: 24px;

}


.serclean-main h2,

.serclean-main h3 {

    color: #263746;

}


/* ------------------------------------------------------------

   Cards

   ------------------------------------------------------------ */


.card {

    border: 1px solid #dce2e7;

    border-radius: 8px;

    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);

}


.card-header {

    background: #ffffff;

    border-bottom: 2px solid #54c92d;

    font-weight: 600;

}


/* ------------------------------------------------------------

   Tables

   ------------------------------------------------------------ */


.table {

    background: #ffffff;

}


.table thead th {

    background: #1b2632;

    color: #ffffff;

    border-color: #344454;

    font-weight: 500;

    vertical-align: middle;

}


.table tbody tr:hover {

    background-color: #f2f8fc;

}


/* ------------------------------------------------------------

   Forms

   ------------------------------------------------------------ */


.form-label {

    color: #344454;

    font-weight: 600;

}


.form-control,

.form-select {

    border-color: #c8d0d7;

}


.form-control:focus,

.form-select:focus {

    border-color: #0874e8;

    box-shadow: 0 0 0 0.2rem rgba(8, 116, 232, 0.15);

}


/* ------------------------------------------------------------

   Buttons

   ------------------------------------------------------------ */


.btn-primary {

    background-color: #0874e8;

    border-color: #0874e8;

}


.btn-primary:hover,

.btn-primary:focus {

    background-color: #0664c9;

    border-color: #0664c9;

}


.btn-success {

    background-color: #4bbd28;

    border-color: #4bbd28;

}


.btn-success:hover,

.btn-success:focus {

    background-color: #3da51f;

    border-color: #3da51f;

}


/* ------------------------------------------------------------

   Alerts

   ------------------------------------------------------------ */


.alert {

    border-radius: 6px;

}


/* ------------------------------------------------------------

   Footer

   ------------------------------------------------------------ */


.serclean-footer {

    background: #111820;

    color: #aeb8c2;

    border-top: 3px solid #0874e8;

    padding: 20px 0;

    margin-top: auto;

}


.serclean-footer-content {

    display: flex;

    justify-content: space-between;

    align-items: center;

    gap: 20px;

}


.serclean-footer strong {

    color: #ffffff;

    margin-right: 8px;

}


.serclean-copyright {

    font-size: 0.9rem;

}


/* ------------------------------------------------------------

   Responsive layout

   ------------------------------------------------------------ */


@media (max-width: 768px) {


    .serclean-header {

        padding: 12px 0;

    }


    .serclean-brand {

        gap: 15px;

    }


    .serclean-logo {

        width: 140px;

    }


    .serclean-title {

        padding-left: 15px;

    }


    .serclean-title-main {

        font-size: 1.2rem;

    }


    .serclean-title-sub {

        font-size: 0.7rem;

        letter-spacing: 0.06em;

    }


    .serclean-nav-toggle {

        display: block;

    }


    .serclean-nav .navbar-nav {

        flex-direction: column !important;

        padding-bottom: 8px;

    }


    .serclean-nav .nav-link {

        padding: 10px 14px;

    }


    .serclean-main {

        padding-top: 22px;

    }


    .serclean-footer-content {

        flex-direction: column;

        align-items: flex-start;

        gap: 5px;

    }


@media (max-width: 480px) {


    .serclean-brand {

        gap: 10px;

    }


    .serclean-logo {

        width: 105px;

    }


    .serclean-title {

        padding-left: 10px;

    }


    .serclean-title-main {

        font-size: 1rem;

    }


    .serclean-title-sub {

        font-size: 0.6rem;

    }

}

/* ============================================================
   Print / PDF reporting
   ============================================================ */

/* Hidden on screen; displayed only in printed reports. */
.serclean-print-only {
    display: none;
}

@page {
    size: landscape;
    margin: 0.45in;
} 

@media print {

    /* Remove normal application chrome and interactive controls. */
    .serclean-header,
    .serclean-nav,
    .serclean-footer,
    .serclean-no-print {
        display: none !important;
    }

    .serclean-print-only {
        display: block !important;
    }
/*
     * --------------------------------------------------------
     * Compliance summary - printed report
     * --------------------------------------------------------
     *
     * Hide the normal Bootstrap summary cards and use the
     * dedicated print table instead.
     */

    .serclean-screen-summary {
        display: none !important;
    }

    .serclean-print-summary {
        display: block !important;
        width: 100% !important;
        margin: 0 0 14px 0 !important;
    }

    .serclean-print-summary-table {
        display: table !important;
        width: 100% !important;
        table-layout: fixed !important;
        border-collapse: collapse !important;
        margin: 0 !important;
    }

    .serclean-print-summary-table tbody {
        display: table-row-group !important;
    }

    .serclean-print-summary-table tr {
        display: table-row !important;
    }

    .serclean-print-summary-table td {
        display: table-cell !important;
        border: 1px solid #777777 !important;
        padding: 9px 12px !important;
        vertical-align: top !important;
    }

    .serclean-print-summary-label {
        font-size: 9pt !important;
        font-weight: 600 !important;
        margin-bottom: 3px !important;
    }

    .serclean-print-summary-value {
        font-size: 18pt !important;
        font-weight: 600 !important;
        line-height: 1.1 !important;
        margin-bottom: 3px !important;
    }

    .serclean-print-summary-detail {
        font-size: 8.5pt !important;
        line-height: 1.2 !important;
    }
    /* Reset the website layout for paper/PDF output. */
    html,
    body {
        min-height: auto !important;
        margin: 0 !important;
        padding: 0 !important;
        background: #ffffff !important;
        color: #000000 !important;
    }

    body {
        display: block !important;
        font-size: 10pt;
    }

    .serclean-main {
        display: block !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    .serclean-main > .container {
        width: 100% !important;
        max-width: none !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    /* Keep printed text dark and readable. */
    .serclean-main h1,
    .serclean-main h2,
    .serclean-main h3,
    .text-success,
    .text-warning,
    .text-danger,
    .text-secondary {
        color: #000000 !important;
    }

    .text-muted {
        color: #444444 !important;
    }

    /* Printed report heading. */
    .serclean-print-report-header {
        border-bottom: 2px solid #000000;
        margin-bottom: 14px;
        padding-bottom: 8px;
    }

    .serclean-print-report-title {
        font-size: 20pt;
        font-weight: 700;
        line-height: 1.2;
        margin: 0 0 3px;
    }

    .serclean-print-report-subtitle {
        font-size: 11pt;
        margin: 0 0 8px;
    }

    .serclean-print-report-meta {
        display: grid !important;
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 2px 20px;
        font-size: 9pt;
    }

     
    /* Cards become simple report sections on paper. */
    .card {
        border: 1px solid #777777 !important;
        border-radius: 0 !important;
        box-shadow: none !important;
        break-inside: avoid;
        page-break-inside: avoid;
    }

    .card-header {
        background: #eeeeee !important;
        color: #000000 !important;
        border-bottom: 1px solid #777777 !important;
    }

    .card-body {
        padding: 10px !important;
    }

    .shadow-sm {
        box-shadow: none !important;
    }

    /* Tables use the full printable width. */
    .table-responsive {
        overflow: visible !important;
    }

    .table {
        width: 100% !important;
        background: #ffffff !important;
        font-size: 8.5pt;
    }

    .table thead th {
        background: #eeeeee !important;
        color: #000000 !important;
        border: 1px solid #777777 !important;
    }

    .table td {
        border-color: #999999 !important;
    }

    .table tbody tr:hover {
        background: #ffffff !important;
    }

    tr,
    td,
    th {
        break-inside: avoid;
        page-break-inside: avoid;
    }

    /* Status badges remain readable on monochrome printers. */
    .badge {
        background: #ffffff !important;
        color: #000000 !important;
        border: 1px solid #555555 !important;
    }

    /* Keep links readable without appending destination URLs. */
    a,
    a:visited {
        color: #000000 !important;
        text-decoration: none !important;
    }

    a[href]::after {
        content: none !important;
    }

    /* Tighten normal Bootstrap spacing for paper. */
    .mb-4 {
        margin-bottom: 12px !important;
    }
}
