/* Billing Page Styles */
.billing-page {
    padding: 24px;
    background: var(--secondary-color);
    grid-column: 2 / -1;
    grid-row: 2;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    height: calc(100vh - var(--header-height));
}

/* Mobile Responsive - Below 992px */
@media (max-width: 992px) {
    .billing-page {
        grid-column: 1 / -1;
    }
}

.billing-wrapper {
    max-width: 1400px;
    margin: 0 auto;
    overflow-x: hidden;
    width: 100%;
}

/* Page Header */
.billing-page .page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    padding: 24px;
    background: var(--white);
    border-radius: 16px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.billing-page .page-header-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.billing-page .page-title {
    display: flex;
    align-items: center;
    gap: 16px;
}

.billing-page .page-title > i {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    background: var(--indigo-gradient);
    color: var(--white);
    border-radius: 12px;
}

.billing-page .page-title h1 {
    font-size: 24px;
    font-weight: 700;
    color: var(--black);
    margin: 0;
}

.billing-page .page-subtitle {
    font-size: 14px;
    color: var(--text-secondary);
    margin: 4px 0 0;
}

/* Loading State */
.billing-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    gap: 16px;
    color: var(--text-secondary);
}

.billing-loading .spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* Billing Cards Row */
.billing-cards-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-bottom: 24px;
}

/* Billing Card Base */
.billing-card {
    background: var(--white);
    border-radius: 16px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.billing-card .card-header {
    padding: 20px;
    display: flex;
    align-items: flex-start;
    gap: 16px;
    border-bottom: 1px solid var(--border-color);
}

.billing-card .card-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
}

.billing-card .card-icon.plan {
    background: var(--indigo-50);
    color: var(--indigo-600);
}

.billing-card .card-icon.balance {
    background: var(--green-50);
    color: var(--green-600);
}

.billing-card .card-icon.cards {
    background: var(--purple-50);
    color: var(--purple-600);
}

.billing-card .card-title {
    flex: 1;
}

.billing-card .card-title h3 {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    margin: 0 0 4px;
}

.billing-card .card-title .plan-name {
    font-size: 20px;
    font-weight: 700;
    color: var(--black);
}

.billing-card .card-title .balance-amount {
    font-size: 28px;
    font-weight: 700;
    color: var(--green-600);
}

.billing-card .card-title .cards-count {
    font-size: 16px;
    font-weight: 600;
    color: var(--black);
}

.plan-badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    background: var(--green-100);
    color: var(--green-600);
}

.plan-badge.expired {
    background: var(--red-100);
    color: var(--red-600);
}

.plan-badge.expiring {
    background: var(--amber-100);
    color: var(--amber-600);
}

.billing-card .card-body {
    padding: 20px;
    flex: 1;
}

.billing-card .card-footer {
    padding: 16px 20px;
    border-top: 1px solid var(--border-color);
    background: var(--secondary-color);
}

/* Plan Details */
.plan-details {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 20px;
}

.plan-detail-item {
    display: flex;
    align-items: center;
    gap: 12px;
}

.plan-detail-item > i {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    background: var(--secondary-color);
    color: var(--text-secondary);
    border-radius: 8px;
}

.plan-detail-item > div {
    display: flex;
    flex-direction: column;
}

.plan-detail-item .detail-label {
    font-size: 12px;
    color: var(--text-secondary);
}

.plan-detail-item .detail-value {
    font-size: 14px;
    font-weight: 600;
    color: var(--black);
}

/* Plan Limits */
.plan-limits h4 {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    margin: 0 0 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.limits-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.limit-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 12px;
    background: var(--secondary-color);
    border-radius: 8px;
    text-align: center;
}

.limit-item i {
    font-size: 20px;
    color: var(--indigo-600);
    margin-bottom: 6px;
}

.limit-item .limit-value {
    font-size: 16px;
    font-weight: 700;
    color: var(--black);
}

