:root {
  color-scheme: light;
  --ink: #17243d;
  --muted: #718099;
  --line: #e5eaf2;
  --canvas: #f5f7fb;
  --white: #fff;
  --navy: #14213a;
  --blue: #465ee8;
  --blue-hover: #314acb;
  --blue-soft: #eef1ff;
  --red: #c93f4e;
  --red-soft: #fff1f2;
  --green: #16835b;
  --green-soft: #e7f7ef;
  --shadow: 0 12px 35px rgba(25, 42, 76, .05);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
body { margin: 0; background: var(--canvas); color: var(--ink); }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .47; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, a:focus-visible, tr:focus-visible { outline: 3px solid rgba(70, 94, 232, .38); outline-offset: 2px; }
a { color: var(--blue); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

.app { min-height: 100vh; display: flex; flex-direction: column; }
.topbar {
  height: 72px;
  flex: none;
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 0 clamp(20px, 3vw, 44px);
  background: var(--white);
  border-bottom: 1px solid var(--line);
  position: relative;
  z-index: 2;
}
.brand { display: flex; align-items: center; gap: 10px; font-size: 21px; font-weight: 800; letter-spacing: -.8px; }
.brand-mark { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 11px; background: var(--blue); color: #fff; font-size: 22px; line-height: 1; }
.brand-dot { color: var(--blue); }
.topbar-label { font-size: 13px; color: var(--muted); border-left: 1px solid var(--line); padding-left: 28px; }
.environment { margin-left: auto; display: inline-flex; align-items: center; gap: 8px; color: #63718a; font-size: 12px; font-weight: 600; }
.environment-dot { width: 7px; height: 7px; background: #43bd87; border-radius: 50%; box-shadow: 0 0 0 4px #e7f7ef; }
.main { flex: 1; min-height: 0; }
.footer { text-align: center; padding: 16px; color: #9aa5b6; font-size: 11px; background: var(--white); border-top: 1px solid var(--line); }

.login-layout { display: grid; grid-template-columns: minmax(360px, .93fr) minmax(420px, 1.07fr); min-height: calc(100vh - 121px); }
.login-hero { position: relative; overflow: hidden; padding: clamp(60px, 8vw, 120px) clamp(40px, 7vw, 120px); color: #fff; background: radial-gradient(circle at 90% 85%, #4260d3 0%, transparent 36%), linear-gradient(150deg, #152849 0%, #1a3566 58%, #243f83 100%); }
.login-hero::before { content: ""; position: absolute; inset: -150px -160px auto auto; width: 440px; height: 440px; border: 1px solid rgba(255,255,255,.1); border-radius: 50%; }
.login-hero::after { content: ""; position: absolute; inset: auto auto -270px -180px; width: 520px; height: 520px; border: 1px solid rgba(255,255,255,.09); border-radius: 50%; }
.hero-kicker { display: inline-flex; padding: 8px 12px; border: 1px solid rgba(255,255,255,.22); border-radius: 999px; color: #c9d6ff; font-size: 11px; font-weight: 800; letter-spacing: 1.4px; }
.login-hero h1 { position: relative; z-index: 1; font-size: clamp(42px, 5vw, 70px); line-height: 1.07; letter-spacing: -2.8px; margin: 30px 0 20px; }
.login-hero p { position: relative; z-index: 1; max-width: 360px; color: #c2cee6; line-height: 1.65; font-size: 16px; }
.hero-art { position: relative; width: min(100%, 430px); height: 220px; margin-top: 80px; }
.hero-art-card { position: absolute; width: 270px; height: 145px; border-radius: 17px; background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.25); backdrop-filter: blur(10px); box-shadow: 0 22px 45px rgba(5, 15, 52, .15); padding: 26px; }
.hero-art-card-one { left: 0; top: 0; transform: rotate(-8deg); }
.hero-art-card-two { right: 0; bottom: 0; transform: rotate(8deg); }
.hero-art-card span { display: block; width: 32px; height: 32px; border-radius: 10px; background: rgba(255,255,255,.42); margin-bottom: 18px; }
.hero-art-card i { display: block; height: 7px; width: 70%; border-radius: 9px; background: rgba(255,255,255,.3); margin: 10px 0; }
.hero-art-card i:last-child { width: 45%; }
.login-side { display: grid; place-items: center; padding: 48px 24px; }
.login-card { width: min(100%, 410px); }
.eyebrow { display: inline-block; color: var(--blue); font-size: 11px; font-weight: 800; letter-spacing: 1.4px; }
.login-card h2 { font-size: 32px; line-height: 1.15; letter-spacing: -1.3px; margin: 13px 0 11px; }
.login-card > p { color: var(--muted); font-size: 14px; margin: 0 0 32px; }
.login-card form { display: grid; gap: 10px; }
.login-card label, .field label { color: #34435b; font-size: 13px; font-weight: 700; }
input[type="text"], input[type="password"], input[type="email"], input[type="tel"], input[type="search"] {
  width: 100%; min-width: 0; height: 45px; padding: 0 14px;
  background: var(--white); color: var(--ink); border: 1px solid #d9e0eb;
  border-radius: 10px; font-size: 14px; transition: border-color .18s, box-shadow .18s;
}
select, textarea { width: 100%; min-width: 0; padding: 10px 14px; background: var(--white); color: var(--ink); border: 1px solid #d9e0eb; border-radius: 10px; font-size: 14px; }
select { height: 42px; }
textarea { min-height: 92px; resize: vertical; line-height: 1.5; }
input:hover { border-color: #aebbd0; }
input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(70,94,232,.12); outline: none; }
.login-card input { margin-bottom: 12px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 39px; border-radius: 9px; padding: 9px 15px; border: 1px solid transparent; font-size: 13px; font-weight: 700; white-space: nowrap; transition: background .18s, border-color .18s, transform .18s; }
.button:not(:disabled):hover { transform: translateY(-1px); }
.button.primary { color: #fff; background: var(--blue); border-color: var(--blue); }
.button.primary:hover { background: var(--blue-hover); border-color: var(--blue-hover); }
.button.white { color: #243779; background: #fff; }
.button.white:hover { background: #eef1ff; }
.button.ghost, .button.subtle { color: #45536b; background: #fff; border-color: #dfe5ee; }
.button.ghost:hover, .button.subtle:hover { background: #f6f8fc; }
.button.danger { color: var(--red); background: #fff; border-color: #f0d0d5; }
.button.danger:hover { background: var(--red-soft); }
.button.danger-solid { color: #fff; background: var(--red); }
.button.danger-solid:hover { background: #ab2f3e; }
.login-submit { width: 100%; justify-content: space-between; min-height: 48px; padding: 0 17px; margin-top: 10px; font-size: 14px; }
.login-submit span { font-size: 20px; line-height: 1; }
.notice { padding: 12px 14px; margin: 16px 0; border-radius: 10px; line-height: 1.5; font-size: 13px; background: var(--blue-soft); color: #3552b6; }
.notice.error { background: var(--red-soft); color: #a32e3e; }
.notice.success { background: var(--green-soft); color: var(--green); }
.page-heading-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }

.dashboard { display: flex; min-height: calc(100vh - 121px); }
.sidebar { display: flex; flex-direction: column; justify-content: space-between; flex: none; width: 242px; padding: 34px 16px 20px; background: var(--navy); color: #fff; }
.sidebar-label { margin: 0 14px 18px; color: #7d8da9; font-size: 10px; font-weight: 800; letter-spacing: 1.5px; }
.nav-list { display: grid; gap: 4px; }
.nav-item { display: flex; align-items: center; gap: 13px; width: 100%; border: 0; border-radius: 10px; padding: 12px 14px; background: transparent; color: #aab7ce; font-size: 13px; font-weight: 650; text-align: left; }
.nav-item:hover { background: #263955; color: #fff; }
.nav-item.active { color: #fff; background: #324668; box-shadow: inset 3px 0 0 #86a2ff; }
.nav-symbol { display: block; flex: none; width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.nav-group { display: grid; gap: 3px; margin-top: 18px; }
.nav-group-title { padding: 0 14px 5px; color: #90a0ba; font-size: 11px; font-weight: 800; letter-spacing: .8px; }
.nav-subitem { padding-left: 25px; }
.sidebar-bottom { display: grid; gap: 14px; }
.account-card { display: flex; align-items: center; gap: 10px; padding: 12px; border: 1px solid #374761; border-radius: 12px; }
.avatar { display: grid; place-items: center; flex: none; width: 34px; height: 34px; border-radius: 11px; background: #586dc6; font-weight: 800; }
.account-card strong { display: block; font-size: 13px; overflow-wrap: anywhere; }
.account-card small { display: block; color: #90a0ba; font-size: 11px; margin-top: 2px; }
.logout-button { display: flex; justify-content: space-between; align-items: center; width: 100%; border: 0; background: transparent; color: #aab7ce; padding: 10px 14px; font-size: 12px; font-weight: 700; }
.logout-button:hover { color: #fff; }

.workspace { flex: 1; min-width: 0; padding: 40px clamp(20px, 4vw, 60px) 68px; }
.panel-section { max-width: 1230px; margin: 0 auto; }
.page-heading { display: flex; justify-content: space-between; align-items: end; gap: 20px; margin-bottom: 28px; }
.page-heading h1 { margin: 9px 0 7px; font-size: clamp(29px, 3vw, 38px); line-height: 1.1; letter-spacing: -1.5px; }
.page-heading p { margin: 0; color: var(--muted); font-size: 14px; }
.welcome-card { display: flex; justify-content: space-between; overflow: hidden; position: relative; min-height: 255px; padding: 34px 40px; border-radius: 18px; color: #fff; background: linear-gradient(115deg, #3047ac, #5469e6 67%, #8091f1); box-shadow: 0 18px 38px rgba(58, 78, 173, .16); }
.welcome-card > div:first-child { position: relative; z-index: 1; }
.welcome-pill { display: inline-block; padding: 6px 9px; border-radius: 6px; color: #dbe2ff; background: rgba(255,255,255,.13); font-size: 10px; font-weight: 800; letter-spacing: 1px; }
.welcome-card h2 { margin: 20px 0 8px; font-size: clamp(24px, 2.8vw, 34px); letter-spacing: -.9px; }
.welcome-card p { margin: 0 0 22px; color: #e0e7ff; font-size: 14px; }
.welcome-decoration { position: absolute; right: 5%; bottom: -130px; width: 420px; height: 420px; border: 1px solid rgba(255,255,255,.26); border-radius: 50%; }
.welcome-decoration span { position: absolute; inset: 38px; border: 1px solid rgba(255,255,255,.22); border-radius: 50%; }
.welcome-decoration span:nth-child(2) { inset: 82px; }
.welcome-decoration span:nth-child(3) { inset: 125px; background: rgba(255,255,255,.08); }
.info-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin-top: 20px; }
.info-card { display: flex; flex-direction: column; align-items: flex-start; min-height: 185px; padding: 24px; border: 1px solid var(--line); border-radius: 15px; background: #fff; box-shadow: var(--shadow); }
.info-icon { display: grid; place-items: center; width: 35px; height: 35px; border-radius: 10px; background: var(--blue-soft); color: var(--blue); font-size: 23px; line-height: 1; }
.info-title { color: var(--muted); font-size: 12px; margin-top: 17px; }
.info-card strong { margin-top: 4px; font-size: 18px; }
.info-card p { color: #8a96a9; font-size: 12px; margin: 8px 0 0; }

.table-card { border: 1px solid var(--line); border-radius: 17px; background: #fff; box-shadow: var(--shadow); overflow: hidden; }
.table-top { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; padding: 22px 24px; }
.table-top h2 { margin: 0 0 4px; font-size: 17px; letter-spacing: -.3px; }
.table-caption { color: var(--muted); font-size: 12px; }
.search-box { display: flex; align-items: center; position: relative; width: min(100%, 275px); }
.search-box > span:first-child { position: absolute; left: 13px; z-index: 1; color: #8995a7; font-size: 23px; line-height: 1; }
.search-box input { height: 38px; padding-left: 38px; font-size: 12px; }
.table-card > .notice { margin: 0 24px 18px; }
.table-scroll { width: 100%; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 770px; }
th { text-align: left; padding: 13px 16px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: #fafbfe; color: #8b98aa; font-size: 10px; font-weight: 800; letter-spacing: .8px; text-transform: uppercase; white-space: nowrap; }
th:first-child, td:first-child { width: 54px; padding-left: 24px; }
td { padding: 13px 16px; border-bottom: 1px solid #eef1f5; color: #5b6980; font-size: 12px; }
tbody tr { cursor: pointer; transition: background .12s; }
tbody tr:hover { background: #f9faff; }
tbody tr.selected { background: #f0f3ff; }
tbody tr:last-child td { border-bottom: 0; }
td input[type="radio"] { width: 16px; height: 16px; accent-color: var(--blue); cursor: pointer; }
.user-cell { display: flex; align-items: center; gap: 11px; min-width: 180px; }
.user-avatar { display: grid; place-items: center; width: 35px; height: 35px; flex: none; border-radius: 11px; background: #e9edff; color: #4f60ae; font-weight: 800; font-size: 13px; }
.user-cell strong { display: block; color: var(--ink); font-size: 12px; }
.user-cell small { display: block; color: #96a1b0; font-size: 11px; margin-top: 3px; }
.status { display: inline-flex; align-items: center; gap: 6px; padding: 6px 9px; border-radius: 999px; font-size: 11px; font-weight: 700; }
.status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.active-status { color: var(--green); background: var(--green-soft); }
.inactive-status { color: #7b879a; background: #eef1f5; }
.empty-state { display: grid; justify-items: center; gap: 7px; padding: 55px 20px 60px; text-align: center; }
.empty-state > span { color: #bec8db; font-size: 44px; line-height: 1; }
.empty-state strong { font-size: 15px; }
.empty-state p { color: var(--muted); font-size: 12px; margin: 0; }
.table-footer { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 65px; padding: 10px 24px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.pager { display: flex; gap: 8px; }
.pager .button { min-height: 32px; padding: 6px 11px; font-size: 11px; }
.action-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 74px; padding: 14px 24px; background: #fafbff; border-top: 1px solid var(--line); }
.selection-info { color: #758198; font-size: 12px; }
.action-buttons { display: flex; flex-wrap: wrap; gap: 7px; }
.action-buttons .button { min-height: 35px; padding: 7px 12px; font-size: 12px; }
#unitTable { min-width: 540px; }
.unit-key { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; color: #54627b; }
.special-code-filters { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.special-code-filters select { width: min(100%, 260px); height: 38px; font-size: 12px; }
#specialCodeTable { min-width: 900px; }
#currencyTable { min-width: 900px; }
#stockCardTable { min-width: 1050px; }

.company-card { max-width: 860px; padding: 28px 30px; border: 1px solid var(--line); border-radius: 17px; background: #fff; box-shadow: var(--shadow); }
.company-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.company-card-head h2 { margin: 8px 0 7px; font-size: 23px; letter-spacing: -.6px; }
.company-card-head p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.5; }
.company-card-head .status { margin-top: 6px; }
.company-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 9px; }
.company-card > .notice { margin-bottom: 0; }
.company-details { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 24px; margin: 24px 0 0; border-top: 1px solid var(--line); }
.company-details div { min-width: 0; padding: 15px 0; border-bottom: 1px solid var(--line); }
.company-details dt { margin-bottom: 5px; color: var(--muted); font-size: 12px; }
.company-details dd { margin: 0; color: var(--ink); font-size: 14px; font-weight: 650; overflow-wrap: anywhere; }
.company-form-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 26px; }
#companySection > .notice { max-width: 860px; }

.modal { width: min(calc(100% - 32px), 540px); max-height: min(85vh, 760px); overflow: auto; padding: 26px; border: 1px solid var(--line); border-radius: 17px; background: #fff; color: var(--ink); box-shadow: 0 30px 90px rgba(11, 26, 57, .22); }
.modal::backdrop { background: rgba(13, 24, 46, .55); backdrop-filter: blur(3px); }
.form-modal { width: min(calc(100% - 32px), 680px); }
.stock-card-form { width: min(calc(100% - 32px), 820px); }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.modal-head h2 { margin: 7px 0 0; font-size: 23px; letter-spacing: -.6px; }
.icon-button { display: grid; place-items: center; flex: none; width: 30px; height: 30px; border: 0; border-radius: 8px; background: #f3f5f9; color: #7c899e; font-size: 23px; line-height: 1; }
.icon-button:hover { color: var(--ink); background: #e9edf4; }
.modal-lead { color: var(--muted); font-size: 13px; line-height: 1.5; margin: 14px 0 22px; }
.modal-lead strong { color: var(--ink); }
.modal-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 9px; margin-top: 24px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 16px; margin-top: 22px; }
.field { display: grid; align-content: start; gap: 8px; }
.field label span { color: var(--red); }
.field small { color: #98a4b6; font-size: 11px; }
.field input { height: 42px; }
.field-wide { grid-column: 1 / -1; }
.stock-field-group { grid-column: 1 / -1; margin: 5px 0 -6px; padding-bottom: 7px; border-bottom: 1px solid var(--line); font-size: 14px; }
.detail-list { display: grid; margin: 24px 0; border-top: 1px solid var(--line); }
.detail-list div { display: grid; grid-template-columns: 135px 1fr; gap: 16px; padding: 13px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.detail-list dt { color: var(--muted); }
.detail-list dd { margin: 0; font-weight: 650; overflow-wrap: anywhere; }
.danger-text { color: var(--red); }
.picker-list { max-height: 330px; overflow-y: auto; margin-top: 16px; border: 1px solid var(--line); border-radius: 10px; }
.picker-item { display: block; width: 100%; padding: 12px 15px; border: 0; border-bottom: 1px solid var(--line); background: #fff; text-align: left; }
.picker-item:last-child { border-bottom: 0; }
.picker-item:hover { background: #f5f7ff; }
.picker-item strong, .picker-item small { display: block; }
.picker-item strong { color: var(--ink); font-size: 13px; }
.picker-item small { color: var(--muted); font-size: 11px; margin-top: 4px; }
.picker-empty { padding: 20px; color: var(--muted); font-size: 13px; text-align: center; }
.toast { position: fixed; z-index: 20; right: 24px; bottom: 24px; max-width: 330px; padding: 13px 16px; border-radius: 11px; color: #fff; background: #263957; box-shadow: 0 12px 32px rgba(11, 26, 57, .22); font-size: 13px; }
.toast.error { background: #aa3545; }

@media (max-width: 980px) {
  .login-layout { grid-template-columns: 1fr 1fr; }
  .login-hero { padding: 70px 42px; }
  .hero-art { display: none; }
  .dashboard { display: block; }
  .sidebar { width: 100%; padding: 13px 20px; flex-direction: row; flex-wrap: wrap; align-items: center; }
  .sidebar-label { display: none; }
  .nav-list { display: flex; flex-wrap: wrap; align-items: center; }
  .nav-item { width: auto; }
  .nav-group { display: flex; align-items: center; margin-top: 0; }
  .nav-group-title { padding: 0 5px 0 9px; }
  .nav-subitem { padding-left: 12px; }
  .sidebar-bottom { display: flex; align-items: center; }
  .account-card { padding: 6px 9px; border: 0; }
  .logout-button { width: auto; }
  .workspace { padding-top: 30px; }
}

@media (max-width: 700px) {
  .topbar { height: 62px; padding: 0 18px; }
  .topbar-label { display: none; }
  .environment { font-size: 10px; }
  .login-layout { display: block; }
  .login-hero { min-height: 230px; padding: 36px 24px; }
  .login-hero h1 { font-size: 39px; margin: 18px 0 10px; }
  .login-hero p { font-size: 12px; margin: 0; }
  .login-side { padding: 38px 24px 55px; }
  .login-card h2 { font-size: 28px; }
  .sidebar { gap: 12px; padding: 10px 12px; }
  .nav-item { padding: 9px; gap: 6px; font-size: 11px; }
  .nav-symbol { width: 16px; height: 16px; }
  .account-card { display: none; }
  .logout-button { font-size: 11px; padding: 8px; }
  .workspace { padding: 26px 16px 42px; }
  .page-heading { align-items: flex-start; flex-wrap: wrap; }
  .page-heading-actions { width: 100%; }
  .page-heading h1 { font-size: 28px; }
  .welcome-card { padding: 26px; min-height: 260px; }
  .welcome-card h2 { font-size: 25px; }
  .welcome-decoration { right: -200px; }
  .info-grid { grid-template-columns: 1fr; }
  .table-top { padding: 18px; }
  .search-box { width: 100%; }
  .table-footer, .action-bar { padding-left: 18px; padding-right: 18px; }
  .action-bar { align-items: flex-start; flex-direction: column; }
  .action-buttons { width: 100%; }
  .action-buttons .button { flex: 1; }
  .modal { padding: 20px; }
  .form-grid { grid-template-columns: 1fr; }
  .detail-list div { grid-template-columns: 100px 1fr; }
  .company-card { padding: 22px 18px; }
  .company-card-head { flex-wrap: wrap; }
  .company-details { grid-template-columns: 1fr; }
}

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

.product-tree-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.product-tree-stat { display: grid; gap: 6px; padding: 19px 20px; border: 1px solid var(--line); border-radius: 13px; background: #fff; }
.product-tree-stat strong { color: var(--ink); font-size: 25px; letter-spacing: -.6px; }
.product-tree-stat span, .product-tree-note { color: var(--muted); font-size: 12px; line-height: 1.6; }
.product-tree-note { margin: 14px 0 20px; }
.product-tree-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.product-tree-filters select { height: 38px; font-size: 12px; }
.product-tree-tabs { display: flex; gap: 8px; flex-wrap: wrap; padding: 0 24px 18px; }
.product-tree-tabs [aria-pressed="true"] { background: var(--blue-soft); color: var(--blue); border-color: #c9d2fa; }
.product-tree-view { padding: 0 24px 24px; border-top: 1px solid var(--line); }
.product-tree-view h3 { font-size: 14px; margin: 20px 0 14px; }
.product-tree-row-warning { display: block; margin-top: 5px; color: #a36012; }
.product-tree-nodes { display: grid; gap: 5px; }
.product-tree-node { padding-left: calc(var(--tree-indent, 0) * 22px); }
.product-tree-node button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 11px 12px; border: 1px solid var(--line); border-radius: 9px; background: #fff; text-align: left; color: var(--ink); }
.product-tree-node button:hover, .product-tree-branch:hover { background: #f7f9ff; }
.product-tree-node button.selected { border-color: var(--blue); background: var(--blue-soft); }
.product-tree-node button.product-tree-context { background: #f7f8fa; }
.product-tree-node-icon { color: var(--blue); font-size: 22px; }
.product-tree-node-description { display: grid; gap: 5px; flex: 1; min-width: 0; overflow-wrap: anywhere; }
.product-tree-node-description strong { font-size: 13px; }
.product-tree-node-description small { color: var(--muted); font-size: 11px; }
.product-tree-more { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 16px; }
.product-tree-analysis-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 35px; }
.product-tree-distribution { display: grid; grid-template-columns: 68px 1fr 35px; align-items: center; gap: 10px; margin: 10px 0; color: var(--muted); font-size: 12px; }
.product-tree-distribution meter { width: 100%; height: 16px; accent-color: var(--blue); }
.product-tree-distribution strong { text-align: right; color: var(--ink); }
.product-tree-branch { display: flex; justify-content: space-between; gap: 12px; width: 100%; padding: 10px 0; border: 0; border-bottom: 1px solid var(--line); background: #fff; font-size: 12px; color: var(--ink); text-align: left; }
.product-tree-branch span { overflow-wrap: anywhere; }
.product-tree-branch strong { flex: none; color: var(--muted); }
.product-tree-warnings { display: grid; gap: 8px; margin-bottom: 16px; }
.product-tree-warning { display: grid; gap: 5px; width: 100%; padding: 12px 14px; border: 1px solid #f0dfbd; border-radius: 9px; background: #fffbf2; text-align: left; color: #8b5b15; overflow-wrap: anywhere; }
.product-tree-warning strong { font-size: 12px; }
.product-tree-warning span { font-size: 12px; line-height: 1.5; }
#productTreeField_id { color: var(--muted); background: #f7f8fc; }
@media (max-width: 700px) {
  .product-tree-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .product-tree-stat { padding: 14px; }
  .product-tree-filters, .product-tree-filters > label { width: 100%; }
  .product-tree-tabs { padding: 0 18px 16px; }
  .product-tree-view { padding: 0 18px 20px; }
  .product-tree-analysis-grid { grid-template-columns: 1fr; gap: 4px; }
  .product-tree-node { padding-left: calc(min(var(--tree-indent, 0), 5) * 10px); }
  .product-tree-node button { flex-wrap: wrap; }
}

#productTreeAnalysisView > .product-tree-summary { margin-top: 20px; }

/* --- Yönetilebilir kolonlar --- */
table.grid-managed { table-layout: fixed; }
table.grid-managed th { position: relative; overflow: hidden; text-overflow: ellipsis; }
table.grid-managed td { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
table.grid-managed td .user-cell small { overflow: hidden; text-overflow: ellipsis; }
th.grid-select-column { width: 58px; }
th.align-right, td.align-right { text-align: right; }
.grid-header-label { display: block; overflow: hidden; text-overflow: ellipsis; }
.col-resizer { position: absolute; top: 0; right: 0; width: 9px; height: 100%; cursor: col-resize; user-select: none; }
.col-resizer::after { content: ""; position: absolute; top: 25%; right: 4px; width: 1px; height: 50%; background: #cfd8e6; }
.col-resizer:hover::after { background: var(--blue); width: 2px; }
body.col-resizing { cursor: col-resize; user-select: none; }
td.unresolved-reference { color: #a3762e; }

/* --- Kolon yöneticisi --- */
.column-manager-list { display: grid; gap: 4px; margin: 18px 0 0; padding: 0; list-style: none; max-height: 52vh; overflow: auto; }
.column-manager-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 9px; }
.column-manager-toggle { display: flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 650; min-width: 0; }
.column-manager-toggle span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.column-manager-actions { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.column-manager-width { width: 78px; padding: 6px 8px; border: 1px solid #dfe5ee; border-radius: 8px; font-size: 12px; }
.column-manager-actions .icon-button:disabled { opacity: .35; }

/* --- Kategori seçici --- */
.wide-modal { width: min(calc(100% - 32px), 820px); }
.category-tree { max-height: 52vh; overflow: auto; margin-top: 14px; border: 1px solid var(--line); border-radius: 11px; }
.category-node { display: block; width: 100%; text-align: left; padding: 9px 12px; border-bottom: 1px solid #f0f3f8; background: #fff; }
.category-node:last-child { border-bottom: 0; }
.category-node:hover { background: var(--blue-soft); }
.category-node.selected { background: var(--blue-soft); box-shadow: inset 3px 0 0 var(--blue); }
.category-node strong { display: block; font-size: 13px; font-weight: 650; }
.category-node small { display: block; color: var(--muted); font-size: 11px; margin-top: 2px; }

/* --- Stok kartı filtre çubuğu --- */
.stock-card-filters { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.active-filter { display: flex; align-items: center; gap: 12px; margin: 0 0 4px; padding: 9px 14px; border-radius: 9px; background: var(--blue-soft); color: #3552b6; font-size: 12px; font-weight: 650; }
.link-button { color: var(--blue); font-size: 12px; font-weight: 700; text-decoration: underline; background: none; border: 0; }

/* --- Detaylı stok kartı görünümü --- */
.product-detail { display: grid; gap: 22px; margin-top: 18px; }
.product-detail-section h3 { margin: 0 0 8px; font-size: 13px; font-weight: 800; letter-spacing: .4px; text-transform: uppercase; color: #8b98aa; }
.product-detail-list { display: grid; margin: 0; border-top: 1px solid var(--line); }
.product-detail-row { display: grid; grid-template-columns: 190px 1fr; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.product-detail-row dt { color: var(--muted); }
.product-detail-row dd { margin: 0; font-weight: 650; overflow-wrap: anywhere; }
.product-detail-row.muted dd { font-weight: 500; color: var(--muted); }
.reference-value strong { display: block; font-weight: 700; }
.reference-value small { display: block; color: var(--muted); font-size: 11px; font-weight: 500; margin-top: 2px; }
.reference-value.unresolved-reference strong { color: #a3762e; }

/* --- "Diğer" alt menüsü --- */
.nav-toggle { justify-content: flex-start; }
.nav-caret { margin-left: auto; transition: transform .18s; color: #90a0ba; }
.nav-toggle[aria-expanded="true"] .nav-caret { transform: rotate(90deg); }
.nav-subgroup { display: grid; gap: 3px; }
.nav-leaf { padding-left: 46px; }

/* --- Kolon altı filtre satırı --- */
.grid-filter-row th { padding: 6px 8px; background: #fff; border-top: 0; border-bottom: 1px solid var(--line); vertical-align: middle; }
.grid-filter-input { width: 100%; min-width: 0; padding: 6px 8px; border: 1px solid #e2e8f1; border-radius: 7px; font-size: 12px; font-weight: 500; text-transform: none; letter-spacing: 0; color: var(--ink); background: #fbfcfe; }
.grid-filter-input:focus { border-color: var(--blue); background: #fff; outline: none; }
.grid-filter-input::placeholder { color: #a8b3c4; font-weight: 500; }
.grid-filter-input:disabled { color: #a8b3c4; }
select.grid-filter-input { appearance: auto; }
.grid-filter-button { width: 100%; padding: 6px 8px; border: 1px dashed #cbd5e4; border-radius: 7px; font-size: 12px; font-weight: 650; color: #45536b; background: #fbfcfe; text-transform: none; letter-spacing: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.grid-filter-button:hover { border-color: var(--blue); color: var(--blue); }
.grid-filter-clear { width: 24px; height: 24px; border-radius: 6px; border: 1px solid #e2e8f1; background: #fff; color: #8b98aa; font-size: 15px; line-height: 1; }
.grid-filter-clear:hover { border-color: var(--red); color: var(--red); }

/* --- Kategori seviye seçimi --- */
.category-levels { display: flex; flex-wrap: wrap; gap: 10px; margin: 16px 0 4px; }
.category-level { display: grid; gap: 4px; min-width: 190px; flex: 1 1 190px; }
.category-level > span { color: #8b98aa; font-size: 10px; font-weight: 800; letter-spacing: .8px; text-transform: uppercase; }
.category-level select { width: 100%; padding: 8px 10px; border: 1px solid #dfe5ee; border-radius: 8px; font-size: 13px; background: #fff; }
.category-level-hint { flex: 1 1 100%; margin: 4px 0 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
