:root {
  --forest: #07543f;
  --forest-dark: #053d30;
  --forest-ink: #043127;
  --forest-soft: #e6f1eb;
  --forest-pale: #f1f7f4;
  --ink: #17201c;
  --muted: #68736d;
  --line: #dce3df;
  --canvas: #f4f6f5;
  --panel: #fff;
  --amber: #bc650f;
  --red: #bd3e37;
  --shadow-soft: 0 8px 28px rgba(19, 45, 34, .08);
}
* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--canvas); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Yu Gothic UI", Meiryo, sans-serif; font-size: 14px; }
button, input, select, textarea { font: inherit; }
button, select { cursor: pointer; }
.loading { min-height: 100vh; display: grid; place-items: center; color: var(--muted); }
.login-shell { min-height: 100vh; padding: 24px; display: grid; place-items: center; background: var(--forest-dark); }
.login-card { width: min(420px, 100%); padding: 28px; border-radius: 14px; background: #fff; box-shadow: 0 24px 70px rgba(0, 0, 0, .22); }
.login-card h1 { margin: 0; font-size: 24px; }
.login-card p { margin: 7px 0 22px; color: var(--muted); }
label { display: grid; gap: 6px; margin-top: 13px; color: var(--muted); font-size: 12px; font-weight: 700; }
input, select, textarea { width: 100%; min-height: 40px; padding: 8px 10px; color: var(--ink); border: 1px solid #c9d2cd; border-radius: 8px; background: #fff; }
input:focus, select:focus, textarea:focus { outline: 3px solid rgba(7, 84, 63, .16); border-color: var(--forest); }
.primary, .secondary { min-height: 40px; padding: 8px 14px; border-radius: 8px; border: 1px solid var(--line); font-weight: 750; }
.primary { color: #fff; border-color: var(--forest); background: var(--forest); }
.secondary { background: #fff; }
button:disabled { cursor: not-allowed; opacity: .48; }
.login-card .primary { width: 100%; margin-top: 18px; }
.error { margin-top: 12px; padding: 10px; color: var(--red); background: #fff0ef; border-radius: 7px; }
.shell { min-height: 100vh; display: grid; grid-template-columns: 240px 1fr; }
.sidebar { position: sticky; top: 0; height: 100vh; padding: 18px 11px; color: #fff; background: var(--forest-dark); }
.sidebar-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.brand { margin: 0 10px 18px; font-size: 17px; font-weight: 800; letter-spacing: -.02em; }
.brand small { display: block; opacity: .7; font-size: 11px; font-weight: 500; }
.mobile-menu-toggle { display: none; }
.nav { display: grid; gap: 5px; }
.nav-group-label { margin: 12px 12px 2px; color: rgba(255, 255, 255, .52); font-size: 9px; font-weight: 800; letter-spacing: .08em; }
.nav-group-label:first-child { margin-top: 0; }
.nav button { min-height: 40px; padding: 7px 11px; color: #fff; border: 0; border-radius: 7px; background: transparent; text-align: left; }
.nav button.active, .nav button:hover { background: rgba(255, 255, 255, .14); }
.chat-nav-button { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.chat-nav-label { min-width: 0; }
.nav-unread { min-width: 22px; height: 22px; padding: 0 6px; display: grid; place-items: center; color: var(--forest-dark); background: #fff; border-radius: 20px; font-size: 9px; line-height: 1; }
.nav-unread[hidden] { display: none; }
.workspace { min-width: 0; }
.topbar { position: sticky; top: 0; z-index: 20; min-height: 64px; padding: 9px 20px; display: flex; justify-content: space-between; align-items: center; gap: 18px; background: rgba(255, 255, 255, .97); border-bottom: 1px solid var(--line); backdrop-filter: blur(10px); }
.topbar-workspace { min-width: 0; flex: 1; display: flex; align-items: center; gap: 22px; }
.workspace-breadcrumb { flex: 0 0 auto; display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 11px; }
.workspace-breadcrumb span::after { content: "/"; margin-left: 7px; color: #aab4af; }
.workspace-breadcrumb b { color: var(--ink); font-size: 12px; }
.command-trigger { width: min(460px, 52vw); min-height: 38px; padding: 7px 10px; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 8px; color: var(--muted); border: 1px solid #cbd4cf; border-radius: 8px; background: #f8faf9; text-align: left; }
.command-trigger:hover { color: var(--forest); border-color: #9eb7aa; background: #fff; box-shadow: 0 3px 12px rgba(16, 57, 40, .07); }
.command-trigger kbd, .command-search kbd { padding: 2px 6px; color: #6e7973; border: 1px solid #d1d8d4; border-bottom-width: 2px; border-radius: 5px; background: #fff; font: 9px/1.5 "Segoe UI", sans-serif; }
.user { display: flex; align-items: center; gap: 10px; }
.avatar { width: 32px; height: 32px; display: grid; place-items: center; color: #fff; background: #8d6957; border-radius: 50%; }
.content { width: 100%; max-width: none; margin: 0; padding: 25px; }
.environment-banner { min-height: 38px; padding: 8px 24px; display: flex; align-items: center; gap: 10px; color: #6f3600; background: #fff2d9; border-bottom: 1px solid #e6bd78; font-size: 12px; }
.environment-banner b { flex: 0 0 auto; }
.page-head { margin-bottom: 16px; display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.page-head h1 { margin: 0; font-size: 28px; }
.page-head p { margin: 5px 0 0; color: var(--muted); }
.actions { display: flex; gap: 8px; align-items: center; }
.filters { margin-bottom: 13px; padding: 10px; display: flex; gap: 9px; background: #fff; border: 1px solid var(--line); border-radius: 10px; }
.filters select { width: auto; min-width: 180px; }
.metrics { margin-bottom: 13px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.metrics.four { grid-template-columns: repeat(4, 1fr); }
.metrics.five { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.metric { padding: 16px; background: #fff; border: 1px solid var(--line); border-radius: 10px; }
.metric span { color: var(--muted); }
.metric b { margin-top: 6px; display: block; font-size: 24px; }
.dashboard-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.dashboard-card { min-width: 0; padding: 16px; background: #fff; border: 1px solid var(--line); border-radius: 10px; }
.section-head { margin-bottom: 10px; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.section-head h2 { margin: 0; font-size: 15px; }
.compact-list { display: grid; gap: 7px; }
.compact-list .event-row { padding: 9px; grid-template-columns: 82px minmax(0, 1fr); }
.compact-list .event-attendees { display: none; }
.compact-row { padding: 9px; display: flex; justify-content: space-between; align-items: center; gap: 10px; background: #f7faf8; border-radius: 7px; }
.compact-row b, .compact-row small { display: block; }
.compact-row small { color: var(--muted); }
.home-sales-metrics { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.home-sales-metrics > div { padding: 10px; background: #f7faf8; border-radius: 7px; }
.home-sales-metrics span, .home-sales-metrics b { display: block; }
.home-sales-metrics span { color: var(--muted); font-size: 10px; }
.goal-grid { display: grid; grid-template-columns: repeat(3, minmax(260px, 1fr)); gap: 12px; }
.goal-card { padding: 15px; background: #fff; border: 1px solid var(--line); border-radius: 10px; }
.goal-card h2 { margin: 12px 0 5px; font-size: 16px; }
.goal-card > p { min-height: 36px; margin: 0 0 13px; color: var(--muted); font-size: 11px; }
.goal-progress { display: flex; justify-content: space-between; align-items: flex-end; gap: 10px; }
.goal-progress span, .goal-progress b { display: block; }
.goal-progress span { color: var(--muted); font-size: 10px; }
.goal-progress strong { color: var(--forest); font-size: 19px; }
.progress-track { height: 7px; margin-top: 7px; overflow: hidden; background: #e7ece9; border-radius: 8px; }
.progress-track span { height: 100%; display: block; background: var(--forest); border-radius: 8px; }
.goal-card footer { margin-top: 13px; padding-top: 11px; display: flex; justify-content: space-between; align-items: flex-end; border-top: 1px solid var(--line); }
.goal-card footer small { color: var(--muted); }
.project-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; }
.project-stats > div { padding: 9px; background: #f7faf8; border-radius: 7px; text-align: center; }
.project-stats span, .project-stats b { display: block; }
.project-stats span { color: var(--muted); font-size: 10px; }
.project-stats b { margin-top: 3px; font-size: 16px; }
.project-card footer { align-items: center; gap: 9px; flex-wrap: wrap; }
.project-card footer .card-actions { margin-top: 0; flex-wrap: wrap; }
.project-card footer .card-actions button { flex: 1 1 68px; white-space: nowrap; }
.board { display: grid; grid-template-columns: repeat(4, minmax(220px, 1fr)); gap: 11px; align-items: start; overflow-x: auto; }
.column { min-height: 250px; padding: 10px; background: #eaf0ec; border-radius: 10px; }
.column.dragover { box-shadow: inset 0 0 0 2px var(--forest); background: var(--forest-soft); }
.column-head { min-height: 36px; display: flex; justify-content: space-between; align-items: center; }
.column-head h2 { margin: 0; font-size: 14px; }
.count { min-width: 24px; height: 24px; display: grid; place-items: center; color: var(--muted); background: #fff; border-radius: 20px; font-size: 11px; }
.cards { min-height: 180px; display: grid; gap: 8px; align-content: start; }
.card { padding: 12px; border: 1px solid var(--line); border-radius: 8px; background: #fff; box-shadow: 0 2px 7px rgba(17, 38, 28, .05); cursor: grab; }
.card.overdue { border-color: #d87864; }
.card.dragging { opacity: .45; }
.card h3 { margin: 7px 0; font-size: 13px; }
.card small { color: var(--muted); }
.card-top, .card-foot { display: flex; justify-content: space-between; gap: 8px; }
.card-foot { margin-top: 11px; padding-top: 8px; border-top: 1px solid var(--line); }
.card-actions { display: flex; gap: 6px; margin-top: 9px; }
.card-actions button, .card-actions select { min-height: 34px; font-size: 12px; }
.card-actions button { flex: 1; }
.filter-check { align-self: end; min-height: 42px; }
.priority { padding: 2px 7px; border-radius: 5px; font-size: 10px; font-weight: 800; }
.priority.high { color: var(--red); background: #fff0ef; }
.priority.medium { color: var(--amber); background: #fff4df; }
.priority.low { color: var(--muted); background: #edf1ef; }
.empty { padding: 28px 8px; color: var(--muted); text-align: center; font-size: 11px; }
.schedule-list { display: grid; gap: 10px; }
.event-row { padding: 14px 16px; display: grid; grid-template-columns: 120px minmax(0, 1fr) 180px; align-items: center; gap: 14px; background: #fff; border: 1px solid var(--line); border-radius: 10px; }
.event-row.notification-target { border-color: var(--forest); box-shadow: 0 0 0 3px rgba(7, 84, 63, .11); }
.event-time { color: var(--forest); font-weight: 800; }
.event-row h2 { margin: 0 0 3px; font-size: 15px; }
.event-row p { margin: 0; color: var(--muted); font-size: 12px; }
.event-attendees { color: var(--muted); text-align: right; font-size: 11px; }
.empty-panel { padding: 45px 20px; color: var(--muted); background: #fff; border: 1px solid var(--line); border-radius: 10px; text-align: center; }
.status-pill { display: inline-flex; padding: 3px 8px; color: var(--forest); background: var(--forest-soft); border-radius: 20px; font-size: 10px; font-weight: 800; }
.status-pill.warning { color: var(--amber); background: #fff4df; }
.data-table-wrap { overflow-x: auto; background: #fff; border: 1px solid var(--line); border-radius: 10px; }
.data-table { width: 100%; min-width: 1040px; border-collapse: collapse; }
.data-table th, .data-table td { padding: 11px 12px; border-bottom: 1px solid var(--line); text-align: right; white-space: nowrap; }
.data-table th { color: var(--muted); background: #f9fbf9; font-size: 11px; }
.data-table th:first-child, .data-table td:first-child { position: sticky; left: 0; z-index: 1; text-align: left; background: #fff; }
.data-table th:first-child { background: #f9fbf9; }
.data-table tr:last-child td { border-bottom: 0; }
.data-table .muted-value { color: var(--muted); }
.data-table .rate-risk { color: var(--red); font-weight: 800; }
.data-table button { min-height: 32px; padding: 5px 9px; }
.period-controls { display: flex; gap: 8px; align-items: flex-end; }
.period-controls label { margin: 0; }
.period-controls input, .period-controls select { min-width: 100px; }
.summary-note { margin: -4px 0 13px; color: var(--muted); font-size: 11px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.page-kicker { display: block; margin-bottom: 5px; color: var(--forest); font-size: 10px; font-weight: 850; letter-spacing: .08em; }
.chat-page-head { align-items: center; }
.chat-focus { display: grid; grid-template-columns: repeat(4, minmax(110px, 1fr)); gap: 6px; }
.chat-focus button { min-height: 48px; padding: 7px 10px; display: flex; align-items: center; justify-content: space-between; gap: 10px; color: var(--ink); border: 1px solid var(--line); border-radius: 8px; background: #fff; text-align: left; }
.chat-focus button:hover { border-color: #aebfb6; background: var(--forest-pale); }
.chat-focus span { max-width: 92px; color: var(--muted); font-size: 9px; line-height: 1.35; }
.chat-focus span small { margin-top: 3px; display: block; color: inherit; font-size: 7px; line-height: 1.3; }
.chat-focus b { color: var(--forest); font-size: 17px; }
.chat-focus-inventory.ready { border-color: #b8d2c3; background: #f4faf6; }
.chat-focus-inventory.warning { border-color: #dfc28b; background: #fff9ed; }
.chat-focus-inventory.warning b { color: #9b650b; }
.chat-focus-inventory.blocked { border-color: #d7c9c5; background: #faf7f6; }
.chat-focus-inventory.blocked b { color: #8b5a4f; font-size: 12px; }
.chat-toolbar { margin-bottom: 11px; padding: 9px 11px; display: flex; justify-content: space-between; align-items: end; gap: 12px; background: #fff; border: 1px solid var(--line); border-radius: 9px; }
.chat-toolbar label { min-width: 210px; margin: 0; }
.chat-toolbar select { min-width: 210px; }
.chat-toolbar-actions { display: flex; gap: 7px; }
.chat-toolbar-actions button { min-height: 36px; padding: 6px 10px; font-size: 11px; }
.chat-layout { height: calc(100vh - 285px); min-height: 640px; max-height: 900px; display: grid; grid-template-columns: 230px minmax(420px, 1fr) 300px; overflow: hidden; background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow-soft); }
.chat-layout.thread-open { grid-template-columns: 200px minmax(420px, 1fr) minmax(300px, 35%); }
.chat-layout.thread-open .chat-context { display: none; }
.chat-channels { min-width: 0; padding: 12px 10px; overflow-y: auto; background: #f5f7f6; border-right: 1px solid var(--line); }
.chat-channels > header { margin: 0 4px 9px; display: flex; justify-content: space-between; align-items: center; }
.chat-channels h2 { margin: 2px 0 0; font-size: 14px; }
.chat-channels header small { color: var(--muted); font-size: 9px; }
.chat-channel-count { padding: 2px 6px; color: var(--muted); background: #fff; border: 1px solid var(--line); border-radius: 20px; font-size: 9px; }
.chat-channel-tools { margin-bottom: 8px; display: grid; gap: 7px; }
.chat-channel-search { margin: 0; }
.chat-channel-search input { min-height: 34px; padding: 6px 8px; font-size: 10px; }
.chat-channel-modes { padding: 2px; display: grid; grid-template-columns: repeat(2, 1fr); gap: 2px; background: #e9eeeb; border-radius: 7px; }
.chat-channel-modes button { min-height: 28px; padding: 4px 7px; color: var(--muted); border: 0; border-radius: 5px; background: transparent; font-size: 9px; font-weight: 800; }
.chat-channel-modes button.active { color: var(--forest); background: #fff; box-shadow: 0 1px 4px rgba(17, 46, 33, .09); }
.chat-channel-modes b { min-width: 17px; margin-left: 3px; display: inline-grid; place-items: center; color: #fff; background: #c3473c; border-radius: 20px; font-size: 8px; }
.chat-channel-list { display: grid; gap: 3px; }
.chat-channel { position: relative; width: 100%; padding: 8px 9px 8px 12px; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 2px 7px; color: var(--ink); border: 0; border-radius: 7px; background: transparent; text-align: left; }
.chat-channel::before { content: ""; position: absolute; left: 3px; top: 9px; bottom: 9px; width: 2px; border-radius: 2px; background: transparent; }
.chat-channel.active, .chat-channel:hover { color: var(--forest-ink); background: #e4eee9; }
.chat-channel.active::before { background: var(--forest); }
.chat-channel-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-channel small { grid-column: 1 / -1; display: block; opacity: .7; }
.chat-unread { min-width: 21px; height: 21px; padding: 0 6px; display: grid; place-items: center; color: #fff; background: #c3473c; border-radius: 20px; font-size: 9px; line-height: 1; }
.chat-channel.active .chat-unread, .chat-channel:hover .chat-unread { color: #fff; background: #a83c34; }
.chat-channel-empty { padding: 24px 8px; color: var(--muted); text-align: center; font-size: 9px; line-height: 1.5; }
.chat-main { min-width: 0; min-height: 0; display: grid; grid-template-rows: auto minmax(320px, 1fr) auto; }
.chat-head { min-height: 62px; padding: 12px 16px; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--line); }
.chat-head h2 { margin: 0; font-size: 16px; }
.chat-head p { margin: 3px 0 0; color: var(--muted); font-size: 11px; }
.chat-head-title > div { display: flex; align-items: center; gap: 7px; }
.chat-head-title > div > span { padding: 2px 6px; color: var(--forest); background: var(--forest-soft); border-radius: 20px; font-size: 8px; font-weight: 800; }
.chat-head-actions { min-width: 0; display: flex; align-items: center; gap: 7px; }
.chat-search { margin: 0; }
.chat-search input { width: 180px; min-height: 36px; }
.ai-selection-button { white-space: nowrap; }
.ai-selection-button b { min-width: 18px; height: 18px; margin-left: 4px; display: inline-grid; place-items: center; color: #fff; background: var(--forest); border-radius: 20px; font-size: 8px; }
.ai-selection-button:disabled b { background: #9ba6a0; }
.chat-messages { padding: 8px 16px; overflow-y: auto; }
.chat-search-result { margin: 4px 0 8px; padding: 8px 10px; display: flex; align-items: center; gap: 8px; color: var(--muted); background: #f1f5f2; border-radius: 7px; font-size: 10px; }
.chat-search-result b { color: var(--forest-dark); font-size: 11px; }
.chat-message { padding: 11px 4px; display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; gap: 10px; border-bottom: 1px solid #eef2ef; }
.chat-message:hover { background: #fbfcfb; }
.chat-message.thread-reply { background: #fbfcfb; }
.chat-message h3 { margin: 0; font-size: 12px; }
.chat-message h3 time { margin-left: 7px; color: var(--muted); font-size: 10px; font-weight: 500; }
.chat-message p { margin: 4px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.6; }
.chat-message > .message-actions { opacity: .45; transition: opacity .12s ease; }
.chat-message:hover > .message-actions, .chat-message:focus-within > .message-actions { opacity: 1; }
.chat-message .message-action { align-self: start; min-height: 30px; padding: 4px 8px; font-size: 10px; }
.chat-message .message-action:disabled { cursor: default; opacity: .65; }
.thread-link { margin-top: 7px; padding: 0; color: var(--forest); border: 0; background: transparent; font-size: 11px; font-weight: 800; }
.chat-composer { margin: 0 12px 12px; padding: 0; overflow: hidden; border: 1px solid #bfcac4; border-radius: 9px; background: #fff; box-shadow: 0 2px 8px rgba(20, 47, 36, .06); }
.composer-tools { min-height: 34px; padding: 5px 7px; display: flex; justify-content: space-between; align-items: center; gap: 8px; background: #f7f9f8; border-bottom: 1px solid #e5eae7; }
.composer-tools > div { display: flex; gap: 4px; }
.composer-tools button { min-height: 24px; padding: 3px 7px; color: var(--muted); border: 0; border-radius: 5px; background: transparent; font-size: 9px; font-weight: 800; }
.composer-tools button:hover { color: var(--forest); background: var(--forest-soft); }
.composer-tools > span { color: var(--muted); font-size: 8px; }
.chat-composer textarea { min-height: 72px; padding: 10px 11px; border: 0; border-radius: 0; resize: vertical; }
.chat-composer textarea:focus { outline: 0; }
.chat-composer footer { margin-top: 7px; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.chat-composer footer { margin: 0; padding: 7px 8px; }
.chat-composer footer span { color: var(--muted); font-size: 10px; line-height: 1.5; }
.chat-context { min-width: 0; padding: 14px; overflow-y: auto; background: #f8faf8; border-left: 1px solid var(--line); }
.chat-context-head { margin-bottom: 9px; }
.chat-context-head small { color: var(--muted); font-size: 9px; }
.chat-context-head h2 { margin: 2px 0 0; font-size: 14px; }
.chat-context-tabs { margin-bottom: 12px; padding: 2px; display: grid; grid-template-columns: repeat(2, 1fr); gap: 2px; background: #e8eeeb; border-radius: 7px; }
.chat-context-tabs button { min-height: 30px; padding: 4px 6px; color: var(--muted); border: 0; border-radius: 5px; background: transparent; font-size: 9px; font-weight: 800; }
.chat-context-tabs button.active { color: var(--forest); background: #fff; box-shadow: 0 1px 4px rgba(19, 49, 36, .08); }
.chat-context-tabs b { margin-left: 2px; }
.chat-context-section + .chat-context-section { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.chat-context-section > header { margin-bottom: 9px; display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.chat-context-section header small { color: var(--muted); font-size: 9px; }
.chat-context-section h2 { margin: 2px 0 0; font-size: 13px; }
.context-count { min-width: 24px; height: 24px; display: grid; place-items: center; color: #fff; background: var(--forest); border-radius: 20px; font-size: 10px; font-weight: 800; }
.chat-task-list { display: grid; gap: 7px; }
.chat-context-task { width: 100%; padding: 10px; color: var(--ink); background: #fff; border: 1px solid var(--line); border-radius: 8px; text-align: left; }
.chat-context-task:hover { border-color: #aebfb6; background: var(--forest-pale); }
.chat-context-task > span { display: flex; justify-content: space-between; align-items: center; color: var(--muted); font-size: 9px; }
.chat-context-task b, .chat-context-task small { display: block; overflow-wrap: anywhere; }
.chat-context-task b { margin-top: 7px; font-size: 11px; line-height: 1.45; }
.chat-context-task small { margin-top: 5px; color: var(--muted); font-size: 9px; }
.chat-context-task .priority { padding: 2px 6px; }
.chat-context-empty { margin: 0; padding: 12px; color: var(--muted); background: #fff; border: 1px dashed #cfd9d4; border-radius: 8px; font-size: 10px; line-height: 1.6; }
.context-link { width: 100%; min-height: 34px; margin-top: 8px; color: var(--forest); border: 1px solid #c9d8d0; border-radius: 7px; background: #fff; font-size: 10px; font-weight: 800; }
.chat-thread { min-width: 0; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; border-left: 1px solid var(--line); background: #fff; }
.chat-thread[hidden] { display: none; }
.chat-thread > header { min-height: 62px; padding: 12px 14px; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--line); }
.chat-thread > header small { color: var(--muted); }
.chat-thread > header h2 { margin: 2px 0 0; font-size: 15px; }
.thread-close { width: 34px; height: 34px; border: 0; background: transparent; font-size: 22px; }
.thread-messages { overflow-y: auto; padding: 6px 12px; }
.thread-messages .chat-message { grid-template-columns: 30px minmax(0, 1fr); }
.thread-messages .chat-message > .message-actions { grid-column: 2; grid-row: 2; display: flex; justify-content: flex-start; }
.thread-messages .avatar { width: 30px; height: 30px; }
.shared-grid { display: grid; grid-template-columns: repeat(3, minmax(240px, 1fr)); gap: 12px; }
.shared-folder-card { min-width: 0; padding: 15px; background: #fff; border: 1px solid var(--line); border-radius: 10px; }
.shared-folder-card h2 { margin: 0; font-size: 15px; }
.shared-folder-card > p { margin: 4px 0 12px; color: var(--muted); font-size: 11px; }
.shared-link-list { display: grid; gap: 7px; }
.shared-link { padding: 10px; display: block; color: var(--ink); border: 1px solid var(--line); border-radius: 8px; text-decoration: none; }
.shared-link:hover { border-color: var(--forest); background: var(--forest-soft); }
.shared-link b { display: block; }
.shared-link small { color: var(--muted); }
.tag-list { margin-top: 6px; display: flex; flex-wrap: wrap; gap: 4px; }
.tag { padding: 2px 6px; color: var(--forest); background: var(--forest-soft); border-radius: 12px; font-size: 9px; }
.message-actions { display: grid; justify-items: end; align-content: start; gap: 6px; }
.message-select { width: 18px; min-height: 18px; }
.message-select-label { margin: 0; display: flex; grid-template-columns: none; align-items: center; gap: 4px; color: var(--muted); font-size: 9px; font-weight: 700; }
.message-select-label span { white-space: nowrap; }
.admin-grid { display: grid; grid-template-columns: minmax(280px, 1fr) minmax(300px, 1fr); gap: 14px; }
.settings-card { padding: 18px; background: #fff; border: 1px solid var(--line); border-radius: 10px; }
.notification-settings { max-width: 640px; }
.notification-settings + .notification-settings { margin-top: 12px; }
.push-settings { border-color: #bfd2c8; box-shadow: var(--shadow-soft); }
.push-settings .summary-note { margin: 5px 0 0; }
.push-state-chip { flex: 0 0 auto; padding: 5px 9px; color: var(--muted); background: #eef2f0; border-radius: 20px; font-size: 10px; font-weight: 850; }
.push-state-chip[data-state="active"] { color: var(--forest); background: var(--forest-soft); }
.push-state-chip[data-state="blocked"] { color: #8a5010; background: #fff1d8; }
.push-device-status { min-height: 70px; margin-top: 14px; padding: 13px 14px; display: grid; align-content: center; gap: 4px; background: var(--forest-pale); border-radius: 8px; }
.push-device-status b, .push-device-status small { display: block; }
.push-device-status small { color: var(--muted); line-height: 1.5; }
.push-device-status .empty { padding: 6px; text-align: left; }
.push-actions { margin-top: 11px; display: flex; flex-wrap: wrap; gap: 7px; }
.push-actions button { flex: 0 1 auto; }
.danger-text { color: var(--red); }
.wide-card { grid-column: 1 / -1; }
.settings-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.settings-card h2 { margin: 0; font-size: 16px; }
.full-button { width: 100%; }
.improvement-list { display: grid; gap: 10px; }
.improvement-card { padding: 16px; background: #fff; border: 1px solid var(--line); border-radius: 10px; }
.improvement-card > header { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.improvement-card h2 { margin: 12px 0; font-size: 17px; }
.improvement-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; color: var(--muted); font-size: 10px; }
.impact { padding: 3px 8px; border-radius: 20px; font-weight: 800; }
.impact.high { color: var(--red); background: #fff0ef; }
.impact.medium { color: var(--amber); background: #fff4df; }
.impact.low { color: var(--muted); background: #edf1ef; }
.improvement-body { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.improvement-body > div, .improvement-decision, .review-summary { padding: 11px; background: #f7faf8; border-radius: 8px; }
.improvement-body small, .improvement-decision small, .review-summary small { color: var(--muted); }
.improvement-body p, .improvement-decision p, .review-summary p { margin: 5px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.6; }
.improvement-decision { margin-top: 10px; }
.improvement-card > footer { margin-top: 11px; padding-top: 10px; display: flex; justify-content: space-between; gap: 10px; color: var(--muted); border-top: 1px solid var(--line); font-size: 10px; }
.credential-row { margin-top: 12px; padding: 11px; display: flex; justify-content: space-between; gap: 12px; background: var(--forest-soft); border-radius: 8px; }
.credential-row small { color: var(--muted); }
.credential-managed { align-items: center; }
.credential-managed small { display: block; margin-top: 3px; }
.credential-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.credential-actions button { min-height: 34px; padding: 5px 9px; font-size: 11px; }
.operation-metrics { margin: 12px 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.operation-metrics > div { padding: 11px; background: #f7faf8; border-radius: 8px; }
.operation-metrics span, .operation-metrics b { display: block; }
.operation-metrics span { color: var(--muted); font-size: 10px; }
.operation-metrics b { margin-top: 4px; font-size: 20px; }
.operations-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.operations-grid > section { min-width: 0; padding: 12px; border: 1px solid var(--line); border-radius: 9px; }
.operations-grid h3 { margin: 0 0 8px; font-size: 13px; }
.operations-grid .audit-section { grid-column: 1 / -1; }
.operation-list { display: grid; gap: 6px; max-height: 280px; overflow-y: auto; }
.operation-list article { padding: 9px; background: #f7faf8; border-radius: 7px; }
.operation-list b, .operation-list small { display: block; overflow-wrap: anywhere; }
.operation-list small { margin-top: 2px; color: var(--muted); font-size: 10px; }
.release-manager-card { overflow: hidden; }
.release-status-grid { margin: 14px 0 10px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.release-status-grid > div { min-width: 0; padding: 12px; background: #f7faf8; border-radius: 8px; }
.release-status-grid span, .release-status-grid b { display: block; overflow-wrap: anywhere; }
.release-status-grid span { color: var(--muted); font-size: 10px; }
.release-status-grid b { margin-top: 4px; font-size: 15px; }
.release-ready { color: var(--forest); }
.release-safety-note, .release-warning { padding: 11px 12px; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px; border-radius: 8px; font-size: 11px; }
.release-safety-note { color: var(--forest); background: var(--forest-soft); }
.release-warning { color: #7b5111; background: #fff4df; }
.release-safety-note span, .release-warning span { color: var(--muted); }
.release-list { margin-top: 10px; display: grid; gap: 7px; }
.release-row { padding: 11px; display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; align-items: center; gap: 9px; border: 1px solid var(--line); border-radius: 8px; }
.release-row.active { border-color: #8ab6a3; background: var(--forest-soft); }
.release-row b, .release-row small { display: block; overflow-wrap: anywhere; }
.release-row small { margin-top: 2px; color: var(--muted); font-size: 10px; }
.release-row p { margin: 5px 0 0; font-size: 11px; }
.release-mark { color: var(--forest); font-size: 18px; text-align: center; }
.release-row-action { display: flex; justify-content: flex-end; }
.user-management-list { margin-top: 10px; display: grid; gap: 7px; }
.managed-user-row { padding: 10px; display: grid; grid-template-columns: 36px minmax(180px, 1fr) 130px auto; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 8px; }
.managed-user-row small { display: block; color: var(--muted); }
.managed-user-row > div:nth-child(3) { display: grid; gap: 3px; }
.permission-checks { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 14px; }
.ai-preview-list, .ai-candidates { display: grid; gap: 8px; max-height: 55vh; overflow-y: auto; }
.ai-preview-item, .ai-candidate { padding: 11px; border: 1px solid var(--line); border-radius: 8px; }
.ai-preview-item p, .ai-candidate p { margin: 5px 0; white-space: pre-wrap; }
.ai-candidate footer { margin-top: 8px; display: flex; justify-content: space-between; align-items: center; }
.ai-candidate .candidate-meta { color: var(--muted); font-size: 10px; }
.mail-layout { min-height: 600px; display: grid; grid-template-columns: minmax(280px, 38%) minmax(0, 1fr); overflow: hidden; background: #fff; border: 1px solid var(--line); border-radius: 10px; }
.mail-list { border-right: 1px solid var(--line); overflow-y: auto; }
.mail-list-item { width: 100%; padding: 13px; display: block; color: var(--ink); border: 0; border-bottom: 1px solid var(--line); background: #fff; text-align: left; }
.mail-list-item:hover, .mail-list-item.active { background: var(--forest-soft); }
.mail-list-item b, .mail-list-item span, .mail-list-item small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mail-list-item small { color: var(--muted); }
.mail-detail { padding: 18px; overflow-y: auto; }
.mail-detail h2 { margin: 0 0 6px; }
.mail-addresses { color: var(--muted); font-size: 11px; line-height: 1.6; }
.mail-body { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.7; }
.attachment-list { margin-top: 14px; display: flex; flex-wrap: wrap; gap: 6px; }
.attachment-chip { padding: 6px 9px; background: #edf1ef; border-radius: 6px; font-size: 10px; }
.import-preview { margin-top: 12px; max-height: 46vh; overflow: auto; border: 1px solid var(--line); border-radius: 8px; }
.import-summary { padding: 10px; display: grid; gap: 4px; background: #f7faf8; border-bottom: 1px solid var(--line); font-size: 11px; }
.import-summary code { overflow-wrap: anywhere; color: var(--muted); }
.import-ok { margin: 10px; padding: 9px; color: var(--forest); background: var(--forest-soft); border-radius: 6px; font-size: 11px; }
.import-table-wrap { overflow-x: auto; }
.import-table { width: 100%; border-collapse: collapse; font-size: 10px; }
.import-table th, .import-table td { padding: 7px 9px; border-bottom: 1px solid var(--line); white-space: nowrap; text-align: left; }
.import-table th { color: var(--muted); background: #f9fbf9; }
.inventory-table { min-width: 900px; }
.ec-head-actions { flex-wrap: wrap; justify-content: flex-end; }
.ec-summary-head { margin-top: 3px; }
.ec-forecast-grid .metric { position: relative; overflow: hidden; }
.ec-forecast-grid .metric::before { position: absolute; inset: 0 auto 0 0; width: 4px; content: ""; background: #aeb8b2; }
.ec-forecast-grid .forecast-card.downside::before { background: var(--amber); }
.ec-forecast-grid .forecast-card.baseline::before { background: var(--forest); }
.ec-forecast-grid .forecast-card.upside::before { background: #3472a8; }
.ec-forecast-grid small, .coverage-card small, .season-chip small { margin-top: 5px; display: block; color: var(--muted); font-size: 10px; }
.ec-analysis-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.ec-data-sources { margin-bottom: 12px; }
.ec-data-sources .section-head p { margin: 3px 0 0; color: var(--muted); font-size: 11px; }
.data-source-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.data-source-card { min-width: 0; padding: 12px; display: grid; gap: 4px; background: #f7faf8; border: 1px solid var(--line); border-radius: 8px; }
.data-source-card span, .data-source-card small { color: var(--muted); }
.data-source-card b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.data-source-card small { font-size: 10px; }
.data-source-card.missing { color: var(--red); background: #fff4f3; }
.ec-freshness { margin-bottom: 12px; padding: 11px 13px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border: 1px solid var(--line); border-radius: 8px; }
.ec-freshness div { min-width: 0; display: grid; gap: 3px; }
.ec-freshness span, .ec-freshness small { color: var(--muted); font-size: 10px; }
.ec-freshness.ready { color: var(--forest-dark); background: var(--forest-soft); border-color: #b9d0c3; }
.ec-freshness.blocked { color: var(--red); background: #fff4f3; border-color: #e2aaa6; }
.ec-wide-card { grid-column: 1 / -1; }
.ec-item-demand-section { margin: 0 0 12px; }
.ec-item-demand-section > .section-head h2 { font-size: 18px; }
.ec-item-demand-section > .section-head p, .ec-item-detail .section-head p { margin: 3px 0 0; color: var(--muted); font-size: 11px; }
.item-demand-metrics .metric { padding: 13px; }
.item-demand-metrics .demand-critical { border-color: #e2aaa6; background: #fff8f7; }
.item-demand-metrics .demand-critical b { color: var(--red); }
.item-demand-metrics .demand-watch { border-color: #e9c79e; background: #fffaf3; }
.item-demand-metrics .demand-watch b { color: var(--amber); }
.item-demand-metrics .demand-excess { border-color: #b8c9df; background: #f5f8fc; }
.item-demand-metrics .demand-excess b { color: #3472a8; }
.ec-item-filters { align-items: end; }
.ec-item-filters label { min-width: 210px; margin-top: 0; }
.ec-item-filters .filter-result { margin-left: auto; align-self: center; color: var(--muted); font-size: 11px; }
.item-demand-table { min-width: 1320px; }
.item-demand-table th:nth-child(1) { width: 220px; }
.item-demand-table th:nth-child(2), .item-demand-table th:nth-child(3) { width: 180px; }
.item-demand-table th:nth-child(4) { width: 230px; }
.item-demand-table th:nth-child(6) { width: 190px; }
.item-demand-table td { vertical-align: top; }
.item-demand-table td:first-child { border-left: 4px solid transparent; }
.item-demand-row.critical td:first-child { border-left-color: var(--red); }
.item-demand-row.shortage td:first-child { border-left-color: #d8654f; }
.item-demand-row.watch td:first-child { border-left-color: var(--amber); }
.item-demand-row.sufficient td:first-child { border-left-color: var(--forest); }
.item-demand-row.excess td:first-child { border-left-color: #3472a8; }
.item-demand-row.selected { background: #f4f8f5; }
.item-demand-table td > small { margin-top: 4px; display: block; color: var(--muted); font-size: 10px; }
.item-detail-button { margin-top: 7px; padding: 4px 8px; color: var(--forest); border: 1px solid #b9cdc3; border-radius: 6px; background: #fff; font-size: 10px; font-weight: 750; }
.quantity-range { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; }
.quantity-range span, .quantity-range b { padding: 5px 6px; background: #f2f5f3; border-radius: 5px; text-align: center; white-space: nowrap; font-size: 10px; }
.quantity-range b { color: var(--forest-dark); background: var(--forest-soft); }
.demand-status { display: inline-flex; padding: 4px 7px; border-radius: 20px; white-space: nowrap; font-size: 10px; font-weight: 800; }
.demand-status.critical, .demand-status.shortage { color: var(--red); background: #fff0ef; }
.demand-status.watch { color: var(--amber); background: #fff4df; }
.demand-status.sufficient { color: var(--forest); background: var(--forest-soft); }
.demand-status.excess { color: #285f91; background: #eaf2fb; }
.demand-status.unknown, .demand-status.no-demand { color: var(--muted); background: #edf1ef; }
.rate-warning { color: var(--amber); }
.ec-item-detail { margin-top: 12px; padding: 13px; background: #f7faf8; border: 1px solid var(--line); border-radius: 9px; }
.ec-item-detail .section-head h3 { margin: 0; font-size: 15px; }
.item-detail-metrics { margin-bottom: 9px; }
.item-history-table { min-width: 600px; background: #fff; }
.item-data-warning { color: var(--red); font-weight: 750; }
.item-data-ok { color: var(--forest); font-weight: 750; }
.coverage-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.inventory-coverage-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.coverage-card { min-width: 0; padding: 12px; background: #f7faf8; border-radius: 8px; }
.coverage-card > span, .coverage-card > b { display: block; }
.coverage-card > span { color: var(--muted); font-size: 11px; }
.coverage-card > b { margin-top: 4px; font-size: 17px; }
.coverage-status { padding: 4px 8px; color: var(--muted); background: #edf1ef; border-radius: 20px; font-size: 10px; font-weight: 800; }
.coverage-status.sufficient { color: var(--forest); background: var(--forest-soft); }
.coverage-status.shortage { color: var(--red); background: #fff0ef; }
.coverage-status.blocked { color: var(--red); background: #fff0ef; }
.season-list { min-height: 76px; display: flex; flex-wrap: wrap; align-content: flex-start; gap: 8px; }
.season-chip { min-width: 118px; padding: 10px 12px; color: var(--forest-dark); background: var(--forest-soft); border-radius: 8px; }
.season-chip b { margin-right: 5px; font-size: 16px; }
.data-quality-note { margin: 11px 0 0; color: var(--muted); font-size: 10px; line-height: 1.6; }
.ec-ad-metrics { margin-bottom: 10px; }
.ec-ad-metrics .metric { padding: 12px; background: #f7faf8; }
.ec-table { min-width: 720px; }
.trend-table { min-width: 860px; }
.trend-value { min-width: 170px; }
.trend-bar { width: var(--bar-width); max-width: 100%; height: 4px; margin-top: 5px; display: block; background: var(--forest); border-radius: 4px; opacity: .75; }
.check-label { display: flex; align-items: center; gap: 8px; }
.check-label input { width: auto; min-height: auto; }
.form-note { color: var(--muted); font-size: 11px; }
#command-dialog { width: min(720px, calc(100vw - 28px)); max-height: min(760px, calc(100vh - 28px)); overflow: hidden; border-radius: 14px; }
#command-dialog form { padding: 0; }
.command-header { padding: 16px 18px 12px; border-bottom: 0; }
.command-header h2 { font-size: 17px; }
.command-search { margin: 0 18px; padding: 7px 10px; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 9px; color: var(--muted); border: 1px solid #aebdb5; border-radius: 9px; background: #fff; box-shadow: 0 0 0 3px rgba(7, 84, 63, .08); }
.command-search input { min-height: 38px; padding: 5px 0; border: 0; border-radius: 0; font-size: 15px; }
.command-search input:focus { outline: 0; }
.command-meta { padding: 9px 19px; display: flex; gap: 14px; color: var(--muted); border-bottom: 1px solid var(--line); font-size: 9px; }
.command-results { max-height: min(520px, calc(100vh - 210px)); padding: 8px; overflow-y: auto; }
.command-item { width: 100%; min-height: 56px; padding: 8px 10px; display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; align-items: center; gap: 10px; color: var(--ink); border: 0; border-radius: 8px; background: transparent; text-align: left; }
.command-item.active, .command-item:hover { background: var(--forest-pale); }
.command-icon { width: 32px; height: 32px; display: grid; place-items: center; color: var(--forest); background: #fff; border: 1px solid #d2ded8; border-radius: 8px; font-weight: 800; }
.command-item b, .command-item small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.command-item b { font-size: 12px; }
.command-item small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.command-type { padding: 3px 7px; color: var(--muted); background: #eef2f0; border-radius: 20px; font-size: 9px; white-space: nowrap; }
.command-empty { padding: 46px 20px; color: var(--muted); text-align: center; }
.command-empty b, .command-empty span { display: block; }
.command-empty b { color: var(--ink); font-size: 13px; }
.command-empty span { margin-top: 5px; font-size: 10px; }
.recurring-page-head { align-items: center; }
.rhythm-overview { margin-bottom: 14px; display: grid; grid-template-columns: repeat(3, minmax(130px, 1fr)) minmax(210px, 1.25fr); overflow: hidden; background: #fff; border: 1px solid var(--line); border-radius: 11px; box-shadow: 0 5px 18px rgba(19, 45, 34, .05); }
.rhythm-segment { min-height: 92px; padding: 16px; display: flex; align-items: center; gap: 12px; border-right: 1px solid var(--line); }
.rhythm-symbol { width: 43px; height: 43px; display: grid; place-items: center; color: var(--forest); background: var(--forest-pale); border: 1px solid #d1e0d8; border-radius: 50%; font-size: 17px; font-weight: 850; }
.rhythm-segment.weekly .rhythm-symbol { color: #355f7e; background: #edf4f8; border-color: #d4e1e9; }
.rhythm-segment.monthly .rhythm-symbol { color: #8d571a; background: #fbf2e7; border-color: #eadac5; }
.rhythm-segment small, .rhythm-next small { display: block; color: var(--muted); font-size: 10px; font-weight: 750; }
.rhythm-segment b, .rhythm-next b { display: block; margin-top: 3px; color: var(--ink); font-size: 24px; line-height: 1; }
.rhythm-segment em, .rhythm-next em { margin-left: 2px; font-size: 10px; font-style: normal; }
.rhythm-next { min-height: 92px; padding: 16px 18px; display: grid; align-content: center; background: var(--forest-dark); }
.rhythm-next small, .rhythm-next span { color: rgba(255, 255, 255, .7); }
.rhythm-next b { color: #fff; }
.rhythm-next span { margin-top: 5px; font-size: 10px; }
.recurring-grid { margin-bottom: 18px; display: grid; grid-template-columns: repeat(3, minmax(250px, 1fr)); gap: 12px; }
.recurring-grid > .empty-panel, .recurring-grid > .error { grid-column: 1 / -1; }
.recurring-empty span, .recurring-empty b { display: block; }
.recurring-empty > span { color: var(--forest); font-size: 30px; }
.recurring-empty b { margin-top: 7px; color: var(--ink); font-size: 15px; }
.recurring-empty p { margin: 6px 0 0; }
.recurring-card { position: relative; min-width: 0; overflow: hidden; display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: 11px; box-shadow: 0 5px 18px rgba(19, 45, 34, .055); }
.recurring-card-accent { height: 4px; background: var(--forest); }
.recurring-card.weekly .recurring-card-accent { background: #4f7895; }
.recurring-card.monthly .recurring-card-accent { background: #b27734; }
.recurring-card.paused { opacity: .7; box-shadow: none; }
.recurring-card > header { padding: 12px 14px 0; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.cadence-mark { display: flex; align-items: center; gap: 7px; }
.cadence-mark > span { width: 27px; height: 27px; display: grid; place-items: center; color: var(--forest); background: var(--forest-soft); border-radius: 50%; font-size: 10px; font-weight: 850; }
.recurring-card.weekly .cadence-mark > span { color: #355f7e; background: #edf4f8; }
.recurring-card.monthly .cadence-mark > span { color: #8d571a; background: #fbf2e7; }
.cadence-mark small { color: var(--muted); font-size: 10px; font-weight: 800; }
.next-run { margin: 11px 14px 0; padding: 12px 13px; background: #f5f8f6; border-radius: 8px; }
.next-run > span, .next-run > small { display: block; color: var(--muted); font-size: 9px; }
.next-run > b { display: block; margin: 3px 0 2px; color: var(--forest-dark); font-size: 24px; line-height: 1.05; }
.next-run > b em { margin-left: 3px; font-size: 11px; font-style: normal; }
.recurring-card-title { padding: 13px 14px 9px; }
.recurring-card-title > small { color: var(--forest); font-size: 9px; font-weight: 800; }
.recurring-card-title h2 { margin: 3px 0 5px; overflow-wrap: anywhere; font-size: 15px; }
.recurring-card-title p { min-height: 32px; margin: 0; color: var(--muted); font-size: 10px; line-height: 1.55; }
.recurring-checklist { margin: 0 14px 13px; padding: 0; list-style: none; border-top: 1px solid #edf1ef; }
.recurring-checklist li { padding: 8px 1px; display: grid; grid-template-columns: 19px minmax(0, 1fr); gap: 6px; border-bottom: 1px solid #edf1ef; }
.recurring-checklist li > span { width: 17px; height: 17px; display: grid; place-items: center; color: var(--forest); background: var(--forest-soft); border-radius: 50%; font-size: 8px; font-weight: 900; }
.recurring-checklist b, .recurring-checklist small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.recurring-checklist b { font-size: 10px; }
.recurring-checklist small { margin-top: 2px; color: var(--muted); font-size: 8px; }
.recurring-checklist .more b { color: var(--muted); }
.recurring-card > footer { margin-top: auto; padding: 10px 14px 13px; border-top: 1px solid var(--line); }
.reminder-badges { min-height: 22px; display: flex; flex-wrap: wrap; gap: 4px; }
.reminder-badge { padding: 3px 6px; color: var(--muted); background: #f0f3f1; border-radius: 20px; font-size: 8px; font-weight: 800; }
.reminder-badge.portal { color: var(--forest); background: var(--forest-soft); }
.reminder-badge.email { color: #355f7e; background: #edf4f8; }
.reminder-badge.line { color: #397d41; background: #eaf5eb; border: 1px dashed #8fbc94; }
.recurring-card-actions { margin-top: 9px; display: flex; align-items: center; justify-content: space-between; gap: 7px; }
.recurring-card-actions small { color: var(--muted); font-size: 8px; }
.recurring-card-actions button { min-height: 30px; padding: 4px 8px; font-size: 9px; }
.line-concierge { padding: 19px; background: #fff; border: 1px solid var(--line); border-radius: 11px; box-shadow: 0 5px 18px rgba(19, 45, 34, .05); }
.line-concierge > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.line-concierge h2 { margin: 2px 0 4px; font-size: 18px; }
.line-concierge header p { margin: 0; color: var(--muted); font-size: 11px; }
.line-connection-state { display: flex; align-items: center; gap: 7px; }
.line-connection-state > span { padding: 4px 8px; color: var(--red); background: #faecea; border-radius: 20px; font-size: 9px; font-weight: 850; white-space: nowrap; }
.line-connection-state > span.is-active { color: var(--forest); background: var(--forest-soft); }
.line-connection-state button { min-height: 34px; padding: 5px 9px; font-size: 10px; }
.concierge-flow { margin-top: 17px; display: grid; grid-template-columns: repeat(7, auto); align-items: center; justify-content: center; gap: 9px; }
.flow-node { width: 132px; min-height: 91px; padding: 11px 8px; display: grid; place-items: center; align-content: center; background: #f7f9f8; border: 1px solid var(--line); border-radius: 9px; text-align: center; }
.flow-node > span { width: 28px; height: 28px; display: grid; place-items: center; color: var(--forest); background: var(--forest-soft); border-radius: 50%; font-size: 10px; font-weight: 900; }
.flow-node.line > span { color: #2b7a36; background: #e7f5e8; }
.flow-node.proposal > span { color: #8d571a; background: #fbf2e7; }
.flow-node b { margin-top: 6px; font-size: 10px; }
.flow-node small { margin-top: 2px; color: var(--muted); font-size: 8px; }
.flow-arrow { color: #94a29b; font-size: 15px; }
.concierge-modes { margin-top: 16px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.concierge-modes article { position: relative; padding: 11px 12px; background: #f7f9f8; border: 1px solid var(--line); border-radius: 8px; }
.concierge-modes article.recommended { border-color: #a9c7b7; background: var(--forest-pale); }
.concierge-modes span { color: var(--forest); font-size: 8px; font-weight: 850; }
.concierge-modes b, .concierge-modes small { display: block; }
.concierge-modes b { margin-top: 3px; font-size: 11px; }
.concierge-modes small { margin-top: 3px; color: var(--muted); font-size: 9px; line-height: 1.45; }
.line-setup-details { margin-top: 14px; padding: 14px; background: #f8faf9; border: 1px dashed #bdcbc4; border-radius: 8px; }
.line-setup-details ol { margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; list-style: none; counter-reset: line-step; }
.line-setup-details li { position: relative; padding: 4px 4px 4px 31px; counter-increment: line-step; }
.line-setup-details li::before { content: counter(line-step); position: absolute; left: 0; top: 2px; width: 23px; height: 23px; display: grid; place-items: center; color: #fff; background: var(--forest); border-radius: 50%; font-size: 9px; font-weight: 850; }
.line-setup-details b, .line-setup-details span { display: block; }
.line-setup-details b { font-size: 10px; }
.line-setup-details span { margin-top: 3px; color: var(--muted); font-size: 8px; line-height: 1.5; }
.line-setup-details p { margin: 12px 0 0; padding-top: 9px; color: var(--muted); border-top: 1px solid var(--line); font-size: 9px; }
.line-console-grid { display: grid; grid-template-columns: minmax(280px, .9fr) minmax(420px, 1.4fr); gap: 10px; }
.line-console-card, .line-inbox { padding: 13px; background: #fff; border: 1px solid var(--line); border-radius: 8px; }
.line-console-card > header, .line-inbox > header, .line-inbox-card > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.line-console-card h3, .line-inbox h3 { margin: 2px 0 0; font-size: 13px; }
.line-console-card header small, .line-inbox header small { color: var(--forest); font-size: 8px; font-weight: 850; }
.line-console-card header > b, .line-inbox > header > b { color: var(--forest); font-size: 16px; }
.safe-chip { padding: 4px 7px; color: var(--forest); background: var(--forest-soft); border-radius: 20px; font-size: 8px; font-weight: 800; white-space: nowrap; }
.line-config-form { margin-top: 11px; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.line-config-form label:first-child { grid-column: 1 / -1; }
.line-config-form label { margin: 0; font-size: 8px; }
.line-config-form input, .line-config-form select { width: 100%; min-width: 0; margin-top: 4px; }
.line-config-form button { align-self: end; min-height: 38px; }
.line-security-note { line-height: 1.5; }
.line-group-list { margin-top: 10px; display: grid; gap: 7px; }
.line-group-card { padding: 9px; display: grid; grid-template-columns: minmax(145px, 1.3fr) minmax(120px, 1fr) minmax(105px, .8fr) 90px auto; align-items: end; gap: 7px; background: #f8faf9; border: 1px solid var(--line); border-radius: 7px; }
.line-group-card > div { align-self: center; min-width: 0; }
.line-group-card > div b, .line-group-card > div small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.line-group-card > div b { font-size: 10px; }
.line-group-card > div small { margin-top: 3px; color: var(--muted); font-size: 8px; }
.line-group-card label { margin: 0; font-size: 8px; }
.line-group-card input, .line-group-card select { width: 100%; min-width: 0; margin-top: 3px; }
.line-group-card button { min-height: 36px; padding: 5px 9px; }
.line-state-dot { width: 7px; height: 7px; display: inline-block; margin-right: 4px; background: #c5954d; border-radius: 50%; }
.line-group-card.allowed .line-state-dot { background: #3b8a5f; }
.line-group-card.blocked .line-state-dot { background: #a6ada9; }
.line-inbox { margin-top: 10px; }
.line-inbox-list { margin-top: 9px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.line-inbox-card { padding: 11px; background: #fbfcfb; border: 1px solid var(--line); border-left: 3px solid var(--forest); border-radius: 7px; }
.line-inbox-card header b, .line-inbox-card header small { display: block; }
.line-inbox-card header b { font-size: 10px; }
.line-inbox-card header small { margin-top: 3px; color: var(--muted); font-size: 8px; }
.line-inbox-card header > span { padding: 3px 6px; color: var(--forest); background: var(--forest-soft); border-radius: 20px; font-size: 8px; white-space: nowrap; }
.line-inbox-card p { min-height: 39px; margin: 10px 0; padding: 0; color: var(--ink); border: 0; font-size: 10px; line-height: 1.55; }
.line-inbox-card footer { display: flex; justify-content: flex-end; gap: 6px; }
.line-inbox-card footer button { min-height: 32px; padding: 5px 8px; font-size: 9px; }
.empty-panel.compact { padding: 15px; font-size: 9px; }
.work-week-nav { margin: 12px 0; display: grid; grid-template-columns: auto minmax(180px, 280px) auto; justify-content: center; align-items: stretch; gap: 8px; }
.work-week-label { padding: 7px 18px; color: var(--ink); background: #fff; border: 1px solid var(--line); border-radius: 8px; }
.work-week-label b, .work-week-label small { display: block; }
.work-week-label b { font-size: 13px; }
.work-week-label small { margin-top: 2px; color: var(--muted); font-size: 8px; }
.work-record-metrics .metric { min-width: 0; }
.work-record-metrics .metric b { overflow-wrap: anywhere; }
.work-record-metrics .metric small { color: var(--muted); font-size: 9px; }
.work-record-metrics .metric.warning { border-color: #e2cda9; background: #fffaf1; }
.work-visual-grid { margin: 13px 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.work-visual-card { padding: 15px; background: #fff; border: 1px solid var(--line); border-radius: 10px; }
.work-visual-card > header { margin-bottom: 12px; display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.work-visual-card h2 { margin: 2px 0 0; font-size: 15px; }
.work-visual-card header small { color: var(--muted); font-size: 9px; }
.work-visual-card header > span { padding: 4px 7px; color: var(--forest); background: var(--forest-pale); border-radius: 20px; font-size: 8px; font-weight: 800; }
.work-bars { display: grid; gap: 9px; }
.work-bar-row { display: grid; grid-template-columns: minmax(105px, .8fr) minmax(120px, 1.2fr); align-items: center; gap: 10px; }
.work-bar-row > div { min-width: 0; }
.work-bar-row b, .work-bar-row small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.work-bar-row b { font-size: 10px; }
.work-bar-row small { margin-top: 2px; color: var(--muted); font-size: 8px; }
.work-bar-row > span { height: 8px; overflow: hidden; background: #e8eee9; border-radius: 20px; }
.work-bar-row i { height: 100%; display: block; background: linear-gradient(90deg, var(--forest), #66a57f); border-radius: inherit; }
.person-department-visual { margin: 13px 0; padding: 15px; background: #fff; border: 1px solid var(--line); border-radius: 10px; }
.person-department-visual > header { margin-bottom: 13px; display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; }
.person-department-visual > header small { color: var(--muted); font-size: 9px; }
.person-department-visual > header h2 { margin: 2px 0 0; font-size: 15px; }
.person-department-visual > header p { margin: 4px 0 0; color: var(--muted); font-size: 9px; }
.person-department-legend { max-width: 58%; display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 5px 10px; }
.person-department-legend span { display: flex; align-items: center; gap: 4px; color: var(--muted); font-size: 8px; white-space: nowrap; }
.person-department-legend i { width: 7px; height: 7px; flex: 0 0 7px; border-radius: 50%; }
.person-department-no-legend { padding: 4px 7px; color: var(--muted); background: #f2f5f2; border-radius: 20px; font-size: 8px; white-space: nowrap; }
.person-department-rows { display: grid; gap: 7px; }
.person-department-group { min-width: 0; overflow: hidden; background: #fbfcfb; border: 1px solid transparent; border-radius: 8px; }
.person-department-group.open { background: #fff; border-color: #dbe5dd; box-shadow: 0 5px 15px rgba(16, 63, 47, .06); }
.person-department-row { width: 100%; min-width: 0; min-height: 48px; padding: 8px 9px; display: grid; grid-template-columns: minmax(120px, .7fr) minmax(180px, 2fr) 90px 22px; align-items: center; gap: 11px; color: var(--ink); background: transparent; border: 0; border-radius: 8px; text-align: left; cursor: pointer; }
.person-department-row:hover { background: #f4f8f5; }
.person-department-row:focus-visible { outline: 2px solid var(--forest); outline-offset: -2px; }
.person-department-person { min-width: 0; display: flex; align-items: center; gap: 7px; }
.person-department-person b { overflow: hidden; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.person-department-track { min-width: 0; height: 15px; display: flex; overflow: hidden; background: #e9eee9; border-radius: 20px; }
.person-department-segment { height: 100%; display: block; border-right: 1px solid rgba(255, 255, 255, .58); }
.person-department-track.missing, .person-department-track.zero { height: 25px; align-items: center; justify-content: center; color: var(--muted); background: transparent; border: 1px dashed #cbd4cd; font-size: 8px; }
.person-department-track.zero { border-style: solid; }
.person-department-total { min-width: 0; text-align: right; }
.person-department-total b, .person-department-total small { display: block; }
.person-department-total b { font-size: 11px; }
.person-department-total small { margin-top: 2px; color: var(--muted); font-size: 8px; }
.person-department-toggle { width: 22px; height: 22px; display: grid; place-items: center; color: var(--forest); background: var(--forest-pale); border-radius: 50%; font-size: 15px; line-height: 1; transition: transform .16s ease; }
.person-department-group.open .person-department-toggle { transform: rotate(180deg); }
.person-work-details { padding: 0 10px 10px; }
.person-work-detail-head { padding: 8px 2px 7px; display: flex; justify-content: space-between; align-items: center; border-top: 1px solid var(--line); }
.person-work-detail-head b { font-size: 10px; }
.person-work-detail-head small { color: var(--muted); font-size: 8px; }
.person-work-detail-list { display: grid; gap: 5px; }
.person-work-detail-row { padding: 7px 8px; display: grid; grid-template-columns: 48px minmax(75px, auto) minmax(150px, 1fr) 120px; align-items: center; gap: 9px; background: #f5f8f6; border-left: 3px solid var(--forest); border-radius: 6px; }
.person-work-detail-row.planned { border-left-color: #c99d54; }
.person-work-detail-row time, .person-work-name, .person-work-time { min-width: 0; }
.person-work-detail-row time b, .person-work-detail-row time small, .person-work-name b, .person-work-name small, .person-work-time b, .person-work-time small { display: block; }
.person-work-detail-row time b { font-size: 9px; }
.person-work-detail-row time small, .person-work-name small, .person-work-time small { margin-top: 2px; color: var(--muted); font-size: 8px; }
.person-work-department { max-width: 130px; padding: 3px 6px; overflow: hidden; color: var(--forest); background: var(--forest-pale); border-radius: 20px; font-size: 8px; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }
.person-work-name b { overflow: hidden; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.person-work-name small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.person-work-time { text-align: right; }
.person-work-time b { margin-top: 2px; font-size: 9px; }
.work-record-list { margin-top: 14px; }
.work-record-list .section-head p { margin: 2px 0 0; color: var(--muted); font-size: 9px; }
.work-record-row { margin-bottom: 7px; padding: 11px 12px; display: grid; grid-template-columns: 62px minmax(130px, .8fr) minmax(190px, 1.5fr) minmax(165px, .8fr) auto; align-items: center; gap: 12px; background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--forest); border-radius: 9px; }
.work-record-row.planned { border-left-color: #c99d54; }
.work-record-row time { text-align: center; }
.work-record-row time b, .work-record-row time small { display: block; }
.work-record-row time b { font-size: 12px; }
.work-record-row time small { color: var(--muted); font-size: 8px; }
.work-record-person { min-width: 0; display: flex; align-items: center; gap: 8px; }
.avatar.small { width: 29px; height: 29px; flex: 0 0 29px; font-size: 10px; }
.work-record-person div, .work-record-detail { min-width: 0; }
.work-record-person b, .work-record-person small, .work-record-detail b, .work-record-detail small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.work-record-person b, .work-record-detail b { font-size: 10px; }
.work-record-person small, .work-record-detail small { margin-top: 3px; color: var(--muted); font-size: 8px; }
.work-record-hours { display: flex; justify-content: flex-end; gap: 12px; }
.work-record-hours span { color: var(--muted); font-size: 8px; text-align: right; }
.work-record-hours b { margin-top: 2px; display: block; color: var(--ink); font-size: 10px; }
.work-record-row > button { min-height: 34px; padding: 5px 9px; }
.work-record-empty b, .work-record-empty span { display: block; }
.work-record-empty span { margin-top: 5px; color: var(--muted); }
#recurring-sheet-dialog { width: min(720px, calc(100vw - 30px)); }
.recurring-form-intro { margin: 12px 0 3px; padding: 10px 12px; display: flex; align-items: center; gap: 10px; background: var(--forest-pale); border-radius: 8px; }
.recurring-form-intro > span { width: 29px; height: 29px; display: grid; place-items: center; color: #fff; background: var(--forest); border-radius: 50%; font-weight: 850; }
.recurring-form-intro p { margin: 0; }
.recurring-form-intro b, .recurring-form-intro small { display: block; }
.recurring-form-intro b { font-size: 11px; }
.recurring-form-intro small { margin-top: 2px; color: var(--muted); font-size: 9px; }
.recurrence-choice, .reminder-choice { margin: 15px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; border: 0; }
.recurrence-choice legend, .reminder-choice legend { margin-bottom: 7px; color: var(--muted); font-size: 10px; font-weight: 800; }
.recurrence-choice label, .reminder-choice label { position: relative; min-width: 0; min-height: 75px; margin: 0; padding: 10px; display: grid; grid-template-columns: 30px minmax(0, 1fr); grid-template-rows: auto auto; align-items: center; gap: 1px 8px; color: var(--ink); background: #fff; border: 1px solid var(--line); border-radius: 8px; cursor: pointer; }
.recurrence-choice input, .reminder-choice input { position: absolute; opacity: 0; pointer-events: none; }
.recurrence-choice label > span, .reminder-choice label > span { grid-row: 1 / 3; width: 30px; height: 30px; display: grid; place-items: center; color: var(--forest); background: var(--forest-soft); border-radius: 50%; font-size: 9px; font-weight: 900; }
.recurrence-choice label > b, .reminder-choice label > b { font-size: 11px; }
.recurrence-choice label > small, .reminder-choice label > small { color: var(--muted); font-size: 8px; }
.recurrence-choice label:has(input:checked), .reminder-choice label:has(input:checked) { border-color: var(--forest); background: var(--forest-pale); box-shadow: 0 0 0 2px rgba(7, 84, 63, .07); }
.reminder-choice label.planned { border-style: dashed; }
.reminder-choice label.planned > span { color: #397d41; background: #e7f5e8; border-radius: 8px; }
.field-help { color: var(--muted); font-size: 9px; font-weight: 500; }
.recurring-timing > label[hidden] { display: none; }
dialog { width: min(580px, calc(100vw - 30px)); padding: 0; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 24px 70px rgba(0, 0, 0, .25); }
#import-dialog { width: min(980px, calc(100vw - 30px)); }
dialog::backdrop { background: rgba(5, 35, 26, .42); }
dialog form { padding: 20px; }
dialog header { display: flex; justify-content: space-between; align-items: flex-start; }
dialog header small { color: var(--forest); font-weight: 800; }
dialog h2 { margin: 3px 0; }
dialog header button { width: 34px; height: 34px; border: 0; background: transparent; font-size: 23px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
dialog footer { margin-top: 20px; display: flex; justify-content: flex-end; gap: 8px; }
#toast { position: fixed; right: 18px; bottom: 18px; z-index: 50; max-width: 380px; padding: 11px 14px; color: #fff; background: var(--forest-dark); border-radius: 8px; opacity: 0; transform: translateY(8px); transition: .2s; pointer-events: none; }
#toast.show { opacity: 1; transform: none; }
@media (max-width: 1200px) {
  .metrics.five { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .recurring-grid { grid-template-columns: repeat(2, minmax(250px, 1fr)); }
  .concierge-flow { gap: 6px; }
  .flow-node { width: 116px; }
  .command-trigger { width: min(360px, 45vw); }
  .filters { flex-wrap: wrap; }
  .filters label { flex: 1 1 160px; min-width: 0; }
  .filters select, .filters input { width: 100%; min-width: 0; }
  .filters .filter-check { flex: 0 1 150px; }
  .chat-layout, .chat-layout.thread-open { height: auto; max-height: none; grid-template-columns: 200px minmax(0, 1fr); }
  .chat-main { min-height: 610px; }
  .chat-context { grid-column: 1 / -1; display: block; max-height: 420px; border-top: 1px solid var(--line); border-left: 0; }
  .chat-layout.thread-open .chat-thread { grid-column: 1 / -1; min-height: 520px; border-top: 1px solid var(--line); border-left: 0; }
}
@media (max-width: 900px) {
  .shell { grid-template-columns: 76px 1fr; }
  .rhythm-overview { grid-template-columns: repeat(2, 1fr); }
  .rhythm-segment:nth-child(2) { border-right: 0; }
  .rhythm-segment { border-bottom: 1px solid var(--line); }
  .rhythm-next { min-height: 92px; }
  .concierge-flow { grid-template-columns: repeat(4, 1fr); gap: 7px; }
  .flow-node { width: auto; }
  .flow-arrow { display: none; }
  .line-console-grid { grid-template-columns: 1fr; }
  .line-group-card { grid-template-columns: minmax(150px, 1.3fr) minmax(120px, 1fr) minmax(105px, .8fr) 90px auto; overflow-x: auto; }
  .brand { font-size: 0; text-align: center; }
  .brand::before { content: "ア"; font-size: 20px; }
  .nav-group-label { display: none; }
  .nav button { padding: 8px 4px; text-align: center; font-size: 0; }
  .nav button::first-letter { font-size: 16px; }
  .chat-nav-button { position: relative; justify-content: center; }
  .chat-nav-label { font-size: 0; }
  .chat-nav-label::first-letter { font-size: 16px; }
  .chat-nav-button .nav-unread { position: absolute; top: 3px; right: 3px; min-width: 18px; height: 18px; padding: 0 4px; font-size: 8px; }
  .chat-page-head { flex-wrap: wrap; }
  .chat-page-head > div { min-width: 0; }
  .chat-focus { width: 100%; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .board { grid-template-columns: repeat(4, 270px); }
  .inventory-coverage-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .work-record-row { grid-template-columns: 58px minmax(120px, .8fr) minmax(170px, 1.3fr) minmax(145px, .8fr) auto; gap: 8px; }
}
@media (max-width: 680px) {
  .shell { display: block; }
  .recurring-page-head .actions, .recurring-page-head .primary { width: 100%; }
  .rhythm-overview { grid-template-columns: repeat(2, 1fr); }
  .rhythm-segment { min-height: 78px; padding: 11px; }
  .rhythm-symbol { width: 35px; height: 35px; }
  .rhythm-segment b, .rhythm-next b { font-size: 20px; }
  .rhythm-next { min-height: 78px; padding: 11px 13px; }
  .recurring-grid { grid-template-columns: 1fr; }
  .line-concierge { padding: 14px; }
  .line-concierge > header { align-items: stretch; flex-direction: column; gap: 10px; }
  .line-connection-state { justify-content: space-between; }
  .concierge-flow { grid-template-columns: repeat(2, 1fr); }
  .flow-node { min-height: 84px; }
  .concierge-modes { grid-template-columns: 1fr; }
  .line-setup-details ol { grid-template-columns: 1fr; }
  .line-setup-details { padding: 9px; }
  .line-config-form, .line-group-card, .line-inbox-list { grid-template-columns: 1fr; }
  .line-config-form label:first-child { grid-column: auto; }
  .line-group-card { overflow: visible; }
  .line-inbox-card footer { align-items: stretch; flex-direction: column-reverse; }
  .line-inbox-card footer button { width: 100%; }
  .recurrence-choice, .reminder-choice { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .recurrence-choice label, .reminder-choice label { min-height: 88px; padding: 8px 5px; grid-template-columns: 1fr; grid-template-rows: 32px auto auto; place-items: center; text-align: center; }
  .recurrence-choice label > span, .reminder-choice label > span { grid-row: auto; width: 29px; height: 29px; }
  .sidebar { position: static; width: 100%; height: auto; padding: 10px 12px; }
  .brand { margin: 0; font-size: 17px; text-align: left; }
  .brand::before { content: none; }
  .mobile-menu-toggle { min-width: 76px; min-height: 40px; padding: 6px 10px; display: grid; grid-template-columns: auto auto; place-items: center; gap: 5px; color: #fff; border: 1px solid rgba(255, 255, 255, .28); border-radius: 8px; background: rgba(255, 255, 255, .08); }
  .mobile-menu-toggle .menu-label { font-size: 10px; }
  .nav { max-height: 0; margin-top: 0; grid-template-columns: repeat(4, 1fr); overflow: hidden; opacity: 0; visibility: hidden; pointer-events: none; transition: max-height .2s ease, opacity .15s ease, margin .2s ease; }
  .sidebar.menu-open .nav { max-height: 620px; margin-top: 10px; opacity: 1; visibility: visible; pointer-events: auto; }
  .nav button { font-size: 10px; }
  .chat-nav-button { justify-content: space-between; }
  .chat-nav-label { font-size: 10px; }
  .chat-nav-label::first-letter { font-size: inherit; }
  .chat-nav-button .nav-unread { position: static; min-width: 18px; height: 18px; }
  .topbar { min-height: 54px; padding: 7px 12px; justify-content: space-between; gap: 7px; }
  .topbar-workspace { order: 2; flex: 0 0 auto; }
  .workspace-breadcrumb { display: none; }
  .command-trigger { width: 40px; min-height: 38px; padding: 7px; display: grid; grid-template-columns: 1fr; place-items: center; }
  .command-trigger > span:nth-child(2), .command-trigger kbd { display: none; }
  .user { order: 1; min-width: 0; flex: 1; gap: 7px; }
  .user > span:nth-child(2) { flex: 1; min-width: 0; white-space: nowrap; }
  .topbar .secondary { min-height: 36px; padding: 6px 9px; font-size: 11px; }
  .content { padding: 15px 12px; }
  .environment-banner { padding: 8px 12px; align-items: flex-start; flex-direction: column; gap: 2px; }
  .page-head h1 { font-size: 23px; }
  .ec-head-actions { width: 100%; justify-content: flex-start; }
  .ec-head-actions > .secondary { flex: 1; padding-inline: 7px; font-size: 11px; }
  .metrics { grid-template-columns: 1fr; }
  .metrics.four { grid-template-columns: repeat(2, 1fr); }
  .metrics.five { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dashboard-grid, .goal-grid, .ec-analysis-grid, .data-source-grid { grid-template-columns: 1fr; }
  .ec-wide-card { grid-column: auto; }
  .coverage-grid, .inventory-coverage-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .item-detail-metrics { grid-template-columns: 1fr; }
  .ec-item-filters .filter-result { margin-left: 0; }
  .ec-forecast-grid .metric { padding: 13px; }
  .ec-forecast-grid .metric b { font-size: 18px; }
  .season-chip { flex: 1 1 120px; }
  .ec-freshness { align-items: flex-start; flex-direction: column; }
  .filters { display: grid; }
  .filters select { width: 100%; }
  .board { grid-template-columns: repeat(4, 82vw); }
  .event-row { grid-template-columns: 90px 1fr; }
  .event-attendees { grid-column: 1 / -1; text-align: left; }
  .work-record-head .actions, .work-record-head .primary { width: 100%; }
  .work-week-nav { grid-template-columns: auto minmax(0, 1fr) auto; }
  .work-week-nav .secondary { padding-inline: 9px; font-size: 9px; }
  .work-week-label { padding-inline: 8px; }
  .work-visual-grid { grid-template-columns: 1fr; }
  .work-bar-row { grid-template-columns: minmax(100px, .9fr) minmax(100px, 1.1fr); }
  .person-department-visual { padding: 13px; }
  .person-department-visual > header { align-items: stretch; flex-direction: column; gap: 9px; }
  .person-department-legend { max-width: none; justify-content: flex-start; }
  .person-department-row { grid-template-columns: minmax(0, 1fr) auto 22px; gap: 7px 8px; }
  .person-department-track { grid-column: 1 / -1; grid-row: 2; }
  .person-department-total { grid-column: 2; grid-row: 1; }
  .person-department-toggle { grid-column: 3; grid-row: 1; }
  .person-work-details { padding-inline: 7px; }
  .person-work-detail-row { grid-template-columns: 45px minmax(0, 1fr) auto; gap: 6px; }
  .person-work-department { grid-column: 2; grid-row: 1; justify-self: start; max-width: 100%; }
  .person-work-name { grid-column: 2 / -1; grid-row: 2; }
  .person-work-time { grid-column: 3; grid-row: 1; }
  .person-work-detail-row time { grid-row: 1 / 3; }
  .work-record-row { grid-template-columns: 48px minmax(0, 1fr) auto; gap: 8px; }
  .work-record-person { grid-column: 2; }
  .work-record-detail { grid-column: 2 / -1; }
  .work-record-hours { grid-column: 2; justify-content: flex-start; }
  .work-record-row > button { grid-column: 3; grid-row: 1 / 3; align-self: center; }
  .work-record-filters { grid-template-columns: 1fr 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .period-controls { width: 100%; }
  .period-controls label { flex: 1; }
  .page-head { flex-wrap: wrap; }
  .chat-page-head { align-items: flex-start; }
  .chat-focus { width: 100%; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .chat-focus button { min-height: 46px; padding: 6px 8px; }
  .chat-focus span { font-size: 8px; }
  .chat-focus b { font-size: 15px; }
  .chat-toolbar { align-items: stretch; flex-direction: column; }
  .chat-toolbar label, .chat-toolbar select { width: 100%; min-width: 0; }
  .chat-toolbar-actions { width: 100%; }
  .chat-toolbar-actions button { flex: 1; }
  .chat-layout, .chat-layout.thread-open { grid-template-columns: 1fr; }
  .chat-channels { padding: 10px; overflow: hidden; border-right: 0; border-bottom: 1px solid var(--line); }
  .chat-channel-tools { grid-template-columns: minmax(0, 1fr) 140px; align-items: center; }
  .chat-channel-list { display: flex; overflow-x: auto; gap: 6px; padding-bottom: 2px; scrollbar-width: none; }
  .chat-channel-list::-webkit-scrollbar { display: none; }
  .chat-channel { flex: 0 0 158px; }
  .chat-main { min-height: 590px; }
  .chat-head { align-items: flex-start; flex-wrap: wrap; gap: 9px; }
  .chat-head-actions { width: 100%; }
  .chat-search { flex: 1; }
  .chat-search input { width: 100%; min-width: 0; }
  .chat-head-actions .secondary { flex: 0 0 auto; }
  .chat-search-result { align-items: flex-start; flex-direction: column; gap: 2px; }
  .chat-context { grid-column: auto; grid-template-columns: 1fr; }
  .chat-layout.thread-open .chat-thread, .chat-thread { grid-column: auto; min-height: 520px; border-left: 0; border-top: 1px solid var(--line); }
  .chat-message { grid-template-columns: 32px minmax(0, 1fr); }
  .chat-message > .message-actions { grid-column: 2; display: flex; justify-items: start; justify-content: flex-start; }
  .chat-message > .message-actions { opacity: 1; }
  .chat-composer footer { align-items: flex-end; }
  .chat-composer footer span { max-width: 66%; }
  .composer-tools > span { display: none; }
  #command-dialog { width: calc(100vw - 16px); max-height: calc(100vh - 16px); }
  .command-header { padding: 14px 14px 10px; }
  .command-search { margin: 0 14px; }
  .command-meta { padding-inline: 15px; }
  .improvement-body { grid-template-columns: 1fr; }
  .improvement-card > footer { display: grid; }
  .shared-grid { grid-template-columns: 1fr; }
  .admin-grid { grid-template-columns: 1fr; }
  .notification-settings { max-width: none; }
  .push-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .push-actions button { width: 100%; padding-inline: 8px; font-size: 11px; }
  .wide-card { grid-column: auto; }
  .operation-metrics { grid-template-columns: repeat(2, 1fr); }
  .operations-grid { grid-template-columns: 1fr; }
  .operations-grid .audit-section { grid-column: auto; }
  .release-status-grid { grid-template-columns: 1fr; }
  .release-safety-note, .release-warning { grid-template-columns: 1fr; }
  .release-row { grid-template-columns: 24px minmax(0, 1fr); align-items: start; }
  .release-row-action { grid-column: 2; justify-content: flex-start; }
  .credential-managed { align-items: flex-start; }
  .credential-actions { justify-content: flex-start; }
  .managed-user-row { grid-template-columns: 36px minmax(0, 1fr) auto; }
  .managed-user-row > div:nth-child(3) { grid-column: 2; }
  .mail-layout { grid-template-columns: 1fr; }
  .mail-list { max-height: 250px; border-right: 0; border-bottom: 1px solid var(--line); }
}
@media (prefers-reduced-motion: reduce) {
  * { transition-duration: .01ms !important; }
}
