:root {
  --bg-dark: #090e17;
  --bg-card: rgba(22, 30, 46, 0.75);
  --bg-card-hover: rgba(30, 41, 64, 0.9);
  --border-glass: rgba(255, 255, 255, 0.08);
  --border-focus: #6366f1;
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --brand-cyan: #38bdf8;
  --brand-indigo: #6366f1;
  --brand-green: #10b981;
  --brand-amber: #f59e0b;
  --brand-red: #ef4444;
  --vk-color: #4680c2;
  --tg-color: #229ed9;
  --ig-color: #e1306c;
  --dzen-color: #ff3333;
  --radius-lg: 16px;
  --radius-md: 12px;
  --radius-sm: 8px;
  --shadow-main: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 25px rgba(99, 102, 241, 0.2);
  --font-heading: 'Outfit', sans-serif;
  --font-body: 'Inter', sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  background-color: var(--bg-dark);
  background-image: 
    radial-gradient(at 0% 0%, rgba(99, 102, 241, 0.15) 0px, transparent 50%),
    radial-gradient(at 100% 100%, rgba(56, 189, 248, 0.1) 0px, transparent 50%);
  background-attachment: fixed;
  color: var(--text-primary);
  font-family: var(--font-body);
  line-height: 1.5;
  min-height: 100vh;
}

/* GLASS PANEL UTILITY */
.glass-panel {
  background: var(--bg-card);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-main);
}

/* TOP NAVIGATION */
.top-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 28px;
  margin: 16px 24px;
  position: sticky;
  top: 16px;
  z-index: 100;
}

.nav-left {
  display: flex;
  align-items: center;
  gap: 28px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--brand-indigo), var(--brand-cyan));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
}

.brand-text h1 {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.1;
  background: linear-gradient(to right, #fff, #cbd5e1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-text .sub {
  font-size: 0.78rem;
  color: var(--text-secondary);
}

.channel-pills {
  display: flex;
  gap: 8px;
}

.channel-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-glass);
}

.channel-pill .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
}

.channel-pill.vk .dot { background: var(--vk-color); box-shadow: 0 0 6px var(--vk-color); }
.channel-pill.tg .dot { background: var(--tg-color); box-shadow: 0 0 6px var(--tg-color); }
.channel-pill.ig .dot { background: var(--ig-color); box-shadow: 0 0 6px var(--ig-color); }
.channel-pill.dzen .dot { background: var(--dzen-color); box-shadow: 0 0 6px var(--dzen-color); }

.nav-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-profile {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 999px;
  border: 1px solid var(--border-glass);
}

.user-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
}

.role-badge {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 6px;
}

.role-badge.admin {
  background: rgba(99, 102, 241, 0.2);
  color: #a5b4fc;
  border: 1px solid rgba(99, 102, 241, 0.4);
}

.role-badge.guest {
  background: rgba(245, 158, 11, 0.2);
  color: #fcd34d;
  border: 1px solid rgba(245, 158, 11, 0.4);
}

.btn-logout {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  opacity: 0.7;
  transition: opacity 0.2s;
}

.btn-logout:hover { opacity: 1; }

/* GUEST BANNER */
.guest-banner {
  margin: 0 24px 16px;
  padding: 12px 20px;
  background: rgba(245, 158, 11, 0.1);
  border-color: rgba(245, 158, 11, 0.3);
}

.guest-banner-content {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.88rem;
  color: #fde68a;
}

.guest-banner-content .icon { font-size: 1.4rem; }

/* BUTTONS */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 18px;
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.88rem;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, var(--brand-indigo), #4f46e5);
  color: #fff;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #4f46e5, #4338ca);
  transform: translateY(-1px);
}

.btn-ai {
  background: linear-gradient(135deg, #8b5cf6, #ec4899);
  color: #fff;
  box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
}

.btn-ai:hover {
  transform: translateY(-1px);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  border-color: var(--border-glass);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.1);
}