.limit-item .limit-label {
    font-size: 11px;
    color: var(--text-secondary);
}

/* Balance Info */
.balance-info {
    padding: 16px;
    background: var(--secondary-color);
    border-radius: 8px;
    margin-bottom: 20px;
}

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

/* Pricing Info */
.pricing-info h4 {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    margin: 0 0 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.pricing-grid {
    display: flex;
    gap: 12px;
}

.pricing-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 12px;
    background: var(--secondary-color);
    border-radius: 8px;
    text-align: center;
}

.pricing-item .pricing-label {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.pricing-item .pricing-value {
    font-size: 18px;
    font-weight: 700;
    color: var(--black);
}

/* Saved Cards List */
.saved-cards-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 200px;
    overflow-y: auto;
}

.saved-card-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--secondary-color);
    border-radius: 8px;
    transition: all 0.2s ease;
}

.saved-card-item:hover {
    background: var(--border-color);
}

.saved-card-item .card-brand-icon {
    width: 40px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--white);
    border-radius: 4px;
    border: 1px solid var(--border-color);
}

.saved-card-item .card-brand-icon i {
    font-size: 20px;
    color: var(--text-secondary);
}

.saved-card-item .card-details {
    flex: 1;
}

.saved-card-item .card-mask {
    font-size: 14px;
    font-weight: 600;
    color: var(--black);
    font-family: monospace;
}

.saved-card-item .card-expiry {
    font-size: 12px;
    color: var(--text-secondary);
}

.saved-card-item .main-badge {
    padding: 4px 8px;
    background: var(--indigo-100);
    color: var(--indigo-600);
    font-size: 11px;
    font-weight: 600;
    border-radius: 4px;
}

.saved-card-item .card-delete-btn {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    opacity: 0;
    margin-left: auto;
}

.saved-card-item:hover .card-delete-btn {
    opacity: 1;
}

.saved-card-item .card-delete-btn:hover {
    background: var(--red-100);
    color: var(--red-500);
}

.saved-card-item .card-delete-btn i {
    font-size: 16px;
}

.no-cards {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    color: var(--text-secondary);
    text-align: center;
}

.no-cards i {
    font-size: 40px;
    margin-bottom: 12px;
    opacity: 0.5;
}

/* Payment History Section */
.payment-history-section {
    background: var(--white);
    border-radius: 16px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.payment-history-section .section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
}

.payment-history-section .section-header h2 {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 18px;
    font-weight: 600;
    color: var(--black);
    margin: 0;
}

.payment-history-section .section-header h2 i {
    font-size: 20px;
    color: var(--indigo-600);
}

.history-filters {
    display: flex;
    gap: 12px;
}

.filter-select {
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 14px;
    color: var(--black);
    background: var(--white);
    cursor: pointer;
    min-width: 150px;
}

.filter-select:focus {
    outline: none;
    border-color: var(--indigo-500);
}

/* Payment Summary */
.payment-summary {
    display: flex;
    gap: 24px;
    padding: 16px 20px;
    background: var(--secondary-color);
    border-bottom: 1px solid var(--border-color);
}

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

.summary-item .summary-label {
    font-size: 12px;
    color: var(--text-secondary);
}

.summary-item .summary-value {
    font-size: 18px;
    font-weight: 700;
    color: var(--black);
}

/* History Table */
.history-table-container {
    padding: 0;
    min-height: 200px;
}

.history-table {
    width: 100%;
    border-collapse: collapse;
}

.history-table th,
.history-table td {
    padding: 14px 20px;
    text-align: left;
    font-size: 14px;
}

.history-table th {
    font-weight: 600;
    color: var(--text-secondary);
    background: var(--secondary-color);
    border-bottom: 1px solid var(--border-color);
    white-space: nowrap;
}

.history-table td {
    color: var(--black);
    border-bottom: 1px solid var(--border-color);
}

.history-table tr:last-child td {
    border-bottom: none;
}

