:root {
  --bg: #f7f9fc;
  --surface: #ffffff;
  --text: #101828;
  --muted: #667085;
  --line: #dbe3ef;
  --primary: #2563eb;
  --primary-dark: #1743a7;
  --accent: #7c3aed;
  --success: #0f9f6e;
  --danger: #dc2626;
  --warning: #f59e0b;
  --shadow: 0 24px 80px rgba(16, 24, 40, 0.12);
  --radius: 24px;
  --radius-sm: 14px;
  --container: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  color: var(--text);
  background: radial-gradient(circle at top left, rgba(37, 99, 235, .12), transparent 32rem), var(--bg);
  line-height: 1.55;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, textarea, select { font: inherit; }
:focus-visible { outline: 3px solid rgba(37, 99, 235, .35); outline-offset: 3px; }

.container { width: min(100% - 32px, var(--container)); margin: 0 auto; }
.section { padding: 72px 0; }
.section-title { padding-top: 72px; padding-bottom: 24px; }
.section-title h2, .page-hero h1, .hero h1 { letter-spacing: -0.04em; line-height: 1.02; }
.section-title h2 { margin: 0 0 10px; font-size: clamp(32px, 5vw, 52px); }
.section-title p { margin: 0; max-width: 760px; color: var(--muted); font-size: 18px; }
.skip-link { position: absolute; top: -100px; left: 16px; background: var(--text); color: #fff; padding: 10px 14px; border-radius: 10px; z-index: 1000; }
.skip-link:focus { top: 16px; }

.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255, 255, 255, .82);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(219, 227, 239, .8);
}
.header-inner { min-height: 74px; display: flex; align-items: center; gap: 18px; }
.brand { display: flex; align-items: center; gap: 12px; min-width: max-content; }
.brand-mark { width: 42px; height: 42px; display: inline-grid; place-items: center; border-radius: 14px; color: #fff; background: linear-gradient(135deg, var(--primary), var(--accent)); font-weight: 800; box-shadow: 0 12px 30px rgba(37, 99, 235, .22); }
.brand small { display: block; color: var(--muted); font-size: 12px; margin-top: -2px; }
.main-nav { display: flex; align-items: center; justify-content: center; gap: 4px; flex: 1; }
.nav-link { padding: 10px 12px; border-radius: 999px; color: var(--muted); font-weight: 650; font-size: 14px; }
.nav-link:hover { color: var(--text); background: #eef4ff; }
.header-actions { display: flex; align-items: center; gap: 10px; }
.lang-switch { display: inline-flex; padding: 4px; gap: 2px; border: 1px solid var(--line); border-radius: 999px; background: #fff; }
.lang-link { padding: 6px 8px; border-radius: 999px; color: var(--muted); font-size: 13px; font-weight: 800; }
.lang-link.active { color: #fff; background: var(--text); }
.menu-toggle { display: none; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 14px; background: #fff; cursor: pointer; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 13px 20px; border-radius: 999px; border: 1px solid transparent; font-weight: 800; cursor: pointer; transition: transform .15s ease, box-shadow .15s ease, background .15s ease; }
.btn:hover { transform: translateY(-1px); }
.btn-primary { color: #fff; background: linear-gradient(135deg, var(--primary), var(--accent)); box-shadow: 0 18px 40px rgba(37, 99, 235, .22); }
.btn-primary:hover { box-shadow: 0 22px 54px rgba(37, 99, 235, .3); }
.btn-secondary { background: #fff; border-color: var(--line); color: var(--text); }
.btn-sm { min-height: 40px; padding: 9px 14px; font-size: 14px; }
.text-link { color: var(--primary); font-weight: 800; }
.text-link:hover { color: var(--primary-dark); }

.hero { padding: 92px 0 72px; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(320px, .92fr); align-items: center; gap: 44px; }
.eyebrow { color: var(--primary); text-transform: uppercase; font-size: 13px; letter-spacing: .12em; font-weight: 900; margin: 0 0 14px; }
.hero h1 { margin: 0 0 22px; font-size: clamp(42px, 7vw, 76px); max-width: 980px; }
.lead { color: var(--muted); font-size: clamp(18px, 2vw, 22px); max-width: 780px; margin: 0 0 28px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 28px 0 20px; }
.hero-bullets { display: flex; flex-wrap: wrap; gap: 10px; margin: 24px 0 0; padding: 0; list-style: none; }
.hero-bullets li { padding: 9px 12px; border: 1px solid var(--line); border-radius: 999px; background: rgba(255, 255, 255, .72); color: var(--muted); font-weight: 700; }
.hero-card { border-radius: 32px; padding: 16px; background: linear-gradient(145deg, rgba(37, 99, 235, .15), rgba(124, 58, 237, .18)); box-shadow: var(--shadow); }
.mini-window { background: rgba(255,255,255,.88); border: 1px solid rgba(255,255,255,.65); border-radius: 28px; padding: 22px; backdrop-filter: blur(20px); }
.window-dots { display: flex; gap: 7px; margin-bottom: 22px; }
.window-dots span { width: 10px; height: 10px; border-radius: 999px; background: var(--line); }
.crm-preview-row { display: flex; justify-content: space-between; align-items: center; padding: 14px; border: 1px solid var(--line); border-radius: 16px; background: #fff; }
.crm-preview-row span { padding: 5px 10px; border-radius: 999px; background: #e0f2fe; color: #0369a1; font-weight: 800; font-size: 12px; }
.crm-preview-card { margin: 14px 0; padding: 22px; border-radius: 20px; color: #fff; background: linear-gradient(135deg, #111827, #1d4ed8); }
.crm-preview-card p { margin: 6px 0 0; color: rgba(255,255,255,.76); }
.metric-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.metric-grid div { padding: 14px; border: 1px solid var(--line); border-radius: 18px; background: #fff; }
.metric-grid b, .metric-grid span { display: block; }
.metric-grid span { color: var(--muted); font-size: 13px; }

.soft-section { background: rgba(255,255,255,.5); }
.split-card { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 34px; border-radius: var(--radius); background: #fff; border: 1px solid var(--line); box-shadow: 0 18px 50px rgba(16, 24, 40, .07); }
.split-card h2 { font-size: clamp(28px, 4vw, 44px); line-height: 1.05; margin: 0 0 12px; }
.split-card p { color: var(--muted); max-width: 800px; margin: 0; }

.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.service-card, .solution-card, .package-card, .process-card, .portfolio-card, .contact-card, .lead-form, .detail-card, .quiz-card, .admin-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 14px 42px rgba(16,24,40,.06);
}
.service-card, .solution-card, .portfolio-card { padding: 26px; }
.service-card h3, .solution-card h3, .portfolio-card h3 { margin: 12px 0 10px; font-size: 22px; }
.service-card p, .solution-card p, .portfolio-card p { color: var(--muted); }
.card-icon { width: 52px; height: 52px; display: grid; place-items: center; background: #eef4ff; border-radius: 18px; font-size: 24px; }

.dark-section { color: #fff; background: linear-gradient(135deg, #0b1220, #16213e); }
.dark-section .eyebrow { color: #93c5fd; }
.two-col { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 32px; align-items: start; }
.two-col h2 { margin: 0; font-size: clamp(32px, 5vw, 56px); letter-spacing: -0.04em; line-height: 1.04; }
.check-list { display: grid; gap: 12px; }
.check-list div { padding: 16px 18px; border: 1px solid rgba(255,255,255,.16); border-radius: 18px; background: rgba(255,255,255,.08); }

.package-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; }
.package-card { padding: 22px; display: flex; flex-direction: column; min-height: 100%; }
.package-card.featured { border-color: rgba(37, 99, 235, .55); box-shadow: 0 18px 64px rgba(37, 99, 235, .14); }
.package-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.package-top h3 { margin: 0; font-size: 22px; }
.package-top span { padding: 4px 8px; border-radius: 999px; color: #fff; background: var(--primary); font-size: 11px; font-weight: 900; }
.package-card p { color: var(--muted); }
.package-card ul { padding-left: 18px; color: var(--muted); flex: 1; }
.package-card .btn { width: 100%; margin-top: auto; }

.process-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 12px; }
.process-card { padding: 20px; }
.process-card span { color: var(--primary); font-weight: 900; }
.process-card p { margin: 12px 0 0; color: var(--muted); }
.portfolio-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.portfolio-badge { display: inline-flex; padding: 6px 10px; border-radius: 999px; background: #eef4ff; color: var(--primary); font-size: 12px; font-weight: 900; }
.faq-list { display: grid; gap: 12px; }
.faq-item { padding: 18px 22px; border-radius: 18px; background: #fff; border: 1px solid var(--line); }
.faq-item summary { cursor: pointer; font-weight: 900; }
.faq-item p { color: var(--muted); margin-bottom: 0; }

.contact-grid { display: grid; grid-template-columns: minmax(0, .9fr) minmax(320px, 1.1fr); gap: 24px; align-items: start; }
.contact-grid h2 { font-size: clamp(32px, 5vw, 52px); line-height: 1.05; letter-spacing: -0.04em; margin: 0 0 12px; }
.contact-grid p { color: var(--muted); }
.lead-form { padding: 24px; display: grid; gap: 14px; }
.form-head h3 { margin: 0 0 6px; font-size: 26px; }
.form-head p { margin: 0; color: var(--muted); }
.lead-form label { display: grid; gap: 7px; color: var(--text); font-weight: 800; }
.lead-form input, .lead-form select, .lead-form textarea, .admin-input, .admin-textarea, .admin-select {
  width: 100%; border: 1px solid var(--line); border-radius: 14px; background: #fff; color: var(--text); padding: 13px 14px; font-weight: 500;
}
.lead-form textarea { resize: vertical; }
.lead-form .check { display: flex; grid-template-columns: unset; align-items: flex-start; gap: 10px; color: var(--muted); font-weight: 700; }
.lead-form .check input { width: 18px; margin-top: 4px; }
.hp { position: absolute !important; left: -9999px !important; opacity: 0 !important; pointer-events: none; }
.form-message { min-height: 22px; font-weight: 800; }
.form-message.success { color: var(--success); }
.form-message.error { color: var(--danger); }

.page-hero { padding: 76px 0 42px; }
.page-hero h1 { margin: 0 0 18px; font-size: clamp(42px, 7vw, 70px); }
.page-hero p { max-width: 820px; color: var(--muted); font-size: 18px; }
.page-grid { padding-bottom: 72px; }
.service-detail-hero { padding-bottom: 70px; }
.detail-grid { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 28px; padding-bottom: 72px; }
.detail-card { padding: 28px; }
.detail-card h3 { margin-top: 0; }
.detail-card li { margin: 10px 0; color: var(--muted); }
.tag-cloud { display: flex; flex-wrap: wrap; gap: 10px; }
.tag-cloud span { padding: 10px 12px; border: 1px solid var(--line); border-radius: 999px; background: #fff; font-weight: 800; }
.legal-page { max-width: 900px; }
.legal-page p { font-size: 18px; }

.quiz-app { max-width: 820px; margin: 0 auto; }
.quiz-card { padding: 28px; }
.quiz-progress { height: 10px; border-radius: 999px; background: #e5e7eb; overflow: hidden; margin-bottom: 18px; }
.quiz-progress span { display: block; height: 100%; background: linear-gradient(135deg, var(--primary), var(--accent)); width: 0; }
.quiz-options { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin: 18px 0; }
.quiz-option { border: 1px solid var(--line); background: #fff; border-radius: 16px; padding: 14px; text-align: left; cursor: pointer; font-weight: 800; }
.quiz-option.active { color: #fff; background: var(--text); border-color: var(--text); }
.quiz-actions { display: flex; justify-content: space-between; gap: 10px; margin-top: 18px; }
.quiz-card textarea { min-height: 140px; }
.quiz-contact { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-top: 12px; }

.site-footer { padding: 56px 0 24px; background: #0b1220; color: #fff; }
.footer-grid { display: grid; grid-template-columns: 1.2fr 1fr 1fr 1fr; gap: 28px; }
.site-footer p { color: rgba(255,255,255,.62); }
.footer-links { display: grid; gap: 8px; }
.footer-links a { color: rgba(255,255,255,.76); }
.footer-links a:hover { color: #fff; }
.footer-bottom { margin-top: 30px; padding-top: 18px; border-top: 1px solid rgba(255,255,255,.12); color: rgba(255,255,255,.54); }
.floating-contact { position: fixed; right: 18px; bottom: 18px; z-index: 80; display: flex; gap: 8px; }
.floating-contact a { padding: 11px 14px; border-radius: 999px; color: #fff; background: var(--text); font-weight: 900; box-shadow: 0 14px 40px rgba(16,24,40,.2); }

/* Admin */
.admin-body { background: #f3f6fb; }
.admin-login { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.admin-login-card { width: min(100%, 440px); background: #fff; border: 1px solid var(--line); border-radius: 28px; box-shadow: var(--shadow); padding: 28px; }
.admin-login-card h1 { margin: 16px 0 8px; }
.admin-form { display: grid; gap: 12px; margin-top: 18px; }
.admin-shell { min-height: 100vh; display: grid; grid-template-columns: 280px minmax(0, 1fr); }
.admin-sidebar { position: sticky; top: 0; height: 100vh; padding: 22px; background: #0b1220; color: #fff; }
.admin-sidebar .brand { margin-bottom: 28px; }
.admin-nav { display: grid; gap: 8px; }
.admin-nav button { width: 100%; text-align: left; border: 0; border-radius: 14px; padding: 12px 14px; color: rgba(255,255,255,.72); background: transparent; cursor: pointer; font-weight: 800; }
.admin-nav button.active, .admin-nav button:hover { color: #fff; background: rgba(255,255,255,.12); }
.admin-main { padding: 28px; }
.admin-top { display: flex; justify-content: space-between; align-items: center; gap: 18px; margin-bottom: 24px; }
.admin-top h1 { margin: 0; letter-spacing: -0.04em; }
.admin-view { display: none; }
.admin-view.active { display: block; }
.admin-card { padding: 22px; }
.admin-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 18px; }
.stat b { display: block; font-size: 34px; letter-spacing: -0.04em; }
.stat span { color: var(--muted); font-weight: 800; }
.admin-table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 18px; background: #fff; }
.admin-table { width: 100%; border-collapse: collapse; min-width: 900px; }
.admin-table th, .admin-table td { padding: 14px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.admin-table th { background: #f8fafc; font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.status-pill { display: inline-flex; padding: 5px 9px; border-radius: 999px; background: #eef4ff; color: var(--primary); font-weight: 900; font-size: 12px; }
.admin-toolbar { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 14px; }
.lead-panel { display: none; position: fixed; top: 0; right: 0; width: min(100%, 560px); height: 100vh; background: #fff; z-index: 200; box-shadow: -20px 0 70px rgba(16,24,40,.16); padding: 22px; overflow-y: auto; }
.lead-panel.active { display: block; }
.panel-head { display: flex; justify-content: space-between; gap: 12px; align-items: center; margin-bottom: 18px; }
.comment { padding: 12px; border-radius: 14px; background: #f8fafc; border: 1px solid var(--line); margin: 8px 0; }
.comment small { color: var(--muted); }
.admin-textarea.code { min-height: 60vh; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13px; }
.audit-list { display: grid; gap: 10px; }
.audit-item { padding: 12px; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.hidden { display: none !important; }

@media (max-width: 1060px) {
  .card-grid, .portfolio-grid { grid-template-columns: repeat(2, 1fr); }
  .package-grid { grid-template-columns: repeat(2, 1fr); }
  .process-grid { grid-template-columns: repeat(3, 1fr); }
  .main-nav, .header-actions { display: none; }
  .menu-toggle { display: inline-grid; place-items: center; margin-left: auto; }
  .site-header.open .main-nav, .site-header.open .header-actions { display: flex; }
  .site-header.open .header-inner { flex-wrap: wrap; padding: 12px 0; }
  .site-header.open .main-nav { width: 100%; order: 3; flex-direction: column; align-items: stretch; }
  .site-header.open .header-actions { width: 100%; order: 4; justify-content: space-between; }
  .admin-shell { grid-template-columns: 1fr; }
  .admin-sidebar { position: relative; height: auto; }
  .admin-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 760px) {
  .container { width: min(100% - 22px, var(--container)); }
  .section { padding: 52px 0; }
  .hero { padding: 54px 0 48px; }
  .hero-grid, .two-col, .contact-grid, .detail-grid { grid-template-columns: 1fr; }
  .hero h1, .page-hero h1 { font-size: 42px; }
  .card-grid, .portfolio-grid, .package-grid, .process-grid, .footer-grid { grid-template-columns: 1fr; }
  .split-card { flex-direction: column; align-items: flex-start; padding: 24px; }
  .metric-grid { grid-template-columns: 1fr; }
  .quiz-options, .quiz-contact { grid-template-columns: 1fr; }
  .floating-contact { left: 10px; right: 10px; justify-content: center; }
  .floating-contact a { flex: 1; text-align: center; }
  .admin-main { padding: 18px; }
  .admin-grid { grid-template-columns: 1fr; }
}

/* Client cabinet and internal CRM chat */
.client-hero { background: linear-gradient(135deg, rgba(37,99,235,.08), rgba(124,58,237,.08)); }
.client-app { min-height: 420px; }
.client-auth-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; align-items: start; }
.client-dashboard { display: grid; gap: 18px; }
.client-topbar { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.client-topbar h2 { margin: 0 0 4px; font-size: clamp(28px, 4vw, 42px); letter-spacing: -0.04em; }
.client-topbar p { margin: 0; color: var(--muted); }
.client-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; }
.client-layout { display: grid; grid-template-columns: minmax(280px, .72fr) minmax(0, 1.28fr); gap: 18px; align-items: start; }
.client-side { display: grid; gap: 18px; }
.client-new-request textarea { min-height: 120px; }
.request-list h3, .client-chat-card h3 { margin-top: 0; }
.client-request-list { display: grid; gap: 10px; }
.client-request { position: relative; width: 100%; border: 1px solid var(--line); border-radius: 16px; background: #fff; text-align: left; padding: 13px 44px 13px 14px; cursor: pointer; }
.client-request:hover, .client-request.active { border-color: rgba(37,99,235,.55); background: #eef4ff; }
.client-request b, .client-request span { display: block; }
.client-request span { color: var(--muted); font-size: 13px; margin-top: 4px; }
.client-request em, .unread-pill { display: inline-flex; align-items: center; justify-content: center; min-width: 24px; min-height: 24px; padding: 2px 8px; border-radius: 999px; background: var(--danger); color: #fff; font-style: normal; font-size: 12px; font-weight: 900; }
.client-request em { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); }
.unread-pill { margin-top: 5px; }
.chat-box { display: grid; gap: 10px; max-height: 420px; overflow-y: auto; padding: 14px; border: 1px solid var(--line); border-radius: 18px; background: #f8fafc; margin: 12px 0; }
.chat-message { max-width: 86%; padding: 12px 14px; border-radius: 16px; border: 1px solid var(--line); background: #fff; }
.chat-message small { display: block; color: var(--muted); font-weight: 800; margin-bottom: 5px; }
.chat-message.client { justify-self: start; border-bottom-left-radius: 6px; }
.chat-message.admin { justify-self: end; color: #fff; background: linear-gradient(135deg, var(--primary), var(--accent)); border-color: transparent; border-bottom-right-radius: 6px; }
.chat-message.admin small { color: rgba(255,255,255,.78); }
.chat-message.system { justify-self: center; max-width: 100%; background: #fff7ed; border-color: #fed7aa; }
.chat-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: end; }
.chat-form textarea, #adminChatText { width: 100%; border: 1px solid var(--line); border-radius: 14px; resize: vertical; padding: 13px 14px; }
.client-chat-head p { color: var(--muted); margin-top: 4px; }
.muted-small { color: var(--muted); font-size: 13px; }

@media (max-width: 900px) {
  .client-auth-grid, .client-layout { grid-template-columns: 1fr; }
  .client-topbar { flex-direction: column; align-items: flex-start; }
  .client-actions { justify-content: flex-start; }
  .chat-form { grid-template-columns: 1fr; }
  .chat-message { max-width: 100%; }
}
