/* Notific — стиль приложения, IBM Plex Mono */
@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:ital,wght@0,400;0,500;0,600;0,700;1,400&display=swap');

:root {
  --bg: #0d0d0d;
  --bg-card: #1a1a1a;
  --border: #2a2a2a;
  --text: #e8e8e8;
  --text-muted: #888;
  --accent: #4a9eff;
  --accent-hover: #6bb1ff;
  --danger: #e85d5d;
  --font: 'IBM Plex Mono', 'SF Mono', Consolas, monospace;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: var(--text);
  text-decoration: none;
}
a:hover {
  color: var(--text);
  text-decoration: underline;
}

/* Header */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1.75rem;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(to right, #050505, #131313);
  position: sticky;
  top: 0;
  z-index: 100;
}

.site-logo {
  font-weight: 700;
  font-size: 1.2rem;
  letter-spacing: 0.02em;
  color: var(--text);
}
.site-logo:hover {
  text-decoration: none;
  color: var(--text);
}

.header-actions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.header-link {
  font-size: 13px;
  color: var(--text-muted);
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  transition: color 0.15s ease-out, background-color 0.15s ease-out;
}
.header-link:hover {
  color: var(--text);
  text-decoration: none;
  background-color: rgba(255, 255, 255, 0.04);
}

.btn {
  display: inline-block;
  font-family: var(--font);
  font-size: 13px;
  padding: 0.45rem 0.9rem;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
  text-decoration: none;
}
.btn:hover {
  background: #252525;
  border-color: #3a3a3a;
  text-decoration: none;
  color: var(--text);
}
.btn--primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.btn--primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  color: #fff;
  text-decoration: none;
}
.btn--danger {
  border-color: var(--danger);
  color: var(--danger);
}
.btn--danger:hover {
  background: rgba(232, 93, 93, 0.1);
}

/* Main content */
main { flex: 1; }

.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 1.5rem;
}

.hero {
  padding: 4rem 1.5rem 2rem;
  text-align: center;
  max-width: 640px;
  margin: 0 auto;
}
.hero h1 {
  font-size: 1.75rem;
  font-weight: 700;
  margin: 0 0 1rem;
  letter-spacing: 0.02em;
  line-height: 1.3;
}
.hero-lead {
  color: var(--text-muted);
  font-size: 0.9375rem;
  line-height: 1.65;
  margin: 0;
}
.btn--lg {
  padding: 0.75rem 1.5rem;
  font-size: 14px;
}

/* Role chooser */
.role-chooser {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  max-width: 560px;
  margin: 0 auto 3rem;
}
.role-card {
  display: block;
  padding: 1.75rem 1.25rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-card);
  text-align: center;
  transition: border-color 0.2s;
  text-decoration: none;
  color: var(--text);
}
.role-card:hover {
  border-color: #444;
  text-decoration: none;
  color: var(--text);
}
.role-card h2 { font-size: 1rem; margin: 0 0 0.4rem; font-weight: 600; }
.role-card p { margin: 0; font-size: 12px; color: var(--text-muted); }

/* Landing sections */
.landing-section {
  padding: 2.5rem 0;
  border-top: 1px solid var(--border);
}
.section-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0 0 0.35rem;
  text-align: center;
}
.section-subtitle {
  text-align: center;
  color: var(--text-muted);
  margin: 0 0 2rem;
  font-size: 13px;
}
.section-cta {
  text-align: center;
  padding: 1.5rem 0 0;
}

/* Steps */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.feature-card {
  padding: 1.25rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-card);
}
.feature-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--border);
  color: var(--text);
  font-weight: 700;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.75rem;
}
.feature-card h3 { font-size: 0.875rem; margin: 0 0 0.4rem; font-weight: 600; }
.feature-card p { margin: 0; font-size: 12px; color: var(--text-muted); line-height: 1.55; }

/* Benefits grid */
.benefits {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.benefit-card {
  padding: 1.25rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-card);
}
.benefit-card h2 {
  font-size: 0.875rem;
  font-weight: 600;
  margin: 0 0 0.5rem;
  color: var(--text);
}
.benefit-card p {
  margin: 0;
  font-size: 12px;
  line-height: 1.55;
  color: var(--text-muted);
}

/* Subtle hover animations */
.role-card,
.feature-card,
.benefit-card,
.card,
.service-list li {
  transition: transform 0.18s ease-out, box-shadow 0.18s ease-out, border-color 0.18s ease-out, background-color 0.18s ease-out;
}
.role-card:hover,
.feature-card:hover,
.benefit-card:hover,
.card:hover,
.service-list li:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
  border-color: #3a3a3a;
}

.cta-block {
  text-align: center;
  padding: 2.5rem 1rem;
  border-top: 1px solid var(--border);
}
.cta-block p {
  margin: 0 0 1.25rem;
  color: var(--text-muted);
}

.section {
  margin-bottom: 3rem;
}
.section h2 {
  font-size: 1.125rem;
  font-weight: 600;
  margin: 0 0 1rem;
  color: var(--text);
}

