/* ══════════════════════════════════════════════
   AdCrypto — Telegram-style Design System v2.1
══════════════════════════════════════════════ */
:root {
    --bg-primary: #ffffff;
    --bg-secondary: #f0f2f5;
    --bg-surface: #ffffff;
    --text-primary: #1a1a2e;
    --text-secondary: #6c757d;
    --text-muted: #8e99a4;
    --border: #e0e0e0;
    --accent: #2AABEE;
    --accent-hover: #1d93d9;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-full: 50px;
    --font-main: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --transition: 0.2s ease;
}
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { font-family: var(--font-main); background: var(--bg-secondary); color: var(--text-primary); line-height: 1.6; min-height: 100vh; overflow-x: hidden; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.container-fluid { padding: 20px; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { font-weight: 700; line-height: 1.2; }

.btn-primary, .btn-outline, .btn-ghost, .btn-danger {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 10px 20px; border-radius: var(--radius-full);
    font-weight: 600; font-size: 0.95rem; transition: all var(--transition);
    cursor: pointer; border: none; gap: 8px; white-space: nowrap; text-decoration: none;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); color: #fff; text-decoration: none; }
.btn-outline { background: transparent; border: 1px solid var(--border); color: var(--text-primary); }
.btn-outline:hover { background: #f0f2f5; text-decoration: none; }
.btn-ghost { background: transparent; color: var(--text-secondary); }
.btn-ghost:hover { background: #f0f2f5; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #dc2626; }
.btn-lg { padding: 14px 32px; font-size: 1.1rem; }
.btn-sm { padding: 6px 16px; font-size: 0.85rem; }
.btn[disabled], button[disabled] { opacity: 0.6; cursor: not-allowed; }

.header { background: #fff; border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 100; }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 16px; }
.logo { font-size: 1.5rem; font-weight: 800; color: var(--accent); text-decoration: none; }
.logo:hover { text-decoration: none; }
.nav-links { display: flex; gap: 24px; }
.nav-links a { color: var(--text-secondary); font-weight: 500; }
.nav-links a:hover { color: var(--accent); text-decoration: none; }
.header-actions { display: flex; align-items: center; gap: 12px; }

.burger { display: none; flex-direction: column; gap: 5px; cursor: pointer; background: none; border: none; padding: 8px; }
.burger span { width: 24px; height: 2px; background: var(--text-primary); border-radius: 2px; transition: all 0.3s; }
.burger.active span:nth-child(1) { transform: rotate(45deg) translate(5px,5px); }
.burger.active span:nth-child(2) { opacity: 0; }
.burger.active span:nth-child(3) { transform: rotate(-45deg) translate(5px,-5px); }

.mobile-menu { display: none; position: fixed; top: 64px; left: 0; width: 100%; background: #fff; border-bottom: 1px solid var(--border); box-shadow: 0 4px 12px rgba(0,0,0,0.1); z-index: 90; padding: 16px 20px; flex-direction: column; gap: 8px; max-height: calc(100vh - 64px); overflow-y: auto; }
.mobile-menu.active { display: flex; }
.mobile-menu a { padding: 12px 16px; border-radius: var(--radius-md); font-weight: 500; color: var(--text-secondary); font-size: 1rem; text-decoration: none; display: block; transition: background var(--transition); }
.mobile-menu a:hover, .mobile-menu a.active { background: #f0f2f5; color: var(--accent); }

.lang-switch-mobile { display: flex; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--border); margin-top: 8px; }
.lang-switch-mobile a { flex: 1; text-align: center; padding: 10px; border-radius: var(--radius-sm); border: 1px solid var(--border); font-weight: 600; text-decoration: none; }
.lang-switch-mobile a.active { background: var(--accent); color: #fff; border-color: var(--accent); }

.sidebar { position: fixed; top: 0; left: 0; width: 260px; height: 100vh; background: #fff; border-right: 1px solid var(--border); display: flex; flex-direction: column; z-index: 50; padding: 20px 0; }
.sidebar-header { padding: 0 20px 20px; border-bottom: 1px solid var(--border); }
.sidebar-nav { flex: 1; padding: 20px; display: flex; flex-direction: column; gap: 4px; overflow-y: auto; }
.sidebar-nav a { display: flex; align-items: center; gap: 12px; padding: 10px 16px; border-radius: var(--radius-md); color: var(--text-secondary); font-weight: 500; transition: all var(--transition); text-decoration: none; }
.sidebar-nav a:hover, .sidebar-nav a.active { background: #f0f2f5; color: var(--accent); text-decoration: none; }
.sidebar-nav a.text-danger { color: var(--danger); }
.sidebar-nav a.text-danger:hover { background: #fee2e2; color: #991b1b; }
.sidebar-nav hr { margin: 12px 0; border: 0; border-top: 1px solid var(--border); }
.sidebar-footer { padding: 20px; border-top: 1px solid var(--border); text-align: center; }
.main-with-sidebar { margin-left: 260px; min-height: 100vh; }

.mobile-dashboard-header { display: none; position: sticky; top: 0; z-index: 100; background: #fff; border-bottom: 1px solid var(--border); padding: 0 16px; height: 56px; align-items: center; justify-content: space-between; }

.lang-switch { position: relative; display: inline-block; }
.lang-current { background: none; border: none; display: flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: var(--radius-full); cursor: pointer; font-size: 0.9rem; font-weight: 600; color: var(--text-secondary); transition: background var(--transition); }
.lang-current:hover { background: #f0f2f5; }
.lang-current i { font-size: 1.1rem; }
.lang-dropdown { position: absolute; top: 100%; right: 0; margin-top: 4px; background: #fff; border: 1px solid var(--border); border-radius: var(--radius-md); box-shadow: 0 4px 12px rgba(0,0,0,0.1); min-width: 150px; display: none; flex-direction: column; z-index: 200; }
.lang-switch.open .lang-dropdown { display: flex; }
.lang-dropdown a { padding: 10px 16px; font-size: 0.9rem; font-weight: 500; color: var(--text-secondary); text-decoration: none; border-bottom: 1px solid var(--border); }
.lang-dropdown a:last-child { border-bottom: none; }
.lang-dropdown a:hover, .lang-dropdown a.active { background: #f0f2f5; color: var(--accent); }

.overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.3); z-index: 80; }
.overlay.active { display: block; }

.hero { padding: 60px 0 40px; background: #fff; }
.hero-title { font-size: clamp(2rem, 6vw, 3.5rem); font-weight: 800; margin-bottom: 20px; }
.hero-subtitle { font-size: 1.2rem; color: var(--text-secondary); max-width: 700px; margin: 0 auto 40px; }
.section { padding: 60px 0; }
.section-title { font-size: 2rem; font-weight: 700; text-align: center; margin-bottom: 40px; }
.bg-light { background: var(--bg-secondary); }

.feature-card { background: #fff; border-radius: var(--radius-lg); padding: 32px; text-align: center; box-shadow: 0 2px 8px rgba(0,0,0,0.05); transition: transform 0.2s; }
.feature-card:hover { transform: translateY(-4px); }
.feature-icon { font-size: 2.5rem; color: var(--accent); margin-bottom: 20px; }

.steps { display: flex; justify-content: center; gap: 40px; flex-wrap: wrap; }
.step { text-align: center; max-width: 250px; }
.step-number { width: 50px; height: 50px; background: var(--accent); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.5rem; font-weight: 700; margin: 0 auto 16px; color: #fff; }

.pricing-card { background: #fff; border-radius: var(--radius-lg); padding: 32px; text-align: center; box-shadow: 0 2px 8px rgba(0,0,0,0.05); }
.pricing-card.popular { border: 2px solid var(--accent); }
.price { font-size: 2.5rem; font-weight: 700; color: var(--accent); margin: 16px 0; }
.pricing-card ul { list-style: none; margin: 24px 0; text-align: left; }
.pricing-card ul li { padding: 8px 0; color: var(--text-secondary); }

.auth-container { max-width: 440px; margin: 40px auto; padding: 0 16px; }
.auth-card { background: #fff; border-radius: var(--radius-lg); padding: 32px; box-shadow: 0 2px 8px rgba(0,0,0,0.05); }
.auth-link { margin-top: 16px; text-align: center; color: var(--text-muted); }

.card { background: #fff; border-radius: var(--radius-md); padding: 24px; box-shadow: 0 1px 3px rgba(0,0,0,0.05); }

.form-group { margin-bottom: 16px; }
.form-label { display: block; font-weight: 600; margin-bottom: 6px; font-size: 0.9rem; }
.form-input, .form-select { width: 100%; padding: 10px 16px; border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: 0.95rem; transition: border-color 0.2s; background: #fff; font-family: inherit; }
.form-input:focus, .form-select:focus { border-color: var(--accent); outline: none; }
.form-inline { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.form-inline .form-select { width: auto; }
.w-full { width: 100%; }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--border); }
th { font-weight: 600; color: var(--text-secondary); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.5px; }

.badge { padding: 4px 12px; border-radius: 20px; font-size: 0.8rem; font-weight: 600; display: inline-block; }
.badge-success { background: #d1fae5; color: #065f46; }
.badge-warning { background: #fef3c7; color: #92400e; }
.badge-danger { background: #fee2e2; color: #991b1b; }
.badge-info { background: #dbeafe; color: #1e40af; }

.alert { padding: 12px 20px; border-radius: var(--radius-sm); margin-bottom: 16px; }
.alert-success { background: #d1fae5; color: #065f46; }
.alert-danger { background: #fee2e2; color: #991b1b; }
.alert-warning { background: #fef3c7; color: #92400e; }
.alert-info { background: #dbeafe; color: #1e40af; }

.spinner { display: inline-block; width: 16px; height: 16px; border: 2px solid rgba(255,255,255,0.3); border-top-color: #fff; border-radius: 50%; animation: spin 0.6s linear infinite; vertical-align: middle; }
.spinner-dark { border-color: rgba(0,0,0,0.1); border-top-color: var(--accent); }
@keyframes spin { to { transform: rotate(360deg); } }

.footer { padding: 40px 0; text-align: center; color: var(--text-muted); }

.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.text-danger { color: var(--danger); }
.text-success { color: var(--success); }
.text-warning { color: var(--warning); }
.text-accent { color: var(--accent); }
.font-mono { font-family: 'SF Mono', Monaco, Consolas, monospace; font-size: 0.9em; }

.flex-between { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.gap-2 { gap: 16px; }
.mt-2 { margin-top: 16px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }

.fade-in { animation: fadeIn 0.4s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 24px; }

.stat-value { font-size: 2rem; font-weight: 700; color: var(--accent); }

.empty-state { text-align: center; padding: 40px 20px; color: var(--text-muted); }
.empty-state i { font-size: 3rem; margin-bottom: 16px; opacity: 0.3; }
.empty-state h3 { margin-bottom: 8px; color: var(--text-primary); }

.code-block { background: #1e1e3a; color: #ecedee; padding: 16px; border-radius: var(--radius-sm); font-family: 'SF Mono', Monaco, Consolas, monospace; font-size: 0.85rem; word-break: break-all; position: relative; overflow-x: auto; }
.code-block .copy-btn { position: absolute; top: 8px; right: 8px; background: rgba(255,255,255,0.1); border: none; color: #fff; padding: 4px 10px; border-radius: 4px; cursor: pointer; font-size: 0.8rem; }
.code-block .copy-btn:hover { background: rgba(255,255,255,0.2); }

.error-404 { text-align: center; padding: 80px 20px; }
.error-404 h1 { font-size: 6rem; color: var(--accent); margin-bottom: 16px; }

@media (max-width: 992px) {
    .sidebar { transform: translateX(-100%); transition: transform 0.3s; z-index: 90; }
    .sidebar.open { transform: translateX(0); }
    .main-with-sidebar { margin-left: 0; }
    .mobile-dashboard-header { display: flex; }
    .header-actions .btn-outline, .header-actions .btn-primary { display: none; }
    .burger { display: flex; }
    .nav-links { display: none; }
}
@media (max-width: 768px) {
    .hero { padding: 40px 0; }
    .hero-title { font-size: 1.8rem; }
    .section { padding: 40px 0; }
    .section-title { font-size: 1.6rem; }
    .grid-2, .grid-3 { grid-template-columns: 1fr; }
    .steps { gap: 24px; }
    .feature-card, .pricing-card { padding: 24px; }
    .container-fluid { padding: 12px; }
    .card { padding: 16px; }
    .stat-value { font-size: 1.6rem; }
}
@media (max-width: 480px) {
    .header-inner { height: 56px; }
    .mobile-menu { top: 56px; }
    .hero-title { font-size: 1.6rem; }
    .flex-between { flex-direction: column; align-items: stretch; }
}