/* =========================================================
   EIT PRO SOLUTIONS - MAIN STYLE
   CLEAN VERSION 1300
========================================================= */


/* =========================
   GENERAL
========================= */

body {
    font-family: Arial, sans-serif;
    padding: 20px;
    background: #f5f5f5;
    text-align: center;
}

h1,
h2 {
    text-align: center;
}

button {
    padding: 8px 12px;
    margin: 5px;
    cursor: pointer;
}


/* =========================
   LOGIN
========================= */

.login-box {
    width: 380px;
    max-width: calc(100% - 40px);
    margin: 80px auto;
    padding: 35px;
    box-sizing: border-box;
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,.2);
    text-align: center;
}

.login-box .login-logo {
    width: 180px;
    height: 120px;
    object-fit: contain;
    display: block;
    margin: 0 auto 20px;
    padding: 10px;
    box-sizing: border-box;
    background: white;
    border: 3px solid #1f4e79;
    border-radius: 15px;
}

.login-box h1 {
    font-size: 36px;
}

.login-box h2 {
    font-size: 28px;
}

.login-box input {
    width: 90%;
    padding: 12px;
    margin: 10px;
    box-sizing: border-box;
    font-size: 20px;
    border: 1px solid #ccc;
    border-radius: 8px;
}

.login-box button {
    padding: 10px 25px;
    font-size: 22px;
    border-radius: 8px;
}

.login-box button:hover {
    background: #163a5c;
    color: white;
}

#message {
    margin-top: 15px;
    color: red;
}


/* =========================
   DASHBOARD HEADER
========================= */

.dashboard-header {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    width: fit-content;
    margin: 20px auto 10px;
    padding: 10px 30px;
    background: white;
    border: 3px solid #1f4e79;
    border-radius: 15px;
}

.dashboard-logo {
    width: 80px;
    height: 80px;
    object-fit: contain;
}

.dashboard-header h1 {
    margin: 0;
    color: #1f4e79;
    font-size: 36px;
}

body > h2 {
    width: fit-content;
    margin: 10px auto 25px;
    padding: 10px 25px;
    background: white;
    color: #333;
    border: 2px solid #777;
    border-radius: 12px;
}


/* =========================
   DASHBOARD CONTROLS
========================= */

.search-area {
    margin: 20px auto;
    text-align: center;
}

#searchBox {
    display: block;
    width: 350px;
    max-width: 100%;
    margin: 20px auto 10px;
    padding: 10px;
    box-sizing: border-box;
    font-size: 16px;
    border: 1px solid #ccc;
    border-radius: 8px;
}

.search-area button {
    padding: 10px 20px;
    border-radius: 8px;
}


/* =========================
   DASHBOARD BOARD
========================= */

.board {
    display: flex;
    gap: 15px;
    align-items: flex-start;
    margin-top: 20px;
    padding-bottom: 10px;
    overflow-x: auto;
    text-align: left;
}

.column {
    width: 20%;
    min-width: 250px;
    height: 600px;
    padding: 10px;
    box-sizing: border-box;
    overflow-y: auto;
    background: #f2f2f2;
    border-radius: 10px;
}

.column h3 {
    position: sticky;
    top: 0;
    z-index: 2;
    padding: 8px;
    text-align: center;
    background: inherit;
}

.column::-webkit-scrollbar {
    width: 8px;
}

.column::-webkit-scrollbar-thumb {
    background: #999;
    border-radius: 10px;
}

.column::-webkit-scrollbar-track {
    background: #ddd;
}


/* =========================
   COLUMN COLORS
========================= */

.customer-column {
    background: #dbeafe;
    border-top: 5px solid #2563eb;
}

.todo-column {
    background: #fef3c7;
    border-top: 5px solid #f59e0b;
}

.progress-column {
    background: #dcfce7;
    border-top: 5px solid #16a34a;
}

.invoice-column {
    background: #fce7f3;
    border-top: 5px solid #db2777;
}

.collect-column {
    background: #ede9fe;
    border-top: 5px solid #7c3aed;
}

.done-column {
    background: #d1fae5;
    border-top: 5px solid #059669;
}


/* =========================
   CARDS
========================= */

.card {
    margin-bottom: 15px;
    padding: 12px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,.2);
    text-align: left;
}

