/* =========================================
   PRODUCTS MODULE - PREMIUM UI
========================================= */

.content-page {
    background: linear-gradient(180deg, #f4f8fb 0%, #eef4f8 100%);
    min-height: 100vh;
    padding-bottom: 30px;
}

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

.page-header-card {
    background: linear-gradient(135deg, #ffffff 0%, #f7fbfe 100%);
    border: 1px solid #e4edf3;
    border-radius: 24px;
    padding: 24px 26px;
    box-shadow: 0 10px 30px rgba(31, 45, 61, 0.06);
    position: relative;
    overflow: hidden;
}

.page-header-card::after {
    content: "";
    position: absolute;
    left: -30px;
    top: -30px;
    width: 130px;
    height: 130px;
    background: rgba(150, 184, 204, 0.10);
    border-radius: 50%;
}

.page-title {
    margin: 0;
    font-size: 24px;
    font-weight: 800;
    color: #24364a;
    position: relative;
    z-index: 1;
}

.page-subtitle {
    margin-top: 6px;
    color: #7890a3;
    font-size: 14px;
    line-height: 1.8;
    position: relative;
    z-index: 1;
}

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

.custom-card {
    background: #ffffff;
    border: 1px solid #e6eef4;
    border-radius: 24px;
    box-shadow: 0 10px 25px rgba(16, 24, 40, 0.05);
    overflow: hidden;
}

.custom-card .card-header {
    padding: 18px 22px 0;
}

.custom-card .card-header h5 {
    margin: 0;
    font-size: 17px;
    font-weight: 800;
    color: #24364a;
}

.custom-card .card-body {
    padding: 22px;
}

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

.dashboard-stat-card {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #ffffff 0%, #f8fbfd 100%);
    border: 1px solid #e6eef4;
    border-radius: 22px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 14px;
    min-height: 108px;
    box-shadow: 0 10px 25px rgba(16, 24, 40, 0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.dashboard-stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 30px rgba(16, 24, 40, 0.09);
}

.dashboard-stat-card::before {
    content: "";
    position: absolute;
    left: -18px;
    bottom: -18px;
    width: 90px;
    height: 90px;
    border-radius: 50%;
    opacity: 0.10;
}

.stat-card-primary::before { background: #96b8cc; }
.stat-card-success::before { background: #38b26b; }
.stat-card-warning::before { background: #f5a524; }
.stat-card-danger::before { background: #e5484d; }
.stat-card-secondary::before { background: #748094; }

.stat-icon {
    width: 54px;
    height: 54px;
    min-width: 54px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 21px;
    color: #fff;
    box-shadow: 0 8px 16px rgba(0,0,0,0.08);
}

.stat-card-primary .stat-icon { background: linear-gradient(135deg, #96b8cc, #7da8bf); }
.stat-card-success .stat-icon { background: linear-gradient(135deg, #41c779, #2fa862); }
.stat-card-warning .stat-icon { background: linear-gradient(135deg, #ffb547, #f29900); }
.stat-card-danger .stat-icon { background: linear-gradient(135deg, #f06469, #db3d43); }
.stat-card-secondary .stat-icon { background: linear-gradient(135deg, #8d97a8, #667085); }

.stat-content {
    position: relative;
    z-index: 1;
}

.stat-content h6 {
    margin: 0 0 8px;
    font-size: 13px;
    color: #7b8ea1;
    font-weight: 700;
}

.stat-content h3 {
    margin: 0;
    font-size: 24px;
    font-weight: 800;
    color: #24364a;
}

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

.table-responsive {
    border-radius: 18px;
}

.custom-table {
    width: 100%;
    margin-bottom: 0;
    border-collapse: separate;
    border-spacing: 0 12px;
}

.custom-table thead th {
    border: none;
    background: transparent;
    color: #7a8da0;
    font-size: 12px;
    font-weight: 800;
    padding: 0 14px 10px;
    white-space: nowrap;
}

.custom-table tbody tr {
    background: #ffffff;
    box-shadow: 0 8px 20px rgba(17, 24, 39, 0.04);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.custom-table tbody tr:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 24px rgba(17, 24, 39, 0.08);
}

.custom-table tbody td {
    padding: 14px;
    border-top: 1px solid #eef3f7;
    border-bottom: 1px solid #eef3f7;
    vertical-align: middle;
    background: #ffffff;
}

.custom-table tbody td:first-child {
    border-right: 1px solid #eef3f7;
    border-top-right-radius: 18px;
    border-bottom-right-radius: 18px;
}

.custom-table tbody td:last-child {
    border-left: 1px solid #eef3f7;
    border-top-left-radius: 18px;
    border-bottom-left-radius: 18px;
}

/* =========================================
   PRODUCT IMAGE
========================================= */

.product-thumb,
.custom-table img {
    width: 54px;
    height: 54px;
    object-fit: cover;
    border-radius: 16px;
    border: 1px solid #e6eef4;
    background: #f8fbfd;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.custom-table img:hover,
.product-thumb:hover {
    transform: scale(1.06);
    box-shadow: 0 8px 18px rgba(0,0,0,0.10);
}

/* =========================================
   TEXT HELPERS
========================================= */

.fw-bold {
    font-weight: 800 !important;
    color: #24364a;
}

.text-muted {
    color: #7a8da0 !important;
}

.small {
    font-size: 12px;
}

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

.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 7px 12px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .2px;
    border: 1px solid transparent;
}

.text-bg-success {
    background: #e9f9ef !important;
    color: #17803d !important;
    border-color: #caefd6 !important;
}

.text-bg-secondary {
    background: #eef2f6 !important;
    color: #5f6f82 !important;
    border-color: #dde5ec !important;
}

.text-bg-warning {
    background: #fff5df !important;
    color: #ad6a00 !important;
    border-color: #ffe2a6 !important;
}

.text-bg-danger {
    background: #feebec !important;
    color: #b42318 !important;
    border-color: #f7c8cc !important;
}

.text-bg-primary {
    background: #eaf4f9 !important;
    color: #336b86 !important;
    border-color: #d1e5f0 !important;
}

.text-bg-info {
    background: #ecf7fb !important;
    color: #0b6b8f !important;
    border-color: #d5edf7 !important;
}

.text-bg-light {
    background: #f6f8fb !important;
    color: #738295 !important;
    border-color: #e6ecf2 !important;
}

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

.btn {
    border-radius: 14px;
    font-size: 13px;
    font-weight: 700;
    padding: 10px 14px;
    transition: all 0.18s ease;
}

.btn-sm {
    padding: 7px 11px;
    font-size: 12px;
    border-radius: 11px;
}

.btn-primary {
    background: linear-gradient(135deg, #96b8cc 0%, #7ea9bf 100%);
    border-color: #8db1c6;
    color: #fff;
    box-shadow: 0 8px 18px rgba(150, 184, 204, 0.25);
}

.btn-primary:hover,
.btn-primary:focus {
    background: linear-gradient(135deg, #86adc4 0%, #6f9cb5 100%);
    border-color: #7ea9bf;
    color: #fff;
    transform: translateY(-1px);
}

.btn-outline-primary {
    border-color: #cddfea;
    color: #3a6d87;
    background: #fff;
}

.btn-outline-primary:hover {
    background: #eef6fa;
    color: #2f6179;
    border-color: #b8d2e0;
}

.btn-outline-secondary {
    border-color: #dde5ec;
    color: #5f6f82;
    background: #fff;
}

.btn-outline-secondary:hover {
    background: #f7f9fb;
    color: #4e5d6f;
    border-color: #cdd7e0;
}

.btn-outline-dark {
    border-color: #d7dee6;
    color: #334155;
    background: #fff;
}

.btn-outline-dark:hover {
    background: #f7f9fb;
    color: #1f2937;
}

.btn-outline-danger {
    border-color: #f3c7cb;
    color: #c3353f;
    background: #fff;
}

.btn-outline-danger:hover {
    background: #fff0f1;
    color: #a62c34;
}

/* =========================================
   FORM ELEMENTS
========================================= */

.form-label {
    font-size: 13px;
    font-weight: 800;
    color: #41566d;
    margin-bottom: 8px;
}

.form-control,
.form-select {
    min-height: 46px;
    border-radius: 14px;
    border: 1px solid #dde8ef;
    background: #fff;
    color: #24364a;
    font-size: 14px;
    box-shadow: none;
}

.form-control::placeholder {
    color: #9aaaba;
}

.form-control:focus,
.form-select:focus {
    border-color: #9dbccd;
    box-shadow: 0 0 0 4px rgba(150, 184, 204, 0.16);
}

textarea.form-control {
    min-height: 120px;
}

/* =========================================
   QUICK SUMMARY
========================================= */

.quick-summary-item {
    background: #f8fbfd;
    border: 1px solid #e7eef4;
    border-radius: 16px;
    padding: 14px 16px;
}

.quick-summary-item span {
    color: #678095;
    font-size: 13px;
    font-weight: 700;
}

.quick-summary-item strong {
    font-size: 16px;
    font-weight: 800;
}

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

.empty-state-box {
    background: linear-gradient(135deg, #ffffff 0%, #f8fbfd 100%);
    border: 1px dashed #d8e5ee;
    border-radius: 22px;
    padding: 30px 20px;
}

.empty-state-box h5 {
    font-size: 20px;
    font-weight: 800;
    color: #24364a;
}

.empty-state-box p {
    color: #7a8da0;
    font-size: 14px;
}

/* =========================================
   ALERTS
========================================= */

.alert {
    border-radius: 18px;
    border: none;
    padding: 15px 18px;
    box-shadow: 0 8px 20px rgba(17, 24, 39, 0.04);
}

.alert-success {
    background: #edf9f1;
    color: #1a7f43;
}

.alert-danger {
    background: #feeeee;
    color: #b42318;
}

/* =========================================
   ACTION AREA
========================================= */

.table-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.feature-stack {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

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

@media (max-width: 991px) {
    .page-header-card {
        padding: 20px;
    }

    .custom-card .card-body {
        padding: 18px;
    }

    .dashboard-stat-card {
        min-height: auto;
    }

    .page-title {
        font-size: 20px;
    }
}

@media (max-width: 768px) {
    .content-page {
        padding-bottom: 20px;
    }

    .page-header-card {
        border-radius: 18px;
        padding: 18px;
    }

    .page-title {
        font-size: 18px;
    }

    .page-subtitle {
        font-size: 13px;
    }

    .custom-card,
    .dashboard-stat-card {
        border-radius: 18px;
    }

    .custom-card .card-body {
        padding: 15px;
    }

    .custom-table {
        border-spacing: 0 8px;
    }

    .custom-table thead th {
        font-size: 11px;
    }

    .custom-table tbody td {
        padding: 10px;
        font-size: 12px;
    }

    .btn {
        font-size: 12px;
        padding: 9px 12px;
    }

    .btn-sm {
        font-size: 11px;
        padding: 6px 9px;
    }

    .form-control,
    .form-select {
        min-height: 42px;
        font-size: 13px;
    }
}