/* ===== STICKY HEADER (two‑row, status & theme on right) ===== */
.sub-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    padding: 0.5rem 1rem;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    margin-bottom: 0.5rem;
}

.sub-header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: nowrap;          /* single line */
}

.header-right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
}

.sub-header-bottom {
    margin-top: 0.3rem;
}

.sub-header-bottom h1 {
    font-size: 1.4rem;
    margin: 0;
}

/* Status area */
.status-area {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.9rem;
    white-space: nowrap;
}

.status-area .status-text {
    color: var(--text-secondary);
}

.trial-btn {
    background: var(--accent);
    color: white;
    border: none;
    padding: 0.3rem 0.8rem;
    border-radius: 30px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    white-space: nowrap;
}

.trial-btn:hover {
    background: var(--accent-dark);
}

/* Back button */
.btn-text {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    color: var(--text-primary);
    cursor: pointer;
    font-size: 0.9rem;
    padding: 0.45rem 0.85rem;
    border-radius: var(--radius-sm);
    font-weight: 500;
    transition: var(--transition);
    white-space: nowrap;
    flex-shrink: 0;
}

.btn-text:hover {
    background: var(--bg-card);
    border-color: var(--accent);
    color: var(--text-primary);
}

/* Theme toggle */
.btn-outline {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    color: var(--text-primary);
    cursor: pointer;
    border-radius: var(--radius-sm);
    padding: 0.45rem 0.75rem;
    font-weight: 500;
    transition: var(--transition);
    flex-shrink: 0;
}

.btn-outline:hover {
    background: var(--bg-card);
    border-color: var(--accent);
}

/* ===== CURRENT PLAN BANNER (hidden by default) ===== */
.current-plan-banner {
    background: var(--bg-secondary);
    border-radius: var(--radius);
    padding: 1rem 1.5rem;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    display: none;            /* hidden unless shown via JS */
}

/* ===== MAIN BODY ===== */
.main-body {
    padding: 1.5rem 1rem;
    max-width: 1100px;
    margin: 0 auto;
}

.section-title {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 1.25rem;
    color: var(--text-primary);
    text-align: center;
}

.section-subtitle {
    font-size: 0.9rem;
    color: var(--text-muted);
    text-align: center;
    margin-bottom: 1.5rem;
    margin-top: -0.5rem;
}

/* ===== INLINE VIEWS ===== */
.body-view {
    display: none;
    animation: fadeSlideIn 0.35s ease;
}
.body-view.active { display: block; }