.card h3 {
    margin-top: 0;
}

.card button {
    margin-top: 5px;
}

#customerList .card {
    background: #dbeafe;
}

#todo .card {
    background: #fef3c7;
}

#progress .card {
    background: #dcfce7;
}

#invoice .card {
    background: #fee2e2;
}

#collect .card {
    background: #ede9fe;
}

#done .card {
    background: #d1fae5;
}


/* =========================
   COMPACT WORK CARDS
========================= */

.repair-work-card {
    padding: 14px;
    margin-bottom: 12px;
}

.repair-summary {
    font-size: 15px;
    line-height: 1.7;
    color: #222;
    word-break: break-word;
}

.repair-divider {
    margin: 0 4px;
    color: #777;
    font-weight: bold;
}

.repair-number {
    color: #1f4e79;
    white-space: nowrap;
}

.repair-work-card .card-buttons {
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid rgba(0,0,0,.15);
}


/* =========================
   REPAIR DETAILS
========================= */

.repair-detail-container {
    max-width: 1000px;
    margin: 20px auto;
    padding: 25px;
    box-sizing: border-box;
    background: white;
    border-radius: 14px;
    box-shadow: 0 3px 12px rgba(0,0,0,.15);
    text-align: left;
}

.repair-detail-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #eee;
}

.repair-detail-topbar h2 {
    margin: 0;
    color: #1f4e79;
}


/* =========================
   REPAIR SECTIONS
========================= */

.repair-section {
    margin-top: 20px;
    padding: 5px 0 22px;
    border-bottom: 1px solid #eee;
}

.repair-section h3 {
    margin-bottom: 15px;
    color: #333;
}

.repair-info-grid,
.repair-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0,1fr));
    gap: 12px;
}

.repair-form-grid {
    gap: 20px;
}

.repair-info-item {
    padding: 12px;
    background: #f8fafc;
    border-radius: 8px;
}

.repair-info-label {
    display: block;
    margin-bottom: 4px;
    color: #777;
    font-size: 13px;
    font-weight: bold;
}


/* =========================
   REPAIR FORM
========================= */

.repair-form-group {
    display: flex;
    flex-direction: column;
}

.repair-form-group label,
.other-problem-area label {
    margin-bottom: 8px;
    font-weight: bold;
}

.repair-form-group input,
.other-problem-area input {
    padding: 11px;
    font-size: 16px;
    border: 1px solid #ccc;
    border-radius: 7px;
}

.other-problem-area {
    margin-top: 15px;
}

.other-problem-area input {
    width: 100%;
    box-sizing: border-box;
}


/* =========================
   PROBLEM BUTTONS
========================= */

.problem-help {
    color: #666;
}

.problem-options {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 15px 0;
}

.problem-option-btn {
    margin: 0;
    padding: 8px 14px;
    background: #f3f4f6;
    border: 1px solid #ccc;
    border-radius: 20px;
    font-size: 14px;
}

.problem-option-btn:hover {
    background: #e5e7eb;
}

.problem-option-btn.selected {
    background: #7c3aed;
    color: white;
    border-color: #7c3aed;
    font-weight: bold;
}

.selected-problem-box {
    margin-top: 15px;
    padding: 12px;
    background: #f8fafc;
    border-left: 4px solid #7c3aed;
    border-radius: 5px;
}


/* =========================
   DESCRIPTION / ACTIONS
========================= */

.repair-description-box {
    padding: 15px;
    background: #f8fafc;
    border-radius: 8px;
}

.repair-description-box p {
    margin: 8px 0;
}

.repair-detail-actions {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 25px;
}

.save-detail-btn {
    padding: 11px 20px;
    background: #1f4e79;
    color: white;
    border: none;
    border-radius: 7px;
}

.save-detail-btn:hover {
    background: #163a5c;
}

.details-message {
    margin-top: 15px;
    text-align: center;
    font-weight: bold;
}


/* =========================
   ADD REPAIR PAGE
========================= */

.add-repair-container {
    max-width: 800px;
    margin: 20px auto 50px;
    padding: 30px;
    box-sizing: border-box;
    background: white;
    border-radius: 14px;
    box-shadow: 0 3px 12px rgba(0,0,0,.15);
    text-align: left;
}

.add-repair-section {
    margin-bottom: 25px;
    padding-bottom: 22px;
    border-bottom: 1px solid #e5e7eb;
}

