/* ========== GLOBAL RESET ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background-color: #f4f6fb;
    color: #111827;
}

/* ========== PAGE WRAPPER ========== */
.page-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 16px 40px;
}

/* ------------ Page Header ------------- */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 10px;
}

.page-title {
    font-size: 22px;
    font-weight: 700;
    color: #111827;
}

.page-subtitle {
    font-size: 13px;
    color: #6b7280;
}

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

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.card {
    background-color: #ffffff;
    border-radius: 14px;
    padding: 16px 20px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 8px 20px rgba(0,0,0,0.06);
    transition: 0.3s ease;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 26px rgba(0,0,0,0.10);
}

.card-title {
    font-size: 13px;
    color: #6b7280;
    margin-bottom: 4px;
    font-weight: 500;
}

.card-value {
    font-size: 26px;
    font-weight: 700;
    color: #111827;
}

.card-pill {
    display: inline-flex;
    align-items: center;
    padding: 3px 9px;
    border-radius: 999px;
    font-size: 11px;
    margin-top: 8px;
    background-color: #ecfdf3;
    color: #166534;
}

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

.btn {
    display: inline-flex;
    padding: 7px 14px;
    border-radius: 999px;
    font-size: 12px;
    cursor: pointer;
    font-weight: 500;
    border: none;
    transition: 0.2s ease;
}

.btn-primary {
    background-color: #2563eb;
    color: #ffffff;
}

.btn-primary:hover {
    opacity: 0.9;
}

.btn-outline {
    background-color: #ffffff;
    border: 1px solid #d1d5db;
    color: #374151;
}

.btn-outline:hover {
    background-color: #f3f4f6;
}

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

.table-card {
    margin-top: 12px;
    background-color: #ffffff;
    border-radius: 16px;
    padding: 18px 16px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 8px 22px rgba(0,0,0,0.07);
}

.table-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    flex-wrap: wrap;
    gap: 10px;
}

.table-header-title {
    font-size: 16px;
    font-weight: 600;
    color: #111827;
}

.table-header-right {
    display: flex;
    gap: 8px;
}

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

.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.table thead {
    background-color: #f3f4f6;
}

.table thead th {
    padding: 10px 12px;
    text-align: left;
    font-weight: 600;
    color: #4b5563;
    border-bottom: 1px solid #e5e7eb;
}

.table tbody tr {
    border-bottom: 1px solid #e5e7eb;
}

.table tbody tr:hover {
    background-color: #f9fafb;
}

.table tbody td {
    padding: 10px 12px;
    color: #374151;
    vertical-align: middle;
}

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

.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 500;
}

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

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

.badge-danger {
    background-color: #fee2e2;
    color: #b91c1c;
}

/* ========== ACTION BUTTONS (VIEW/EDIT/DELETE) ========== */

.table-actions {
    text-align: right;
}

.table-actions a {
    padding: 4px 8px;
    margin-left: 5px;
    border-radius: 999px;
    font-size: 11px;
    border: 1px solid #d1d5db;
    color: #374151;
    text-decoration: none;
}

.table-actions a:hover {
    background-color: #eff6ff;
    border-color: #93c5fd;
}

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

@media (max-width: 768px) {

    .table thead {
        display: none;
    }

    .table tbody tr {
        display: block;
        margin-bottom: 14px;
        background: #fff;
        border-radius: 10px;
        padding: 10px;
    }

    .table tbody td {
        display: flex;
        justify-content: space-between;
        padding: 6px 8px;
    }

    .table tbody td::before {
        content: attr(data-label);
        font-weight: 600;
        color: #6b7280;
        margin-right: 8px;
    }

    .table-actions {
        text-align: left;
        margin-top: 8px;
    }
}