/* ============================================================
   Rodic Promo — shared admin page theme
   Used by pages under Pages/RodicPromo (category/subcategory/
   rewards/approvals/redemption-history/activity forms, etc.)
   ============================================================ */

.promo-page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.promo-page-title {
    display: flex;
    align-items: center;
    gap: 12px;
}

.promo-page-title .promo-title-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: linear-gradient(135deg, #ff6510, #ffb019);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
    box-shadow: 0 6px 14px rgba(255, 101, 16, .25);
}

.promo-page-title h1,
.promo-page-title .promo-title-text {
    font-size: 18px;
    font-weight: 800;
    margin: 0;
    color: #1c2333;
}

.promo-page-title small {
    display: block;
    font-size: 12px;
    color: #8a93a2;
    font-weight: 500;
    margin-top: 2px;
}

.promo-page-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* Buttons */
.promo-btn {
    border: 0;
    border-radius: 10px;
    padding: 9px 18px;
    font-weight: 700;
    font-size: 13px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: transform .12s ease, box-shadow .12s ease, opacity .12s ease;
}

.promo-btn:hover {
    transform: translateY(-1px);
}

.promo-btn:disabled {
    transform: none;
    cursor: not-allowed;
    opacity: .6;
}

.promo-btn-primary {
    background: linear-gradient(135deg, #ff6510, #ff8a3d);
    color: #fff;
    box-shadow: 0 6px 14px rgba(255, 101, 16, .25);
}

.promo-btn-outline {
    background: #fff;
    color: #ff6510;
    border: 1.5px solid #ffd2b3;
}

.promo-btn-ghost {
    background: #f4f6f8;
    color: #4a5568;
    border: 1px solid #e5e9ef;
}

.promo-btn-danger-outline {
    background: #fff;
    color: #be2822;
    border: 1.5px solid #ffc3c0;
}

.promo-btn-sm {
    padding: 6px 12px;
    font-size: 12px;
    border-radius: 8px;
}

.promo-icon-btn {
    width: 34px;
    height: 34px;
    border-radius: 9px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

/* Filter bar */
.promo-filter-bar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    padding: 6px 0 18px;
}

.promo-filter-pills {
    display: inline-flex;
    background: #f4f6f8;
    border-radius: 12px;
    padding: 4px;
    gap: 2px;
}

.promo-filter-pills label {
    padding: 7px 16px;
    border-radius: 9px;
    font-size: 12px;
    font-weight: 700;
    color: #6f7788;
    cursor: pointer;
    margin: 0;
    transition: background .12s ease, color .12s ease;
}

.promo-filter-pills input {
    display: none;
}

.promo-filter-pills input:checked + label {
    background: #fff;
    color: #f35d00;
    box-shadow: 0 2px 6px rgba(0, 0, 0, .08);
}

.promo-search {
    position: relative;
    flex: 1;
    min-width: 220px;
    max-width: 320px;
}

.promo-search i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #a1a8b5;
    font-size: 14px;
}

.promo-search input {
    width: 100%;
    padding: 9px 14px 9px 34px;
    border: 1px solid #e5e9ef;
    border-radius: 10px;
    font-size: 13px;
}

/* Table */
.promo-table-wrap {
    border: 1px solid #eef0f3;
    border-radius: 14px;
    overflow: hidden;
}

table.promo-table {
    width: 100%;
    border-collapse: collapse;
    margin: 0;
}

table.promo-table thead tr {
    background: #fafbfc;
}

table.promo-table th {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .5px;
    color: #8a93a2;
    font-weight: 800;
    padding: 14px 16px;
    text-align: left;
    border-bottom: 1px solid #eef0f3;
    white-space: nowrap;
}

table.promo-table td {
    padding: 13px 16px;
    font-size: 13px;
    color: #1c2333;
    border-bottom: 1px solid #f3f4f6;
    vertical-align: middle;
}

table.promo-table tbody tr {
    transition: background .12s ease;
}

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

table.promo-table tbody tr:hover {
    background: #fff8f4;
}

/* Status badges */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    border-radius: 20px;
    padding: 5px 12px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .3px;
    white-space: nowrap;
    border: 1px solid transparent;
}

.status-badge-success {
    background: #d9f7e4;
    color: #157f3c;
    border-color: #b7ecc9;
}

.status-badge-warning {
    background: #fff3b8;
    color: #8a6b00;
    border-color: #ffe58a;
}

.status-badge-danger {
    background: #ffe0df;
    color: #be2822;
    border-color: #ffc3c0;
}

.status-badge-info {
    background: #eef3ff;
    color: #245fe8;
    border-color: #cfe0ff;
}

.status-badge-neutral {
    background: #eef0f3;
    color: #6f7788;
    border-color: #e2e5ea;
}

/* Empty / loading state */
.promo-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 56px 24px;
    color: #9aa2af;
    text-align: center;
}

.promo-empty-state .promo-empty-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #f4f6f8;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    color: #c3c9d3;
    margin-bottom: 4px;
}

.promo-empty-state strong {
    color: #4a5568;
    font-size: 14px;
}

.promo-empty-state span {
    font-size: 12px;
}

.promo-loading-state {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 56px 24px;
    color: #6f7788;
    font-size: 13px;
    font-weight: 600;
}

/* Modal shell */
.promo-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 24px;
    border-bottom: 1px solid #f0e9e4;
}

.promo-modal-header .promo-modal-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 16px;
    font-weight: 800;
    color: #1c2333;
}

.promo-modal-header .promo-modal-title i {
    color: #ff6510;
    font-size: 18px;
}

.promo-modal-body {
    padding: 22px 24px;
}

.promo-modal-footer {
    padding: 16px 24px;
    border-top: 1px solid #f0e9e4;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* KPI tiles */
.promo-kpi-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 14px;
    margin-bottom: 20px;
}

.promo-kpi-tile {
    border-radius: 14px;
    padding: 16px 18px;
    color: #fff;
    position: relative;
    overflow: hidden;
}

.promo-kpi-tile .kpi-label {
    font-size: 11px;
    font-weight: 700;
    opacity: .85;
    text-transform: uppercase;
    letter-spacing: .4px;
}

.promo-kpi-tile .kpi-value {
    font-size: 26px;
    font-weight: 800;
    margin-top: 6px;
}

/* Detail (label/value) rows used in read-only views */
.promo-detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 18px;
}

.promo-detail-field label {
    display: block;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .3px;
    text-transform: uppercase;
    color: #a1a8b5;
    margin-bottom: 4px;
}

.promo-detail-field .promo-detail-value {
    font-size: 14px;
    color: #1c2333;
    font-weight: 600;
}

@media (max-width: 700px) {
    .promo-page-header {
        flex-direction: column;
        align-items: flex-start;
    }

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

    .promo-search {
        max-width: none;
    }
}
