:root {
  --ink: #302d29;
  --ink-2: #514c47;
  --ink-3: #827c74;
  --paper: #f4f2ed;
  --surface: #ffffff;
  --soft: #ece9e3;
  --line: #dcd8d1;
  --line-light: #ebe8e2;
  --orange: #ff4b0a;
  --orange-dark: #c93400;
  --orange-soft: #fff0e9;
  --green: #218b62;
  --green-soft: #e7f6ef;
  --blue: #3478bd;
  --blue-soft: #e9f1fb;
  --purple: #7d50b8;
  --purple-soft: #f0e9f8;
  --shadow-sm: 0 3px 10px rgba(48,45,41,.055);
  --shadow: 0 12px 30px rgba(48,45,41,.10);
  --shadow-lg: 0 28px 70px rgba(25,22,20,.22);
  --display: "Wix Madefor Display", Arial, sans-serif;
  --mono: "JetBrains Mono", Consolas, monospace;
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--paper); }
body { margin: 0; min-height: 100vh; color: var(--ink); background: var(--paper); font-family: var(--display); -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; border: 0; cursor: pointer; }
.hidden { display: none !important; }

.session-check { position: fixed; inset: 0; z-index: 1000; display: grid; place-content: center; justify-items: center; gap: 18px; background: var(--paper); }
.session-check img { width: 210px; filter: brightness(.24); }
.session-check p { margin: 0; color: var(--ink-3); font-size: 13px; }
.spinner { width: 28px; height: 28px; border: 2px solid var(--line); border-top-color: var(--orange); border-radius: 50%; animation: spin .75s linear infinite; }

