/* DomPro frontend — лендинг + кабинеты (тёмная тема) */

:root {
  --bg-deep: #0a0a0b;
  --bg-graphite: #141416;
  --bg-elevated: #1c1c1f;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);
  --text: #ffffff;
  --text-muted: #a1a1aa;
  --text-soft: #d4d4d8;
  --accent: #e4e4e7;
  --success: #4ade80;
  --error: #f87171;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
  --radius: 14px;
  --radius-sm: 10px;
  --header-height: 76px;
  --font: "Segoe UI", system-ui, -apple-system, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { font-family: var(--font); background: var(--bg-deep); color: var(--text); min-height: 100vh; line-height: 1.6; }
a { color: inherit; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* Header */
.header { position: fixed; inset: 0 0 auto 0; z-index: 100; height: var(--header-height); background: rgba(10,10,11,0.82); backdrop-filter: blur(16px); border-bottom: 1px solid var(--border); }
.header-inner { max-width: 1180px; height: 100%; margin: 0 auto; padding: 0 1.5rem; display: flex; align-items: center; gap: 1.5rem; }
.logo { display: flex; align-items: center; gap: 0.7rem; text-decoration: none; color: var(--text); flex-shrink: 0; }
.logo-img { width: 38px; height: 38px; object-fit: contain; border-radius: 8px; background: #f4f4f5; padding: 4px; }
.logo-text { font-size: 1.15rem; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; }
.nav { display: flex; align-items: center; gap: 1.75rem; margin-left: 1rem; }
.nav a { color: var(--text-muted); text-decoration: none; font-size: 0.92rem; transition: color 0.2s; }
.nav a:hover { color: var(--text); }
.header-actions { display: flex; align-items: center; gap: 0.75rem; margin-left: auto; }
.nav-toggle { display: none; width: 42px; height: 42px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: transparent; margin-left: auto; cursor: pointer; }
.nav-toggle span { display: block; width: 18px; height: 1.5px; margin: 5px auto; background: var(--text); }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; padding: 0.72rem 1.2rem; border-radius: var(--radius-sm); font-size: 0.92rem; font-weight: 500; text-decoration: none; border: 1px solid transparent; cursor: pointer; transition: 0.2s; white-space: nowrap; font-family: inherit; }
.btn-primary { background: var(--text); color: var(--bg-deep); border-color: var(--text); }
.btn-primary:hover { background: var(--accent); border-color: var(--accent); }
.btn-outline { background: transparent; color: var(--text); border-color: var(--border-strong); }
.btn-outline:hover { background: rgba(255,255,255,0.04); }
.btn-ghost { background: transparent; color: var(--text-muted); padding-inline: 0.8rem; }
.btn-ghost:hover { color: var(--text); }
.btn-lg { padding: 0.9rem 1.5rem; font-size: 0.95rem; }
.btn-sm { padding: 0.5rem 0.9rem; font-size: 0.85rem; }
.btn-block { width: 100%; }
.btn-danger { border-color: var(--error); color: var(--error); }

/* Hero & sections */
.hero { position: relative; min-height: 100vh; display: flex; align-items: center; padding: calc(var(--header-height) + 3rem) 1.5rem 4rem; overflow: hidden; }
.hero-bg { position: absolute; inset: 0; background: radial-gradient(circle at 20% 20%, rgba(255,255,255,0.05), transparent 28%), linear-gradient(180deg, #101012 0%, var(--bg-deep) 72%); }
.hero-inner { position: relative; max-width: 860px; margin: 0 auto; }
.hero-eyebrow { display: inline-block; margin-bottom: 1.25rem; padding: 0.45rem 0.85rem; border: 1px solid var(--border); border-radius: 999px; color: var(--text-soft); font-size: 0.82rem; letter-spacing: 0.06em; text-transform: uppercase; }
.hero-title { font-size: clamp(2.4rem, 6vw, 4.2rem); line-height: 1.05; font-weight: 600; letter-spacing: -0.03em; margin-bottom: 1.25rem; }
.hero-title-accent { color: var(--text-muted); }
.hero-subtitle { max-width: 680px; color: var(--text-muted); font-size: 1.05rem; margin-bottom: 2rem; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 0.85rem; margin-bottom: 3rem; }
.hero-stats { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; padding-top: 1.5rem; border-top: 1px solid var(--border); }
.hero-stats strong { display: block; font-size: 1.5rem; font-weight: 600; }
.hero-stats span { color: var(--text-muted); font-size: 0.88rem; }
.section { padding: 5rem 1.5rem; background: var(--bg-deep); }
.section-dark { background: var(--bg-graphite); border-block: 1px solid var(--border); }
.section-muted { background: linear-gradient(180deg, var(--bg-graphite), var(--bg-deep)); }
.section-inner { max-width: 1180px; margin: 0 auto; }
.section-title { font-size: clamp(1.7rem, 3vw, 2.4rem); font-weight: 600; margin-bottom: 0.75rem; }
.section-lead { color: var(--text-muted); max-width: 620px; margin-bottom: 2.5rem; }
.category-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
.category-card { padding: 1.4rem; border: 1px solid var(--border); border-radius: var(--radius); background: rgba(255,255,255,0.02); }
.category-card h3 { font-size: 1rem; margin-bottom: 0.55rem; }
.category-card p { color: var(--text-muted); font-size: 0.92rem; }
.section-split { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 2rem; }
.steps { list-style: none; display: grid; gap: 1.25rem; }
.steps li { display: grid; grid-template-columns: auto 1fr; gap: 1rem; padding: 1.2rem 0; border-bottom: 1px solid var(--border); }
.step-num { color: var(--text-muted); font-size: 0.85rem; letter-spacing: 0.08em; }
.steps h3 { font-size: 1.05rem; margin-bottom: 0.35rem; }
.steps p { color: var(--text-muted); font-size: 0.94rem; }
.trust-panel { padding: 1.6rem; border: 1px solid var(--border); border-radius: var(--radius); background: rgba(255,255,255,0.02); }
.trust-panel p { color: var(--text-muted); margin-bottom: 1.25rem; }
.clients-banner { display: flex; align-items: center; justify-content: space-between; gap: 2rem; }
.footer { border-top: 1px solid var(--border); padding: 2rem 1.5rem; background: var(--bg-deep); }
.footer-inner { max-width: 1180px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 1rem; }
.footer p { color: var(--text-muted); font-size: 0.88rem; }

/* App layout */
.page { padding: calc(var(--header-height) + 2rem) 1.5rem 3rem; }
.page-inner { max-width: 1100px; margin: 0 auto; }
.page-title { font-size: 1.75rem; font-weight: 600; margin-bottom: 0.5rem; }
.page-subtitle { color: var(--text-muted); margin-bottom: 2rem; }
.dashboard-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.25rem; }
.card { padding: 1.5rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-graphite); }
.card-full { grid-column: 1 / -1; }
.card h2 { font-size: 1.1rem; margin-bottom: 1rem; }
.card p { color: var(--text-muted); font-size: 0.92rem; }
.card-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1rem; }
.stat-value { font-size: 2rem; font-weight: 600; letter-spacing: -0.02em; }
.badge { display: inline-block; padding: 0.25rem 0.65rem; border-radius: 999px; font-size: 0.78rem; border: 1px solid var(--border); color: var(--text-soft); }
.badge-success { border-color: rgba(74,222,128,0.4); color: var(--success); }
.badge-warning { border-color: rgba(251,191,36,0.4); color: #fbbf24; }
.badge-muted { color: var(--text-muted); }

/* Forms */
.auth-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 2rem 1.5rem; }
.auth-card { width: 100%; max-width: 440px; padding: 2rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-graphite); box-shadow: var(--shadow); }
.auth-card h1 { font-size: 1.5rem; margin-bottom: 0.5rem; }
.auth-card .lead { color: var(--text-muted); margin-bottom: 1.5rem; font-size: 0.92rem; }
.auth-card-wide { max-width: 520px; }
.reg-steps { display: flex; align-items: center; justify-content: center; gap: 0.35rem; margin-bottom: 1.5rem; }
.reg-step { width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; font-size: 0.8rem; color: var(--text-muted); }
.reg-step.active { border-color: var(--gold); color: var(--gold); font-weight: 600; }
.reg-step.done { background: rgba(212, 175, 55, 0.2); border-color: var(--gold); }
.reg-step-line { flex: 1; max-width: 40px; height: 1px; background: var(--border); }
.reg-nav { display: flex; gap: 0.5rem; margin-top: 1rem; }
.reg-nav .btn { flex: 1; }
.req { color: #ef4444; }
.form-hint { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 1rem; }
.form-group { margin-bottom: 1rem; }
.form-group label { display: block; margin-bottom: 0.4rem; font-size: 0.88rem; color: var(--text-soft); }
.form-group input, .form-group textarea, .form-group select { width: 100%; padding: 0.85rem 1rem; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--bg-elevated); color: var(--text); font: inherit; }
.form-group input:focus, .form-group textarea:focus, .form-group select:focus { outline: 1px solid var(--border-strong); }
.form-group textarea { min-height: 100px; resize: vertical; }
.form-footer { margin-top: 1.25rem; text-align: center; color: var(--text-muted); font-size: 0.9rem; }
.form-footer a { color: var(--text); text-decoration: underline; }
.role-switch { display: flex; gap: 0.5rem; margin-bottom: 1.25rem; }
.role-switch button { flex: 1; padding: 0.65rem; border: 1px solid var(--border); border-radius: var(--radius-sm); background: transparent; color: var(--text-muted); cursor: pointer; font: inherit; }
.role-switch button.active { background: rgba(255,255,255,0.08); color: var(--text); border-color: var(--border-strong); }
.alert { padding: 0.85rem 1rem; border-radius: var(--radius-sm); margin-bottom: 1rem; font-size: 0.9rem; }
.alert-info { background: rgba(255,255,255,0.05); border: 1px solid var(--border); color: var(--text-soft); }

