/* static/css/billing.css */

.container-billing {
    max-width: 1000px !important;
}

.billing-summary-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 30px;
}

.billing-card {
    background: white;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
    border: 1px solid #eee;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.balance-card {
    background: linear-gradient(135deg, #1A3C5E 0%, #2E75B6 100%);
    color: white;
    border: none;
}

.card-label {
    font-size: 14px;
    opacity: 0.8;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.card-value {
    font-size: 42px;
    font-weight: 800;
    margin-bottom: 15px;
}

.card-value-small {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 10px;
    color: #1A3C5E;
}

.card-footer {
    font-size: 12px;
    opacity: 0.7;
}

/* Tabs */
.billing-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

.tab-btn {
    padding: 10px 20px;
    border: none;
    background: none;
    cursor: pointer;
    font-weight: 600;
    color: #666;
    border-radius: 8px;
    transition: all 0.2s;
}

.tab-btn:hover {
    background: #f5f5f5;
}

.tab-btn.active {
    background: #1A3C5E;
    color: white;
}

.billing-tab-content {
    display: none;
}

.billing-tab-content.active {
    display: block;
}

/* Tables */
.table-container {
    overflow-x: auto;
    background: white;
    border-radius: 12px;
    border: 1px solid #eee;
}

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

.data-table th {
    background: #f8fafc;
    text-align: left;
    padding: 12px 16px;
    font-size: 13px;
    color: #64748b;
    border-bottom: 1px solid #eee;
}

.data-table td {
    padding: 14px 16px;
    font-size: 14px;
    border-bottom: 1px solid #f1f5f9;
}

.badge {
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
}

.badge-success { background: #dcfce7; color: #166534; }
.badge-pending { background: #fef9c3; color: #854d0e; }

.btn-xs {
    padding: 4px 10px;
    font-size: 11px;
}

/* Buckets */
.buckets-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 15px;
}

.bucket-card {
    background: #f8fafc;
    border-radius: 12px;
    padding: 15px;
    border: 1px solid #e2e8f0;
}

.bucket-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}

.bucket-type {
    font-weight: 700;
    font-size: 12px;
    color: #1A3C5E;
    text-transform: uppercase;
}

.bucket-expiry {
    font-size: 11px;
    color: #64748b;
}

.progress-bar-bg {
    height: 8px;
    background: #e2e8f0;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 8px;
}

.progress-bar-fill {
    height: 100%;
    background: #1D9E75;
}

.bucket-stats {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: #475569;
}

/* Modals */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.7);
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.modal-content {
    max-height: 90vh;
    overflow-y: auto;
}

/* Stripe Modal */
#stripe-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 10001;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
}

.stripe-modal-content {
    background: white;
    padding: 32px;
    border-radius: 16px;
    width: 100%;
    max-width: 440px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

#card-element {
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: #f9f9f9;
    margin-bottom: 20px;
}

#card-errors {
    color: #ff4444;
    font-size: 13px;
    margin-bottom: 12px;
}

.stripe-modal-header {
    margin-bottom: 24px;
}

.stripe-modal-title {
    font-weight: 800;
    font-size: 20px;
    margin-bottom: 4px;
    color: #1A3C5E;
}

.stripe-modal-sub {
    font-size: 14px;
    color: #666;
}

.stripe-btn-group {
    display: flex;
    gap: 12px;
}
