/* ========== استایل‌های جدید مدیریت سرویس ========== */

/* دکمه خرید ترافیک و خرید عمده */
.extra-traffic-btn, .bulk-purchase-btn {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}
.bulk-purchase-btn {
    background: linear-gradient(135deg, #8b5cf6, #6d28d9);
}

/* پیش‌فاکتور */
.invoice-preview {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.08), rgba(16, 185, 129, 0.02));
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: var(--r-lg);
    padding: 16px;
    margin: 16px 0;
}
.invoice-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: var(--accent-2);
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--glass-border);
}
.invoice-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    font-size: 13px;
    color: var(--text-2);
}
.invoice-row.discount-row {
    color: #ef4444;
    border-bottom: 1px dashed rgba(239, 68, 68, 0.3);
    padding-bottom: 12px;
    margin-bottom: 8px;
}
.invoice-row.total-row {
    font-size: 16px;
    font-weight: 700;
    color: var(--accent-2);
    padding-top: 8px;
}
.discount-amount {
    color: #ef4444;
    font-weight: 500;
}

/* استایل خرید عمده */
.bulk-section {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.08), rgba(139, 92, 246, 0.02));
    border-radius: var(--r-lg);
    padding: 20px;
    margin-bottom: 24px;
    border: 1px solid rgba(139, 92, 246, 0.2);
}
.bulk-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(139, 92, 246, 0.2);
}
.bulk-header svg {
    color: #8b5cf6;
}
.bulk-header h4 {
    color: #8b5cf6;
    margin: 0;
    font-size: 16px;
}
.quantity-control {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 12px;
}
.quantity-btn {
    background: var(--glass-inset);
    border: 1px solid var(--glass-border);
    width: 36px;
    height: 36px;
    border-radius: 12px;
    cursor: pointer;
    font-size: 18px;
    font-weight: bold;
    transition: var(--t);
}
.quantity-btn:hover {
    background: var(--glass-bg-hover);
    transform: scale(1.05);
}
.quantity-input {
    width: 80px;
    text-align: center;
    font-size: 16px;
    font-weight: bold;
}
.bulk-summary {
    background: var(--glass-inset);
    border-radius: var(--r-md);
    padding: 16px;
    margin: 16px 0;
}
.toggle-mode-btn {
    background: transparent;
    border: 1px solid var(--glass-border);
    border-radius: var(--r-pill);
    padding: 8px 16px;
    font-size: 12px;
    cursor: pointer;
    transition: var(--t);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
}
.toggle-mode-btn.active {
    background: var(--accent);
    border-color: var(--accent);
    color: white;
}
.mode-switch {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
    justify-content: center;
}
.mode-btn {
    background: var(--glass-inset);
    border: 1px solid var(--glass-border);
    border-radius: var(--r-pill);
    padding: 10px 24px;
    cursor: pointer;
    transition: var(--t);
    font-weight: 500;
}
.mode-btn.active {
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    border-color: var(--accent);
    color: white;
}
.bulk-preview {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.08), rgba(139, 92, 246, 0.02));
    border-radius: var(--r-lg);
    padding: 16px;
    margin-top: 16px;
}

/* وضعیت سرویس */
.badge-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: var(--r-pill);
    font-size: 11px;
    font-weight: 500;
}
.badge-status-active {
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.35);
}
.badge-status-expired {
    background: rgba(244, 63, 94, 0.15);
    color: #fb7185;
    border: 1px solid rgba(244, 63, 94, 0.35);
}

/* دکمه‌های مودال */
.modal-action-buttons {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    padding-top: 20px;
    margin-top: 16px;
    border-top: 1px solid var(--glass-border);
}
.btn-modal-update {
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    border: none;
    border-radius: var(--r-pill);
    padding: 10px 24px;
    color: white;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--t-smooth);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.btn-modal-danger {
    background: rgba(244, 63, 94, 0.12);
    border: 1px solid rgba(244, 63, 94, 0.3);
    border-radius: var(--r-pill);
    padding: 10px 24px;
    color: #fb7185;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--t);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

/* بخش ترافیک اضافه */
.extra-traffic-section {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.08), rgba(16, 185, 129, 0.02));
    border-radius: var(--r-lg);
    padding: 16px;
    margin-top: 12px;
}
.traffic-notice {
    background: rgba(59, 130, 246, 0.08);
    border-right: 3px solid #3b82f6;
    border-radius: var(--r-md);
    padding: 14px 16px;
    margin-bottom: 20px;
}
.traffic-notice-title {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #3b82f6;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 10px;
}
.traffic-notice-list {
    margin: 0;
    padding-right: 20px;
    color: var(--text-2);
    font-size: 12px;
    line-height: 1.8;
}

/* دکمه‌های عملیاتی */
.action-btns-group {
    display: flex;
    gap: 8px;
    justify-content: center;
    flex-wrap: wrap;
}
.action-btn {
    background: var(--glass-inset);
    border: 1px solid var(--glass-border);
    border-radius: var(--r-sm);
    padding: 6px 12px;
    font-size: 11px;
    cursor: pointer;
    color: var(--text-2);
    transition: var(--t);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}
.action-btn-primary {
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    border: none;
    color: white;
}
.sub-link-cell {
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.empty-state-box {
    text-align: center;
    padding: 48px 24px;
    color: var(--text-3);
    background: var(--glass-inset);
    border-radius: var(--r-xl);
}

/* کپی باکس و کانفیگ */
.copy-box {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(0, 0, 0, 0.25);
    border-radius: var(--r-sm);
    padding: 8px 12px;
    margin-top: 6px;
}
.copy-btn-sm {
    background: var(--glass-inset);
    border: 1px solid var(--glass-border);
    border-radius: var(--r-sm);
    padding: 6px 12px;
    font-size: 11px;
    cursor: pointer;
    color: var(--text-2);
    transition: var(--t);
    display: inline-flex;
    align-items: center;
    gap: 5px;
}
.configs-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 8px;
}
.config-item {
    background: rgba(0, 0, 0, 0.25);
    border-radius: var(--r-sm);
    padding: 10px 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

/* نوار پیشرفت مصرف */
.usage-wrapper {
    margin: 12px 0;
}
.usage-bar-bg {
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--r-pill);
    height: 8px;
    overflow: hidden;
}
.usage-bar-fill {
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
    height: 100%;
    border-radius: var(--r-pill);
    transition: width 0.3s ease;
}
.usage-stats {
    display: flex;
    justify-content: space-between;
    margin-top: 8px;
    font-size: 11px;
    color: var(--text-3);
}

/* هدر ادمین */
.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 24px;
    padding: 16px 24px;
    background: var(--glass-bg);
    border-radius: var(--r-xl);
    backdrop-filter: var(--blur);
}
.admin-info {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}
.admin-welcome {
    color: var(--text-2);
    font-size: 13px;
}
.logout-btn {
    background: var(--glass-inset);
    border: 1px solid var(--glass-border);
    border-radius: var(--r-pill);
    padding: 8px 20px;
    color: var(--text-1);
    text-decoration: none;
    font-size: 13px;
    transition: var(--t);
}