:root {
  color-scheme: dark;
  --ink: #06171e;
  --ink-2: #09252e;
  --panel: #0c2b34;
  --line: rgba(173, 220, 219, 0.16);
  --muted: #9eb5b8;
  --text: #f4fbfa;
  --accent: #0be0b0;
  --accent-2: #6ff5d5;
  --danger: #ff7e7e;
  --paper: #f5f7f4;
  --paper-text: #102a30;
  --radius: 18px;
  font-family: Inter, "Segoe UI", Tahoma, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--ink); color: var(--text); line-height: 1.65; }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
.hidden { display: none !important; }

.site-header {
  width: min(1180px, calc(100% - 40px));
  height: 82px;
  margin: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}

.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; letter-spacing: -.02em; }
.brand-mark { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 11px; background: var(--accent); color: #052229; font-size: 12px; font-weight: 900; box-shadow: 0 8px 25px rgba(11,224,176,.16); }
.site-header nav { display: flex; gap: 30px; color: var(--muted); font-size: 14px; }
.site-header nav a:hover { color: var(--text); }

.button { border: 1px solid transparent; border-radius: 12px; padding: 13px 20px; cursor: pointer; font-weight: 750; transition: .2s ease; display: inline-flex; justify-content: center; align-items: center; gap: 8px; }
.button:hover { transform: translateY(-1px); }
.button.primary { background: var(--accent); color: #062129; box-shadow: 0 10px 30px rgba(11,224,176,.13); }
.button.primary:hover { background: var(--accent-2); }
.button.secondary { background: rgba(255,255,255,.05); color: var(--text); border-color: var(--line); }
.button.ghost { border-color: var(--line); color: var(--text); background: transparent; }
.button.light { background: var(--text); color: var(--ink); }
.button.small { padding: 9px 15px; border-radius: 10px; font-size: 13px; }
.button.full { width: 100%; }

.hero { width: min(1180px, calc(100% - 40px)); margin: 0 auto; min-height: 660px; padding: 100px 0 90px; display: grid; grid-template-columns: 1.05fr .95fr; gap: 80px; align-items: center; position: relative; }
.hero::before { content: ""; position: absolute; z-index: -1; width: 540px; height: 540px; border-radius: 50%; background: radial-gradient(circle, rgba(11,224,176,.1), transparent 66%); filter: blur(8px); left: -170px; top: 30px; }
.eyebrow { margin: 0 0 15px; color: var(--accent); font-size: 12px; font-weight: 850; letter-spacing: .1em; text-transform: uppercase; }
.pulse { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 6px rgba(11,224,176,.1); margin-left: 7px; }
.hero h1 { font-size: clamp(46px, 5.2vw, 76px); line-height: 1.08; letter-spacing: -.045em; margin: 0 0 24px; max-width: 720px; }
.lead { color: var(--muted); font-size: 19px; max-width: 650px; margin: 0; }
.hero-actions { display: flex; gap: 12px; margin-top: 34px; }
.trust-row { display: flex; gap: 22px; flex-wrap: wrap; margin-top: 28px; color: #c5d7d8; font-size: 12px; }
.trust-row span::before { content: "✓"; color: var(--accent); margin-left: 7px; font-weight: 900; }

.hero-console { direction: ltr; border: 1px solid var(--line); border-radius: 22px; padding: 0 24px 22px; background: linear-gradient(145deg, rgba(14,48,58,.96), rgba(7,27,34,.98)); box-shadow: 0 30px 80px rgba(0,0,0,.28); transform: perspective(1200px) rotateY(3deg); }
.console-top { height: 54px; display: flex; gap: 7px; align-items: center; border-bottom: 1px solid var(--line); color: var(--muted); }
.console-top span { width: 8px; height: 8px; border-radius: 50%; background: #31505a; }
.console-top span:first-child { background: var(--accent); }
.console-top b { margin-left: auto; font-size: 11px; font-family: ui-monospace, monospace; font-weight: 500; }
.flow-card { direction: rtl; margin-top: 20px; padding: 15px; border: 1px solid var(--line); border-radius: 13px; display: grid; grid-template-columns: 44px 1fr auto; gap: 12px; align-items: center; background: rgba(255,255,255,.025); }
.flow-card.bridge { border-color: rgba(11,224,176,.35); box-shadow: inset 0 0 32px rgba(11,224,176,.04); }
.flow-icon { width: 42px; height: 42px; border-radius: 10px; background: var(--accent); color: var(--ink); display: grid; place-items: center; font-size: 11px; font-weight: 900; }
.flow-icon.odoo { background: #714b67; color: white; font-size: 19px; }
.flow-card small, .flow-card strong { display: block; }
.flow-card small { color: var(--muted); font-size: 10px; }
.flow-card strong { font-size: 14px; }
.status { font-size: 10px; color: var(--accent); padding: 4px 8px; border-radius: 99px; background: rgba(11,224,176,.08); }
.flow-line { height: 50px; position: relative; display: flex; align-items: center; justify-content: center; }
.flow-line i { width: 1px; height: 100%; background: linear-gradient(var(--accent), rgba(11,224,176,.16)); }
.flow-line em { position: absolute; left: 55%; background: var(--ink-2); color: var(--muted); font-size: 9px; padding: 2px 7px; border-radius: 8px; font-style: normal; font-family: ui-monospace, monospace; }
.ai-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.mini-card { padding: 16px; border: 1px solid var(--line); border-radius: 12px; display: flex; gap: 10px; align-items: center; }
.mini-card span { width: 32px; height: 32px; border: 1px solid var(--line); border-radius: 9px; display: grid; place-items: center; color: var(--accent); font-size: 11px; }
.mini-card b { font-size: 13px; }
.console-foot { direction: rtl; color: var(--muted); font-size: 10px; text-align: center; margin: 18px 0 0; }
.console-foot span { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); margin-left: 6px; }

.strip { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); min-height: 85px; padding: 24px max(20px, calc((100% - 1180px)/2)); display: flex; align-items: center; justify-content: space-between; gap: 25px; color: #819b9e; overflow: hidden; }
.strip p { margin: 0; white-space: nowrap; font-size: 13px; font-weight: 700; }
.section { width: min(1180px, calc(100% - 40px)); margin: auto; padding: 110px 0; }
.section-heading { text-align: center; max-width: 690px; margin: 0 auto 58px; }
.section-heading.align-start { text-align: right; margin-right: 0; }
.section-heading h2, .security h2, .cta h2 { margin: 0 0 16px; font-size: clamp(34px, 4vw, 52px); letter-spacing: -.035em; line-height: 1.15; }
.section-heading > p:last-child, .security-copy > p:last-child { color: var(--muted); margin: 0; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.steps article { padding: 35px; min-height: 240px; position: relative; border-left: 1px solid var(--line); background: rgba(255,255,255,.018); }
.steps article:last-child { border-left: none; }
.steps span { font-size: 12px; color: var(--accent); font-family: ui-monospace, monospace; }
.steps h3 { margin: 52px 0 10px; font-size: 20px; }
.steps p, .feature p { margin: 0; color: var(--muted); font-size: 14px; }

.capabilities { border-top: 1px solid var(--line); }
.capability-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.feature { min-height: 255px; padding: 28px; border: 1px solid var(--line); border-radius: var(--radius); background: rgba(255,255,255,.018); }
.feature.featured { grid-column: span 2; background: linear-gradient(135deg, rgba(11,224,176,.08), rgba(255,255,255,.018)); }
.feature-icon { width: 42px; height: 42px; border: 1px solid rgba(11,224,176,.28); border-radius: 12px; color: var(--accent); display: grid; place-items: center; }
.feature h3 { margin: 44px 0 9px; font-size: 19px; }
.tags { display: flex; gap: 7px; margin-top: 25px; }
.tags b { direction: ltr; font-family: ui-monospace, monospace; font-size: 10px; font-weight: 500; color: var(--accent); background: rgba(11,224,176,.07); border: 1px solid rgba(11,224,176,.14); padding: 5px 8px; border-radius: 7px; }

.security { display: grid; grid-template-columns: .85fr 1.15fr; gap: 90px; align-items: center; border-top: 1px solid var(--line); }
.security-list { border-top: 1px solid var(--line); }
.security-list > div { display: grid; grid-template-columns: 42px 1fr; gap: 20px; padding: 23px 0; border-bottom: 1px solid var(--line); }
.security-list span { color: var(--accent); font: 11px ui-monospace, monospace; }
.security-list p { margin: 0; color: var(--muted); font-size: 14px; }
.security-list strong { color: var(--text); display: block; font-size: 16px; }
.cta { width: min(1180px, calc(100% - 40px)); margin: 0 auto 80px; padding: 56px; border-radius: 24px; background: var(--accent); color: #052129; display: flex; justify-content: space-between; align-items: center; gap: 40px; }
.cta .eyebrow { color: #0c6455; }
.cta h2 { margin-bottom: 5px; }
.cta p:last-child { margin: 0; color: #27645e; }

footer { width: min(1180px, calc(100% - 40px)); min-height: 120px; margin: auto; border-top: 1px solid var(--line); display: flex; align-items: center; gap: 30px; color: var(--muted); font-size: 12px; }
footer p { margin: 0 auto 0 0; }
footer > div { display: flex; gap: 20px; }

dialog { color: var(--paper-text); border: 0; padding: 0; }
dialog::backdrop { background: rgba(1,13,17,.82); backdrop-filter: blur(9px); }
.modal { width: min(470px, calc(100% - 28px)); border-radius: 22px; padding: 32px; background: var(--paper); box-shadow: 0 28px 90px rgba(0,0,0,.42); }
.modal .close, .dashboard-close { position: absolute; left: 18px; top: 15px; border: 0; background: transparent; font-size: 27px; color: #789095; cursor: pointer; }
.modal-brand { display: flex; gap: 12px; align-items: center; margin-bottom: 23px; }
.modal-brand p { margin: 0; color: #0b8f76; }
.tabs { display: grid; grid-template-columns: 1fr 1fr; background: #e7ece9; padding: 4px; border-radius: 11px; margin-bottom: 22px; }
.tabs button { border: 0; background: transparent; padding: 9px; border-radius: 8px; color: #61777a; cursor: pointer; }
.tabs button.active { background: white; color: var(--paper-text); box-shadow: 0 2px 8px rgba(0,0,0,.07); font-weight: 700; }
.stack { display: grid; gap: 14px; }
label { font-size: 12px; font-weight: 700; color: #365158; }
label input, label select, label textarea { width: 100%; margin-top: 6px; border: 1px solid #cfdbd9; border-radius: 10px; padding: 11px 12px; color: var(--paper-text); background: white; outline: none; transition: .15s; }
label input:focus, label select:focus, label textarea:focus { border-color: #13af91; box-shadow: 0 0 0 3px rgba(11,224,176,.12); }
label small { display: block; color: #789095; font-weight: 400; margin-top: 4px; }
.form-message { min-height: 20px; color: #b02f37; font-size: 12px; margin: 10px 0 0; }
.form-message.success { color: #0b866d; }

.dashboard-modal { width: min(1180px, calc(100% - 24px)); height: min(790px, calc(100vh - 24px)); border-radius: 22px; overflow: hidden; background: var(--paper); box-shadow: 0 28px 100px rgba(0,0,0,.5); }
.dashboard-shell { height: 100%; min-height: 0; display: grid; grid-template-columns: 220px 1fr; grid-template-rows: minmax(0, 1fr); direction: ltr; }
.dashboard-shell > aside { direction: rtl; background: #09242c; color: white; padding: 25px 18px; display: flex; flex-direction: column; }
.dashboard-shell > aside .brand { padding: 0 7px 25px; }
.dashboard-shell > aside nav { display: grid; gap: 5px; margin-top: 20px; }
.dashboard-shell > aside nav button { text-align: right; color: #99b0b3; background: transparent; border: 0; padding: 11px 13px; border-radius: 9px; cursor: pointer; }
.dashboard-shell > aside nav button.active { background: rgba(11,224,176,.1); color: var(--accent); }
.user-box { margin-top: auto; border-top: 1px solid var(--line); padding-top: 18px; display: grid; grid-template-columns: 36px 1fr 28px; gap: 9px; align-items: center; }
.user-box > span { width: 36px; height: 36px; border-radius: 10px; background: var(--accent); color: var(--ink); display: grid; place-items: center; font-weight: 900; }
.user-box strong, .user-box small { display: block; max-width: 105px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-box strong { font-size: 12px; }
.user-box small { color: #86a1a4; font-size: 9px; direction: ltr; text-align: right; }
.user-box button { background: none; color: #86a1a4; border: 0; cursor: pointer; }
.dashboard-main { direction: rtl; min-height: 0; max-height: 100%; padding: 34px 40px; overflow-y: auto; overscroll-behavior: contain; }
.dashboard-main > header { position: relative; display: flex; justify-content: space-between; border-bottom: 1px solid #dbe3e0; padding-bottom: 22px; margin-bottom: 24px; }
.dashboard-main h2 { margin: 0; font-size: 27px; }
.dashboard-main .eyebrow { color: #0b987d; margin-bottom: 4px; }
.dashboard-close { position: static; }
.dashboard-actions { display: flex; justify-content: space-between; align-items: center; color: #637a7e; font-size: 13px; }
.connection-list { display: grid; gap: 12px; margin-top: 22px; }
.empty-state { min-height: 320px; display: grid; place-items: center; text-align: center; border: 1px dashed #c7d4d1; border-radius: 16px; color: #698084; padding: 30px; }
.empty-state strong { display: block; color: var(--paper-text); font-size: 18px; margin-bottom: 5px; }
.connection-card { border: 1px solid #d7e0de; border-radius: 15px; padding: 20px; display: grid; grid-template-columns: 1fr auto; gap: 16px; background: white; }
.connection-card h3 { margin: 0; font-size: 17px; }
.connection-meta { display: flex; flex-wrap: wrap; gap: 12px; color: #718589; font-size: 11px; margin-top: 6px; }
.connection-meta span:first-child { direction: ltr; }
.connection-url { direction: ltr; text-align: left; background: #edf3f1; border-radius: 8px; padding: 7px 10px; margin-top: 13px; font: 10px ui-monospace, monospace; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.connection-card .status-good { color: #08775f; font-size: 11px; }
.card-actions { display: flex; gap: 7px; align-items: start; }
.card-actions button { border: 1px solid #d3dfdc; color: #3d585e; background: white; border-radius: 8px; padding: 7px 10px; cursor: pointer; font-size: 11px; }
.card-actions button.danger { color: #b4333b; }

.connection-form { max-width: 830px; }
.form-section { display: flex; align-items: center; gap: 12px; margin: 0 0 18px; }
.form-section > div { display: flex; align-items: center; gap: 10px; }
.form-section span { width: 27px; height: 27px; display: grid; place-items: center; border-radius: 8px; background: #d8f8ef; color: #08775f; font-size: 11px; font-weight: 800; }
.form-section h3 { margin: 0; font-size: 17px; white-space: nowrap; }
.form-section p { margin: 0; color: #718589; font-size: 11px; }
.permissions-heading { margin-top: 30px; }
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.form-grid .wide { grid-column: span 2; }
.permission-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; }
.permission-grid label { border: 1px solid #d5e0dd; background: white; border-radius: 11px; padding: 12px; display: flex; align-items: start; gap: 8px; cursor: pointer; }
.permission-grid input { width: auto; margin: 3px 0 0; accent-color: #0ca88a; }
.permission-grid b, .permission-grid small { display: block; }
.permission-grid b { font-size: 12px; color: var(--paper-text); }
.permission-grid small { font-size: 9px; }
.submit-connection { margin-top: 18px; min-width: 250px; }
.progress-panel { margin-top: 18px; border: 1px solid #bfeadf; background: #eaf9f5; padding: 14px; border-radius: 11px; display: flex; gap: 12px; align-items: center; }
.progress-panel strong, .progress-panel small { display: block; }
.progress-panel small { color: #63807c; }
.spinner { width: 24px; height: 24px; border-radius: 50%; border: 3px solid #bbe7dc; border-top-color: #0a997c; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.audit-list { display: grid; gap: 9px; }
.audit-item { display: grid; grid-template-columns: 145px 1fr auto; gap: 15px; padding: 13px 15px; border: 1px solid #d7e0de; border-radius: 10px; background: white; font-size: 11px; align-items: center; }
.audit-item time { direction: ltr; color: #718589; }
.audit-item b { color: #214047; }
.audit-item span { color: #08775f; }

.token-modal h2 { margin: 0 0 8px; }
.token-modal > p { color: #647d81; }
.copy-row { display: grid; grid-template-columns: 1fr 62px; gap: 6px; align-items: stretch; }
.copy-row input, .copy-row textarea { direction: ltr; text-align: left; font: 10px ui-monospace, monospace; }
.copy-row textarea { height: 75px; resize: none; }
.copy-row button { margin-top: 6px; border: 0; border-radius: 9px; color: #076e59; background: #d9f6ee; cursor: pointer; }
.token-modal label { display: block; margin-top: 14px; }
.notice { font-size: 11px; color: #43636a; background: #e8efed; padding: 11px; border-radius: 9px; margin: 17px 0; }
.toast { position: fixed; z-index: 100; bottom: 22px; left: 22px; background: #f5f7f4; color: #143239; padding: 10px 16px; border-radius: 9px; box-shadow: 0 12px 40px rgba(0,0,0,.3); opacity: 0; transform: translateY(15px); pointer-events: none; transition: .2s; font-size: 12px; }
.toast.show { opacity: 1; transform: translateY(0); }
.oauth-page { background: #071b22; min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.oauth-card { width: min(520px, 100%); background: var(--paper); color: var(--paper-text); padding: 36px; border-radius: 22px; }
.oauth-card .brand { margin-bottom: 30px; }
.oauth-card h1 { margin: 0 0 14px; font-size: 27px; }
.oauth-card form { display: grid; gap: 14px; }
.oauth-card .choices { display: grid; gap: 8px; }
.oauth-card .choice { display: flex; gap: 10px; align-items: center; border: 1px solid #d3dfdc; border-radius: 11px; padding: 12px; cursor: pointer; }
.oauth-card .choice input { width: auto; margin: 0; }
.oauth-card .choice strong, .oauth-card .choice small { display: block; }
.oauth-card ul { font-size: 12px; color: #516d71; }
.oauth-card .actions { display: flex; gap: 8px; }
.oauth-card button { border: 1px solid #d3dfdc; border-radius: 10px; padding: 11px 15px; cursor: pointer; }
.oauth-card button.primary { background: #0bcba1; color: #052129; border-color: transparent; }
.oauth-card .fine { color: #7d9194; font-size: 10px; margin-top: 22px; }
.alert.error { color: #a22e36; background: #ffe8e8; padding: 9px 11px; border-radius: 8px; font-size: 12px; }

@media (max-width: 900px) {
  .site-header nav { display: none; }
  .hero { grid-template-columns: 1fr; padding-top: 70px; gap: 50px; }
  .hero-copy { text-align: center; }
  .hero-copy .lead { margin-inline: auto; }
  .hero-actions, .trust-row { justify-content: center; }
  .hero-console { max-width: 590px; width: 100%; margin: auto; transform: none; }
  .capability-grid { grid-template-columns: 1fr 1fr; }
  .feature.featured { grid-column: span 2; }
  .security { grid-template-columns: 1fr; gap: 45px; }
  .dashboard-shell { grid-template-columns: 1fr; grid-template-rows: auto minmax(0, 1fr); }
  .dashboard-shell > aside { padding: 13px 18px; flex-direction: row; align-items: center; gap: 15px; }
  .dashboard-shell > aside .brand { padding: 0; }
  .dashboard-shell > aside nav { display: flex; margin: 0; }
  .user-box { display: none; }
}

@media (max-width: 650px) {
  .site-header { width: calc(100% - 28px); }
  .site-header .brand > span:last-child { display: none; }
  .hero, .section, .cta, footer { width: calc(100% - 28px); }
  .hero { padding: 58px 0 65px; }
  .hero h1 { font-size: 43px; }
  .lead { font-size: 16px; }
  .hero-actions { flex-direction: column; }
  .hero-console { padding-inline: 14px; }
  .strip { justify-content: flex-start; }
  .section { padding: 78px 0; }
  .steps, .capability-grid { grid-template-columns: 1fr; }
  .steps article { border-left: 0; border-bottom: 1px solid var(--line); }
  .steps article:last-child { border-bottom: 0; }
  .feature.featured { grid-column: auto; }
  .cta { padding: 33px 26px; flex-direction: column; align-items: stretch; }
  footer { padding: 30px 0; flex-wrap: wrap; }
  footer p { margin: 0; }
  .dashboard-modal { height: calc(100vh - 12px); width: calc(100% - 12px); }
  .dashboard-shell > aside { overflow-x: auto; }
  .dashboard-shell > aside .brand span:last-child { display: none; }
  .dashboard-shell > aside nav button { white-space: nowrap; padding: 8px; font-size: 11px; }
  .dashboard-main { padding: 24px 18px; }
  .dashboard-actions { align-items: flex-start; gap: 8px; }
  .form-grid, .permission-grid { grid-template-columns: 1fr; }
  .form-grid .wide { grid-column: auto; }
  .form-section { align-items: flex-start; flex-direction: column; }
  .connection-card { grid-template-columns: 1fr; }
  .audit-item { grid-template-columns: 1fr; gap: 3px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation-duration: .01ms !important; }
}
