.bill-pro-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 0.25rem 0.55rem;
    border-radius: 9999px;
}
.bill-pro-badge--pro {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #fff;
}
.bill-pro-badge--free {
    background: rgba(255, 255, 255, 0.12);
    color: #c7d2fe;
    border: 1px solid rgba(255, 255, 255, 0.15);
}
.bill-pro-badge--teacher {
    background: linear-gradient(135deg, #7c3aed, #6366f1);
    color: #fff;
}
.bill-upgrade-hero {
    background: linear-gradient(135deg, #312e81 0%, #4f46e5 45%, #7c3aed 100%);
    border-radius: 1.5rem;
    padding: 1.5rem;
    color: #fff;
    position: relative;
    overflow: hidden;
}
.bill-upgrade-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at top right, rgba(255,255,255,0.15), transparent 55%);
    pointer-events: none;
}
.bill-plan-grid {
    display: grid;
    grid-template-columns: repeat(1, minmax(0, 1fr));
    gap: 1rem;
}
@media (min-width: 768px) {
    .bill-plan-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.bill-plan-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 1.25rem;
    padding: 1.25rem;
    color: #1e293b;
}
.bill-plan-card--free {
    border-color: #6ee7b7;
    background: linear-gradient(180deg, #ecfdf5 0%, #ffffff 45%);
}
.bill-plan-card--pro {
    border-color: #c4b5fd;
    background: linear-gradient(180deg, #f5f3ff 0%, #ffffff 50%);
    box-shadow: 0 10px 30px rgba(79, 70, 229, 0.15);
}
.bill-plan-tag {
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin: 0;
}
.bill-plan-tag--free {
    background: linear-gradient(135deg, #059669, #10b981);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.bill-plan-tag--pro {
    background: linear-gradient(135deg, #6d28d9, #9333ea, #c026d3);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    font-size: 11px;
    line-height: 1.4;
}
.bill-plan-tag--pro .line-through {
    -webkit-text-fill-color: #94a3b8;
    color: #94a3b8;
    opacity: 0.85;
}
.bill-plan-heading {
    font-size: 1.25rem;
    font-weight: 800;
    margin: 0.35rem 0 0;
    line-height: 1.3;
}
.bill-plan-heading--free {
    color: #065f46;
}
.bill-plan-heading--pro {
    background: linear-gradient(135deg, #5b21b6, #7c3aed, #a855f7);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.bill-plan-list {
    margin-top: 0.85rem;
    padding: 0;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: #334155 !important;
    font-weight: 500;
}
.bill-plan-list li {
    color: #334155 !important;
}
.bill-pay-section {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 1.25rem;
    padding: 1.25rem 1.5rem;
    box-shadow: 0 4px 20px rgba(15, 23, 42, 0.06);
    color: #1e293b;
}
.bill-pay-title {
    font-weight: 800;
    font-size: 1rem;
    color: #0f172a !important;
    margin: 0;
}
.bill-pay-note {
    font-size: 0.875rem;
    color: #64748b !important;
    margin: 0.35rem 0 0;
}
.bill-pay-method {
    border: 2px solid #cbd5e1;
    border-radius: 1rem;
    padding: 1rem;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
    background: #f8fafc;
    text-align: left;
    color: #0f172a;
}
.bill-pay-method:hover {
    border-color: #818cf8;
    background: #eef2ff;
}
.bill-pay-method--active {
    border-color: #6366f1;
    background: linear-gradient(135deg, #eef2ff, #e0e7ff);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}
.bill-pay-method-title {
    font-weight: 800;
    font-size: 0.9375rem;
    color: #0f172a !important;
    margin: 0;
}
.bill-pay-method-sub {
    font-size: 0.75rem;
    color: #64748b !important;
    margin: 0.35rem 0 0;
}
.bill-copy-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    padding: 0.65rem 0.85rem;
    font-size: 0.8125rem;
    color: #334155;
}
.bill-copy-row code {
    font-family: ui-monospace, monospace;
    font-weight: 700;
    color: #312e81;
    word-break: break-all;
    user-select: all;
    -webkit-user-select: all;
}
.bill-copy-btn {
    font-size: 0.75rem;
    font-weight: 800;
    color: #4f46e5;
    background: #eef2ff;
    border: 1px solid #c7d2fe;
    border-radius: 0.75rem;
    padding: 0.5rem 0.85rem;
    min-height: 44px;
    min-width: 44px;
    cursor: pointer;
    touch-action: manipulation;
}
.bill-copy-btn:active {
    background: #e0e7ff;
}
#bill-transfer-code {
    user-select: all;
    -webkit-user-select: all;
}
.bill-status-pending { color: #b45309; background: #fef3c7; }
.bill-status-approved { color: #047857; background: #d1fae5; }
.bill-status-rejected { color: #b91c1c; background: #fee2e2; }
.bill-teacher-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}
.bill-teacher-tab {
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    border: 1px solid #e2e8f0;
    background: #fff;
    color: #475569;
    transition: all 0.15s;
}
.bill-teacher-tab--active {
    background: #7c3aed;
    border-color: #7c3aed;
    color: #fff;
}
.bill-pending-dot {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.1rem;
    height: 1.1rem;
    padding: 0 0.25rem;
    border-radius: 9999px;
    background: #ef4444;
    color: #fff;
    font-size: 0.625rem;
    font-weight: 800;
}

/* Override dark-site global text on upgrade tab */
#tab-upgrade-root,
#tab-upgrade-root .bill-plan-card,
#tab-upgrade-root .bill-pay-section {
    color: #1e293b;
}
#tab-upgrade-root label {
    color: #475569 !important;
}
#tab-upgrade-root input {
    color: #0f172a !important;
    background: #f8fafc !important;
}
.bill-duration-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.65rem;
}
@media (max-width: 640px) {
    .bill-duration-grid { grid-template-columns: 1fr; }
}
.bill-duration-opt {
    position: relative;
    border: 2px solid #cbd5e1;
    border-radius: 1rem;
    padding: 0.85rem 0.65rem;
    background: #f8fafc;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}
.bill-duration-opt:hover {
    border-color: #818cf8;
    background: #eef2ff;
}
.bill-duration-opt--active {
    border-color: #6366f1;
    background: linear-gradient(135deg, #eef2ff, #e0e7ff);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}
.bill-duration-badge {
    position: absolute;
    top: -0.45rem;
    right: 0.35rem;
    font-size: 9px;
    font-weight: 800;
    text-transform: uppercase;
    background: #f59e0b;
    color: #fff;
    padding: 0.15rem 0.4rem;
    border-radius: 9999px;
}
.bill-duration-label {
    font-size: 0.8125rem;
    font-weight: 800;
    color: #334155;
    margin: 0;
}
.bill-duration-price {
    font-size: 1rem;
    font-weight: 800;
    color: #4f46e5;
    margin: 0.25rem 0 0;
}
.bill-duration-save {
    font-size: 0.625rem;
    font-weight: 700;
    color: #059669;
    margin: 0.25rem 0 0;
}
.bill-qr-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.75rem;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 1rem;
    margin-bottom: 0.5rem;
}
.bill-qr-wrap--hero {
    padding: 1.25rem 1rem 1rem;
    border: 2px solid #818cf8;
    background: linear-gradient(180deg, #eef2ff 0%, #ffffff 55%);
    box-shadow: 0 8px 32px rgba(79, 70, 229, 0.12);
}
.bill-qr-hero-label {
    font-size: 0.8125rem;
    font-weight: 800;
    color: #4338ca;
    margin: 0 0 0.5rem;
    text-align: center;
}
.bill-qr-wrap--missing {
    display: none;
}
.bill-qr-caption {
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #64748b;
    margin: 0 0 0.35rem;
}
.bill-qr-meta {
    font-size: 0.8125rem;
    font-weight: 700;
    color: #312e81;
    margin: 0 0 0.5rem;
    text-align: center;
}
.bill-qr-meta code {
    font-family: ui-monospace, monospace;
    font-size: 0.75rem;
    background: #eef2ff;
    padding: 0.1rem 0.35rem;
    border-radius: 0.35rem;
}
.bill-qr-hint {
    font-size: 0.6875rem;
    color: #64748b;
    margin: 0.5rem 0 0;
    text-align: center;
    line-height: 1.35;
}
.bill-qr-img {
    max-width: 280px;
    width: 100%;
    height: auto;
    border-radius: 0.75rem;
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.08);
}
.bill-pay-lead {
    font-size: 0.875rem;
    color: #475569 !important;
    margin: 0.5rem 0 0;
    line-height: 1.5;
}
.bill-pay-steps {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 0.5rem;
}
.bill-pay-step {
    border: 1px solid #e2e8f0;
    border-radius: 1rem;
    padding: 1rem 1.1rem;
    background: #fafafa;
}
.bill-pay-step-head {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
}
.bill-pay-step-num {
    flex-shrink: 0;
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 9999px;
    background: #4f46e5;
    color: #fff;
    font-size: 0.8125rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
}
.bill-pay-step-title {
    font-size: 0.9375rem;
    font-weight: 800;
    color: #0f172a !important;
    margin: 0;
}
.bill-pay-step-desc {
    font-size: 0.8125rem;
    color: #64748b !important;
    margin: 0.25rem 0 0;
    line-height: 1.45;
}
.bill-pay-step-body {
    margin-top: 0.85rem;
}
.bill-inline-code {
    font-family: ui-monospace, monospace;
    font-size: 0.75rem;
    font-weight: 700;
    background: #eef2ff;
    padding: 0.1rem 0.35rem;
    border-radius: 0.35rem;
    color: #312e81;
}
.bill-copy-inline {
    font-size: 0.6875rem;
    font-weight: 800;
    color: #4f46e5;
    background: #eef2ff;
    border: 1px solid #c7d2fe;
    border-radius: 0.5rem;
    padding: 0.15rem 0.5rem;
    margin-left: 0.25rem;
    cursor: pointer;
    vertical-align: middle;
}
.bill-wait-panel {
    display: flex;
    gap: 0.85rem;
    align-items: flex-start;
    border-radius: 0.85rem;
    padding: 0.85rem 1rem;
}
.bill-wait-panel--pending {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
}
.bill-wait-panel--success {
    background: #ecfdf5;
    border: 1px solid #6ee7b7;
}
.bill-wait-title {
    font-size: 0.875rem;
    font-weight: 800;
    color: #0f172a;
    margin: 0;
}
.bill-wait-desc {
    font-size: 0.8125rem;
    color: #475569;
    margin: 0.25rem 0 0;
    line-height: 1.45;
}
.bill-wait-spinner {
    flex-shrink: 0;
    width: 1.25rem;
    height: 1.25rem;
    margin-top: 0.15rem;
    border: 2px solid #93c5fd;
    border-top-color: #2563eb;
    border-radius: 9999px;
    animation: bill-spin 0.8s linear infinite;
}
@keyframes bill-spin {
    to { transform: rotate(360deg); }
}
.bill-pay-fallback {
    margin-top: 1rem;
    border: 1px dashed #cbd5e1;
    border-radius: 1rem;
    padding: 0.65rem 1rem;
    background: #f8fafc;
}
.bill-pay-fallback summary {
    font-size: 0.8125rem;
    font-weight: 700;
    color: #64748b;
    cursor: pointer;
    list-style: none;
}
.bill-pay-fallback summary::-webkit-details-marker {
    display: none;
}
.bill-pay-fallback-body {
    margin-top: 0.85rem;
    padding-top: 0.85rem;
    border-top: 1px solid #e2e8f0;
}
.bill-confirm-check {
    display: flex;
    gap: 0.65rem;
    align-items: flex-start;
    font-size: 0.8125rem;
    color: #334155;
    cursor: pointer;
    line-height: 1.45;
}
.bill-confirm-check input {
    margin-top: 0.2rem;
    flex-shrink: 0;
    width: 1rem;
    height: 1rem;
    accent-color: #4f46e5;
}
.bill-fallback-btn {
    background: #fff;
    border: 2px solid #cbd5e1;
    color: #475569;
    font-size: 0.8125rem;
    font-weight: 700;
    padding: 0.65rem 1rem;
    border-radius: 0.85rem;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
}
.bill-fallback-btn:hover:not(:disabled) {
    border-color: #818cf8;
    background: #f8fafc;
    color: #312e81;
}
.bill-fallback-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}
.bill-profile-gate {
    background: linear-gradient(135deg, #eef2ff, #e0e7ff);
    border: 1px solid #c7d2fe;
    border-radius: 1rem;
    padding: 1rem 1.15rem;
}