.add-repair-section:last-of-type {
    border-bottom: none;
}

.add-repair-section h3 {
    margin: 0 0 18px;
    color: #1f4e79;
    font-size: 20px;
}

.add-repair-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0,1fr));
    gap: 20px;
}

.add-repair-field {
    display: flex;
    flex-direction: column;
    margin-bottom: 18px;
}

.add-repair-field label {
    margin-bottom: 7px;
    color: #333;
    font-size: 14px;
    font-weight: bold;
}

.add-repair-field input,
.add-repair-field textarea {
    width: 100%;
    box-sizing: border-box;
    padding: 11px 12px;
    font-family: Arial, sans-serif;
    font-size: 15px;
    background: #fff;
    border: 1px solid #cbd5e1;
    border-radius: 7px;
    outline: none;
}

.add-repair-field input:focus,
.add-repair-field textarea:focus {
    border-color: #1f4e79;
    box-shadow: 0 0 0 2px rgba(31,78,121,.12);
}

.add-repair-field textarea {
    resize: vertical;
}

.add-repair-message {
    margin: 5px 0 20px;
    text-align: center;
    color: green;
    font-weight: bold;
}

.add-repair-actions {
    display: flex;
    justify-content: center;
    gap: 12px;
}

.save-repair-btn {
    padding: 11px 24px;
    background: #1f4e79;
    color: white;
    border: none;
    border-radius: 7px;
    font-weight: bold;
}

.save-repair-btn:hover {
    background: #163a5c;
}

.back-dashboard-btn {
    padding: 11px 20px;
    background: #f3f4f6;
    color: #333;
    border: 1px solid #aaa;
    border-radius: 7px;
    font-weight: bold;
}

.back-dashboard-btn:hover {
    background: #e5e7eb;
}


/* =========================
   STATUS UPDATE POPUP
========================= */

.status-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(0,0,0,.45);
}

.status-modal.show {
    display: flex;
}

.status-modal-content {
    width: 420px;
    max-width: 90%;
    padding: 25px;
    box-sizing: border-box;
    background: white;
    border-radius: 14px;
    box-shadow: 0 8px 30px rgba(0,0,0,.25);
    text-align: center;
}

.status-modal-content h3 {
    margin: 0 0 5px;
    color: #1f4e79;
    font-size: 22px;
}

.status-modal-help {
    margin: 0 0 18px;
    color: #666;
}

.status-choice-grid {
    display: grid;
    grid-template-columns: repeat(2,1fr);
    gap: 10px;
}

.status-choice-btn {
    min-height: 52px;
    margin: 0;
    padding: 10px;
    border: 1px solid #bbb;
    border-radius: 9px;
    font-size: 15px;
    font-weight: bold;
    cursor: pointer;
}

.status-customer {
    background: #dbeafe;
}

.status-todo {
    background: #fef3c7;
}

.status-progress {
    background: #dcfce7;
}

.status-invoice {
    background: #fee2e2;
}

.status-collect {
    background: #ede9fe;
}

.status-done {
    background: #d1fae5;
}

.status-choice-btn:hover {
    transform: translateY(-1px);
    filter: brightness(.96);
}

.status-choice-btn:disabled {
    opacity: .5;
    cursor: wait;
}

.status-cancel-btn {
    margin-top: 18px;
    padding: 9px 25px;
    background: #f3f4f6;
    border: 1px solid #aaa;
    border-radius: 8px;
    font-weight: bold;
}


/* =========================================================
   EIT PRO SOLUTIONS
   REPAIR DOCKET VERSION 1301
========================================================= */


/* =========================
   PAGE
========================= */

.receipt-page {
    margin: 0;
    padding: 20px;
    background: #e5e7eb;
    font-family: Arial, sans-serif;
}


/* =========================
   DOCKET
========================= */

.repair-docket {
    width: 190mm;
    max-width: 100%;
    min-height: 118mm;

    margin: 0 auto;
    padding: 8mm;

    box-sizing: border-box;

    background: white;

    border: 1.5px solid #333;

    color: #111;

    text-align: left;
}


/* =========================
   HEADER
========================= */

.docket-header {
    display: grid;

    grid-template-columns:
        1.15fr
        .85fr;

    gap: 12mm;

    align-items: start;

    margin-bottom: 10px;
}


