:root {
  --ink: #173e37;
  --ink-2: #24584e;
  --green: #277a68;
  --mint: #8cbfad;
  --mint-pale: #dcece7;
  --cream: #f6f2e9;
  --paper: #fffdf8;
  --white: #fff;
  --coral: #d96b52;
  --coral-pale: #f8e5df;
  --gold: #c7973b;
  --text: #263b36;
  --muted: #71817d;
  --line: #dfe7e3;
  --danger: #ba3f3f;
  --shadow: 0 18px 50px rgba(23, 62, 55, .10);
  --shadow-sm: 0 8px 24px rgba(23, 62, 55, .08);
  --radius: 18px;
  --sidebar: 264px;
}

* { box-sizing: border-box; }
html { font-size: 15px; }
body { margin: 0; color: var(--text); background: var(--cream); font-family: "Be Vietnam Pro", sans-serif; -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; }
button { color: inherit; }
a { color: inherit; text-decoration: none; }
[hidden] { display: none !important; }

.login-view { min-height: 100vh; display: grid; grid-template-columns: minmax(440px, 1.05fr) minmax(440px, .95fr); }
.login-brand-panel { position: relative; overflow: hidden; min-height: 680px; color: var(--cream); background: var(--ink); }
.login-brand-inner { position: relative; z-index: 2; min-height: 100%; max-width: 720px; padding: 58px clamp(48px, 7vw, 108px); display: flex; flex-direction: column; }
.brand { height: 48px; display: inline-flex; align-items: center; gap: 12px; color: var(--ink); font-size: 1.04rem; letter-spacing: -.02em; }
.brand img { width: 46px; height: 46px; object-fit: contain; filter: drop-shadow(0 7px 10px rgba(0,0,0,.13)); }
.brand b { font-size: 1.28rem; }
.brand-light { color: var(--cream); align-self: flex-start; }
.login-message { margin: auto 0; padding: 80px 0 56px; }
.eyebrow { margin: 0 0 14px; color: var(--green); font-size: .7rem; font-weight: 700; letter-spacing: .16em; }
.eyebrow-light { color: var(--mint); }
.login-message h1 { margin: 0 0 26px; font-family: "DM Serif Display", serif; font-size: clamp(3.2rem, 5.2vw, 5.6rem); font-weight: 400; line-height: .99; letter-spacing: -.04em; }
.login-message h1 em { color: var(--mint); font-weight: 400; }
.login-message > p:last-child { max-width: 560px; margin: 0; color: #cbd8d4; font-size: 1.02rem; line-height: 1.8; }
.security-note { display: flex; align-items: center; gap: 14px; padding-top: 26px; border-top: 1px solid rgba(255,255,255,.14); }
.security-icon { width: 43px; height: 43px; display: grid; place-items: center; color: var(--mint); background: rgba(140,191,173,.13); border-radius: 13px; }
.security-icon svg { width: 21px; }
.security-note div { display: grid; gap: 4px; }
.security-note b { font-size: .85rem; }
.security-note small { color: #99ada7; font-size: .72rem; }
.brand-pattern { position: absolute; right: -200px; bottom: -200px; width: 620px; height: 620px; border: 1px solid rgba(140,191,173,.15); border-radius: 50%; }
.brand-pattern::before, .brand-pattern::after { content: ""; position: absolute; border: 1px solid rgba(140,191,173,.12); border-radius: 50%; }
.brand-pattern::before { inset: 70px; }.brand-pattern::after { inset: 150px; background: rgba(140,191,173,.03); }
.login-form-panel { display: grid; place-items: center; padding: 48px; background: var(--paper); }
.login-card { width: min(100%, 420px); }
.login-mobile-brand { display: none; }
.form-heading { margin-bottom: 38px; }
.form-heading h2 { margin: 0 0 10px; color: var(--ink); font-family: "DM Serif Display", serif; font-size: 2.6rem; font-weight: 400; letter-spacing: -.025em; }
.form-heading > p:last-child { margin: 0; color: var(--muted); }
.field { display: grid; gap: 9px; margin-bottom: 20px; }
.field > span { color: var(--text); font-size: .78rem; font-weight: 600; }
.input-wrap { position: relative; display: flex; align-items: center; }
.input-wrap > i { position: absolute; left: 15px; width: 19px; height: 19px; display: grid; color: #8a9995; }
.input-wrap input, .field > input, .field > select, .field > textarea { width: 100%; min-height: 49px; padding: 0 15px; color: var(--text); background: var(--white); border: 1px solid #d7e0dc; border-radius: 11px; outline: none; transition: .2s; }
.input-wrap input { padding-left: 46px; padding-right: 46px; }
.input-wrap input:focus, .field > input:focus, .field > select:focus, .field > textarea:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(39,122,104,.11); }
.input-wrap .icon-button { position: absolute; right: 8px; }
.icon-button { width: 38px; height: 38px; padding: 0; display: inline-grid; place-items: center; border: 0; border-radius: 10px; background: transparent; cursor: pointer; }
.icon-button:hover { background: rgba(23,62,55,.07); }
.icon-button svg { width: 19px; height: 19px; }
.button { min-height: 42px; padding: 0 17px; display: inline-flex; align-items: center; justify-content: center; gap: 9px; border: 1px solid transparent; border-radius: 10px; font-size: .78rem; font-weight: 600; cursor: pointer; transition: transform .16s, background .16s, box-shadow .16s; }
.button:hover { transform: translateY(-1px); }
.button:disabled { opacity: .55; cursor: wait; transform: none; }
.button svg { width: 17px; height: 17px; }
.button-primary { color: white; background: var(--ink); box-shadow: 0 8px 18px rgba(23,62,55,.18); }
.button-primary:hover { background: var(--ink-2); }
.button-accent { color: white; background: var(--coral); box-shadow: 0 8px 18px rgba(217,107,82,.18); }
.button-outline { background: var(--white); border-color: var(--line); }
.button-outline:hover { border-color: var(--mint); }
.button-ghost { color: var(--ink); background: #edf4f1; }
.button-danger { color: var(--danger); background: #fbebeb; }
.button-large { width: 100%; min-height: 52px; margin-top: 8px; }
.button-small { min-height: 34px; padding: 0 11px; font-size: .7rem; border-radius: 8px; }
.inline-error { margin: 0 0 12px; padding: 11px 13px; color: var(--danger); background: #fff2f1; border: 1px solid #f3d2cf; border-radius: 9px; font-size: .76rem; }
.login-help { margin: 24px 0 0; color: #8a9995; text-align: center; font-size: .7rem; }

.app-view { min-height: 100vh; }
.sidebar { position: fixed; z-index: 20; inset: 0 auto 0 0; width: var(--sidebar); padding: 25px 19px 18px; display: flex; flex-direction: column; background: var(--paper); border-right: 1px solid var(--line); }
.sidebar .brand { margin: 0 11px 34px; }
.main-nav { display: grid; gap: 5px; }
.nav-section-label { margin: 20px 12px 7px; color: #9aa6a2; font-size: .61rem; font-weight: 700; letter-spacing: .13em; }
.nav-item { height: 45px; padding: 0 13px; display: flex; align-items: center; gap: 12px; color: #58706a; border-radius: 10px; font-size: .78rem; font-weight: 500; transition: .18s; }
.nav-item svg { width: 19px; height: 19px; }
.nav-item:hover { color: var(--ink); background: #eef4f1; }
.nav-item.active { color: var(--ink); background: var(--mint-pale); font-weight: 650; }
.nav-item.active::before { content: ""; width: 3px; height: 19px; margin-left: -13px; background: var(--green); border-radius: 0 3px 3px 0; }
.nav-item.active svg { color: var(--green); }
.sidebar-foot { margin-top: auto; display: grid; gap: 12px; }
.privacy-card { padding: 14px; display: flex; gap: 11px; color: var(--ink); background: #eef5f2; border-radius: 12px; }
.privacy-card > svg { width: 20px; color: var(--green); flex: none; }
.privacy-card div { display: grid; gap: 4px; }
.privacy-card b { font-size: .67rem; }.privacy-card span { color: var(--muted); font-size: .57rem; line-height: 1.45; }
.user-menu { width: 100%; padding: 12px 8px; display: flex; align-items: center; gap: 10px; text-align: left; background: transparent; border: 0; border-top: 1px solid var(--line); cursor: pointer; }
.user-menu > svg { width: 17px; color: #84938f; }
.avatar { width: 38px; height: 38px; display: inline-grid; place-items: center; flex: none; color: var(--ink); background: var(--mint); border-radius: 50%; font-size: .66rem; font-weight: 700; }
.avatar-dark { color: white; background: var(--ink); }
.user-copy { min-width: 0; display: grid; gap: 2px; flex: 1; }
.user-copy b, .user-copy small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-copy b { color: var(--ink); font-size: .68rem; }.user-copy small { color: var(--muted); font-size: .58rem; }
.workspace { min-height: 100vh; margin-left: var(--sidebar); }
.topbar { height: 86px; padding: 0 38px; display: flex; align-items: center; gap: 20px; background: rgba(246,242,233,.92); border-bottom: 1px solid rgba(23,62,55,.08); backdrop-filter: blur(10px); }
.topbar-kicker { margin: 0 0 4px; color: var(--green); font-size: .57rem; font-weight: 700; letter-spacing: .16em; }
.topbar h1 { margin: 0; color: var(--ink); font-family: "DM Serif Display", serif; font-size: 1.65rem; font-weight: 400; letter-spacing: -.015em; }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.live-status { margin-right: 8px; padding: 7px 11px; display: inline-flex; align-items: center; gap: 7px; color: var(--green); background: rgba(255,255,255,.64); border: 1px solid var(--line); border-radius: 999px; font-size: .62rem; font-weight: 600; }
.live-status i { width: 7px; height: 7px; background: #42a67d; border-radius: 50%; box-shadow: 0 0 0 4px rgba(66,166,125,.12); }
.notification-button { position: relative; background: rgba(255,255,255,.65); border: 1px solid var(--line); }
.notification-button b { position: absolute; right: 8px; top: 7px; width: 6px; height: 6px; background: var(--coral); border: 1px solid white; border-radius: 50%; }
.mobile-menu { display: none; }
.content { padding: 32px 38px 52px; }
.content-width { max-width: 1460px; margin: 0 auto; }
.page-intro { margin-bottom: 25px; display: flex; align-items: end; justify-content: space-between; gap: 18px; }
.page-intro h2 { margin: 0 0 7px; color: var(--ink); font-family: "DM Serif Display", serif; font-size: 2rem; font-weight: 400; letter-spacing: -.025em; }
.page-intro p { margin: 0; color: var(--muted); font-size: .78rem; }
.page-actions { display: flex; gap: 9px; }

.welcome-band { position: relative; overflow: hidden; margin-bottom: 22px; padding: 30px 33px; display: flex; align-items: center; justify-content: space-between; gap: 24px; color: white; background: var(--ink); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.welcome-band::after { content: ""; position: absolute; width: 300px; height: 300px; right: -90px; top: -170px; border: 46px solid rgba(140,191,173,.10); border-radius: 50%; }
.welcome-band > div { position: relative; z-index: 1; }
.welcome-band .eyebrow { color: var(--mint); }
.welcome-band h2 { margin: 0 0 8px; font-family: "DM Serif Display", serif; font-size: 2.15rem; font-weight: 400; }
.welcome-band p:last-child { margin: 0; color: #c3d2ce; font-size: .76rem; }
.date-tile { min-width: 118px; padding: 15px 20px; display: grid; text-align: center; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.12); border-radius: 14px; }
.date-tile strong { color: var(--mint); font-family: "DM Serif Display", serif; font-size: 2rem; line-height: 1; }.date-tile span { margin-top: 4px; color: #c9d6d2; font-size: .63rem; }
.stats-grid { margin-bottom: 22px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.stat-card { padding: 20px; display: flex; align-items: center; gap: 15px; background: var(--paper); border: 1px solid rgba(23,62,55,.07); border-radius: 15px; box-shadow: 0 5px 20px rgba(23,62,55,.04); }
.stat-icon { width: 43px; height: 43px; display: grid; place-items: center; flex: none; color: var(--green); background: var(--mint-pale); border-radius: 12px; }
.stat-icon.coral { color: var(--coral); background: var(--coral-pale); }.stat-icon.gold { color: var(--gold); background: #f7edd9; }.stat-icon.ink { color: var(--ink); background: #e8eeec; }
.stat-icon svg { width: 20px; }
.stat-copy { display: grid; gap: 3px; }.stat-copy strong { color: var(--ink); font-family: "DM Serif Display", serif; font-size: 1.7rem; line-height: 1; }.stat-copy span { color: var(--muted); font-size: .65rem; }
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(290px, .55fr); gap: 18px; }
.panel { background: var(--paper); border: 1px solid rgba(23,62,55,.08); border-radius: var(--radius); box-shadow: 0 5px 20px rgba(23,62,55,.035); }
.panel-head { min-height: 65px; padding: 0 21px; display: flex; align-items: center; justify-content: space-between; gap: 14px; border-bottom: 1px solid var(--line); }
.panel-head h3 { margin: 0; color: var(--ink); font-size: .86rem; }.panel-head p { margin: 3px 0 0; color: var(--muted); font-size: .62rem; }
.text-link { padding: 6px; color: var(--green); background: transparent; border: 0; font-size: .68rem; font-weight: 600; cursor: pointer; }
.document-list { padding: 4px 8px; }
.document-row { width: 100%; min-height: 67px; padding: 10px 12px; display: grid; grid-template-columns: 39px minmax(150px, 1fr) minmax(130px, .55fr) 105px 36px; align-items: center; gap: 12px; text-align: left; background: transparent; border: 0; border-bottom: 1px solid #edf1ef; cursor: pointer; }
.document-row:last-child { border-bottom: 0; }.document-row:hover { background: #f6f9f7; border-radius: 10px; }
.file-icon { width: 37px; height: 39px; display: grid; place-items: center; color: var(--green); background: var(--mint-pale); border-radius: 9px; }.file-icon svg { width: 19px; }
.doc-title, .doc-company { min-width: 0; display: grid; gap: 4px; }.doc-title b, .doc-company b { overflow: hidden; color: var(--ink); font-size: .7rem; text-overflow: ellipsis; white-space: nowrap; }.doc-title span, .doc-company span { color: var(--muted); font-size: .59rem; }
.status { width: max-content; padding: 5px 8px; display: inline-flex; align-items: center; gap: 5px; border-radius: 999px; font-size: .58rem; font-weight: 600; }
.status::before { content: ""; width: 5px; height: 5px; border-radius: 50%; }.status-published { color: #23735e; background: #e2f2ed; }.status-published::before { background: #36a47e; }.status-draft { color: #9a6921; background: #f9efd9; }.status-draft::before { background: #d29b3f; }.status-paused { color: var(--danger); background: #f8e6e6; }.status-paused::before { background: var(--danger); }
.company-mini-list { padding: 11px; display: grid; gap: 4px; }
.company-mini { padding: 11px; display: flex; align-items: center; gap: 11px; border-radius: 11px; cursor: pointer; }.company-mini:hover { background: #f3f7f5; }
.company-mark { width: 38px; height: 38px; display: grid; place-items: center; flex: none; color: var(--ink); background: var(--mint-pale); border-radius: 10px; font-family: "DM Serif Display", serif; font-size: .8rem; }
.company-mini div { min-width: 0; display: grid; gap: 3px; flex: 1; }.company-mini b { overflow: hidden; color: var(--ink); font-size: .67rem; text-overflow: ellipsis; white-space: nowrap; }.company-mini span { color: var(--muted); font-size: .56rem; }
.company-mini > svg { width: 16px; height: 16px; flex: none; color: #81928d; }

.toolbar { margin-bottom: 18px; padding: 12px; display: flex; align-items: center; gap: 10px; background: rgba(255,253,248,.72); border: 1px solid var(--line); border-radius: 13px; }
.search-box { position: relative; min-width: 240px; max-width: 390px; flex: 1; }.search-box svg { position: absolute; left: 13px; top: 11px; width: 18px; color: #899792; }.search-box input { width: 100%; height: 41px; padding: 0 14px 0 41px; background: white; border: 1px solid var(--line); border-radius: 9px; outline: none; }.search-box input:focus { border-color: var(--green); }
.toolbar-spacer { flex: 1; }
.view-toggle { padding: 3px; display: flex; background: #e9efec; border-radius: 9px; }.view-toggle button { width: 34px; height: 32px; border: 0; border-radius: 7px; background: transparent; cursor: pointer; }.view-toggle button.active { background: white; box-shadow: 0 2px 8px rgba(23,62,55,.1); }.view-toggle svg { width: 16px; }
.company-grid { display: grid; grid-template-columns: repeat(3, minmax(250px, 1fr)); gap: 15px; }
.company-card { overflow: hidden; padding: 20px; background: var(--paper); border: 1px solid rgba(23,62,55,.08); border-radius: 15px; box-shadow: 0 5px 20px rgba(23,62,55,.035); transition: transform .18s, box-shadow .18s; cursor: pointer; }
.company-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-sm); }
.company-card-head { display: flex; align-items: flex-start; gap: 13px; }.company-card-head .company-mark { width: 45px; height: 45px; }.company-card-head > div:nth-child(2) { min-width: 0; flex: 1; }.company-card-head h3 { overflow: hidden; margin: 2px 0 5px; color: var(--ink); font-size: .83rem; text-overflow: ellipsis; white-space: nowrap; }.company-card-head p { margin: 0; color: var(--muted); font-size: .6rem; }.kebab { margin: -5px -6px 0 0; }
.company-card-meta { margin: 19px 0 15px; padding: 13px 0; display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }.company-card-meta div { display: grid; gap: 4px; }.company-card-meta div + div { padding-left: 15px; border-left: 1px solid var(--line); }.company-card-meta span { color: var(--muted); font-size: .56rem; }.company-card-meta b { color: var(--ink); font-size: .69rem; }
.company-card-foot { display: flex; align-items: center; justify-content: space-between; }.permission-dots { display: flex; gap: 5px; }.permission-dot { width: 25px; height: 25px; display: grid; place-items: center; color: #82938e; background: #edf2f0; border-radius: 7px; }.permission-dot.on { color: var(--green); background: var(--mint-pale); }.permission-dot svg { width: 13px; }
.folder-grid { display: grid; grid-template-columns: repeat(3, minmax(250px, 1fr)); gap: 14px; }
.folder-card { min-height: 112px; padding: 18px; display: flex; align-items: flex-start; gap: 14px; background: var(--paper); border: 1px solid var(--line); border-radius: 15px; box-shadow: 0 6px 22px rgba(23,62,55,.04); cursor: pointer; transition: transform .18s, box-shadow .18s; }
.folder-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.folder-icon { width: 46px; height: 42px; display: grid; place-items: center; flex: none; color: #9a6921; background: #f8edd5; border-radius: 11px; }
.folder-icon svg { width: 23px; }
.folder-icon.large { width: 54px; height: 54px; border-radius: 14px; }
.folder-copy { min-width: 0; display: grid; gap: 6px; flex: 1; }
.folder-copy h3 { overflow: hidden; margin: 1px 0 0; color: var(--ink); font-size: .82rem; text-overflow: ellipsis; white-space: nowrap; }
.folder-copy p { margin: 0; color: var(--muted); font-size: .59rem; }
.folder-copy .permission-tags { margin-top: 3px; }
.folder-menu { margin: -5px -6px 0 0; flex: none; }
.folder-card > svg { width: 16px; align-self: center; color: var(--muted); }
.folder-permission-head { padding: 13px 14px; display: flex; align-items: center; gap: 12px; background: var(--mint-pale); border-radius: 11px; }
.folder-permission-head > div { display: grid; gap: 3px; flex: 1; }
.folder-permission-head b { color: var(--ink); font-size: .72rem; }
.folder-permission-head span { color: var(--muted); font-size: .58rem; line-height: 1.5; }
.folder-permission-row { padding: 14px; display: grid; gap: 12px; background: white; border: 1px solid var(--line); border-radius: 12px; }
.folder-permission-title { min-width: 0; display: flex; align-items: center; gap: 10px; }
.folder-permission-title > svg { width: 21px; color: #9a6921; flex: none; }
.folder-permission-title > div { min-width: 0; display: grid; gap: 3px; }
.folder-permission-title b { overflow: hidden; color: var(--ink); font-size: .72rem; text-overflow: ellipsis; white-space: nowrap; }
.folder-permission-title span { color: var(--muted); font-size: .57rem; }
.permission-checklist { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.permission-check-option { position: relative; min-height: 42px; padding: 8px 36px 8px 10px; display: flex; align-items: center; gap: 8px; color: var(--text); background: #f7f9f8; border: 1px solid #e1e8e5; border-radius: 9px; cursor: pointer; }
.permission-check-option > svg { width: 16px; color: var(--green); flex: none; }
.permission-check-option > span { font-size: .59rem; line-height: 1.35; }
.permission-check-option input { position: absolute; opacity: 0; pointer-events: none; }
.permission-check-option > i { position: absolute; right: 10px; width: 18px; height: 18px; background: white; border: 1px solid #b8c8c2; border-radius: 5px; }
.permission-check-option > i::after { content: ""; position: absolute; left: 5px; top: 2px; width: 5px; height: 9px; border: solid white; border-width: 0 2px 2px 0; transform: rotate(45deg); opacity: 0; }
.permission-check-option:has(input:checked) { color: var(--ink); background: #eaf4f0; border-color: #a7cbbf; }
.permission-check-option input:checked + i { background: var(--green); border-color: var(--green); }
.permission-check-option input:checked + i::after { opacity: 1; }
.company-access-head { margin-bottom: 13px; padding: 13px 14px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(220px, 300px); align-items: center; gap: 14px; background: var(--mint-pale); border-radius: 11px; }
.company-access-head > div { display: grid; gap: 3px; }
.company-access-head b { color: var(--ink); font-size: .72rem; }
.company-access-head span { color: var(--muted); font-size: .58rem; line-height: 1.5; }
.company-access-head .search-box { width: 100%; min-width: 0; background: white; }
.company-access-list { display: grid; gap: 8px; }
.company-access-user { width: 100%; min-height: 68px; padding: 10px 13px; display: grid; grid-template-columns: 38px minmax(150px, 1.2fr) minmax(110px, .65fr) minmax(155px, .9fr) auto; align-items: center; gap: 11px; color: var(--text); text-align: left; background: white; border: 1px solid var(--line); border-radius: 11px; cursor: pointer; transition: border-color .16s, box-shadow .16s, transform .16s; }
.company-access-user:hover { border-color: #a7cbbf; box-shadow: 0 7px 20px rgba(23,62,55,.07); transform: translateY(-1px); }
.company-access-user .avatar { width: 38px; height: 38px; }
.company-access-copy { min-width: 0; display: grid; gap: 3px; }
.company-access-copy b, .company-access-copy small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.company-access-copy b { color: var(--ink); font-size: .7rem; }
.company-access-copy small { color: var(--muted); font-size: .57rem; }
.company-access-role { color: var(--text); font-size: .6rem; font-weight: 600; }
.company-access-scope { color: #87938f; font-size: .58rem; }
.company-access-scope.granted { color: var(--green); font-weight: 600; }
.company-access-open { display: inline-flex; align-items: center; gap: 4px; color: var(--green); font-size: .58rem; font-weight: 700; white-space: nowrap; }
.company-access-open svg { width: 14px; }
.company-access-empty { min-height: 210px; }
.table-panel { overflow: hidden; background: var(--paper); border: 1px solid rgba(23,62,55,.08); border-radius: 15px; }
.data-table { width: 100%; border-collapse: collapse; }.data-table th { height: 42px; padding: 0 15px; color: #82918d; background: #f4f7f5; text-align: left; font-size: .59rem; font-weight: 700; letter-spacing: .06em; }.data-table td { height: 64px; padding: 10px 15px; border-top: 1px solid var(--line); font-size: .67rem; }.data-table tr:hover td { background: #fbfcfb; }.cell-main { display: flex; align-items: center; gap: 11px; }.cell-main div { min-width: 0; display: grid; gap: 3px; }.cell-main b { color: var(--ink); }.cell-main span { color: var(--muted); font-size: .58rem; }
.table-actions { display: flex; justify-content: flex-end; gap: 4px; }.table-actions .icon-button { width: 32px; height: 32px; }.table-actions svg { width: 16px; }
.table-actions .fast-open-action { color: #9a6921; background: #fbf2df; }
.table-actions .fast-open-action:hover { color: white; background: #9a6921; }
.editing-now { width: max-content; margin-top: 2px; padding: 3px 7px; display: inline-flex !important; align-items: center; gap: 5px; color: #147052 !important; background: #e1f3eb; border-radius: 999px; font-size: .53rem !important; font-weight: 650; }
.editing-now i, .live-dot { width: 7px; height: 7px; background: #35a576; border-radius: 50%; box-shadow: 0 0 0 3px rgba(53,165,118,.13); }
.permission-tags { display: flex; flex-wrap: wrap; gap: 5px; }.permission-tag { padding: 4px 7px; color: var(--green); background: #e6f1ed; border-radius: 6px; font-size: .54rem; font-weight: 600; }.permission-tag.off { color: #87938f; background: #eff2f1; text-decoration: line-through; }
.breadcrumb { margin-bottom: 16px; display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: .65rem; }.breadcrumb button { padding: 0; color: var(--green); background: none; border: 0; cursor: pointer; }.breadcrumb svg { width: 14px; }
.company-hero { margin-bottom: 18px; padding: 22px; display: flex; align-items: center; gap: 15px; background: var(--paper); border: 1px solid var(--line); border-radius: 15px; }.company-hero .company-mark { width: 54px; height: 54px; font-size: 1rem; }.company-hero > div:nth-child(2) { flex: 1; }.company-hero h2 { margin: 0 0 6px; color: var(--ink); font-family: "DM Serif Display", serif; font-size: 1.55rem; font-weight: 400; }.company-hero p { margin: 0; color: var(--muted); font-size: .65rem; }.company-hero-actions { display: flex; gap: 8px; }
.empty-state { min-height: 300px; padding: 50px 20px; display: grid; place-items: center; text-align: center; background: var(--paper); border: 1px dashed #cbd7d2; border-radius: var(--radius); }.empty-state-icon { width: 62px; height: 62px; display: grid; place-items: center; color: var(--green); background: var(--mint-pale); border-radius: 18px; }.empty-state-icon svg { width: 28px; }.empty-state h3 { margin: 18px 0 7px; color: var(--ink); font-family: "DM Serif Display", serif; font-size: 1.35rem; font-weight: 400; }.empty-state p { max-width: 440px; margin: 0 0 17px; color: var(--muted); font-size: .68rem; line-height: 1.7; }

.modal-backdrop { position: fixed; z-index: 100; inset: 0; padding: 24px; display: grid; place-items: center; background: rgba(12,31,27,.58); backdrop-filter: blur(4px); animation: fade .18s ease-out; }
.modal { width: min(100%, 560px); max-height: calc(100vh - 48px); overflow: auto; background: var(--paper); border-radius: 18px; box-shadow: 0 30px 80px rgba(7,25,21,.3); animation: rise .22s ease-out; }
.modal-large { width: min(100%, 820px); }.modal-head { min-height: 72px; padding: 0 23px; display: flex; align-items: center; gap: 14px; border-bottom: 1px solid var(--line); }.modal-head > div { flex: 1; }.modal-head h2 { margin: 0 0 4px; color: var(--ink); font-family: "DM Serif Display", serif; font-size: 1.4rem; font-weight: 400; }.modal-head p { margin: 0; color: var(--muted); font-size: .62rem; }.modal-body { padding: 23px; }.modal-foot { padding: 16px 23px; display: flex; justify-content: flex-end; gap: 9px; background: #f4f6f4; border-top: 1px solid var(--line); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 15px; }.form-grid .field-full { grid-column: 1 / -1; }.field textarea { min-height: 90px; padding-top: 12px; resize: vertical; }
.upload-dropzone { min-height: 180px; padding: 27px; display: grid; place-items: center; text-align: center; border: 1.5px dashed #b9ccc5; border-radius: 13px; background: #f5f9f7; cursor: pointer; }.upload-dropzone:hover { border-color: var(--green); background: #eff6f3; }.upload-dropzone input { position: absolute; opacity: 0; pointer-events: none; }.upload-dropzone .upload-icon { width: 51px; height: 51px; display: grid; place-items: center; color: var(--green); background: var(--mint-pale); border-radius: 14px; }.upload-dropzone svg { width: 24px; }.upload-dropzone b { display: block; margin: 13px 0 5px; color: var(--ink); font-size: .76rem; }.upload-dropzone span { color: var(--muted); font-size: .62rem; }.upload-dropzone.has-file { border-style: solid; border-color: var(--green); }
.permission-editor { display: grid; gap: 10px; }.permission-row { min-height: 50px; padding: 9px 12px; display: flex; align-items: center; gap: 11px; background: white; border: 1px solid var(--line); border-radius: 10px; }.permission-row > svg { width: 18px; color: var(--green); }.permission-row div { display: grid; gap: 2px; flex: 1; }.permission-row b { font-size: .69rem; }.permission-row span { color: var(--muted); font-size: .57rem; }.switch { position: relative; width: 38px; height: 22px; }.switch input { opacity: 0; width: 0; height: 0; }.switch i { position: absolute; inset: 0; background: #ced8d4; border-radius: 20px; cursor: pointer; transition: .2s; }.switch i::before { content: ""; position: absolute; width: 16px; height: 16px; left: 3px; top: 3px; background: white; border-radius: 50%; box-shadow: 0 2px 5px rgba(0,0,0,.15); transition: .2s; }.switch input:checked + i { background: var(--green); }.switch input:checked + i::before { transform: translateX(16px); }
.confirm-copy { color: var(--muted); line-height: 1.7; }.confirm-copy strong { color: var(--ink); }
.live-editing-panel { margin-bottom: 18px; }
.live-editor-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.live-editor-card { padding: 13px; display: flex; align-items: center; gap: 11px; background: #f7faf8; border: 1px solid var(--line); border-radius: 11px; }
.live-editor-card > div { min-width: 0; display: grid; gap: 3px; flex: 1; }
.live-editor-card b, .live-editor-card span, .live-editor-card small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.live-editor-card b { color: var(--ink); font-size: .7rem; }
.live-editor-card span { color: var(--text); font-size: .62rem; }
.live-editor-card small { color: var(--muted); font-size: .55rem; }
.live-dot { flex: none; }
.live-empty { min-height: 76px; display: flex; align-items: center; justify-content: center; gap: 11px; color: var(--muted); text-align: left; }
.live-empty > svg { width: 25px; color: var(--green); }
.live-empty > div { display: grid; gap: 3px; }
.live-empty b { color: var(--ink); font-size: .7rem; }
.live-empty span { font-size: .58rem; }

.editor-shell { position: fixed; z-index: 110; inset: 0; display: flex; flex-direction: column; background: #e8eeeb; }
.editor-topbar { height: 62px; padding: 0 15px; display: flex; align-items: center; gap: 12px; color: white; background: var(--ink); }.editor-topbar .icon-button { color: white; background: rgba(255,255,255,.08); }.editor-topbar-title { min-width: 0; display: grid; gap: 2px; flex: 1; }.editor-topbar-title b, .editor-topbar-title span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }.editor-topbar-title b { font-size: .76rem; }.editor-topbar-title span { color: #a9c0ba; font-size: .58rem; }.editor-badge { padding: 5px 9px; color: var(--ink); background: var(--mint); border-radius: 999px; font-size: .56rem; font-weight: 700; }.editor-frame { min-height: 0; flex: 1; }.editor-frame > div { width: 100%; height: 100%; }.editor-loading { height: 100%; display: grid; place-items: center; }.editor-loading div { text-align: center; }.spinner { width: 34px; height: 34px; margin: 0 auto 12px; border: 3px solid #c8d5d1; border-top-color: var(--green); border-radius: 50%; animation: spin .8s linear infinite; }.editor-loading p { color: var(--muted); font-size: .7rem; }
.editor-badge.editor-badge-fast { color: #5c3b0c; background: #f5cc79; }
.toast-root { position: fixed; z-index: 300; right: 20px; top: 20px; display: grid; gap: 9px; }.toast { min-width: 280px; max-width: 420px; padding: 13px 15px; display: flex; align-items: flex-start; gap: 10px; color: var(--ink); background: white; border: 1px solid var(--line); border-left: 4px solid var(--green); border-radius: 11px; box-shadow: var(--shadow); animation: slide .25s ease-out; }.toast.error { border-left-color: var(--danger); }.toast svg { width: 18px; color: var(--green); flex: none; }.toast.error svg { color: var(--danger); }.toast div { display: grid; gap: 3px; }.toast b { font-size: .7rem; }.toast span { color: var(--muted); font-size: .61rem; line-height: 1.45; }
.skeleton { position: relative; overflow: hidden; min-height: 80px; background: #e7ecea; border-radius: 13px; }.skeleton::after { content: ""; position: absolute; inset: 0; transform: translateX(-100%); background: linear-gradient(90deg, transparent, rgba(255,255,255,.7), transparent); animation: shimmer 1.4s infinite; }

@keyframes spin { to { transform: rotate(360deg); } } @keyframes fade { from { opacity: 0; } } @keyframes rise { from { opacity: 0; transform: translateY(12px) scale(.985); } } @keyframes slide { from { opacity: 0; transform: translateX(20px); } } @keyframes shimmer { 100% { transform: translateX(100%); } }

@media (max-width: 1120px) { .stats-grid { grid-template-columns: repeat(2, 1fr); }.company-grid, .folder-grid { grid-template-columns: repeat(2, 1fr); }.dashboard-grid { grid-template-columns: 1fr; } }
@media (max-width: 860px) {
  .login-view { grid-template-columns: 1fr; }.login-brand-panel { display: none; }.login-form-panel { min-height: 100vh; padding: 30px 22px; }.login-mobile-brand { margin-bottom: 56px; display: flex; align-items: center; gap: 10px; color: var(--ink); }.login-mobile-brand img { width: 38px; }
  .sidebar { transform: translateX(-100%); transition: transform .22s; box-shadow: 18px 0 50px rgba(15,42,36,.18); }.sidebar.open { transform: translateX(0); }.sidebar-overlay { position: fixed; z-index: 19; inset: 0; display: none; background: rgba(16,38,33,.4); }.sidebar-overlay.open { display: block; }.workspace { margin-left: 0; }.mobile-menu { display: inline-grid; }.topbar { padding: 0 19px; }.content { padding: 24px 19px 42px; }.live-status { display: none; }.company-grid { grid-template-columns: 1fr 1fr; }
  .data-table { min-width: 760px; }.table-panel { overflow-x: auto; }
}
@media (max-width: 620px) {
  html { font-size: 14px; }.topbar { height: 76px; }.topbar .avatar { display: none; }.topbar h1 { font-size: 1.38rem; }.content { padding: 19px 14px 36px; }.page-intro { align-items: flex-start; flex-direction: column; }.page-actions { width: 100%; }.page-actions .button { flex: 1; }.welcome-band { padding: 24px 22px; }.welcome-band h2 { font-size: 1.7rem; }.date-tile { display: none; }.stats-grid { grid-template-columns: 1fr 1fr; gap: 9px; }.stat-card { padding: 14px; gap: 10px; }.stat-icon { width: 37px; height: 37px; }.stat-copy strong { font-size: 1.45rem; }.company-grid, .folder-grid { grid-template-columns: 1fr; }.toolbar { align-items: stretch; flex-wrap: wrap; }.search-box { min-width: 100%; }.view-toggle { display: none; }.document-row { grid-template-columns: 38px minmax(0,1fr) 90px 28px; }.document-row .doc-company { display: none; }.company-hero { align-items: flex-start; flex-wrap: wrap; }.company-hero-actions { width: 100%; }.form-grid { grid-template-columns: 1fr; }.form-grid .field-full { grid-column: auto; }.modal-backdrop { padding: 10px; }.modal { max-height: calc(100vh - 20px); }.modal-foot .button { flex: 1; }.toast-root { left: 12px; right: 12px; top: 12px; }.toast { min-width: 0; max-width: none; }.editor-topbar .button span { display: none; }
}

/* 1.1 — responsive polish and more comfortable data density */
body { min-width: 0; overflow-x: hidden; line-height: 1.5; }
.workspace, .content, .content-width { min-width: 0; }
.content-width { width: 100%; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid rgba(39,122,104,.24);
  outline-offset: 2px;
}
.button, .icon-button, .nav-item, .company-card { -webkit-tap-highlight-color: transparent; }
.table-panel { box-shadow: 0 7px 24px rgba(23,62,55,.045); }
.data-table th { white-space: nowrap; }
.data-table td { vertical-align: middle; font-size: .72rem; line-height: 1.45; }
.cell-main b { line-height: 1.35; }
.cell-main span { line-height: 1.4; }
.table-actions { align-items: center; }
.table-actions .icon-button { width: 36px; height: 36px; }
.action-button .action-label { display: none; }
.table-actions .formula-action { width: auto; min-width: 142px; padding: 0 13px; display: inline-flex; gap: 7px; color: white; background: var(--green); border-radius: 9px; }
.table-actions .formula-action:hover { background: var(--ink); }
.table-actions .formula-action .action-label { display: inline; font-size: .62rem; font-weight: 700; white-space: nowrap; }
.filter-select { min-height: 42px; padding: 0 12px; display: inline-flex; align-items: center; gap: 8px; color: var(--text); background: var(--white); border: 1px solid var(--line); border-radius: 10px; }
.filter-select svg { width: 17px; color: var(--green); }
.filter-select select { min-width: 150px; color: inherit; background: transparent; border: 0; outline: 0; cursor: pointer; }
.company-grid.list { grid-template-columns: 1fr; }
.company-grid.list .company-card { padding: 18px 20px; }
.company-grid.list .company-card-meta { margin: 15px 0 12px; grid-template-columns: repeat(2, minmax(0, 220px)); }
.editor-shell { min-height: 100vh; min-height: 100dvh; }
.editor-topbar { height: 54px; min-height: 54px; }
.editor-topbar .icon-button { width: 38px; height: 38px; }
.editor-loading { padding: 24px; }
.editor-loading p { margin: 0; color: var(--ink); font-size: .76rem; font-weight: 600; }
.editor-loading small { display: block; max-width: 420px; margin-top: 6px; color: var(--muted); font-size: .63rem; line-height: 1.55; }

@media (max-width: 1024px) {
  .sidebar { transform: translateX(-100%); transition: transform .22s; box-shadow: 18px 0 50px rgba(15,42,36,.18); }
  .sidebar.open { transform: translateX(0); }
  .sidebar-overlay { position: fixed; z-index: 19; inset: 0; display: none; background: rgba(16,38,33,.4); }
  .sidebar-overlay.open { display: block; }
  .workspace { margin-left: 0; }
  .mobile-menu { display: inline-grid; }
  .topbar { padding-inline: 24px; }
  .content { padding: 28px 24px 44px; }
}

@media (max-width: 820px) {
  .topbar { height: 72px; padding-inline: 14px; gap: 10px; }
  .topbar h1 { max-width: 220px; overflow: hidden; font-size: 1.28rem; text-overflow: ellipsis; white-space: nowrap; }
  .topbar-kicker { margin-bottom: 1px; }
  .topbar-actions { gap: 6px; }
  .content { padding: 18px 14px 32px; }
  .page-intro { margin-bottom: 18px; }
  .page-intro h2 { font-size: 1.65rem; }
  .toolbar { margin-bottom: 14px; padding: 10px; }
  .toolbar .search-box { max-width: none; }
  .filter-select { width: 100%; }
  .filter-select select { width: 100%; min-width: 0; }
  .company-hero { padding: 18px; display: grid; grid-template-columns: 54px minmax(0, 1fr); gap: 13px; }
  .company-hero > div:nth-child(2) { min-width: 0; }
  .company-hero h2 { font-size: 1.38rem; }
  .company-hero p { overflow-wrap: anywhere; line-height: 1.55; }
  .company-hero-actions { grid-column: 1 / -1; }
  .company-hero-actions .button { width: 100%; }
  .breadcrumb { margin-bottom: 13px; overflow: hidden; white-space: nowrap; }
  .breadcrumb span { overflow: hidden; text-overflow: ellipsis; }

  .table-panel { overflow: visible; background: transparent; border: 0; border-radius: 0; box-shadow: none; }
  .data-table { min-width: 0; display: block; }
  .data-table thead { display: none; }
  .data-table tbody { display: grid; gap: 12px; }
  .data-table tr { overflow: hidden; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); background: var(--paper); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 7px 22px rgba(23,62,55,.05); }
  .data-table td { min-width: 0; height: auto; padding: 10px 14px; display: grid; align-content: center; gap: 4px; border: 0; }
  .data-table td::before { content: attr(data-label); color: #87958f; font-size: .56rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; }
  .data-table td:first-child { grid-column: 1 / -1; padding-top: 15px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
  .data-table td:last-child { grid-column: 1 / -1; padding: 9px 12px; background: #f6f8f7; border-top: 1px solid var(--line); }
  .data-table td:last-child::before { display: none; }
  .cell-main { min-width: 0; }
  .cell-main div { min-width: 0; }
  .cell-main b, .cell-main span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .table-actions { justify-content: flex-start; gap: 7px; }
  .table-actions .action-button { width: auto; min-width: 44px; padding: 0 11px; display: inline-flex; gap: 7px; background: white; border: 1px solid var(--line); }
  .table-actions .action-button.danger { color: var(--danger); }
  .table-actions .formula-action { color: white; background: var(--green); border-color: var(--green); }
  .action-button .action-label { display: inline; font-size: .64rem; font-weight: 600; }
  .users-table td:first-child, .activity-table td:first-child { grid-column: auto; border-bottom: 0; }
  .users-table td:last-child, .activity-table td:last-child { grid-column: 1 / -1; }
  .activity-table td:last-child::before { display: block; }
  .activity-table td:nth-child(2) { padding-top: 15px; }
  .activity-table td:nth-child(5) { min-height: 56px; }
  .modal-backdrop { align-items: end; padding: 0; }
  .modal { width: 100%; max-height: min(92vh, 92dvh); border-radius: 20px 20px 0 0; }
  .modal-head { min-height: 68px; padding-inline: 18px; }
  .modal-body { padding: 20px 18px; }
  .modal-foot { position: sticky; bottom: 0; padding: 13px 18px max(13px, env(safe-area-inset-bottom)); }
  .permission-row { min-height: 58px; }
  .folder-permission-head { align-items: stretch; flex-direction: column; }
  .permission-checklist { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .company-access-head { grid-template-columns: 1fr; }
  .company-access-user { grid-template-columns: 38px minmax(0, 1fr) auto; }
  .company-access-role { text-align: right; }
  .company-access-scope { grid-column: 2 / -1; }
  .company-access-open { grid-column: 2 / -1; }
  .live-editor-grid { grid-template-columns: 1fr; }
  .editor-topbar { height: 48px; min-height: 48px; padding-inline: 8px; gap: 8px; }
  .editor-topbar .icon-button { width: 36px; height: 36px; }
  .editor-topbar-title b { font-size: .68rem; }
  .editor-topbar-title span { display: none; }
  .editor-badge { padding: 4px 7px; }
}

@media (max-width: 430px) {
  .stats-grid { grid-template-columns: 1fr; }
  .stat-card { min-height: 72px; }
  .page-actions { flex-direction: column; }
  .modal-foot { flex-wrap: wrap; }
  .permission-checklist { grid-template-columns: 1fr; }
  .company-hero-actions { flex-direction: column; }
}

/* 1.5 — company master/detail workbench (Product Design option 2) */
.company-hero-actions { flex-wrap: wrap; justify-content: flex-end; }
.ui-icon {
  width: 1em;
  height: 1em;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  font-family: "Material Symbols Rounded";
  font-size: 20px;
  font-style: normal;
  font-weight: 400;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  font-feature-settings: "liga";
  -webkit-font-feature-settings: "liga";
  -webkit-font-smoothing: antialiased;
}
.button > .ui-icon { font-size: 18px; }
.icon-button > .ui-icon { font-size: 20px; }
.nav-item > .ui-icon { color: inherit; font-size: 21px; }
.permission-dot .ui-icon { font-size: 14px; }
.table-actions .ui-icon { font-size: 17px; }
.permission-row > .ui-icon { color: var(--green); font-size: 18px; }
.empty-state-icon > .ui-icon { font-size: 28px; }
.company-access-open .ui-icon, .breadcrumb .ui-icon { font-size: 14px; }
.toast > .ui-icon { color: var(--green); font-size: 18px; }
.toast.error > .ui-icon { color: var(--danger); }

:root { --sidebar: 280px; }
.sidebar { padding: 35px 14px 25px; background: #fffefa; }
.sidebar .brand { margin: 0 13px; font-size: 1.03rem; }
.sidebar .brand img { width: 54px; height: 54px; }
.main-nav { margin-top: 64px; gap: 8px; }
.nav-section-label { display: none; }
.nav-item { position: relative; height: 57px; padding: 0 16px; gap: 15px; border-radius: 12px; color: #365f56; font-size: .81rem; }
.nav-item.active::before { position: absolute; left: -14px; width: 4px; height: 36px; margin: 0; border-radius: 0 5px 5px 0; background: #2f8e7a; }
.privacy-card { display: none; }
.sidebar-foot { gap: 0; }
.user-menu { padding: 22px 12px 0; }
.user-menu .avatar { color: white; background: var(--ink); }

.companies-workbench-active .topbar {
  height: 116px;
  padding: 0 70px 0 36px;
  border-bottom: 0;
  background: #faf8f2;
  backdrop-filter: none;
}
.companies-workbench-active .topbar-kicker { display: none; }
.companies-workbench-active .topbar h1 { font-size: 2.25rem; }
.companies-workbench-active .topbar-actions > :not(.companies-top-add) { display: none; }
.companies-top-add { min-height: 53px; padding-inline: 24px; border-radius: 12px; }
.companies-workbench-active .content { padding: 0 68px 4px 10px; }
.companies-workbench-active .content-width { max-width: none; }

.companies-workbench {
  height: calc(100vh - 120px);
  min-height: 660px;
  overflow: hidden;
  display: grid;
  grid-template-columns: 342px minmax(0, 1fr);
  border: 1px solid #dee4e1;
  border-radius: 18px;
  background: white;
  box-shadow: 0 10px 34px rgba(31,65,54,.07);
}
.company-index-panel { min-width: 0; border-right: 1px solid var(--line); background: white; }
.company-index-search { height: 80px; padding: 0 17px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 11px; color: #758681; }
.company-index-search > .ui-icon { font-size: 20px; }
.company-index-search input { width: 100%; min-width: 0; height: 43px; padding: 0 12px; border: 1px solid #d9dfdc; border-radius: 9px; outline: none; color: var(--ink); background: white; font-size: .72rem; }
.company-index-search input:focus { border-color: #66a393; box-shadow: 0 0 0 3px rgba(50,143,122,.1); }
.company-index-search input::placeholder { color: #919b98; }
.company-index-row { position: relative; width: 100%; height: 104px; padding: 0 28px 0 16px; border: 0; border-bottom: 1px solid var(--line); background: white; display: grid; grid-template-columns: 46px minmax(0,1fr) 34px; align-items: center; gap: 14px; text-align: left; cursor: pointer; }
.company-index-row:hover { background: #f6faf8; }
.company-index-row.selected { background: linear-gradient(90deg,#e7f2ee,#e2efeb); }
.company-index-row.selected::before { content: ""; position: absolute; left: 0; width: 4px; height: 58px; border-radius: 0 5px 5px 0; background: #278674; }
.company-index-row .company-mark { width: 45px; height: 45px; border-radius: 11px; background: #e3f0ec; color: #345f55; font-family: "DM Serif Display", serif; font-size: .9rem; }
.company-index-copy { min-width: 0; display: grid; gap: 6px; }
.company-index-copy b { overflow: hidden; color: #274c43; font-size: .71rem; line-height: 1.3; text-overflow: ellipsis; white-space: nowrap; }
.company-index-copy small { overflow: hidden; color: #7e8c87; font-size: .53rem; text-overflow: ellipsis; white-space: nowrap; }
.company-file-count { display: grid; justify-items: center; gap: 3px; color: #254a41; }
.company-file-count b { font-size: .8rem; font-weight: 600; }
.company-file-count small { font-size: .47rem; white-space: nowrap; }
.company-index-empty { padding: 35px 20px; color: var(--muted); font-size: .69rem; text-align: center; }

.company-workbench-detail { min-width: 0; padding: 48px 38px; background: white; }
.workbench-loading, .company-workbench-empty { height: 100%; display: grid; place-content: center; justify-items: center; color: var(--muted); text-align: center; }
.workbench-loading p { margin: 0; font-size: .72rem; }
.company-workbench-empty > span { width: 62px; height: 62px; border-radius: 18px; background: var(--mint-pale); display: grid; place-items: center; color: var(--green); }
.company-workbench-empty > span .ui-icon { font-size: 30px; }
.company-workbench-empty h3 { margin: 17px 0 7px; color: var(--ink); font-family: "DM Serif Display",serif; font-size: 1.4rem; font-weight: 400; }
.company-workbench-empty p { margin: 0; font-size: .68rem; }
.company-workbench-hero { display: flex; align-items: flex-start; gap: 28px; }
.company-workbench-mark { width: 92px; height: 92px; border-radius: 16px; background: #e3f0ec; color: #345f55; font-family: "DM Serif Display",serif; font-size: 1.45rem; }
.company-workbench-hero > div { min-width: 0; }
.company-workbench-hero h2 { margin: 6px 0 12px; color: var(--ink); font-size: clamp(1.35rem,2vw,1.75rem); line-height: 1.15; letter-spacing: -.02em; }
.company-workbench-hero p { margin: 0; display: flex; align-items: center; gap: 10px; color: #6f7d79; font-size: .68rem; }
.company-workbench-hero p i { width: 3px; height: 3px; border-radius: 50%; background: #7f8e89; }
.company-workbench-hero .status { margin-top: 17px; padding: 8px 12px; border-radius: 7px; }
.company-workbench-metrics { margin-top: 39px; padding: 39px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); display: grid; grid-template-columns: repeat(3,1fr); }
.company-workbench-metrics article { min-width: 0; padding: 0 31px; border-right: 1px solid #d7dfdb; display: flex; align-items: center; gap: 20px; color: #5e6865; }
.company-workbench-metrics article:first-child { padding-left: 0; }
.company-workbench-metrics article:last-child { border-right: 0; }
.company-workbench-metrics article > .ui-icon { font-size: 35px; }
.company-workbench-metrics article > div { min-width: 0; display: grid; gap: 7px; }
.company-workbench-metrics span { color: #707c78; font-size: .64rem; }
.company-workbench-metrics b { overflow: hidden; color: #1d463d; font-size: .83rem; text-overflow: ellipsis; white-space: nowrap; }
.company-workbench-folders { margin-top: 31px; }
.company-workbench-section-head { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.company-workbench-section-head h3 { margin: 0; color: var(--ink); font-size: .96rem; }
.company-workbench-section-head > div { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 9px; }
.company-workbench-section-head .button { min-width: 126px; }
.company-folder-table { margin-top: 16px; border: 1px solid var(--line); }
.company-folder-table-head { min-height: 49px; padding: 0 17px; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 1fr 90px 42px; align-items: center; color: #72807b; font-size: .58rem; }
.company-folder-table-head span:nth-child(2) { text-align: center; }
.company-folder-table-head span:last-child { overflow: hidden; width: 1px; height: 1px; white-space: nowrap; }
.company-folder-row { width: 100%; min-height: 61px; padding: 0 12px 0 17px; border: 0; border-bottom: 1px solid var(--line); background: white; display: grid; grid-template-columns: 1fr 90px 42px; align-items: center; cursor: pointer; text-align: left; }
.company-folder-row:last-child { border-bottom: 0; }
.company-folder-row:hover { background: #f4f9f7; }
.company-folder-row > span { display: flex; align-items: center; gap: 12px; color: #284e44; }
.company-folder-row > span .ui-icon { font-size: 22px; font-variation-settings: "FILL" 1; }
.company-folder-row b { font-size: .67rem; }
.company-folder-row > b { text-align: center; }
.company-folder-delete { width: 34px; height: 34px; padding: 0; border: 0; border-radius: 9px; display: grid; place-items: center; color: #ad4a4a; background: #faeeee; cursor: pointer; }
.company-folder-delete:hover { color: white; background: #b74747; }
.company-folder-delete .ui-icon { font-size: 18px; }
.company-workbench-no-folder { margin-top: 16px; min-height: 106px; padding: 18px; border: 1px dashed #cedbd5; display: flex; align-items: center; gap: 14px; background: #fbfdfc; }
.company-workbench-no-folder > span { width: 44px; height: 44px; border-radius: 11px; background: #ecf3f0; color: #638078; display: grid; place-items: center; }
.company-workbench-no-folder > span .ui-icon { font-size: 24px; }
.company-workbench-no-folder > div { min-width: 0; flex: 1; }
.company-workbench-no-folder b { font-size: .72rem; }
.company-workbench-no-folder p { margin: 5px 0 0; color: #86948f; font-size: .58rem; }

@media (max-width: 1200px) {
  .companies-workbench-active .topbar { padding-right: 36px; }
  .companies-workbench-active .content { padding-right: 34px; }
  .companies-workbench { grid-template-columns: 300px minmax(0,1fr); }
  .company-workbench-detail { padding-inline: 28px; }
  .company-workbench-mark { width: 72px; height: 72px; }
  .company-workbench-metrics article { padding-inline: 18px; gap: 13px; }
  .company-workbench-section-head .button { min-width: 112px; }
}

@media (max-width: 1024px) {
  .companies-workbench-active .topbar { height: 90px; padding: 0 22px; }
  .companies-workbench-active .topbar h1 { font-size: 1.8rem; }
  .companies-workbench-active .content { padding: 0 14px 24px; }
  .companies-workbench { height: auto; min-height: 0; grid-template-columns: 1fr; }
  .company-index-panel { border-right: 0; border-bottom: 1px solid var(--line); }
  .company-index-list { display: flex; overflow-x: auto; scrollbar-width: none; }
  .company-index-list::-webkit-scrollbar { display: none; }
  .company-index-row { min-width: 270px; height: 82px; border-right: 1px solid var(--line); }
  .company-workbench-detail { min-height: 580px; padding: 28px 24px; }
}

@media (max-width: 620px) {
  .companies-workbench-active .topbar { padding-inline: 12px; gap: 11px; }
  .companies-workbench-active .topbar h1 { max-width: none; flex: 1; font-size: 1.55rem; }
  .companies-top-add { width: 43px; min-width: 43px; height: 43px; min-height: 43px; padding: 0; font-size: 0; }
  .company-workbench-detail { padding: 24px 17px; }
  .company-workbench-hero { gap: 15px; }
  .company-workbench-mark { width: 58px; height: 58px; border-radius: 13px; }
  .company-workbench-hero h2 { margin-top: 2px; font-size: 1.17rem; }
  .company-workbench-hero p { display: block; font-size: .57rem; }
  .company-workbench-hero p i { display: none; }
  .company-workbench-hero .status { margin-top: 11px; }
  .company-workbench-metrics { padding: 18px 0; grid-template-columns: 1fr; }
  .company-workbench-metrics article, .company-workbench-metrics article:first-child { padding: 13px 4px; border-right: 0; border-bottom: 1px solid var(--line); }
  .company-workbench-metrics article:last-child { border-bottom: 0; }
  .company-workbench-section-head { align-items: flex-start; flex-direction: column; }
  .company-workbench-section-head > div { width: 100%; }
  .company-workbench-section-head .button { min-width: 0; flex: 1; }
  .company-folder-table-head, .company-folder-row { grid-template-columns: 1fr 58px 38px; }
  .company-workbench-no-folder { align-items: flex-start; flex-wrap: wrap; }
  .company-workbench-no-folder .button { width: 100%; }
}
