/* ═══════════════════════════════════════════════════
   IPTV Manager Pro - Modern Checkout Styles
   Clean white background, modern cards, indigo accents
   ═══════════════════════════════════════════════════ */

/* ─── CSS Variables ─── */
:root {
    --iptv-primary: #6366f1;
    --iptv-primary-hover: #4f46e5;
    --iptv-primary-light: rgba(99, 102, 241, 0.06);
    --iptv-primary-border: rgba(99, 102, 241, 0.25);
    --iptv-bg: #ffffff;
    --iptv-bg-subtle: #f8fafc;
    --iptv-card-bg: #ffffff;
    --iptv-text: #0f172a;
    --iptv-text-secondary: #475569;
    --iptv-text-muted: #94a3b8;
    --iptv-border: #e2e8f0;
    --iptv-border-light: #f1f5f9;
    --iptv-success: #10b981;
    --iptv-success-light: rgba(16, 185, 129, 0.06);
    --iptv-warning: #f59e0b;
    --iptv-danger: #ef4444;
    --iptv-radius: 16px;
    --iptv-radius-sm: 10px;
    --iptv-shadow: 0 1px 3px rgba(0,0,0,0.04), 0 1px 2px rgba(0,0,0,0.02);
    --iptv-shadow-md: 0 4px 12px rgba(0,0,0,0.05);
    --iptv-shadow-lg: 0 8px 30px rgba(0,0,0,0.06);
    --iptv-transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --iptv-font: -apple-system, BlinkMacSystemFont, 'Inter', 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* ─── Reset & Base ─── */
.iptv-checkout-wrapper *,
.iptv-page-wrapper * {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

.iptv-checkout-wrapper,
.iptv-page-wrapper {
    font-family: var(--iptv-font);
    background: var(--iptv-bg);
    color: var(--iptv-text);
    line-height: 1.6;
    padding: 40px 24px;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ─── Two-Column Checkout Layout ─── */
.iptv-checkout-wrapper {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 32px;
    max-width: 1120px;
    margin: 0 auto;
    align-items: start;
}

@media (max-width: 900px) {
    .iptv-checkout-wrapper {
        grid-template-columns: 1fr;
        gap: 24px;
        padding: 20px 16px;
    }
}

/* ─── Cards ─── */
.iptv-checkout-card {
    background: var(--iptv-card-bg);
    border: 1px solid var(--iptv-border);
    border-radius: var(--iptv-radius);
    margin-bottom: 20px;
    overflow: hidden;
    transition: var(--iptv-transition);
    box-shadow: var(--iptv-shadow);
}

.iptv-checkout-card:hover {
    box-shadow: var(--iptv-shadow-md);
    border-color: #d1d5db;
}

.iptv-card-header {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 20px 24px;
    border-bottom: 1px solid var(--iptv-border-light);
    background: var(--iptv-bg-subtle);
}

.iptv-card-header h2 {
    font-size: 15px;
    font-weight: 600;
    color: var(--iptv-text);
    margin: 0;
    line-height: 1.4;
    letter-spacing: -0.01em;
}

.iptv-step-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    background: var(--iptv-primary);
    color: #fff;
    border-radius: 50%;
    font-size: 13px;
    font-weight: 700;
    flex-shrink: 0;
}

.iptv-card-body {
    padding: 24px;
}

/* ─── Form Elements ─── */
.iptv-form-group {
    margin-bottom: 18px;
}

.iptv-form-group:last-child {
    margin-bottom: 0;
}

.iptv-form-group > label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--iptv-text);
    margin-bottom: 8px;
    letter-spacing: -0.01em;
}

.iptv-required {
    color: var(--iptv-danger);
}

.iptv-optional {
    color: var(--iptv-text-muted);
    font-weight: 400;
    font-size: 12px;
}

.iptv-form-group input[type="email"],
.iptv-form-group input[type="tel"],
.iptv-form-group input[type="text"],
.iptv-form-group input[type="number"],
.iptv-form-group select {
    width: 100%;
    padding: 12px 16px;
    border: 1.5px solid var(--iptv-border);
    border-radius: var(--iptv-radius-sm);
    font-size: 14px;
    color: var(--iptv-text);
    background: #fff;
    transition: var(--iptv-transition);
    outline: none;
    font-family: var(--iptv-font);
    appearance: none;
}

.iptv-form-group input:focus,
.iptv-form-group select:focus {
    border-color: var(--iptv-primary);
    box-shadow: 0 0 0 4px var(--iptv-primary-light);
}

.iptv-form-group input::placeholder {
    color: var(--iptv-text-muted);
}

.iptv-field-hint {
    font-size: 12px;
    color: var(--iptv-text-muted);
    margin-top: 8px;
    line-height: 1.5;
}

.iptv-field-hint strong {
    color: var(--iptv-primary);
}

