﻿/* ----------------------------------------------------------
   GLOBAL PAGE WRAPPER
---------------------------------------------------------- */
.modern-page {
    background: #f5f7fb !important;
    /*min-height: 100vh;*/
    padding-bottom: 40px;
}

/* ----------------------------------------------------------
   PAGE HEADER
---------------------------------------------------------- */
.page-header-modern {
    background: #ffffff;
    border-radius: 10px;
    padding: 15px 20px;
    box-shadow: 0px 2px 10px rgba(0,0,0,0.05);
}

.header-text {
    margin-left: 1rem;
}

.page-title-modern {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
}

.record-info {
    font-size: 0.9rem;
    opacity: 0.8;
}

.page-header-modern .btn-primary {
    border-radius: 6px;
    padding: 8px 15px;
    font-weight: 500;
}


/* Icon Box */
.header-icon {
    width: 45px;
    height: 45px;
    border-radius: 10px;
    background: #f8f9fc !important;
    border: 1px solid #e5e7ef;
    margin-right: 12px;
    transition: all 0.2s ease;
}

    .header-icon i {
        transition: transform 0.2s ease;
    }

    .header-icon:hover {
        background: #eef0f5 !important;
        border-color: #d6d9e4;
    }

        .header-icon:hover i {
            transform: scale(1.08);
        }

/* ----------------------------------------------------------
   SEARCH BOX
---------------------------------------------------------- */
.search-box-modern {
    position: relative;
    width: 200px;
}

    .search-box-modern .search-icon {
        position: absolute;
        left: 12px;
        top: 50%;
        transform: translateY(-50%);
        color: #6c757d;
    }

    .search-box-modern .search-input {
        padding-left: 38px;
        padding-right: 10px;
        border-radius: 6px;
    }

/* ----------------------------------------------------------
   MODERN CARD
---------------------------------------------------------- */

.modern-card {
    border-radius: 14px;
    background: #fff;
}

.modern-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    padding: 12px 16px;
    background: #fff;
    border-bottom: 1px solid #e9ecef;
}

    .modern-card-header .header-left h6 {
        font-size: 15px;
    }

    .modern-card-header .header-right {
        display: flex;
        align-items: center;
    }

.search-box-modern {
    position: relative;
    width: 250px;
}

.search-input {
    padding-left: 35px;
    border-radius: 6px;
    height: 36px;
    font-size: 14px;
}

.search-icon {
    position: absolute;
    top: 50%;
    left: 10px;
    transform: translateY(-50%);
    color: #6c757d;
    font-size: 13px;
}

@media (max-width: 768px) {
    .modern-card-header {
        flex-direction: column;
        align-items: stretch;
    }

    .search-box-modern {
        width: 100%;
    }
}
/* ----------------------------------------------------------
   TABLE DESIGN
---------------------------------------------------------- */

.modern-table thead {
    background: #f0f2f7 !important;
    font-size: 12px;
}

.modern-table th {
    font-weight: 500;
    white-space: normal;
}

.modern-table td {
    font-size: 12px !important;
    padding: 5px 10px !important;
    white-space: nowrap !important;
}

.modern-table tbody tr:hover {
    background: #f9fafc !important;
}

/* fix for actions column */
.modern-table .text-end button {
    padding: 4px 10px;
}


.data-list-empty-td {
    background: #f8fafc;
    text-align: center;
    color: #6b7280;
    font-weight: 500;
    padding: 30px 10px;
    border-radius: 8px;
}

    .data-list-empty-td i {
        font-size: 26px;
        color: #9ca3af;
        display: block;
        margin-bottom: 6px;
    }

    .data-list-empty-td span {
        font-size: 14px;
    }

.data-list-loading-td {
    background: #f9fafb;
    text-align: center;
    color: #2563eb;
    font-weight: 500;
    padding: 28px 10px;
}

    .data-list-loading-td .spinner-border {
        width: 1.6rem;
        height: 1.6rem;
        margin-bottom: 6px;
    }

    .data-list-loading-td span {
        display: block;
        font-size: 14px;
    }

.data-list-error-td {
    background: #fff1f2;
    text-align: center;
    color: #b91c1c;
    font-weight: 600;
    padding: 28px 10px;
    border-radius: 8px;
}

    .data-list-error-td i {
        font-size: 26px;
        color: #dc2626;
        display: block;
        margin-bottom: 6px;
    }

    .data-list-error-td span {
        font-size: 14px;
    }

/* ----------------------------------------------------------
   MODERN MODAL
---------------------------------------------------------- */
.modern-modal {
    border-radius: 16px;
}

    .modern-modal .modal-header {
        border-radius: 16px 16px 0 0;
        padding: 16px 20px;
        background: #b3c2d1;
        border-radius: 16px 16px 0 0;
        border-bottom: 1px solid #e2e8f0;
    }

    .modern-modal .modal-body {
        padding: 16px;
        max-height: calc(100vh - 107px);
        overflow-y: auto;
    }

    .modern-modal .modal-footer {
        background: #f1f8ff;
        border-top: 1px solid #e2e8f0;
        padding: 0 20px;
    }

/* ----------------------------------------------------------
   FORM ELEMENTS
---------------------------------------------------------- */
.modern-select,
.modern-input,
.modern-textarea {
    border-radius: 6px !important;
}

