.company-workspace { max-width: 1180px; margin: 18px auto; container: company / inline-size; }
.company-identity { display: flex; align-items: center; gap: 26px; padding: 32px; position: relative; }
.company-identity-copy { min-width: 0; }
.company-name-row { display: flex; align-items: center; gap: 12px; }
.company-name-row h1 { margin: 10px 0; font-size: clamp(28px, 3vw, 40px); line-height: 1.5; letter-spacing: -.8px; overflow-wrap: anywhere; }
.company-name-edit { flex: 0 0 auto; width: 38px; height: 38px; border-radius: 12px; }
.company-name-edit svg { width: 18px; height: 18px; }
.company-identity-copy p { margin: 5px 0; color: var(--muted); }
.company-logo { position: relative; display: grid; place-items: center; width: 96px; height: 96px; flex: 0 0 96px; border: 1px solid #e2dcf5; border-radius: 24px; padding: 8px; background: #fff; box-shadow: 0 8px 24px #5f45a512; }
.company-logo-edit { cursor: pointer; }
.company-logo img { width: 100%; height: 100%; object-fit: contain; border-radius: 16px; }
.company-logo.busy-button > span.busy-button-content { display: grid; place-items: center; width: 100%; height: 100%; }
.company-logo-placeholder { display: grid; place-items: center; width: 100%; height: 100%; color: #7354d1; background: linear-gradient(140deg,#f0eaff,#eafaff); border-radius: 16px; }
.company-logo-placeholder svg { width: 42px; height: 42px; }
.company-camera { display: grid; place-items: center; position: absolute; right: -6px; bottom: -5px; width: 30px; height: 30px; border: 3px solid #fff; border-radius: 50%; color: #fff; background: #7050d9; }
.company-camera svg { width: 15px; height: 15px; }
.company-document-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 30px 0 16px; }
.company-document-heading h2 { margin: 0; font-size: 23px; }
.company-document-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 16px; }
.company-document-card { padding: 20px; border: 1px solid #e3dcf5; border-radius: 22px; background: linear-gradient(145deg,#fff,#fbfaff); text-align: left; box-shadow: 0 10px 28px #4837800b; cursor: pointer; transition: border-color .2s,box-shadow .2s; }
.company-document-card:hover { border-color: #b2a0ec; box-shadow: 0 12px 28px #48378018; }
.company-document-card.busy-button > span.busy-button-content { position: relative; display: grid; grid-template-columns: minmax(0,1fr); justify-items: start; gap: 16px; min-height: 154px; width: 100%; }
.company-document-card strong { font-size: 18px; line-height: 1.65; overflow-wrap: anywhere; padding-right: 12px; }
.company-document-card small { color: #7d739b; font-size: 12px; line-height: 1.5; padding-right: 18px; }
.company-document-icon { display: grid; place-items: center; width: 44px; height: 44px; background: #eee7ff; color: #7350d5; border-radius: 14px; }
.company-document-arrow { position: absolute; bottom: 0; right: 0; color: #8c7cae; }
.company-document-arrow svg { width: 18px; height: 18px; }
.company-image-preview { display: grid; place-items: center; min-height: 180px; margin-bottom: 16px; background: #f1edfa; border: 1px solid #e2daf3; border-radius: 18px; padding: 16px; }
.company-image-preview > img { width: 100%; height: 160px; object-fit: contain; }
.company-image-preview .company-logo-placeholder { width: 140px; height: 140px; }
.company-document-date { color: var(--muted); font-size: 13px; }
.company-document-content { max-width: 760px; margin: auto; padding: 8px 4px; font-size: 17px; line-height: 1.85; overflow-wrap: anywhere; }
.company-document-content :is(p,li) { white-space: pre-wrap; }
.company-document-content p { margin: 0 0 1em; }
.company-document-content :is(h1,h2,h3) { margin: 1em 0 .5em; line-height: 1.6; letter-spacing: 0; }
.company-document-content h1 { font-size: 28px; }
.company-document-content h2 { font-size: 23px; }
.company-document-content h3 { font-size: 20px; }
.company-document-content a { color: #6943c6; text-decoration: underline; text-underline-offset: 3px; }
.company-document-content :is(ul,ol) { padding-left: 1.8em; }
.company-document-content li { padding-left: .25em; margin-bottom: .5em; }
.company-editor-shell { position: relative; min-width: 0; }
.company-editor-shell .ql-toolbar.ql-snow { position: sticky; top: -20px; z-index: 2; border: 1px solid #ded6ed; border-radius: 12px 12px 0 0; background: #f6f3fc; padding: 10px; }
.company-editor-shell .ql-container.ql-snow { border: 1px solid #ded6ed; border-radius: 0 0 12px 12px; background: #fff; font: inherit; }
.company-editor-shell .ql-editor { min-height: 360px; font-size: 17px; line-height: 1.85; padding: 22px; overflow: visible; }
.company-editor-shell .ql-editor.ql-blank:before { font-style: normal; color: #92869d; }
.company-editor-shell .ql-editor :is(h1,h2,h3) { line-height: 1.65; }
.company-editor-shell .ql-tooltip { z-index: 3; max-width: calc(100vw - 64px); white-space: normal; }
.company-editor-shell .ql-toolbar button { min-width: 30px; min-height: 30px; }
.company-editor-shell[aria-busy="true"] .ql-toolbar { opacity: .6; }
.form-dialog-fullscreen .form-dialog-body { padding: 16px 24px; }
.form-dialog-fullscreen .company-editor-shell .ql-toolbar.ql-snow {
    top: -16px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    border-radius: 10px 10px 0 0;
}
.company-editor-shell .ql-toolbar.ql-snow .ql-formats {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    margin: 0;
    padding-right: 8px;
    border-right: 1px solid #e4ddec;
}
.form-dialog-fullscreen .company-editor-shell .ql-editor { min-height: max(320px,calc(100dvh - 280px)); }
.company-editor-shell .ql-picker.ql-lineheight { width: 86px; }
.company-editor-shell .ql-picker.ql-size { width: 76px; }
.company-editor-shell .ql-picker.ql-font { width: 98px; }
.company-editor-shell :is(.ql-lineheight,.ql-size,.ql-font) .ql-picker-label::before,
.company-editor-shell :is(.ql-lineheight,.ql-size,.ql-font) .ql-picker-item::before { content: attr(data-label); }
.company-editor-shell :is(.ql-undo,.ql-redo) { font-size: 24px; font-weight: 600; line-height: 1; }
.company-editor-shell .ql-font-inter { font-family: Inter,sans-serif; }
.company-editor-shell .ql-font-arial { font-family: Arial,sans-serif; }
.company-editor-shell .ql-font-serif { font-family: Georgia,serif; }
.company-editor-shell .ql-font-monospace { font-family: monospace; }
.company-media-status { position: absolute; top: 12px; right: 12px; z-index: 4; display: flex; align-items: center; gap: 8px; padding: 10px 14px; border: 1px solid #ddd4ed; border-radius: 10px; background: #fff; box-shadow: 0 6px 20px #41306020; font-size: 13px; }
.company-media-status > span { width: 16px; height: 16px; border: 2px solid #cfc4e8; border-right-color: #7450c9; border-radius: 50%; animation: busy-button-spin .7s linear infinite; }
.company-document-content.company-document-reader { height: auto; overflow: visible; padding: 16px 0; }
.company-document-content.company-document-reader :is(ol,ul) { padding-left: 1.5em; }
.company-document-content.company-document-reader li { margin-bottom: .4em; }
.company-document-content blockquote,
.company-editor-shell .ql-editor blockquote { border-left: 4px solid #b5a0ed; padding: 12px 18px; background: #f4effd; margin: 12px 0; }
.company-document-content code { font-family: monospace; font-size: .9em; border-radius: 4px; padding: 2px 4px; background: #eee9f6; }
.company-document-content .company-document-code,
.company-editor-shell .ql-code-block-container { background: #242138; color: #f0eaff; border-radius: 10px; padding: 16px; overflow-x: auto; }
.company-document-content .company-document-code code { background: transparent; color: inherit; padding: 0; }
.company-document-image,
.company-editor-shell .ql-editor img { display: inline-block; max-width: 100%; height: auto; border-radius: 8px; }
.company-document-video,
.company-editor-shell .ql-editor .ql-video { display: block; width: min(100%,900px); height: auto; aspect-ratio: 16 / 9; border: 0; border-radius: 10px; margin: 16px auto; }
.company-editor-shell .ql-editor :is(h1,h2,h3,h4,h5,h6),
.company-document-content :is(h1,h2,h3,h4,h5,h6) { line-height: 1.65; font-weight: 700; }
.company-editor-shell .ql-editor h1,.company-document-content h1 { font-size: 32px; }
.company-editor-shell .ql-editor h2,.company-document-content h2 { font-size: 28px; }
.company-editor-shell .ql-editor h3,.company-document-content h3 { font-size: 24px; }
.company-editor-shell .ql-editor h4,.company-document-content h4 { font-size: 20px; }
.company-editor-shell .ql-editor h5,.company-document-content h5 { font-size: 18px; }
.company-editor-shell .ql-editor h6,.company-document-content h6 { font-size: 16px; }
.profile-company-link { margin: 12px 0; }
@container company (max-width: 900px) { .company-document-grid { grid-template-columns: repeat(3,minmax(0,1fr)); } }
@container company (max-width: 650px) { .company-document-grid { grid-template-columns: repeat(2,minmax(0,1fr)); } }
@media (max-width: 767px) {
    .company-workspace { margin-top: 10px; }
    .company-identity { padding: 22px 18px; gap: 16px; border-radius: 24px; }
    .company-logo { width: 80px; height: 80px; flex-basis: 80px; border-radius: 20px; }
    .company-name-row { gap: 6px; }
    .company-name-row h1 { font-size: 26px; letter-spacing: -.5px; }
    .company-name-edit { width: 34px; height: 34px; }
    .company-document-grid { gap: 12px; }
    .company-document-card { padding: 16px; border-radius: 18px; }
    .company-document-card strong { font-size: 16px; }
    .company-document-card.busy-button > span.busy-button-content { min-height: 144px; gap: 12px; }
    .company-editor-shell .ql-editor { padding: 16px; min-height: 45dvh; font-size: 16px; }
    .company-document-content { font-size: 16px; }
    .form-dialog-fullscreen .form-dialog-body { padding: 16px; }
    .form-dialog-fullscreen .company-editor-shell .ql-editor { min-height: max(240px,calc(100dvh - 360px)); }
    .company-editor-shell .ql-toolbar.ql-snow .ql-formats { padding-right: 4px; }
}
@media (prefers-reduced-motion: no-preference) {
    .company-document-card:hover { translate: 0 -2px; }
}

.company-document-draft { display: grid; gap: 16px; min-width: 0; }
.company-document-draft [hidden] { display: none !important; }
