:root {
  --ink: #172033;
  --muted: #647087;
  --line: #dfe4ec;
  --panel: #ffffff;
  --soft: #f5f7fa;
  --brand: #173f73;
  --shell-blue: #234B79;
  --brand-2: #245b9c;
  --success: #1d6b46;
  --warning: #8a5a10;
  --danger: #9a2f2f;
  --shadow: 0 18px 45px rgba(26, 43, 68, 0.12);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--soft); }
button, input { font: inherit; }
button { cursor: pointer; }
a { color: inherit; }

.login-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(320px, 0.9fr) minmax(420px, 1.1fr);
  background: #eef2f7;
}
.login-visual {
  padding: 64px;
  color: white;
  background: var(--shell-blue);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.brand-mark { font-weight: 800; letter-spacing: 0.14em; font-size: 14px; }

.modeler-mark {
  width: 48px; height: 48px; border-radius: 13px; flex: 0 0 48px;
  background:
    radial-gradient(circle at 50% 50%, #ffffff 0 21%, #dbeafe 22% 38%, transparent 39%),
    conic-gradient(from 30deg, #7c3aed, #2563eb, #16a34a, #eab308, #f97316, #dc2626, #7c3aed);
  border: 1px solid #bfdbfe;
  box-shadow: inset 0 0 0 2px rgba(255,255,255,.72), 0 2px 8px rgba(12,34,61,.18);
}
.login-brandline { display: flex; align-items: center; gap: 14px; }
.login-modeler-logo { width: 44px; height: 44px; flex-basis: 44px; }
.tile-modeler-logo { width: 48px; height: 48px; flex-basis: 48px; }
.login-eyebrow { color: #0b5fa8; font-weight: 800; letter-spacing: .14em; font-size: 12px; margin-bottom: 14px; }
[hidden] { display: none !important; }
.login-visual h1 { font-size: clamp(36px, 5vw, 64px); line-height: 1.02; margin: 18px 0; max-width: 650px; }
.login-visual p { max-width: 580px; color: rgba(255,255,255,.78); font-size: 18px; line-height: 1.65; }
.login-panel { display: grid; place-items: center; padding: 40px; }
.login-card { width: min(100%, 460px); background: white; border: 1px solid var(--line); border-radius: 18px; padding: 36px; box-shadow: var(--shadow); }
.login-card h2 { margin: 0 0 8px; font-size: 28px; }
.login-card > p { margin: 0 0 28px; color: var(--muted); line-height: 1.5; }
.form-field { display: grid; gap: 8px; margin: 18px 0; }
.form-field label { font-size: 13px; font-weight: 700; }
.form-field input { border: 1px solid #cbd3df; border-radius: 10px; padding: 13px 14px; outline: none; background: #fff; }
.form-field input:focus { border-color: var(--brand-2); box-shadow: 0 0 0 3px rgba(36,91,156,.12); }
.primary-btn, .secondary-btn, .ghost-btn {
  border-radius: 10px; padding: 11px 16px; font-weight: 700; border: 1px solid transparent;
}
.primary-btn { background: var(--brand); color: white; width: 100%; }
.primary-btn:hover { background: var(--brand-2); }
.secondary-btn { background: white; border-color: var(--line); color: var(--ink); }
.secondary-btn:hover { background: #f7f9fc; }
.ghost-btn { background: transparent; color: var(--muted); }
button:disabled { cursor: not-allowed; opacity: .58; }
.error-box, .message-box { display: none; border-radius: 9px; padding: 11px 12px; font-size: 13px; margin-top: 14px; line-height: 1.45; }
.error-box.show { display: block; background: #fff0f0; color: var(--danger); border: 1px solid #f2c5c5; }
.message-box.show { display: block; background: #edf7f1; color: var(--success); border: 1px solid #c6e4d3; }
.seed-hint { margin-top: 24px; background: #f7f9fc; border: 1px solid var(--line); border-radius: 10px; padding: 14px; font-size: 12px; color: var(--muted); line-height: 1.55; }
.seed-hint code { color: var(--ink); }

.app-header { min-height: 72px; background: var(--shell-blue); color: white; border-bottom: 2px solid rgba(255,255,255,.22); display: flex; align-items: center; justify-content: space-between; padding: 10px 28px; position: sticky; top: 0; z-index: 10; }
.header-left, .header-right { display: flex; align-items: center; gap: 14px; }
.header-title { font-weight: 800; }
.header-product-icon { background: #ffffff; color: var(--brand); flex: 0 0 auto; }
.header-subtitle { color: rgba(255,255,255,.78); font-size: 13px; }
.user-chip { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border: 1px solid rgba(255,255,255,.25); border-radius: 999px; background: rgba(255,255,255,.08); }
.user-avatar { width: 30px; height: 30px; border-radius: 50%; background: #ffffff; color: var(--brand); display: grid; place-items: center; font-weight: 800; font-size: 12px; }
.user-meta { line-height: 1.2; }
.user-meta strong { display: block; font-size: 12px; }
.user-meta span { color: rgba(255,255,255,.72); font-size: 11px; }
.status-badge { display: inline-flex; align-items: center; border-radius: 999px; padding: 5px 9px; font-weight: 800; font-size: 11px; letter-spacing: .03em; text-transform: uppercase; }

.page-shell { max-width: 1240px; margin: 0 auto; padding: 44px 28px 60px; }
.page-heading { display: flex; justify-content: space-between; align-items: end; gap: 20px; margin-bottom: 28px; }
.page-heading h1 { margin: 0 0 8px; font-size: 32px; }
.page-heading p { margin: 0; color: var(--muted); }
.tile-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.modeler-tile { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 24px; min-height: 228px; display: flex; flex-direction: column; justify-content: space-between; box-shadow: 0 6px 18px rgba(28,45,68,.04); }
.modeler-tile.enabled { border-color: #bfd0e5; box-shadow: 0 10px 30px rgba(34,74,119,.10); }
.tile-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; }
.tile-icon { width: 48px; height: 48px; border-radius: 13px; background: #eaf0f7; display: grid; place-items: center; color: var(--brand); font-weight: 900; }
.modeler-tile.disabled .tile-icon { color: #7b8492; background: #f0f2f5; }
.modeler-tile h2 { margin: 18px 0 8px; font-size: 20px; }
.modeler-tile p { margin: 0; color: var(--muted); line-height: 1.5; font-size: 14px; }
.tile-footer { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 22px; }
.tile-action { border: 0; border-radius: 9px; padding: 10px 14px; background: var(--brand); color: white; font-weight: 800; }
.tile-action.disabled { background: #eef1f5; color: #768092; border: 1px solid var(--line); }

.modal { display: none; position: fixed; inset: 0; background: rgba(18,28,42,.44); z-index: 30; padding: 40px; }
.modal.show { display: grid; place-items: center; }
.modal-card { width: min(920px, 100%); max-height: 80vh; overflow: hidden; background: white; border-radius: 16px; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.modal-header { padding: 18px 22px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; }
.modal-header h2 { margin: 0; font-size: 19px; }
.audit-list { overflow: auto; padding: 0 22px 22px; }
.audit-row { padding: 14px 0; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 160px 1fr 100px; gap: 16px; font-size: 13px; }
.audit-row strong { display: block; }
.audit-row small { color: var(--muted); }

.wrapper-page { height: 100vh; overflow: hidden; display: grid; grid-template-rows: auto 1fr; background: #dfe4ea; }
.wrapper-header { min-height: 62px; background: var(--shell-blue); color: white; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 10px 18px; border-bottom: 2px solid rgba(255,255,255,.22); }
.wrapper-brand { display: flex; align-items: center; gap: 12px; }
.wrapper-brand strong { display: block; }
.wrapper-brand span { display: block; color: rgba(255,255,255,.68); font-size: 12px; margin-top: 2px; }
.wrapper-actions { display: flex; align-items: center; gap: 9px; }
.wrapper-actions button { border: 1px solid rgba(255,255,255,.22); background: rgba(255,255,255,.08); color: white; border-radius: 8px; padding: 9px 12px; font-weight: 700; }
.wrapper-actions button:hover { background: rgba(255,255,255,.14); }
.wrapper-actions button:disabled { background: rgba(255,255,255,.04); color: rgba(255,255,255,.45); }
.wrapper-user { color: rgba(255,255,255,.88); font-size: 12px; font-weight: 700; white-space: nowrap; }
.header-action { border-color: rgba(255,255,255,.25); color: white; }
.app-header .secondary-btn.header-action { background: rgba(255,255,255,.08); }
.app-header .secondary-btn.header-action:hover,.app-header .ghost-btn.header-action:hover { background: rgba(255,255,255,.14); }
.core-frame { width: 100%; height: 100%; border: 0; background: white; }
.launch-denied { min-height: 100vh; display: grid; place-items: center; padding: 28px; }
.launch-denied-card { background: white; border: 1px solid var(--line); border-radius: 16px; padding: 34px; max-width: 520px; text-align: center; box-shadow: var(--shadow); }
.launch-denied-card h1 { margin-top: 0; }
.launch-denied-card p { color: var(--muted); line-height: 1.6; }

@media (max-width: 820px) {
  .login-page { grid-template-columns: 1fr; }
  .login-visual { min-height: 320px; padding: 40px 28px; }
  .login-panel { padding: 28px 18px; }
  .tile-grid { grid-template-columns: 1fr; }
  .header-subtitle, .user-meta { display: none; }
  .wrapper-user { display: none; }
}

/* WEB-001A acceptance reset: one authenticated local-authoring runtime path. */
.runtime-badge { display: inline-flex; align-items: center; border-radius: 999px; padding: 5px 10px; font-weight: 800; font-size: 11px; letter-spacing: .03em; text-transform: uppercase; background: #e8eff9; color: #244f85; }
.runtime-badge-light { background: #fff4df; color: #815311; }
.status-reference { background: #eaf5ef; color: #236541; }
.status-coming { background: #fff4df; color: #815311; }


/* PL-ONLINE Stage-A.11 — single top command bar. Product identity, modeler commands, project actions, save state and user menu share one shell row. */
.wrapper-header-commandbar{display:grid;grid-template-columns:minmax(275px,auto) minmax(0,1fr) auto;align-items:center;gap:14px;min-height:66px;padding:8px 16px;position:relative;z-index:50}
.wrapper-brand-copy{min-width:0}.wrapper-brand-copy strong{white-space:nowrap}.wrapper-brand-copy span{white-space:nowrap}
.shell-commandbar{display:flex;align-items:center;justify-content:flex-start;gap:8px;min-width:0;white-space:nowrap}
.shell-menu-group,.shell-icon-group,.shell-save-group{display:flex;align-items:center;gap:4px}
.shell-menu-group,.shell-icon-group{padding-right:8px;border-right:1px solid rgba(255,255,255,.22)}
.shell-menu{position:relative}.shell-menu>summary{list-style:none;cursor:pointer;padding:7px 8px;border-radius:7px;font-size:12px;font-weight:800;color:#fff;user-select:none}.shell-menu>summary::-webkit-details-marker{display:none}.shell-menu>summary::after{content:' ▾';font-size:9px;color:rgba(255,255,255,.72)}.shell-menu[open]>summary,.shell-menu>summary:hover{background:rgba(255,255,255,.12)}
.shell-menu-panel{position:absolute;top:calc(100% + 9px);left:0;z-index:80;min-width:220px;padding:7px;background:#fff;border:1px solid #d6dde7;border-radius:10px;box-shadow:0 14px 34px rgba(15,23,42,.22)}
.shell-menu-panel button,.shell-user-menu-panel button{display:block;width:100%;border:0;background:transparent;color:#1f2937;text-align:left;padding:8px 10px;border-radius:7px;font-size:12px;font-weight:650;cursor:pointer}.shell-menu-panel button:hover,.shell-user-menu-panel button:hover{background:#eef4fb;color:#173f73}.shell-menu-separator{height:1px;background:#e5eaf0;margin:5px 2px}
.shell-icon-button{position:relative;width:34px;height:32px;min-width:34px;display:inline-flex;align-items:center;justify-content:center;border:1px solid rgba(255,255,255,.24);border-radius:8px;background:rgba(255,255,255,.08);color:#fff;padding:0;cursor:pointer}.shell-icon-button:hover{background:rgba(255,255,255,.16);border-color:rgba(255,255,255,.36)}.shell-icon-button svg{width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.shell-focus-glyph{display:inline-block;font-size:17px;line-height:1;font-weight:400;color:currentColor;transform:translateY(-.5px)}
.shell-save-group{gap:7px;min-width:155px}.shell-autosave-status{font-size:11px;font-weight:700;color:rgba(255,255,255,.82);max-width:150px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.shell-save-indicator{display:none;position:absolute;right:4px;top:4px;width:7px;height:7px;border-radius:50%;background:#fbbf24;box-shadow:0 0 0 2px var(--shell-blue)}.shell-save-group[data-save-state="dirty"] .shell-save-indicator{display:block}.shell-save-group[data-save-state="saving"] .shell-save-indicator{display:block;background:transparent;border:2px solid rgba(255,255,255,.45);border-top-color:#fff;width:8px;height:8px;animation:shellSpin .7s linear infinite}.shell-save-group[data-save-state="error"] .shell-save-indicator{display:block;background:#fecaca}
@keyframes shellSpin{to{transform:rotate(360deg)}}
.shell-user-menu{position:relative}.shell-user-menu>summary{list-style:none;cursor:pointer;display:flex;align-items:center;gap:6px;max-width:190px;padding:8px 10px;border:1px solid rgba(255,255,255,.24);border-radius:8px;background:rgba(255,255,255,.08);color:#fff;font-size:12px;font-weight:800}.shell-user-menu>summary::-webkit-details-marker{display:none}.shell-user-menu>summary:hover,.shell-user-menu[open]>summary{background:rgba(255,255,255,.14)}.shell-user-menu>summary span:first-child{max-width:145px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.shell-user-menu-panel{position:absolute;top:calc(100% + 9px);right:0;z-index:80;min-width:150px;padding:7px;background:#fff;border:1px solid #d6dde7;border-radius:10px;box-shadow:0 14px 34px rgba(15,23,42,.22)}
@media(max-width:1180px){.wrapper-header-commandbar{grid-template-columns:minmax(240px,auto) minmax(0,1fr) auto;gap:8px;padding-left:10px;padding-right:10px}.wrapper-brand{gap:8px}.shell-commandbar{gap:5px}.shell-menu-group,.shell-icon-group{padding-right:5px}.shell-autosave-status{max-width:105px}.shell-user-menu>summary{max-width:130px}}