/* ─── Radio Card Group (Subscription Type) ─── */
.iptv-radio-group {
    display: flex;
    gap: 12px;
}

@media (max-width: 480px) {
    .iptv-radio-group {
        flex-direction: column;
    }
}

.iptv-radio-card {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 18px;
    border: 1.5px solid var(--iptv-border);
    border-radius: var(--iptv-radius-sm);
    cursor: pointer;
    transition: var(--iptv-transition);
    background: #fff;
    position: relative;
}

.iptv-radio-card:hover {
    border-color: var(--iptv-primary-border);
    background: var(--iptv-primary-light);
}

.iptv-radio-card.active {
    border-color: var(--iptv-primary);
    background: var(--iptv-primary-light);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.06);
}

.iptv-radio-card input {
    display: none;
}

.iptv-radio-dot {
    width: 20px;
    height: 20px;
    border: 2px solid var(--iptv-border);
    border-radius: 50%;
    flex-shrink: 0;
    position: relative;
    transition: var(--iptv-transition);
}

.iptv-radio-card.active .iptv-radio-dot {
    border-color: var(--iptv-primary);
}

.iptv-radio-card.active .iptv-radio-dot::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 10px;
    height: 10px;
    background: var(--iptv-primary);
    border-radius: 50%;
}

.iptv-radio-content {
    display: flex;
    flex-direction: column;
}

.iptv-radio-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--iptv-text);
    line-height: 1.3;
}

.iptv-radio-subtitle {
    font-size: 12px;
    color: var(--iptv-text-muted);
    margin-top: 2px;
}

/* ─── Renewal Field ─── */
.iptv-renewal-field {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px dashed var(--iptv-border);
}

/* ═══════════════════════════════════════════════════
   DEVICE TYPE GRID
   ═══════════════════════════════════════════════════ */
.iptv-device-type-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
}

@media (max-width: 768px) {
    .iptv-device-type-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 480px) {
    .iptv-device-type-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.iptv-device-type-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 16px 8px;
    border: 1.5px solid var(--iptv-border);
    border-radius: var(--iptv-radius-sm);
    cursor: pointer;
    transition: var(--iptv-transition);
    background: #fff;
    text-align: center;
    min-height: 100px;
    justify-content: center;
}

.iptv-device-type-card:hover {
    border-color: var(--iptv-primary-border);
    background: var(--iptv-primary-light);
}

.iptv-device-type-card.active {
    border-color: var(--iptv-primary);
    background: var(--iptv-primary-light);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.06);
}

.iptv-device-type-card input {
    display: none;
}

.iptv-device-type-icon {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--iptv-text-secondary);
    transition: var(--iptv-transition);
}

.iptv-device-type-card.active .iptv-device-type-icon {
    color: var(--iptv-primary);
}

.iptv-device-type-name {
    font-size: 11px;
    font-weight: 600;
    color: var(--iptv-text);
    line-height: 1.3;
}

/* ═══════════════════════════════════════════════════
   ADD ANOTHER DEVICE SECTION
   ═══════════════════════════════════════════════════ */
.iptv-extra-device-section {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--iptv-border-light);
}

.iptv-extra-device-toggle {
    margin-bottom: 0;
}

.iptv-switch-label {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: var(--iptv-text);
}

.iptv-switch-wrapper {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
}

.iptv-switch-wrapper input {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}

.iptv-switch-slider {
    position: absolute;
    inset: 0;
    background: #cbd5e1;
    border-radius: 24px;
    transition: 0.3s;
    cursor: pointer;
}

.iptv-switch-slider::before {
    content: '';
    position: absolute;
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background: #fff;
    border-radius: 50%;
    transition: 0.3s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}

.iptv-switch-wrapper input:checked + .iptv-switch-slider {
    background: var(--iptv-primary);
}

.iptv-switch-wrapper input:checked + .iptv-switch-slider::before {
    transform: translateX(20px);
}

.iptv-switch-text {
    font-weight: 600;
    font-size: 14px;
}

.iptv-extra-price-badge {
    display: inline-flex;
    padding: 4px 12px;
    background: var(--iptv-primary-light);
    color: var(--iptv-primary);
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    margin-left: auto;
    border: 1px solid rgba(99, 102, 241, 0.12);
}

.iptv-extra-device-controls {
    margin-top: 14px;
    padding: 16px;
    background: var(--iptv-bg-subtle);
    border-radius: var(--iptv-radius-sm);
    border: 1px solid var(--iptv-border-light);
}

.iptv-device-counter {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.iptv-counter-label {
    font-size: 13px;
    font-weight: 500;
    color: var(--iptv-text-secondary);
}

.iptv-counter-controls {
    display: flex;
    align-items: center;
    gap: 0;
    border: 1.5px solid var(--iptv-border);
    border-radius: var(--iptv-radius-sm);
    overflow: hidden;
    background: #fff;
}

.iptv-counter-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border: none;
    cursor: pointer;
    color: var(--iptv-text);
    transition: var(--iptv-transition);
}