/* Login */
.login { min-height: 100vh; display: grid; grid-template-columns: minmax(540px, 1fr) minmax(520px, 1.05fr); background: var(--paper); overflow: hidden; }
.login-art { min-height: 100vh; position: relative; overflow: hidden; padding: 42px 54px 34px; color: #fff; background: #302d29; }
.login-art::after { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 88% 98%, rgba(255,75,10,.23), transparent 40%); pointer-events: none; }
.login-logo { position: relative; z-index: 4; width: 236px; height: auto; }
.architecture-scene { position: relative; height: 520px; max-width: 560px; margin: 18px auto 0; z-index: 2; }
.scene-grid { position: absolute; inset: 18px 0; opacity: .54; background-image: radial-gradient(circle, rgba(255,255,255,.15) 1px, transparent 1.2px); background-size: 14px 14px; mask-image: radial-gradient(circle, black 25%, transparent 78%); }
.scene-corners i { position: absolute; width: 24px; height: 24px; border-color: rgba(255,255,255,.18); border-style: solid; }
.scene-corners i:nth-child(1) { left: 20px; top: 20px; border-width: 1px 0 0 1px; }
.scene-corners i:nth-child(2) { right: 20px; top: 20px; border-width: 1px 1px 0 0; }
.scene-corners i:nth-child(3) { left: 20px; bottom: 20px; border-width: 0 0 1px 1px; }
.scene-corners i:nth-child(4) { right: 20px; bottom: 20px; border-width: 0 1px 1px 0; }
.process-node { position: absolute; z-index: 3; min-width: 160px; padding: 18px 18px 16px 22px; border: 1px solid rgba(255,255,255,.10); border-radius: 12px; background: rgba(38,35,32,.92); box-shadow: 0 8px 30px rgba(0,0,0,.14); animation: nodeIn .7s both; }
.process-node::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--orange); border-radius: 12px 0 0 12px; }
.process-node strong { display: block; font-size: 15px; }
.process-node span, .process-node small { display: block; margin-top: 9px; color: #aaa39b; font-family: var(--mono); font-size: 10px; letter-spacing: 1.4px; }
.node-a1 { left: 72px; top: 74px; animation-delay: .12s; }
.node-a2 { right: 58px; top: 74px; animation-delay: .22s; }
.node-b1 { left: 24px; top: 220px; min-width: 144px; animation-delay: .35s; }
.node-b2 { left: 198px; top: 220px; min-width: 144px; animation-delay: .43s; }
.node-b3 { right: 2px; top: 220px; min-width: 144px; animation-delay: .51s; }
.node-hot { left: 50%; top: 362px; min-width: 170px; transform: translateX(-50%); border-color: rgba(255,75,10,.8); background: var(--orange); box-shadow: 0 0 38px rgba(255,75,10,.46); animation: hotIn .8s .65s both, hotPulse 3s 1.7s ease-in-out infinite; }
.node-hot::before { display: none; }
.node-hot small { color: rgba(255,255,255,.9); font-family: var(--display); font-size: 13px; letter-spacing: 0; }
.scene-lines span { position: absolute; display: block; z-index: 1; background: rgba(255,255,255,.20); transform-origin: center; animation: lineIn .55s both; }
.l1 { left: 155px; top: 141px; width: 1px; height: 80px; animation-delay: .27s !important; }
.l2 { right: 141px; top: 141px; width: 1px; height: 80px; animation-delay: .32s !important; }
.l3 { left: 94px; top: 199px; width: 248px; height: 1px; animation-delay: .35s !important; }
.l4 { right: 72px; top: 199px; width: 112px; height: 1px; animation-delay: .39s !important; }
.l5 { left: 270px; top: 294px; width: 1px; height: 72px; background: var(--orange) !important; animation-delay: .58s !important; }
.l6 { left: 142px; top: 293px; width: 254px; height: 1px; animation-delay: .46s !important; }
.art-copy { position: relative; z-index: 4; margin-top: -10px; }
.mono-kicker { display: flex; align-items: center; gap: 12px; color: #aaa39b; font-family: var(--mono); font-size: 10px; font-weight: 700; letter-spacing: 2.2px; }
.mono-kicker::before { content: ""; width: 30px; height: 1px; background: var(--orange); }
.art-copy h2 { margin: 18px 0 8px; font-size: clamp(39px, 4vw, 58px); line-height: .98; letter-spacing: -2.5px; font-weight: 700; }
.art-copy h2 em { color: var(--orange); font-style: normal; }
.art-copy p { margin: 0; color: #aaa39b; font-size: 15px; }
.login-panel { display: grid; place-items: center; padding: 54px 8vw; min-height: 100vh; }
.login-card { width: min(100%, 520px); animation: panelIn .65s ease both; }
.panel-logo { width: 250px; height: auto; filter: brightness(.28); margin-bottom: 44px; }
.eyebrow { display: flex; align-items: center; gap: 10px; color: var(--orange); font-family: var(--mono); font-size: 10px; font-weight: 700; letter-spacing: 2.2px; text-transform: uppercase; }
.eyebrow::before { content: ""; width: 25px; height: 1px; background: currentColor; }
.eyebrow.light { color: var(--orange); }
.login-card h1 { margin: 15px 0 10px; font-size: 47px; line-height: 1; letter-spacing: -2.2px; }
.login-lead { margin: 0 0 34px; color: var(--ink-3); font-size: 15px; line-height: 1.55; }
.login-label { margin-bottom: 8px; color: var(--ink-3); font-family: var(--mono); font-size: 10px; font-weight: 700; letter-spacing: 1.7px; text-transform: uppercase; }
.primary-login { min-height: 58px; display: grid; grid-template-columns: 28px 1fr 20px; align-items: center; gap: 12px; padding: 0 20px; color: #fff; text-decoration: none; background: var(--ink); border-radius: 11px; font-weight: 700; transition: .2s; }
.primary-login:hover { background: var(--orange); transform: translateY(-2px); box-shadow: 0 12px 28px rgba(255,75,10,.22); }
.primary-login.busy { pointer-events: none; opacity: .72; }
.auth-error { margin-top: 12px; padding: 10px 12px; color: #9e2600; background: #fff0e9; border: 1px solid #ffc7b1; border-radius: 8px; font-size: 13px; }
.secure-note { margin: 20px 0 0; color: var(--ink-3); text-align: center; font-family: var(--mono); font-size: 10px; letter-spacing: .4px; }
.secure-note i { color: var(--green); margin-right: 5px; }
.dev-divider { display: flex; align-items: center; gap: 12px; margin: 22px 0 12px; color: var(--ink-3); font-family: var(--mono); font-size: 9px; letter-spacing: 1.2px; text-transform: uppercase; }
.dev-divider::before, .dev-divider::after { content: ""; height: 1px; flex: 1; background: var(--line); }
.dev-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.dev-actions button { padding: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; font-size: 12px; font-weight: 700; }
.dev-actions button:hover { border-color: var(--orange); color: var(--orange-dark); }

/* App shell */
.app { min-height: 100vh; }
.topbar { height: 76px; position: sticky; top: 0; z-index: 50; display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 0 28px; background: rgba(255,255,255,.96); border-bottom: 1px solid var(--line); backdrop-filter: blur(16px); }
.topbar::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: linear-gradient(90deg, transparent, var(--orange) 30%, var(--orange) 70%, transparent); }
.top-brand { display: flex; align-items: center; min-width: 320px; gap: 16px; }
.top-brand img { width: 142px; filter: brightness(.28); }
.brand-line { width: 1px; height: 30px; background: var(--line); }
.top-brand div { display: flex; flex-direction: column; }
.top-brand strong { font-size: 15px; }
.top-brand small { margin-top: 2px; color: var(--ink-3); font-family: var(--mono); font-size: 8.5px; letter-spacing: 1px; text-transform: uppercase; }
.top-actions { display: flex; align-items: center; gap: 12px; }
.icon-button { width: 38px; height: 38px; display: grid; place-items: center; position: relative; color: var(--ink-3); background: transparent; border-radius: 9px; }
.icon-button:hover { color: var(--ink); background: var(--soft); }
.notification-wrap { position: relative; }
.notification-badge { position: absolute; right: -2px; top: -2px; min-width: 17px; height: 17px; display: grid; place-items: center; padding: 0 4px; color: #fff; background: var(--orange); border: 2px solid #fff; border-radius: 10px; font-family: var(--mono); font-size: 8px; }
.notification-popover { width: 360px; max-height: 430px; overflow: auto; position: absolute; right: 0; top: 48px; z-index: 100; background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-lg); animation: dropdownIn .18s ease both; }
.notification-head { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; border-bottom: 1px solid var(--line-light); font-weight: 700; }
.notification-head button { color: var(--orange-dark); background: transparent; font-size: 11px; }
.notification-item { width: 100%; padding: 13px 16px; text-align: left; background: #fff; border-bottom: 1px solid var(--line-light); }
.notification-item.unread { background: var(--orange-soft); }
.notification-item strong { display: block; font-size: 13px; line-height: 1.35; }
.notification-item time { display: block; margin-top: 5px; color: var(--ink-3); font-family: var(--mono); font-size: 9px; }
.notification-empty { padding: 34px 18px; color: var(--ink-3); text-align: center; font-size: 13px; }
.user-summary { display: flex; align-items: center; gap: 9px; padding-left: 8px; }
.avatar { width: 35px; height: 35px; display: grid; place-items: center; color: #fff; background: var(--ink); border-radius: 50%; font-family: var(--mono); font-size: 10px; font-weight: 700; }
.user-summary div { display: flex; flex-direction: column; max-width: 210px; }
.user-summary strong { overflow: hidden; font-size: 12.5px; text-overflow: ellipsis; white-space: nowrap; }
.user-summary small { overflow: hidden; margin-top: 2px; color: var(--ink-3); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.role-pill { padding: 7px 12px; color: var(--ink-2); background: var(--soft); border-radius: 999px; font-family: var(--mono); font-size: 9px; font-weight: 700; letter-spacing: .5px; }
.role-pill.admin { color: #fff; background: var(--orange); }
.logout-button { padding: 8px 10px; color: var(--ink-3); background: transparent; font-size: 12px; }
.logout-button:hover { color: var(--orange-dark); }
.workspace { min-height: calc(100vh - 76px); display: grid; grid-template-columns: 260px minmax(0,1fr); }
.sidebar { min-height: calc(100vh - 76px); position: sticky; top: 76px; height: calc(100vh - 76px); display: flex; flex-direction: column; padding: 26px 16px 18px; background: var(--ink); color: #fff; }
.sidebar-label { padding: 0 11px 12px; color: #8f8981; font-family: var(--mono); font-size: 9px; font-weight: 700; letter-spacing: 1.8px; text-transform: uppercase; }
.sidebar nav { display: flex; flex-direction: column; gap: 6px; }
.nav-item { min-height: 48px; display: grid; grid-template-columns: 22px 1fr auto; align-items: center; gap: 10px; padding: 0 12px; color: #c4beb6; text-align: left; background: transparent; border-radius: 9px; font-size: 13px; font-weight: 600; transition: .18s; }
.nav-item:hover { color: #fff; background: rgba(255,255,255,.06); }
.nav-item.active { color: #fff; background: var(--orange); box-shadow: 0 8px 20px rgba(255,75,10,.18); }
.nav-item i { width: 18px; text-align: center; }
.nav-item b { min-width: 21px; padding: 2px 6px; background: rgba(255,255,255,.13); border-radius: 10px; font-family: var(--mono); font-size: 9px; text-align: center; }
.sidebar-foot { display: flex; align-items: center; gap: 9px; margin-top: auto; padding: 15px 10px 4px; border-top: 1px solid rgba(255,255,255,.08); }
.live-dot { width: 8px; height: 8px; background: #55c990; border-radius: 50%; box-shadow: 0 0 0 4px rgba(85,201,144,.12); }
.sidebar-foot div { display: flex; flex-direction: column; }
.sidebar-foot strong { color: #c4beb6; font-size: 10px; }
.sidebar-foot small { margin-top: 2px; color: #77716a; font-family: var(--mono); font-size: 8px; }
.content { min-width: 0; padding: 34px clamp(22px, 3.4vw, 54px) 76px; }
.page { display: none; animation: pageIn .28s ease both; }
.page.active { display: block; }
.page-header { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; margin-bottom: 24px; }
.page-header h1 { margin: 11px 0 6px; font-size: clamp(31px, 3vw, 45px); line-height: 1.02; letter-spacing: -1.8px; }
.page-header p, .section-heading p { margin: 0; color: var(--ink-3); font-size: 14px; }
.header-actions { display: flex; gap: 9px; }
.primary-button, .secondary-button, .orange-button { min-height: 42px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 0 16px; border-radius: 9px; font-size: 12px; font-weight: 700; transition: .17s; }
.primary-button { color: #fff; background: var(--ink); }
.primary-button:hover { background: var(--orange); transform: translateY(-1px); }
.secondary-button { background: var(--surface); border: 1px solid var(--line); }
.secondary-button:hover { border-color: var(--ink-2); }
.orange-button { min-height: 48px; color: #fff; background: var(--orange); box-shadow: 0 12px 30px rgba(255,75,10,.22); }
.orange-button:hover { background: #e94004; transform: translateY(-2px); }
.text-button { color: var(--ink-3); background: transparent; font-size: 12px; }
.text-button:hover { color: var(--orange-dark); }
.admin-chip { display: inline-flex; align-items: center; gap: 8px; padding: 9px 13px; color: var(--orange-dark); background: var(--orange-soft); border-radius: 999px; font-family: var(--mono); font-size: 9px; font-weight: 700; letter-spacing: .4px; }

/* Registry */
.registry-summary, .kanban-metrics { display: grid; grid-template-columns: repeat(4, minmax(130px,1fr)); gap: 11px; margin-bottom: 16px; }
.summary-card { position: relative; overflow: hidden; padding: 17px 18px; background: var(--surface); border: 1px solid var(--line); border-radius: 13px; box-shadow: var(--shadow-sm); }
.summary-card.dark { color: #fff; background: var(--ink); border-color: var(--ink); }
.summary-card::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--card-color, var(--orange)); }
.summary-card strong { display: block; font-size: 27px; line-height: 1; }
.summary-card span { display: block; margin-top: 8px; color: var(--ink-3); font-family: var(--mono); font-size: 9px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; }
.summary-card.dark span { color: #a49e96; }
.registry-toolbar { display: flex; align-items: center; gap: 10px; padding: 13px; margin-bottom: 18px; background: var(--surface); border: 1px solid var(--line); border-radius: 13px; box-shadow: var(--shadow-sm); }
.search-box { min-height: 40px; display: flex; align-items: center; flex: 1; gap: 9px; padding: 0 12px; background: var(--paper); border: 1px solid transparent; border-radius: 8px; }
.search-box:focus-within { border-color: var(--orange); box-shadow: 0 0 0 3px rgba(255,75,10,.09); }
.search-box i { color: var(--ink-3); font-size: 12px; }
.search-box input { width: 100%; border: 0; outline: 0; background: transparent; font-size: 13px; }
.registry-toolbar select, .section-heading select, .form-control { min-height: 40px; padding: 0 34px 0 11px; color: var(--ink-2); background: var(--paper); border: 1px solid transparent; border-radius: 8px; outline: none; font-size: 12px; }
.registry-toolbar select:focus, .section-heading select:focus, .form-control:focus { border-color: var(--orange); box-shadow: 0 0 0 3px rgba(255,75,10,.09); }
.process-tree { display: flex; flex-direction: column; gap: 12px; }
.domain-group { overflow: hidden; background: var(--surface); border: 1px solid var(--line); border-radius: 15px; box-shadow: var(--shadow-sm); }
.domain-head { width: 100%; display: grid; grid-template-columns: 44px 1fr auto 24px; align-items: center; gap: 13px; padding: 16px 18px; text-align: left; background: #fff; transition: .18s; }
.domain-head:hover { background: #faf9f7; }
.domain-code { width: 42px; height: 42px; display: grid; place-items: center; color: #fff; background: var(--domain-color); border-radius: 9px; font-family: var(--mono); font-size: 11px; font-weight: 700; }
.domain-head strong { display: block; font-size: 17px; }
.domain-head small { display: block; margin-top: 3px; color: var(--ink-3); font-family: var(--mono); font-size: 9px; letter-spacing: .5px; }
.domain-stats { display: flex; gap: 7px; }
.domain-stats span { padding: 5px 9px; color: var(--ink-3); background: var(--paper); border-radius: 6px; font-family: var(--mono); font-size: 9px; }
.domain-head .chevron { color: var(--ink-3); transition: transform .22s; }
.domain-group.open .domain-head .chevron { transform: rotate(180deg); }
.domain-body { display: none; padding: 0 18px 18px; border-top: 1px solid var(--line-light); background: #fbfaf8; }
.domain-group.open .domain-body { display: block; animation: unfold .25s ease both; }
.tree-list { list-style: none; padding: 12px 0 0; margin: 0; }
.tree-list .tree-list { margin-left: 26px; padding-top: 7px; border-left: 1px solid var(--line); }
.process-row { position: relative; display: grid; grid-template-columns: 76px 1fr auto 27px; align-items: center; gap: 12px; min-height: 58px; margin: 6px 0; padding: 10px 12px; background: #fff; border: 1px solid var(--line-light); border-radius: 10px; transition: .16s; }
.tree-list .tree-list .process-row::before { content: ""; position: absolute; left: -27px; top: 50%; width: 26px; height: 1px; background: var(--line); }
.process-row:hover { border-color: var(--row-color, var(--orange)); transform: translateX(2px); box-shadow: var(--shadow-sm); }
.process-id { color: var(--row-color, var(--orange-dark)); font-family: var(--mono); font-size: 10px; font-weight: 700; letter-spacing: .4px; }
.process-main { min-width: 0; }
.process-title { display: block; overflow: hidden; font-size: 13.5px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.process-meta { display: flex; gap: 10px; margin-top: 4px; color: var(--ink-3); font-size: 10px; }
.process-status { display: inline-flex; align-items: center; gap: 6px; padding: 5px 9px; border-radius: 999px; font-family: var(--mono); font-size: 8px; font-weight: 700; }
.process-status::before { content: ""; width: 6px; height: 6px; border-radius: 2px; background: currentColor; }
.process-status.approved { color: var(--green); background: var(--green-soft); }
.process-status.draft { color: var(--orange-dark); background: var(--orange-soft); }
.process-row .row-open { width: 28px; height: 28px; display: grid; place-items: center; color: var(--ink-3); background: var(--paper); border-radius: 7px; }
.process-row .row-open:hover { color: #fff; background: var(--orange); }
.tree-empty { padding: 50px; color: var(--ink-3); text-align: center; background: #fff; border: 1px dashed var(--line); border-radius: 14px; }

/* Requests */
.employee-hero { position: relative; overflow: hidden; display: flex; justify-content: space-between; align-items: center; gap: 24px; margin-bottom: 28px; padding: 34px 36px; color: #fff; background: var(--ink); border-radius: 18px; }
.employee-hero::after { content: ""; position: absolute; right: -110px; top: -160px; width: 400px; height: 400px; background: radial-gradient(circle, rgba(255,75,10,.38), transparent 62%); }
.employee-hero > * { position: relative; z-index: 2; }
.employee-hero h1 { margin: 10px 0 6px; font-size: 37px; letter-spacing: -1.6px; }
.employee-hero p { margin: 0; color: #b5afa7; font-size: 14px; }
.hero-stats { display: flex; gap: 22px; margin-top: 18px; }
.hero-stats span { color: #928c84; font-family: var(--mono); font-size: 10px; }
.hero-stats b { margin-right: 6px; color: #fff; font-family: var(--display); font-size: 19px; }
.section-heading { display: flex; justify-content: space-between; align-items: center; gap: 18px; margin-bottom: 16px; }
.section-heading h2 { margin: 0 0 3px; font-size: 22px; }
.request-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(315px,1fr)); gap: 14px; }
.request-card { position: relative; overflow: hidden; padding: 18px 19px 16px; background: #fff; border: 1px solid var(--line); border-radius: 13px; box-shadow: var(--shadow-sm); transition: .18s; cursor: pointer; }
.request-card::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--status-color); }
.request-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--status-color); }
.request-card-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.request-number { color: var(--ink-3); font-family: var(--mono); font-size: 9px; font-weight: 700; letter-spacing: .7px; }
.status-badge { display: inline-flex; align-items: center; gap: 5px; padding: 5px 9px; color: var(--status-color); background: color-mix(in srgb, var(--status-color) 11%, white); border-radius: 999px; font-family: var(--mono); font-size: 8px; font-weight: 700; }
.status-badge::before { content: ""; width: 6px; height: 6px; background: var(--status-color); border-radius: 2px; }
.request-card h3 { margin: 12px 0 10px; font-size: 16px; line-height: 1.25; }
.request-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 14px; }
.request-tags span { padding: 4px 8px; color: var(--ink-2); background: var(--paper); border-radius: 5px; font-family: var(--mono); font-size: 8px; font-weight: 700; text-transform: uppercase; }
.request-tags .change { color: var(--purple); background: var(--purple-soft); }
.request-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; padding-top: 12px; border-top: 1px solid var(--line-light); color: var(--ink-3); font-size: 10px; }
.request-meta span { display: flex; align-items: center; gap: 5px; }
.empty-state { grid-column: 1 / -1; padding: 58px 24px; color: var(--ink-3); text-align: center; background: #fff; border: 1px dashed var(--line); border-radius: 14px; }

/* Kanban */
.kanban-metrics { grid-template-columns: repeat(6, minmax(105px,1fr)); }
.kanban { display: grid; grid-template-columns: repeat(5, minmax(220px,1fr)); gap: 12px; overflow-x: auto; padding-bottom: 12px; }
.kanban-column { min-width: 220px; overflow: hidden; background: color-mix(in srgb, var(--column-color) 7%, var(--paper)); border: 1px solid color-mix(in srgb, var(--column-color) 14%, var(--line)); border-radius: 13px; }
.kanban-head { display: flex; align-items: center; gap: 8px; padding: 12px 13px; color: #fff; background: var(--column-color); }
.kanban-head small { font-family: var(--mono); font-size: 8px; opacity: .74; }
.kanban-head strong { flex: 1; font-size: 12px; }
.kanban-head b { min-width: 22px; padding: 2px 6px; background: rgba(255,255,255,.23); border-radius: 9px; font-family: var(--mono); font-size: 9px; text-align: center; }
.kanban-body { min-height: 155px; display: flex; flex-direction: column; gap: 9px; padding: 10px; }
.kanban-card { position: relative; padding: 13px 13px 12px; text-align: left; background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow-sm); transition: .16s; }
.kanban-card::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--column-color); border-radius: 10px 0 0 10px; }
.kanban-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.kanban-card .num { color: var(--ink-3); font-family: var(--mono); font-size: 8px; font-weight: 700; }
.kanban-card h3 { margin: 7px 0 8px; font-size: 13px; line-height: 1.25; }
.kanban-card .author { display: block; overflow: hidden; margin-top: 10px; padding-top: 9px; color: var(--ink-3); border-top: 1px solid var(--line-light); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.kanban-empty { padding: 24px 8px; color: var(--ink-3); text-align: center; font-size: 11px; }

/* Organization */
.organization-search { max-width: 720px; margin-bottom: 18px; background: #fff; border-color: var(--line); }
.employee-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px,1fr)); gap: 13px; }
.employee-card { display: grid; grid-template-columns: 45px 1fr 28px; align-items: center; gap: 12px; padding: 16px; text-align: left; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-sm); transition: .16s; }
.employee-card:hover { border-color: var(--orange); transform: translateY(-2px); }
.employee-card .avatar { width: 45px; height: 45px; background: var(--orange); }
.employee-card strong { display: block; font-size: 13px; }
.employee-card span { display: block; margin-top: 3px; color: var(--ink-3); font-size: 10px; }
.employee-card i { color: var(--ink-3); }
.employee-card-main small { display:block; margin-top:8px; color:var(--orange-dark); font-family:var(--mono); font-size:9px; letter-spacing:.2px; }
.domain-head.static { cursor:default; }
.domain-head.static:hover { background:#fff; }
.domain-head.static .domain-stats { display:flex; gap:10px; font-family:var(--mono); font-size:10px; color:var(--ink-3); }
.analytics-grid { display:grid; grid-template-columns:1fr 1fr; gap:16px; margin-top:16px; }
.analytics-panel { background:#fff; border:1px solid var(--line); border-radius:14px; padding:20px; box-shadow:var(--shadow-sm); }
.analytics-panel h2 { font-family:var(--dsp); font-size:16px; margin-bottom:18px; }
.analytics-row { margin-bottom:15px; }
.analytics-row > div { display:flex; justify-content:space-between; font-size:13px; margin-bottom:7px; }
.analytics-row b { font-family:var(--mono); font-size:11px; }
.analytics-track { display:block; height:8px; border-radius:9px; background:var(--bg-2); overflow:hidden; }
.analytics-track i { display:block; height:100%; border-radius:9px; transition:width .4s ease; }
.analytics-author { display:flex; align-items:center; gap:10px; padding:10px 0; border-bottom:1px solid var(--line-2); }
.analytics-author strong,.analytics-author small { display:block; }
.analytics-author small { color:var(--muted); font-size:11px; margin-top:3px; }
.field-hint { display:block; margin-top:6px; color:var(--muted); font-size:12px; }
.file-drop { display:flex; align-items:center; justify-content:center; gap:10px; min-height:58px; border:1px dashed var(--line); border-radius:12px; color:var(--muted); cursor:pointer; transition:.2s ease; }
.file-drop:hover { border-color:var(--orange); color:var(--orange); background:#fff8f4; }
.attachment-list { margin-top:7px; color:var(--muted); font-size:12px; min-height:16px; }
@media(max-width:900px){.analytics-grid{grid-template-columns:1fr}}

/* Modals and forms */
.modal-layer { position: fixed; inset: 0; z-index: 200; overflow: auto; padding: 38px 18px; background: rgba(34,31,28,.56); backdrop-filter: blur(4px); animation: fadeIn .18s ease both; }
.modal { width: min(100%, 760px); margin: 0 auto; overflow: hidden; background: #fff; border-radius: 17px; box-shadow: var(--shadow-lg); animation: modalIn .25s cubic-bezier(.2,.8,.2,1) both; }
.modal.large { width: min(100%, 980px); }
.modal-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding: 21px 24px; border-bottom: 1px solid var(--line); }
.modal-kicker { color: var(--orange); font-family: var(--mono); font-size: 9px; font-weight: 700; letter-spacing: 1.4px; text-transform: uppercase; }
.modal-header h2 { margin: 7px 0 0; font-size: 23px; line-height: 1.18; }
.modal-close { width: 34px; height: 34px; display: grid; place-items: center; flex: none; color: var(--ink-3); background: var(--paper); border-radius: 8px; }
.modal-close:hover { color: #fff; background: var(--orange); }
.modal-body { padding: 23px 24px; }
.modal-footer { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 17px 24px; border-top: 1px solid var(--line); background: #fbfaf8; }
.modal-footer .right-actions { display: flex; gap: 8px; margin-left: auto; }
.passport-hero { display: grid; grid-template-columns: 1fr auto; gap: 18px; align-items: start; margin: -23px -24px 22px; padding: 24px; color: #fff; background: var(--ink); }
.passport-code { color: var(--orange); font-family: var(--mono); font-size: 11px; font-weight: 700; }
.passport-hero h3 { margin: 8px 0 5px; font-size: 25px; }
.passport-hero p { margin: 0; color: #aaa39b; font-size: 12px; }
.passport-status { padding: 7px 11px; color: #fff; background: rgba(255,255,255,.10); border-radius: 999px; font-family: var(--mono); font-size: 9px; }
.info-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 12px; }
.info-card { padding: 14px 15px; background: var(--paper); border-radius: 10px; }
.info-card.wide { grid-column: 1 / -1; }
.info-card label, .form-field label { display: block; margin-bottom: 7px; color: var(--ink-3); font-family: var(--mono); font-size: 8.5px; font-weight: 700; letter-spacing: .8px; text-transform: uppercase; }
.info-card p { margin: 0; font-size: 13px; line-height: 1.5; }
.section-title { display: flex; align-items: center; gap: 10px; margin: 23px 0 12px; font-family: var(--mono); font-size: 9px; font-weight: 700; letter-spacing: 1.4px; text-transform: uppercase; }
.section-title::before { content: ""; width: 22px; height: 1px; background: var(--orange); }
.person-list { display: grid; grid-template-columns: repeat(2,1fr); gap: 8px; }
.person-link { display: flex; align-items: center; gap: 10px; padding: 11px 12px; text-align: left; background: #fff; border: 1px solid var(--line); border-radius: 9px; }
.person-link:hover { border-color: var(--orange); }
.person-link .avatar { width: 34px; height: 34px; background: var(--orange); }
.person-link strong { display: block; font-size: 11.5px; }
.person-link small { display: block; overflow: hidden; max-width: 240px; margin-top: 2px; color: var(--ink-3); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.history-list { display: flex; flex-direction: column; gap: 8px; }
.history-item { position: relative; padding: 10px 12px 10px 34px; background: var(--paper); border-radius: 8px; font-size: 12px; }
.history-item::before { content: ""; position: absolute; left: 14px; top: 16px; width: 7px; height: 7px; background: var(--orange); border-radius: 50%; }
.history-item time { display: block; margin-top: 4px; color: var(--ink-3); font-family: var(--mono); font-size: 8px; }
.profile-head { display: grid; grid-template-columns: 64px 1fr; align-items: center; gap: 15px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.profile-head .avatar { width: 64px; height: 64px; background: var(--orange); font-size: 15px; }
.profile-head h3 { margin: 0 0 4px; font-size: 21px; }
.profile-head p { margin: 2px 0; color: var(--ink-3); font-size: 12px; }
.profile-processes { display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; }
.role-group { padding: 12px; background: var(--paper); border-radius: 9px; }
.role-group strong { display: block; margin-bottom: 8px; font-size: 11px; }
.role-group button { width: 100%; display: block; padding: 6px 0; color: var(--ink-2); text-align: left; background: transparent; font-size: 10px; }
.role-group button:hover { color: var(--orange-dark); }
.form-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 14px; }
.form-field { min-width: 0; }
.form-field.wide { grid-column: 1 / -1; }
.form-field input, .form-field select, .form-field textarea { width: 100%; min-height: 42px; padding: 10px 11px; color: var(--ink); background: var(--paper); border: 1px solid transparent; border-radius: 8px; outline: none; font-size: 12.5px; }
.form-field textarea { min-height: 92px; resize: vertical; line-height: 1.45; }
.form-field input:focus, .form-field select:focus, .form-field textarea:focus { border-color: var(--orange); box-shadow: 0 0 0 3px rgba(255,75,10,.09); }
.type-selector { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.type-option { padding: 13px; text-align: left; background: #fff; border: 1px solid var(--line); border-radius: 9px; }
.type-option.active { color: var(--orange-dark); background: var(--orange-soft); border-color: var(--orange); }
.request-stepper { display: grid; grid-template-columns: repeat(5,1fr); gap: 4px; margin: 0 0 22px; }
.request-step { position: relative; padding-top: 19px; color: var(--ink-3); text-align: center; font-family: var(--mono); font-size: 8px; font-weight: 700; }
.request-step::before { content: ""; position: absolute; left: calc(50% - 5px); top: 0; width: 10px; height: 10px; background: var(--line); border: 3px solid #fff; border-radius: 50%; box-shadow: 0 0 0 1px var(--line); }
.request-step:not(:last-child)::after { content: ""; position: absolute; left: calc(50% + 8px); right: calc(-50% + 8px); top: 5px; height: 1px; background: var(--line); }
.request-step.done, .request-step.current { color: var(--ink); }
.request-step.done::before, .request-step.current::before { background: var(--step-color, var(--orange)); box-shadow: 0 0 0 1px var(--step-color, var(--orange)); }
.request-detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.comments { display: flex; flex-direction: column; gap: 8px; }
.comment { padding: 11px 12px; background: var(--paper); border-radius: 8px; }
.comment strong { display: block; font-size: 11px; }
.comment p { margin: 5px 0; font-size: 12.5px; line-height: 1.4; }
.comment time { color: var(--ink-3); font-family: var(--mono); font-size: 8px; }
.comment-form { display: flex; gap: 8px; margin-top: 10px; }
.comment-form input { flex: 1; min-width: 0; padding: 10px; background: var(--paper); border: 1px solid transparent; border-radius: 8px; outline: none; }
.status-select { min-height: 40px; padding: 0 34px 0 11px; background: #fff; border: 1px solid var(--line); border-radius: 8px; }
.toast { position: fixed; left: 50%; bottom: 28px; z-index: 500; display: flex; align-items: center; gap: 9px; padding: 12px 17px; color: #fff; background: var(--ink); border-radius: 10px; box-shadow: var(--shadow); opacity: 0; pointer-events: none; transform: translate(-50%,20px); transition: .25s; font-size: 12px; }
.toast.show { opacity: 1; transform: translate(-50%,0); }
.toast i { color: var(--orange); }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes nodeIn { from { opacity: 0; transform: translateY(13px); } to { opacity: 1; transform: none; } }
@keyframes hotIn { from { opacity: 0; transform: translate(-50%,16px) scale(.93); } to { opacity: 1; transform: translate(-50%,0) scale(1); } }
@keyframes hotPulse { 50% { box-shadow: 0 0 55px rgba(255,75,10,.62); } }
@keyframes lineIn { from { opacity: 0; transform: scaleY(0); } to { opacity: 1; transform: scaleY(1); } }
@keyframes panelIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes pageIn { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: none; } }
@keyframes unfold { from { opacity: 0; transform: translateY(-5px); } to { opacity: 1; transform: none; } }
@keyframes dropdownIn { from { opacity: 0; transform: translateY(-5px); } to { opacity: 1; transform: none; } }
@keyframes modalIn { from { opacity: 0; transform: translateY(12px) scale(.985); } to { opacity: 1; transform: none; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

@media (max-width: 1180px) {
  .topbar { padding: 0 18px; }
  .user-summary div { display: none; }
  .workspace { grid-template-columns: 220px minmax(0,1fr); }
  .registry-summary { grid-template-columns: repeat(2,1fr); }
  .kanban-metrics { grid-template-columns: repeat(3,1fr); }
  .process-row { grid-template-columns: 68px 1fr auto 27px; }
}

@media (max-width: 900px) {
  .login { grid-template-columns: 1fr; }
  .login-art { display: none; }
  .login-panel { padding: 36px 22px; }
  .workspace { grid-template-columns: 78px minmax(0,1fr); }
  .sidebar { padding: 22px 10px 16px; }
  .sidebar-label, .nav-item span, .nav-item b, .sidebar-foot div { display: none; }
  .nav-item { grid-template-columns: 1fr; justify-items: center; padding: 0; font-size: 15px; }
  .content { padding: 28px 20px 65px; }
  .top-brand div, .brand-line { display: none; }
  .top-brand { min-width: 150px; }
  .employee-hero { align-items: flex-start; flex-direction: column; }
  .registry-toolbar { align-items: stretch; flex-wrap: wrap; }
  .registry-toolbar .search-box { flex-basis: 100%; }
  .page-header { align-items: flex-start; flex-direction: column; }
  .person-list, .profile-processes { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .topbar { height: 66px; }
  .top-brand img { width: 112px; }
  .role-pill, .logout-button { display: none; }
  .workspace { grid-template-columns: 1fr; }
  .sidebar { width: 100%; min-height: 62px; height: 62px; position: fixed; left: 0; right: 0; bottom: 0; top: auto; z-index: 80; padding: 7px 8px; }
  .sidebar nav { display: grid; grid-template-columns: repeat(4,1fr); gap: 4px; }
  .sidebar-label, .sidebar-foot { display: none; }
  .nav-item { min-height: 47px; }
  .content { padding: 24px 14px 90px; }
  .page-header h1 { font-size: 32px; }
  .header-actions { width: 100%; }
  .header-actions button { flex: 1; }
  .registry-summary, .kanban-metrics { grid-template-columns: repeat(2,1fr); }
  .domain-stats { display: none; }
  .domain-head { grid-template-columns: 42px 1fr 20px; padding: 13px; }
  .domain-body { padding: 0 10px 12px; }
  .tree-list .tree-list { margin-left: 13px; }
  .tree-list .tree-list .process-row::before { left: -14px; width: 13px; }
  .process-row { grid-template-columns: 54px 1fr 26px; gap: 7px; padding: 9px; }
  .process-status { display: none; }
  .process-meta { display: none; }
  .employee-hero { padding: 28px 22px; }
  .employee-hero h1 { font-size: 31px; }
  .orange-button { width: 100%; }
  .section-heading { align-items: flex-start; flex-direction: column; }
  .section-heading select { width: 100%; }
  .request-grid { grid-template-columns: 1fr; }
  .modal-layer { padding: 12px 8px 80px; }
  .modal-header, .modal-body, .modal-footer { padding-left: 16px; padding-right: 16px; }
  .passport-hero { margin-left: -16px; margin-right: -16px; padding: 20px 16px; grid-template-columns: 1fr; }
  .info-grid, .form-grid, .request-detail-grid { grid-template-columns: 1fr; }
  .info-card.wide, .form-field.wide { grid-column: auto; }
  .type-selector { grid-template-columns: 1fr; }
  .modal-footer { align-items: stretch; flex-direction: column; }
  .modal-footer .right-actions { width: 100%; margin-left: 0; }
  .modal-footer .right-actions button { flex: 1; }
}

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