@font-face {
    font-family: "Vazir";
    src: url("font/font.ttf") format("truetype");
    font-display: swap;
}

@font-face {
    font-family: "BrandFont";
    src: url("font/font2.ttf") format("truetype");
    font-display: swap;
}

*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Vazir", "Tahoma", sans-serif;
}

:root {
    /* Light Theme Only - Fixed Glass Style */
    --bg-primary: #d4dde8;
    --bg-secondary: rgba(255, 255, 255, 0.90);
    --glass-bg: rgba(255, 255, 255, 0.58);
    --glass-bg-hover: rgba(255, 255, 255, 0.78);
    --glass-border: rgba(255, 255, 255, 0.85);
    --glass-border-mid: rgba(255, 255, 255, 0.94);
    --glass-border-hi: rgba(255, 255, 255, 1.00);
    --glass-border-top: rgba(255, 255, 255, 1.00);
    --glass-inset: rgba(255, 255, 255, 0.42);
    --shadow-glass: 0 12px 48px rgba(80, 60, 160, 0.16), 0 3px 12px rgba(80, 60, 160, 0.10), inset 0 1.2px 0 rgba(255,255,255,0.98), inset 0 -1px 0 rgba(80,60,160,0.08);
    --shadow-glass-hover: 0 20px 64px rgba(80, 60, 160, 0.26), 0 6px 16px rgba(80, 60, 160, 0.14), inset 0 1.2px 0 rgba(255,255,255,1.00), inset 0 -1px 0 rgba(80,60,160,0.10);
    --shadow-glass-lg: 0 32px 80px rgba(80, 60, 160, 0.22), 0 10px 28px rgba(80, 60, 160, 0.12), inset 0 1.2px 0 rgba(255,255,255,0.98);
    --accent: #059669;
    --accent-2: #10b981;
    --accent-3: #34d399;
    --emerald: #059669;
    --rose: #e11d48;
    --glow-accent: rgba(5, 150, 105, 0.28);
    --glow-strong: rgba(5, 150, 105, 0.48);
    --blob-1: rgba(5, 150, 105, 0.25);
    --blob-2: rgba(14, 165, 233, 0.28);
    --blob-3: rgba(244, 63, 94, 0.20);
    --text-1: #18182e;
    --text-2: #50505e;
    --text-3: #8e8e9e;
    --r-sm: 12px;
    --r-md: 18px;
    --r-lg: 24px;
    --r-xl: 32px;
    --r-pill: 9999px;
    --blur: blur(32px) saturate(210%);
    --blur-lg: blur(48px) saturate(240%);
    --blur-sm: blur(16px) saturate(160%);
    --ease: cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --ease-smooth: cubic-bezier(0.34, 1.56, 0.64, 1);
    --t: all 0.28s var(--ease);
    --t-smooth: all 0.38s var(--ease-smooth);
}

body {
    background: linear-gradient(135deg, #cdd5e8 0%, #d4f0e8 35%, #d0e0f5 65%, #d8e2eb 100%);
    background-attachment: fixed;
    min-height: 100vh;
    color: var(--text-1);
    transition: background 0.4s ease;
    position: relative;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    top: -30%;
    left: -20%;
    width: 70%;
    height: 70%;
    background: radial-gradient(circle, var(--blob-1) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
    animation: blobDrift1 18s ease-in-out infinite alternate;
}

body::after {
    content: '';
    position: fixed;
    bottom: -20%;
    right: -15%;
    width: 60%;
    height: 60%;
    background: radial-gradient(circle, var(--blob-2) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
    animation: blobDrift2 22s ease-in-out infinite alternate;
}

@keyframes blobDrift1 {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(40px, 30px) scale(1.08); }
}

@keyframes blobDrift2 {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(-30px, -40px) scale(1.06); }
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 24px;
    position: relative;
    z-index: 1;
}

/* ========== صفحه لاگین ========== */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.login-card {
    background: var(--glass-bg);
    backdrop-filter: var(--blur-lg);
    border: 1.2px solid var(--glass-border-mid);
    border-top-color: var(--glass-border-top);
    border-left-color: var(--glass-border-hi);
    border-radius: var(--r-xl);
    padding: 48px 44px;
    width: 100%;
    max-width: 460px;
    text-align: center;
    box-shadow: var(--shadow-glass-lg);
    position: relative;
    overflow: hidden;
}

.login-card::before {
    content: '';
    position: absolute;
    top: 0; left: 8%; right: 8%;
    height: 1.5px;
    background: linear-gradient(90deg, transparent, var(--glass-border-top) 25%, var(--glass-border-top) 75%, transparent);
    box-shadow: 0 2px 8px var(--glow-accent);
}

.login-logo {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    margin-bottom: 22px;
    border: 2.5px solid var(--accent);
    box-shadow: 0 0 0 6px rgba(16, 185, 129, 0.15), 0 0 36px var(--glow-strong);
    animation: logoGlow 3s ease-in-out infinite;
}

@keyframes logoGlow {
    0%, 100% { box-shadow: 0 0 0 6px rgba(16, 185, 129, 0.15), 0 0 36px var(--glow-strong); }
    50% { box-shadow: 0 0 0 8px rgba(16, 185, 129, 0.25), 0 0 48px var(--glow-strong); }
}

.login-title {
    font-family: "BrandFont", "Vazir", sans-serif;
    font-size: 38px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--accent-3), var(--accent-2), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 8px;
}