.iptv-counter-btn:hover {
    background: var(--iptv-primary-light);
    color: var(--iptv-primary);
}

.iptv-counter-value {
    width: 48px;
    text-align: center;
    font-size: 16px;
    font-weight: 700;
    color: var(--iptv-primary);
    border-left: 1px solid var(--iptv-border);
    border-right: 1px solid var(--iptv-border);
    padding: 8px 0;
    line-height: 1;
}

/* ═══════════════════════════════════════════════════
   PAYMENT METHODS
   ═══════════════════════════════════════════════════ */
.iptv-payment-methods {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.iptv-payment-option {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 18px;
    border: 1.5px solid var(--iptv-border);
    border-radius: var(--iptv-radius-sm);
    cursor: pointer;
    transition: var(--iptv-transition);
    background: #fff;
}

.iptv-payment-option:hover {
    border-color: var(--iptv-primary-border);
    background: var(--iptv-primary-light);
}

.iptv-payment-option.active {
    border-color: var(--iptv-primary);
    background: var(--iptv-primary-light);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.06);
}

.iptv-payment-option input {
    display: none;
}

.iptv-payment-icon {
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--iptv-bg-subtle);
    border-radius: var(--iptv-radius-sm);
    color: var(--iptv-primary);
    flex-shrink: 0;
    border: 1px solid var(--iptv-border-light);
}

.iptv-payment-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.iptv-payment-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--iptv-text);
}

.iptv-payment-desc {
    font-size: 12px;
    color: var(--iptv-text-muted);
    margin-top: 2px;
}

.iptv-payment-check {
    color: var(--iptv-border);
    transition: var(--iptv-transition);
}

.iptv-payment-option.active .iptv-payment-check {
    color: var(--iptv-primary);
}

/* ═══════════════════════════════════════════════════
   ORDER SUMMARY (Right Column)
   ═══════════════════════════════════════════════════ */
.iptv-checkout-right {
    position: sticky;
    top: 30px;
}

.iptv-summary-card {
    border: 1px solid var(--iptv-border);
    box-shadow: var(--iptv-shadow-md);
}

.iptv-summary-card .iptv-card-header {
    background: var(--iptv-bg-subtle);
}

.iptv-summary-card .iptv-card-header h2 {
    font-size: 15px;
}

.iptv-summary-email {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 14px;
    background: var(--iptv-success-light);
    border: 1px solid rgba(16, 185, 129, 0.12);
    border-radius: var(--iptv-radius-sm);
    margin-bottom: 18px;
    font-size: 12px;
    color: var(--iptv-text-secondary);
    flex-wrap: wrap;
}

.iptv-summary-email svg {
    color: var(--iptv-success);
    flex-shrink: 0;
}

.iptv-summary-email strong {
    color: var(--iptv-text);
    word-break: break-all;
}

/* Summary Item */
.iptv-summary-item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 16px 0;
}

.iptv-summary-item-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--iptv-primary-light);
    border-radius: var(--iptv-radius-sm);
    font-size: 22px;
    flex-shrink: 0;
    border: 1px solid rgba(99, 102, 241, 0.08);
}

.iptv-summary-item-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.iptv-summary-item-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--iptv-text);
}

.iptv-summary-item-meta {
    font-size: 12px;
    color: var(--iptv-text-muted);
}

.iptv-summary-item-price {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
    flex-shrink: 0;
}

.iptv-price-original {
    font-size: 12px;
    color: var(--iptv-text-muted);
    text-decoration: line-through;
}

.iptv-price-sale {
    font-size: 16px;
    font-weight: 700;
    color: var(--iptv-success);
}

/* Summary Lines */
.iptv-summary-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    font-size: 13px;
    color: var(--iptv-text-secondary);
}

.iptv-summary-line span:last-child {
    font-weight: 500;
    color: var(--iptv-text);
}

.iptv-summary-extra {
    padding: 10px 14px;
    background: var(--iptv-primary-light);
    border-radius: var(--iptv-radius-sm);
    margin: 8px 0;
    border: 1px solid rgba(99, 102, 241, 0.08);
}

.iptv-summary-total {
    font-size: 16px;
    font-weight: 700;
    padding: 14px 0 4px;
}

.iptv-summary-total span:last-child {
    font-size: 20px;
    font-weight: 800;
    color: var(--iptv-text);
}

.iptv-summary-divider {
    height: 1px;
    background: var(--iptv-border-light);
    margin: 12px 0;
}

.iptv-summary-totals {
    margin-bottom: 20px;
}

/* Discount Section */
.iptv-discount-section {
    margin: 4px 0;
}

.iptv-discount-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 8px 0;
    font-size: 13px;
    font-weight: 500;
    color: var(--iptv-text-secondary);
    transition: var(--iptv-transition);
}

