/* ========================================
   Dalordz VIP Portal — Shared Dashboard CSS
   Glassmorphism Dark Theme + Full Animations
   ======================================== */

/* ── Design Tokens ── */
:root {
    --bg-primary: #06060b;
    --bg-secondary: #0d0d14;
    --bg-tertiary: #14141e;
    --bg-card: rgba(20, 20, 30, 0.6);
    --bg-card-hover: rgba(30, 30, 45, 0.8);
    --bg-glass: rgba(255, 255, 255, 0.03);
    --text-primary: #f0f0f5;
    --text-secondary: #8888a0;
    --text-muted: #55556b;
    --accent-1: #6366f1;
    --accent-2: #8b5cf6;
    --accent-3: #d946ef;
    --gradient: linear-gradient(135deg, var(--accent-1) 0%, var(--accent-2) 50%, var(--accent-3) 100%);
    --gradient-subtle: linear-gradient(135deg, rgba(99,102,241,0.15) 0%, rgba(139,92,246,0.15) 50%, rgba(217,70,239,0.15) 100%);
    --success: #22c55e;
    --error: #ef4444;
    --warning: #f59e0b;
    --gold: #fbbf24;
    --border: rgba(255,255,255,0.06);
    --border-hover: rgba(255,255,255,0.12);
    --glow: rgba(99,102,241,0.35);
    --glow-lg: 0 0 40px rgba(99,102,241,0.2), 0 0 80px rgba(139,92,246,0.1);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-full: 9999px;
    --shadow: 0 4px 24px rgba(0,0,0,0.3);
    --shadow-lg: 0 12px 40px rgba(0,0,0,0.4);
    --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-display: 'Outfit', 'Inter', sans-serif;
    --sidebar-w: 260px;
    --header-h: 0px;
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Reset ── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    font-family: var(--font);
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}
a { text-decoration: none; color: inherit; }
ul { list-style: none; }

/* ── Animated Background ── */
.bg-orbs {
    position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden;
}
.bg-orbs .orb {
    position: absolute; border-radius: 50%; filter: blur(100px); opacity: 0.4;
    animation: orbFloat 20s ease-in-out infinite;
}
.orb-1 { width: 500px; height: 500px; background: var(--accent-1); top: -15%; left: -10%; animation-delay: 0s; }
.orb-2 { width: 400px; height: 400px; background: var(--accent-3); top: 60%; right: -10%; animation-delay: -7s; }
.orb-3 { width: 350px; height: 350px; background: var(--accent-2); bottom: -5%; left: 30%; animation-delay: -14s; }
@keyframes orbFloat {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(40px, -30px) scale(1.08); }
    50% { transform: translate(-20px, 40px) scale(0.95); }
    75% { transform: translate(-40px, -15px) scale(1.05); }
}

/* ── Layout ── */
.app-layout {
    display: flex; min-height: 100vh; position: relative; z-index: 1;
}
.main-content {
    flex: 1; margin-left: var(--sidebar-w); padding: 32px; min-height: 100vh;
    transition: margin-left var(--transition);
}

/* ── Sidebar ── */
.sidebar {
    position: fixed; top: 0; left: 0; width: var(--sidebar-w); height: 100vh;
    background: rgba(10, 10, 18, 0.85); backdrop-filter: blur(24px);
    border-right: 1px solid var(--border); z-index: 100;
    display: flex; flex-direction: column; padding: 24px 16px;
    transition: transform var(--transition);
}
.sidebar-logo {
    display: flex; align-items: center; gap: 10px; padding: 0 8px 24px;
    border-bottom: 1px solid var(--border); margin-bottom: 24px;
}
.sidebar-logo .logo-icon { font-size: 28px; }
.sidebar-logo .logo-text {
    font-family: var(--font-display); font-size: 20px; font-weight: 700;
}
.sidebar-logo .logo-text .hl {
    background: var(--gradient); -webkit-background-clip: text;
    -webkit-text-fill-color: transparent; background-clip: text;
}
.sidebar-badge {
    font-size: 10px; font-weight: 700; padding: 3px 8px; border-radius: 6px;
    margin-left: auto;
}
.sidebar-badge.admin { background: rgba(239,68,68,0.2); color: var(--error); }
.sidebar-badge.vip { background: rgba(251,191,36,0.2); color: var(--gold); }

