/* =====================================================================
   myoffers.live — صفحة اشتراك المتجر
   ===================================================================== */


body {
    background: var(--page);
    color: var(--ink);
    font-family: var(--font);
    line-height: 1.6;
}

.screen {
    display: none;
    min-height: 100vh;
    min-height: 100dvh;
}

.screen.active {
    display: flex;
}

#loading-screen,
#login-screen {
    align-items: center;
    justify-content: center;
    padding: 24px;
}

#dashboard-screen {
    flex-direction: column;
}

.card {
    background: var(--surface);
    width: 100%;
    max-width: 420px;
    padding: 32px;
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(17, 24, 39, 0.08);
    text-align: center;
}

.card h1 {
    font-size: 22px;
    margin-bottom: 12px;
}

.hint {
    color: var(--ink-muted);
    font-size: 13px;
}

.primary-link,
.ghost-link {
    display: inline-block;
    padding: 12px 20px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 700;
    font-size: 14px;
}

.primary-link {
    background: var(--brand);
    color: #fff;
    width: 100%;
}

.ghost-link {
    color: var(--ink-soft);
    border: 1px solid var(--line);
    padding: 8px 16px;
    white-space: nowrap;
}

.topbar {
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    padding-top: env(safe-area-inset-top);
    position: sticky;
    top: 0;
}

.topbar-inner {
    max-width: 720px;
    margin: 0 auto;
    padding: 16px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.topbar h2 {
    font-size: 18px;
    color: var(--brand-text);
    font-weight: 800;
}

/* اختيار المتجر — يظهر فقط لمدير يشرف على أكثر من متجر واحد */
.store-select-wrap select {
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid var(--line);
    font-family: var(--font);
    font-size: 13px;
    background: var(--surface);
    color: var(--ink);
}

.content {
    max-width: 720px;
    margin: 0 auto;
    padding: 28px 20px calc(40px + env(safe-area-inset-bottom));
    width: 100%;
}

/* شاشات ضيّقة: كل عنصر في التوب بار ياخذ سطره الخاص بدل التزاحم */
@media (max-width: 640px) {
    .topbar h2 {
        font-size: 16px;
    }

    .store-select-wrap {
        order: 3;
        flex-basis: 100%;
    }

    .store-select-wrap select {
        width: 100%;
    }
}

/* ============================ حالة الاشتراك ============================ */

.status-card {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 24px;
    text-align: center;
    box-shadow: 0 4px 16px rgba(17, 24, 39, 0.06);
    margin-bottom: 16px;
}

.status-pill {
    display: inline-block;
    padding: 8px 20px;
    border-radius: 999px;
    font-weight: 800;
    font-size: 15px;
    margin-bottom: 10px;
}

.status-pill.trial {
    background: var(--success-bg);
    color: var(--success);
}

.status-pill.active {
    background: #dbeafe;
    color: #1d4ed8;
}

.status-pill.inactive {
    background: var(--muted-bg);
    color: #64748b;
}

.status-detail {
    color: var(--ink-soft);
    font-size: 14px;
}

/* ============================ تنبيه الدفع ============================ */

.reminder-banner {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    background: var(--warn-bg);
    border: 1px solid #fde68a;
    border-radius: var(--radius);
    padding: 16px 18px;
    margin-bottom: 16px;
}

.reminder-icon {
    font-size: 20px;
    flex-shrink: 0;
}

.reminder-banner p {
    font-size: 14px;
    color: #92400e;
    line-height: 1.6;
}

/* ============================ صندوق الدفع ============================ */

.payment-card {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: 0 4px 16px rgba(17, 24, 39, 0.06);
    position: relative;
}

.payment-card h3 {
    font-size: 18px;
    margin-bottom: 4px;
}

.payment-card h3.en-title {
    font-size: 13px;
    color: var(--ink-muted);
    font-weight: 600;
    direction: ltr;
    text-align: right;
    margin-bottom: 16px;
}

.amount {
    font-size: 15px;
    color: var(--ink-soft);
    background: var(--surface-alt);
    padding: 10px 14px;
    border-radius: 10px;
    margin-bottom: 20px;
}

.amount:empty {
    display: none;
}

/* لا توجد أي وسيلة دفع مُعدّة بعد في system/paymentInfo */
.no-payment-info {
    background: var(--muted-bg);
    border-radius: 10px;
    padding: 16px;
    margin-bottom: 16px;
    text-align: center;
}

.no-payment-info p {
    font-size: 13px;
    color: var(--ink-soft);
}

.payment-block {
    border-top: 1px solid var(--line);
    padding-top: 16px;
    margin-top: 16px;
}

.payment-block h4 {
    font-size: 14px;
    margin-bottom: 10px;
    color: var(--ink);
}

.payment-block h4 .en {
    font-size: 11px;
    color: var(--ink-muted);
    font-weight: 500;
}

.payment-block dl {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.payment-block dl>div {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    font-size: 14px;
}

.payment-block dt {
    color: var(--ink-muted);
    flex-shrink: 0;
}

.payment-block dd {
    color: var(--ink);
    font-weight: 700;
    text-align: left;
}

.payment-block dd.ltr {
    direction: ltr;
}

/* شارة "قريباً" بجانب عنوان قسم الدفع بالبطاقة */
.badge-soon {
    display: inline-block;
    background: var(--muted-bg);
    color: #64748b;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 10px;
    border-radius: 999px;
    margin-inline-start: 6px;
    vertical-align: middle;
}

.card-note {
    font-size: 13px;
    color: var(--ink-muted);
}

#card-pay-link {
    margin-top: 12px;
}

.confirm-block p {
    font-size: 13px;
    color: var(--ink-muted);
    margin-bottom: 14px;
}

.whatsapp-btn {
    display: block;
    text-align: center;
    background: #25d366;
    color: #fff;
    font-weight: 800;
    font-size: 15px;
    padding: 14px;
    border-radius: 10px;
    text-decoration: none;
}

.icon-btn {
    width: 36px;
    height: 36px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: var(--surface-alt);
    color: var(--ink-soft);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    cursor: pointer;
}

.icon-btn:hover:not(:disabled) {
    background: var(--surface-alt);
}