.iptv-discount-toggle:hover {
    color: var(--iptv-primary);
}

.iptv-discount-toggle .iptv-chevron {
    margin-left: auto;
    transition: transform 0.2s ease;
}

.iptv-discount-toggle.open .iptv-chevron {
    transform: rotate(180deg);
}

.iptv-discount-input {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}

.iptv-discount-input input {
    flex: 1;
    padding: 10px 14px;
    border: 1.5px solid var(--iptv-border);
    border-radius: var(--iptv-radius-sm);
    font-size: 13px;
    outline: none;
    font-family: var(--iptv-font);
    background: #fff;
    color: var(--iptv-text);
}

.iptv-discount-input input:focus {
    border-color: var(--iptv-primary);
    box-shadow: 0 0 0 4px var(--iptv-primary-light);
}

.iptv-discount-apply {
    padding: 10px 20px;
    background: var(--iptv-primary);
    color: #fff;
    border: none;
    border-radius: var(--iptv-radius-sm);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--iptv-transition);
    font-family: var(--iptv-font);
}

.iptv-discount-apply:hover {
    background: var(--iptv-primary-hover);
}

/* Terms */
.iptv-terms {
    margin-bottom: 20px;
}

.iptv-checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    font-size: 12px;
    color: var(--iptv-text-secondary);
    line-height: 1.6;
}

.iptv-checkbox-label input {
    display: none;
}

.iptv-checkbox-custom {
    width: 18px;
    height: 18px;
    border: 2px solid var(--iptv-border);
    border-radius: 5px;
    flex-shrink: 0;
    position: relative;
    transition: var(--iptv-transition);
    margin-top: 2px;
}

.iptv-checkbox-label input:checked + .iptv-checkbox-custom {
    background: var(--iptv-primary);
    border-color: var(--iptv-primary);
}

.iptv-checkbox-label input:checked + .iptv-checkbox-custom::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 5px;
    width: 5px;
    height: 9px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.iptv-checkbox-label a {
    color: var(--iptv-primary);
    text-decoration: none;
    font-weight: 500;
}

.iptv-checkbox-label a:hover {
    text-decoration: underline;
}

/* Terms Notice (replaces checkbox) */
.iptv-terms-notice {
    padding: 12px 16px;
    margin-bottom: 16px;
    font-size: 12px;
    color: var(--iptv-text-secondary);
    line-height: 1.6;
    background: var(--iptv-bg-subtle);
    border-radius: var(--iptv-radius-sm);
    border: 1px solid var(--iptv-border-light);
}

.iptv-terms-notice a {
    color: var(--iptv-primary);
    text-decoration: none;
    font-weight: 500;
}

.iptv-terms-notice a:hover {
    text-decoration: underline;
}

/* Premium Purchase Button */
.iptv-purchase-btn {
    width: 100%;
    border: none;
    padding: 0 !important;
    cursor: pointer;
    font-family: var(--iptv-font);
    border-radius: 14px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.iptv-purchase-btn-premium {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    color: white;
    box-shadow: 0 10px 25px -5px rgba(79, 70, 229, 0.4), 0 8px 10px -6px rgba(79, 70, 229, 0.4);
}

.iptv-btn-content {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 18px 32px;
    width: 100%;
    height: 100%;
}

.iptv-btn-content span {
    font-size: 17px;
    font-weight: 700;
    letter-spacing: 0.01em;
}

.iptv-btn-shine {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        120deg,
        transparent,
        rgba(255, 255, 255, 0.3),
        transparent
    );
    transition: all 0.6s;
    z-index: 1;
}

.iptv-purchase-btn-premium:hover:not(:disabled) {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 20px 35px -8px rgba(79, 70, 229, 0.5), 0 12px 15px -10px rgba(79, 70, 229, 0.5);
    background: linear-gradient(135deg, #4338ca 0%, #6d28d9 100%);
}

.iptv-purchase-btn-premium:hover:not(:disabled) .iptv-btn-shine {
    left: 100%;
}

.iptv-purchase-btn-premium:active:not(:disabled) {
    transform: translateY(-1px) scale(0.98);
}

.iptv-purchase-btn:disabled {
    background: #e2e8f0 !important;
    color: #94a3b8 !important;
    box-shadow: none !important;
    cursor: not-allowed;
    transform: none !important;
}

.iptv-purchase-btn:disabled .iptv-btn-shine {
    display: none;
}

.iptv-purchase-btn.iptv-purchase-btn-gradient:disabled {
    opacity: 0.5;
    background: linear-gradient(135deg, #94a3b8 0%, #64748b 100%);
    box-shadow: none;
}

.iptv-purchase-btn.loading {
    pointer-events: none;
    opacity: 0.7;
}

.iptv-purchase-btn.loading span::after {
    content: '...';
    animation: iptv-dots 1.5s steps(4, end) infinite;
}

@keyframes iptv-dots {
    0%, 20% { content: ''; }
    40% { content: '.'; }
    60% { content: '..'; }
    80%, 100% { content: '...'; }
}

/* Security Badges */
.iptv-security-badges {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-top: 20px;
    padding: 16px 0;
}

.iptv-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    color: var(--iptv-text-muted);
    font-weight: 500;
}

.iptv-badge svg {
    color: var(--iptv-success);
}

/* ═══════════════════════════════════════════════════
   PLAN SELECTION PAGE (No Package Found)
   ═══════════════════════════════════════════════════ */
.iptv-no-package {
    max-width: 1100px;
    margin: 0 auto;
}

.iptv-no-package-header {
    text-align: center;
    margin-bottom: 48px;
}

.iptv-no-package-header h2 {
    font-size: 30px;
    font-weight: 800;
    color: var(--iptv-text);
    margin: 16px 0 8px;
    letter-spacing: -0.02em;
}

.iptv-no-package-header p {
    font-size: 16px;
    color: var(--iptv-text-secondary);
}

.iptv-plans-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
    gap: 24px;
}