.sidebar-nav { flex: 1; display: flex; flex-direction: column; gap: 4px; }
.nav-item {
    display: flex; align-items: center; gap: 12px; padding: 12px 14px;
    border-radius: var(--radius-md); color: var(--text-secondary);
    font-size: 14px; font-weight: 500; cursor: pointer;
    transition: all var(--transition); position: relative; overflow: hidden;
    border: none; background: none; width: 100%; text-align: left; font-family: inherit;
}
.nav-item::before {
    content: ''; position: absolute; left: 0; top: 50%; transform: translateY(-50%);
    width: 3px; height: 0; background: var(--gradient); border-radius: 0 4px 4px 0;
    transition: height var(--transition);
}
.nav-item:hover { color: var(--text-primary); background: var(--bg-glass); }
.nav-item.active {
    color: var(--text-primary); background: var(--gradient-subtle);
}
.nav-item.active::before { height: 24px; }
.nav-item .icon { font-size: 18px; width: 24px; text-align: center; }

.sidebar-footer {
    padding-top: 16px; border-top: 1px solid var(--border); margin-top: 16px;
}
.sidebar-user {
    display: flex; align-items: center; gap: 10px; padding: 10px 8px;
}
.sidebar-avatar {
    width: 36px; height: 36px; border-radius: 50%; background: var(--gradient);
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 14px; flex-shrink: 0;
}
.sidebar-user-info { flex: 1; min-width: 0; }
.sidebar-user-name { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-user-role { font-size: 11px; color: var(--text-muted); }

.btn-logout-sidebar {
    display: flex; align-items: center; gap: 10px; padding: 10px 14px;
    width: 100%; border-radius: var(--radius-md); color: var(--text-muted);
    font-size: 13px; cursor: pointer; border: none; background: none;
    font-family: inherit; transition: all var(--transition); margin-top: 8px;
}
.btn-logout-sidebar:hover { color: var(--error); background: rgba(239,68,68,0.08); }

/* Mobile sidebar toggle */
.sidebar-toggle {
    display: none; position: fixed; top: 16px; left: 16px; z-index: 200;
    width: 44px; height: 44px; border-radius: var(--radius-md);
    background: rgba(20,20,30,0.9); backdrop-filter: blur(12px);
    border: 1px solid var(--border); color: var(--text-primary);
    cursor: pointer; align-items: center; justify-content: center;
    font-size: 20px; transition: all var(--transition);
}
.sidebar-overlay {
    display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.6);
    z-index: 99; opacity: 0; transition: opacity var(--transition);
}
.sidebar-overlay.active { opacity: 1; }

/* ── Stats Grid ── */
.stats-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px; margin-bottom: 32px;
}
.stat-card {
    background: var(--bg-card); backdrop-filter: blur(16px);
    border: 1px solid var(--border); border-radius: var(--radius-lg);
    padding: 24px; position: relative; overflow: hidden;
    transition: all var(--transition); opacity: 0; transform: translateY(20px);
}
.stat-card.visible { opacity: 1; transform: translateY(0); }
.stat-card:hover {
    border-color: var(--border-hover); transform: translateY(-4px);
    box-shadow: var(--glow-lg);
}
.stat-card::after {
    content: ''; position: absolute; top: 0; right: 0; width: 120px; height: 120px;
    background: var(--gradient); opacity: 0.04; border-radius: 50%;
    transform: translate(30%, -30%);
}
.stat-icon { font-size: 32px; margin-bottom: 16px; display: block; }
.stat-value {
    font-family: var(--font-display); font-size: 36px; font-weight: 800;
    background: var(--gradient); -webkit-background-clip: text;
    -webkit-text-fill-color: transparent; background-clip: text;
}
.stat-label { color: var(--text-secondary); font-size: 13px; margin-top: 4px; font-weight: 500; }

/* ── Cards (Glass) ── */
.glass-card {
    background: var(--bg-card); backdrop-filter: blur(16px);
    border: 1px solid var(--border); border-radius: var(--radius-lg);
    overflow: hidden; transition: all var(--transition);
}
.glass-card:hover { border-color: var(--border-hover); box-shadow: var(--shadow); }

.card-header {
    padding: 20px 24px; border-bottom: 1px solid var(--border);
    display: flex; align-items: center; justify-content: space-between;
    flex-wrap: wrap; gap: 12px;
}
.card-title {
    font-family: var(--font-display); font-size: 18px; font-weight: 700;
    display: flex; align-items: center; gap: 10px;
}
.card-body { padding: 24px; }

