/* Shared token inputs, compact company editors and the private-page entry. */
.chip-field-control { display:flex; align-items:center; flex-wrap:wrap; gap:7px; min-height:46px; padding:7px 9px; border:1px solid var(--control-line,#dbdbd5); border-radius:5px; background:white; }
.chip-field-control:focus-within { outline:2px solid var(--accent); outline-offset:3px; }
.chip-list { display:contents; }
.input-chip { display:inline-flex; align-items:center; gap:6px; max-width:100%; border-radius:4px; padding:3px 4px 3px 9px; background:#f3f0e9; color:var(--ink); font-size:12px; line-height:1.6; }
.input-chip > span { overflow-wrap:anywhere; min-width:0; }
.input-chip button { display:grid; place-items:center; flex-shrink:0; width:25px; min-height:27px; border:0; background:transparent; font-size:17px; color:var(--muted); cursor:pointer; }
.input-chip button:hover { color:var(--accent); }
.chip-field-control > input, .subscription-form .chip-field-control > input { flex:1; min-width:130px; width:auto; min-height:32px; padding:4px; border:0; border-radius:0; background:transparent; font-size:13px; outline:none; box-shadow:none; }
.chip-field-control > [data-add-chip] { flex-shrink:0; width:30px; height:32px; border:0; border-radius:4px; background:transparent; color:var(--accent); font-size:18px; cursor:pointer; }
.chip-field-control > [data-add-chip]:hover { background:var(--soft); }
.chip-error, .company-field-error { color:var(--accent); font-size:11px; line-height:1.7; margin-top:7px; }
.company-field-error[hidden], .chip-error[hidden] { display:none; }
.company-form { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:19px 18px; }
.company-form label, .company-form legend { display:block; color:var(--text-secondary); font-size:12px; line-height:1.7; font-weight:400; }
.company-form label > span.required-mark { color:var(--accent); margin-left:3px; }
.company-form input:not([type="checkbox"]), .company-form select, .company-form textarea { display:block; box-sizing:border-box; width:100%; min-height:43px; margin-top:7px; padding:10px 11px; border:1px solid var(--control-line,#dbdbd5); border-radius:5px; background:white; color:var(--ink); font:13px/1.6 var(--font); }
.company-form input::placeholder, .company-form textarea::placeholder { color:#90918e; }
.company-form textarea { resize:vertical; min-height:86px; }
.company-form fieldset { border:0; padding:0; min-width:0; }
.company-form legend { margin-bottom:7px; padding:0; }
.company-form .form-wide { grid-column:1/-1; }
.company-choice-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:4px 13px; }
.company-choice-grid label { display:flex; align-items:center; gap:8px; min-height:34px; cursor:pointer; }
.company-choice-grid input { width:15px; height:15px; accent-color:var(--accent); }
.company-form .chip-field { margin-top:7px; }
.company-form .chip-field input { flex:1; width:auto; min-width:125px; min-height:32px; padding:4px; border:0; margin:0; outline:none; box-shadow:none; }
.company-form .field-help { margin-top:6px; font-size:10px; }
.company-upload-list { display:grid; gap:10px; margin-top:18px; max-height:45dvh; overflow:auto; }
.company-upload-item { display:grid; grid-template-columns:minmax(0,1fr) 148px; align-items:center; gap:15px; padding:12px; background:var(--soft); border-radius:4px; }
.company-upload-item strong { display:block; font-weight:500; font-size:12px; overflow-wrap:anywhere; }
.company-upload-item small { display:block; color:var(--muted); font-size:10px; margin-top:5px; }
.company-upload-item select { min-width:0; width:100%; min-height:38px; border:1px solid var(--control-line); background:white; border-radius:4px; padding:6px; font-size:11px; }
.workspace-demo-account { color:var(--text-secondary); background:var(--soft); padding:9px 12px; border-radius:5px; font-size:12px; white-space:nowrap; }
body[data-workspace-preview="true"] .desktop-nav [data-modal-open="auth"][hidden] { display:none; }


.company-page-heading { padding-bottom:23px; }
.company-page-heading p { margin:8px 0 0; color:var(--text-secondary); font-size:14px; line-height:1.65; }
.company-workspace {
  --company-paper:#f8f5ef;
  --company-gold:#a58243;
  --company-label:#8d6b34;
  display:grid;
  gap:28px;
  max-width:1000px;
}
.company-section,#company-upload { min-width:0; scroll-margin-top:calc(var(--header-height) + 20px); }
.company-section-head { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:9px; }
.company-section-head h2 { margin:0; font-size:20px; line-height:1.45; font-weight:650; }
.company-section-head p,.company-section-note { margin:5px 0 0; color:var(--text-secondary); font-size:13px; line-height:1.7; }
.company-section .text-action { flex-shrink:0; font-size:13px; }
.company-section button:disabled { opacity:.58; cursor:default; }
.company-section button:disabled:hover { text-decoration:none; }

.company-setup {
  --company-step-icon:42px;
  --company-step-gap:27px;
  display:grid;
  gap:var(--company-step-gap);
  margin:0;
  padding:28px 32px 30px;
  border-radius:12px;
  background:var(--company-paper);
  list-style:none;
}
.company-setup > li {
  display:grid;
  grid-template-columns:var(--company-step-icon) minmax(0,1fr);
  gap:18px;
  align-items:start;
  position:relative;
}
.company-setup > li:first-child::after {
  content:"";
  position:absolute;
  inset-inline-start:calc(var(--company-step-icon) / 2 - .5px);
  top:var(--company-step-icon);
  bottom:calc(-1 * var(--company-step-gap));
  width:1px;
  background:var(--company-gold);
}
.company-step-icon {
  display:grid;
  place-items:center;
  width:var(--company-step-icon);
  height:var(--company-step-icon);
  border:1px solid var(--company-gold);
  border-radius:50%;
  color:var(--company-label);
  background:#fffdfa;
  font-size:18px;
}
.company-step-content h2 { margin:2px 0 0; font-size:20px; font-weight:650; line-height:1.45; }
.company-step-content p { margin:4px 0 11px; color:var(--text-secondary); font-size:14px; line-height:1.65; }
.company-step-content button { min-height:42px; padding:9px 17px; border-radius:8px; font-size:14px; font-weight:600; }

.company-setup,
.company-profile {
  position:relative;
  isolation:isolate;
}
.company-setup::before,
.company-profile::before {
  content:"";
  position:absolute;
  inset:0 0 auto auto;
  width:min(68%,680px);
  height:min(100%,226px);
  border-radius:inherit;
  background:
    linear-gradient(to right,var(--company-paper),transparent 38%),
    linear-gradient(to top,var(--company-paper),transparent 56%),
    url("../assets/images/company-profile-paper.webp") right top / cover no-repeat;
  z-index:-1;
  pointer-events:none;
}
.company-profile { padding:20px 27px 16px; border-radius:12px; background:var(--company-paper); }
.company-profile-head { display:flex; align-items:flex-start; justify-content:space-between; gap:12px 22px; }
.company-profile-head > .text-action { min-height:36px; white-space:nowrap; }
.company-profile-identity { min-width:0; }
.company-profile-identity h2 {
  margin:0;
  font-family:"Songti SC","Noto Serif CJK SC",STSong,SimSun,serif;
  font-size:32px;
  font-weight:700;
  line-height:1.24;
  overflow-wrap:anywhere;
}
.company-profile-identity p { margin:3px 0 0; color:var(--text-secondary); font-size:13px; }
.company-profile-summary {
  max-width:760px;
  margin:7px 0 0;
  color:var(--text-secondary);
  font-size:14px;
  line-height:1.65;
  white-space:pre-line;
  overflow-wrap:anywhere;
}
.company-profile-fields {
  display:grid;
  grid-template-columns:minmax(0,1.9fr) minmax(0,1fr) minmax(0,1.2fr);
  gap:24px;
  margin:12px 0 0;
}
.company-profile-fields > div { min-width:0; }
.company-profile-fields dt { display:flex; align-items:center; flex-wrap:wrap; gap:0 8px; min-height:28px; color:var(--text-secondary); font-size:12px; }
.company-profile-fields dd { margin:3px 0 0; font-size:14px; line-height:1.65; overflow-wrap:anywhere; }
.company-profile-fields dd small { display:block; margin-top:2px; color:var(--muted); font-size:12px; }
.company-profile-fields [data-company-contact] { min-height:28px; font-size:12px; }
.company-profile-values { display:flex; flex-wrap:wrap; }
.company-profile-values span { max-width:100%; }

.company-record-list { margin:0; padding:0; list-style:none; }
.company-record-list > li { display:grid; align-items:center; gap:12px; min-height:41px; padding:3px 12px; }
.company-record-list > li:nth-child(odd) { border-radius:10px; background:#f8f6f2; }
.company-file-row { grid-template-columns:minmax(0,1fr) minmax(96px,17%) minmax(45px,9%) auto; }
.company-file-name { display:flex; align-items:center; gap:10px; min-width:0; font-size:14px; }
.company-file-name i { flex-shrink:0; color:var(--accent); font-size:16px; }
.company-file-name span { overflow-wrap:anywhere; }
.company-file-category,.company-file-size { color:var(--text-secondary); font-size:12px; }
.company-row-actions { display:flex; align-items:center; justify-content:flex-end; gap:12px; white-space:nowrap; }
.company-count { margin-left:5px; color:var(--muted); font-size:12px; font-weight:400; }
.company-file-help { display:flex; flex-wrap:wrap; gap:3px 12px; margin:8px 0 0; color:var(--muted); font-size:11px; line-height:1.7; }
.company-privacy i { margin-right:4px; }
.company-section [data-company-dropzone].is-dragging,#companyFilesSection.is-dragging {
  outline:2px solid var(--accent);
  outline-offset:4px;
  border-radius:8px;
}

.company-portrait-line { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:center; gap:12px; }
.company-portrait-waiting { min-height:57px; padding:8px 15px; border-radius:9px; background:var(--company-paper); }
.company-portrait-content { display:grid; gap:7px; min-width:0; }
.company-portrait-status { display:flex; align-items:center; gap:9px; margin:0; color:var(--text-secondary); font-size:13px; font-weight:600; }
.company-portrait-status i { color:var(--company-gold); font-size:16px; }
.company-keywords { display:flex; flex-wrap:wrap; gap:6px; margin:0; padding:0; list-style:none; }
.company-keywords li { padding:5px 9px; border-radius:6px; background:#f5efe3; color:var(--company-label); font-size:13px; overflow-wrap:anywhere; }
.company-portrait-update { min-height:36px; padding:6px 12px; border-radius:8px; font-size:13px; }
.company-section .company-portrait-update:disabled { opacity:1; color:#686b70; background:#ecebe8; }

[data-workspace-layout="1"] .company-setup,
[data-workspace-layout="1"] .company-profile {
  padding-inline:0;
  background:transparent;
}
[data-workspace-layout="1"] .company-setup::before,
[data-workspace-layout="1"] .company-profile::before { display:none; }
[data-workspace-layout="1"] .company-setup { padding-block:5px 14px; }
[data-workspace-layout="1"] .company-profile { padding-block:0 8px; }
[data-workspace-layout="1"] .company-profile-fields { margin-top:16px; }
[data-workspace-layout="1"] .company-record-list > li { padding-inline:12px; border-radius:8px; }
[data-workspace-layout="1"] .company-record-list > li:nth-child(odd) { background:transparent; }
[data-workspace-layout="1"] .company-record-list > li:nth-child(even) { background:#f8f6f2; }

@media(max-width:767px) {
  .company-form { grid-template-columns:1fr; gap:18px; }
  .company-form input:not([type="checkbox"]), .company-form select, .company-form textarea, .subscription-form .chip-field-control > input { font-size:16px; }
  .company-form .chip-field input { font-size:16px; }
  .company-choice-grid { gap:5px 12px; }
  .company-choice-grid label { font-size:11px; min-height:38px; }
  .company-upload-item { grid-template-columns:1fr; gap:10px; }
  .company-upload-item select { font-size:14px; }
  .company-workspace { gap:23px; }
  .company-setup { --company-step-icon:36px; --company-step-gap:23px; padding:22px 16px; }
  .company-setup > li { gap:12px; }
  .company-step-content h2 { font-size:18px; }
  .company-step-content p { font-size:13px; }
  .company-profile { padding:18px 16px; }
  .company-setup::before,
  .company-profile::before { width:100%; opacity:.7; }
  .company-profile-head { flex-wrap:wrap; }
  .company-profile-identity h2 { font-size:26px; }
  .company-profile-fields { grid-template-columns:1fr; gap:7px; margin-top:12px; }
  .company-profile-fields > div { display:grid; grid-template-columns:105px minmax(0,1fr); gap:8px; align-items:baseline; }
  .company-record-list > .company-file-row { grid-template-columns:minmax(0,1fr) auto auto; row-gap:0; }
  .company-file-name { grid-column:1/-1; padding-top:4px; }
  .company-row-actions { gap:8px; }
  .company-portrait-waiting { padding-inline:11px; }
}