.login-subtitle {
    color: var(--text-2);
    font-size: 14px;
    margin-bottom: 36px;
}

.login-input {
    width: 100%;
    padding: 14px 20px;
    background: var(--glass-inset);
    border: 1.2px solid var(--glass-border);
    border-top-color: var(--glass-border-mid);
    border-radius: var(--r-pill);
    color: var(--text-1);
    font-size: 14px;
    margin-bottom: 16px;
    transition: var(--t);
    backdrop-filter: var(--blur-sm);
}

.login-input:focus {
    outline: none;
    border-color: var(--accent);
    border-top-color: var(--accent-2);
    box-shadow: 0 0 0 4px var(--glow-accent);
    background: var(--glass-bg);
}

.login-btn {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    border: none;
    border-radius: var(--r-pill);
    color: white;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    transition: var(--t-smooth);
    box-shadow: 0 8px 28px var(--glow-accent);
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 40px var(--glow-strong);
}

/* ========== هدر ========== */
.admin-header {
    background: var(--glass-bg);
    backdrop-filter: var(--blur);
    border: 1.2px solid var(--glass-border);
    border-top-color: var(--glass-border-top);
    border-radius: var(--r-xl);
    padding: 16px 32px;
    margin-bottom: 28px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    box-shadow: var(--shadow-glass);
}

.brand {
    display: flex;
    align-items: center;
    gap: 14px;
    background: var(--glass-inset);
    backdrop-filter: var(--blur-sm);
    padding: 8px 24px;
    border-radius: var(--r-pill);
    border: 1.2px solid var(--glass-border);
}

.brand-logo {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--glass-border-hi);
}

.brand-name {
    font-family: "BrandFont", "Vazir", sans-serif;
    font-size: 26px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--accent-3), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.admin-info {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.admin-welcome {
    color: var(--text-2);
    font-size: 13px;
}

.logout-btn {
    background: var(--glass-inset);
    backdrop-filter: var(--blur-sm);
    border: 1.2px solid var(--glass-border);
    border-radius: var(--r-pill);
    padding: 0 22px;
    height: 44px;
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: var(--text-1);
    font-size: 13px;
    transition: var(--t);
}

.logout-btn:hover {
    background: var(--glass-bg-hover);
    transform: translateY(-2px);
}

/* ========== هشدارها ========== */
.warning-bar {
    background: rgba(244, 63, 94, 0.10);
    backdrop-filter: var(--blur-sm);
    border: 1.2px solid rgba(244, 63, 94, 0.28);
    border-radius: var(--r-md);
    padding: 14px 18px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.warning-text {
    color: #fb7185;
    font-size: 13px;
}

/* ========== آمار ========== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 16px;
    margin-bottom: 32px;
}

.stat-card {
    background: var(--glass-bg);
    backdrop-filter: var(--blur);
    border: 1.2px solid var(--glass-border);
    border-top-color: var(--glass-border-top);
    border-radius: var(--r-lg);
    padding: 22px 24px;
    transition: var(--t-smooth);
    cursor: pointer;
    text-decoration: none;
    display: block;
    box-shadow: var(--shadow-glass);
}

.stat-card:hover {
    transform: translateY(-6px);
    background: var(--glass-bg-hover);
    box-shadow: var(--shadow-glass-hover);
}

.stat-value {
    font-size: 34px;
    font-weight: 700;
    color: var(--text-1);
    margin-top: 14px;
    font-family: "BrandFont", sans-serif;
}

.stat-label {
    color: var(--text-3);
    font-size: 12px;
}

/* ========== دکمه‌های سریع ========== */
.quick-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 16px;
    margin-top: 16px;
}

.quick-btn {
    background: var(--glass-bg);
    backdrop-filter: var(--blur);
    border: 1.2px solid var(--glass-border);
    border-radius: var(--r-lg);
    padding: 20px;
    text-decoration: none;
    color: var(--text-1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    font-weight: 600;
    transition: var(--t-smooth);
    box-shadow: var(--shadow-glass);
}

.quick-btn:hover {
    transform: translateY(-4px);
    background: var(--glass-bg-hover);
    border-color: var(--accent);
    box-shadow: var(--shadow-glass-hover);
}

/* ========== کارت محتوا ========== */
.content-card {
    background: var(--glass-bg);
    backdrop-filter: var(--blur);
    border: 1.2px solid var(--glass-border);
    border-top-color: var(--glass-border-top);
    border-radius: var(--r-xl);
    padding: 28px;
    margin-bottom: 24px;
    box-shadow: var(--shadow-glass);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 16px;
}

.section-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-1);
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: "BrandFont", sans-serif;
}

