/* Authenticated workspace */
.workspace-shell {
  --ws-ink: #1d2638;
  --ws-muted: #59677d;
  --ws-faint: #5e6b82;
  --ws-line: #e5e9f2;
  --ws-surface: #fff;
  --ws-background: #f5f7fb;
  --ws-brand: #315af6;
  --ws-brand-dark: #2348d5;
  --ws-tint: #e9eeff;
  --ws-size: 14px;
  display: grid;
  grid-template-columns: 236px minmax(0, 1fr);
  min-height: 100dvh;
  color: var(--ws-ink);
  background: var(--ws-background);
  font-size: var(--ws-size);
  line-height: 1.5;
}

.workspace-shell *, .workspace-shell *::before, .workspace-shell *::after { box-sizing: border-box; }
.workspace-shell button, .workspace-shell input, .workspace-shell textarea, .workspace-shell select { font: inherit; }
.workspace-shell button { cursor: pointer; }
.workspace-shell button:disabled { cursor: wait; opacity: .65; }
.workspace-shell [hidden] { display: none !important; }
.workspace-shell [tabindex]:focus-visible, .workspace-shell button:focus-visible, .workspace-shell a:focus-visible { outline: 2px solid var(--ws-brand); outline-offset: 3px; }
.workspace-shell svg { width: 18px; height: 18px; flex-shrink: 0; }
.ws-sidebar { display: flex; flex-direction: column; height: 100dvh; position: sticky; top: 0; border-right: 1px solid #232f48; background: #172033; color: #f1f4ff; padding: 22px 14px 12px; }
.ws-brand { height: 66px; position: relative; overflow: hidden; flex-shrink: 0; }
.ws-brand img { position: absolute; width: min(111%, 210px); height: auto; inset: 50% auto auto 50%; transform: translate(-50%, -50%); }
.ws-sidebar-main { min-height: 0; flex: 1; overflow: auto; margin: 0 -6px; padding: 0 6px 18px; scrollbar-width: thin; scrollbar-color: #56627a transparent; }
.ws-sidebar-group { display: grid; gap: 3px; margin-top: 31px; }
.ws-sidebar-group + .ws-sidebar-group { margin-top: 24px; }
.ws-side-label { margin: 0 0 6px; padding: 0 11px; color: #a0acc8; font-size: 11px; font-weight: 730; }
.ws-sidebar-section-head { display: flex; min-height: 27px; align-items: center; justify-content: space-between; gap: 8px; }
.ws-sidebar-section-head .ws-side-label { margin: 0; }
.ws-side-link { width: 100%; min-height: 41px; padding: 8px 11px; border: 0; border-radius: 7px; background: transparent; color: #e4eafa; text-align: left; display: flex; align-items: center; gap: 10px; line-height: 1.25; }
.ws-side-link > svg { color: #94a4c3; }
.ws-side-link:hover { background: #29344e; }
.ws-side-link[aria-current="page"] { background: #29417e; color: #edf2ff; font-weight: 750; }
.ws-side-link[aria-current="page"] > svg { color: #cbd8ff; }
.ws-side-link .ws-chevron { display: flex; width: 14px; height: 14px; margin-left: auto; opacity: .6; }
.ws-side-link .ws-chevron svg { width: 14px; height: 14px; }
.ws-sidebar .ws-side-add, .ws-sidebar .ws-side-expand { color: #aebcda; flex: 0 0 auto; }
.ws-sidebar .ws-side-add:hover, .ws-sidebar .ws-side-expand:hover { background: #354360; color: white; }
.ws-sidebar .ws-side-add { width: 28px; height: 27px; min-height: 27px; margin-right: 3px; }
.ws-sidebar .ws-side-expand { width: 24px; height: 28px; min-height: 28px; }
.ws-side-expand svg { width: 13px; height: 13px; }
.ws-side-expand[aria-expanded="true"] svg { transform: rotate(90deg); }
.ws-personal-empty { color: #bcc8e3; font-size: 12px; }
.ws-personal-row { display: flex; align-items: center; border-radius: 7px; padding-left: 3px; }
.ws-personal-current { background: #243657; }
.ws-personal-open { min-width: 0; min-height: 37px; padding-left: 2px; gap: 7px; }
.ws-personal-open[aria-current="location"] { color: #f0f4ff; font-weight: 750; }
.ws-personal-open svg, .ws-personal-tab svg { width: 15px; height: 15px; }
.ws-personal-open span, .ws-personal-tab span { display: block; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ws-personal-tabs { display: grid; gap: 2px; margin: 3px 0 8px 15px; padding-left: 9px; border-left: 1px solid #435271; }
.ws-personal-tab { min-height: 34px; min-width: 0; padding: 6px 8px; gap: 7px; color: #cdd8ef; font-size: 12px; }
.ws-personal-add-tab { color: #aebcda; }
.ws-project-symbol { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 6px; font-size: 11px; font-weight: 850; flex: 0 0 auto; }
.ws-project-symbol.lepaku { color: #2848a9; background: #e4ecff; }
.ws-project-symbol.ourvillage { color: #74508e; background: #eee5f5; }
.ws-personal-symbol { color: #3c5790; background: #e9eefb; }
.ws-personal-symbol svg { width: 13px; height: 13px; }
.ws-side-link[aria-current="page"] .ws-project-symbol.lepaku { background: #dae3ff; }
.ws-sidebar-footer { display: flex; align-items: center; gap: 8px; border-top: 1px solid #34415d; margin-top: auto; padding: 13px 1px 0; }
.ws-side-user { display: flex; align-items: center; gap: 9px; min-width: 0; flex: 1; }
.ws-profile-button { border: 0; background: transparent; text-align: left; color: inherit; border-radius: 7px; padding: 5px 4px; }
.ws-profile-button:hover { background: #29344e; }
.ws-side-user strong { display: block; font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ws-side-user small { display: block; font-size: 10px; color: #a0acc8; }
.ws-sidebar-footer .ws-icon-button { color: #a7b4d0; }
.ws-sidebar-footer .ws-icon-button:hover { color: white; background: #29344e; }
.ws-avatar { display: inline-grid; place-items: center; flex: 0 0 auto; width: 31px; height: 31px; color: #2c4ab0; background: #e6edff; border-radius: 50%; font-weight: 770; font-size: 12px; line-height: 1; }
.ws-avatar[data-tone="1"] { color: #6c4589; background: #eee4f6; }
.ws-avatar[data-tone="2"] { color: #87612f; background: #f7ecd7; }
.ws-avatar[data-tone="3"] { color: #325a88; background: #e4edf8; }
.ws-stage { display: flex; flex-direction: column; min-width: 0; min-height: 100dvh; }
.ws-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 67px; position: sticky; top: 0; z-index: 4; padding: 10px 25px; border-bottom: 1px solid var(--ws-line); background: var(--ws-surface); }
.ws-top-left, .ws-top-right, .ws-crumb, .ws-member-summary { display: flex; align-items: center; gap: 9px; min-width: 0; }
.ws-top-right { gap: 14px; }
.ws-crumb { color: var(--ws-muted); font-size: 13px; white-space: nowrap; }
.ws-crumb > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.ws-crumb strong { color: var(--ws-ink); font-weight: 720; overflow: hidden; text-overflow: ellipsis; }
.ws-crumb svg { width: 13px; height: 13px; color: #9aa8bd; }
.ws-mobile-menu { display: none !important; }
.ws-member-summary { gap: 8px; color: var(--ws-muted); font-size: 11px; white-space: nowrap; }
.ws-avatar-stack { display: flex; align-items: center; padding-left: 5px; }
.ws-avatar-stack .ws-avatar { width: 27px; height: 27px; border: 2px solid white; margin-left: -5px; font-size: 10px; }
.ws-button, .ws-icon-button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; color: var(--ws-ink); background: white; border: 1px solid var(--ws-line); border-radius: 7px; min-height: 34px; padding: 6px 11px; font-weight: 690; white-space: nowrap; }
.ws-button:hover { background: #f0f3fb; }
.ws-button svg { width: 15px; height: 15px; }
.ws-button--primary { background: var(--ws-brand); border-color: var(--ws-brand); color: white; }
.ws-button--primary:hover { background: var(--ws-brand-dark); border-color: var(--ws-brand-dark); }
.ws-icon-button { width: 32px; height: 32px; min-height: 32px; padding: 0; border-color: transparent; background: transparent; color: #5c6883; }
.ws-icon-button:hover { background: #eff2fa; color: var(--ws-ink); }
.ws-icon-button svg { width: 16px; height: 16px; }
.ws-layout { display: grid; grid-template-columns: minmax(0,1fr) 308px; flex: 1; }
.ws-layout.ws-chat-hidden { grid-template-columns: minmax(0,1fr); }
.ws-page { width: 100%; max-width: 1090px; margin-inline: auto; padding: 35px clamp(22px, 3.3vw, 49px) 48px; min-width: 0; }
.ws-page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 14px; margin-bottom: 23px; }
.ws-page-actions { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 7px; }
.ws-page-kicker { display: flex; align-items: center; gap: 7px; min-height: 20px; margin: 0 0 7px; color: #4b60a0; font-size: 11px; font-weight: 770; letter-spacing: .03em; }
.ws-page-kicker .ws-project-symbol { width: 20px; height: 20px; }
.ws-page-kicker > span { overflow-wrap: anywhere; }
.ws-page-kicker .ws-personal-rename { width: 25px; height: 25px; min-height: 25px; flex: 0 0 auto; }
.ws-page-kicker .ws-personal-rename svg { width: 13px; height: 13px; }
.ws-page-head h1 { margin: 0; font-size: clamp(28px, 3vw, 39px); line-height: 1.17; letter-spacing: -.065em; font-weight: 820; }
.ws-page-head > div { min-width: 0; }
.ws-page-head h1 { overflow-wrap: anywhere; }
.ws-page-head p:not(.ws-page-kicker) { margin: 8px 0 0; color: var(--ws-muted); font-size: 13px; word-break: keep-all; }
.ws-editor-card, .ws-meeting-card, .ws-meeting-empty { overflow: hidden; border: 1px solid #e0e6f3; border-radius: 12px; background: white; box-shadow: 0 2px 5px #17284e08; }
.ws-editor-toolbar { display: flex; flex-wrap: wrap; align-items: center; column-gap: 3px; row-gap: 4px; padding: 10px 12px; border-bottom: 1px solid var(--ws-line); background: #fafbfe; }
.ws-editor-toolbar .ws-icon-button { width: 29px; height: 29px; min-height: 29px; }
.ws-editor-toolbar .ws-icon-button[aria-pressed="true"] { background: var(--ws-tint); color: var(--ws-brand-dark); }
.ws-editor-toolbar select, .ws-chat-channel { color: var(--ws-ink); background-color: white; border: 1px solid var(--ws-line); border-radius: 6px; min-height: 31px; padding: 3px 22px 3px 8px; }
.ws-toolbar-divider { width: 1px; height: 19px; margin: 0 3px; background: var(--ws-line); }
.ws-highlight-control { color: #8b6822; }
.ws-highlight-control:hover { background: #fdf2cd; color: #654a14; }
.ws-editor-status { margin-left: auto; display: flex; align-items: center; gap: 6px; color: var(--ws-muted); font-size: 11px; white-space: nowrap; padding: 0 3px; }
.ws-editor-status svg { width: 14px; height: 14px; }
.ws-editor-status[data-state="saved"] svg { color: var(--ws-brand); }
.ws-editor-status[data-state="alert"] { color: #9d4b25; }
.ws-editor-status .ws-button { min-height: 25px; padding: 2px 6px; font-size: 10px; }
.ws-editor-pad { padding: clamp(21px, 4vw, 43px); min-height: min(53vh, 540px); }
.ws-editor { min-height: min(40vh, 425px); overflow-wrap: anywhere; line-height: 1.72; color: #26334a; }
.ws-editor { display: grid; align-content: start; }
.ws-block { display: flex; align-items: baseline; gap: 7px; min-width: 0; position: relative; padding: 2px 0; }
.ws-block-check, .ws-block-bullet { flex: 0 0 auto; }
.ws-block-bullet { color: #405a98; }
.ws-block-text { flex: 1; min-width: 0; min-height: 1.68em; outline: none !important; white-space: pre-wrap; }
.ws-block-text:empty::before { content: attr(data-placeholder); color: #677791; pointer-events: none; }
.ws-block[data-type="heading"] .ws-block-text { font-size: 1.45em; font-weight: 800; letter-spacing: -.04em; line-height: 1.3; min-height: 1.3em; }
.ws-block[data-type="subheading"] .ws-block-text { font-size: 1.18em; font-weight: 770; letter-spacing: -.02em; line-height: 1.45; min-height: 1.45em; }
.ws-block[data-type="checklist"] .ws-block-text { min-height: 1.58em; }
.ws-block[data-checked="true"] .ws-block-text { text-decoration: line-through; color: var(--ws-muted); }
.ws-block[data-conflict="true"] { box-shadow: -3px 0 #df985e; padding-left: 8px; }
.ws-block-add { justify-self: start; margin: 14px 0 0; }
.ws-doc-row { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; margin: -7px 0 13px; }
.ws-doc-row .ws-button { font-size: 11px; min-height: 30px; }
.ws-doc-row .ws-button[aria-current="page"] { background: #e9eeff; border-color: #d5dfff; color: #2448bc; }
.ws-doc-row .ws-icon-button { flex: 0 0 auto; }
.ws-inline-error { padding: 11px 13px; border: 1px solid #f0d8d1; border-radius: 8px; color: #a1422e; background: #fff7f4; }
.ws-meeting-section h3 { margin: 12px 0 2px; font-size: 12px; }
.ws-meeting-section p { margin: 0; }
.ws-meeting-link { display: inline-flex; align-items: center; gap: 5px; margin-top: 11px; color: var(--ws-brand-dark); font-weight: 680; }
.ws-editor mark, .ws-meeting-highlights li { color: inherit; background: #fff0ad; border-radius: 2px; }
.ws-editor input[type="checkbox"] { width: 16px; height: 16px; margin: 0 8px 0 0; vertical-align: -3px; accent-color: var(--ws-brand); cursor: pointer; }
.ws-title-edit { vertical-align: middle; margin-left: 6px; }
.ws-chat { height: calc(100dvh - 67px); min-height: 380px; position: sticky; top: 67px; display: flex; flex-direction: column; border-left: 1px solid var(--ws-line); min-width: 0; background: white; }
.ws-chat-head { display: flex; align-items: center; border-bottom: 1px solid var(--ws-line); justify-content: space-between; padding: 13px 14px 12px 17px; }
.ws-chat-head h2 { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 15px; line-height: 1.2; letter-spacing: -.03em; }
.ws-chat-head h2 svg { color: var(--ws-brand); }
.ws-chat-channel-row { padding: 12px 15px; border-bottom: 1px solid var(--ws-line); }
.ws-chat-channel { width: 100%; min-height: 35px; padding-left: 10px; background-color: #f8faff; font-size: 12px !important; }
.ws-chat-stream { overflow-y: auto; flex: 1; padding: 10px 14px 13px; scrollbar-width: thin; }
.ws-chat-empty { min-height: 150px; padding: 24px 5px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.ws-chat-empty span, .ws-meeting-empty span { display: grid; place-items: center; width: 42px; height: 42px; background: var(--ws-tint); color: var(--ws-brand); border-radius: 11px; margin-bottom: 11px; }
.ws-chat-empty strong { font-size: 13px; }
.ws-chat-empty p { margin: 5px 0 0; color: var(--ws-muted); font-size: 11px; word-break: keep-all; }
.ws-chat-message { display: grid; grid-template-columns: 29px minmax(0,1fr); gap: 7px; margin-bottom: 13px; }
.ws-chat-message .ws-avatar { width: 27px; height: 27px; font-size: 11px; margin-top: 2px; }
.ws-chat-meta { display: flex; align-items: baseline; flex-wrap: wrap; gap: 3px 6px; font-size: 11px; }
.ws-chat-meta time { color: var(--ws-muted); font-size: 9px; }
.ws-chat-bubble { display: table; margin: 3px 0 0; padding: 6px 9px; border-radius: 0 8px 8px 8px; background: #f1f4fa; font-size: 12px; white-space: pre-wrap; overflow-wrap: anywhere; }
.ws-chat-message[data-mine="true"] .ws-chat-bubble { background: #e7edff; }
.ws-chat-compose { margin: 0; padding: 12px 13px 14px; border-top: 1px solid var(--ws-line); }
.ws-compose-field { display: flex; gap: 4px; align-items: end; padding: 5px; border: 1px solid #e0e5f2; border-radius: 8px; background: #fcfcff; }
.ws-compose-field:focus-within { border-color: var(--ws-brand); box-shadow: 0 0 0 2px #315af622; }
.ws-compose-field textarea { display: block; flex: 1; min-width: 0; resize: none; border: 0; outline: 0; background: transparent; color: var(--ws-ink); padding: 5px; font-size: 12px; }
.ws-compose-field .ws-icon-button { color: white; background: var(--ws-brand); }
.ws-compose-field .ws-icon-button:hover { background: var(--ws-brand-dark); }
.ws-compose-error { color: #a1422e; font-size: 11px; margin: 5px 0 0; }
.ws-meeting-list { display: grid; gap: 12px; }
.ws-meeting-empty { min-height: 246px; display: grid; place-content: center; justify-items: center; text-align: center; padding: 25px 14px; }
.ws-meeting-empty h2 { margin: 0; font-size: 18px; }
.ws-meeting-empty p { margin: 6px 0 15px; color: var(--ws-muted); font-size: 13px; word-break: keep-all; }
.ws-meeting-card { padding: 18px 20px; }
.ws-meeting-card header { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.ws-meeting-card h2 { margin: 3px 0 0; font-size: 19px; letter-spacing: -.04em; overflow-wrap: anywhere; }
.ws-meeting-card time { color: var(--ws-muted); font-size: 11px; }
.ws-meeting-card p { white-space: pre-wrap; overflow-wrap: anywhere; margin-bottom: 0; }
.ws-meeting-highlights { padding: 0; margin: 12px 0 0; display: grid; gap: 6px; list-style: none; }
.ws-meeting-highlights li { display: flex; align-items: baseline; gap: 7px; margin-right: auto; padding: 3px 8px; white-space: pre-wrap; overflow-wrap: anywhere; max-width: 100%; min-width: 0; }
.ws-meeting-highlights svg { align-self: center; width: 13px; height: 13px; color: #755a21; }
.ws-meeting-actions { display: flex; gap: 4px; flex-shrink: 0; }
.ws-dialog { position: fixed; z-index: 20; margin: auto; width: min(100% - 32px, 485px); max-height: calc(100% - 32px); padding: 0; background: white; color: var(--ws-ink); border: 1px solid var(--ws-line); border-radius: 13px; box-shadow: 0 18px 80px #202a533d; }
.ws-dialog::backdrop { background: #202b4971; }
.ws-dialog-title { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 16px 18px; border-bottom: 1px solid var(--ws-line); }
.ws-dialog-title h2 { margin: 0; font-size: 19px; letter-spacing: -.04em; }
.ws-dialog-body { padding: 17px 18px 19px; }
.ws-dialog-body > p { margin: 0 0 13px; color: var(--ws-muted); word-break: keep-all; }
.ws-dialog form { display: grid; gap: 12px; }
.ws-dialog label { display: grid; gap: 4px; font-size: 12px; font-weight: 720; }
.ws-dialog input, .ws-dialog textarea, .ws-dialog select { width: 100%; min-width: 0; padding: 7px 8px; border: 1px solid #cdd7e9; border-radius: 6px; color: var(--ws-ink); background: white; font-weight: 460; }
.ws-dialog textarea { resize: vertical; }
.ws-dialog input:focus, .ws-dialog textarea:focus, .ws-dialog select:focus { outline: 2px solid #315af638; border-color: var(--ws-brand); }
.ws-dialog-actions { display: flex; justify-content: flex-end; gap: 6px; }
.ws-form-error { margin: 0 !important; color: #a1422e !important; font-size: 12px; }
.ws-toast { position: fixed; z-index: 30; bottom: 22px; left: 50%; transform: translateX(-50%); max-width: calc(100% - 30px); padding: 10px 15px; border-radius: 8px; background: #223b84; color: white; font-size: 13px; box-shadow: 0 5px 24px #1827472b; }
.ws-mobile-overlay { display: none; }

@media (min-width: 1450px) {
  .workspace-shell { grid-template-columns: 246px minmax(0, 1fr); }
  .ws-layout { grid-template-columns: minmax(0,1fr) 329px; }
}

@media (max-width: 1050px) {
  .workspace-shell { grid-template-columns: 186px minmax(0, 1fr); }
  .ws-layout { grid-template-columns: minmax(0,1fr) 268px; }
  .ws-top { padding-inline: 17px; }
  .ws-page { padding-inline: 18px; }
}

@media (max-width: 860px) {
  .workspace-shell { display: block; }
  .ws-sidebar { position: fixed; z-index: 13; inset: 0 auto 0 0; width: min(248px, 82vw); transform: translateX(-100%); transition: transform .2s ease; visibility: hidden; }
  .ws-menu-open .ws-sidebar { transform: translateX(0); visibility: visible; }
  .ws-mobile-menu { display: inline-flex !important; }
  .ws-menu-open .ws-mobile-overlay { position: fixed; z-index: 12; display: block; inset: 0; border: 0; background: #17254164; }
}

@media (max-width: 650px) {
  .ws-layout { display: block; }
  .ws-chat { position: fixed; inset: 67px 0 0 auto; height: calc(100dvh - 67px); z-index: 6; width: min(350px, 100vw); box-shadow: -8px 0 30px #202d5925; }
  .ws-top { padding-inline: 12px; }
  .ws-top-right { gap: 7px; }
  .ws-member-summary { display: none; }
  .ws-page { padding: 24px 12px 42px; }
  .ws-page-head { margin-bottom: 17px; align-items: flex-start; }
  .ws-page-head p:not(.ws-page-kicker) { font-size: 11px; }
  .ws-page-actions { justify-content: start; }
  .ws-page-head:has(.ws-page-actions) { flex-wrap: wrap; }
  .ws-editor-toolbar { padding-inline: 6px; }
  .ws-editor-toolbar .ws-icon-button { width: 26px; }
  .ws-editor-pad { padding-inline: 18px; }
}

@media (max-width: 360px) {
  .ws-crumb > span, .ws-crumb > svg { display: none; }
  .ws-page-head { flex-wrap: wrap; }
}

@media (prefers-reduced-motion: reduce) {
  .ws-sidebar { transition: none; }
}