/* Auth */
.auth-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}
.auth-box {
  width: 100%;
  max-width: 360px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.5rem;
  background: var(--bg-card);
}
.auth-box h1 {
  font-size: 1.25rem;
  margin: 0 0 1rem;
}
.auth-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
}
.auth-tabs button {
  font-family: var(--font);
  font-size: 13px;
  padding: 0.4rem 0.8rem;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  border-radius: 4px;
}
.auth-tabs button.active {
  background: var(--bg);
  color: var(--text);
  border-color: var(--border);
}
.form-group {
  margin-bottom: 1rem;
}
.form-group label {
  display: block;
  margin-bottom: 0.35rem;
  color: var(--text-muted);
  font-size: 12px;
}
.form-group input {
  width: 100%;
  font-family: var(--font);
  font-size: 14px;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg);
  color: var(--text);
}
.form-group input:focus {
  outline: none;
  border-color: var(--accent);
}
.form-group--checkbox {
  margin-top: 0.75rem;
  margin-bottom: 1rem;
}
.form-group--checkbox .checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  cursor: pointer;
  font-size: 13px;
  color: var(--text-muted);
}
.form-group--checkbox .checkbox-label input[type="checkbox"] {
  width: auto;
  margin-top: 0.2rem;
  accent-color: var(--accent);
}
.form-group--checkbox .checkbox-label a {
  color: var(--accent);
}
.icon-preview {
  margin-top: 0.5rem;
}
.icon-preview img {
  max-width: 120px;
  max-height: 120px;
  border-radius: 6px;
  object-fit: cover;
  border: 1px solid var(--border);
  display: block;
}
.auth-box .btn {
  width: 100%;
  margin-top: 0.5rem;
}
.auth-error {
  font-size: 12px;
  color: var(--danger);
  margin-top: 0.5rem;
}

/* Dashboard */
.dashboard .container {
  max-width: 1000px;
}
.dashboard h1 {
  font-size: 1.5rem;
  margin: 0 0 1.5rem;
}
.card {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-card);
  padding: 1.25rem;
  margin-bottom: 1rem;
}
.card h3 {
  font-size: 1rem;
  margin: 0 0 0.75rem;
}
.card-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 1rem;
}
.service-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.service-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  margin-bottom: 0.5rem;
  background: var(--bg);
}
.service-list li .name {
  font-weight: 500;
}
.service-list li .slug {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 0.2rem;
}
.service-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.service-meta img {
  width: 36px;
  height: 36px;
  border-radius: 6px;
  object-fit: cover;
}

/* Stats */
.stats-row {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}
.stat {
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  min-width: 120px;
}
.stat .value {
  font-size: 1.5rem;
  font-weight: 600;
}
.stat .label {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 0.25rem;
}

/* Subscription link & QR */
.sub-link {
  font-size: 12px;
  word-break: break-all;
  padding: 0.5rem;
  background: var(--bg);
  border-radius: 4px;
  margin: 0.5rem 0;
}
.qr-wrap {
  display: inline-block;
  padding: 12px;
  background: #fff;
  border-radius: 8px;
  margin-top: 0.5rem;
}
.qr-wrap canvas,
.qr-wrap img {
  display: block;
}
.qr-wrap .qr-img {
  width: 200px;
  height: 200px;
  background: #fff;
}
.qr-wrap--page .qr-page-img {
  display: block;
  width: 220px;
  height: 220px;
  background: #fff;
}

/* Campaigns */
.campaign-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.campaign-list li {
  padding: 0.75rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  margin-bottom: 0.5rem;
  background: var(--bg);
  cursor: pointer;
}
.campaign-list .views {
  font-size: 12px;
  color: var(--text-muted);
}
.campaign-list .campaign-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
}
.campaign-list .campaign-title {
  font-size: 13px;
  font-weight: 500;
}
.campaign-list .campaign-extra {
  margin-top: 0.5rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--border);
  font-size: 12px;
  color: var(--text-muted);
}
.campaign-list .campaign-extra p {
  margin: 0 0 0.35rem;
}
.campaign-list .campaign-extra a {
  font-size: 12px;
}

/* Subscribe page (s.html) */
.subscribe-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  text-align: center;
}
.subscribe-page h1 {
  font-size: 1.25rem;
  margin: 0 0 0.5rem;
}
.subscribe-page p {
  color: var(--text-muted);
  margin: 0 0 1.5rem;
}
.subscribe-page .btn {
  margin: 0.25rem;
}

/* Modal / overlay */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 1rem;
}
.modal {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.5rem;
  max-width: 480px;
  width: 100%;
  max-height: 90vh;
  overflow: auto;
}
.modal h2 {
  margin: 0 0 1rem;
  font-size: 1.125rem;
}
.modal-actions {
  display: flex;
  gap: 0.5rem;
  justify-content: flex-end;
  margin-top: 1rem;
}
.hidden {
  display: none !important;
}