/* ── Tabs ── */
.tabs {
    display: flex; gap: 6px; background: var(--bg-secondary);
    padding: 6px; border-radius: var(--radius-lg); border: 1px solid var(--border);
    margin-bottom: 28px; overflow-x: auto;
}
.tab-btn {
    flex: 1; padding: 12px 20px; background: transparent; border: none;
    border-radius: var(--radius-md); color: var(--text-muted); font-size: 13px;
    font-weight: 600; font-family: inherit; cursor: pointer;
    transition: all var(--transition); display: flex; align-items: center;
    justify-content: center; gap: 8px; white-space: nowrap; position: relative;
}
.tab-btn:hover { color: var(--text-secondary); background: var(--bg-glass); }
.tab-btn.active {
    color: white; background: var(--gradient);
    box-shadow: 0 4px 16px var(--glow);
}
.tab-pane { display: none; animation: fadeSlideUp 0.4s ease; }
.tab-pane.active { display: block; }

/* ── Table ── */
.table-wrap {
    background: var(--bg-card); backdrop-filter: blur(16px);
    border: 1px solid var(--border); border-radius: var(--radius-lg);
    overflow: hidden;
}
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th {
    padding: 14px 20px; text-align: left; font-size: 11px; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.8px; color: var(--text-muted);
    background: var(--bg-tertiary); white-space: nowrap;
}
td {
    padding: 16px 20px; border-top: 1px solid var(--border); font-size: 14px;
    vertical-align: middle;
}
tr { transition: background var(--transition); }
tr:hover td { background: rgba(99,102,241,0.04); }
/* Row entrance animation */
tr.row-enter { opacity: 0; transform: translateX(-10px); }
tr.row-enter.visible { opacity: 1; transform: translateX(0); transition: all 0.3s ease; }

.item-name { font-weight: 600; }
.item-desc { color: var(--text-secondary); font-size: 13px; line-height: 1.5; }
.item-icon { font-size: 24px; }

/* ── Badges ── */
.badge {
    display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px;
    border-radius: var(--radius-sm); font-size: 11px; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.5px;
}
.badge-admin { background: rgba(239,68,68,0.15); color: var(--error); }
.badge-vip { background: rgba(251,191,36,0.15); color: var(--gold); }
.badge-active { background: rgba(34,197,94,0.15); color: var(--success); }
.badge-maintenance { background: rgba(239,68,68,0.15); color: var(--error); }
.badge-update { background: rgba(245,158,11,0.15); color: var(--warning); }
.badge-featured { background: rgba(251,191,36,0.15); color: var(--gold); font-size: 10px; }

/* ── Buttons ── */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 10px 20px; font-size: 13px; font-weight: 600; font-family: inherit;
    border-radius: var(--radius-md); cursor: pointer; border: none;
    transition: all var(--transition); position: relative; overflow: hidden;
    text-decoration: none;
}
.btn::after {
    content: ''; position: absolute; inset: 0; background: rgba(255,255,255,0.1);
    transform: translateX(-100%); transition: transform 0.4s ease;
}
.btn:hover::after { transform: translateX(0); }
.btn:active { transform: scale(0.97); }

.btn-primary { background: var(--gradient); color: white; box-shadow: 0 4px 16px var(--glow); }
.btn-primary:hover { box-shadow: 0 8px 28px var(--glow); transform: translateY(-2px); }

.btn-outline {
    background: transparent; border: 1px solid var(--border); color: var(--text-secondary);
}
.btn-outline:hover { border-color: var(--accent-1); color: var(--accent-1); }

.btn-danger { background: var(--error); color: white; }
.btn-danger:hover { box-shadow: 0 4px 16px rgba(239,68,68,0.3); }

.btn-success { background: var(--success); color: white; }
.btn-success:hover { box-shadow: 0 4px 16px rgba(34,197,94,0.3); }

.btn-sm { padding: 7px 14px; font-size: 12px; border-radius: var(--radius-sm); }
.btn-icon {
    width: 36px; height: 36px; padding: 0; border-radius: var(--radius-sm);
    display: inline-flex; align-items: center; justify-content: center;
}