.iptv-plan-card {
    background: var(--iptv-card-bg);
    border: 1.5px solid var(--iptv-border);
    border-radius: var(--iptv-radius);
    padding: 32px 24px;
    text-align: center;
    transition: var(--iptv-transition);
    box-shadow: var(--iptv-shadow);
    position: relative;
}

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

.iptv-plan-featured {
    border-color: var(--iptv-primary);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.06);
}

.iptv-plan-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--iptv-primary);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 18px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.iptv-plan-name {
    font-size: 18px;
    font-weight: 700;
    color: var(--iptv-text);
    margin-bottom: 6px;
}

.iptv-plan-desc {
    font-size: 13px;
    color: var(--iptv-text-muted);
    margin-bottom: 24px;
}

.iptv-plan-price {
    margin-bottom: 24px;
}

.iptv-plan-price-old {
    font-size: 14px;
    color: var(--iptv-text-muted);
    text-decoration: line-through;
    display: block;
    margin-bottom: 4px;
}

.iptv-plan-price-current {
    font-size: 36px;
    font-weight: 800;
    color: var(--iptv-text);
    letter-spacing: -0.02em;
}

.iptv-plan-price-period {
    font-size: 14px;
    color: var(--iptv-text-muted);
    font-weight: 400;
}

.iptv-plan-features {
    list-style: none;
    padding: 0;
    margin: 0 0 28px;
    text-align: left;
}

.iptv-plan-features li {
    padding: 7px 0;
    font-size: 13px;
    color: var(--iptv-text-secondary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.iptv-plan-features li::before {
    content: '';
    width: 20px;
    height: 20px;
    background: var(--iptv-success-light);
    border-radius: 50%;
    flex-shrink: 0;
    background-image: url("data:image/svg+xml,%3Csvg width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2310b981' stroke-width='3' xmlns='http://www.w3.org/2000/svg'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 10px;
}

.iptv-plan-btn {
    display: block;
    width: 100%;
    padding: 14px 24px;
    background: var(--iptv-primary);
    color: #fff;
    border: none;
    border-radius: var(--iptv-radius-sm);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    transition: var(--iptv-transition);
    font-family: var(--iptv-font);
}

.iptv-plan-btn:hover {
    background: var(--iptv-primary-hover);
    color: #fff;
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.3);
}

/* ═══════════════════════════════════════════════════
   POPUPS / OVERLAYS
   ═══════════════════════════════════════════════════ */
.iptv-verification-overlay,
.iptv-success-overlay,
.iptv-pending-overlay {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background: rgba(15, 23, 42, 0.55) !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    z-index: 999999 !important;
    display: none;
    align-items: center !important;
    justify-content: center !important;
    padding: 20px !important;
    margin: 0 !important;
    overflow: auto !important;
    box-sizing: border-box !important;
}

/* When jQuery .show() sets display:block, override to flex */
.iptv-verification-overlay[style*="display: block"],
.iptv-success-overlay[style*="display: block"],
.iptv-pending-overlay[style*="display: block"],
.iptv-verification-overlay[style*="display:block"],
.iptv-success-overlay[style*="display:block"],
.iptv-pending-overlay[style*="display:block"],
.iptv-verification-overlay.iptv-overlay-visible,
.iptv-success-overlay.iptv-overlay-visible,
.iptv-pending-overlay.iptv-overlay-visible {
    display: flex !important;
    z-index: 999999 !important;
}

.iptv-verification-popup,
.iptv-success-popup,
.iptv-pending-popup {
    background: #ffffff !important;
    border-radius: 20px !important;
    padding: 44px 36px !important;
    max-width: 480px !important;
    width: 100% !important;
    text-align: center !important;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.18), 0 0 0 1px rgba(0,0,0,0.05) !important;
    animation: iptv-popup-in 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
    position: relative !important;
    z-index: 1000000 !important;
    margin: auto !important;
}

@keyframes iptv-popup-in {
    from { opacity: 0; transform: scale(0.88) translateY(30px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.iptv-popup-spinner {
    position: relative;
    width: 90px;
    height: 90px;
    margin: 0 auto 28px;
}

.iptv-popup-spinner-ring {
    position: absolute;
    inset: 0;
    border: 4px solid var(--iptv-border-light);
    border-top-color: var(--iptv-primary);
    border-radius: 50%;
    animation: iptv-spin 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite;
}

.iptv-popup-spinner-ring-2 {
    border: 4px solid transparent;
    border-bottom-color: var(--iptv-primary);
    opacity: 0.4;
    animation: iptv-spin 2s linear infinite reverse;
}

@keyframes iptv-spin {
    to { transform: rotate(360deg); }
}

.iptv-popup-spinner-icon {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--iptv-primary);
}

.iptv-pending-progress {
    width: 100%;
    height: 8px;
    background: var(--iptv-border-light);
    border-radius: 10px;
    overflow: hidden;
    margin: 24px 0 10px;
}

.iptv-pending-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--iptv-primary), #818cf8);
    width: 0%;
    transition: width 1s linear;
}

.iptv-pending-timer {
    font-size: 13px;
    color: var(--iptv-primary);
    font-weight: 600;
    margin-bottom: 20px;
}

.iptv-verification-popup h3,
.iptv-success-popup h3,
.iptv-pending-popup h3 {
    font-size: 20px;
    font-weight: 700;
    color: var(--iptv-text);
    margin-bottom: 10px;
    letter-spacing: -0.01em;
}

.iptv-verification-popup p,
.iptv-success-popup p,
.iptv-pending-popup p {
    font-size: 14px;
    color: var(--iptv-text-secondary);
    margin-bottom: 16px;
    line-height: 1.7;
}

.iptv-verification-progress {
    width: 100%;
    height: 6px;
    background: var(--iptv-border-light);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 8px;
}

.iptv-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--iptv-primary), #818cf8);
    border-radius: 3px;
    width: 0%;
    transition: width 1s linear;
}