/* Legal page */
.legal-page { max-width: 720px; padding-top: 2rem; padding-bottom: 3rem; }
.legal-page h1 { font-size: 1.375rem; margin: 0 0 0.25rem; }
.legal-page h2 { font-size: 1.125rem; margin: 2rem 0 0.75rem; border-top: 1px solid var(--border); padding-top: 1.25rem; }
.legal-page h3 { font-size: 1rem; margin: 1.5rem 0 0.5rem; }
.legal-page p { margin: 0 0 0.75rem; color: var(--text-muted); font-size: 13px; line-height: 1.65; }
.legal-page ul { margin: 0 0 0.75rem; padding-left: 1.5rem; }
.legal-page li { color: var(--text-muted); font-size: 13px; line-height: 1.65; margin-bottom: 0.25rem; }

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 1.75rem 1.5rem;
  margin-top: 4rem;
  background: #050505;
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
}
.footer-links {
  display: flex;
  gap: 1.25rem;
}
.footer-links a {
  font-size: 12px;
  color: var(--text-muted);
}
.footer-links a:hover {
  color: var(--text);
  text-decoration: none;
}
.footer-copy {
  margin: 0;
  font-size: 11px;
  color: #555;
}

@media (max-width: 640px) {
  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
}

/* Admin panel */
.admin-layout { display: flex; min-height: calc(100vh - 56px); }
.admin-sidebar {
  width: 220px;
  border-right: 1px solid var(--border);
  padding: 1rem 0;
  flex-shrink: 0;
}
.admin-sidebar a {
  display: block;
  padding: 0.6rem 1.25rem;
  font-size: 13px;
  color: var(--text-muted);
  transition: background 0.1s;
}
.admin-sidebar a:hover, .admin-sidebar a.active {
  background: var(--bg-card);
  color: var(--text);
  text-decoration: none;
}
.admin-content {
  flex: 1;
  padding: 1.5rem 2rem;
  overflow-y: auto;
}
.admin-content h1 { font-size: 1.25rem; margin: 0 0 1.5rem; }
.admin-stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}
.admin-stat-card {
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-card);
}
.admin-stat-card .value { font-size: 1.75rem; font-weight: 700; }
.admin-stat-card .label { font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; margin-top: 0.25rem; }
.admin-stat-bar {
  margin-top: 0.6rem;
  width: 100%;
  height: 4px;
  border-radius: 999px;
  background: #101010;
  overflow: hidden;
}
.admin-stat-bar-inner {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), var(--accent-hover));
  transition: width 0.25s ease-out;
}
.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.admin-table th {
  text-align: left;
  font-weight: 600;
  padding: 0.6rem 0.75rem;
  border-bottom: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.admin-table td {
  padding: 0.6rem 0.75rem;
  border-bottom: 1px solid var(--border);
}
.admin-table tr:hover td { background: rgba(255,255,255,0.02); }
.user-services-cell {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.user-services-controls {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}
.user-services-select {
  max-width: 220px;
  padding: 0.35rem 1.8rem 0.35rem 0.6rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background-color: var(--bg-card);
  color: var(--text);
  font-size: 12px;
  line-height: 1.3;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}
.btn[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
}
.badge {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
}
.badge--green { background: rgba(72,187,120,0.15); color: #48bb78; }
.badge--yellow { background: rgba(236,201,75,0.15); color: #ecc94b; }
.badge--red { background: rgba(232,93,93,0.15); color: var(--danger); }
.admin-chat-list { list-style: none; padding: 0; margin: 0; }
.admin-chat-item {
  padding: 0.75rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  margin-bottom: 0.5rem;
  cursor: pointer;
  transition: background 0.1s;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.admin-chat-item:hover { background: var(--bg-card); }
.admin-chat-detail {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1rem;
  margin-top: 1rem;
}
.admin-chat-messages {
  max-height: 400px;
  overflow-y: auto;
  margin-bottom: 1rem;
}
.admin-reply-form { display: flex; gap: 0.5rem; }
.admin-reply-form input { flex: 1; }
.chat-msg {
  margin-bottom: 0.5rem;
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  font-size: 13px;
  line-height: 1.45;
  max-width: 85%;
  word-break: break-word;
}
.chat-msg--visitor {
  background: #fff;
  color: #000;
  border: 1px solid var(--border);
  border-bottom-left-radius: 2px;
}
.chat-msg--admin {
  background: var(--bg);
  border: 1px solid var(--border);
  border-bottom-left-radius: 2px;
}

@media (max-width: 768px) {
  .admin-layout { flex-direction: column; }
  .admin-sidebar { width: 100%; border-right: none; border-bottom: 1px solid var(--border); display: flex; overflow-x: auto; padding: 0; }
  .admin-sidebar a { white-space: nowrap; padding: 0.75rem 1rem; }
  .admin-content { padding: 1rem; }
  .role-chooser { grid-template-columns: 1fr; max-width: 340px; }
  .features-grid { grid-template-columns: 1fr; }
  .benefits { grid-template-columns: 1fr; }
  .hero h1 { font-size: 1.375rem; }
}

/* Utility */
.text-muted { color: var(--text-muted); }
.small { font-size: 0.9em; }
.full-width { width: 100%; box-sizing: border-box; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mb-2 { margin-bottom: 1rem; }