@keyframes fadeSlideIn {
    from { opacity: 0; transform: translateY(18px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ===== PAYMENT METHOD OPTIONS ===== */
.payment-options {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    max-width: 620px;
    margin: 0 auto;
}

.payment-option {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.payment-option:hover {
    border-color: var(--accent);
    background: var(--bg-card);
    transform: translateX(4px);
}

.payment-option .option-header {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.payment-option .icon {
    font-size: 1.8rem;
    width: 3rem;
    text-align: center;
    flex-shrink: 0;
}

.payment-option .text { flex: 1; }
.payment-option .text .title { font-weight: 600; font-size: 1.05rem; }
.payment-option .text .desc { font-size: 0.85rem; color: var(--text-secondary); }

.payment-option .badge {
    background: var(--accent);
    color: white;
    font-size: 0.7rem;
    padding: 0.15rem 0.6rem;
    border-radius: 999px;
    font-weight: 600;
    flex-shrink: 0;
}

.payment-option.hidden { display: none; }

/* Trial features */
.trial-features {
    list-style: none;
    padding: 0;
    margin: 0.2rem 0 0 0;
}

.trial-features li {
    font-size: 0.85rem;
    padding: 0.2rem 0;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--text-secondary);
}

.trial-features li::before {
    content: "✓";
    color: var(--accent);
    font-weight: bold;
}

.trial-limitations {
    font-size: 0.75rem;
    color: var(--warning);
    margin-top: 0.4rem;
}

/* ===== PLAN GRID ===== */
.plan-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.plan-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    position: relative;
    transition: var(--transition);
    cursor: pointer;
    display: flex;
    flex-direction: column;
}

.plan-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.plan-card.popular {
    border: 2px solid var(--accent);
    box-shadow: 0 4px 12px rgba(79, 140, 255, 0.2);
}

.plan-card.popular::before {
    content: "🔥 POPULAR";
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--accent);
    color: white;
    padding: 0.25rem 1rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    z-index: 2;
}

.plan-card.disabled {
    opacity: 0.6;
    pointer-events: none;
    cursor: not-allowed;
}

.plan-card h3 { margin-bottom: 0.5rem; font-size: 1.25rem; }
.plan-card .price { font-size: 2rem; font-weight: 700; color: var(--accent); margin-bottom: 0.25rem; }
.plan-card .duration { color: var(--text-muted); margin-bottom: 1.5rem; font-size: 0.9rem; }

.plan-card .features {
    list-style: none;
    margin-bottom: 1.5rem;
    flex: 1;
}

.plan-card .features li {
    padding: 0.375rem 0;
    color: var(--text-secondary);
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.plan-card .features li::before {
    content: "✓";
    color: var(--accent);
    font-weight: bold;
}

.plan-card .limitations {
    font-size: 0.75rem;
    color: var(--warning);
    margin-bottom: 1.5rem;
}

.plan-card button {
    width: 100%;
    margin-top: auto;
    background: var(--accent);
    color: white;
    border: none;
    padding: 0.75rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    pointer-events: auto;
}

.plan-card button:hover { background: var(--accent-dark); }
.plan-card button.btn-secondary {
    background: transparent;
    color: var(--accent);
}

/* Custom card */
.custom-card .price input {
    width: 100%;
    padding: 0.5rem;
    border-radius: 6px;
    border: 1px solid var(--border);
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 1.2rem;
    text-align: center;
    box-sizing: border-box;
}

.custom-card .price input:focus {
    outline: none;
    border-color: var(--accent);
}

.custom-duration-preview {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: 0.2rem;
}

.custom-duration-preview strong { color: var(--text-primary); }

/* ===== C2B INSTRUCTIONS ===== */
.c2b-instructions {
    background: var(--bg-secondary);
    border-radius: var(--radius);
    padding: 1.25rem;
    margin: 1rem 0;
    font-size: 0.95rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.c2b-instructions ol { margin: 0.5rem 0; padding-left: 1.25rem; }
.c2b-instructions ol li { margin-bottom: 0.4rem; }

.c2b-instructions .till-number {
    background: var(--bg-card);
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    font-weight: 700;
    font-family: monospace;
    font-size: 1.1rem;
    border: 1px dashed var(--border);
    display: inline-block;
}

.c2b-claim-form { max-width: 500px; margin: 0 auto; }

.c2b-claim-form .form-group { margin-bottom: 1rem; }

.c2b-claim-form .form-group label {
    display: block;
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.c2b-claim-form .form-group input {
    width: 100%;
    padding: 0.6rem 0.8rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 1rem;
    box-sizing: border-box;
}

.c2b-claim-form .form-group input:focus {
    outline: none;
    border-color: var(--accent);
}

.c2b-claim-form .form-group .hint {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 0.2rem;
}

.c2b-claim-form .btn-primary {
    width: 100%;
    padding: 0.75rem;
    font-weight: 600;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 1rem;
}

.c2b-claim-form .btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.c2b-claim-form .btn-primary:hover:not(:disabled) {
    background: var(--accent-dark);
}

.verification-status {
    margin-top: 1rem;
    padding: 0.75rem;
    border-radius: var(--radius-sm);
    display: none;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.verification-status.success {
    display: block;
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.verification-status.error {
    display: block;
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.verification-status .close-status {
    float: right;
    background: var(--bg-card);
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    color: inherit;
    padding: 0 0.4rem;
    border-radius: 4px;
    line-height: 1;
}

/* ===== BACK BUTTON (footer) ===== */
.footer-back {
    margin-top: 1.5rem;
    display: flex;
    justify-content: center;
}

.inline-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    color: var(--text-primary);
    cursor: pointer;
    font-size: 0.9rem;
    padding: 0.6rem 1.5rem;
    border-radius: var(--radius-sm);
    font-weight: 500;
    transition: var(--transition);
}

.inline-back-btn:hover {
    background: var(--bg-card);
    border-color: var(--accent);
    color: var(--text-primary);
}

/* ===== PAYMENT INFO ===== */
.payment-info {
    margin-top: 2rem;
    padding: 1rem;
    background: var(--bg-secondary);
    border-radius: var(--radius);
    font-size: 0.875rem;
    color: var(--text-muted);
    text-align: center;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 640px) {
    .plan-grid { grid-template-columns: 1fr; }
    .sub-header-bottom h1 { font-size: 1.2rem; }
    .main-body { padding: 1rem 0.75rem; }
    .sub-header-top { flex-wrap: wrap; gap: 0.5rem; }
    .status-area { font-size: 0.8rem; gap: 0.4rem; }
    .trial-btn { padding: 0.25rem 0.6rem; font-size: 0.8rem; }
    .current-plan-banner { flex-direction: column; align-items: flex-start; }
}

.hidden { display: none !important; }