.iptv-verification-timer {
    font-size: 12px;
    color: var(--iptv-text-muted);
}

.iptv-success-icon,
.iptv-pending-icon {
    margin-bottom: 20px;
}

.iptv-success-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 12px;
}

.iptv-btn-primary {
    display: block;
    padding: 14px 24px;
    background: var(--iptv-primary);
    color: #fff;
    border: none;
    border-radius: var(--iptv-radius-sm);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    transition: var(--iptv-transition);
    font-family: var(--iptv-font);
}

.iptv-btn-primary:hover {
    background: var(--iptv-primary-hover);
    color: #fff;
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.25);
}

.iptv-btn-secondary {
    display: block;
    padding: 14px 24px;
    background: transparent;
    color: var(--iptv-text-secondary);
    border: 1.5px solid var(--iptv-border);
    border-radius: var(--iptv-radius-sm);
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    transition: var(--iptv-transition);
    font-family: var(--iptv-font);
}

.iptv-btn-secondary:hover {
    border-color: var(--iptv-primary);
    color: var(--iptv-primary);
    text-decoration: none;
    background: var(--iptv-primary-light);
}

.iptv-pending-order {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px;
    background: var(--iptv-bg-subtle);
    border-radius: var(--iptv-radius-sm);
    margin-bottom: 16px;
    font-size: 14px;
    color: var(--iptv-text-secondary);
    border: 1px solid var(--iptv-border-light);
}

.iptv-pending-order strong {
    color: var(--iptv-text);
    font-family: 'SF Mono', 'Fira Code', monospace;
}

/* ═══════════════════════════════════════════════════
   OTP & ACCESS PAGES
   ═══════════════════════════════════════════════════ */
.iptv-page-wrapper {
    max-width: 600px;
    margin: 0 auto;
    background: #ffffff;
}

.iptv-page-header {
    text-align: center;
    margin-bottom: 32px;
}

.iptv-page-header h1 {
    font-size: 26px;
    font-weight: 800;
    color: var(--iptv-text);
    margin-bottom: 8px;
    letter-spacing: -0.02em;
}

.iptv-page-header p {
    font-size: 15px;
    color: var(--iptv-text-secondary);
}

.iptv-page-icon {
    margin-bottom: 16px;
}

.iptv-page-card,
.iptv-access-card {
    background: var(--iptv-card-bg);
    border: 1px solid var(--iptv-border);
    border-radius: var(--iptv-radius);
    padding: 32px;
    margin-bottom: 20px;
    box-shadow: var(--iptv-shadow);
}

.iptv-page-card h2 {
    font-size: 20px;
    font-weight: 700;
    color: var(--iptv-text);
    margin-bottom: 8px;
}