.history-table tr:hover td {
    background: var(--secondary-color);
}

/* Payment Type Badge */
.payment-type-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
}

.payment-type-badge.subscription {
    background: var(--indigo-100);
    color: var(--indigo-600);
}

.payment-type-badge.balance {
    background: var(--green-100);
    color: var(--green-600);
}

/* Payment Status Badge */
.payment-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
}

.payment-status-badge.paid {
    background: var(--green-100);
    color: var(--green-600);
}

.payment-status-badge.pending {
    background: var(--amber-100);
    color: var(--amber-600);
}

.payment-status-badge.failed {
    background: var(--red-100);
    color: var(--red-600);
}

/* Empty History */
.empty-history {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
    color: var(--text-secondary);
}

.empty-history i {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-history h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--black);
    margin: 0 0 8px;
}

.empty-history p {
    font-size: 14px;
    margin: 0;
}

/* Table Skeleton */
.table-skeleton {
    padding: 20px;
}

.skeleton-row {
    display: flex;
    gap: 16px;
    padding: 14px 0;
    border-bottom: 1px solid var(--border-color);
}

.skeleton-row:last-child {
    border-bottom: none;
}

.skeleton {
    background: linear-gradient(90deg, var(--secondary-color) 25%, var(--border-color) 50%, var(--secondary-color) 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: 4px;
}

.skeleton-cell {
    height: 20px;
    flex: 2;
}

.skeleton-cell-sm {
    height: 20px;
    flex: 1;
}

@keyframes skeleton-loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Pagination */
.pagination-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-top: 1px solid var(--border-color);
}

.pagination-info {
    font-size: 14px;
    color: var(--text-secondary);
}

.pagination-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.pagination-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-color);
    background: var(--white);
    color: var(--black);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.pagination-btn:hover:not(:disabled) {
    background: var(--secondary-color);
    border-color: var(--primary-color);
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination-pages {
    display: flex;
    gap: 4px;
}

.pagination-pages .page-btn {
    min-width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-color);
    background: var(--white);
    color: var(--black);
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s ease;
}

.pagination-pages .page-btn:hover {
    background: var(--secondary-color);
}

.pagination-pages .page-btn.active {
    background: var(--primary-color);
    color: var(--white);
    border-color: var(--primary-color);
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: var(--white);
    border-radius: 16px;
    width: 100%;
    max-height: 90vh;
    overflow: hidden;
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.modal-overlay.active .modal-content {
    transform: translateY(0);
}

.modal-content.modal-sm {
    max-width: 400px;
}

.modal-content.modal-md {
    max-width: 500px;
}

.modal-content.modal-lg {
    max-width: 900px;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h3 {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 18px;
    font-weight: 600;
    color: var(--black);
    margin: 0;
}

.modal-header h3 i {
    font-size: 20px;
    color: var(--indigo-600);
}

.modal-close {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: var(--secondary-color);
    color: var(--text-secondary);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.modal-close:hover {
    background: var(--border-color);
    color: var(--black);
}

.modal-body {
    padding: 20px;
    overflow-y: auto;
    max-height: calc(90vh - 140px);
}

.modal-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    padding: 16px 20px;
    border-top: 1px solid var(--border-color);
    background: var(--secondary-color);
}

/* Period Selector */
.period-selector {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
}

.period-option {
    flex: 1;
    cursor: pointer;
}

.period-option input {
    display: none;
}

.period-card {
    position: relative;
    padding: 20px;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    text-align: center;
    transition: all 0.2s ease;
}

.period-option input:checked + .period-card {
    border-color: var(--indigo-500);
    background: var(--indigo-50);
}

.period-card:hover {
    border-color: var(--indigo-300);
}

.period-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--secondary-color);
    border-radius: 12px;
}

.period-option input:checked + .period-card .period-icon {
    background: var(--indigo-100);
}

