﻿/* ----------------------------------------------------------
   GLOBAL PAGE WRAPPER
---------------------------------------------------------- */
.modern-page {
    background: #f5f7fb !important;
    /*min-height: 100vh;*/
    padding-bottom: 40px;
}

/* ----------------------------------------------------------
   PAGE HEADER
---------------------------------------------------------- */
.page-header-modern {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--card-radius);
    padding: 1rem 1rem;
    box-shadow: var(--shadow-subtle);
}

.header-text {
    margin-left: 1rem;
}

.page-title-modern {
    font-size: 1.25rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 2px;
}

.record-info {
    font-size: 0.85rem;
    color: #64748b;
}

.page-header-modern .btn-primary {
    border-radius: 6px;
    padding: 8px 15px;
    font-weight: 500;
}


/* Icon Box */
.header-icon {
    width: 48px;
    height: 48px;
    border-radius: 10px !important;
    background-color: #f0fdf4 !important;
    color: #16a34a;
}

    .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;
    min-width: 260px;
}

    .search-box-modern .search-icon {
        position: absolute;
        left: 12px;
        top: 50%;
        transform: translateY(-50%);
        color: #94a3b8;
        font-size: 0.875rem;
    }

    .search-box-modern .search-input {
        padding-left: 36px;
        border-radius: 8px;
        border: 1px solid #cbd5e1;
        font-size: 0.875rem;
        transition: all 0.2s ease;
    }

        .search-box-modern .search-input:focus {
            border-color: #3b82f6;
            box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
        }

/* ----------------------------------------------------------
   TABLE DESIGN
---------------------------------------------------------- */
.modern-table-card {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--card-radius);
    box-shadow: var(--shadow-subtle);
    overflow: hidden;
}

.modern-table {
    margin-bottom: 0;
    border-collapse: separate;
    border-spacing: 0;
}

.modern-table thead {
    background: #f0f2f7 !important;
    font-size: 0.9rem;
}

    .modern-table thead th {
        background-color: var(--header-bg);
        color: #475569;
        font-size: 0.75rem;
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: 0.05em;
        padding: 0.85rem 1rem;
        border-bottom: 1px solid var(--border-color);
        white-space: nowrap;
    }

    .modern-table tbody td {
        padding: 0.85rem 1rem;
        color: #334155;
        font-size: 0.875rem;
        border-bottom: 1px solid #f1f5f9;
    }

    .modern-table tbody tr:last-child td {
        border-bottom: none;
    }

    .modern-table tbody tr {
        transition: background-color 0.15s ease;
    }

        .modern-table tbody tr:hover {
            background-color: #f8fafc;
        }

/* fix for actions column */
.modern-table .text-end button {
    padding: 4px 10px;
}

/* ----------------------------------------------------------
   FORM ELEMENTS
---------------------------------------------------------- */
.modern-select,
.modern-input,
.modern-textarea {
    border-radius: 6px !important;
}

.form-label.required::after {
    content: " *";
    color: red;
}

#login_form .input-group-text {
    width: 40px !important;
}
/* ----------------------------------------------------------
   BUTTONS
---------------------------------------------------------- */
.btn-primary {
    padding: 8px 18px;
    border-radius: 6px;
}

.btn-light {
    border-radius: 6px;
}

.btn-warning {
    border-radius: 6px;
}

/* --------------------------------------------------
   MODAL
--------------------------------------------------*/
.modal-content {
    border-radius: 16px !important;
    border: none;
    box-shadow: 0px 8px 28px rgba(0,0,0,0.15);
}

.modal-header {
    background: #f1f5f9;
    border-radius: 16px 16px 0 0 !important;
}

.modal-title {
    font-weight: 700;
    color: #1e293b;
}


/* --------------------------------------------------
   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;
}

/* Dark overlay */
.auth-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient( 135deg, rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0.25) );
}

/* 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);
    }
}