/* ========== بخش ساخت سرویس ========== */
.create-service-section {
    background: var(--glass-bg);
    backdrop-filter: var(--blur);
    border: 1.2px solid var(--glass-border);
    border-top-color: var(--glass-border-top);
    border-radius: var(--r-xl);
    padding: 28px;
    margin-bottom: 24px;
    box-shadow: var(--shadow-glass);
}

.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    margin-bottom: 10px;
    color: var(--text-2);
    font-size: 13px;
    font-weight: 500;
}

.form-group input, .form-group select {
    width: 100%;
    padding: 12px 16px;
    background: var(--glass-inset);
    backdrop-filter: var(--blur-sm);
    border: 1.2px solid var(--glass-border);
    border-radius: var(--r-md);
    color: var(--text-1);
    font-size: 14px;
    transition: var(--t);
}

.form-group input:focus, .form-group select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--glow-accent);
}

.panel-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.panel-chip {
    background: var(--glass-inset);
    backdrop-filter: var(--blur-sm);
    border: 1.2px solid var(--glass-border);
    border-top-color: var(--glass-border-mid);
    border-radius: var(--r-pill);
    padding: 10px 24px;
    color: var(--text-2);
    font-size: 14px;
    cursor: pointer;
    transition: var(--t-smooth);
}

.panel-chip:hover {
    background: var(--glass-bg-hover);
    color: var(--text-1);
    transform: translateY(-2px);
}

.panel-chip.active {
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    color: white;
    border-color: transparent;
}

.plans-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
    margin-top: 12px;
}

.plan-card {
    background: var(--glass-inset);
    backdrop-filter: var(--blur-sm);
    border: 1.2px solid var(--glass-border);
    border-radius: var(--r-lg);
    padding: 18px;
    cursor: pointer;
    transition: var(--t-smooth);
}

.plan-card:hover {
    background: var(--glass-bg-hover);
    transform: translateY(-3px);
}

.plan-card.selected {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15), rgba(16, 185, 129, 0.05));
    border-color: var(--accent);
}

.plan-name {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-1);
    margin-bottom: 10px;
}

.plan-meta {
    font-size: 12px;
    color: var(--text-3);
    margin-bottom: 12px;
}

.plan-price .old-price {
    text-decoration: line-through;
    color: var(--text-3);
    font-size: 12px;
    margin-left: 8px;
}

.plan-price .new-price {
    color: var(--accent-2);
    font-size: 16px;
    font-weight: 600;
}

.plan-price .discount-badge {
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
    font-size: 10px;
    padding: 2px 8px;
    border-radius: var(--r-pill);
    margin-right: 8px;
}

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

.username-group input {
    flex: 1;
}

.random-btn {
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.35);
    border-radius: var(--r-md);
    padding: 12px 20px;
    color: #34d399;
    cursor: pointer;
    transition: var(--t);
}