.period-icon i {
    font-size: 24px;
    color: var(--indigo-600);
}

.period-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.period-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--black);
}

.period-price {
    font-size: 20px;
    font-weight: 700;
    color: var(--indigo-600);
}

.period-badge {
    position: absolute;
    top: -10px;
    right: 10px;
    padding: 4px 8px;
    background: var(--green-500);
    color: var(--white);
    font-size: 11px;
    font-weight: 600;
    border-radius: 4px;
}

/* Payment Method Section */
.payment-method-section {
    margin-top: 20px;
}

.payment-method-section h4 {
    font-size: 14px;
    font-weight: 600;
    color: var(--black);
    margin: 0 0 12px;
}

.payment-methods {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 8px;
}

.payment-method-option {
    cursor: pointer;
}

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

.method-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    transition: all 0.2s ease;
}

.payment-method-option input:checked + .method-card {
    border-color: var(--indigo-500);
    background: var(--indigo-50);
}

.method-card:hover {
    border-color: var(--indigo-300);
}

.method-card i {
    font-size: 20px;
    color: var(--indigo-600);
}

.method-card span {
    font-size: 14px;
    font-weight: 500;
    color: var(--black);
}

.method-card .card-mask {
    font-family: monospace;
    font-weight: 600;
}

.method-card .card-info {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.method-card .card-expiry {
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 400;
}

/* Form Group */
.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 500;
    color: var(--black);
    margin-bottom: 8px;
}

.form-group label i {
    font-size: 16px;
    color: var(--text-secondary);
}

.form-control {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 14px;
    color: var(--black);
    background: var(--white);
    transition: border-color 0.2s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--indigo-500);
}

.amount-input-wrapper {
    position: relative;
}

.amount-input-wrapper .form-control {
    padding-right: 50px;
}

.amount-input-wrapper .amount-currency {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
}

/* Quick Amounts */
.quick-amounts {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.quick-amount-btn {
    flex: 1;
    padding: 10px;
    border: 1px solid var(--border-color);
    background: var(--white);
    color: var(--black);
    font-size: 13px;
    font-weight: 500;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.quick-amount-btn:hover {
    background: var(--secondary-color);
    border-color: var(--indigo-500);
}

.quick-amount-btn.active {
    background: var(--indigo-50);
    border-color: var(--indigo-500);
    color: var(--indigo-600);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-primary {
    background: var(--primary-color);
    color: var(--white);
}

.btn-primary:hover {
    opacity: 0.9;
}

.btn-secondary {
    background: var(--secondary-color);
    color: var(--black);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--border-color);
}

.btn-success {
    background: var(--green-500);
    color: var(--white);
}

.btn-success:hover {
    background: var(--green-600);
}

.btn-outline-primary {
    background: transparent;
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
}

.btn-outline-primary:hover {
    background: var(--primary-color);
    color: var(--white);
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Packages Loading */
.packages-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 300px;
    gap: 16px;
    color: var(--text-secondary);
}

.packages-loading .spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* Subscription Type Toggle */
.subscription-type-toggle {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 24px;
    padding: 4px;
    background: var(--secondary-color);
    border-radius: 12px;
}

.subscription-type-toggle .toggle-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.subscription-type-toggle .toggle-btn:hover {
    color: var(--black);
}

.subscription-type-toggle .toggle-btn.active {
    background: var(--white);
    color: var(--black);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.subscription-type-toggle .save-badge {
    padding: 2px 8px;
    background: var(--green-100);
    color: var(--green-600);
    font-size: 11px;
    font-weight: 600;
    border-radius: 4px;
}

/* Packages Grid */
.packages-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 24px;
}

/* Package Card */
.package-card {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 24px;
    background: var(--white);
    border: 2px solid var(--border-color);
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.package-card:hover:not(.current) {
    border-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.15);
}

.package-card.selected {
    border-color: var(--primary-color);
    background: var(--indigo-50);
}

.package-card.current {
    border-color: var(--border-color);
    cursor: default;
    opacity: 0.7;
}

.package-card .current-badge,
.package-card .popular-badge {
    position: absolute;
    top: -10px;
    right: 16px;
    padding: 4px 12px;
    font-size: 11px;
    font-weight: 600;
    border-radius: 20px;
}

.package-card .current-badge {
    background: var(--text-secondary);
    color: var(--white);
}

.package-card .popular-badge {
    background: var(--amber-500);
    color: var(--white);
}

.package-header {
    margin-bottom: 16px;
}

.package-header .package-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--black);
    margin: 0 0 12px;
}