.btn-danger {
  background: rgba(239, 68, 68, 0.2);
  color: #fca5a5;
  border-color: rgba(239, 68, 68, 0.4);
}

.btn-danger:hover {
  background: rgba(239, 68, 68, 0.35);
}

.btn-sm { padding: 6px 14px; font-size: 0.82rem; }
.btn-xs { padding: 4px 10px; font-size: 0.75rem; }
.btn-block { width: 100%; }

/* TAB NAVIGATION */
.tab-nav {
  display: flex;
  gap: 8px;
  margin: 0 24px 20px;
  border-bottom: 1px solid var(--border-glass);
  padding-bottom: 8px;
}

.tab-btn {
  background: transparent;
  border: none;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
}

.tab-btn:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.04);
}

.tab-btn.active {
  color: #fff;
  background: rgba(99, 102, 241, 0.15);
  border: 1px solid rgba(99, 102, 241, 0.3);
}

/* TAB CONTENT */
.tab-content {
  display: none;
  padding: 0 24px 40px;
}

.tab-content.active { display: block; animation: fadeIn 0.3s ease; }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.content-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 24px;
}

.content-header h2 {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  font-weight: 700;
}

.section-desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-top: 4px;
}

/* POSTS GRID (7-DAY PLAN) */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
}

.post-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  cursor: pointer;
}

.post-card:hover {
  transform: translateY(-4px);
  border-color: rgba(99, 102, 241, 0.4);
  box-shadow: 0 16px 30px -10px rgba(0, 0, 0, 0.6);
}

.post-card-thumb {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-bottom: 1px solid var(--border-glass);
}

.post-card-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.post-card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.post-card-date {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--brand-cyan);
}

.status-badge {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  text-transform: uppercase;
}