.random-btn:hover {
    background: rgba(16, 185, 129, 0.25);
    transform: translateY(-2px);
}

.order-summary {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.08), rgba(16, 185, 129, 0.03));
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: var(--r-lg);
    padding: 20px;
    margin-bottom: 24px;
}

.order-summary-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--accent-2);
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

.order-summary-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
}

.order-summary-row.total {
    padding-top: 12px;
    margin-top: 8px;
    border-top: 1px solid rgba(255,255,255,0.06);
    font-size: 16px;
    font-weight: 700;
    color: var(--accent-2);
}

.form-actions {
    display: flex;
    gap: 16px;
}

.btn-submit {
    flex: 1;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    border: none;
    border-radius: var(--r-pill);
    padding: 12px;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: var(--t-smooth);
}

.btn-submit:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px var(--glow-accent);
}

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

.btn-cancel {
    flex: 1;
    background: var(--glass-inset);
    border: 1.2px solid var(--glass-border);
    border-radius: var(--r-pill);
    padding: 12px;
    color: var(--text-2);
    cursor: pointer;
    transition: var(--t);
}

.btn-cancel:hover {
    background: var(--glass-bg-hover);
    color: var(--text-1);
    transform: translateY(-2px);
}

.empty-plans, .empty-state {
    text-align: center;
    padding: 40px;
    color: var(--text-3);
    background: var(--glass-inset);
    border-radius: var(--r-lg);
}

.empty-state svg {
    margin-bottom: 16px;
    opacity: 0.5;
}

/* ========== جدول ========== */
.table-wrapper {
    overflow-x: auto;
    border-radius: var(--r-md);
    border: 1.2px solid var(--glass-border);
    background: var(--glass-inset);
}

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

th, td {
    padding: 14px;
    text-align: center;
    border-bottom: 1px solid var(--glass-border);
    color: var(--text-2);
    font-size: 13px;
}

th {
    color: var(--text-3);
    font-weight: 600;
    background: var(--glass-inset);
}

tr:hover td {
    background: var(--glass-bg-hover);
    color: var(--text-1);
}

/* ========== بج ها ========== */
.badge {
    display: inline-block;
    padding: 6px 16px;
    border-radius: var(--r-pill);
    font-size: 11px;
    font-weight: 700;
}

.badge-active {
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.35);
}

.badge-inactive {
    background: rgba(244, 63, 94, 0.15);
    color: #fb7185;
    border: 1px solid rgba(244, 63, 94, 0.35);
}

/* ========== دکمه‌های اکشن ========== */
.action-buttons {
    display: flex;
    gap: 8px;
    justify-content: center;
    flex-wrap: wrap;
}

.edit-btn {
    background: var(--glass-inset);
    border: 1.2px solid var(--glass-border);
    padding: 6px 14px;
    border-radius: var(--r-sm);
    cursor: pointer;
    transition: var(--t);
    font-size: 12px;
    text-decoration: none;
    color: var(--text-2);
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.edit-btn:hover {
    background: var(--glass-bg-hover);
    color: var(--text-1);
    transform: translateY(-2px);
}

/* ========== مودال ========== */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(24px);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.modal-content {
    background: var(--bg-secondary);
    backdrop-filter: var(--blur-lg);
    border: 1.2px solid var(--glass-border-mid);
    border-radius: var(--r-xl);
    width: 580px;
    max-width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    padding: 28px;
    box-shadow: var(--shadow-glass-lg);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1.2px solid var(--glass-border);
}

.modal-header h3 {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-1);
    font-family: "BrandFont", sans-serif;
}

.close-modal {
    background: var(--glass-inset);
    border: 1.2px solid var(--glass-border);
    border-radius: 50%;
    width: 38px;
    height: 38px;
    font-size: 20px;
    cursor: pointer;
    color: var(--text-2);
    transition: var(--t-smooth);
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-modal:hover {
    background: rgba(244, 63, 94, 0.20);
    color: #fb7185;
    transform: scale(1.12);
}

.modal-actions {
    display: flex;
    gap: 12px;
    margin-top: 20px;
}

/* ========== مدیریت سرویس در مودال ========== */
.service-info {
    background: var(--glass-inset);
    border-radius: var(--r-md);
    padding: 20px;
    margin-bottom: 20px;
}

.info-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255,255,255,0.04);
    flex-wrap: wrap;
    gap: 8px;
}