.package-header .package-price {
    display: flex;
    align-items: baseline;
    gap: 4px;
}

.package-header .price-amount {
    font-size: 32px;
    font-weight: 700;
    color: var(--black);
}

.package-header .price-currency {
    font-size: 16px;
    font-weight: 600;
    color: var(--black);
}

.package-header .price-period {
    font-size: 14px;
    color: var(--text-secondary);
}

.package-body {
    flex: 1;
    margin-bottom: 16px;
}

.package-body .package-description {
    font-size: 13px;
    color: var(--text-secondary);
    margin: 0 0 16px;
    line-height: 1.5;
}

.package-features {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.package-features li {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: var(--black);
}

.package-features li i {
    font-size: 18px;
    color: var(--indigo-500);
}

.package-footer {
    margin-top: auto;
}

.package-footer .btn {
    width: 100%;
}

/* Selected Package Info */
.selected-package-info {
    padding: 16px;
    background: var(--indigo-50);
    border: 1px solid var(--indigo-200);
    border-radius: 12px;
    margin-bottom: 20px;
}

.selected-package-info .info-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 500;
    color: var(--indigo-600);
    margin-bottom: 8px;
}

.selected-package-info .info-header i {
    font-size: 16px;
}

.selected-package-info .package-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.selected-package-info .package-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--black);
}

.selected-package-info .package-price {
    font-size: 18px;
    font-weight: 700;
    color: var(--indigo-600);
}

/* Card Footer Buttons */
.card-footer {
    display: flex;
    gap: 12px;
}

.card-footer .btn {
    flex: 1;
}

/* Responsive */
@media (max-width: 1200px) {
    .billing-cards-row {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .billing-card.cards-card {
        grid-column: span 2;
    }
}

@media (max-width: 768px) {
    .billing-page {
        padding: 16px;
    }
    
    .billing-cards-row {
        grid-template-columns: 1fr;
    }
    
    .billing-card.cards-card {
        grid-column: span 1;
    }
    
    .billing-page .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
    
    .payment-history-section {
        overflow: hidden;
    }
    
    .payment-history-section .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .history-filters {
        width: 100%;
    }
    
    .filter-select {
        width: 100%;
    }
    
    .history-table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .history-table {
        min-width: 600px;
    }
    
    .pagination-container {
        flex-direction: column;
        gap: 12px;
    }
    
    .period-selector {
        flex-direction: column;
    }
    
    .quick-amounts {
        flex-wrap: wrap;
    }
    
    .quick-amount-btn {
        flex: 1 1 calc(50% - 4px);
    }
    
    .modal-content.modal-lg {
        max-width: calc(100% - 32px);
        max-height: calc(100vh - 32px);
    }
    
    .packages-grid {
        grid-template-columns: 1fr;
    }
    
    .package-card {
        padding: 16px;
    }
    
    .package-header .price-amount {
        font-size: 24px;
    }
}

/* ==========================================
   EXTRA FEATURES SECTION
   ========================================== */

.extra-features-section {
    background: var(--white);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.extra-features-section .section-header {
    margin-bottom: 20px;
}

.extra-features-section .section-header h2 {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 18px;
    font-weight: 600;
    color: var(--black);
    margin: 0 0 6px;
}

.extra-features-section .section-header h2 i {
    font-size: 22px;
    color: var(--indigo-600);
}

.extra-features-section .section-subtitle {
    font-size: 14px;
    color: var(--text-secondary);
    margin: 0;
}

/* Extra Features Loading Skeleton */
.extra-features-loading .skeleton-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 16px;
}

.extra-features-loading .skeleton-card {
    background: var(--gray-50);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.extra-features-loading .skeleton-icon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
}

.extra-features-loading .skeleton-title {
    width: 60%;
    height: 20px;
    border-radius: 4px;
}

.extra-features-loading .skeleton-text {
    width: 100%;
    height: 14px;
    border-radius: 4px;
}

.extra-features-loading .skeleton-badge {
    width: 80px;
    height: 24px;
    border-radius: 20px;
}

/* Empty Extra Features State */
.empty-extra-features {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 24px;
    text-align: center;
}

.empty-extra-features i {
    font-size: 48px;
    color: var(--gray-300);
    margin-bottom: 16px;
}

.empty-extra-features h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--black);
    margin: 0 0 8px;
}

