/* ---------- My Promotions ---------- */

/* ============================================================
   My Promotions — STYLES
   Keep page/component styles in logical sections below.
   ============================================================ */

/* =========================================================
   APEMART.LK — MY PROMOTIONS
   Clean marketplace dashboard style
========================================================= */

.promotions-page{min-height:100vh;background:#f5f7fb;color:#20242a}
.promotions-container{max-width:1240px;margin:0 auto}

.promotions-hero{padding:34px 20px 30px;background:linear-gradient(135deg,#fff 0%,#fff7ef 100%);border-bottom:1px solid #eceff3}
.breadcrumb-row{display:flex;align-items:center;gap:8px;font-size:13px;color:#7b8490;margin-bottom:22px}
.breadcrumb-row a{color:#6b7280;text-decoration:none;font-weight:600}
.breadcrumb-row a:hover{color:#ff6b00}
.breadcrumb-row strong{color:#ff6b00}
.promotions-heading{display:flex;align-items:center;justify-content:space-between;gap:24px}
.eyebrow{font-size:11px;letter-spacing:1.5px;color:#ff6b00;font-weight:900;margin-bottom:7px}
.promotions-heading h1{margin:0;font-size:34px;line-height:1.15;color:#171a1f}
.promotions-heading p{margin:9px 0 0;color:#6b7280;font-size:15px}
.promote-new-btn{display:inline-flex;align-items:center;justify-content:center;gap:7px;background:#ff6b00;color:#fff;text-decoration:none;font-weight:800;padding:13px 18px;border-radius:11px;box-shadow:0 8px 20px rgba(255,107,0,.20);transition:.2s;white-space:nowrap}
.promote-new-btn:hover{background:#e85f00;transform:translateY(-1px);box-shadow:0 10px 24px rgba(255,107,0,.25)}

.promotions-content{padding:28px 20px 55px}
.summary-strip{display:grid;grid-template-columns:repeat(4,1fr);gap:14px;margin-bottom:22px}
.summary-card{display:flex;align-items:center;gap:12px;background:#fff;border:1px solid #e7e9ee;border-radius:15px;padding:17px 18px;box-shadow:0 4px 14px rgba(15,23,42,.04)}
.summary-icon{width:42px;height:42px;border-radius:12px;display:grid;place-items:center;background:#f7f8fa;font-size:20px}
.summary-card small{display:block;color:#7b8490;font-size:12px;font-weight:700;margin-bottom:3px}
.summary-card strong{display:block;font-size:24px;color:#171a1f;line-height:1}
.summary-active .summary-icon{background:#ecfdf3}.summary-pending .summary-icon{background:#fff7df}.summary-expired .summary-icon{background:#f1f3f5}

.promotion-management-card{background:#fff;border:1px solid #e5e7eb;border-radius:18px;box-shadow:0 8px 28px rgba(15,23,42,.06);overflow:hidden}
.section-top{padding:24px 26px 18px;display:flex;align-items:flex-start;justify-content:space-between;gap:20px}
.section-top h2{margin:0;font-size:22px;color:#20242a}.section-top p{margin:6px 0 0;color:#7b8490;font-size:14px}
.live-indicator{font-size:12px;font-weight:800;color:#16803c;background:#effcf4;border:1px solid #d6f5e1;padding:7px 10px;border-radius:999px;white-space:nowrap}.live-indicator span{display:inline-block;width:7px;height:7px;border-radius:50%;background:#22c55e;margin-right:5px}

.promotion-status-tabs{display:flex;gap:8px;flex-wrap:wrap;padding:0 26px 16px;border-bottom:1px solid #edf0f2}
.promo-tab,.type-filter{font:inherit;border:1px solid #e5e7eb;background:#fff;color:#5f6874;border-radius:10px;cursor:pointer;transition:.18s}
.promo-tab{display:inline-flex;align-items:center;gap:8px;padding:9px 12px;font-size:13px;font-weight:800}
.promo-tab b{min-width:22px;text-align:center;border-radius:999px;background:#f2f4f7;padding:2px 6px;font-size:11px;color:#66707c}
.promo-tab:hover,.type-filter:hover{border-color:#ffad76;color:#e85f00}
.promo-tab.active{background:#ff6b00;border-color:#ff6b00;color:#fff;box-shadow:0 5px 14px rgba(255,107,0,.18)}
.promo-tab.active b{background:rgba(255,255,255,.2);color:#fff}

.promotion-type-filters{display:flex;gap:8px;flex-wrap:wrap;padding:17px 26px 18px;background:#fcfcfd}
.type-filter{padding:8px 12px;font-size:12px;font-weight:800}.type-filter.active{background:#fff1e8;color:#d95600;border-color:#ffc39e}

.history-list{padding:20px 26px 26px}
.promotion-card{position:relative;background:#fff;border:1px solid #e5e7eb;border-radius:16px;margin-bottom:13px;overflow:hidden;transition:.2s}
.promotion-card:hover{border-color:#ffd0b1;box-shadow:0 8px 22px rgba(15,23,42,.06);transform:translateY(-1px)}
.promotion-card::before{content:"";position:absolute;left:0;top:0;bottom:0;width:4px;background:#cbd5e1}
.promotion-card.card-active::before{background:#22c55e}.promotion-card.card-pending::before{background:#f59e0b}.promotion-card.card-rejected::before{background:#ef4444}.promotion-card.card-expired::before{background:#94a3b8}
.promotion-card-main{padding:18px 19px 17px 22px}
.promotion-card-top{display:flex;align-items:flex-start;justify-content:space-between;gap:18px}
.promotion-title-wrap{min-width:0}.promotion-title{margin:0;color:#1f2937;font-size:18px;line-height:1.3;word-break:break-word}.promotion-subtitle{margin:6px 0 0;color:#7b8490;font-size:13px}
.promotion-meta{display:flex;flex-wrap:wrap;gap:7px;margin-top:12px}.meta-chip{display:inline-flex;align-items:center;background:#f6f8fa;border:1px solid #edf0f2;color:#5d6671;border-radius:8px;padding:6px 9px;font-size:12px;font-weight:700}.meta-chip.type-chip{background:#fff6ef;border-color:#ffe2ce;color:#c85a12}
.status-pill{display:inline-flex;align-items:center;gap:6px;padding:7px 11px;border-radius:999px;font-size:12px;font-weight:900;white-space:nowrap}.status-active{background:#eafaf0;color:#16803c;border:1px solid #c9efd7}.status-pending,.status-receipt_submitted{background:#fff8df;color:#9a6500;border:1px solid #f7e7a9}.status-rejected{background:#fff0f0;color:#b42318;border:1px solid #ffd1d1}.status-expired{background:#f1f3f5;color:#5f6874;border:1px solid #e1e5e9}

.promotion-detail-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:9px;margin-top:16px}
.promotion-detail{background:#f8fafc;border:1px solid #eef1f4;border-radius:10px;padding:10px 11px;min-width:0}.promotion-detail small{display:block;color:#89919c;font-size:10px;font-weight:800;text-transform:uppercase;letter-spacing:.4px;margin-bottom:4px}.promotion-detail strong{display:block;color:#252a31;font-size:13px;line-height:1.35;word-break:break-word}
.promotion-card-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:14px}.promotion-action{display:inline-flex;align-items:center;justify-content:center;text-decoration:none;border-radius:9px;padding:8px 11px;font-size:12px;font-weight:800;border:1px solid #e1e5e9;color:#505966;background:#fff}.promotion-action:hover{border-color:#ffad76;color:#d95600}.promotion-action.primary{background:#ff6b00;border-color:#ff6b00;color:#fff}.promotion-action.primary:hover{background:#e85f00;color:#fff}

.empty-promotions{padding:62px 20px;text-align:center}.empty-icon{width:70px;height:70px;margin:0 auto 15px;border-radius:22px;background:#fff4eb;display:grid;place-items:center;font-size:30px}.empty-promotions strong{display:block;color:#252a31;font-size:19px;margin-bottom:7px}.empty-promotions span{display:block;color:#7b8490;font-size:13px;max-width:470px;margin:0 auto 18px}.empty-promotions .promote-new-btn{font-size:13px;padding:10px 14px}
.loading-state{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;padding:60px 20px;color:#68727e}.loading-state strong{color:#39414b;font-size:14px}.loading-state span{font-size:12px}.loader{width:28px;height:28px;border:3px solid #ffe0cc;border-top-color:#ff6b00;border-radius:50%;animation:spin .8s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}
.error-state{padding:50px 20px;text-align:center}.error-state strong{display:block;color:#b42318;margin-bottom:6px}.error-state span{color:#7b8490;font-size:13px}

@media(max-width:900px){.summary-strip{grid-template-columns:repeat(2,1fr)}.promotion-detail-grid{grid-template-columns:repeat(2,1fr)}}
@media(max-width:700px){.promotions-heading{flex-direction:column;align-items:flex-start}.promotions-heading h1{font-size:28px}.promote-new-btn{width:100%}.section-top{flex-direction:column;padding:20px}.promotion-status-tabs,.promotion-type-filters{padding-left:20px;padding-right:20px}.history-list{padding:16px 20px 22px}.promotion-card-top{flex-direction:column}.status-pill{align-self:flex-start}}
@media(max-width:520px){.summary-strip{grid-template-columns:1fr 1fr;gap:9px}.summary-card{padding:13px}.summary-icon{width:36px;height:36px;font-size:17px}.summary-card strong{font-size:20px}.summary-card small{font-size:10px}.promotion-detail-grid{grid-template-columns:1fr 1fr}.promotion-title{font-size:16px}.promotion-status-tabs{gap:6px}.promo-tab{font-size:11px;padding:8px 9px}.type-filter{font-size:11px;padding:7px 9px}}
@media(max-width:380px){.summary-strip{grid-template-columns:1fr}.promotion-detail-grid{grid-template-columns:1fr}}
.active-notice{display:flex;align-items:center;gap:8px;margin-top:14px;padding:10px 12px;border-radius:10px;background:#f0fdf4;border:1px solid #d6f5df;color:#166534;font-size:12px;font-weight:700}.payment-line{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:10px;padding-top:10px;border-top:1px dashed #e7eaee;color:#8a929d;font-size:11px}.payment-line strong{color:#5f6874;text-transform:capitalize}.reason-box{margin-top:10px;padding:10px 12px;border-radius:9px;background:#fff5f5;border:1px solid #ffd9d9;color:#9b2c2c;font-size:12px}

/* =========================================================
   APEMART — WIDE ROUNDED PAGE FRAME
   Matches the polished Seller Dashboard surface.
   Keeps the page wide while removing the "box inside box" look.
========================================================= */
.promotions-page{
    width:calc(100% - 48px) !important;
    max-width:1280px !important;
    margin:20px auto 44px !important;
    padding:0 0 34px !important;
    min-height:0;
    box-sizing:border-box;
    background:linear-gradient(180deg,#f8fafc 0%,#f3f6fa 100%) !important;
    border:1px solid #e6eaf0;
    border-radius:24px;
    box-shadow:0 10px 32px rgba(15,23,42,.055);
    overflow:hidden;
}
.promotions-hero{
    width:100%;
    box-sizing:border-box;
    margin:0;
    padding:30px 32px 28px;
    background:linear-gradient(135deg,#ffffff 0%,#fff8f0 100%);
    border:0;
    border-bottom:1px solid #e9edf2;
}
.promotions-hero .promotions-container,
.promotions-content{
    max-width:none !important;
    width:100% !important;
    margin:0 !important;
    box-sizing:border-box;
}
.promotions-hero .promotions-container{padding:0 !important}
.promotions-content{
    padding:22px 32px 12px !important;
    background:transparent !important;
}
.breadcrumb-row{margin-bottom:18px}
.summary-strip{margin-bottom:20px}
.promotion-management-card{
    border-radius:20px;
    border-color:#e2e7ed;
    box-shadow:0 8px 26px rgba(15,23,42,.045);
}
@media(max-width:700px){
    .promotions-page{width:calc(100% - 24px) !important;margin:12px auto 28px !important;border-radius:18px}
    .promotions-hero{padding:22px 18px 22px}
    .promotions-content{padding:16px 18px 8px !important}
}

/* =========================================================
   APEMART — BODY-MATCHED PROMOTIONS SURFACE
   Keep every inner card/detail/control. Remove only the
   large white surfaces so the page blends into the body.
========================================================= */
.promotions-page{
    background:transparent !important;
    border:0 !important;
    border-radius:0 !important;
    box-shadow:none !important;
}
.promotions-hero{
    background:transparent !important;
    border:0 !important;
}
.promotion-management-card{
    background:transparent !important;
    border:0 !important;
    border-radius:0 !important;
    box-shadow:none !important;
    overflow:visible !important;
}
.promotion-type-filters{
    background:transparent !important;
}
