/* =========================
   GLOBAL RESET
========================= */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Segoe UI", Arial, sans-serif;
    background: #f4f7fb;
    color: #1f2937;
}

.main-content {
    padding: 25px;
}

/* =========================
   TOPBAR
========================= */

.topbar {
    background: #ffffff;
    border-radius: 14px;
    padding: 22px 24px;
    margin-bottom: 20px;

    display: flex;
    justify-content: space-between;
    align-items: center;

    box-shadow: 0 10px 25px rgba(0,0,0,0.06);
}

.topbar h1 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 4px;
}

.topbar p {
    color: #6b7280;
    font-size: 14px;
}

/* =========================
   DASHBOARD CARDS
========================= */

.cards {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 18px;
    margin-bottom: 22px;
}

.card {
    background: #ffffff;
    border-radius: 14px;
    padding: 22px;

    text-align: center;

    box-shadow: 0 10px 24px rgba(0,0,0,0.06);

    transition: all 0.25s ease;
    position: relative;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 14px 30px rgba(0,0,0,0.10);
}

.card h2 {
    font-size: 30px;
    font-weight: 700;
    margin-bottom: 6px;
}

.card p {
    font-size: 14px;
    color: #6b7280;
}

/* Card Colors */

.card.pending {
    border-left: 6px solid #f59e0b;
}

.card.success {
    border-left: 6px solid #16a34a;
}

.card.partial {
    border-left: 6px solid #f97316;
}

.card.credit {
    border-left: 6px solid #2563eb;
}

.card.cancelled {
    border-left: 6px solid #dc2626;
}

.card.hold {
    border-left: 6px solid #6b7280;
}

/* =========================
   SECTION CARD
========================= */

.section-card {
    background: #ffffff;
    border-radius: 14px;
    padding: 25px;

    box-shadow: 0 12px 28px rgba(0,0,0,0.07);
}

/* =========================
   FILTER BAR
========================= */

.filter-bar {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    row-gap: 10px;
    align-items: center;
}

.filter-bar input,
.filter-bar select {
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid #d1d5db;

    font-size: 14px;
    background: white;

    transition: 0.2s;
}

.filter-bar input:focus,
.filter-bar select:focus {
    outline: none;
    border-color: #1a7a89;
    box-shadow: 0 0 0 2px rgba(26,122,137,0.15);
}

/* Quotation date range group */

.filter-date-group {
    display: flex;
    align-items: center;
    gap: 8px;

    padding: 6px 12px;
    border-radius: 8px;
    border: 1px solid #d1d5db;
    background: white;
}

.filter-date-group:focus-within {
    border-color: #1a7a89;
    box-shadow: 0 0 0 2px rgba(26,122,137,0.15);
}

.filter-date-group span {
    font-size: 12px;
    font-weight: 600;
    color: #6b7280;
    white-space: nowrap;
}

.filter-date-group input {
    border: none;
    padding: 4px 2px;
    font-size: 14px;
    background: transparent;
}

.filter-date-group input:focus {
    outline: none;
    box-shadow: none;
}

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

.table-wrap {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th {
    background: #f1f5f9;
    padding: 14px;
    text-align: left;

    font-size: 13px;
    font-weight: 600;
    color: #374151;

    border-bottom: 2px solid #e5e7eb;
}

td {
    padding: 14px;
    border-bottom: 1px solid #e5e7eb;

    font-size: 14px;
}

tr:hover {
    background: #f9fafb;
}

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

.badge {
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
}

/* Badge Colors */

.badge.pending {
    background: #fef3c7;
    color: #92400e;
}

.badge.success {
    background: #dcfce7;
    color: #166534;
}

.badge.partial {
    background: #ffedd5;
    color: #9a3412;
}

.badge.confirm {
    background: #dbeafe;
    color: #1e40af;
}

.badge.cancelled {
    background: #fee2e2;
    color: #991b1b;
}

.badge.hold {
    background: #e5e7eb;
    color: #374151;
}

/* =========================
   BUTTONS
========================= */

.btn {
    padding: 9px 14px;
    border: none;
    border-radius: 8px;

    font-weight: 600;
    font-size: 14px;

    cursor: pointer;

    transition: all 0.2s ease;
}

.btn.primary {
    background: #1a7a89;
    color: white;
}

.btn.primary:hover {
    background: #16606c;
}

.btn.secondary {
    background: #e5e7eb;
}

.btn.secondary:hover {
    background: #d1d5db;
}

.btn:disabled,
.btn:disabled:hover {
    opacity: 0.5;
    cursor: not-allowed;
    background: #e5e7eb;
    color: #9ca3af;
}

/* =========================
   PAGINATION
========================= */

.pagination-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;

    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid #e5e7eb;
}

.pagination-bar #paginationInfo {
    font-size: 13px;
    color: #6b7280;
}

.pagination-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.pagination-controls select {
    padding: 8px 10px;
    border-radius: 8px;
    border: 1px solid #d1d5db;
    font-size: 14px;
    background: white;
    transition: 0.2s;
}

.pagination-controls select:focus {
    outline: none;
    border-color: #1a7a89;
    box-shadow: 0 0 0 2px rgba(26,122,137,0.15);
}

.pagination-controls .btn {
    padding: 8px 12px;
    font-size: 13px;
}

#pageIndicator {
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    min-width: 90px;
    text-align: center;
}

/* =========================
   FOOTER
========================= */

.footer {
    margin-top: 28px;
    text-align: center;
    font-size: 13px;
    color: #6b7280;
}

/* =========================
   RESPONSIVE
========================= */

@media (max-width: 1024px) {

    .cards {
        grid-template-columns: repeat(2, 1fr);
    }

}

@media (max-width: 600px) {

    .cards {
        grid-template-columns: 1fr;
    }

    .topbar {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .pagination-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .pagination-controls {
        justify-content: space-between;
    }

}

.amount {

    margin-top: 8px;

    font-size: 16px;

    font-weight: 700;

    color: #111827;

}

.card.pending .amount {

    color: #b45309;

}

.card.success .amount {

    color: #15803d;

}

.card.partial .amount {

    color: #ea580c;

}

.card.credit .amount {

    color: #1d4ed8;

}

.card.cancelled .amount {

    color: #b91c1c;

}

.card.hold .amount {

    color: #374151;

}