.div-header {
    background: linear-gradient(135deg, #f4f6f8, #e6eaee);
    color: #1f2937; /* slate-800 */
    padding: 8px 10px;
    margin-bottom: 12px;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.3px;
    border-left: 4px solid #0d6efd; /* Bootstrap primary */
    border-radius: 6px;
    display: flex;
    align-items: center;
}

.scroll-container {
    max-height: 350px;
    overflow-y: auto;
    scrollbar-width: none;
}

    .scroll-container::-webkit-scrollbar {
        display: none;
    }

/* ----------------------------------------------------------
   BUTTONS
---------------------------------------------------------- */
.btn-primary {
    padding: 8px 18px;
    border-radius: 6px;
}

.btn-light {
    border-radius: 6px;
}

.btn-warning {
    border-radius: 6px;
}

/* --------------------------------------------------
   FORM FIELDS
--------------------------------------------------*/

.form-control,
.form-select {
    border-radius: 8px;
    padding: 8px 12px;
    border: 1px solid #cbd5e1;
    transition: 0.2s;
}

    .form-control:focus,
    .form-select:focus {
        border-color: #3b82f6;
        box-shadow: 0 0 0 3px rgba(59,130,246,0.25);
    }

.form-label {
    font-weight: 600;
    color: #334155;
}

.text-danger {
    font-size: 12px;
}

/* --------------------------------------------------
   IMAGE PREVIEW BOXES
--------------------------------------------------*/
img#img_company_logo,
img#img_company_qr {
    border-radius: 10px;
    object-fit: contain;
}

/* --------------------------------------------------
   ACCORDION
--------------------------------------------------*/

.modern-accordion .accordion-button {
    background: #f8f9fa;
    border-radius: 0.75rem;
}

    .modern-accordion .accordion-button:not(.collapsed) {
        background: #e7f1ff;
        color: #0d6efd;
        box-shadow: none;
    }

.modern-accordion .accordion-body {
    background: #ffffff;
    border-radius: 8px;
    padding: 16px !important;
}

.modern-accordion.accordion-item {
    border: none;
}

.modern-accordion .form-label.small {
    font-size: 0.75rem;
    margin-bottom: 2px;
}


/* ----------------------------------------------------------
   RESPONSIVE FIXES
---------------------------------------------------------- */
@media (max-width: 768px) {
    .page-header-modern {
        padding: 18px;
        text-align: center;
    }

    .header-icon {
        margin: 0 auto 10px;
    }

    .header-actions {
        justify-content: center;
    }

    .search-box-modern {
        width: 100%;
    }

    .d-flex.align-items-center.mt-3 {
        justify-content: center;
    }
}



/* ======= AUTH LAYOUT ========= */
/* Full screen background */
.auth-bg {
    position: relative;
    min-height: 100vh;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.auth-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient( 135deg, rgba(0, 0, 0, 0.30), rgba(0, 0, 0, 0.10) );
}

/* Container above background */
.auth-content {
    position: relative;
    z-index: 2;
    min-height: 100vh;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding-right: 5%;
}


/* Left content */
.auth-left {
    flex: 1;
    color: #ffffff;
    max-width: 600px;
    padding-right: 60px;
}

.auth-title {
    font-size: 38px;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 20px;
}

.auth-desc {
    font-size: 16px;
    line-height: 1.6;
    opacity: 0.95;
    margin-bottom: 28px;
}

.auth-features {
    list-style: none;
    padding: 0;
    margin: 0;
}

    .auth-features li {
        font-size: 15px;
        margin-bottom: 12px;
        display: flex;
        align-items: center;
    }

    .auth-features i {
        color: #4ade80; /* soft enterprise green */
        margin-right: 10px;
        font-size: 16px;
    }


/* Right panel */
.auth-right {
    width: 420px;
}

/* Card */
.auth-card {
    background: #ffffff;
    border-radius: 14px;
    padding: 32px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
    animation: fadeUp 0.6s ease;
}

/* Mobile */
@media (max-width: 768px) {
    .auth-content {
        justify-content: center;
        padding: 20px;
    }

    .auth-left {
        display: none;
    }

    .auth-right {
        width: 100%;
        max-width: 420px;
    }
}


@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(15px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ======================= 
    REPORT SECTION 
========================== */

.report-container {
    background: #fff;
    border-radius: 8px;
    padding: 16px 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    margin-top: 20px;
}

.table_summary {
    min-width: 1000px;
}

    .table_summary th,
    .table_summary td,
    .table_details th,
    .table_details td {
        vertical-align: middle;
        font-size: 13px;
        white-space: nowrap;
    }

    .table_summary thead th {
        position: sticky;
        top: 0;
        background: #f8f9fa;
        z-index: 2;
        background-color: #f8f9fa;
    }

    .table_summary .total-row {
        background: linear-gradient(to right, #f3f6f9, #e8f0fe);
        font-weight: 600;
        color: #0d47a1;
        border-top: 2px solid #c5cae9;
    }

    .table_summary tr:hover:not(.total-row),
    .table_details tr:hover {
        background-color: #f9f9f9;
    }

.clickable-count,
.clickable-total {
    cursor: pointer;
}

    .clickable-count:hover,
    .clickable-total:hover {
        text-decoration: underline;
    }

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

    .section-header h5,
    .section-header h6 {
        margin: 0;
        font-weight: 600;
        color: #333;
        font-size: 14px;
    }

.no-data {
    color: #dc3545;
    text-align: center;
    font-weight: 500;
    padding: 10px 0;
}

.dropdown-toggle {
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-align: left;
    font-weight: normal;
}

@media (max-width: 768px) {
    .gv-container {
        overflow-x: auto;
    }
}