.status-badge.scheduled { background: rgba(56, 189, 248, 0.15); color: #7dd3fc; border: 1px solid rgba(56, 189, 248, 0.3); }
.status-badge.published { background: rgba(16, 185, 129, 0.15); color: #6ee7b7; border: 1px solid rgba(16, 185, 129, 0.3); }
.status-badge.draft { background: rgba(148, 163, 184, 0.15); color: #cbd5e1; border: 1px solid rgba(148, 163, 184, 0.3); }
.status-badge.failed { background: rgba(239, 68, 68, 0.15); color: #fca5a5; border: 1px solid rgba(239, 68, 68, 0.3); }

.post-card-title {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: 8px;
}

.post-card-snippet {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.45;
  margin-bottom: 16px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}

.post-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 12px;
  border-top: 1px solid var(--border-glass);
}

.post-platform-icons {
  display: flex;
  gap: 6px;
}

.platform-mini-tag {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
}

.platform-mini-tag.vk { background: var(--vk-color); color: #fff; }
.platform-mini-tag.telegram { background: var(--tg-color); color: #fff; }
.platform-mini-tag.instagram { background: var(--ig-color); color: #fff; }
.platform-mini-tag.dzen { background: var(--dzen-color); color: #fff; }

.btn-card-edit {
  font-size: 0.8rem;
  color: var(--brand-cyan);
  background: none;
  border: none;
  font-weight: 600;
  cursor: pointer;
}

/* KPI METRIC CARDS */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  margin-bottom: 28px;
}

.kpi-card {
  padding: 22px;
  position: relative;
  overflow: hidden;
}

.kpi-card::after {
  content: '';
  position: absolute;
  top: 0; right: 0; width: 80px; height: 80px;
  border-radius: 50%;
  filter: blur(35px);
  z-index: 0;
}

.kpi-card.vk::after { background: rgba(70, 128, 194, 0.4); }
.kpi-card.tg::after { background: rgba(34, 158, 217, 0.4); }
.kpi-card.ig::after { background: rgba(225, 48, 108, 0.4); }
.kpi-card.dzen::after { background: rgba(255, 51, 51, 0.4); }

.kpi-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  position: relative;
  z-index: 1;
}

.kpi-title {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
}

.kpi-badge {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.kpi-value {
  font-family: var(--font-heading);
  font-size: 2.4rem;
  font-weight: 800;
  line-height: 1;
  margin-bottom: 6px;
  position: relative;
  z-index: 1;
}

.kpi-sub {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-bottom: 14px;
}

.kpi-footer {
  font-size: 0.8rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border-glass);
  padding-top: 10px;
}

.kpi-footer b { color: var(--text-primary); }

/* TABLES */
.analytics-tables-container {
  padding: 24px;
}

.table-header-tabs {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border-glass);
  padding-bottom: 14px;
}

.sub-tabs { display: flex; gap: 8px; }

.sub-tab-btn {
  background: transparent;
  border: none;
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
}

.sub-tab-btn.active {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.subtab-content { display: none; }
.subtab-content.active { display: block; }

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.data-table th {
  text-align: left;
  padding: 12px 16px;
  color: var(--text-muted);
  font-weight: 600;
  border-bottom: 1px solid var(--border-glass);
}

.data-table td {
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  vertical-align: middle;
}

.data-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

.data-table a {
  color: var(--brand-cyan);
  text-decoration: none;
}

.data-table a:hover { text-decoration: underline; }

/* GROUPS GRID */
.groups-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

.group-card {
  padding: 20px;
}

.group-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
}

.group-card h3 {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 700;
}

.group-card-platform {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 4px;
}

.group-card-id {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 14px;
}

.group-card-time {
  font-size: 0.82rem;
  color: var(--brand-amber);
  margin-bottom: 16px;
}

/* AI WORKBENCH */
.ai-workbench {
  padding: 24px;
}

.ai-prompt-row {
  display: flex;
  gap: 12px;
  margin-top: 8px;
  margin-bottom: 14px;
}

.ai-prompt-row input { flex: 1; }

.ai-presets {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.chip-preset {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-glass);
  border-radius: 999px;
  padding: 4px 12px;
  color: var(--text-secondary);
  font-size: 0.78rem;
  cursor: pointer;
  transition: all 0.2s;
}

.chip-preset:hover {
  background: rgba(99, 102, 241, 0.2);
  color: #fff;
}

.ai-result-box {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border-glass);
}

/* FORMS & INPUTS */
.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

input[type="text"],
input[type="password"],
select,
textarea {
  width: 100%;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.92rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

input[type="text"]:focus,
input[type="password"]:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.25);
}

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

.flex-1 { flex: 1; }
.flex-2 { flex: 2; }

.platforms-selector {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding: 8px 0;
}

.platform-checkbox {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  font-size: 0.88rem;
}

.image-uploader-row {
  display: flex;
  align-items: center;
  gap: 16px;
}

.post-preview-thumb {
  width: 90px;
  height: 60px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-glass);
}

.uploader-inputs {
  display: flex;
  flex: 1;
  gap: 8px;
}

.upload-label { cursor: pointer; }

.label-with-counter {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

#charCounter { font-size: 0.75rem; color: var(--text-muted); }

/* AI REFINE TOOLBAR IN MODAL */
.ai-refine-toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px 14px;
  margin-bottom: 16px;
  border-color: rgba(139, 92, 246, 0.3);
  background: rgba(139, 92, 246, 0.08);
}

.toolbar-label {
  font-size: 0.8rem;
  font-weight: 700;
  color: #c084fc;
}

.btn-refine {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 0.76rem;
  font-weight: 600;
  color: #f1f5f9;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-refine:hover {
  background: #8b5cf6;
  border-color: #8b5cf6;
}

/* MODAL WINDOWS */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(5, 8, 16, 0.75);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-window {
  width: 100%;
  max-width: 760px;
  max-height: 90vh;
  overflow-y: auto;
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
}

.modal-window.small { max-width: 480px; }

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

.modal-header h3 {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  font-weight: 700;
}

.modal-close {
  background: none;
  border: none;
  font-size: 1.6rem;
  color: var(--text-muted);
  cursor: pointer;
}

.modal-close:hover { color: #fff; }

.modal-body { padding: 24px; }

.modal-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px;
  border-top: 1px solid var(--border-glass);
}

.footer-right { display: flex; gap: 10px; }

/* LOGIN VIEW */
.login-body {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 20px;
}

.login-card {
  width: 100%;
  max-width: 440px;
  padding: 36px;
}

.login-brand {
  text-align: center;
  margin-bottom: 28px;
}

.login-brand .logo-badge {
  width: 56px;
  height: 56px;
  margin: 0 auto 12px;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, var(--brand-indigo), var(--brand-cyan));
  font-size: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 20px rgba(99, 102, 241, 0.4);
}