.iptv-page-card p {
    font-size: 14px;
    color: var(--iptv-text-secondary);
    margin-bottom: 20px;
}

.iptv-btn-full {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.iptv-otp-header {
    text-align: center;
    margin-bottom: 8px;
}

.iptv-otp-header h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--iptv-text);
    margin-bottom: 6px;
}

.iptv-otp-header p {
    font-size: 14px;
    color: var(--iptv-text-secondary);
}

.iptv-otp-inputs {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin: 28px 0;
}

.iptv-otp-digit {
    width: 50px;
    height: 58px;
    text-align: center;
    font-size: 22px;
    font-weight: 700;
    border: 2px solid var(--iptv-border);
    border-radius: var(--iptv-radius-sm);
    outline: none;
    transition: var(--iptv-transition);
    font-family: var(--iptv-font);
    color: var(--iptv-text);
    background: #fff;
}

.iptv-otp-digit:focus {
    border-color: var(--iptv-primary);
    box-shadow: 0 0 0 4px var(--iptv-primary-light);
}

.iptv-otp-resend {
    text-align: center;
    font-size: 13px;
    color: var(--iptv-text-muted);
    margin-top: 16px;
}

.iptv-otp-resend a {
    color: var(--iptv-primary);
    text-decoration: none;
    font-weight: 500;
}

.iptv-otp-resend a:hover {
    text-decoration: underline;
}

.iptv-otp-info {
    text-align: center;
    font-size: 13px;
    color: var(--iptv-text-muted);
}

.iptv-otp-info a {
    color: var(--iptv-primary);
    text-decoration: none;
    font-weight: 500;
}

.iptv-otp-info a:hover {
    text-decoration: underline;
}

.iptv-message,
.iptv-form-message {
    padding: 12px 16px;
    border-radius: var(--iptv-radius-sm);
    font-size: 13px;
    margin-top: 16px;
    display: none;
}

.iptv-message.success,
.iptv-form-message.success {
    background: var(--iptv-success-light);
    color: #059669;
    border: 1px solid rgba(16, 185, 129, 0.15);
}

.iptv-message.error,
.iptv-form-message.error {
    background: rgba(239, 68, 68, 0.06);
    color: #dc2626;
    border: 1px solid rgba(239, 68, 68, 0.15);
}

/* Credential Cards (white theme) */
.iptv-credential-card {
    background: var(--iptv-card-bg);
    border: 1px solid var(--iptv-border);
    border-radius: var(--iptv-radius);
    padding: 24px;
    margin-bottom: 16px;
    box-shadow: var(--iptv-shadow);
}

.iptv-cred-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--iptv-border-light);
}

.iptv-cred-badge {
    display: inline-flex;
    padding: 4px 12px;
    background: var(--iptv-success-light);
    color: var(--iptv-success);
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    border: 1px solid rgba(16, 185, 129, 0.12);
}

.iptv-cred-order {
    font-size: 12px;
    color: var(--iptv-text-muted);
    font-family: 'SF Mono', 'Fira Code', monospace;
}

.iptv-cred-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

@media (max-width: 480px) {
    .iptv-cred-grid {
        grid-template-columns: 1fr;
    }
}