.info-row span:first-child {
    color: var(--text-3);
    font-size: 12px;
}

.info-row span:last-child {
    color: var(--text-1);
    font-size: 12px;
    word-break: break-all;
    text-align: left;
}

.usage-bar {
    background: rgba(255,255,255,0.07);
    border-radius: var(--r-pill);
    height: 6px;
    margin: 12px 0;
    overflow: hidden;
}

.usage-fill {
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
    height: 100%;
    border-radius: var(--r-pill);
    transition: width 0.3s ease;
}

.config-box {
    background: rgba(0,0,0,0.25);
    border-radius: var(--r-sm);
    padding: 8px 12px;
    margin-top: 6px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.config-box code {
    font-size: 10px;
    font-family: monospace;
    word-break: break-all;
    flex: 1;
}

.btn-danger {
    background: rgba(244, 63, 94, 0.12);
    border: 1px solid rgba(244, 63, 94, 0.3);
    border-radius: var(--r-pill);
    padding: 10px 20px;
    color: #fb7185;
    cursor: pointer;
    transition: var(--t);
}

.btn-danger:hover {
    background: rgba(244, 63, 94, 0.2);
    transform: translateY(-2px);
}

.btn-sm {
    background: var(--glass-inset);
    border: 1px solid var(--glass-border);
    border-radius: var(--r-sm);
    padding: 5px 12px;
    font-size: 11px;
    cursor: pointer;
    color: var(--text-2);
    transition: var(--t);
}

.btn-sm:hover {
    background: var(--glass-bg-hover);
    color: var(--text-1);
}

/* ========== اطلاعیه ========== */
.announcement-preview {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.06), rgba(16, 185, 129, 0.02));
    border: 1px solid rgba(16, 185, 129, 0.15);
    border-radius: var(--r-lg);
    padding: 24px;
    margin-bottom: 24px;
    color: var(--text-2);
    line-height: 1.8;
}

.announcement-content {
    background: var(--glass-inset);
    border-radius: var(--r-lg);
    padding: 28px;
    color: var(--text-1);
    line-height: 2;
}

/* ========== آلرت ========== */
.alert {
    padding: 14px 20px;
    border-radius: var(--r-md);
    margin-bottom: 20px;
    font-size: 13px;
}

.alert-success {
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.32);
    color: #34d399;
}

.alert-error {
    background: rgba(244, 63, 94, 0.12);
    border: 1px solid rgba(244, 63, 94, 0.32);
    color: #fb7185;
}

/* ========== ریسپانسیو ========== */
@media (max-width: 768px) {
    .container { padding: 16px; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .stat-value { font-size: 26px; }
    .login-card { padding: 36px 32px; }
    th, td { padding: 10px 8px; font-size: 12px; }
    .modal-content { padding: 24px; }
    .admin-header { flex-direction: column; text-align: center; }
    .brand { align-self: center; }
    .admin-info { justify-content: center; }
    .form-actions { flex-direction: column; }
    .plans-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
    .stats-grid { grid-template-columns: 1fr; }
    .quick-actions { grid-template-columns: 1fr; }
    .section-header { flex-direction: column; align-items: stretch; }
    .section-title { justify-content: center; }
    .username-group { flex-direction: column; }
    .modal-content { width: 95%; padding: 20px; }
    .login-title { font-size: 32px; }
}



/* ============================================
   استایل‌های اختصاصی مدیریت سرویس
   (برای اضافه کردن به style.css در انتهای فایل)
   ============================================ */

/* بخش مدیریت سرویس - مودال */
.service-detail-card {
    background: var(--glass-inset);
    backdrop-filter: var(--blur-sm);
    border-radius: var(--r-xl);
    overflow: hidden;
}

.service-detail-section {
    padding: 20px;
    border-bottom: 1px solid var(--glass-border);
}

.service-detail-section:last-child {
    border-bottom: none;
}

.service-detail-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 16px;
    font-weight: 600;
    color: var(--accent-2);
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--glass-border);
}

.service-info-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.service-info-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    flex-wrap: wrap;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.service-info-label {
    color: var(--text-3);
    font-size: 12px;
    font-weight: 500;
    min-width: 100px;
}