.login-brand h2 {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  font-weight: 800;
}

.login-brand .subtitle {
  font-size: 0.88rem;
  color: var(--text-secondary);
  margin-top: 4px;
}

.login-hints {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border-glass);
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.login-hints ul {
  list-style: none;
  margin-top: 8px;
}

.login-hints li { margin-bottom: 6px; }

.alert {
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  margin-bottom: 16px;
}

.alert-error {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #fca5a5;
}

/* RESPONSIVE */
@media (max-width: 768px) {
  .top-nav { flex-direction: column; gap: 14px; align-items: stretch; margin: 10px; padding: 16px; }
  .nav-left, .nav-right { justify-content: space-between; }
  .channel-pills { display: none; }
  .form-row { flex-direction: column; gap: 0; }
}

/* MULTI-PROJECT ENHANCEMENTS */
.project-pill-nav {
  display: flex;
  gap: 8px;
  padding: 10px 16px;
  margin-bottom: 24px;
  overflow-x: auto;
}

.project-pill {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-glass);
  color: var(--text-secondary);
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.project-pill:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.2);
}

.project-pill.active {
  background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
  color: #fff;
  border-color: transparent;
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.35);
}

.project-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 700;
}

.tag-praktikm {
  background: rgba(59, 130, 246, 0.15);
  border: 1px solid rgba(59, 130, 246, 0.35);
  color: #93c5fd;
}

.tag-flowers {
  background: rgba(236, 72, 153, 0.15);
  border: 1px solid rgba(236, 72, 153, 0.35);
  color: #f472b6;
}

.tag-castoreum {
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.35);
  color: #fcd34d;
}

.single-project-analytics {
  padding: 28px;
  margin-top: 16px;
}

.project-header-row {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.stat-avatar-large {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 2px solid var(--accent-purple);
  box-shadow: 0 4px 16px rgba(168, 85, 247, 0.3);
  object-fit: cover;
}

.project-badges {
  display: flex;
  gap: 8px;
  margin-top: 8px;
  flex-wrap: wrap;
}

.project-stat-counter {
  margin-left: auto;
  text-align: right;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-glass);
  padding: 12px 20px;
  border-radius: var(--radius-md);
}

.project-stat-counter .counter-val {
  display: block;
  font-family: 'Outfit', sans-serif;
  font-size: 2.2rem;
  font-weight: 800;
  color: #fff;
}

.project-stat-counter .counter-lbl {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.project-info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}

.info-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-glass);
  padding: 16px 18px;
  border-radius: var(--radius-md);
}

.info-card h4 {
  font-size: 0.95rem;
  margin-bottom: 8px;
  color: #e2e8f0;
}

.info-card p {
  font-size: 0.85rem;
  line-height: 1.5;
  color: var(--text-secondary);
}


/* Platform Content Tabs */
.platform-content-tabs-wrapper {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  flex-wrap: wrap;
  gap: 10px;
}

.platform-content-tabs {
  display: flex;
  gap: 6px;
  background: rgba(15, 23, 42, 0.6);
  padding: 4px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-glass);
}

.tab-btn-platform {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.tab-btn-platform:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
}

.tab-btn-platform.active {
  color: #fff;
  background: var(--accent-primary);
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.4);
}

