/* AdRotate — стили (чистый CSS, без сборки) */
:root {
  --bg: #ffffff;
  --bg-muted: #f8fafc;
  --fg: #0f172a;
  --muted: #64748b;
  --border: #e2e8f0;
  --teal: #0d9488;
  --teal-dark: #0f766e;
  --emerald: #059669;
  --violet: #7c3aed;
  --amber: #d97706;
  --rose: #e11d48;
  --radius: 0.5rem;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
  background: var(--bg-muted);
  color: var(--fg);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
input, textarea, select { font-family: inherit; font-size: 14px; }

/* layout */
.app { display: flex; flex-direction: column; min-height: 100vh; }
.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 16px; }

/* header */
.header {
  position: sticky; top: 0; z-index: 40;
  background: rgba(255,255,255,.85); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.header .inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 16px; }
.logo .mark {
  width: 36px; height: 36px; border-radius: 10px;
  background: linear-gradient(135deg, #14b8a6, #059669);
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-size: 18px; font-weight: 900;
}
.logo .sub { font-size: 11px; color: var(--muted); font-weight: 400; }

.nav { display: flex; align-items: center; gap: 8px; }
.nav-desktop { display: flex; }
.nav-mobile { display: none; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 8px 14px; border-radius: var(--radius); border: 1px solid var(--border);
  background: #fff; color: var(--fg); font-size: 14px; font-weight: 500;
  transition: all .15s; white-space: nowrap;
}
.btn:hover { background: var(--bg-muted); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--teal); border-color: var(--teal); color: #fff; }
.btn-primary:hover { background: var(--teal-dark); }
.btn-danger { background: var(--rose); border-color: var(--rose); color: #fff; }
.btn-danger:hover { background: #be123c; }
.btn-ghost { background: transparent; border-color: transparent; }
.btn-ghost:hover { background: var(--bg-muted); }
.btn-sm { padding: 6px 10px; font-size: 13px; }
.btn-lg { padding: 12px 20px; font-size: 15px; }

.balance-pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px; border-radius: 999px; border: 1px solid var(--border);
  background: var(--bg-muted); font-size: 14px; font-weight: 600;
}
.balance-pill svg { color: var(--teal); width: 16px; height: 16px; }

.user-chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px; border-radius: var(--radius); border: 1px solid var(--border);
  background: #fff; font-size: 14px;
}
.user-chip .avatar {
  width: 24px; height: 24px; border-radius: 50%;
  background: #ccfbf1; color: #0f766e; font-weight: 700; font-size: 12px;
  display: flex; align-items: center; justify-content: center;
}

.menu-toggle { display: none; background: transparent; border: 0; padding: 8px; }
.mobile-menu { display: none; border-top: 1px solid var(--border); background: #fff; padding: 12px 16px; flex-direction: column; gap: 8px; }
.mobile-menu.open { display: flex; }

/* footer */
.footer { margin-top: auto; border-top: 1px solid var(--border); background: #fff; }
.footer .inner { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 24px; padding: 32px 16px; }
.footer h4 { font-size: 14px; font-weight: 600; margin-bottom: 8px; }
.footer ul { list-style: none; }
.footer li { font-size: 13px; color: var(--muted); padding: 3px 0; }
.footer .copy { border-top: 1px solid var(--border); padding: 16px; text-align: center; font-size: 12px; color: var(--muted); }

/* landing */
.hero { position: relative; overflow: hidden; border-bottom: 1px solid var(--border); background: linear-gradient(to bottom, #f0fdfa, #fff); padding: 48px 0; }
.hero-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; background: #ccfbf1; color: #0f766e; font-size: 12px; font-weight: 500; border: 1px solid #99f6e4; }
.hero h1 { font-size: 40px; font-weight: 900; line-height: 1.1; letter-spacing: -0.02em; margin: 16px 0; }
.hero h1 .grad { background: linear-gradient(90deg, var(--teal), var(--emerald)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p { font-size: 17px; color: var(--muted); max-width: 520px; }
.hero-actions { display: flex; gap: 8px; margin-top: 24px; flex-wrap: wrap; }
.hero-checks { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 24px; font-size: 14px; color: var(--muted); }
.hero-checks span { display: inline-flex; align-items: center; gap: 6px; }
.hero-checks svg { color: var(--emerald); width: 16px; height: 16px; }

.demo-box { max-width: 420px; }
.demo-label { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.live-dot { display: inline-flex; align-items: center; gap: 4px; color: var(--teal); }
.live-dot .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--teal); position: relative; }
.live-dot .dot::before { content: ''; position: absolute; inset: -3px; border-radius: 50%; background: var(--teal); opacity: .4; animation: ping 1.5s infinite; }
@keyframes ping { 0% { transform: scale(1); opacity: .4; } 75%,100% { transform: scale(2); opacity: 0; } }
.demo-frame { border: 1px solid var(--border); border-radius: 12px; overflow: hidden; box-shadow: 0 10px 30px rgba(0,0,0,.08); }
.demo-frame iframe { display: block; width: 100%; height: 88px; border: 0; }
.demo-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 8px; }
.demo-stat { border: 1px solid var(--border); background: var(--bg-muted); border-radius: var(--radius); padding: 8px; text-align: center; }
.demo-stat .v { font-size: 14px; font-weight: 700; }
.demo-stat .l { font-size: 10px; color: var(--muted); }

.section { padding: 48px 0; }
.section-title { font-size: 28px; font-weight: 700; text-align: center; letter-spacing: -0.01em; }
.section-sub { text-align: center; color: var(--muted); margin-top: 8px; margin-bottom: 32px; }
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.feature { background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 20px; transition: box-shadow .15s; }
.feature:hover { box-shadow: 0 4px 12px rgba(0,0,0,.06); }
.feature .icon { width: 40px; height: 40px; border-radius: 10px; display: flex; align-items: center; justify-content: center; margin-bottom: 12px; }
.feature .icon svg { width: 20px; height: 20px; }
.feature h3 { font-size: 16px; font-weight: 600; }
.feature p { font-size: 14px; color: var(--muted); margin-top: 4px; }
.ic-teal { color: var(--teal); background: #f0fdfa; }
.ic-emerald { color: var(--emerald); background: #ecfdf5; }
.ic-amber { color: var(--amber); background: #fffbeb; }
.ic-violet { color: var(--violet); background: #f5f3ff; }
.ic-rose { color: var(--rose); background: #fff1f2; }
.ic-sky { color: #0284c7; background: #f0f9ff; }

.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 24px; }
.step .num { width: 40px; height: 40px; border-radius: 50%; background: var(--teal); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; margin-bottom: 12px; }
.step h3 { font-size: 16px; font-weight: 600; }
.step p { font-size: 14px; color: var(--muted); margin-top: 4px; }

.cta-card { background: linear-gradient(135deg, var(--teal), var(--emerald)); color: #fff; border-radius: 16px; padding: 48px 24px; text-align: center; }
.cta-card h2 { font-size: 28px; font-weight: 700; }
.cta-card p { color: #ccfbf1; margin-top: 8px; }

/* dashboard / admin */
.page { padding: 24px 0; }
.page-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; flex-wrap: wrap; gap: 12px; }
.page-header h1 { font-size: 22px; font-weight: 700; }
.page-header .sub { font-size: 13px; color: var(--muted); }

.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; margin-bottom: 20px; }
.stat-card { background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 14px; }
.stat-card .icon { width: 32px; height: 32px; border-radius: 8px; display: flex; align-items: center; justify-content: center; margin-bottom: 8px; }
.stat-card .icon svg { width: 16px; height: 16px; }
.stat-card .l { font-size: 11px; color: var(--muted); }
.stat-card .v { font-size: 18px; font-weight: 700; }

/* tabs */
.tabs { display: flex; gap: 4px; background: #f1f5f9; padding: 3px; border-radius: 10px; overflow-x: auto; }
.tab { flex: 1; padding: 8px 12px; border: 0; background: transparent; border-radius: 7px; font-size: 14px; font-weight: 500; color: var(--muted); white-space: nowrap; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.tab.active { background: #fff; color: var(--fg); box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.tab svg { width: 16px; height: 16px; }
.tab-panel { margin-top: 16px; display: none; }
.tab-panel.active { display: block; }

/* card */
.card { background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 20px; }
.card h3 { font-size: 15px; font-weight: 600; display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.card h3 svg { width: 16px; height: 16px; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }

/* table */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; font-size: 12px; color: var(--muted); font-weight: 500; padding: 0 12px 8px 0; border-bottom: 1px solid var(--border); }
td { padding: 10px 12px 10px 0; border-bottom: 1px solid var(--border); vertical-align: top; }
tr:last-child td { border-bottom: 0; }

/* badges */
.status { display: inline-flex; align-items: center; padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 500; border: 1px solid; }
.status-PENDING { background: #fef3c7; color: #92400e; border-color: #fde68a; }
.status-APPROVED { background: #d1fae5; color: #065f46; border-color: #a7f3d0; }
.status-REJECTED, .status-BLOCKED { background: #fee2e2; color: #991b1b; border-color: #fecaca; }
.status-PAUSED { background: #f1f5f9; color: #475569; border-color: #e2e8f0; }
.status-PAID, .status-COMPLETED, .status-ACTIVE { background: #d1fae5; color: #065f46; border-color: #a7f3d0; }

/* forms */
.field { margin-bottom: 12px; }
.field label { display: block; font-size: 13px; font-weight: 500; margin-bottom: 4px; }
.input, .textarea, .select {
  width: 100%; padding: 8px 12px; border: 1px solid var(--border); border-radius: var(--radius);
  background: #fff; color: var(--fg); font-size: 14px;
}
.input:focus, .textarea:focus, .select:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px rgba(13,148,136,.1); }
.textarea { resize: vertical; min-height: 60px; }

/* dialog */
.dialog-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.5); display: none; align-items: center; justify-content: center; z-index: 50; padding: 16px; }
.dialog-overlay.open { display: flex; }
.dialog { background: #fff; border-radius: 12px; padding: 24px; width: 100%; max-width: 440px; max-height: 90vh; overflow-y: auto; }
.dialog h2 { font-size: 20px; font-weight: 700; }
.dialog .desc { font-size: 14px; color: var(--muted); margin-top: 4px; }
.dialog .close { float: right; background: transparent; border: 0; font-size: 20px; color: var(--muted); }

/* toast */
.toast-container { position: fixed; top: 16px; right: 16px; z-index: 100; display: flex; flex-direction: column; gap: 8px; }
.toast { background: #fff; border: 1px solid var(--border); border-left: 4px solid var(--teal); border-radius: 8px; padding: 12px 16px; box-shadow: 0 4px 12px rgba(0,0,0,.1); max-width: 360px; animation: slideIn .2s; }
.toast.error { border-left-color: var(--rose); }
.toast.success { border-left-color: var(--emerald); }
@keyframes slideIn { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

/* embed code */
.embed { border: 1px dashed #99f6e4; background: #f0fdfa; border-radius: 8px; padding: 10px; margin-top: 12px; }
.embed-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.embed-head span { font-size: 12px; font-weight: 500; color: var(--teal); display: inline-flex; align-items: center; gap: 6px; }
.embed pre { background: #0f172a; color: #e2e8f0; padding: 8px; border-radius: 6px; font-size: 11px; overflow-x: auto; white-space: pre-wrap; word-break: break-all; }

/* site card */
.site-card { background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 16px; }
.site-card .head { display: flex; align-items: start; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.site-card .title { font-weight: 600; font-size: 15px; }
.site-card .url { font-size: 12px; color: var(--teal); display: inline-flex; align-items: center; gap: 4px; }
.site-card .stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 12px 0; }
.site-card .stat { background: var(--bg-muted); border-radius: 8px; padding: 8px; text-align: center; }
.site-card .stat .v { font-size: 14px; font-weight: 700; }
.site-card .stat .l { font-size: 10px; color: var(--muted); }
.icon-btn { background: transparent; border: 0; padding: 6px; border-radius: 6px; color: var(--muted); }
.icon-btn:hover { background: var(--bg-muted); }
.icon-btn.danger { color: var(--rose); }

.amount { font-variant-numeric: tabular-nums; }
.positive { color: var(--emerald); }
.negative { color: var(--rose); }

/* responsive */
@media (max-width: 768px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero h1 { font-size: 30px; }
  .nav-desktop { display: none; }
  .menu-toggle { display: inline-flex; }
  .hero { padding: 32px 0; }
  .section { padding: 32px 0; }
  .tabs { flex-wrap: nowrap; }
  .page-header h1 { font-size: 18px; }
}

/* scrollbar */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #94a3b8; }
