/**
 * ==========================================================
 * PHL Framework
 * Accounting Module
 * MODULE-706
 * Accounting Dashboard Styles
 * ==========================================================
 */


/* ==========================================================
   ACCOUNTING DASHBOARD
   ========================================================== */

.phl-accounting-dashboard {
    width: 100%;
    max-width: 1440px;
    margin: 0 auto;
    padding: 36px 28px 70px;
    box-sizing: border-box;
}


/* ==========================================================
   PAGE HEADER
   ========================================================== */

.phl-accounting-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 30px;
}

.phl-accounting-header > div {
    max-width: 760px;
}

.phl-accounting-eyebrow {
    display: inline-block;
    margin-bottom: 8px;
    font-size: 11px;
    font-weight: 800;
    line-height: 1;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: #6b7280;
}

.phl-accounting-header h1 {
    margin: 0;
    font-size: 34px;
    line-height: 1.15;
    font-weight: 750;
    letter-spacing: -.02em;
    color: #111827;
}

.phl-accounting-header p {
    margin: 9px 0 0;
    font-size: 15px;
    line-height: 1.6;
    color: #6b7280;
}


/* ==========================================================
   SUMMARY CARDS
   ========================================================== */

.phl-accounting-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    margin-bottom: 30px;
}


/* ==========================================================
   SUMMARY CARD
   ========================================================== */

.phl-accounting-card {
    position: relative;
    min-height: 155px;
    padding: 25px 26px;
    box-sizing: border-box;

    border: 1px solid #e5e7eb;
    border-radius: 16px;

    background: #ffffff;

    box-shadow:
        0 2px 5px rgba(17, 24, 39, .03),
        0 8px 24px rgba(17, 24, 39, .045);

    overflow: hidden;
}

.phl-accounting-card::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: #9ca3af;
}


/* Pending */

.phl-accounting-card:nth-child(1)::before {
    background: #f59e0b;
}


/* Verified */

.phl-accounting-card:nth-child(2)::before {
    background: #10b981;
}


/* Rejected */

.phl-accounting-card:nth-child(3)::before {
    background: #ef4444;
}


.phl-accounting-card-label {
    display: block;
    margin-bottom: 14px;

    font-size: 12px;
    font-weight: 750;
    line-height: 1.3;
    letter-spacing: .04em;
    text-transform: uppercase;

    color: #6b7280;
}

.phl-accounting-card strong {
    display: block;

    font-size: 36px;
    font-weight: 750;
    line-height: 1;

    letter-spacing: -.025em;
    color: #111827;
}

.phl-accounting-card small {
    display: block;
    margin-top: 12px;

    font-size: 12px;
    line-height: 1.5;

    color: #9ca3af;
}


/* ==========================================================
   PAYMENT QUEUE
   ========================================================== */

.phl-accounting-queue {
    margin-bottom: 28px;

    border: 1px solid #e5e7eb;
    border-radius: 16px;

    background: #ffffff;

    box-shadow:
        0 2px 5px rgba(17, 24, 39, .025),
        0 8px 24px rgba(17, 24, 39, .035);

    overflow: hidden;
}


/* ==========================================================
   SECTION HEADER
   ========================================================== */

.phl-accounting-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 24px 26px 20px;

    border-bottom: 1px solid #eef0f2;
}

.phl-accounting-section-header h2 {
    margin: 0;

    font-size: 20px;
    font-weight: 720;
    line-height: 1.3;
    letter-spacing: -.01em;

    color: #111827;
}

.phl-accounting-section-header p {
    margin: 6px 0 0;

    font-size: 13px;
    line-height: 1.5;

    color: #6b7280;
}


/* ==========================================================
   TABLE WRAPPER
   ========================================================== */

.phl-accounting-table-wrap {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}


/* ==========================================================
   PAYMENT TABLE
   ========================================================== */

.phl-accounting-table {
    width: 100%;
    min-width: 920px;

    border-collapse: collapse;
    border-spacing: 0;
}


/* Table Head */

.phl-accounting-table thead th {
    padding: 13px 18px;

    border-bottom: 1px solid #e5e7eb;

    background: #f9fafb;

    font-size: 10px;
    font-weight: 800;
    line-height: 1.3;
    letter-spacing: .08em;
    text-transform: uppercase;

    text-align: left;
    white-space: nowrap;

    color: #6b7280;
}


/* Table Body */

.phl-accounting-table tbody td {
    padding: 17px 18px;

    border-bottom: 1px solid #f1f2f4;

    font-size: 13px;
    line-height: 1.45;

    color: #374151;

    vertical-align: middle;
}

.phl-accounting-table tbody tr {
    transition:
        background-color .15s ease;
}

.phl-accounting-table tbody tr:hover {
    background: #fafafa;
}

.phl-accounting-table tbody tr:last-child td {
    border-bottom: 0;
}


/* Payment Reference */

.phl-accounting-table td:first-child strong {
    display: inline-block;

    font-size: 13px;
    font-weight: 750;

    color: #111827;
}


/* Amount */

.phl-accounting-table th:nth-child(4),
.phl-accounting-table td:nth-child(4) {
    text-align: right;
}

.phl-accounting-table td:nth-child(4) {
    font-weight: 750;
    white-space: nowrap;
    color: #111827;
}


/* ==========================================================
   STATUS BADGES
   ========================================================== */

.phl-accounting-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-width: 76px;
    padding: 5px 10px;

    border-radius: 999px;

    font-size: 10px;
    font-weight: 800;
    line-height: 1.2;

    letter-spacing: .05em;
    text-transform: uppercase;

    white-space: nowrap;
}


/* Pending */

.phl-accounting-status-pending {
    background: #fff7ed;
    color: #c2410c;
}


/* Verified */