.service-info-value {
    color: var(--text-1);
    font-size: 12px;
    word-break: break-all;
    text-align: left;
    flex: 1;
}

.service-info-value code {
    background: rgba(0, 0, 0, 0.3);
    padding: 6px 10px;
    border-radius: var(--r-sm);
    font-size: 11px;
    font-family: monospace;
    display: inline-block;
    max-width: 100%;
    overflow-x: auto;
}

/* باکس کپی */
.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-box code {
    flex: 1;
    font-size: 11px;
    font-family: monospace;
    word-break: break-all;
    overflow-x: auto;
    white-space: nowrap;
}

/* دکمه کپی مخصوص */
.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;
}

.copy-btn-sm:hover {
    background: var(--glass-bg-hover);
    color: var(--text-1);
    transform: translateY(-1px);
}

/* لیست کانفیگ‌ها */
.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;
}

.config-link {
    flex: 1;
    font-size: 11px;
    font-family: monospace;
    word-break: break-all;
    color: var(--text-2);
}

/* نوار پیشرفت مصرف */
.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);
}

/* بج وضعیت در مودال */
.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-update:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px var(--glow-accent);
}

.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;
}

.btn-modal-danger:hover {
    background: rgba(244, 63, 94, 0.25);
    transform: translateY(-2px);
}

/* بخش خرید ترافیک اضافه در مودال */
.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;
}

.extra-traffic-btn-modal {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    border: none;
    border-radius: var(--r-pill);
    padding: 8px 16px;
    font-size: 12px;
    cursor: pointer;
    transition: var(--t-smooth);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.extra-traffic-btn-modal:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
}

/* استایل مودال خرید ترافیک */
.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;
}

.traffic-notice-list li {
    margin: 4px 0;
}

.range-badge-box {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
}

.range-badge {
    background: var(--glass-inset);
    border: 1px solid var(--glass-border);
    border-radius: var(--r-pill);
    padding: 6px 14px;
    font-size: 12px;
    color: var(--accent-2);
}

.price-summary {
    background: var(--glass-inset);
    border-radius: var(--r-md);
    padding: 16px;
    margin-top: 16px;
}

.price-summary-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    font-size: 13px;
}

.price-summary-row.total {
    border-top: 1px solid var(--glass-border);
    margin-top: 8px;
    padding-top: 12px;
    font-weight: 700;
    color: var(--accent-2);
}

/* جدول سرویس‌ها */
.data-table-wrapper {
    overflow-x: auto;
    border-radius: var(--r-lg);
    border: 1px solid var(--glass-border);
    background: var(--glass-inset);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.data-table th {
    padding: 14px 12px;
    text-align: center;
    color: var(--text-3);
    font-weight: 600;
    background: var(--glass-inset);
    border-bottom: 1px solid var(--glass-border);
}

.data-table td {
    padding: 12px;
    text-align: center;
    color: var(--text-2);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.data-table tr:hover td {
    background: var(--glass-bg-hover);
    color: var(--text-1);
}

/* دکمه‌های اکشن در جدول */
.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:hover {
    background: var(--glass-bg-hover);
    color: var(--text-1);
    transform: translateY(-2px);
}

.action-btn-primary {
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    border: none;
    color: white;
}

.action-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--glow-accent);
}

.action-btn-danger {
    background: rgba(244, 63, 94, 0.12);
    border: 1px solid rgba(244, 63, 94, 0.3);
    color: #fb7185;
}

.action-btn-danger:hover {
    background: rgba(244, 63, 94, 0.25);
}

/* لینک ساب در جدول */
.sub-link-cell {
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* دکمه لاگ */
.debug-log-btn {
    background: var(--glass-inset);
    border: 1px solid var(--glass-border);
    border-radius: var(--r-pill);
    padding: 8px 16px;
    font-size: 12px;
    cursor: pointer;
    color: var(--text-2);
    transition: var(--t);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.debug-log-btn:hover {
    background: var(--glass-bg-hover);
    color: var(--text-1);
}

/* حالت خالی */
.empty-state-box {
    text-align: center;
    padding: 48px 24px;
    color: var(--text-3);
    background: var(--glass-inset);
    border-radius: var(--r-xl);
}

.empty-state-box svg {
    margin-bottom: 16px;
    opacity: 0.5;
}