.tab-btn-platform[data-platform="vk"].active {
  background: #0077ff;
  box-shadow: 0 2px 8px rgba(0, 119, 255, 0.4);
}

.tab-btn-platform[data-platform="telegram"].active {
  background: #229ed9;
  box-shadow: 0 2px 8px rgba(34, 158, 217, 0.4);
}

.tab-btn-platform[data-platform="instagram"].active {
  background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
  box-shadow: 0 2px 8px rgba(220, 39, 67, 0.4);
}

.tab-btn-platform[data-platform="dzen"].active {
  background: #ff0000;
  box-shadow: 0 2px 8px rgba(255, 0, 0, 0.4);
}

.dzen-link-helper {
  display: flex;
  align-items: center;
  gap: 8px;
}

.dzen-badge {
  font-size: 0.75rem;
  color: #fbbf24;
  background: rgba(251, 191, 36, 0.1);
  border: 1px solid rgba(251, 191, 36, 0.3);
  padding: 3px 8px;
  border-radius: 12px;
}

.btn-xs {
  font-size: 0.75rem;
  padding: 4px 8px;
}

/* Image Gen Panel */
.ai-image-gen-box {
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(56, 189, 248, 0.35);
  box-shadow: 0 4px 16px rgba(56, 189, 248, 0.15);
  border-radius: var(--radius-md);
}

.ai-image-gen-box input {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
}

.ai-image-gen-box input:focus {
  border-color: #38bdf8;
  outline: none;
}


/* Spacious Modal & Image Layout Fixes */
.modal-window.modal-editor-large {
  max-width: 880px;
}

.image-control-group {
  width: 100%;
}

.image-uploader-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
}

.image-uploader-row {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
}

.post-preview-thumb {
  width: 110px;
  height: 72px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-glass);
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.uploader-controls {
  display: flex;
  flex: 1;
  gap: 10px;
  align-items: center;
}

.image-url-input {
  flex: 1;
  min-width: 180px;
}

.btn-regen-trigger {
  white-space: nowrap;
  font-weight: 600;
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
  border: none;
  box-shadow: 0 2px 10px rgba(124, 58, 237, 0.3);
}

.btn-regen-trigger:hover {
  background: linear-gradient(135deg, #4338ca, #6d28d9);
}

/* Full Width AI Generator Panel */
.ai-image-gen-box {
  width: 100%;
  box-sizing: border-box;
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid rgba(56, 189, 248, 0.4);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4), 0 0 16px rgba(56, 189, 248, 0.15);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  margin-top: 4px;
}

.ai-gen-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  flex-wrap: wrap;
  gap: 8px;
}

.ai-gen-badge-title {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ai-badge-chip {
  background: rgba(56, 189, 248, 0.15);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.35);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
}

.ai-title-text {
  font-size: 0.9rem;
  font-weight: 600;
  color: #f1f5f9;
}

.ai-gen-hint {
  font-size: 0.78rem;
  color: #94a3b8;
}

.ai-gen-form-row {
  display: flex;
  gap: 10px;
  align-items: stretch;
  width: 100%;
}

.ai-gen-form-row textarea {
  flex: 1;
  min-height: 54px;
  resize: vertical;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  line-height: 1.4;
  box-sizing: border-box;
}

.ai-gen-form-row textarea:focus {
  border-color: #38bdf8;
  outline: none;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.25);
}

.btn-run-sdxl {
  white-space: nowrap;
  font-weight: 600;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #0284c7, #0369a1);
  border: none;
  font-size: 0.92rem;
  box-shadow: 0 4px 14px rgba(2, 132, 199, 0.35);
}

.btn-run-sdxl:hover {
  background: linear-gradient(135deg, #0369a1, #075985);
}

.image-gen-status-box {
  font-size: 0.85rem;
  padding: 8px 12px;
  margin-top: 10px;
  border-radius: var(--radius-sm);
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.1);
}
