/* Finanaliz.Uz v49 shared design system. Standalone fallback when Tailwind build is unavailable. */
:root{--bp-bg:#f5f7fa;--bp-surface:#fff;--bp-line:#e2e8f0;--bp-text:#152235;--bp-muted:#617087;--bp-ink:#192939;--bp-blue:#2563eb;--bp-ring:rgba(37,99,235,.12)}
html{scroll-behavior:smooth}body{background:var(--bp-bg);color:var(--bp-text);font-family:Inter,ui-sans-serif,system-ui,-apple-system,"Segoe UI",sans-serif;font-size:14px;line-height:1.55}
body .wrap,body .page,body .main{max-width:1280px;margin-left:auto;margin-right:auto}body .wrap{padding:24px clamp(14px,2.8vw,36px) 96px}
body .topbar,body .ahdr{background:rgba(255,255,255,.97);border-color:var(--bp-line);box-shadow:0 2px 12px rgba(15,23,42,.035)}
body .topbar{height:auto;min-height:72px;padding:10px clamp(18px,3vw,48px)}
body .ahdr{padding:14px 18px;border-radius:16px;margin-bottom:22px;position:sticky;top:10px;z-index:15}
body .brand-wordmark,body .alogo,body .login-wordmark,body .bp-wordmark{font-size:20px;font-weight:800;letter-spacing:-.6px;color:#152235;text-decoration:none}
body .ahdr .alogo{color:#152235;font-size:20px}
body .page-head h1,body .wrap h1{font-size:clamp(23px,2.2vw,30px);letter-spacing:-.03em;font-weight:750;line-height:1.25}
body .sub,body .hint,body .note,body .muted{color:var(--bp-muted)}
body .panel,body .card,body .service-choice,body .login-card,body .history-mini{border:1px solid var(--bp-line);background:var(--bp-surface);border-radius:17px;box-shadow:0 5px 24px rgba(15,23,42,.025)}
body .panel,body .card{padding:clamp(16px,2vw,26px)}
body .service-choice{min-height:180px;transition:box-shadow .18s ease,transform .18s ease,border-color .18s}
body .service-choice:hover{transform:translateY(-2px);border-color:#94a3b8;box-shadow:0 13px 32px rgba(15,23,42,.07)}
body .btn,body .seg button,body .lang button{border-radius:10px;padding:10px 15px;font-size:13px;font-weight:650;transition:background-color .15s,transform .15s,border-color .15s}
body .btn:active{transform:translateY(1px)}body .btn.primary,body .btn:not(.sec):not(.small):not(.ghost){background:#1e293b;color:#fff;border-color:#1e293b}
body .btn.sec,body .btn.ghost{background:#fff;color:#233346;border:1px solid #cbd5e1}
body input:not([type="checkbox"]):not([type="radio"]),body select,body textarea{border-radius:10px;border:1px solid #cad4e1;font-size:14px;min-height:42px;padding:9px 12px;background:#fff;color:#182638}
body input:focus-visible,body select:focus-visible,body textarea:focus-visible,body button:focus-visible{outline:2px solid #2563eb;outline-offset:2px}
body label,body .field label{font-size:13px;font-weight:650;color:#334155}
body .tabs{gap:8px;overflow-x:auto;flex-wrap:nowrap;padding:3px 1px 8px}body .tabs div{white-space:nowrap;border:1px solid #e2e8f0;border-radius:10px;background:#fff;padding:10px 15px;font-size:13px}body .tabs div.on{background:#1e293b;border-color:#1e293b;color:#fff}body .tabs div.done{border-color:#cde7d6;background:#ecfdf3;color:#166534}
body .nav-btn{font-size:13px;padding:10px 12px}body .nav-btn.active{color:#0f172a;background:#f1f5f9}body .user-mini b{font-size:13px}body .user-mini span{font-size:11px}
body .table-wrap,body .tw{max-width:100%;overflow-x:auto;border-radius:12px}body .table th,body .table td,body table th,body table td{font-size:12px;padding:9px 10px;line-height:1.45}body .table th,body table th{background:#f8fafc;color:#475569}
body .ahdr .adrop{border-radius:14px;box-shadow:0 12px 45px rgba(15,23,42,.13)}
body #demoBtn,body #demoNote{display:none!important}body .login-card-single{padding:30px;max-width:460px}body .login-brand h1{font-size:27px}
body .login-shell{background:#f8fafc}
body .history-mini{padding:15px 18px;gap:12px}body .history-mini span{line-height:1.6}
.auth-switch{font-size:12px;color:#64748b;border-top:1px solid #e2e8f0;margin:18px 0 0;padding-top:16px}.auth-switch a{color:#1d4ed8;font-weight:700}
.bp-progress{margin:14px 0;padding:13px 15px;border:1px solid #bfdbfe;background:#eff6ff;border-radius:12px;font-size:13px;line-height:1.5;color:#1d4ed8}.bp-progress.is-error{border-color:#fecaca;background:#fef2f2;color:#991b1b}
.sms-stack{display:grid;gap:10px}.row-sms{display:flex;align-items:center;gap:10px}.row-sms .input{max-width:260px}.sms-check{display:flex;gap:9px;align-items:center}.sms-check input{width:17px;height:17px}
/* Dedicated business-plan portal */
body.bp-auth-body{min-height:100vh;margin:0;background:#f5f7fb;display:grid;place-items:center;padding:24px}
.bp-auth{width:min(440px,100%)}.bp-wordmark{display:block;text-align:center;margin:0 0 27px}.bp-auth-card{background:#fff;border:1px solid #e2e8f0;border-radius:22px;box-shadow:0 15px 45px rgba(15,23,42,.045);padding:36px}.bp-auth-icon{width:46px;height:46px;display:grid;place-items:center;color:#fff;background:#1e293b;border-radius:14px;font-size:14px;font-weight:750;margin-bottom:20px}.bp-auth-card h1{font-size:26px;font-weight:750;letter-spacing:-.5px;margin:0}.bp-subtitle{color:#64748b;margin:7px 0 26px;font-size:13px}.bp-auth-card form{display:grid;gap:10px}.bp-auth-card label{font-weight:700;margin:4px 0 0}.bp-auth-card input{width:100%;border:1px solid #cbd5e1;border-radius:11px;padding:12px 13px;min-height:46px;font-size:14px}.bp-auth-card button{margin-top:12px;width:100%;border:0;border-radius:11px;min-height:47px;background:#1e293b;color:#fff;font-weight:750;cursor:pointer}.bp-auth-card button:disabled{opacity:.6}.bp-form-error{color:#b42318;background:#fef2f2;border:1px solid #fecaca;padding:10px;border-radius:10px;font-size:13px}.bp-backlink{display:block;text-align:center;margin:23px auto;color:#64748b;font-size:13px;text-decoration:none}
@media(max-width:780px){body .wrap{padding:14px 12px 72px}body .ahdr{position:relative;top:0}body .topbar{padding:10px 14px}body .tabs{overflow-x:auto}body .grid12{min-width:470px}body .card,body .panel{padding:16px}.row-sms{flex-wrap:wrap}.bp-auth-card{padding:25px}body .service-choice{min-height:138px}}
@media(max-width:440px){body .ahdr .ar{width:100%;justify-content:flex-start}body .page-head h1,body .wrap h1{font-size:23px}body .btns{gap:10px}body .btns .btn{padding:10px 12px}.row-sms .input{max-width:none;width:100%}}


/* v54 — full visual redesign */
:root{
  --app-bg:#f3f6fb;
  --app-surface:#ffffff;
  --app-surface-2:#f8fbff;
  --app-line:#dbe4ee;
  --app-line-strong:#c8d4e0;
  --app-text:#162334;
  --app-muted:#627287;
  --app-primary:#1e3a5f;
  --app-primary-soft:#ebf2fa;
  --app-success:#067647;
  --app-success-soft:#ecfdf3;
  --app-warn:#b54708;
  --app-warn-soft:#fffaeb;
  --app-danger:#b42318;
  --app-danger-soft:#fef3f2;
  --shadow-1:0 8px 28px rgba(15,23,42,.055);
  --shadow-2:0 18px 40px rgba(15,23,42,.08);
  --radius-xl:24px;
  --radius-lg:18px;
  --radius-md:14px;
  --page-width:1840px;
}
html,body{background:var(--app-bg)!important;color:var(--app-text)!important;font-family:Inter,ui-sans-serif,system-ui,-apple-system,"Segoe UI",sans-serif!important;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility}
body{font-size:14px;line-height:1.5}
#root{min-height:100vh}

/* Core app shell */
.app-shell{min-height:100vh;background:
 radial-gradient(circle at top left, rgba(255,255,255,.92), rgba(255,255,255,0) 28%),
 linear-gradient(180deg,#f8fbff 0%, var(--app-bg) 30%, #eef3f8 100%)}
.topbar{position:sticky;top:0;z-index:60;display:grid!important;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:22px;min-height:78px;padding:14px clamp(20px,2vw,40px)!important;background:rgba(248,251,255,.88)!important;backdrop-filter:blur(18px);border-bottom:1px solid rgba(200,212,224,.8)!important;box-shadow:0 4px 18px rgba(15,23,42,.035)}
.brand{display:flex;align-items:center;gap:0;min-width:max-content}
.brand-button{appearance:none;border:0;background:transparent;padding:0;cursor:pointer}
.brand-wordmark{font-size:28px!important;font-weight:800!important;letter-spacing:-.05em;color:var(--app-text)!important}
.nav{display:flex;align-items:center;gap:8px;overflow:auto;padding:4px 0;scrollbar-width:none}
.nav::-webkit-scrollbar{display:none}
.nav-btn{appearance:none;border:1px solid transparent;background:transparent;color:var(--app-muted);border-radius:999px;padding:11px 16px!important;font-size:13px!important;font-weight:650;white-space:nowrap;transition:.18s ease}
.nav-btn:hover{background:rgba(255,255,255,.86);color:var(--app-text);border-color:var(--app-line)}
.nav-btn.active{background:var(--app-surface)!important;color:var(--app-primary)!important;border-color:var(--app-line-strong)!important;box-shadow:0 3px 12px rgba(15,23,42,.04)}
.top-user{display:flex;align-items:center;gap:14px}
.user-mini b{display:block;font-size:13px;line-height:1.25;color:var(--app-text);font-weight:750;max-width:240px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.user-mini span{display:block;font-size:11px;color:var(--app-muted);margin-top:3px;max-width:240px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.main{max-width:var(--page-width);width:min(calc(100vw - 48px),var(--page-width));margin:0 auto}
.page{width:100%!important;max-width:none!important;padding:32px clamp(20px,2vw,36px) 56px!important}

/* Buttons and form controls */
.btn{appearance:none;border:1px solid var(--app-line)!important;background:var(--app-surface)!important;color:var(--app-text)!important;border-radius:12px!important;padding:11px 16px!important;font-size:13px!important;font-weight:700!important;line-height:1.1;display:inline-flex;align-items:center;justify-content:center;gap:8px;box-shadow:none;transition:.18s ease;cursor:pointer}
.btn:hover{transform:translateY(-1px);border-color:var(--app-line-strong)!important;box-shadow:0 10px 24px rgba(15,23,42,.06)!important;background:#fff!important}
.btn.primary{background:var(--app-primary)!important;color:#fff!important;border-color:var(--app-primary)!important;box-shadow:0 10px 22px rgba(30,58,95,.18)!important}
.btn.primary:hover{background:#163150!important;border-color:#163150!important}
.btn.small{padding:9px 13px!important;font-size:12px!important;border-radius:10px!important}
.btn.ghost,.btn.sec{background:rgba(255,255,255,.72)!important}
.btn:disabled{opacity:.55;cursor:not-allowed;transform:none!important;box-shadow:none!important}
.input,.select,.textarea,
body input:not([type="checkbox"]):not([type="radio"]),body select,body textarea{width:100%;min-height:48px;padding:12px 14px!important;border:1px solid var(--app-line)!important;border-radius:14px!important;background:#fff!important;color:var(--app-text)!important;font-size:14px!important;box-shadow:inset 0 1px 0 rgba(255,255,255,.8)!important}
.textarea,body textarea{min-height:120px}
.input:focus,.select:focus,.textarea:focus,
body input:focus-visible,body select:focus-visible,body textarea:focus-visible{border-color:#90a7bf!important;box-shadow:0 0 0 4px rgba(30,58,95,.09)!important;outline:none!important}
.field label,body label,.lb{font-size:12px!important;font-weight:750!important;color:#42556d!important;letter-spacing:.02em}
.hint,.muted,.note,.sub,.was{color:var(--app-muted)!important}
.form-stack{gap:14px!important}

/* Page heading */
.eyebrow{display:inline-flex;align-items:center;gap:6px;padding:7px 10px;border-radius:999px;background:var(--app-primary-soft);color:var(--app-primary);font-size:11px!important;letter-spacing:.08em;font-weight:800;margin-bottom:12px!important}
.page-head{display:flex;align-items:flex-end;justify-content:space-between;gap:24px;margin-bottom:24px!important}
.page-head h1{margin:0;font-size:clamp(28px,2.2vw,40px)!important;line-height:1.05;letter-spacing:-.06em;color:var(--app-text)}
.page-head p{margin:10px 0 0!important;font-size:14px!important;line-height:1.65;max-width:920px;color:var(--app-muted)!important}
.page-actions{display:flex;flex-wrap:wrap;gap:10px}

/* Surfaces */
.panel,.card,.history-card,.history-mini,.service-choice,.stat,.archive-banner>div,.recent-run,.status-hero,.meta-box,.bench-box,.market-row,.route,.finding,.gate,.stage,.history-mini,.service-summary,.index-status .stat{
  background:var(--app-surface)!important;
  border:1px solid var(--app-line)!important;
  border-radius:var(--radius-lg)!important;
  box-shadow:var(--shadow-1)!important;
}
.panel,.card{padding:22px!important}
.panel+.panel{margin-top:14px!important}
.panel-title{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;margin-bottom:18px!important}
.panel-title h2,.panel-title h3{margin:0;font-size:20px!important;line-height:1.2;letter-spacing:-.03em}
.panel-title p{margin:6px 0 0!important;font-size:13px!important;line-height:1.6;color:var(--app-muted)!important}

/* Services / dashboard */
.service-picker{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr));gap:22px;max-width:none!important;margin:8px 0 0!important}
.service-choice{min-height:240px!important;padding:28px!important;display:flex;flex-direction:column;justify-content:space-between;align-items:flex-start;gap:18px;transition:.2s ease;border-radius:24px!important;background:linear-gradient(180deg,#ffffff 0%, #f9fbff 100%)!important}
.service-choice:hover{transform:translateY(-3px);border-color:var(--app-line-strong)!important;box-shadow:var(--shadow-2)!important}
.service-choice-main h1{margin:0 0 12px;font-size:clamp(28px,2.6vw,42px)!important;line-height:1.02;letter-spacing:-.06em}
.service-choice-main p{margin:0;font-size:15px;line-height:1.75;color:var(--app-muted)}
.service-choice-action{display:inline-flex;align-items:center;gap:8px;font-size:13px!important;font-weight:800;color:var(--app-primary);padding:10px 14px;border-radius:999px;background:var(--app-primary-soft)}
.workspace-heading{display:flex;align-items:flex-end;justify-content:space-between;gap:24px;margin:0 0 18px}.workspace-heading h2{margin:0;font-size:30px;letter-spacing:-.05em}.workspace-heading p{margin:6px 0 0;font-size:14px;color:var(--app-muted)}
.stats,.workspace-stats,.archive-banner{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px!important}
.stat,.archive-banner>div{padding:20px!important;min-width:0}
.stat span,.archive-banner span,.meta-box span,.bench-box span{display:block;font-size:11px!important;color:var(--app-muted)!important;text-transform:uppercase;letter-spacing:.08em;font-weight:700}
.stat b,.archive-banner b{display:block;font-size:24px!important;margin-top:10px;line-height:1.15;letter-spacing:-.04em;overflow-wrap:anywhere}
.grid-2,.workspace-grid{display:grid!important;grid-template-columns:minmax(320px,.85fr) minmax(0,1.45fr)!important;gap:18px!important;align-items:start}
.dropzone{min-height:260px!important;border:1.5px dashed #a8b8ca!important;border-radius:20px!important;background:linear-gradient(180deg,#fbfdff 0%,#f5f8fc 100%)!important;padding:28px 22px!important}
.dropzone strong{font-size:18px!important}.dropzone span{font-size:13px!important;line-height:1.6;color:var(--app-muted)!important}
.processing,.rich-empty{min-height:420px!important;font-size:14px!important;color:var(--app-muted)!important}
.processing .spinner{width:30px;height:30px;border-width:3px}
.recent-runs{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px!important}
.recent-run{padding:18px 18px!important;border-radius:18px!important}
.recent-run b{font-size:16px!important;white-space:normal!important;line-height:1.35!important}
.recent-run span,.recent-run small{font-size:12px!important}

/* Pills / statuses */
.pill{display:inline-flex;align-items:center;gap:8px;padding:7px 11px!important;border-radius:999px!important;font-size:11px!important;font-weight:800!important;letter-spacing:.04em}
.pill.ok{background:var(--app-success-soft)!important;color:var(--app-success)!important}
.pill.warn{background:var(--app-warn-soft)!important;color:var(--app-warn)!important}
.pill.bad{background:var(--app-danger-soft)!important;color:var(--app-danger)!important}
.pill.dark{background:var(--app-primary)!important;color:#fff!important}

/* History / lists */
.history-toolbar{display:flex;align-items:center;gap:14px;margin-bottom:14px!important}
.history-search{flex:1}.history-count{font-size:12px!important;color:var(--app-muted)!important}
.history-list{gap:14px!important}
.history-card{padding:18px 20px!important;display:grid!important;grid-template-columns:minmax(0,1fr) 220px auto;gap:20px;align-items:center;border-radius:20px!important}
.history-top>span:first-child{font-size:11px!important;color:var(--app-muted)!important}
.history-main h3{font-size:18px!important;line-height:1.2;letter-spacing:-.03em}
.history-main p{font-size:13px!important;line-height:1.6!important}
.history-meta>span{font-size:12px!important}.history-value span{font-size:11px!important}.history-value b{font-size:18px!important}
.history-mini{padding:16px 18px!important;display:flex;justify-content:space-between;align-items:center;gap:16px;border-radius:18px!important}
.history-mini b{display:block;font-size:16px}.history-mini span{display:block;font-size:12px;color:var(--app-muted)}
.bp-list{display:flex;flex-direction:column;gap:12px}

/* Tables */
.table-wrap,.tw{overflow:auto!important;border:1px solid var(--app-line)!important;border-radius:18px!important;background:#fff}
.table,body table{min-width:100%;border-collapse:separate;border-spacing:0}
.table thead th,body table thead th{position:sticky;top:0;background:#f7faff!important;color:#4d5f74!important;font-size:12px!important;font-weight:800!important;letter-spacing:.06em;text-transform:uppercase;padding:14px 16px!important;border-bottom:1px solid var(--app-line)!important}
.table td,body table td{padding:14px 16px!important;font-size:13px!important;line-height:1.5;border-bottom:1px solid #eef3f8!important;color:var(--app-text)!important;background:#fff}
.table tbody tr:hover td,body table tbody tr:hover td{background:#fbfdff}
.table tbody tr:last-child td,body table tbody tr:last-child td{border-bottom:0!important}

/* Specific admin / methodology layouts */
.admin-grid{display:grid;grid-template-columns:480px minmax(0,1fr);gap:18px;align-items:start}
.allowlist-item{display:grid;gap:8px;margin-bottom:14px}.allowlist-item label{font-size:12px;font-weight:800;color:#42556d}
.release{display:grid;grid-template-columns:minmax(0,1fr) auto auto auto;gap:10px;align-items:center;padding:14px 0;border-bottom:1px solid #edf2f7}
.release:last-child{border-bottom:0}
.catalog-tabs{display:flex;flex-wrap:wrap;gap:10px;margin-bottom:14px}.tab-btn{border:1px solid var(--app-line);background:#fff;border-radius:999px;padding:10px 14px;font-size:12px;font-weight:700;color:var(--app-muted);cursor:pointer}.tab-btn.active{background:var(--app-primary);border-color:var(--app-primary);color:#fff}
.index-status{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px;margin-bottom:18px}.index-status .stat{padding:18px!important}
.allowlist{min-height:120px!important}
.grant-list{gap:10px!important}.grant-check{padding:10px 12px;border:1px solid var(--app-line);border-radius:12px;background:#fbfdff;font-size:13px}
.role-note{padding:14px 16px;border-radius:14px;background:var(--app-primary-soft);color:var(--app-primary);font-size:13px;line-height:1.6}

/* Archive / results / meta */
.archive-actions,.actions{display:flex;flex-wrap:wrap;gap:10px!important}
.archive-details{margin-top:18px!important;border:1px solid var(--app-line)!important;border-radius:18px!important;overflow:hidden;background:#fff}
.archive-details summary{padding:16px 18px!important;font-size:13px!important;background:#f8fbff!important}
.status-hero{padding:18px 20px!important}.status-hero h2{font-size:24px!important;margin:6px 0}.status-hero p{font-size:13px!important;line-height:1.65!important}
.meta-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px!important;margin:14px 0 8px!important}
.meta-box{padding:16px 18px!important}.meta-box b{font-size:13px!important;line-height:1.6!important}
.pipeline{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:12px!important}.stage{padding:14px!important}.stage b{font-size:12px!important}.stage p{font-size:11px!important;line-height:1.6!important}.gate{grid-template-columns:56px 1fr!important;padding:14px!important}.gate span,.finding p,.finding small{font-size:12px!important;line-height:1.6!important}.finding{padding:14px!important}.finding h4{font-size:14px!important}
.market-list{border-radius:18px!important;overflow:hidden;border:1px solid var(--app-line)!important}
.market-row{grid-template-columns:40px minmax(0,1fr) 220px!important;padding:14px 16px!important;border-radius:0!important;box-shadow:none!important;border:0!important;border-bottom:1px solid #eef3f8!important}
.market-row:last-child{border-bottom:0!important}.market-main b{font-size:13px!important}.market-main span,.market-main small{font-size:12px!important}
.route{padding:16px 18px!important}

/* Toast */
.toast{position:fixed;right:20px;bottom:20px;z-index:100;max-width:min(460px,calc(100vw - 30px));padding:14px 16px;border-radius:16px;background:#18263b;color:#fff;box-shadow:0 18px 45px rgba(15,23,42,.2);font-size:13px;line-height:1.55}

/* Login screens */
.login-shell{min-height:100vh;display:grid;place-items:center;padding:28px!important;background:radial-gradient(circle at top, #f9fcff 0%, #edf3fa 58%, #e7eef7 100%)!important}
.login-card-single{width:min(460px,100%)!important;padding:38px!important;border-radius:28px!important;background:rgba(255,255,255,.92)!important;border:1px solid rgba(219,228,238,.95)!important;box-shadow:0 28px 60px rgba(15,23,42,.09)!important}
.login-wordmark{font-size:32px!important;letter-spacing:-.06em!important;font-weight:850!important;color:var(--app-text)!important;margin-bottom:34px!important}
.login-brand h1{font-size:40px!important;line-height:1.02!important;letter-spacing:-.07em!important;margin:0 0 10px!important}
.login-brand p{font-size:14px!important;line-height:1.65!important;color:var(--app-muted)!important;margin:0 0 24px!important}
.login-submit{min-height:50px!important;margin-top:8px!important}

/* Dedicated business plan pages */
body .wrap{max-width:var(--page-width)!important;padding:28px clamp(18px,2vw,36px) 76px!important}
body .ahdr{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:14px 18px!important;margin-bottom:22px!important;border-radius:22px!important;background:rgba(255,255,255,.82)!important;backdrop-filter:blur(16px)}
body .ahdr .alogo{font-size:26px!important;font-weight:800!important;letter-spacing:-.05em;color:var(--app-text)!important}
body .ahdr .amy{font-size:14px!important;color:var(--app-muted)!important}
body .ahdr .abell,body .ahdr .ame{padding:10px 14px!important;border-radius:12px!important;border:1px solid var(--app-line)!important;background:#fff!important}
body .ahdr .adrop{border-radius:18px!important;border:1px solid var(--app-line)!important;box-shadow:var(--shadow-2)!important;overflow:hidden}
body header{display:flex;align-items:flex-end;justify-content:space-between;gap:18px;flex-wrap:wrap;margin-bottom:16px!important}
body h1{font-size:clamp(30px,2.3vw,42px)!important;line-height:1.05!important;letter-spacing:-.06em!important;margin:0!important}
body h2{font-size:22px!important;letter-spacing:-.04em;margin:24px 0 14px!important}
body .sub{font-size:14px!important;margin-top:10px!important;line-height:1.65!important}
body .card{padding:26px!important;border-radius:24px!important}
body .tabs{display:grid!important;grid-template-columns:repeat(8,minmax(0,1fr));gap:10px!important;margin:0 0 20px!important}
body .tabs div{padding:14px 14px!important;border-radius:16px!important;background:#f4f8fc!important;color:var(--app-muted)!important;border:1px solid var(--app-line)!important;font-size:13px!important;line-height:1.35;text-align:center}
body .tabs div.on{background:var(--app-primary)!important;color:#fff!important;border-color:var(--app-primary)!important;box-shadow:0 12px 22px rgba(30,58,95,.18)}
body .tabs div.done{background:#eefaf3!important;color:var(--app-success)!important;border-color:#cae9d6!important}
body .row{display:grid!important;grid-template-columns:repeat(12,minmax(0,1fr));gap:16px!important}
body .row>*{grid-column:span 4}
body .row .f{margin-bottom:0!important}
body .f{margin-bottom:18px!important}
body .chk{padding:12px 14px!important;border-radius:14px!important;background:#fbfdff!important;border:1px solid var(--app-line)!important}
body .list{border-radius:14px!important;border:1px solid var(--app-line)!important;box-shadow:var(--shadow-1)!important}
body .list div{padding:12px 14px!important}
body .pill{font-size:12px!important;padding:8px 12px!important;background:var(--app-primary-soft)!important;color:var(--app-primary)!important}
body .tw{border:1px solid var(--app-line)!important;border-radius:18px!important;background:#fff!important}
body table{min-width:100%}
body th,body td{padding:10px 12px!important;border-color:#ebf1f6!important;font-size:13px!important}
body th{background:#f7faff!important;color:#4d5f74!important;font-weight:800!important;text-transform:uppercase;letter-spacing:.05em}
body .sum{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px!important;margin-top:16px!important}
body .sum div{padding:16px!important;border-radius:18px!important;background:#f8fbff!important;border:1px solid var(--app-line)!important}
body .sum b{font-size:26px!important;line-height:1.1;letter-spacing:-.04em}
body .pc{padding:18px!important;border-radius:20px!important;background:#fbfdff!important;border:1px solid var(--app-line)!important}
body .pc h3{font-size:18px!important;letter-spacing:-.03em}
body .grid12{gap:10px!important}
body .grid12 div{font-size:12px!important}
body .grid12 input{min-height:40px!important;font-size:13px!important;border-radius:12px!important}
body .btns{display:flex;align-items:center;justify-content:space-between;gap:14px;margin-top:24px!important}
body .btn{min-height:46px!important}
body .hpop{padding:14px 16px!important;border-radius:16px!important;background:#f8fbff!important;border:1px solid var(--app-line)!important}
body .seg{border-radius:14px!important;overflow:hidden!important;border:1px solid var(--app-line)!important}
body .seg button{padding:10px 16px!important}
body .seg button.on{background:var(--app-primary)!important;color:#fff!important}
body .aback{font-size:14px!important;color:var(--app-primary)!important}
body .asv{font-size:13px!important}
body .modal>div{border-radius:22px!important;padding:24px!important;box-shadow:var(--shadow-2)!important}

/* Business plan result page */
.r-wrap{max-width:var(--page-width)!important;padding:30px clamp(18px,2vw,36px) 80px!important;background:transparent!important}
.r-header{display:flex!important;align-items:center;justify-content:space-between;gap:14px;flex-wrap:wrap;padding:0 0 20px!important}
.r-card{border-radius:24px!important;border:1px solid var(--app-line)!important;box-shadow:var(--shadow-1)!important;padding:28px!important}
.r-grid{display:grid!important;grid-template-columns:repeat(6,minmax(0,1fr))!important;gap:14px!important;margin:22px 0!important}
.r-stat{padding:18px!important;border-radius:18px!important;background:#f8fbff!important;border:1px solid var(--app-line)!important}
.r-stat span{font-size:11px!important;text-transform:uppercase;letter-spacing:.08em;color:var(--app-muted)!important;font-weight:700}
.r-stat strong{font-size:22px!important;line-height:1.2!important;letter-spacing:-.04em}
.r-title{font-size:clamp(30px,2.2vw,40px)!important;letter-spacing:-.06em!important;line-height:1.05!important}
.r-sub{font-size:14px!important;color:var(--app-muted)!important}
.r-actions{display:flex;gap:10px;flex-wrap:wrap;margin:22px 0!important}.r-action{border-radius:12px!important;padding:12px 16px!important;font-size:13px!important;font-weight:800!important}
.r-alert{padding:16px 18px!important;border-radius:16px!important}
.r-section{padding:20px 0!important;border-top:1px solid #edf2f7!important}.r-section h3{font-size:20px!important;letter-spacing:-.03em}.r-section p{font-size:15px!important;line-height:1.9!important;color:#334155!important}

/* Responsive */
@media (max-width:1680px){
  .stats,.workspace-stats,.archive-banner{grid-template-columns:repeat(4,minmax(0,1fr))}
  .r-grid{grid-template-columns:repeat(3,minmax(0,1fr))!important}
}
@media (max-width:1400px){
  .main{width:min(calc(100vw - 32px),var(--page-width))}
  .grid-2,.workspace-grid,.admin-grid{grid-template-columns:1fr!important}
  .stats,.workspace-stats,.archive-banner,.index-status,.meta-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .recent-runs{grid-template-columns:1fr!important}
  .history-card{grid-template-columns:1fr 180px auto!important}
  body .tabs{grid-template-columns:repeat(4,minmax(0,1fr))!important}
  body .sum{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .r-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
}
@media (max-width:1080px){
  .topbar{grid-template-columns:minmax(0,1fr) auto!important;gap:12px}
  .nav{grid-column:1/-1;order:3;padding-top:8px;border-top:1px solid rgba(200,212,224,.7)}
  .page{padding:24px 16px 44px!important}
  .history-card{grid-template-columns:1fr!important}
  .history-value{grid-column:auto}
  .market-row{grid-template-columns:30px minmax(0,1fr)!important}
  .market-row > :last-child{grid-column:2}
  body .row>*{grid-column:span 6}
  body .tabs{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .service-picker{grid-template-columns:1fr!important}
  .service-choice{min-height:210px!important}
}
@media (max-width:760px){
  .login-card-single{padding:28px!important;border-radius:22px!important}
  .login-wordmark{font-size:26px!important}
  .login-brand h1{font-size:32px!important}
  .topbar{padding:12px 14px!important}
  .brand-wordmark{font-size:22px!important}
  .user-mini{display:none}
  .page-head{align-items:flex-start;flex-direction:column}
  .page-head h1{font-size:30px!important}
  .stats,.workspace-stats,.archive-banner,.index-status,.meta-grid,.pipeline,.service-grid,.bench-grid{grid-template-columns:1fr!important}
  .dropzone{min-height:190px!important}
  .processing,.rich-empty{min-height:300px!important}
  .history-toolbar{display:block}.history-count{margin-top:8px}
  .history-card,.history-mini{padding:16px!important}
  .history-card>.btn,.archive-actions .btn,.actions .btn{width:100%}
  .archive-actions,.actions{display:grid!important;grid-template-columns:1fr!important}
  body .wrap{padding:18px 12px 60px!important}
  body .ahdr{padding:12px 14px!important;border-radius:18px!important}
  body .ahdr .alogo{font-size:22px!important}
  body h1{font-size:30px!important}
  body .row>*{grid-column:span 12}
  body .sum{grid-template-columns:1fr!important}
  body .btns{flex-direction:column-reverse;align-items:stretch}
  body .btns .btn{width:100%}
  .r-grid{grid-template-columns:1fr!important}
  .r-card{padding:20px!important}
}


/* v56 — consistent real header and admin SMS testing */
.topbar{max-width:none!important;grid-template-columns:auto minmax(0,1fr) auto!important;gap:clamp(14px,1.4vw,28px)!important;min-height:76px;align-items:center}
.topbar .brand{align-self:center;white-space:nowrap}
.topbar .nav{min-width:0;overflow-x:auto;display:flex;align-items:center;flex-wrap:nowrap;scrollbar-width:thin;scrollbar-color:#d6e1ed transparent}
.topbar .top-user{justify-self:end;display:flex;gap:12px;align-items:center;min-width:0}
.user-chip{display:inline-flex;align-items:center;gap:10px;background:transparent;border:1px solid transparent;border-radius:15px;min-width:0;max-width:300px;padding:7px 10px;cursor:pointer;text-align:left;transition:.15s}
.user-chip:hover,.user-chip.is-active{background:#fff;border-color:var(--app-line)}
.user-avatar{width:36px;height:36px;flex:0 0 36px;display:grid;place-items:center;border-radius:11px;background:var(--app-primary-soft);color:var(--app-primary);font-weight:850;font-size:15px}
.user-chip .user-mini{display:block!important;min-width:0}.user-chip .user-mini b{max-width:174px!important}.user-chip .user-mini span{max-width:174px!important}
.sms-test-card{max-width:680px;padding:20px;border:1px solid var(--app-line);border-radius:18px;background:#f8fbff}
.sms-test-top p{font-size:13px;color:var(--app-muted);line-height:1.6;margin:10px 0 18px}
.sms-test-form{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:12px;align-items:end}.sms-test-form .field{min-width:0}.sms-test-form .btn{height:48px;white-space:nowrap}
.sms-test-hint{font-size:12px;color:var(--app-muted);margin:10px 0}
.sms-test-feedback{font-size:13px;padding:0;line-height:1.55;min-height:0}
.sms-test-feedback:not(:empty){padding:12px 14px;border-radius:12px;border:1px solid #d4e0ed;background:#fff}
.sms-test-feedback.ok{color:#086643;border-color:#bddfc9;background:#effbf3}
.sms-test-feedback.error{color:#a32922;border-color:#f0c8c4;background:#fff6f5}
/* Editor header: remove leftover pretend controls, preserve language buttons */
body .ahdr.bp-global-header{position:sticky;top:12px;display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:16px;min-height:72px;max-width:100%;padding:12px 18px!important;z-index:35}
.bp-global-header .al{display:flex;align-items:center;gap:16px;min-width:0;flex-wrap:nowrap}
.bp-header-separator{display:block;width:1px;height:26px;background:#d8e2ed;flex:none}
.bp-global-header .alogo{white-space:nowrap;text-decoration:none}
.bp-global-header .amy{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;text-decoration:none;font-weight:700}
.bp-global-header .ar{display:flex;align-items:center;justify-content:flex-end;gap:12px;flex-wrap:nowrap;min-width:0}
.bp-global-header #ahLang{flex:none}.bp-global-header .lang{display:flex;gap:0;white-space:nowrap}
.bp-global-header .lang button{min-height:40px!important;border-radius:0!important;background:#fff!important;color:var(--app-primary)!important;border:1px solid var(--app-line)!important;box-shadow:none!important}
.bp-global-header .lang button.on{background:var(--app-primary)!important;border-color:var(--app-primary)!important;color:#fff!important}
.bp-global-header .lang button:first-child{border-radius:10px 0 0 10px!important}
.bp-global-header .lang button:last-child{border-radius:0 10px 10px 0!important}
.bp-header-profile{max-width:190px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding:10px 12px;text-decoration:none!important;border-radius:12px;border:1px solid var(--app-line);background:#fff;color:var(--app-text)!important;font-size:12px;font-weight:750}
.bp-header-logout{border:1px solid var(--app-line);border-radius:12px;background:#f8fbff;padding:10px 13px;color:var(--app-muted);font-size:12px;font-weight:750;cursor:pointer}
.bp-header-logout:hover,.bp-header-profile:hover{background:#edf4fb}
body #asv{display:inline-flex;align-items:center;margin-left:10px;border:1px solid #d4e1ed;border-radius:999px;padding:5px 10px;background:#f4f8fd;font-size:12px!important;color:#526981}
body #asv.ok{border-color:#c5e5d1;background:#f1fbf4;color:#087547}
body #asv.er{border-color:#f3cec9;background:#fff5f4;color:#a32922}
@media(max-width:1180px){.topbar{grid-template-columns:minmax(0,1fr) auto!important;gap:10px!important}.topbar .nav{grid-column:1/-1;grid-row:2;border-top:1px solid #e8eef5;padding-top:7px}.topbar .top-user{grid-column:2;grid-row:1}.bp-global-header{top:0!important}}
@media(max-width:780px){.user-chip .user-mini{display:none!important}.user-avatar{width:34px;height:34px;flex-basis:34px}.user-chip{padding:5px}.sms-test-form{grid-template-columns:1fr}.sms-test-form .btn{width:100%}.bp-global-header{grid-template-columns:1fr!important;gap:12px!important;position:relative!important}.bp-global-header .ar{justify-content:space-between}.bp-global-header .alogo{font-size:21px!important}.bp-header-profile{max-width:125px}}
@media(max-width:420px){.bp-global-header .al{gap:9px}.bp-global-header .alogo{font-size:18px!important}.bp-global-header .amy{font-size:12px!important}.bp-global-header .ar{gap:5px}.bp-header-profile,.bp-header-logout{font-size:11px;padding:8px}.bp-global-header .lang button{padding:8px 10px!important}}


/* v58 — unified header across business-plan pages and main shell */
.bp-shell{min-height:100vh;background:radial-gradient(circle at top left, rgba(255,255,255,.9), rgba(255,255,255,0) 30%),linear-gradient(180deg,#f8fbff 0%, #f1f5fa 38%, #edf2f7 100%)}
.bp-shell .main{max-width:var(--page-width);width:min(calc(100vw - 48px),var(--page-width));margin:0 auto}
.bp-shell .page{width:100%!important;max-width:none!important;padding:24px clamp(16px,1.8vw,32px) 56px!important}
.bp-shell .wrap{max-width:none!important;padding:0 0 72px!important}
.body-bp-unified .topbar,.bp-shared-header{position:sticky;top:0;z-index:70;display:grid!important;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:18px;min-height:76px;padding:14px clamp(18px,2vw,36px)!important;background:rgba(248,251,255,.9)!important;backdrop-filter:blur(18px);border-bottom:1px solid rgba(200,212,224,.82)!important;box-shadow:0 4px 18px rgba(15,23,42,.035)!important;border-radius:0!important;margin:0!important}
.bp-shared-header .brand{display:flex;align-items:center;min-width:max-content}
.bp-shared-header .brand-wordmark,.bp-shared-header .alogo{font-size:28px!important;font-weight:800!important;letter-spacing:-.05em;color:var(--app-text)!important}
.bp-shared-header .nav{display:flex;align-items:center;gap:8px;overflow:auto;min-width:0;padding:4px 0;scrollbar-width:none}
.bp-shared-header .nav::-webkit-scrollbar{display:none}
.bp-shared-header .nav-btn,.bp-shared-header .amy{display:inline-flex;align-items:center;justify-content:center;border:1px solid transparent;background:transparent;color:var(--app-muted)!important;border-radius:999px;padding:11px 16px!important;font-size:13px!important;font-weight:700!important;white-space:nowrap;text-decoration:none;transition:.18s ease}
.bp-shared-header .nav-btn.active,.bp-shared-header .amy.active{background:#fff!important;color:var(--app-primary)!important;border-color:var(--app-line-strong)!important;box-shadow:0 3px 12px rgba(15,23,42,.04)}
.bp-shared-header .top-user,.bp-shared-header .ar{display:flex;align-items:center;justify-self:end;gap:12px;min-width:0;flex-wrap:nowrap}
.bp-shared-header #ahLang{display:flex;align-items:center;flex:none}
.bp-shared-header #ahLang .lang{display:inline-flex;border:1px solid var(--app-line);border-radius:12px;overflow:hidden;background:#fff;box-shadow:none!important}
.bp-shared-header #ahLang .lang button{min-height:40px!important;padding:10px 14px!important;border:0!important;background:transparent!important;color:var(--app-primary)!important;border-radius:0!important;box-shadow:none!important}
.bp-shared-header #ahLang .lang button.on{background:var(--app-primary)!important;color:#fff!important}
.bp-shared-header .bp-header-profile{display:inline-flex;align-items:center;gap:10px;max-width:320px;padding:6px 8px!important;border:0!important;background:transparent!important;text-decoration:none!important;min-width:0}
.bp-shared-header .bp-header-profile:hover{background:#fff!important;border-radius:14px!important;box-shadow:inset 0 0 0 1px var(--app-line)}
.bp-shared-header .bp-header-profile .user-mini{display:block!important;min-width:0}
.bp-shared-header .bp-header-profile .user-mini b{display:block;max-width:180px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:13px;line-height:1.2;color:var(--app-text)}
.bp-shared-header .bp-header-profile .user-mini span{display:block;max-width:180px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:11px;line-height:1.2;color:var(--app-muted);margin-top:3px}
.bp-shared-header .bp-header-logout{white-space:nowrap}
.bp-page > header{display:flex;justify-content:space-between;align-items:flex-start;gap:18px;flex-wrap:wrap;margin-bottom:18px!important}
.bp-page .bp-header-separator{display:none!important}
.bp-result-page{padding-top:22px}
.r-wrap{max-width:1280px!important;margin:0 auto;padding:0 0 70px!important}
.r-header{display:none!important}
@media(max-width:1180px){.bp-shared-header{grid-template-columns:minmax(0,1fr) auto!important;gap:10px!important}.bp-shared-header .nav{grid-column:1/-1;grid-row:2;border-top:1px solid #e8eef5;padding-top:7px}.bp-shared-header .ar,.bp-shared-header .top-user{grid-column:2;grid-row:1}.bp-shell .main{width:min(calc(100vw - 24px),var(--page-width))}}
@media(max-width:780px){.bp-shell .page{padding:18px 12px 36px!important}.bp-shared-header{grid-template-columns:1fr!important;padding:12px!important;gap:10px!important}.bp-shared-header .nav{grid-column:1;grid-row:auto;border-top:1px solid #e8eef5;padding-top:8px}.bp-shared-header .ar,.bp-shared-header .top-user{grid-column:1;grid-row:auto;justify-self:stretch;justify-content:space-between;width:100%}.bp-shared-header .bp-header-profile{max-width:180px}.bp-shared-header .bp-header-profile .user-mini span,.bp-shared-header .bp-header-profile .user-mini b{max-width:110px}}
@media(max-width:460px){.bp-shared-header .brand-wordmark,.bp-shared-header .alogo{font-size:22px!important}.bp-shared-header .nav-btn,.bp-shared-header .amy{padding:9px 12px!important;font-size:12px!important}.bp-shared-header #ahLang .lang button{padding:9px 10px!important;min-width:48px}.bp-shared-header .bp-header-logout{padding:10px 12px!important;font-size:12px!important}}