.empty-extra-features p {
    font-size: 14px;
    color: var(--text-secondary);
    margin: 0;
}

/* Extra Features Grid */
.extra-features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 16px;
}

/* Extra Feature Card */
.extra-feature-card {
    background: var(--gray-50);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    transition: all 0.2s ease;
}

.extra-feature-card:hover {
    border-color: var(--indigo-200);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.extra-feature-card.wait-for-payment {
    border-color: var(--amber-300);
    background: var(--amber-50);
}

.extra-feature-card.active {
    border-color: var(--green-300);
    background: var(--green-50);
}

/* Feature Card Header */
.extra-feature-card .feature-header {
    display: flex;
    align-items: flex-start;
    gap: 14px;
}

.extra-feature-card .feature-icon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
    background: var(--indigo-100);
    color: var(--indigo-600);
}

.extra-feature-card.wait-for-payment .feature-icon {
    background: var(--amber-100);
    color: var(--amber-600);
}

.extra-feature-card.active .feature-icon {
    background: var(--green-100);
    color: var(--green-600);
}

.extra-feature-card .feature-info {
    flex: 1;
    min-width: 0;
}

.extra-feature-card .feature-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--black);
    margin: 0 0 4px;
    word-break: break-word;
}

.extra-feature-card .feature-type {
    font-size: 12px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 6px;
}

.extra-feature-card .feature-type i {
    font-size: 14px;
}

/* Feature Status Badge */
.feature-status-badge {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
}

.feature-status-badge.wait-for-payment {
    background: var(--amber-100);
    color: var(--amber-700);
}

.feature-status-badge.active {
    background: var(--green-100);
    color: var(--green-700);
}

.feature-status-badge.expired {
    background: var(--red-100);
    color: var(--red-700);
}

/* Feature Description */
.extra-feature-card .feature-description {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* Feature Meta Info */
.extra-feature-card .feature-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    font-size: 12px;
    color: var(--text-secondary);
    padding-top: 12px;
    border-top: 1px solid var(--border-color);
}

.extra-feature-card .meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.extra-feature-card .meta-item i {
    font-size: 14px;
    color: var(--gray-400);
}

/* Feature Card Actions */
.extra-feature-card .feature-actions {
    display: flex;
    gap: 8px;
    margin-top: auto;
}

.extra-feature-card .feature-actions .btn {
    flex: 1;
    padding: 10px 16px;
    font-size: 13px;
    font-weight: 500;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.2s ease;
    cursor: pointer;
    border: none;
}

.extra-feature-card .feature-actions .btn-pay {
    background: var(--amber-500);
    color: var(--white);
}

.extra-feature-card .feature-actions .btn-pay:hover {
    background: var(--amber-600);
}

.extra-feature-card .feature-actions .btn-remove {
    background: var(--white);
    color: var(--red-600);
    border: 1px solid var(--red-200);
}