/* =========================
   COMPANY
========================= */

.docket-company {
    display: flex;
    align-items: center;
    gap: 12px;
}


.docket-logo {
    width: 72px;
    height: 72px;

    object-fit: contain;

    flex-shrink: 0;
}


.docket-company h1 {
    margin: 0 0 5px;

    color: #1f4e79;

    font-size: 22px;

    font-weight: bold;

    text-align: left;
}


.docket-company p {
    margin: 0;

    font-size: 11px;

    line-height: 1.35;
}


/* =========================
   CUSTOMER INFORMATION
========================= */

.docket-customer-info {
    padding-top: 3px;
}


.docket-info-row {
    display: grid;

    grid-template-columns:
        110px
        1fr;

    align-items: end;

    min-height: 25px;

    border-bottom: 1px solid #555;

    font-size: 12px;
}


.docket-info-row strong {
    padding-bottom: 3px;

    font-weight: bold;
}


.docket-info-row span {
    min-height: 18px;

    padding:
        0
        4px
        3px;
}


/* =========================================================
   COMPLETE DOCKET BODY FRAME

   THIS ONE BORDER CONTROLS THE WHOLE BOX.
========================================================= */

.docket-body-frame {
    width: 100%;

    box-sizing: border-box;

    border: 1.5px solid #333;

    overflow: hidden;

    background: white;
}


/* =========================
   BLUE COPY STRIP
========================= */

.docket-copy-strip {
    display: flex;

    justify-content: flex-end;

    align-items: center;

    min-height: 27px;

    padding:
        0
        10px;

    box-sizing: border-box;

    background: #1f4e79;

    color: white;

    border-bottom:
        1.5px
        solid
        #333;

    font-size: 11px;

    font-weight: bold;

    -webkit-print-color-adjust: exact;

    print-color-adjust: exact;
}


/* =========================
   REMARK / SOLUTION
========================= */

.docket-work-area {
    display: grid;

    grid-template-columns:
        1fr
        1fr;

    min-height: 62mm;

    box-sizing: border-box;

    border-bottom:
        1.5px
        solid
        #333;
}


/* BOX */

.docket-work-box {
    min-width: 0;

    padding:
        10px
        12px;

    box-sizing: border-box;

    font-size: 12px;
}


/* MIDDLE LINE */

.docket-work-box + .docket-work-box {
    border-left:
        1.5px
        solid
        #333;
}


.docket-work-box h3 {
    margin:
        0
        0
        12px;

    color: #333;

    font-size: 14px;

    font-weight: bold;
}


.docket-work-box p {
    margin:
        7px
        0;

    line-height: 1.4;
}


.docket-long-text {
    margin-top: 7px;

    white-space: pre-wrap;

    word-break: break-word;

    line-height: 1.5;
}


/* =========================
   BOTTOM ROW
========================= */

.docket-bottom-row {
    display: grid;

    grid-template-columns:
        1fr
        1fr
        1.3fr
        .8fr;

    box-sizing: border-box;
}


.docket-bottom-cell {
    min-height: 15mm;

    padding:
        6px
        8px;

    box-sizing: border-box;

    border-right:
        1.5px
        solid
        #333;

    font-size: 11px;
}


.docket-bottom-cell:last-child {
    border-right: none;
}


.docket-bottom-cell strong {
    display: block;

    color: #1f4e79;

    font-weight: bold;
}


.docket-bottom-cell small {
    display: block;

    margin-top: 9px;

    text-align: center;

    font-size: 9px;
}


/* =========================
   COPY LABEL BOTTOM
========================= */

.docket-copy-label {
    margin-top: 4px;

    text-align: right;

    color: #555;

    font-size: 10px;
}


/* =========================
   CUT LINE
========================= */

.receipt-cut-line {
    position: relative;

    width: 190mm;
    max-width: 100%;

    height: 20px;

    margin:
        4px
        auto;

    border-bottom:
        1.5px
        dashed
        #777;

    text-align: center;
}


.receipt-cut-line span {
    position: relative;

    top: 10px;

    padding:
        0
        8px;

    background: #e5e7eb;
}


/* =========================
   ACTION BUTTONS
========================= */

.receipt-actions {
    margin:
        20px
        auto;

    text-align: center;
}


