/* ═══════════════════════════════════════════════
   VPN-Sub-Bot Admin Panel — Dark Teal/Emerald
   ═══════════════════════════════════════════════ */

:root {
    /* Colors */
    --bg-primary: #0b0f19;
    --bg-secondary: #111827;
    --bg-card: rgba(17, 24, 39, 0.7);
    --bg-card-hover: rgba(20, 30, 50, 0.85);
    --bg-glass: rgba(17, 24, 39, 0.5);
    --border: rgba(55, 65, 81, 0.5);
    --border-light: rgba(75, 85, 99, 0.3);

    --text-primary: #f3f4f6;
    --text-secondary: #9ca3af;
    --text-muted: #6b7280;
    --text-accent: #5eead4;

    --accent-1: #14b8a6;       /* teal */
    --accent-2: #10b981;       /* emerald */
    --accent-3: #06b6d4;       /* cyan */
    --accent-gradient: linear-gradient(135deg, #14b8a6, #10b981);
    --accent-gradient-h: linear-gradient(90deg, #14b8a6, #06b6d4, #10b981);
    --accent-glow: 0 0 20px rgba(20, 184, 166, 0.3);

    --danger: #ef4444;
    --danger-bg: rgba(239, 68, 68, 0.1);
    --warning: #f59e0b;
    --warning-bg: rgba(245, 158, 11, 0.1);
    --success: #10b981;
    --success-bg: rgba(16, 185, 129, 0.1);
    --info: #06b6d4;
    --info-bg: rgba(6, 182, 212, 0.1);

    --sidebar-w: 260px;
    --sidebar-w-collapsed: 0px;
    --topbar-h: 64px;
    --radius: 12px;
    --radius-sm: 8px;
    --radius-xs: 6px;

    --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Tahoma, Arial, sans-serif;
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 14px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font);
    background: var(--bg-primary);
    color: var(--text-primary);
    direction: rtl;
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* Scrollbar */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* ─── Login Screen ─── */
.login-screen {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-primary);
    background-image:
        radial-gradient(ellipse at 20% 50%, rgba(20, 184, 166, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(6, 182, 212, 0.06) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 80%, rgba(16, 185, 129, 0.05) 0%, transparent 50%);
    padding: 1rem;
}

.login-card {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2.5rem;
    width: 100%;
    max-width: 400px;
    animation: fadeInUp 0.6s ease-out;
}

.login-logo {
    text-align: center;
    margin-bottom: 2rem;
}

.logo-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 1rem;
    background: var(--accent-gradient);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--accent-glow);
}

.logo-icon svg {
    width: 28px;
    height: 28px;
    color: white;
}

.login-logo h1 {
    font-size: 1.5rem;
    font-weight: 700;
    background: var(--accent-gradient-h);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.login-logo p {
    color: var(--text-secondary);
    margin-top: 0.25rem;
    font-size: 0.9rem;
}

/* ─── Forms ─── */
.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.4rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.65rem 0.9rem;
    background: rgba(31, 41, 55, 0.6);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: var(--font);
    font-size: 0.9rem;
    transition: var(--transition);
    direction: ltr;
    text-align: right;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--accent-1);
    box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.15);
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
    font-family: 'Courier New', monospace;
    direction: ltr;
    text-align: left;
}

.form-row {
    display: flex;
    gap: 1rem;
}

.form-row .form-group {
    flex: 1;
}

/* ─── Buttons ─── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.6rem 1.2rem;
    border: none;
    border-radius: var(--radius-sm);
    font-family: var(--font);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    white-space: nowrap;
}

.btn-primary {
    background: var(--accent-gradient);
    color: white;
    box-shadow: 0 2px 8px rgba(20, 184, 166, 0.25);
}

.btn-primary:hover {
    box-shadow: 0 4px 16px rgba(20, 184, 166, 0.4);
    transform: translateY(-1px);
}

.btn-outline {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border);
}

.btn-outline:hover {
    border-color: var(--accent-1);
    color: var(--accent-1);
    background: rgba(20, 184, 166, 0.05);
}

.btn-danger {
    background: var(--danger);
    color: white;
}

.btn-danger:hover {
    background: #dc2626;
}

.btn-sm {
    padding: 0.35rem 0.75rem;
    font-size: 0.8rem;
}

.btn-block {
    width: 100%;
}

.btn-icon {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.4rem;
    border-radius: var(--radius-xs);
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.btn-icon:hover {
    color: var(--text-primary);
    background: rgba(255,255,255,0.05);
}

.btn-icon svg {
    width: 20px;
    height: 20px;
}

.error-msg {
    color: var(--danger);
    font-size: 0.85rem;
    margin-top: 0.75rem;
    text-align: center;
}

/* ─── App Layout ─── */
#app {
    display: flex;
    min-height: 100vh;
}