.extra-feature-card .feature-actions .btn-remove:hover {
    background: var(--red-50);
    border-color: var(--red-300);
}

/* ==========================================
   EXTRA FEATURE PAYMENT MODAL
   ========================================== */

.feature-payment-info {
    margin-bottom: 20px;
}

.feature-payment-info .feature-name {
    font-size: 18px;
    font-weight: 600;
    color: var(--black);
    margin-bottom: 8px;
}

.feature-payment-info .feature-description {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 16px;
    line-height: 1.5;
}

.payment-calculation {
    background: var(--gray-50);
    border-radius: 10px;
    padding: 16px;
}

.calculation-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    font-size: 14px;
    color: var(--text-secondary);
}

.calculation-row:not(:last-child) {
    border-bottom: 1px dashed var(--border-color);
}

.calculation-row span:last-child {
    font-weight: 500;
    color: var(--black);
}

.calculation-row.total {
    margin-top: 8px;
    padding-top: 12px;
    border-top: 2px solid var(--border-color);
}

.calculation-row.total span:first-child {
    font-weight: 600;
    color: var(--black);
}

.calculation-row.total span:last-child {
    font-size: 18px;
    font-weight: 700;
    color: var(--green-600);
}

/* ==========================================
   CONFIRM REMOVE MODAL
   ========================================== */

.confirm-message {
    text-align: center;
    padding: 12px 0;
}

.confirm-message .warning-icon {
    font-size: 48px;
    color: var(--amber-500);
    margin-bottom: 16px;
}

.confirm-message p {
    font-size: 15px;
    color: var(--text-secondary);
    margin: 0 0 16px;
}

.feature-to-remove {
    font-size: 16px;
    font-weight: 600;
    color: var(--black);
    padding: 12px 16px;
    background: var(--gray-50);
    border-radius: 8px;
}

/* ==========================================
   ADD EXTRA FEATURE MODAL
   ========================================== */

.extra-features-section .section-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
}

.extra-features-section .section-header-left {
    flex: 1;
}

.extra-features-section .section-header-left h2 {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 18px;
    font-weight: 600;
    color: var(--black);
    margin: 0 0 6px;
}

.extra-features-section .section-header-left h2 i {
    font-size: 22px;
    color: var(--indigo-600);
}

.extra-features-section .section-header-right .btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    font-size: 13px;
    font-weight: 500;
    border-radius: 8px;
    cursor: pointer;
    border: none;
    background: var(--indigo-600);
    color: var(--white);
    transition: all 0.2s ease;
}

.extra-features-section .section-header-right .btn:hover {
    background: var(--indigo-700);
}

/* Available Features Loading */
.available-features-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    gap: 12px;
    color: var(--text-secondary);
}

.available-features-loading .spinner {
    width: 32px;
    height: 32px;
    border: 3px solid var(--border-color);
    border-top-color: var(--indigo-600);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* No Available Features */
.no-available-features {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    text-align: center;
}

.no-available-features i {
    font-size: 48px;
    color: var(--gray-300);
    margin-bottom: 12px;
}

.no-available-features p {
    font-size: 14px;
    color: var(--text-secondary);
    margin: 0;
}

/* Feature Type Tabs */
.feature-type-tabs {
    display: flex;
    gap: 8px;
    padding: 4px;
    background: var(--gray-100);
    border-radius: 10px;
    margin-bottom: 16px;
}

.feature-type-tab {
    flex: 1;
    padding: 10px 16px;
    border: none;
    background: transparent;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.feature-type-tab:hover {
    color: var(--black);
}

.feature-type-tab.active {
    background: var(--white);
    color: var(--indigo-600);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.feature-type-tab i {
    font-size: 16px;
}

/* Available Features List */
.available-features-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 300px;
    overflow-y: auto;
    padding-right: 4px;
}

.available-feature-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px;
    background: var(--gray-50);
    border: 2px solid var(--border-color);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.available-feature-item:hover {
    border-color: var(--indigo-200);
    background: var(--white);
}

.available-feature-item.selected {
    border-color: var(--indigo-500);
    background: var(--indigo-50);
}

.available-feature-item.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.available-feature-item .feature-radio {
    width: 20px;
    height: 20px;
    border: 2px solid var(--gray-300);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.available-feature-item.selected .feature-radio {
    border-color: var(--indigo-500);
    background: var(--indigo-500);
}

.available-feature-item.selected .feature-radio::after {
    content: '';
    width: 8px;
    height: 8px;
    background: var(--white);
    border-radius: 50%;
}

.available-feature-item .feature-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
    background: var(--indigo-100);
    color: var(--indigo-600);
}

.available-feature-item .feature-details {
    flex: 1;
    min-width: 0;
}

.available-feature-item .feature-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--black);
    margin-bottom: 4px;
}