.phl-accounting-status-verified {
    background: #ecfdf5;
    color: #047857;
}


/* Rejected */

.phl-accounting-status-rejected {
    background: #fef2f2;
    color: #b91c1c;
}


/* Fallback */

.phl-accounting-status:not(
    .phl-accounting-status-pending
):not(
    .phl-accounting-status-verified
):not(
    .phl-accounting-status-rejected
) {
    background: #f3f4f6;
    color: #4b5563;
}


/* ==========================================================
   REVIEW BUTTON
   ========================================================== */

.phl-accounting-review {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-width: 72px;
    padding: 7px 13px;

    border: 1px solid #d1d5db;
    border-radius: 8px;

    background: #ffffff;

    color: #111827;
    text-decoration: none;

    font-size: 12px;
    font-weight: 700;
    line-height: 1.2;

    transition:
        background-color .15s ease,
        border-color .15s ease,
        box-shadow .15s ease,
        transform .15s ease;
}

.phl-accounting-review:hover {
    background: #f9fafb;
    border-color: #9ca3af;
    color: #111827;

    transform: translateY(-1px);

    box-shadow:
        0 3px 8px rgba(17, 24, 39, .08);
}

.phl-accounting-review:focus-visible {
    outline: 2px solid #9ca3af;
    outline-offset: 2px;
}


/* ==========================================================
   EMPTY STATE
   ========================================================== */

.phl-accounting-empty {
    padding: 65px 24px 70px;

    text-align: center;
}

.phl-accounting-empty-icon {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 52px;
    height: 52px;
    margin: 0 auto 17px;

    border-radius: 50%;

    background: #ecfdf5;

    color: #059669;

    font-size: 22px;
    font-weight: 800;
}

.phl-accounting-empty h3 {
    margin: 0;

    font-size: 18px;
    font-weight: 720;

    color: #111827;
}

.phl-accounting-empty p {
    max-width: 440px;
    margin: 8px auto 0;

    font-size: 13px;
    line-height: 1.6;

    color: #6b7280;
}


/* ==========================================================
   AUDIT INFORMATION
   ========================================================== */

.phl-accounting-audit-info {
    display: flex;
    align-items: flex-start;
    gap: 16px;

    margin-top: 28px;
    padding: 20px 22px;

    border: 1px solid #e5e7eb;
    border-radius: 14px;

    background: #f9fafb;
}

.phl-accounting-audit-info::before {
    content: "✓";

    display: flex;
    flex: 0 0 30px;
    align-items: center;
    justify-content: center;

    width: 30px;
    height: 30px;

    border-radius: 8px;

    background: #ecfdf5;

    color: #059669;

    font-size: 14px;
    font-weight: 800;
}

.phl-accounting-audit-info strong {
    display: block;

    margin-bottom: 4px;

    font-size: 13px;
    font-weight: 750;

    color: #111827;
}

.phl-accounting-audit-info p {
    margin: 0;

    font-size: 12px;
    line-height: 1.6;

    color: #6b7280;
}


/* ==========================================================
   ACCESS DENIED
   ========================================================== */

.phl-accounting-dashboard
.phl-notice.phl-notice-error {
    padding: 24px;

    border: 1px solid #fecaca;
    border-radius: 14px;

    background: #fef2f2;
}

.phl-accounting-dashboard
.phl-notice.phl-notice-error h3 {
    margin: 0 0 8px;

    font-size: 18px;
    color: #991b1b;
}

.phl-accounting-dashboard
.phl-notice.phl-notice-error p {
    margin: 0;

    font-size: 13px;
    color: #b91c1c;
}


/* ==========================================================
   TABLET
   ========================================================== */

@media (max-width: 1100px) {

    .phl-accounting-dashboard {
        padding: 30px 22px 60px;
    }

    .phl-accounting-summary {
        gap: 14px;
    }

    .phl-accounting-card {
        min-height: 145px;
        padding: 22px;
    }

}


/* ==========================================================
   MOBILE
   ========================================================== */

@media (max-width: 760px) {

    .phl-accounting-dashboard {
        padding: 24px 15px 50px;
    }


    /* Header */

    .phl-accounting-header {
        margin-bottom: 24px;
    }

    .phl-accounting-header h1 {
        font-size: 28px;
    }

    .phl-accounting-header p {
        font-size: 14px;
    }


    /* Summary */

    .phl-accounting-summary {
        grid-template-columns: 1fr;
        gap: 12px;
        margin-bottom: 22px;
    }

    .phl-accounting-card {
        min-height: 0;
        padding: 20px 21px;
    }

    .phl-accounting-card strong {
        font-size: 32px;
    }


    /* Queue */

    .phl-accounting-queue {
        border-radius: 13px;
    }

    .phl-accounting-section-header {
        padding: 20px 18px 17px;
    }

    .phl-accounting-section-header h2 {
        font-size: 18px;
    }

    .phl-accounting-section-header p {
        font-size: 12px;
    }


    /* Table */

    .phl-accounting-table {
        min-width: 850px;
    }

    .phl-accounting-table thead th {
        padding: 11px 14px;
    }

    .phl-accounting-table tbody td {
        padding: 14px;
    }


    /* Audit */

    .phl-accounting-audit-info {
        padding: 17px;
        margin-top: 20px;
    }

}


/* ==========================================================
   SMALL MOBILE
   ========================================================== */

@media (max-width: 480px) {

    .phl-accounting-dashboard {
        padding-left: 12px;
        padding-right: 12px;
    }

    .phl-accounting-header h1 {
        font-size: 25px;
    }

    .phl-accounting-card-label {
        font-size: 11px;
    }

    .phl-accounting-card strong {
        font-size: 30px;
    }

    .phl-accounting-empty {
        padding: 50px 18px;
    }

}