/* ─── Sidebar ─── */
.sidebar {
    width: var(--sidebar-w);
    background: var(--bg-secondary);
    border-left: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    z-index: 100;
    transition: var(--transition);
}

.sidebar-header {
    padding: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    border-bottom: 1px solid var(--border-light);
}

.logo-icon-sm {
    width: 36px;
    height: 36px;
    background: var(--accent-gradient);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.logo-icon-sm svg {
    width: 18px;
    height: 18px;
    color: white;
}

.sidebar-title {
    font-weight: 700;
    font-size: 1.05rem;
    background: var(--accent-gradient-h);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.sidebar-nav {
    flex: 1;
    padding: 0.75rem;
    overflow-y: auto;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.7rem 0.9rem;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    transition: var(--transition);
    margin-bottom: 0.2rem;
    position: relative;
}

.nav-item svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.nav-item:hover {
    background: rgba(255,255,255,0.04);
    color: var(--text-primary);
}

.nav-item.active {
    background: rgba(20, 184, 166, 0.1);
    color: var(--accent-1);
}

.nav-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 60%;
    background: var(--accent-gradient);
    border-radius: 3px;
}

.badge {
    background: var(--danger);
    color: white;
    font-size: 0.7rem;
    padding: 0.15rem 0.45rem;
    border-radius: 10px;
    margin-right: auto;
    font-weight: 600;
}

.sidebar-footer {
    padding: 1rem 1.25rem;
    border-top: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.admin-info {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* ─── Main Content ─── */
.main-content {
    flex: 1;
    margin-right: var(--sidebar-w);
    min-height: 100vh;
    background:
        radial-gradient(ellipse at 30% 10%, rgba(20, 184, 166, 0.04) 0%, transparent 40%),
        radial-gradient(ellipse at 70% 90%, rgba(16, 185, 129, 0.03) 0%, transparent 40%),
        var(--bg-primary);
}

/* ─── Topbar ─── */
.topbar {
    height: var(--topbar-h);
    display: flex;
    align-items: center;
    padding: 0 1.5rem;
    gap: 1rem;
    border-bottom: 1px solid var(--border-light);
    background: rgba(11, 15, 25, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 50;
}

.topbar h2 {
    font-size: 1.1rem;
    font-weight: 600;
}

.topbar-actions {
    margin-right: auto;
    display: flex;
    gap: 0.5rem;
}

.sidebar-toggle {
    display: none;
}

/* ─── Pages ─── */
.page {
    display: none;
    padding: 1.5rem;
    animation: fadeIn 0.3s ease-out;
}

.page.active {
    display: block;
}

/* ─── Stats Cards ─── */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.stat-card {
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: var(--transition);
}

.stat-card:hover {
    border-color: rgba(20, 184, 166, 0.3);
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
    transform: translateY(-2px);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: rgba(20, 184, 166, 0.1);
    color: var(--accent-1);
}

.stat-icon.users-icon { background: var(--info-bg); color: var(--info); }
.stat-icon.active-icon { background: var(--success-bg); color: var(--success); }
.stat-icon.expired-icon { background: var(--danger-bg); color: var(--danger); }
.stat-icon.traffic-icon { background: var(--warning-bg); color: var(--warning); }

.stat-icon svg {
    width: 24px;
    height: 24px;
}

.stat-value {
    display: block;
    font-size: 1.6rem;
    font-weight: 700;
    line-height: 1.2;
}

.stat-label {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 0.15rem;
}

/* ─── Cards ─── */
.card {
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 1.5rem;
    transition: var(--transition);
}

.card:hover {
    border-color: rgba(55, 65, 81, 0.7);
}

.card-header {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-header h3 {
    font-size: 0.95rem;
    font-weight: 600;
}

.card-body {
    padding: 1.25rem;
}

.charts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.chart-doughnut-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ─── Table ─── */
.page-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    gap: 1rem;
    flex-wrap: wrap;
}

.search-box {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(31, 41, 55, 0.5);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0 0.75rem;
    transition: var(--transition);
    flex: 1;
    max-width: 320px;
}

.search-box:focus-within {
    border-color: var(--accent-1);
}

.search-box svg {
    color: var(--text-muted);
    flex-shrink: 0;
}

.search-box input {
    background: none;
    border: none;
    color: var(--text-primary);
    padding: 0.55rem 0.25rem;
    font-family: var(--font);
    font-size: 0.9rem;
    width: 100%;
    outline: none;
}

.table-container {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th {
    padding: 0.75rem 1rem;
    text-align: right;
    font-weight: 600;
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}

.data-table td {
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
    border-bottom: 1px solid var(--border-light);
    vertical-align: middle;
}

.data-table tbody tr {
    transition: var(--transition);
}

.data-table tbody tr:hover {
    background: rgba(255,255,255,0.02);
}

.table-footer {
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.8rem;
    color: var(--text-muted);
    border-top: 1px solid var(--border-light);
}

.pagination {
    display: flex;
    gap: 0.25rem;
}

.pagination button {
    background: none;
    border: 1px solid var(--border);
    color: var(--text-secondary);
    padding: 0.3rem 0.6rem;
    border-radius: var(--radius-xs);
    cursor: pointer;
    font-family: var(--font);
    font-size: 0.8rem;
    transition: var(--transition);
}

.pagination button:hover,
.pagination button.active {
    border-color: var(--accent-1);
    color: var(--accent-1);
    background: rgba(20, 184, 166, 0.08);
}

/* Status badges */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.2rem 0.6rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.status-active {
    background: var(--success-bg);
    color: var(--success);
}

.status-expired {
    background: var(--danger-bg);
    color: var(--danger);
}

.status-inactive {
    background: rgba(107, 114, 128, 0.15);
    color: var(--text-muted);
}

.status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}

/* Action buttons in table */
.action-btns {
    display: flex;
    gap: 0.3rem;
}

.action-btn {
    background: none;
    border: 1px solid var(--border);
    color: var(--text-secondary);
    padding: 0.3rem 0.5rem;
    border-radius: var(--radius-xs);
    cursor: pointer;
    font-size: 0.75rem;
    transition: var(--transition);
    white-space: nowrap;
}

.action-btn:hover {
    border-color: var(--accent-1);
    color: var(--accent-1);
    background: rgba(20, 184, 166, 0.05);
}

.action-btn.danger:hover {
    border-color: var(--danger);
    color: var(--danger);
    background: var(--danger-bg);
}

/* ─── Converter ─── */
.converter-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.format-toggle {
    display: flex;
    gap: 0.3rem;
    background: rgba(31, 41, 55, 0.5);
    padding: 0.2rem;
    border-radius: var(--radius-sm);
}

.format-toggle .btn.active {
    background: var(--accent-gradient);
    color: white;
}

.format-toggle .btn:not(.active) {
    color: var(--text-secondary);
    background: none;
}

.converter-result-item {
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-light);
}

.converter-result-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.result-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.protocol-badge {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.protocol-vless { background: rgba(6, 182, 212, 0.15); color: #06b6d4; }
.protocol-vmess { background: rgba(168, 85, 247, 0.15); color: #a855f7; }
.protocol-trojan { background: rgba(245, 158, 11, 0.15); color: #f59e0b; }
.protocol-shadowsocks { background: rgba(59, 130, 246, 0.15); color: #3b82f6; }
.protocol-hysteria2 { background: rgba(236, 72, 153, 0.15); color: #ec4899; }
.protocol-hysteria { background: rgba(236, 72, 153, 0.12); color: #f472b6; }
.protocol-tuic { background: rgba(139, 92, 246, 0.15); color: #8b5cf6; }
.protocol-wireguard { background: rgba(34, 197, 94, 0.15); color: #22c55e; }

.result-tag {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.code-block {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 1rem;
    overflow-x: auto;
    font-family: 'Courier New', 'Fira Code', monospace;
    font-size: 0.82rem;
    line-height: 1.6;
    color: #a5f3fc;
    direction: ltr;
    text-align: left;
    white-space: pre;
    position: relative;
}

.code-block .code-copy-btn {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: rgba(31, 41, 55, 0.8);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.7rem;
    transition: var(--transition);
}

.code-block .code-copy-btn:hover {
    color: var(--accent-1);
    border-color: var(--accent-1);
}

/* ─── Notifications ─── */
.notif-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.75rem;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    margin-bottom: 0.4rem;
}

.notif-item:hover {
    background: rgba(255,255,255,0.02);
}

.notif-item.unread {
    background: rgba(20, 184, 166, 0.04);
    border-right: 3px solid var(--accent-1);
}

.notif-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1.1rem;
}

.notif-content {
    flex: 1;
}

.notif-message {
    font-size: 0.9rem;
    line-height: 1.4;
}

.notif-time {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

/* ─── Progress Rings ─── */
.progress-ring-container {
    display: flex;
    justify-content: center;
    padding: 1rem 0;
}

.progress-ring {
    position: relative;
    width: 120px;
    height: 120px;
}

.progress-ring svg {
    transform: rotate(-90deg);
}

.ring-bg {
    fill: none;
    stroke: var(--border);
    stroke-width: 8;
}

.ring-fill {
    fill: none;
    stroke: url(#ring-gradient);
    stroke-width: 8;
    stroke-linecap: round;
    stroke-dasharray: 339.292;
    stroke-dashoffset: 339.292;
    transition: stroke-dashoffset 1s ease-out;
}

.ring-label {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.ring-value {
    display: block;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-primary);
}

.ring-sub {
    display: block;
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-top: 0.15rem;
}

/* ─── Modals ─── */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    animation: fadeIn 0.2s ease-out;
}

.modal {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    width: 100%;
    max-width: 480px;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideUp 0.3s ease-out;
}

.modal-lg {
    max-width: 640px;
}

.modal-header {
    padding: 1.25rem;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-header h3 {
    font-size: 1rem;
    font-weight: 600;
}

.modal-body {
    padding: 1.25rem;
}

.modal-footer {
    padding: 1rem 1.25rem;
    border-top: 1px solid var(--border-light);
    display: flex;
    justify-content: flex-start;
    gap: 0.5rem;
}

/* ─── Toast ─── */
#toast-container {
    position: fixed;
    bottom: 1.5rem;
    left: 1.5rem;
    z-index: 500;
    display: flex;
    flex-direction: column-reverse;
    gap: 0.5rem;
}

.toast {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    box-shadow: 0 8px 24px rgba(0,0,0,0.3);
    animation: slideInLeft 0.3s ease-out;
    min-width: 280px;
    max-width: 400px;
}

.toast.success { border-right: 3px solid var(--success); }
.toast.error { border-right: 3px solid var(--danger); }
.toast.info { border-right: 3px solid var(--info); }

.toast-icon { font-size: 1.1rem; flex-shrink: 0; }

/* ─── User Detail ─── */
.detail-section {
    margin-bottom: 1.25rem;
}

.detail-section h4 {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem 1rem;
}

.detail-item {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.detail-label {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.detail-value {
    font-size: 0.9rem;
    font-weight: 500;
}

.vpn-link-item {
    background: rgba(0,0,0,0.2);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0.6rem 0.8rem;
    margin-bottom: 0.4rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.vpn-link-name {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--accent-1);
    min-width: 80px;
}

.vpn-link-config {
    flex: 1;
    font-size: 0.75rem;
    color: var(--text-muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    direction: ltr;
    font-family: monospace;
}

.vpn-link-actions {
    display: flex;
    gap: 0.3rem;
}

/* ─── Utility ─── */
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-warning { color: var(--warning); }
.text-accent { color: var(--accent-1); }
.mt-1 { margin-top: 0.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.empty-state {
    text-align: center;
    padding: 2rem 1rem;
    color: var(--text-muted);
}
.empty-state svg {
    width: 48px;
    height: 48px;
    margin-bottom: 0.75rem;
    opacity: 0.3;
}

/* ─── Animations ─── */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(30px) scale(0.97); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes slideInLeft {
    from { opacity: 0; transform: translateX(-20px); }
    to { opacity: 1; transform: translateX(0); }
}

/* ─── Responsive ─── */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(100%);
    }
    .sidebar.open {
        transform: translateX(0);
    }
    .sidebar-toggle {
        display: block !important;
    }
    .main-content {
        margin-right: 0;
    }
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .charts-grid {
        grid-template-columns: 1fr;
    }
    .converter-layout {
        grid-template-columns: 1fr;
    }
    .form-row {
        flex-direction: column;
        gap: 0;
    }
    .detail-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
    .page {
        padding: 1rem;
    }
    .page-actions {
        flex-direction: column;
    }
    .search-box {
        max-width: 100%;
    }
}