/* ── Form ── */
.form-group { margin-bottom: 20px; }
.form-label {
    display: block; margin-bottom: 8px; font-weight: 500;
    color: var(--text-secondary); font-size: 13px;
}
.form-input, .form-textarea, .form-select {
    width: 100%; padding: 12px 16px; background: var(--bg-tertiary);
    border: 1px solid var(--border); border-radius: var(--radius-md);
    color: var(--text-primary); font-size: 14px; font-family: inherit;
    transition: all var(--transition); outline: none;
}
.form-input:focus, .form-textarea:focus, .form-select:focus {
    border-color: var(--accent-1); box-shadow: 0 0 0 3px var(--glow);
}
.form-input::placeholder, .form-textarea::placeholder { color: var(--text-muted); }
.form-textarea { min-height: 90px; resize: vertical; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-help { font-size: 12px; color: var(--text-muted); margin-top: 6px; }

/* ── Modal ── */
.modal {
    display: none; position: fixed; inset: 0; z-index: 1000;
    align-items: center; justify-content: center; padding: 20px;
    background: rgba(0,0,0,0.7); backdrop-filter: blur(6px);
    opacity: 0; transition: opacity 0.25s ease;
}
.modal.active { display: flex; opacity: 1; }
.modal-box {
    background: var(--bg-secondary); border: 1px solid var(--border);
    border-radius: var(--radius-xl); max-width: 600px; width: 100%;
    max-height: 90vh; overflow-y: auto; box-shadow: var(--shadow-lg);
    transform: scale(0.95) translateY(10px);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.modal.active .modal-box { transform: scale(1) translateY(0); }
.modal-head {
    display: flex; align-items: center; justify-content: space-between;
    padding: 20px 24px; border-bottom: 1px solid var(--border);
}
.modal-title { font-size: 18px; font-weight: 700; }
.modal-close {
    width: 36px; height: 36px; border-radius: var(--radius-sm);
    background: var(--bg-tertiary); border: none; color: var(--text-muted);
    cursor: pointer; display: flex; align-items: center; justify-content: center;
    transition: all var(--transition);
}
.modal-close:hover { background: var(--error); color: white; }
.modal-body { padding: 24px; }
.modal-foot {
    padding: 16px 24px; border-top: 1px solid var(--border);
    display: flex; gap: 12px; justify-content: flex-end;
}

/* ── Toast ── */
.toast-box {
    position: fixed; bottom: 24px; right: 24px; z-index: 2000;
    display: flex; flex-direction: column; gap: 10px;
}
.toast {
    background: var(--bg-secondary); border: 1px solid var(--border);
    border-radius: var(--radius-md); padding: 14px 18px;
    display: flex; align-items: center; gap: 12px; min-width: 280px;
    box-shadow: var(--shadow-lg); animation: toastIn 0.4s cubic-bezier(0.34,1.56,0.64,1);
    position: relative; overflow: hidden;
}
.toast::after {
    content: ''; position: absolute; bottom: 0; left: 0; height: 3px;
    background: var(--gradient); animation: toastProgress 3s linear forwards;
}
.toast.success { border-left: 3px solid var(--success); }
.toast.error { border-left: 3px solid var(--error); }
.toast-icon { font-size: 18px; }
.toast-msg { flex: 1; font-size: 13px; }
@keyframes toastIn {
    from { transform: translateX(120%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}
@keyframes toastProgress {
    from { width: 100%; } to { width: 0%; }
}

/* ── Loading ── */
.loading-box {
    display: flex; align-items: center; justify-content: center; padding: 60px;
}
.spinner {
    width: 36px; height: 36px; border: 3px solid var(--border);
    border-top-color: var(--accent-1); border-radius: 50%;
    animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Skeleton loading */
.skeleton {
    background: linear-gradient(90deg, var(--bg-tertiary) 25%, var(--bg-card-hover) 50%, var(--bg-tertiary) 75%);
    background-size: 200% 100%; animation: shimmer 1.5s infinite; border-radius: var(--radius-sm);
}
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* ── Empty State ── */
.empty-state {
    text-align: center; padding: 60px 20px; color: var(--text-muted);
}
.empty-icon { font-size: 48px; margin-bottom: 16px; opacity: 0.5; }
.empty-text { font-size: 15px; }

/* ── Actions Cell ── */
.actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ── Keyframes ── */
@keyframes fadeSlideUp {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
    from { opacity: 0; } to { opacity: 1; }
}
@keyframes scaleIn {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}
@keyframes slideInRight {
    from { transform: translateX(20px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}
@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}
@keyframes shimmerText {
    0% { background-position: -200% center; }
    100% { background-position: 200% center; }
}

/* Stagger children animation */
.stagger > * { opacity: 0; transform: translateY(12px); animation: fadeSlideUp 0.5s ease forwards; }
.stagger > *:nth-child(1) { animation-delay: 0.05s; }
.stagger > *:nth-child(2) { animation-delay: 0.1s; }
.stagger > *:nth-child(3) { animation-delay: 0.15s; }
.stagger > *:nth-child(4) { animation-delay: 0.2s; }
.stagger > *:nth-child(5) { animation-delay: 0.25s; }
.stagger > *:nth-child(6) { animation-delay: 0.3s; }

/* ── Welcome Card (Dashboard) ── */
.welcome-card {
    background: var(--bg-card); backdrop-filter: blur(16px);
    border: 1px solid var(--border); border-radius: var(--radius-lg);
    padding: 28px 32px; margin-bottom: 28px; position: relative; overflow: hidden;
    animation: fadeSlideUp 0.6s ease;
}
.welcome-card::before {
    content: ''; position: absolute; top: -50%; right: -10%; width: 300px; height: 300px;
    background: var(--gradient); opacity: 0.06; border-radius: 50%; filter: blur(40px);
}
.welcome-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; }
.welcome-title {
    font-family: var(--font-display); font-size: 22px; font-weight: 700;
}
.welcome-sub { color: var(--text-secondary); font-size: 14px; margin-top: 4px; }

.license-badge {
    display: inline-flex; align-items: center; gap: 8px; padding: 10px 18px;
    border-radius: var(--radius-md); font-size: 13px; font-weight: 600;
}
.license-badge.active {
    background: rgba(34,197,94,0.1); border: 1px solid rgba(34,197,94,0.25); color: var(--success);
}
.license-badge.expired {
    background: rgba(239,68,68,0.1); border: 1px solid rgba(239,68,68,0.25); color: var(--error);
}
.license-dot {
    width: 8px; height: 8px; border-radius: 50%; animation: pulse 2s infinite;
}
.license-dot.active { background: var(--success); }
.license-dot.expired { background: var(--error); }

/* ── Bot Cards Grid (Dashboard) ── */
.bots-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    grid-auto-rows: 1fr; /* equal-height rows */
}
.bot-card {
    background: var(--bg-card); backdrop-filter: blur(16px);
    border: 1px solid var(--border); border-radius: var(--radius-lg);
    padding: 24px; transition: all var(--transition); position: relative; overflow: hidden;
    opacity: 0; transform: translateY(16px);
    display: flex; flex-direction: column; height: 100%;
    cursor: pointer;
}
.bot-card.visible { opacity: 1; transform: translateY(0); }
.bot-card:hover {
    border-color: var(--border-hover); transform: translateY(-4px);
    box-shadow: var(--glow-lg);
}
.bot-card.featured { border-color: rgba(251,191,36,0.2); }
.bot-card.featured::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
    background: linear-gradient(90deg, var(--gold), transparent);
}
.bot-card-head {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 12px;
}
.bot-card-star {
    position: absolute;
    top: 14px; right: 14px;
    font-size: 16px;
    line-height: 1;
    z-index: 2;
    filter: drop-shadow(0 0 4px rgba(251,191,36,0.6));
}
.bot-card-icon {
    font-size: 28px; width: 48px; height: 48px; display: flex; align-items: center;
    justify-content: center; background: var(--bg-tertiary); border-radius: var(--radius-md);
    flex-shrink: 0;
}
.bot-card-info { min-width: 0; display: flex; flex-direction: column; gap: 6px; padding-right: 24px; }
.bot-card-name {
    font-weight: 700; font-size: 15px; margin: 0;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
    line-height: 1.3;
    min-height: calc(15px * 1.3 * 2);
}
.bot-card-desc {
    color: var(--text-secondary); font-size: 13px; line-height: 1.5; margin: 0;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
    min-height: calc(13px * 1.5 * 2);
}
.bot-card-tags {
    display: flex; align-items: center; flex-wrap: wrap; gap: 6px;
    margin-bottom: 4px;
}
.bot-card-status {
    font-size: 11px; font-weight: 600;
    padding: 3px 8px; border-radius: 999px;
    display: inline-flex; align-items: center; gap: 5px;
    background: rgba(34,197,94,0.12); color: #86efac;
    border: 1px solid rgba(34,197,94,0.25);
    white-space: nowrap;
    text-transform: uppercase; letter-spacing: 0.3px;
}
.bot-card-status.maintenance { background: rgba(251,191,36,0.12); color: #fcd34d; border-color: rgba(251,191,36,0.25); }
.bot-card-status.update { background: rgba(59,130,246,0.12); color: #93c5fd; border-color: rgba(59,130,246,0.25); }
.bot-card-status .status-dot {
    width: 6px; height: 6px; border-radius: 50%;
    background: currentColor; flex-shrink: 0;
}
.bot-card-meta {
    display: flex; align-items: center; gap: 16px; margin-top: 4px;
    padding-top: 14px; border-top: 1px solid var(--border);
}
.bot-card-version, .bot-card-size {
    font-size: 12px; color: var(--text-muted); display: flex; align-items: center; gap: 6px;
}
.bot-card-actions {
    display: flex; gap: 8px; margin-top: auto; padding-top: 16px;
}
.bot-card-actions .btn { flex: 1; justify-content: center; }
.btn-tutorial {
    background: var(--bg-tertiary); color: var(--text-secondary);
    border: 1px solid var(--border);
}
.btn-tutorial:hover { border-color: var(--accent-1); color: var(--accent-1); }
.btn-download { background: var(--success); color: white; flex: 1; }
.btn-download:hover { box-shadow: 0 4px 16px rgba(34,197,94,0.3); }

/* ── Video Modal (Dashboard) ── */
.video-player {
    aspect-ratio: 16/9; width: 100%; background: #000;
}
.video-player iframe { width: 100%; height: 100%; border: none; }
.modal-info-bar {
    padding: 16px 20px; display: flex; align-items: center;
    justify-content: space-between; flex-wrap: wrap; gap: 12px;
}
.modal-desc { color: var(--text-secondary); font-size: 14px; line-height: 1.6; flex: 1; }

/* ── Responsive ── */
@media (max-width: 1024px) {
    .sidebar { transform: translateX(-100%); }
    .sidebar.open { transform: translateX(0); }
    .sidebar-toggle { display: flex; }
    .sidebar-overlay.active { display: block; }
    .main-content { margin-left: 0; padding: 24px; padding-top: 72px; }
}

@media (max-width: 768px) {
    .main-content { padding: 16px; padding-top: 68px; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .stat-card { padding: 18px; }
    .stat-value { font-size: 28px; }
    .tabs { flex-direction: column; }
    .form-row { grid-template-columns: 1fr; }
    .card-header { padding: 16px; }
    .card-body { padding: 16px; }
    .bots-grid { grid-template-columns: 1fr; }
    .welcome-card { padding: 20px; }
    .welcome-head { flex-direction: column; align-items: flex-start; }
    .modal-box { margin: 10px; border-radius: var(--radius-lg); }
    /* Mobile table → card layout */
    .mobile-cards table, .mobile-cards thead, .mobile-cards tbody,
    .mobile-cards th, .mobile-cards tr, .mobile-cards td {
        display: block;
    }
    .mobile-cards thead { display: none; }
    .mobile-cards tr {
        background: var(--bg-card); border: 1px solid var(--border);
        border-radius: var(--radius-md); margin-bottom: 12px; padding: 16px;
    }
    .mobile-cards td {
        border: none; padding: 4px 0; display: flex; align-items: center;
        justify-content: space-between; gap: 8px;
    }
    .mobile-cards td::before {
        content: attr(data-label); font-weight: 600; font-size: 12px;
        color: var(--text-muted); text-transform: uppercase;
    }
    .mobile-cards td:last-child { justify-content: flex-start; padding-top: 12px; border-top: 1px solid var(--border); margin-top: 8px; }
}

@media (max-width: 480px) {
    .stats-grid { grid-template-columns: 1fr; }
    .bot-card-actions { flex-direction: column; }
    .toast { min-width: unset; }
}

/* ── 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); }

/* ── Selection ── */
::selection { background: rgba(99,102,241,0.3); color: white; }