/* Lists */
.list { list-style: none; display: grid; gap: 0.75rem; }
.list-item { padding: 1rem; border: 1px solid var(--border); border-radius: var(--radius-sm); background: rgba(255,255,255,0.02); }
.list-item-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; margin-bottom: 0.5rem; }
.list-item h3 { font-size: 1rem; }
.list-item-meta { color: var(--text-muted); font-size: 0.85rem; }
.empty-state { text-align: center; padding: 2rem; color: var(--text-muted); }

/* Modal */
.modal { display: none; position: fixed; inset: 0; z-index: 200; }
.modal-open { display: flex; align-items: center; justify-content: center; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,0.65); }
.modal-content { position: relative; width: min(480px, 92vw); max-height: 90vh; overflow-y: auto; padding: 1.5rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-graphite); box-shadow: var(--shadow); }
.modal-content h2 { margin-bottom: 1rem; font-size: 1.2rem; }
.modal-actions { display: flex; gap: 0.75rem; margin-top: 1.25rem; justify-content: flex-end; }

/* Notifications */
.notifications { position: fixed; top: 1rem; right: 1rem; z-index: 300; display: flex; flex-direction: column; gap: 0.5rem; max-width: 360px; }
.notification { padding: 0.85rem 1rem; border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--bg-elevated); box-shadow: var(--shadow); animation: slideIn 0.25s ease; }
.notification-success { border-color: rgba(74,222,128,0.4); }
.notification-error { border-color: rgba(248,113,113,0.4); }
.notification-hide { opacity: 0; transform: translateX(20px); transition: 0.3s; }
@keyframes slideIn { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: none; } }

.tx-table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
.tx-table th, .tx-table td { padding: 0.6rem 0.5rem; text-align: left; border-bottom: 1px solid var(--border); }
.tx-table th { color: var(--text-muted); font-weight: 500; }

@media (max-width: 980px) {
  .category-grid { grid-template-columns: repeat(2, 1fr); }
  .section-split { grid-template-columns: 1fr; }
  .dashboard-grid { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .nav-toggle { display: block; }
  .nav, .header-actions { display: none; }
  .header-inner.nav-open { flex-wrap: wrap; height: auto; min-height: var(--header-height); padding-block: 1rem; }
  .header-inner.nav-open .nav, .header-inner.nav-open .header-actions { display: flex; }
  .header-inner.nav-open .nav { order: 3; width: 100%; flex-direction: column; align-items: flex-start; margin: 0; }
  .header-inner.nav-open .header-actions { order: 4; width: 100%; margin-left: 0; }
  .hero-stats { grid-template-columns: 1fr; }
  .clients-banner { flex-direction: column; align-items: flex-start; }
  .category-grid { grid-template-columns: 1fr; }
}