.receipt-actions button {
    margin: 5px;

    padding:
        10px
        20px;

    border:
        1px
        solid
        #999;

    border-radius: 7px;

    cursor: pointer;
}


/* =========================
   SCREEN MOBILE
========================= */

@media screen and (max-width: 800px) {

    .receipt-page {
        padding: 10px;
    }


    .repair-docket {
        width: 100%;

        padding: 15px;
    }


    .docket-header {
        grid-template-columns:
            1fr;

        gap: 15px;
    }


    .docket-work-area {
        grid-template-columns:
            1fr;
    }


    .docket-work-box + .docket-work-box {
        border-left: none;

        border-top:
            1.5px
            solid
            #333;
    }


    .docket-bottom-row {
        grid-template-columns:
            repeat(
                2,
                1fr
            );
    }


    .docket-bottom-cell:nth-child(2) {
        border-right: none;
    }


    .docket-bottom-cell:nth-child(1),
    .docket-bottom-cell:nth-child(2) {
        border-bottom:
            1.5px
            solid
            #333;
    }

}


/* =========================================================
   PRINT
========================================================= */

@media print {

    @page {
        size: A4 portrait;

        margin: 5mm;
    }


    html,
    body {
        margin: 0;

        padding: 0;

        background: white;
    }


    body.receipt-page {
        margin: 0;

        padding: 0;

        background: white;
    }


    .repair-docket {
        width: 198mm;

        max-width: 198mm;

        min-height: 130mm;

        margin: 0 auto;

        padding: 6mm;

        box-sizing: border-box;

        border:
            1.5px
            solid
            #222;

        page-break-inside: avoid;

        break-inside: avoid;
    }


    .docket-body-frame {
        border:
            1.5px
            solid
            #222;
    }


    .docket-copy-strip {
        background:
            #1f4e79
            !important;

        color:
            white
            !important;

        border-bottom:
            1.5px
            solid
            #222;

        -webkit-print-color-adjust:
            exact;

        print-color-adjust:
            exact;
    }


    .docket-work-area {
        min-height: 62mm;

        border-bottom:
            1.5px
            solid
            #222;
    }


    .docket-work-box + .docket-work-box {
        border-left:
            1.5px
            solid
            #222;
    }


    .docket-bottom-cell {
        border-right:
            1.5px
            solid
            #222;
    }


    .docket-bottom-cell:last-child {
        border-right: none;
    }


    .receipt-cut-line {
        width: 198mm;

        height: 14px;

        margin:
            2mm
            auto;

        border-bottom:
            1px
            dashed
            #555;
    }


    .receipt-cut-line span {
        top: 7px;

        background: white;
    }


    .receipt-actions {
        display: none;
    }


    button {
        display: none;
    }

}
/* NAS attachment gallery */
.attachment-upload-row { display:flex; gap:12px; align-items:center; flex-wrap:wrap; margin-bottom:8px; }
.attachment-gallery { display:grid; grid-template-columns:repeat(auto-fill,minmax(180px,1fr)); gap:16px; margin-top:18px; }
.attachment-card { border:1px solid #d9d9d9; border-radius:10px; padding:10px; background:#fff; overflow:hidden; }
.attachment-card img { width:100%; height:220px; object-fit:contain; border-radius:7px; background:#111; cursor:zoom-in; }
.attachment-card video { display:block; width:100%; height:auto; max-height:70vh; object-fit:contain; border-radius:7px; background:#111; }
.attachment-card div { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; margin:8px 0; }
.attachment-card button { width:100%; }
@media (max-width:600px) { .attachment-gallery { grid-template-columns:1fr; gap:10px; } .attachment-card img { height:280px; } .attachment-card video { height:auto; max-height:75vh; } }
.image-lightbox { position:fixed; inset:0; z-index:10000; display:flex; align-items:center; justify-content:center; padding:16px; box-sizing:border-box; background:rgba(0,0,0,.94); }
.image-lightbox img { display:block; max-width:96vw; max-height:90vh; width:auto; height:auto; object-fit:contain; }
.image-lightbox-close { position:fixed; top:12px; right:16px; z-index:10001; width:48px; height:48px; padding:0; border:0; border-radius:50%; background:#fff; color:#111; font-size:30px; line-height:48px; }