.available-feature-item .feature-desc {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.available-feature-item .feature-price-tag {
    font-size: 14px;
    font-weight: 600;
    color: var(--indigo-600);
    white-space: nowrap;
}

.available-feature-item .already-owned {
    font-size: 11px;
    font-weight: 500;
    color: var(--green-600);
    background: var(--green-100);
    padding: 4px 8px;
    border-radius: 4px;
}

/* Selected Feature Info */
.selected-feature-info {
    margin-top: 16px;
    padding: 16px;
    background: var(--indigo-50);
    border: 1px solid var(--indigo-200);
    border-radius: 10px;
}

.selected-feature-info .info-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--indigo-600);
    margin-bottom: 12px;
}

.selected-feature-info .info-header i {
    font-size: 16px;
}

.selected-feature-details .feature-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--black);
    margin-bottom: 4px;
}

.selected-feature-details .feature-desc {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 12px;
    line-height: 1.5;
}

.selected-feature-info .feature-pricing {
    background: var(--white);
    border-radius: 8px;
    padding: 12px;
}

.selected-feature-info .pricing-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    font-size: 13px;
    color: var(--text-secondary);
}

.selected-feature-info .pricing-row:not(:last-child) {
    border-bottom: 1px dashed var(--border-color);
}

.selected-feature-info .pricing-row span:last-child {
    font-weight: 500;
    color: var(--black);
}

.selected-feature-info .pricing-row.total {
    margin-top: 6px;
    padding-top: 10px;
    border-top: 2px solid var(--indigo-200);
}

.selected-feature-info .pricing-row.total span:first-child {
    font-weight: 600;
    color: var(--black);
}

.selected-feature-info .pricing-row.total span:last-child {
    font-size: 16px;
    font-weight: 700;
    color: var(--green-600);
}

/* Responsive adjustments for extra features */
@media (max-width: 768px) {
    .extra-features-section .section-header {
        flex-direction: column;
        align-items: stretch;
    }
    
    .extra-features-section .section-header-right .btn {
        width: 100%;
        justify-content: center;
    }
    
    .extra-features-grid {
        grid-template-columns: 1fr;
    }
    
    .extra-features-loading .skeleton-cards {
        grid-template-columns: 1fr;
    }
    
    .extra-feature-card .feature-meta {
        flex-direction: column;
        gap: 8px;
    }
    
    .extra-feature-card .feature-actions {
        flex-direction: column;
    }
    
    .extra-feature-card .feature-actions .btn {
        width: 100%;
    }
    
    .feature-type-tabs {
        flex-wrap: wrap;
    }
    
    .feature-type-tab {
        flex: 1 1 calc(50% - 4px);
    }
    
    .available-feature-item {
        flex-wrap: wrap;
    }
    
    .available-feature-item .feature-price-tag {
        width: 100%;
        text-align: right;
        margin-top: 8px;
        padding-top: 8px;
        border-top: 1px solid var(--border-color);
    }
}