.iptv-cred-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.iptv-cred-item label {
    font-size: 11px;
    font-weight: 600;
    color: var(--iptv-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.iptv-cred-item span {
    font-size: 14px;
    color: var(--iptv-text);
    font-weight: 500;
    word-break: break-all;
}

.iptv-cred-full {
    grid-column: 1 / -1;
}

.iptv-m3u-url {
    font-size: 12px !important;
    font-family: 'SF Mono', 'Fira Code', monospace;
    background: var(--iptv-bg-subtle);
    padding: 10px 14px;
    border-radius: var(--iptv-radius-sm);
    display: block;
    overflow-x: auto;
    border: 1px solid var(--iptv-border-light);
}

/* Setup Guide */
.iptv-setup-guide {
    background: var(--iptv-card-bg);
    border: 1px solid var(--iptv-border);
    border-radius: var(--iptv-radius);
    padding: 28px;
    margin-top: 20px;
    box-shadow: var(--iptv-shadow);
}

.iptv-setup-guide h3 {
    font-size: 16px;
    font-weight: 700;
    color: var(--iptv-text);
    margin-bottom: 20px;
}

.iptv-guide-steps {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.iptv-guide-step {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.iptv-guide-num {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: var(--iptv-primary-light);
    color: var(--iptv-primary);
    border-radius: 50%;
    font-size: 14px;
    font-weight: 700;
    flex-shrink: 0;
    border: 1px solid rgba(99, 102, 241, 0.12);
}

.iptv-guide-step strong {
    font-size: 14px;
    color: var(--iptv-text);
    display: block;
    margin-bottom: 4px;
}

.iptv-guide-step p {
    font-size: 13px;
    color: var(--iptv-text-secondary);
    margin: 0;
    line-height: 1.5;
}

/* ─── Notification Toast ─── */
.iptv-notification {
    position: fixed;
    bottom: 30px;
    right: 30px;
    padding: 16px 24px;
    border-radius: var(--iptv-radius-sm);
    font-size: 14px;
    font-weight: 500;
    z-index: 9999999;
    transform: translateY(20px);
    opacity: 0;
    transition: all 0.3s ease;
    font-family: var(--iptv-font);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.1);
    max-width: 400px;
}

.iptv-notification.show {
    transform: translateY(0);
    opacity: 1;
}

.iptv-notif-error {
    background: #fff;
    color: #dc2626;
    border: 1px solid rgba(239, 68, 68, 0.15);
}

.iptv-notif-success {
    background: #fff;
    color: #059669;
    border: 1px solid rgba(16, 185, 129, 0.15);
}

/* ─── Empty State ─── */
.iptv-empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--iptv-text-muted);
    font-size: 15px;
}

/* ─── Message Cards (Order Success / Error) ─── */
.iptv-message-card {
    background: #ffffff;
    border: 1px solid var(--iptv-border);
    border-radius: var(--iptv-radius);
    padding: 48px 32px;
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
    box-shadow: var(--iptv-shadow-md);
}

.iptv-message-icon {
    margin-bottom: 24px;
}

.iptv-message-card h2 {
    font-size: 24px;
    font-weight: 700;
    margin: 0 0 12px 0;
    color: var(--iptv-text);
    letter-spacing: -0.01em;
}

.iptv-message-card p {
    color: var(--iptv-text-secondary);
    font-size: 15px;
    line-height: 1.7;
    margin: 8px 0;
}

.iptv-message-success {
    border-color: rgba(16, 185, 129, 0.2);
}

.iptv-message-error {
    border-color: rgba(239, 68, 68, 0.2);
}

.iptv-message-warning {
    border-color: rgba(245, 158, 11, 0.2);
}

/* Order Details in message cards */
.iptv-order-details {
    background: var(--iptv-bg-subtle);
    border-radius: var(--iptv-radius-sm);
    padding: 20px;
    margin-top: 20px;
    text-align: left;
    border: 1px solid var(--iptv-border-light);
}

.iptv-order-details p {
    margin: 8px 0;
    color: var(--iptv-text-secondary);
    font-size: 14px;
}

.iptv-order-details strong {
    color: var(--iptv-text);
    margin-right: 8px;
}

/* Credentials Notice */
.iptv-credentials-notice {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    background: var(--iptv-primary-light);
    border: 1px solid rgba(99, 102, 241, 0.1);
    border-radius: var(--iptv-radius-sm);
    padding: 16px 18px;
    margin-top: 20px;
}

.iptv-credentials-notice svg {
    flex-shrink: 0;
    color: var(--iptv-primary);
    margin-top: 2px;
}

.iptv-credentials-notice p {
    margin: 0;
    color: var(--iptv-text-secondary);
    font-size: 13px;
    line-height: 1.6;
}

.iptv-credentials-notice strong {
    color: var(--iptv-text);
}

/* Page Container */
.iptv-page-container {
    max-width: 600px;
    margin: 0 auto;
}

.iptv-page-narrow {
    max-width: 480px;
}

/* ─── Free Premium App Section ─── */
#iptv-step-premium-app .iptv-card-header {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.05), rgba(99, 102, 241, 0.05));
}

.iptv-premium-app-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 12px 16px;
    border: 2px solid var(--iptv-border);
    border-radius: var(--iptv-radius-sm);
    transition: var(--iptv-transition);
}

.iptv-premium-app-toggle:hover {
    border-color: var(--iptv-success);
    background: rgba(16, 185, 129, 0.03);
}

.iptv-premium-app-toggle input:checked ~ span {
    color: var(--iptv-success);
}

#iptv-premium-app-details {
    margin-top: 16px;
    padding: 16px;
    background: var(--iptv-bg-subtle);
    border-radius: var(--iptv-radius-sm);
    border: 1px solid var(--iptv-border);
}

#iptv-premium-app-details .iptv-form-group {
    margin-bottom: 14px;
}

#iptv-premium-app-details .iptv-form-group:last-child {
    margin-bottom: 0;
}

/* ─── MAG MAC Address Field ─── */
#iptv-mag-mac-field input {
    font-family: 'Courier New', monospace;
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* ─── Custom Checkout Fields ─── */
#iptv-step-custom-fields .iptv-card-body {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.iptv-custom-checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 10px 14px;
    border: 1px solid var(--iptv-border);
    border-radius: var(--iptv-radius-sm);
    transition: var(--iptv-transition);
}

.iptv-custom-checkbox-label:hover {
    border-color: var(--iptv-primary);
    background: var(--iptv-primary-light);
}

.iptv-custom-checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--iptv-primary);
}
