:root {
  --brand: #D7005B;
  --brand-dark: #a90046;
  --ink: #20242a;
  --muted: #6a7280;
  --line: #dde2ea;
  --panel: #ffffff;
  --page: #f5f7fa;
  --good: #0e8f62;
  --warn: #c77800;
  --bad: #c92a2a;
  --danger: #c92a2a;
  --blue: #1e63b6;
  --shadow: 0 14px 34px rgba(20, 26, 34, 0.12);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  color: var(--ink);
  background: var(--page);
  font-family: Arial, "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
  letter-spacing: 0;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

.multiline-text {
  white-space: pre-wrap;
}

.login-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 420px;
}

.login-visual {
  padding: 48px;
  color: #fff;
  background:
    linear-gradient(135deg, rgba(215, 0, 91, 0.94), rgba(22, 25, 31, 0.9)),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.16) 0 1px, transparent 1px 88px),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.1) 0 1px, transparent 1px 88px);
  background-size: cover;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.login-visual h1 {
  margin: 0;
  max-width: 680px;
  font-size: clamp(36px, 5vw, 72px);
  line-height: 1.04;
}

.login-visual p {
  max-width: 620px;
  font-size: 18px;
  line-height: 1.7;
}

.login-title-lockup {
  margin-top: auto;
}

.login-logo {
  font-size: clamp(38px, 6.8vw, 96px);
  line-height: 0.95;
  font-weight: 900;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

.login-card {
  background: #fff;
  padding: 44px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  border-left: 1px solid rgba(0, 0, 0, 0.08);
}

.brand-row {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  font-size: 20px;
  margin-bottom: 28px;
}

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: var(--brand);
}

.field {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
}

.field label {
  font-size: 13px;
  font-weight: 700;
  color: #424a55;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 11px 12px;
  outline: none;
}

.field textarea {
  resize: vertical;
  min-height: 90px;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(215, 0, 91, 0.12);
}

.input-action {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.table-inline-action {
  min-width: 240px;
}

.table-inline-action .table-input {
  min-width: 130px;
}

.table-inline-action .ghost {
  padding: 8px 10px;
  white-space: nowrap;
}

.check-result {
  min-height: 18px;
  margin: 0;
}

.account-login-check {
  margin-top: 4px;
  font-size: 12px;
}

.check-result.ok {
  color: var(--good);
}

.check-result.bad {
  color: var(--danger);
}

.primary,
.secondary,
.ghost,
.danger {
  border-radius: 8px;
  min-height: 40px;
  padding: 10px 14px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  white-space: nowrap;
}

.primary {
  background: var(--brand);
  color: #fff;
}

.primary:hover {
  background: var(--brand-dark);
}

.secondary {
  background: #20242a;
  color: #fff;
}

.ghost {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
}

.danger {
  background: #fff1f1;
  color: var(--bad);
  border: 1px solid #f2c2c2;
}

.hint {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.error {
  border: 1px solid #f2c2c2;
  background: #fff1f1;
  color: var(--bad);
  border-radius: 8px;
  padding: 10px 12px;
  margin: 10px 0;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 260px 1fr;
}

.sidebar {
  position: sticky;
  top: 0;
  align-self: start;
  height: 100vh;
  overflow-y: auto;
  background: #16191f;
  color: #dce2ea;
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.side-title {
  display: flex;
  align-items: center;
  gap: 10px;
  width: fit-content;
  border: 0;
  background: transparent;
  color: #fff;
  cursor: pointer;
  font-weight: 900;
  padding: 0;
  text-align: left;
}

.side-title:hover,
.side-title:focus-visible {
  color: #fff;
}

.account-box {
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
}

.account-box strong {
  display: block;
  color: #fff;
  margin-bottom: 4px;
}

.nav {
  display: grid;
  gap: 16px;
}

.nav-group {
  display: grid;
  gap: 6px;
}

.nav-heading {
  color: #8f9baa;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0;
  padding: 0 4px;
}

.nav button {
  width: 100%;
  text-align: left;
  color: #dce2ea;
  background: transparent;
  border-radius: 8px;
  padding: 11px 12px;
  font-weight: 800;
}

.nav button.active,
.nav button:hover {
  color: #fff;
  background: rgba(215, 0, 91, 0.18);
}

.main {
  min-width: 0;
  padding: 24px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.topbar h2 {
  margin: 0;
  font-size: 26px;
}

.toolbar {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.date-filter {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.date-filter label,
.date-filter span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.date-filter input {
  width: 142px;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 9px 10px;
}

.grid {
  display: grid;
  gap: 16px;
}

.cards {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.card,
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.card {
  padding: 16px;
}

.metric-card {
  text-align: left;
}

.metric-card:hover {
  border-color: rgba(215, 0, 91, 0.38);
}

.card.accent {
  border-color: rgba(215, 0, 91, 0.42);
  box-shadow: inset 4px 0 0 var(--brand);
}

.card.accent-soft {
  box-shadow: inset 4px 0 0 rgba(215, 0, 91, 0.42);
}

.card.good-card {
  box-shadow: inset 4px 0 0 var(--good);
}

.card.warn-card {
  box-shadow: inset 4px 0 0 var(--warn);
}

.card.danger-card {
  border-color: rgba(201, 42, 42, 0.32);
  box-shadow: inset 4px 0 0 var(--bad);
}

.card .label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.card .value {
  font-size: 30px;
  font-weight: 900;
  line-height: 1.05;
  margin-top: 8px;
  max-width: 100%;
  overflow-wrap: anywhere;
}

.finance-kpi-value {
  font-size: clamp(18px, 2vw, 30px);
  white-space: normal;
}

.finance-kpi-value.compact {
  font-size: clamp(17px, 1.55vw, 24px);
}

.finance-kpi-value.tight {
  font-size: clamp(15px, 1.25vw, 20px);
}

.kpi-sub {
  color: var(--muted);
  font-size: 12px;
  margin-top: 6px;
}

.panel {
  padding: 18px;
}

.panel h3 {
  margin: 0 0 14px;
  font-size: 18px;
}

.panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.panel-head h3 {
  margin: 0;
}

.link-button {
  border: 0;
  background: transparent;
  color: var(--ink);
  padding: 0;
  font-weight: 900;
  text-align: left;
}

.link-button:hover {
  color: var(--brand);
}

.request-title-cell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.request-list-panel .panel-head {
  margin-bottom: 12px;
}

.request-table-wrap td:first-child {
  min-width: 280px;
}

.due-chip,
.next-action-chip {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-radius: 999px;
  padding: 4px 9px;
  margin-top: 7px;
  background: #f4f6f8;
  color: #56606d;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.due-chip.warn {
  background: #fff3df;
  color: var(--warn);
}

.due-chip.bad {
  background: #fff1f1;
  color: var(--bad);
}

.due-chip.done {
  background: #eef1f5;
  color: var(--muted);
}

.next-action-chip {
  margin-top: 0;
  background: #edf5ff;
  color: var(--blue);
}

.filter-banner {
  border: 1px solid rgba(215, 0, 91, 0.2);
  border-radius: 8px;
  background: #fff7fb;
  padding: 10px 12px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.home-summary-grid {
  margin-bottom: 12px;
}

.home-post-form {
  margin-bottom: 12px;
}

.home-compose-page {
  display: grid;
  gap: 12px;
}

.home-compose-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.home-compose-pill {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  border-radius: 999px;
  padding: 6px 12px;
  background: #20242a;
  color: #fff;
  font-size: 13px;
  font-weight: 900;
  white-space: nowrap;
}

.home-editor-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.home-body-field textarea {
  min-height: 180px;
  line-height: 1.55;
}

.home-main-head {
  align-items: flex-start;
}

.home-tab-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
}

.home-post-options {
  align-content: end;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.home-feed {
  display: grid;
  gap: 12px;
}

.home-post-card {
  display: grid;
  gap: 12px;
}

.home-detail-layout {
  display: grid;
  gap: 12px;
}

.home-post-card.pinned {
  border-color: rgba(215, 0, 91, 0.34);
  box-shadow: 0 0 0 3px rgba(215, 0, 91, 0.08), var(--shadow);
}

.home-post-card.important {
  background: linear-gradient(180deg, #fff, #fff8fb);
}

.home-post-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.home-post-head h3 {
  margin: 6px 0 2px;
}

.home-post-detail h2 {
  margin: 8px 0 4px;
}

.home-post-title-button {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  font-weight: inherit;
  padding: 0;
  text-align: left;
}

.home-post-title-button:hover,
.home-post-title-button:focus-visible {
  color: var(--blue);
  text-decoration: underline;
}

.home-post-body {
  line-height: 1.65;
  overflow-wrap: anywhere;
}

.home-post-body a {
  color: var(--blue);
  font-weight: 800;
}

.home-post-images {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 8px;
}

.home-post-images.single {
  grid-template-columns: minmax(0, 1fr);
}

.home-post-images a {
  display: block;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f6f7f9;
  aspect-ratio: 16 / 9;
}

.home-post-images.single a {
  max-height: 360px;
}

.home-post-images img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.home-post-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.home-post-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.home-comment-panel {
  display: grid;
  gap: 12px;
}

.home-comment-form textarea {
  min-height: 92px;
}

.request-workbench {
  margin-bottom: 14px;
}

.request-workbench-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.request-workbench-head h3 {
  margin: 0 0 4px;
}

.request-workbench-head p {
  margin: 0;
}

.request-workbench-stats {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.request-workbench-stats span {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #f8fafc;
  color: var(--muted);
  padding: 7px 10px;
  font-size: 12px;
  font-weight: 900;
}

.request-workbench-stats span.warn {
  border-color: rgba(199, 120, 0, 0.22);
  background: #fff8ec;
  color: var(--warn);
}

.request-workbench-stats span.bad {
  border-color: rgba(201, 42, 42, 0.22);
  background: #fff5f5;
  color: var(--bad);
}

.request-quick-filters,
.space-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.request-quick-filter,
.space-tab {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 9px 12px;
  font-weight: 900;
}

.request-quick-filter {
  display: inline-grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-width: 134px;
}

.request-quick-filter strong {
  color: var(--brand);
  font-size: 16px;
}

.request-quick-filter.active,
.space-tab.active {
  border-color: var(--brand);
  background: rgba(215, 0, 91, 0.08);
  color: var(--brand);
}

.advanced-filter {
  margin-bottom: 16px;
}

.advanced-filter summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
  font-weight: 900;
  list-style: none;
}

.advanced-filter summary::-webkit-details-marker {
  display: none;
}

.advanced-filter summary em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}

.advanced-filter[open] summary {
  margin-bottom: 14px;
}

.compact-import-panel {
  align-self: start;
  padding: 0;
  overflow: hidden;
}

.compact-import-panel summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 56px;
  padding: 14px 16px;
  cursor: pointer;
  font-weight: 900;
  list-style: none;
}

.compact-import-panel summary::-webkit-details-marker {
  display: none;
}

.compact-import-panel summary em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}

.compact-import-panel form {
  padding: 0 16px 16px;
}

.liaison-filter-form {
  grid-template-columns: minmax(130px, 0.8fr) minmax(130px, 0.7fr) minmax(220px, 1.2fr) auto auto;
}

.liaison-kpi-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.finance-filter-form {
  grid-template-columns: minmax(140px, 0.9fr) auto minmax(140px, 0.9fr) auto;
  align-items: center;
}

.finance-filter-form span {
  color: var(--muted);
  font-weight: 900;
}

.finance-kpi-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.liaison-filter-card.active {
  border-color: rgba(215, 0, 91, 0.42);
  box-shadow: inset 4px 0 0 var(--brand);
}

.liaison-entry-grid {
  align-items: start;
}

.request-filter-form {
  display: grid;
  grid-template-columns: repeat(7, minmax(120px, 1fr)) auto;
  gap: 10px;
  align-items: end;
}

.request-filter-form .field {
  margin-bottom: 0;
}

.request-filter-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.detail-grid {
  grid-template-columns: 1.15fr 0.85fr;
}

.request-detail-layout {
  align-items: start;
}

.detail-side-stack {
  display: grid;
  gap: 16px;
}

.request-action-panel {
  position: sticky;
  top: 20px;
  z-index: 2;
}

.request-action-panel h3 {
  margin: 0 0 4px;
}

.request-action-panel .status-callout {
  margin: 2px 0;
}

.detail-list {
  display: grid;
  gap: 10px;
}

.detail-list div {
  border-bottom: 1px solid #edf0f4;
  padding-bottom: 10px;
}

.detail-list span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  margin-bottom: 4px;
}

.detail-copy {
  margin-top: 18px;
}

.detail-copy h4 {
  margin: 14px 0 6px;
  font-size: 14px;
}

.detail-copy p {
  margin: 0;
  color: #424a55;
  line-height: 1.6;
  white-space: pre-wrap;
}

.attachment-list {
  display: grid;
  gap: 8px;
}

.attachment-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  text-decoration: none;
  padding: 10px 12px;
}

.attachment-link:hover {
  border-color: rgba(215, 0, 91, 0.45);
}

.attachment-link span {
  color: var(--muted);
  font-size: 12px;
}

.status-actions {
  display: grid;
  gap: 10px;
  margin-top: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfe;
  padding: 12px;
}

.status-actions h4 {
  margin: 0 0 4px;
}

.request-action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.request-action-row.compact {
  display: grid;
  grid-template-columns: repeat(3, minmax(62px, 1fr));
}

.compact-action {
  min-height: 32px;
  padding: 6px 8px;
  font-size: 12px;
}

.toast-stack {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 50;
  display: grid;
  gap: 8px;
  width: min(360px, calc(100vw - 36px));
}

.toast {
  border: 1px solid rgba(14, 143, 98, 0.22);
  border-radius: 8px;
  background: #f0fff7;
  color: #075f42;
  padding: 12px 14px;
  text-align: left;
  font-weight: 800;
  box-shadow: 0 14px 32px rgba(20, 26, 34, 0.16);
  cursor: pointer;
}

.toast.bad {
  border-color: rgba(201, 42, 42, 0.24);
  background: #fff5f5;
  color: var(--danger);
}

.comment-list {
  display: grid;
  gap: 10px;
  margin-bottom: 14px;
}

.comment-thread {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.comment-replies {
  display: grid;
  gap: 8px;
  margin-left: 22px;
  padding-left: 14px;
  border-left: 2px solid rgba(215, 0, 91, 0.18);
  min-width: 0;
}

.comment-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fff;
  min-width: 0;
}

.comment-item.reply-item {
  background: #fbfcfe;
}

.comment-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
  min-width: 0;
}

.comment-head div {
  display: grid;
  gap: 3px;
}

.comment-head em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.comment-item p {
  margin: 6px 0;
  line-height: 1.55;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.comment-item .attachment-list {
  margin: 8px 0;
}

.comment-item span {
  color: var(--muted);
  font-size: 12px;
}

.comment-date {
  display: inline-block;
}

.comment-form {
  display: grid;
  gap: 10px;
}

.comment-form textarea {
  width: 100%;
  min-height: 90px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 11px 12px;
  resize: vertical;
}

.answer-list,
.template-answer-list,
.template-field-list {
  display: grid;
  gap: 10px;
}

.answer-item,
.template-answer-group {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 12px;
}

.answer-item p {
  margin: 6px 0 0;
  white-space: pre-wrap;
  color: #424a55;
}

.template-answer-head {
  display: grid;
  gap: 3px;
  margin-bottom: 10px;
}

.template-answer-head span {
  color: var(--muted);
  font-size: 12px;
}

.template-field-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 8px;
  align-items: center;
}

.survey-field-row {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fff;
}

.survey-field-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px;
  gap: 8px;
  align-items: start;
}

.survey-field-main textarea {
  min-height: 78px;
  resize: vertical;
  line-height: 1.5;
}

.survey-field-actions {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
}

.survey-options-box {
  display: grid;
  gap: 8px;
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

.survey-condition-box {
  display: grid;
  gap: 8px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: #fafbfc;
  padding: 10px;
}

.survey-condition-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 8px;
}

.survey-condition-controls[hidden] {
  display: none;
}

.survey-options-box[hidden] {
  display: none;
}

.survey-option-list {
  display: grid;
  gap: 8px;
}

.survey-option-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.survey-option-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.option-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #fff;
}

.check-inline {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.check-inline input {
  width: auto;
}

.church-check-panel {
  display: grid;
  gap: 10px;
  margin: 8px 0 12px;
}

.church-check-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
  gap: 8px;
}

.church-check {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 8px 10px;
  color: var(--ink);
}

.church-check:has(input:checked) {
  border-color: rgba(215, 0, 91, 0.38);
  background: #fff7fb;
  color: var(--brand);
}

.reply-target {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
  border: 1px solid rgba(215, 0, 91, 0.22);
  border-radius: 8px;
  background: #fff7fb;
  color: var(--brand);
  padding: 8px 10px;
  font-weight: 800;
}

.reply-target[hidden] {
  display: none;
}

.backup-panel {
  margin-top: 16px;
}

.file-button {
  position: relative;
  overflow: hidden;
}

.file-button input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.dashboard-main {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 16px;
}

.dashboard-wide {
  grid-template-columns: 1.15fr 1fr;
  margin-top: 16px;
}

.dashboard-recent {
  margin-top: 16px;
}

.dashboard-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0;
  border-bottom: 1px solid var(--line);
}

.dashboard-tab {
  border: 0;
  border-bottom: 3px solid transparent;
  background: transparent;
  color: var(--muted);
  min-height: 42px;
  padding: 10px 12px 12px;
  font-size: 14px;
  font-weight: 900;
  cursor: pointer;
}

.dashboard-tab.active {
  border-color: var(--brand);
  color: var(--brand);
}

.church-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 16px;
  padding-bottom: 4px;
}

.church-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--muted);
  padding: 9px 12px;
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
  white-space: nowrap;
}

.church-tab strong {
  min-width: 26px;
  border-radius: 999px;
  background: var(--soft);
  color: var(--ink);
  padding: 2px 7px;
  font-size: 12px;
  text-align: center;
}

.church-tab.active {
  border-color: var(--brand);
  background: rgba(215, 0, 91, 0.08);
  color: var(--brand);
}

.church-tab.active strong {
  background: var(--brand);
  color: #fff;
}

.request-direction-tabs {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 12px;
}

.request-direction-tabs button {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--muted);
  padding: 9px 13px;
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
}

.request-direction-tabs button.active {
  border-color: var(--brand);
  background: rgba(215, 0, 91, 0.08);
  color: var(--brand);
}

.chart-panel {
  min-height: 270px;
}

.donut-wrap {
  display: grid;
  grid-template-columns: 142px 1fr;
  gap: 18px;
  align-items: center;
}

.donut {
  width: 142px;
  aspect-ratio: 1;
  border-radius: 50%;
  display: grid;
  place-items: center;
  position: relative;
}

.donut::after {
  content: "";
  position: absolute;
  inset: 26px;
  border-radius: 50%;
  background: #fff;
}

.donut span {
  position: relative;
  z-index: 1;
  display: grid;
  text-align: center;
  font-weight: 900;
  font-size: 26px;
}

.donut small {
  color: var(--muted);
  font-size: 12px;
}

.donut-legend {
  display: grid;
  gap: 8px;
}

.donut-legend div {
  display: grid;
  grid-template-columns: 12px 1fr auto;
  gap: 8px;
  align-items: center;
  font-size: 13px;
}

.donut-legend i {
  width: 12px;
  height: 12px;
  border-radius: 3px;
}

.line-chart svg {
  width: 100%;
  height: 138px;
}

.line-chart line {
  stroke: #d9dee7;
  stroke-width: 1;
}

.line-chart polyline {
  fill: none;
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.line-chart .created {
  stroke: var(--brand);
}

.line-chart .completed {
  stroke: var(--good);
}

.line-labels,
.chart-legend {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
}

.chart-legend {
  justify-content: flex-start;
  margin-top: 10px;
}

.chart-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.created-dot,
.completed-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.created-dot {
  background: var(--brand);
}

.completed-dot {
  background: var(--good);
}

.mini-bars,
.drill-list,
.risk-list,
.flow-list {
  display: grid;
  gap: 10px;
}

.type-distribution-list {
  display: grid;
  gap: 8px;
  max-height: 250px;
  overflow: auto;
  padding-right: 4px;
}

.type-distribution-row {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(86px, 1fr) 46px 42px;
  gap: 8px 10px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 9px 10px;
  text-align: left;
}

.type-distribution-row:hover {
  border-color: rgba(215, 0, 91, 0.42);
}

.type-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 900;
}

.type-count,
.type-percent {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-align: right;
  white-space: nowrap;
}

.type-track {
  grid-column: 1 / -1;
  height: 8px;
  border-radius: 999px;
  background: #eef1f5;
  overflow: hidden;
}

.type-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--brand);
}

.target-picker {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 12px;
}

.target-picker input {
  margin: 0;
}

.selected-targets,
.target-picker-list,
.collab-list {
  display: grid;
  gap: 8px;
}

.selected-target-chip,
.target-option,
.collab-row {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  display: grid;
  gap: 8px;
  align-items: center;
  cursor: pointer;
}

.selected-target-chip {
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 9px 10px;
  text-align: left;
}

.selected-target-chip strong,
.target-option b {
  color: var(--brand);
  font-size: 12px;
}

.target-picker-list {
  max-height: 300px;
  overflow: auto;
}

.target-option {
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 10px;
  text-align: left;
}

.target-option span,
.collab-row span {
  display: grid;
  gap: 3px;
}

.target-option em,
.collab-row em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.section-work-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.section-work-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 12px;
  text-align: left;
  display: grid;
  gap: 4px;
}

.section-work-card strong {
  color: var(--brand);
  font-size: 24px;
}

.section-work-card span {
  color: var(--ink);
  font-weight: 900;
}

.section-work-card em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.section-board {
  display: grid;
  gap: 6px;
}

.section-board-head,
.section-board-row {
  display: grid;
  grid-template-columns: minmax(130px, 1.5fr) repeat(3, minmax(48px, 0.5fr));
  gap: 8px;
  align-items: center;
}

.section-board-head {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  padding: 0 10px;
}

.section-board-row {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 9px 10px;
  text-align: left;
}

.section-board-row strong {
  text-align: right;
}

.communication-list {
  display: grid;
  gap: 10px;
}

.communication-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 12px;
  text-align: left;
  display: grid;
  gap: 7px;
}

.communication-item p {
  margin: 0;
  color: #424a55;
  line-height: 1.45;
  white-space: pre-wrap;
}

.communication-item em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.mini-bar-row {
  display: grid;
  grid-template-columns: minmax(110px, 1fr) 1.6fr 48px;
  gap: 10px;
  align-items: center;
  font-size: 13px;
}

.ranking-row {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 10px;
  text-align: left;
  grid-template-columns: minmax(120px, 1fr) 1.4fr 56px;
}

.ranking-row small {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 12px;
}

.mini-track {
  height: 10px;
  border-radius: 999px;
  background: #eef1f5;
  overflow: hidden;
}

.mini-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--brand);
}

.drill-row {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
}

.drill-row summary {
  cursor: pointer;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
}

.drill-row summary::-webkit-details-marker {
  display: none;
}

.drill-row strong,
.drill-row em {
  display: block;
}

.drill-row em,
.drill-summary {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.drill-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 12px;
}

.drill-metrics span {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 8px;
}

.compact-filter {
  min-height: 32px;
  margin-top: 10px;
  padding: 6px 10px;
  font-size: 12px;
}

.heat-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.heat-cell {
  min-height: 96px;
  border: 1px solid rgba(215, 0, 91, 0.18);
  border-radius: 8px;
  padding: 12px;
  color: var(--ink);
  text-align: left;
}

.heat-cell strong,
.heat-cell span,
.heat-cell em {
  display: block;
}

.heat-cell span,
.heat-cell em {
  margin-top: 8px;
  color: #3f4650;
  font-size: 12px;
  font-style: normal;
}

.risk-item {
  width: 100%;
  border: 1px solid var(--line);
  border-left: 4px solid var(--blue);
  border-radius: 8px;
  background: #fff;
  padding: 12px;
  text-align: left;
}

.risk-item.warn {
  border-left-color: var(--warn);
}

.risk-item.bad {
  border-left-color: var(--bad);
}

.risk-item span,
.risk-item em {
  display: block;
}

.risk-item strong {
  margin-left: 8px;
}

.risk-item em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  margin-top: 7px;
}

.flow-row {
  display: grid;
  grid-template-columns: minmax(180px, 1.5fr) 1fr 112px;
  gap: 10px;
  align-items: center;
  font-size: 13px;
}

.flow-row span {
  display: block;
  color: var(--muted);
  margin-top: 3px;
}

.flow-row em {
  font-style: normal;
  color: var(--muted);
}

.collab-row {
  grid-template-columns: minmax(150px, 1.2fr) 1fr auto;
  padding: 10px;
  text-align: left;
  font-size: 13px;
}

.collab-row small {
  color: var(--muted);
  font-weight: 800;
  white-space: nowrap;
}

.dashboard-graph-panel {
  margin-bottom: 16px;
}

.echart {
  width: 100%;
  min-height: 280px;
}

.echart-graph {
  min-height: 520px;
}

.echart-wide {
  min-height: 340px;
}

.evangelism-heatmap-panel {
  overflow-x: auto;
}

.evangelism-heatmap-chart {
  min-width: 680px;
}

.chart-action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.chart-action-row span {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  color: var(--muted);
  padding: 7px 10px;
  font-size: 12px;
  font-weight: 800;
}

.scope-tabs {
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: min(980px, 72vw);
  overflow-x: auto;
  padding: 4px;
  scrollbar-width: thin;
}

.scope-tab {
  min-height: 56px;
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 12px 22px;
  font-size: 15px;
  font-weight: 900;
  white-space: nowrap;
  min-width: 116px;
}

.scope-tab.active {
  border-color: var(--brand);
  background: var(--brand);
  color: #fff;
  box-shadow: 0 10px 22px rgba(215, 0, 91, 0.2);
}

.analysis-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.analysis-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fff;
}

.analysis-card h4 {
  margin: 0 0 10px;
  font-size: 14px;
}

.analysis-row {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(80px, 1fr) 1fr 48px;
  gap: 8px;
  align-items: center;
  border-radius: 8px;
  background: transparent;
  padding: 7px 0;
  color: var(--ink);
  text-align: left;
  font-size: 12px;
}

.analysis-row i {
  height: 8px;
  border-radius: 999px;
  background: #eef1f5;
  overflow: hidden;
}

.analysis-row b {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--brand);
}

.analysis-row strong {
  text-align: right;
}

.setup-steps {
  display: grid;
  gap: 10px;
  margin: 14px 0;
}

.setup-steps div {
  display: grid;
  grid-template-columns: 30px 1fr;
  gap: 10px;
  align-items: start;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  padding: 10px;
}

.setup-steps strong {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  font-size: 12px;
}

.setup-steps span {
  color: var(--ink);
  line-height: 1.5;
  font-size: 13px;
}

.setup-steps b {
  font-weight: 900;
}

.org-admin-layout {
  display: grid;
  grid-template-columns: minmax(260px, 320px) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.org-tree-panel {
  position: sticky;
  top: 20px;
}

.org-tree-list {
  display: grid;
  gap: 6px;
  max-height: calc(100vh - 220px);
  overflow: auto;
  padding-right: 2px;
}

.org-tree-item,
.org-child-item {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.org-tree-item {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 4px 8px;
  padding: 8px 12px;
  align-items: center;
  min-height: 58px;
}

.org-tree-item .tree-branch {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 1px solid rgba(215, 0, 91, 0.2);
  border-radius: 8px;
  background: rgba(215, 0, 91, 0.06);
  color: var(--brand);
  font-size: 20px;
  line-height: 1;
  font-weight: 900;
  text-align: center;
}

.org-tree-item.active {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(215, 0, 91, 0.1);
}

.org-tree-item strong,
.org-child-item strong {
  font-size: 14px;
}

.org-tree-item span,
.org-child-item span {
  color: #6b7280;
  font-size: 12px;
}

.org-tree-item > span:last-child {
  grid-column: 2;
}

.org-detail-stack {
  display: grid;
  gap: 16px;
}

.org-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.org-summary div {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fafbfc;
  padding: 12px;
}

.org-summary span {
  display: block;
  margin-bottom: 6px;
  color: #667085;
  font-size: 12px;
  font-weight: 800;
}

.org-summary strong {
  font-size: 18px;
}

.org-edit-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
  margin-top: 14px;
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.org-edit-form .hint {
  grid-column: 1 / -1;
}

.account-context {
  display: grid;
  gap: 5px;
  margin-top: 10px;
  border: 1px solid rgba(215, 0, 91, 0.22);
  border-radius: 8px;
  background: rgba(215, 0, 91, 0.06);
  padding: 12px;
}

.account-context span {
  color: var(--brand);
  font-size: 12px;
  font-weight: 900;
}

.account-context strong {
  color: var(--ink);
  font-size: 14px;
}

.org-child-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.org-child-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: stretch;
  min-width: 0;
}

.org-child-item {
  display: grid;
  gap: 5px;
  padding: 12px;
  min-width: 0;
  height: 100%;
}

.org-child-item strong,
.org-child-item span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.org-child-order-actions {
  display: grid;
  grid-template-rows: 1fr 1fr;
  gap: 4px;
  width: 38px;
}

.org-child-order-button {
  min-width: 38px;
  width: 38px;
  min-height: 30px;
  padding: 0;
  display: grid;
  place-items: center;
  font-size: 11px;
  line-height: 1;
}

.org-child-item:hover,
.org-tree-item:hover {
  border-color: rgba(215, 0, 91, 0.45);
}

.account-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.columns-2 {
  grid-template-columns: 1.3fr 1fr;
}

.columns-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.bar-row {
  display: grid;
  grid-template-columns: 120px 1fr 56px;
  gap: 10px;
  align-items: center;
  margin: 10px 0;
  font-size: 13px;
}

.bar-track {
  height: 12px;
  border-radius: 999px;
  background: #eef1f5;
  overflow: hidden;
}

.bar-track.tall {
  height: 14px;
  margin-top: 12px;
}

.bar {
  height: 100%;
  background: var(--brand);
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

th,
td {
  border-bottom: 1px solid #edf0f4;
  padding: 10px 8px;
  text-align: left;
  vertical-align: top;
}

th {
  color: #596273;
  font-size: 12px;
  text-transform: uppercase;
}

tr.clickable-row {
  cursor: pointer;
}

tr.clickable-row:hover {
  background: #fbfcfe;
}

tr.selected-row {
  background: rgba(215, 0, 91, 0.07);
}

.table-input {
  width: 100%;
  min-width: 150px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 8px 9px;
  outline: none;
}

.table-input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(215, 0, 91, 0.12);
}

.table-input:disabled {
  background: #f6f7f9;
  color: #6b7280;
}

.liaison-case-table {
  min-width: 980px;
  table-layout: auto;
}

.liaison-case-table .liaison-narrow-col {
  width: 1%;
}

.liaison-case-table .liaison-date-col {
  width: 132px;
}

.liaison-case-table .liaison-title-col {
  width: 48%;
  min-width: 360px;
}

.liaison-case-table .liaison-status-col {
  width: 132px;
}

.liaison-title-cell strong {
  display: block;
  min-width: 320px;
  white-space: normal;
  overflow-wrap: anywhere;
  line-height: 1.45;
}

.liaison-case-meta {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.liaison-nowrap {
  white-space: nowrap;
}

.liaison-status-select {
  min-width: 118px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 8px 10px;
  font-size: 13px;
  font-weight: 800;
}

.liaison-status-select.good {
  border-color: rgba(14, 143, 98, 0.24);
  background: #e8f7f0;
  color: var(--good);
}

.liaison-status-select.warn {
  border-color: rgba(199, 120, 0, 0.24);
  background: #fff8ec;
  color: var(--warn);
}

.liaison-status-select.bad {
  border-color: rgba(201, 42, 42, 0.24);
  background: #fff5f5;
  color: var(--bad);
}

.ok {
  color: var(--good);
  font-weight: 900;
}

.bad {
  color: var(--bad);
  font-weight: 900;
}

.attendance-table {
  min-width: 1120px;
}

.attendance-table th,
.attendance-table td {
  white-space: nowrap;
  text-align: right;
}

.attendance-table th:first-child,
.attendance-table td:first-child {
  position: sticky;
  left: 0;
  z-index: 1;
  background: #fff;
  text-align: left;
}

.attendance-table .total-row td {
  background: #0968ad;
  color: #fff;
  border-bottom-color: #0968ad;
  font-weight: 900;
}

.attendance-table .total-row td:first-child {
  background: #0968ad;
}

.attendance-table .total-row .ok,
.attendance-table .total-row .bad {
  color: #a7f3d0;
}

.attendance-filter-form {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 0;
}

.attendance-filter-form .filter-label,
.attendance-filter-form .date-range-separator {
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.attendance-filter-form input[type="date"] {
  width: 144px;
}

.attendance-filter-form select {
  min-width: 140px;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-radius: 999px;
  padding: 4px 9px;
  font-size: 12px;
  font-weight: 800;
  background: #eef1f5;
  color: #4d5663;
}

.badge.good {
  background: #e8f7f0;
  color: var(--good);
}

.badge.warn {
  background: #fff3df;
  color: var(--warn);
}

.badge.bad {
  background: #fff1f1;
  color: var(--bad);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 16px;
}

.request-form {
  display: grid;
  gap: 16px;
}

.request-step {
  align-items: start;
}

.request-step-head {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding-bottom: 4px;
}

.request-step-head > span {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: var(--brand);
  color: #fff;
  font-weight: 900;
}

.request-step-head h3 {
  margin: 0 0 4px;
}

.request-step-head p {
  margin: 0;
}

.request-submit-row {
  justify-content: flex-end;
}

.span-2 {
  grid-column: span 2;
}

.slot-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.slot {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px;
  text-align: center;
  background: #fff;
}

.slot.busy {
  color: #8a1d1d;
  background: #fff1f1;
}

.slot.open {
  color: #155f42;
  background: #ecfbf4;
}

.reservation-list {
  display: grid;
  gap: 10px;
}

.space-directory,
.available-space-list {
  max-height: 430px;
  overflow: auto;
  padding-right: 4px;
}

.reservation-item {
  border: 1px solid var(--line);
  border-left: 4px solid var(--brand);
  border-radius: 8px;
  background: #fff;
  padding: 12px;
}

.survey-item details {
  margin-top: 10px;
}

.survey-link-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  margin-top: 10px;
}

.toolbar.wrap {
  flex-wrap: wrap;
}

.button-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.status-callout {
  border: 1px solid rgba(215, 0, 91, 0.18);
  border-radius: 8px;
  background: #fff7fb;
  padding: 12px;
  display: grid;
  gap: 6px;
}

.status-callout.bad {
  border-color: rgba(201, 42, 42, 0.28);
  background: #fff5f5;
}

.status-callout strong {
  font-size: 20px;
}

.status-callout p {
  margin: 0;
  color: var(--muted);
}

.telegram-otp-panel {
  display: grid;
  gap: 14px;
}

.telegram-otp-actions {
  justify-content: flex-start;
}

.telegram-otp-link-box {
  border: 1px solid rgba(30, 99, 182, 0.18);
  border-radius: 8px;
  background: #f2f7ff;
  padding: 12px;
  display: grid;
  gap: 8px;
}

.telegram-otp-link-box[hidden] {
  display: none;
}

.telegram-otp-link-box p {
  margin: 0;
}

.summary-chip-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.summary-chip {
  border: 1px solid #edf0f4;
  border-radius: 8px;
  padding: 10px;
  display: grid;
  gap: 4px;
  min-width: 0;
}

.summary-chip span,
.summary-chip em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.survey-stats {
  display: grid;
  gap: 10px;
  margin-top: 10px;
}

.survey-public-shell {
  min-height: 100vh;
  background: #f5f6f8;
  padding: 36px 16px;
}

.survey-public-card {
  width: min(720px, 100%);
  margin: 0 auto;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  overflow: hidden;
  display: grid;
  gap: 16px;
  padding: 0 24px 24px;
}

.survey-public-accent {
  height: 10px;
  background: var(--brand);
  margin: 0 -24px;
}

.survey-public-card h1 {
  margin: 0;
  font-size: 28px;
}

.survey-question {
  display: grid;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
}

.choice-list {
  display: grid;
  gap: 8px;
}

.choice-list label,
.yesno-choice-list label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  color: var(--ink);
}

.choice-list input,
.yesno-choice-list input {
  width: auto;
}

.yesno-choice-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.yesno-choice-list label {
  min-width: 96px;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: #fff;
}

.choice-other-input {
  width: min(100%, 420px);
  margin-top: 2px;
}

.rating-choice-list {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.rating-choice-list label {
  display: grid;
  cursor: pointer;
}

.rating-choice-list input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.rating-choice-list span {
  min-height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: #8a5a00;
  font-weight: 800;
}

.rating-choice-list em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.rating-choice-list input:checked + span {
  border-color: var(--brand);
  background: #eef4ff;
  color: var(--brand);
}

.rating-comment-input {
  min-height: 88px;
}

.survey-comment-list {
  display: grid;
  gap: 6px;
  margin-top: 10px;
}

.survey-comment-list p {
  margin: 0;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  color: var(--muted);
}

.privacy-box,
.success-box {
  border-radius: 8px;
  padding: 12px;
  background: #f7f8fa;
  color: var(--muted);
  white-space: pre-wrap;
}

.success-box {
  background: #ecfbf4;
  color: var(--good);
  font-weight: 800;
}

.item-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.space-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}

.compact-item {
  padding: 10px 12px;
}

.inline-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  margin-top: 12px;
}

.inline-form select {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 9px 10px;
}

.inline-form input[type="search"] {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 9px 10px;
}

.inline-form input[type="number"],
.inline-form input[type="time"],
.inline-form input[type="date"],
.inline-form input[type="month"] {
  min-height: 40px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 9px 10px;
}

.space-settings-form {
  grid-template-columns: minmax(130px, 1.2fr) auto repeat(3, minmax(86px, 0.7fr)) auto;
  align-items: center;
}

.check-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.check-grid.compact {
  gap: 6px;
}

.space-finder-panel {
  margin-bottom: 16px;
}

.space-tabs {
  margin-bottom: 16px;
}

.space-tab {
  min-width: 112px;
}

.building-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-width: min(520px, 100%);
}

.building-tab {
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 7px 10px;
  font-weight: 900;
}

.building-tab.active {
  border-color: rgba(215, 0, 91, 0.45);
  background: #fff0f6;
  color: var(--brand);
}

.space-finder-form {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr)) auto;
  gap: 10px;
  align-items: end;
  margin-bottom: 14px;
}

.available-space-list {
  display: grid;
  gap: 8px;
}

.available-space-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--line);
  border-left: 4px solid #8b949e;
  border-radius: 8px;
  background: #fff;
  padding: 12px;
}

.available-space-item.open {
  border-left-color: var(--good);
  background: #f6fff9;
}

.available-space-item.busy {
  background: #fbfcfe;
}

.available-space-item strong,
.available-space-item span {
  display: block;
}

.available-space-item span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.availability-reasons {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.availability-reasons span {
  display: inline-flex;
  margin-top: 0;
  border: 1px solid rgba(201, 42, 42, 0.18);
  border-radius: 999px;
  background: #fff7f7;
  color: var(--bad);
  padding: 4px 8px;
  font-weight: 800;
}

.availability-badge {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.space-calendar-panel {
  margin-top: 16px;
}

.space-manager-panel {
  margin-top: 16px;
}

.reservation-compose,
.space-manager-view {
  align-items: start;
}

.reservation-compose-single {
  display: grid;
  grid-template-columns: minmax(0, 720px);
  margin-top: 16px;
}

.space-manager-grid {
  display: grid;
  gap: 14px;
}

.space-manager-block {
  display: grid;
  gap: 10px;
}

.space-manager-block > strong {
  font-size: 14px;
}

.space-edit-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.space-edit-form .field {
  margin-bottom: 0;
}

.space-edit-form .toolbar {
  align-self: end;
}

.calendar-wrap {
  max-height: 620px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.space-calendar {
  width: max-content;
  display: grid;
  grid-template-columns: 190px repeat(7, 132px);
  background: #fff;
}

.fixed-reservation-list {
  display: grid;
  gap: 10px;
}

.fixed-reservation-group {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}

.fixed-reservation-group summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  cursor: pointer;
  padding: 12px;
  list-style: none;
}

.fixed-reservation-group summary::-webkit-details-marker {
  display: none;
}

.fixed-reservation-group summary strong,
.fixed-reservation-group summary span {
  display: block;
}

.fixed-reservation-group summary span,
.fixed-reservation-meta {
  color: var(--muted);
  font-size: 12px;
}

.fixed-reservation-meta {
  text-align: right;
}

.fixed-reservation-meta strong {
  color: var(--ink);
  font-size: 14px;
}

.fixed-reservation-detail {
  border-top: 1px solid var(--line);
  padding: 12px;
  background: #fbfcfe;
}

.fixed-reservation-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.profile-info-form {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.calendar-corner,
.calendar-day,
.calendar-space,
.calendar-cell {
  border-right: 1px solid #edf0f4;
  border-bottom: 1px solid #edf0f4;
}

.calendar-corner,
.calendar-day {
  position: sticky;
  top: 0;
  z-index: 4;
  min-height: 44px;
  display: flex;
  align-items: center;
  padding: 10px;
  background: #f8fafc;
  font-size: 13px;
  font-weight: 900;
}

.calendar-corner {
  left: 0;
  z-index: 6;
}

.calendar-space {
  position: sticky;
  left: 0;
  z-index: 3;
  min-height: 94px;
  padding: 12px;
  background: #fbfcfe;
}

.calendar-filter-form {
  grid-template-columns: minmax(220px, 1fr) minmax(260px, auto) auto auto auto;
  align-items: center;
  margin-bottom: 12px;
}

.calendar-space strong,
.calendar-space span {
  display: block;
}

.calendar-space span {
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
}

.calendar-cell {
  min-height: 94px;
  padding: 8px;
  display: grid;
  align-content: start;
  gap: 6px;
}

.calendar-chip {
  width: 100%;
  border: 1px solid rgba(215, 0, 91, 0.18);
  border-left: 4px solid var(--brand);
  border-radius: 8px;
  background: #fff7fb;
  color: var(--ink);
  padding: 8px;
  text-align: left;
}

.calendar-chip strong,
.calendar-chip span {
  display: block;
}

.calendar-chip strong {
  font-size: 12px;
}

.calendar-chip span {
  margin-top: 3px;
  font-size: 12px;
}

.empty-slot {
  color: #a1a9b5;
  font-size: 12px;
}

.footer-note {
  margin-top: auto;
  color: #9da7b6;
  font-size: 12px;
  line-height: 1.5;
}

.permission-matrix th,
.permission-matrix td {
  text-align: center;
  vertical-align: middle;
}

.permission-matrix th:first-child,
.permission-matrix td:first-child {
  text-align: left;
  min-width: 180px;
}

.permission-check {
  justify-content: center;
  white-space: nowrap;
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 14px;
}

.pagination span {
  color: var(--muted);
  font-size: 13px;
  min-width: 56px;
  text-align: center;
}

.menu-permission-matrix th:not(:first-child),
.menu-permission-matrix td:not(:first-child) {
  min-width: 184px;
}

.permission-toolbar {
  display: grid;
  gap: 10px;
  margin: 14px 0;
}

.permission-filter-form,
.menu-template-form {
  display: grid;
  gap: 8px;
  align-items: end;
}

.permission-filter-form {
  grid-template-columns: minmax(180px, 1.4fr) minmax(150px, 1fr) minmax(150px, 1fr) auto;
}

.menu-template-form {
  grid-template-columns: minmax(220px, 1fr) auto;
}

.permission-filter-form label,
.menu-template-form label {
  display: grid;
  gap: 6px;
}

.permission-filter-form span,
.menu-template-form span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.permission-filter-form input,
.permission-filter-form select,
.menu-template-form select {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 9px 10px;
}

.permission-filter-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.menu-mode-cell {
  display: grid;
  justify-items: center;
  gap: 6px;
}

.menu-mode-control {
  display: inline-grid;
  grid-template-columns: repeat(2, minmax(48px, 1fr));
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.menu-mode-option {
  min-height: 34px;
  border-left: 1px solid var(--line);
  background: #fff;
  color: var(--muted);
  padding: 7px 9px;
  font-size: 12px;
  font-weight: 900;
}

.menu-mode-option:first-child {
  border-left: 0;
}

.menu-mode-option.active {
  background: rgba(215, 0, 91, 0.1);
  color: var(--brand);
}

.menu-effective {
  font-size: 12px;
  font-weight: 900;
}

.menu-effective.visible {
  color: var(--good);
}

.menu-effective.hidden {
  color: var(--bad);
}

.permission-menu-layout {
  display: grid;
  grid-template-columns: 290px minmax(260px, 0.9fr) minmax(360px, 1.2fr);
  gap: 14px;
  align-items: stretch;
  margin-top: 14px;
}

.permission-org-tree,
.permission-account-panel,
.permission-menu-detail {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 14px;
  min-width: 0;
  height: clamp(620px, calc(100vh - 238px), 780px);
  min-height: 0;
}

.permission-org-tree,
.permission-account-panel,
.permission-menu-detail {
  display: grid;
}

.permission-org-tree {
  grid-template-rows: auto minmax(0, 1fr);
}

.permission-account-panel {
  grid-template-rows: auto auto minmax(0, 1fr) auto;
}

.permission-menu-detail {
  grid-template-rows: auto minmax(0, 1fr);
}

.permission-subhead {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  margin-bottom: 12px;
}

.permission-subhead strong {
  font-size: 15px;
}

.permission-subhead span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.permission-tree-list {
  min-height: 0;
  overflow: auto;
}

.permission-account-list {
  display: grid;
  gap: 8px;
  min-height: 0;
  overflow: auto;
  padding-right: 2px;
}

.permission-account-item {
  width: 100%;
  display: grid;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 10px 12px;
  text-align: left;
}

.permission-account-item.active {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(215, 0, 91, 0.1);
}

.permission-account-item span,
.permission-account-item em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  line-height: 1.4;
}

.permission-filter-form.compact {
  grid-template-columns: minmax(0, 1fr);
  margin-bottom: 10px;
}

.menu-template-form.compact {
  grid-template-columns: minmax(0, 1fr);
  margin-top: 12px;
}

.permission-account-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}

.permission-account-summary div {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #f8fafc;
}

.permission-account-summary span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  margin-bottom: 4px;
}

.permission-detail-body {
  min-height: 0;
  overflow: auto;
  padding-right: 2px;
}

.permission-detail-section {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.permission-section-title {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}

.permission-section-title strong {
  font-size: 14px;
}

.permission-section-title span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.permission-feature-list {
  display: grid;
  gap: 8px;
}

.permission-feature-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: #fff;
}

.permission-feature-row input {
  width: 18px;
  height: 18px;
  accent-color: var(--brand);
}

.permission-feature-row span {
  display: grid;
  gap: 3px;
}

.permission-feature-row em,
.permission-feature-row b {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.permission-feature-row b {
  color: var(--ink);
  font-weight: 900;
  white-space: nowrap;
}

.permission-feature-row.disabled {
  background: #f8fafc;
  color: var(--muted);
}

.permission-feature-empty {
  border: 1px dashed var(--line);
  border-radius: 8px;
  margin: 0;
  padding: 12px;
  background: #f8fafc;
}

.permission-menu-list {
  display: grid;
  gap: 8px;
}

.permission-menu-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
}

.permission-menu-row > div:first-child {
  display: grid;
  gap: 4px;
}

.menu-mode-control.compact {
  min-width: 116px;
}

.presentation-workbench {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr) 360px;
  gap: 16px;
  align-items: start;
}

.presentation-sidebar,
.presentation-inspector {
  display: grid;
  gap: 14px;
}

.presentation-inspector {
  position: sticky;
  top: 16px;
}

.presentation-create-form {
  display: grid;
  gap: 12px;
  padding: 0 14px 14px;
}

.presentation-create-panel {
  padding: 0;
  overflow: hidden;
}

.presentation-create-panel summary {
  min-height: 48px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
  list-style: none;
}

.presentation-create-panel summary::-webkit-details-marker {
  display: none;
}

.presentation-create-panel summary strong {
  font-size: 15px;
}

.presentation-create-panel summary span {
  color: var(--brand);
  font-weight: 900;
  font-size: 13px;
}

.presentation-project-home {
  display: grid;
  gap: 16px;
}

.presentation-project-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.presentation-project-head h2 {
  margin: 0 0 4px;
  color: var(--text);
  font-size: 22px;
  line-height: 1.2;
}

.presentation-project-home .compact-tabs {
  justify-content: flex-start;
  border-bottom: 1px solid var(--line);
  padding: 0 2px;
}

.presentation-project-home .compact-tabs .dashboard-tab {
  border-radius: 6px 6px 0 0;
}

.presentation-project-home .presentation-create-panel {
  max-width: 760px;
  background: #fff;
}

.presentation-project-home .presentation-create-panel[open] summary {
  border-bottom: 1px solid var(--line);
}

.presentation-project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
  align-items: stretch;
}

.presentation-project-card {
  min-width: 0;
  display: grid;
  gap: 14px;
  align-content: space-between;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.04);
}

.presentation-project-card > div:first-child {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.presentation-project-card strong {
  min-width: 0;
  color: var(--text);
  font-size: 16px;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.presentation-project-card span {
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.presentation-project-card dl {
  display: grid;
  gap: 8px;
  margin: 0;
  color: var(--text);
}

.presentation-project-card dl div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid #f1f3f4;
  padding-bottom: 7px;
}

.presentation-project-card dt,
.presentation-project-card dd {
  margin: 0;
  font-size: 12px;
}

.presentation-project-card dt {
  color: var(--muted);
}

.presentation-project-card dd {
  max-width: 62%;
  overflow: hidden;
  color: var(--text);
  font-weight: 800;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.presentation-project-card .toolbar {
  justify-content: flex-end;
}

.presentation-project-card.template-card {
  border-style: dashed;
}

.presentation-deck-list,
.presentation-slide-list {
  display: grid;
  gap: 8px;
}

.presentation-deck-list button,
.presentation-slide-thumb {
  width: 100%;
  min-height: 54px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 10px;
  text-align: left;
  display: grid;
  gap: 4px;
}

.presentation-deck-list button.active,
.presentation-slide-thumb.active {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(215, 0, 91, 0.1);
}

.presentation-deck-list span,
.presentation-slide-thumb span {
  color: var(--muted);
  font-size: 12px;
}

.presentation-editor-panel {
  min-width: 0;
  display: grid;
  gap: 12px;
}

.presentation-editor-toolbar {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  min-width: 0;
}

.presentation-object-toolbar {
  min-width: 0;
  flex: 1 1 auto;
}

.presentation-toolbar-divider {
  width: 1px;
  height: 28px;
  background: var(--line);
}

.presentation-editor-shell {
  display: grid;
  grid-template-rows: auto auto auto minmax(0, 1fr);
  height: calc(100vh - 118px);
  min-height: calc(100vh - 130px);
  border: 1px solid var(--line);
  border-radius: 8px;
  position: relative;
  overflow: hidden;
  background: #fff;
}

.presentation-doc-header {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  padding: 8px 12px;
  border-bottom: 1px solid #e5e7eb;
  background: #fff;
}

.presentation-doc-title-row,
.presentation-doc-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.presentation-back-chip {
  border: 0;
  border-radius: 6px;
  background: #f1f3f4;
  color: #3c4043;
  padding: 7px 9px;
  font-weight: 900;
}

.presentation-doc-title {
  width: min(420px, 44vw);
  min-width: 180px;
  border: 1px solid transparent;
  border-radius: 4px;
  background: #fff;
  color: #202124;
  font-size: 18px;
  font-weight: 800;
  padding: 5px 7px;
}

.presentation-doc-title:hover,
.presentation-doc-title:focus {
  border-color: #dadce0;
  outline: 0;
}

.presentation-save-state {
  color: #5f6368;
  font-size: 12px;
  white-space: nowrap;
}

.presentation-menu-bar {
  display: flex;
  gap: 2px;
  align-items: center;
  min-width: 0;
  overflow-x: auto;
  padding: 2px 8px;
  border-bottom: 1px solid #e5e7eb;
  background: #fff;
}

.presentation-menu-wrap {
  flex: 0 0 auto;
}

.presentation-menu-wrap > button {
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: #3c4043;
  padding: 5px 8px;
  font-size: 13px;
  cursor: pointer;
}

.presentation-menu-wrap > button:hover,
.presentation-menu-wrap > button.active {
  background: #f1f3f4;
}

.presentation-menu-layer {
  position: absolute;
  top: 78px;
  left: clamp(8px, var(--presentation-menu-left, 8px), calc(100% - 260px));
  z-index: 200;
  max-width: calc(100% - 16px);
}

.presentation-menu-popover {
  min-width: 236px;
  max-width: min(360px, calc(100vw - 32px));
  max-height: 520px;
  overflow: auto;
  border: 1px solid #dadce0;
  border-radius: 6px;
  box-shadow: 0 12px 32px rgba(60, 64, 67, 0.22);
  background: #fff;
  padding: 6px 0;
}

.presentation-menu-popover button,
.presentation-popover-grid button,
.presentation-popover-color-grid button {
  width: 100%;
  min-height: 30px;
  border: 0;
  background: transparent;
  color: #202124;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  padding: 6px 14px;
  font-size: 13px;
  text-align: left;
  cursor: pointer;
}

.presentation-menu-popover button:hover:not(:disabled),
.presentation-popover-grid button:hover:not(:disabled),
.presentation-popover-color-grid button:hover:not(:disabled) {
  background: #f1f3f4;
}

.presentation-menu-popover button:disabled,
.presentation-popover-grid button:disabled,
.presentation-popover-color-grid button:disabled {
  color: #a0a4aa;
  cursor: not-allowed;
}

.presentation-menu-popover button.active,
.presentation-popover-grid button.active,
.presentation-popover-color-grid button.active {
  background: #e8f0fe;
  color: #174ea6;
  font-weight: 900;
}

.presentation-menu-popover button i,
.presentation-popover-grid button i,
.presentation-popover-color-grid button i {
  width: 18px;
  height: 18px;
  border: 1px solid #dadce0;
  border-radius: 4px;
  flex: 0 0 auto;
}

.presentation-menu-popover button b,
.presentation-popover-grid button b,
.presentation-popover-color-grid button b {
  margin-left: auto;
}

.presentation-menu-popover hr {
  border: 0;
  border-top: 1px solid #edf0f2;
  margin: 6px 0;
}

.presentation-menu-popover kbd {
  color: #5f6368;
  font: inherit;
  font-size: 12px;
}

.presentation-popover-section-title {
  padding: 8px 14px 4px;
  color: #5f6368;
  font-size: 12px;
  font-weight: 900;
}

.presentation-popover-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  padding: 6px;
}

.presentation-popover-grid.wide {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  min-width: 340px;
}

.presentation-popover-color-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 4px;
  min-width: 300px;
  padding: 6px;
}

.presentation-quick-toolbar {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  overflow-x: auto;
  padding: 6px 10px;
  border-bottom: 1px solid #dadce0;
  background: #fff;
}

.presentation-quick-toolbar > button,
.presentation-zoom-pill {
  flex: 0 0 auto;
  min-width: 30px;
  height: 30px;
  border: 1px solid transparent;
  border-radius: 4px;
  background: transparent;
  color: #3c4043;
  padding: 0 8px;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.presentation-quick-toolbar > button:hover:not(:disabled),
.presentation-zoom-pill:hover {
  border-color: #dadce0;
  background: #f1f3f4;
}

.presentation-quick-toolbar > button:disabled {
  color: #b4b8bd;
  cursor: not-allowed;
}

.presentation-toolbar-separator {
  flex: 0 0 auto;
  width: 1px;
  height: 24px;
  background: #dadce0;
  margin: 0 4px;
}

.presentation-quick-toolbar .presentation-ribbon-swatches {
  display: flex !important;
  grid-template-columns: none;
  gap: 3px !important;
  max-width: none !important;
}

.presentation-quick-toolbar .presentation-ribbon-swatches button {
  width: 18px;
  min-width: 18px;
  height: 18px;
  min-height: 18px;
}

.presentation-editor-grid {
  display: grid;
  grid-template-columns: 174px minmax(0, 1fr) 330px;
  min-height: 0;
  overflow: hidden;
}

.presentation-editor-grid.format-closed {
  grid-template-columns: 174px minmax(0, 1fr);
}

.presentation-slide-navigator {
  min-height: 0;
  border-right: 1px solid #dadce0;
  background: #fff;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
}

.presentation-deck-switcher {
  padding: 8px;
  border-bottom: 1px solid #edf0f2;
}

.presentation-deck-switcher summary {
  cursor: pointer;
  color: #3c4043;
  font-size: 12px;
  font-weight: 900;
  list-style: none;
}

.presentation-deck-switcher summary::-webkit-details-marker {
  display: none;
}

.presentation-deck-list.compact {
  margin-top: 8px;
  max-height: 260px;
  overflow: auto;
}

.presentation-slide-list.google-like {
  align-content: start;
  align-items: start;
  grid-auto-rows: max-content;
  padding: 10px 8px;
  overflow: auto;
}

.presentation-slide-list.google-like .presentation-slide-thumb {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 7px;
  align-items: start;
  align-self: start;
  min-height: 0;
  height: auto;
  margin-bottom: 8px;
  padding: 7px;
  border-radius: 6px;
  background: #fff;
}

.presentation-slide-list.google-like .presentation-slide-thumb.active {
  border-color: #1a73e8;
  box-shadow: 0 0 0 2px rgba(26, 115, 232, 0.16);
}

.presentation-slide-number {
  color: #5f6368;
  font-size: 12px;
  line-height: 1;
  padding-top: 4px;
  text-align: right;
}

.presentation-slide-thumb-body {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.presentation-slide-preview {
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 1px solid #e5e7eb;
  border-radius: 4px;
  background-size: cover;
  background-position: center;
  overflow: hidden;
}

.presentation-slide-preview em {
  display: block;
  max-width: 82%;
  color: #202124;
  font-size: 8px;
  font-style: normal;
  font-weight: 900;
  line-height: 1.15;
  overflow: hidden;
  text-align: center;
  text-overflow: ellipsis;
}

.presentation-slide-thumb-body strong {
  min-width: 0;
  color: #3c4043;
  font-size: 11px;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.presentation-new-slide {
  margin: 8px;
  border: 1px solid #dadce0;
  border-radius: 6px;
  background: #fff;
  color: #3c4043;
  padding: 8px;
  font-weight: 900;
  cursor: pointer;
}

.presentation-main-surface {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  overflow: hidden;
  background: #f1f3f4;
}

.presentation-canvas-workspace {
  min-width: 0;
  min-height: 420px;
  overflow: auto;
  display: grid;
  place-items: center;
  padding: 34px;
}

.presentation-canvas-workspace .presentation-stage-wrap {
  transition: width 0.12s ease, max-width 0.12s ease;
}

.presentation-notes-panel {
  border-top: 1px solid #dadce0;
  background: #fff;
  padding: 8px 12px;
}

.presentation-notes-panel textarea {
  width: 100%;
  min-height: 62px;
  max-height: 180px;
  resize: vertical;
  border: 1px solid transparent;
  border-radius: 4px;
  padding: 8px;
  color: #202124;
  background: #fff;
}

.presentation-notes-panel textarea:focus {
  border-color: #dadce0;
  outline: 0;
}

.presentation-format-sidebar {
  min-width: 0;
  min-height: 0;
  max-height: 100%;
  overflow: auto;
  border-left: 1px solid #dadce0;
  background: #fff;
  padding: 12px;
}

.presentation-ribbon {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 10px 26px rgba(20, 28, 38, 0.06);
  overflow: hidden;
}

.presentation-ribbon-tabs {
  display: flex;
  gap: 2px;
  min-width: 0;
  overflow-x: auto;
  border-bottom: 1px solid var(--line);
  padding: 6px 8px 0;
  background: #f8fafc;
}

.presentation-ribbon-tabs button {
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--muted);
  padding: 8px 11px;
  font-weight: 900;
  white-space: nowrap;
  cursor: pointer;
}

.presentation-ribbon-tabs button.active {
  border-bottom-color: var(--brand);
  color: var(--brand);
  background: #fff;
}

.presentation-ribbon-panel {
  display: flex;
  gap: 10px;
  align-items: stretch;
  min-height: 86px;
  overflow-x: auto;
  padding: 10px;
}

.presentation-ribbon-group {
  display: grid;
  grid-template-rows: 1fr auto;
  gap: 6px;
  min-width: max-content;
  border-right: 1px solid var(--line);
  padding-right: 10px;
}

.presentation-ribbon-group:last-child {
  border-right: 0;
}

.presentation-ribbon-group > span {
  align-self: end;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-align: center;
}

.presentation-ribbon-group > div {
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
  gap: 6px;
  max-width: 460px;
}

.presentation-ribbon button,
.presentation-ribbon .ribbon-tile {
  min-height: 30px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  padding: 6px 9px;
  font-weight: 900;
  cursor: pointer;
}

.presentation-ribbon button:hover:not(:disabled) {
  border-color: var(--brand);
  background: #fff7fb;
  color: var(--brand);
}

.presentation-ribbon button.active-choice {
  border-color: #1a73e8;
  background: #e8f0fe;
  color: #174ea6;
  box-shadow: inset 0 0 0 1px rgba(26, 115, 232, 0.24);
}

.presentation-ribbon button.active-choice b {
  margin-left: 2px;
}

.presentation-ribbon button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.presentation-ribbon-hint {
  align-self: center;
  max-width: 220px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.presentation-ribbon-meta {
  border-top: 1px solid var(--line);
  background: #fbfcfe;
  color: var(--muted);
  font-size: 12px;
  padding: 6px 10px;
}

.presentation-ribbon-swatches {
  display: grid !important;
  grid-template-columns: repeat(6, 20px);
  gap: 5px !important;
  max-width: none !important;
}

.presentation-ribbon-swatches button {
  width: 20px;
  min-width: 20px;
  height: 20px;
  min-height: 20px;
  border-radius: 999px;
  padding: 0;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.12);
}

.presentation-ribbon-shape-grid,
.presentation-ribbon-layout-grid {
  display: grid !important;
  grid-template-columns: repeat(5, minmax(62px, 1fr));
  gap: 6px !important;
  max-width: 430px !important;
}

.presentation-ribbon-layout-grid {
  grid-template-columns: repeat(4, minmax(86px, 1fr));
}

.presentation-ribbon-shape-grid button,
.presentation-ribbon-layout-grid button {
  display: grid;
  place-items: center;
  gap: 4px;
  min-height: 54px;
  font-size: 11px;
  text-align: center;
}

.presentation-background-setting {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 12px;
  align-items: start;
}

.presentation-background-preview {
  width: 88px;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--line);
  border-radius: 6px;
  background-color: #f8fafc;
  background-size: cover;
  background-position: center;
}

.presentation-tool-menu {
  position: relative;
}

.presentation-tool-menu summary {
  cursor: pointer;
  list-style: none;
}

.presentation-tool-menu summary::-webkit-details-marker {
  display: none;
}

.presentation-tool-menu[open] summary {
  border-color: var(--brand);
  color: var(--brand);
  background: #fff7fb;
}

.presentation-tool-menu > div {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 30;
  min-width: 188px;
  max-height: 360px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  background: #fff;
  padding: 6px;
  display: grid;
  gap: 4px;
}

.presentation-tool-menu > div button {
  min-height: 34px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--ink);
  padding: 7px 9px;
  text-align: left;
  font-weight: 800;
  cursor: pointer;
}

.presentation-shape-menu button,
.presentation-preset-menu button {
  display: flex;
  align-items: center;
  gap: 8px;
}

.shape-preview {
  width: 24px;
  height: 18px;
  display: inline-block;
  border: 2px solid #20242a;
  background: #f8fafc;
}

.shape-preview.shape-roundRect,
.shape-preview.shape-label {
  border-radius: 999px;
}

.shape-preview.shape-circle,
.shape-preview.shape-badge,
.shape-preview.shape-check {
  width: 18px;
  border-radius: 50%;
}

.shape-preview.shape-triangle {
  width: 0;
  height: 0;
  border-left: 12px solid transparent;
  border-right: 12px solid transparent;
  border-bottom: 20px solid #20242a;
  background: transparent;
}

.shape-preview.shape-diamond {
  transform: rotate(45deg) scale(0.82);
}

.shape-preview.shape-star {
  clip-path: polygon(50% 0, 61% 34%, 98% 35%, 68% 56%, 79% 91%, 50% 70%, 21% 91%, 32% 56%, 2% 35%, 39% 34%);
  border-width: 0;
  background: #f4c430;
}

.shape-preview.shape-line,
.shape-preview.shape-arrow,
.shape-preview.shape-divider {
  height: 0;
  border-width: 0;
  border-top: 4px solid #20242a;
  background: transparent;
}

.shape-preview.shape-divider {
  border-top-color: #adb5bd;
}

.shape-preview.shape-xmark {
  position: relative;
  border-radius: 50%;
}

.shape-preview.shape-xmark::before {
  content: "×";
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  color: #c92a2a;
  font-weight: 900;
}

.presentation-tool-menu > div button:hover {
  background: #f6f8fb;
}

.presentation-report-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
}

.presentation-stage-wrap {
  width: 100%;
  max-width: 1040px;
  margin: 0 auto;
}

.presentation-canvas {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.presentation-canvas.drag-over {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(215, 0, 91, 0.12), var(--shadow);
}

.presentation-canvas.empty {
  display: grid;
  place-items: center;
  min-height: 240px;
  color: var(--muted);
}

.presentation-block {
  position: absolute;
  border: 1px solid transparent;
  min-width: 32px;
  min-height: 24px;
  touch-action: none;
}

.presentation-block.locked {
  cursor: not-allowed;
}

.presentation-block.selected {
  border-color: #1a73e8;
  box-shadow: none;
}

.presentation-block.type-shape.shape-circle,
.presentation-block.type-shape.shape-badge,
.presentation-block.type-shape.shape-check {
  border-radius: 999px;
}

.presentation-block.type-shape.shape-speech {
  overflow: visible;
}

.presentation-block.type-shape.shape-speech.selected {
  border-radius: 14px;
}

.presentation-block.type-shape.shape-line,
.presentation-block.type-shape.shape-arrow,
.presentation-block.type-shape.shape-divider {
  min-height: 10px;
}

.presentation-block.type-shape.shape-line.selected,
.presentation-block.type-shape.shape-arrow.selected,
.presentation-block.type-shape.shape-divider.selected {
  border-color: transparent;
  box-shadow: none;
}

.presentation-block.type-shape.shape-line.selected .presentation-shape,
.presentation-block.type-shape.shape-arrow.selected .presentation-shape,
.presentation-block.type-shape.shape-divider.selected .presentation-shape {
  outline: 2px solid rgba(215, 0, 91, 0.42);
  outline-offset: 5px;
}

.presentation-text,
.presentation-shape,
.presentation-empty-media,
.presentation-activity {
  width: 100%;
  height: 100%;
  padding: 12px;
  overflow: hidden;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: keep-all;
}

.presentation-text.is-editing,
.presentation-shape.is-editing {
  outline: 1.5px solid #1a73e8;
  outline-offset: -2px;
  cursor: text;
  user-select: text;
}

.presentation-text[contenteditable="true"],
.presentation-shape[contenteditable="true"] {
  -webkit-user-select: text;
  user-select: text;
}

.presentation-image-frame,
.presentation-chart-frame {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: transparent;
}

.presentation-image {
  width: 100%;
  height: 100%;
  display: block;
  will-change: transform;
}

.presentation-shape {
  display: grid;
  place-items: center;
  font-weight: 800;
}

.presentation-shape.shape-roundRect {
  border-radius: 18px !important;
}

.presentation-shape.shape-circle,
.presentation-shape.shape-badge {
  border-radius: 999px !important;
}

.presentation-shape.shape-triangle {
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
  border-width: 0 !important;
}

.presentation-shape.shape-diamond {
  clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);
  border-width: 0 !important;
}

.presentation-shape.shape-star {
  clip-path: polygon(50% 0, 61% 34%, 98% 35%, 68% 56%, 79% 91%, 50% 70%, 21% 91%, 32% 56%, 2% 35%, 39% 34%);
  border-width: 0 !important;
}

.presentation-shape.shape-line {
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  width: 100%;
  height: var(--shape-line-width, 6px);
  min-height: var(--shape-line-width, 6px);
  padding: 0;
  border-width: 0;
  background: currentColor;
  border-top: var(--shape-line-width, 6px) var(--shape-line-style, solid) currentColor;
  transform: translateY(-50%);
}

.presentation-shape.shape-divider {
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  width: 100%;
  height: var(--shape-line-width, 3px);
  min-height: var(--shape-line-width, 3px);
  padding: 0;
  border-width: 0;
  background: transparent;
  border-top: var(--shape-line-width, 3px) var(--shape-line-style, solid) currentColor;
  transform: translateY(-50%);
}

.presentation-shape.shape-arrow {
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  width: calc(100% - 14px);
  height: var(--shape-line-width, 6px);
  min-height: var(--shape-line-width, 6px);
  padding: 0;
  border-width: 0;
  background: currentColor;
  border-top: var(--shape-line-width, 6px) var(--shape-line-style, solid) currentColor;
  transform: translateY(-50%);
}

.presentation-shape.shape-arrow::after {
  content: "";
  position: absolute;
  right: -14px;
  top: 50%;
  width: 0;
  height: 0;
  border-top: 10px solid transparent;
  border-bottom: 10px solid transparent;
  border-left: 16px solid currentColor;
  transform: translateY(-50%);
}

.presentation-shape.shape-speech {
  position: relative;
  border-radius: 14px !important;
}

.presentation-shape.shape-speech::after {
  content: "";
  position: absolute;
  left: 24px;
  bottom: -12px;
  width: 18px;
  height: 18px;
  background: inherit;
  border-right: 1px solid currentColor;
  border-bottom: 1px solid currentColor;
  transform: rotate(45deg);
}

.presentation-shape.shape-label {
  border-radius: 999px !important;
  padding-inline: 18px;
}

.presentation-shape.shape-xmark {
  border-radius: 999px !important;
}

.presentation-caption {
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 8px;
  border-radius: 6px;
  background: rgba(32, 36, 42, 0.72);
  color: #fff;
  padding: 5px 7px;
  font-size: 12px;
}

.presentation-empty-media {
  display: grid;
  place-items: center;
  border-color: var(--line);
  border-style: dashed;
  color: var(--muted);
  background: #f8fafc;
}

.presentation-image-picker {
  cursor: pointer;
  font: inherit;
}

.presentation-image-picker:hover {
  border-color: var(--brand);
  color: var(--brand);
  background: #fff7fb;
}

.presentation-chart-title {
  position: absolute;
  left: 10px;
  right: 10px;
  top: 8px;
  z-index: 1;
  font-weight: 900;
  font-size: 13px;
  color: var(--ink);
}

.presentation-chart-frame {
  position: relative;
  padding: 8px;
}

.presentation-chart {
  width: 100%;
  height: 100%;
  min-height: 100%;
  pointer-events: none;
}

.presentation-data-block,
.presentation-table-block {
  width: 100%;
  height: 100%;
  display: grid;
  align-content: start;
  gap: 9px;
  padding: 13px;
  overflow: hidden;
}

.presentation-data-block > span,
.presentation-data-block em {
  color: var(--muted);
  font-size: 0.78em;
  font-style: normal;
}

.presentation-data-block > strong,
.presentation-table-block > strong {
  font-size: 1.08em;
}

.presentation-data-block p {
  margin: 0;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid rgba(108, 117, 125, 0.18);
  padding-top: 6px;
}

.presentation-data-block b {
  font-size: 1.18em;
}

.presentation-data-block.denied {
  place-content: center;
  text-align: center;
}

.presentation-data-block table,
.presentation-table-block table,
.presentation-chart-table-preview table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.presentation-data-block th,
.presentation-data-block td,
.presentation-table-block th,
.presentation-table-block td,
.presentation-chart-table-preview th,
.presentation-chart-table-preview td {
  border: 1px solid rgba(108, 117, 125, 0.22);
  padding: 5px 6px;
  font-size: 0.78em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.presentation-activity {
  display: grid;
  align-content: start;
  gap: 8px;
  border-color: var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.presentation-activity strong {
  font-size: 1.1em;
}

.presentation-activity span,
.presentation-activity em {
  color: var(--muted);
  font-size: 0.78em;
  font-style: normal;
}

.presentation-activity p {
  margin: 0;
  line-height: 1.45;
}

.presentation-resize-handle {
  position: absolute;
  width: 10px;
  height: 10px;
  border: 1.5px solid #1a73e8;
  border-radius: 2px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(60, 64, 67, 0.18);
}

.presentation-resize-handle.nw {
  left: -5px;
  top: -5px;
  cursor: nwse-resize;
}

.presentation-resize-handle.n {
  left: 50%;
  top: -5px;
  transform: translateX(-50%);
  cursor: ns-resize;
}

.presentation-resize-handle.ne {
  right: -5px;
  top: -5px;
  cursor: nesw-resize;
}

.presentation-resize-handle.e {
  right: -5px;
  top: 50%;
  transform: translateY(-50%);
  cursor: ew-resize;
}

.presentation-resize-handle.s {
  left: 50%;
  bottom: -5px;
  transform: translateX(-50%);
  cursor: ns-resize;
}

.presentation-resize-handle.w {
  left: -5px;
  top: 50%;
  transform: translateY(-50%);
  cursor: ew-resize;
}

.presentation-resize-handle.sw {
  left: -5px;
  bottom: -5px;
  cursor: nesw-resize;
}

.presentation-resize-handle.se {
  right: -5px;
  bottom: -5px;
  cursor: nwse-resize;
}

.presentation-rotate-handle {
  position: absolute;
  left: 50%;
  top: -30px;
  width: 12px;
  height: 12px;
  border: 1.5px solid #1a73e8;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 2px rgba(60, 64, 67, 0.18);
  cursor: grab;
  transform: translateX(-50%);
}

.presentation-rotate-handle::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 12px;
  width: 1px;
  height: 16px;
  background: #1a73e8;
}

.presentation-block.crop-active {
  outline: 2px dashed #1e63b6;
  outline-offset: 4px;
}

.presentation-selection-box {
  position: absolute;
  z-index: 999;
  border: 1px solid var(--brand);
  background: rgba(215, 0, 91, 0.08);
  pointer-events: none;
}

.presentation-snap-guide {
  position: absolute;
  z-index: 998;
  pointer-events: none;
  background: #1e63b6;
}

.presentation-snap-guide.x {
  top: 0;
  bottom: 0;
  width: 1px;
}

.presentation-snap-guide.y {
  left: 0;
  right: 0;
  height: 1px;
}

.presentation-context-menu {
  position: fixed;
  z-index: 2000;
  min-width: 156px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(17, 24, 39, 0.18);
  display: grid;
  gap: 2px;
}

.presentation-context-menu button {
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--ink);
  padding: 8px 10px;
  text-align: left;
  cursor: pointer;
  font: inherit;
}

.presentation-context-menu button:hover {
  background: #f5f7fb;
}

.presentation-layer-panel {
  display: grid;
  gap: 10px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.presentation-layer-list {
  display: grid;
  gap: 6px;
}

.presentation-layer-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px;
  background: #fff;
}

.presentation-layer-row.active {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(215, 0, 91, 0.1);
}

.presentation-layer-row > button {
  border: 0;
  background: transparent;
  color: var(--ink);
  padding: 0;
  text-align: left;
  display: grid;
  gap: 2px;
  cursor: pointer;
}

.presentation-layer-row > button span {
  color: var(--muted);
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.presentation-layer-row input {
  min-height: 32px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 6px 8px;
  font: inherit;
}

.presentation-layer-row.is-hidden {
  opacity: 0.58;
}

.presentation-layer-row > div {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.presentation-layer-row > div button {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f8fafc;
  color: var(--ink);
  padding: 5px 7px;
  font-size: 12px;
  cursor: pointer;
}

.presentation-layer-row > div button:hover {
  border-color: var(--brand);
  color: var(--brand);
  background: #fff7fb;
}

.presentation-settings {
  display: grid;
  gap: 10px;
}

.presentation-settings-section {
  display: grid;
  gap: 10px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.presentation-settings-section:last-of-type {
  border-bottom: 0;
  padding-bottom: 0;
}

.presentation-settings-section h4 {
  margin: 0;
  font-size: 13px;
  color: var(--ink);
}

.presentation-settings .field {
  margin-bottom: 0;
}

.presentation-settings select[multiple] {
  min-height: 132px;
}

.presentation-inspector-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.presentation-align-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.presentation-color-control {
  display: grid;
  gap: 6px;
}

.presentation-color-swatches,
.presentation-preset-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.presentation-color-swatches button {
  width: 24px;
  height: 24px;
  border: 1px solid var(--line);
  border-radius: 6px;
  cursor: pointer;
  position: relative;
}

.presentation-color-swatches button.active {
  border-color: #1a73e8;
  box-shadow: 0 0 0 3px rgba(26, 115, 232, 0.18);
}

.presentation-color-swatches button span {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #111;
  font-size: 12px;
  font-weight: 900;
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.9);
}

.presentation-preset-row button {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  padding: 6px 8px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

.presentation-preset-row button.active {
  border-color: #1a73e8;
  background: #e8f0fe;
  color: #174ea6;
  font-weight: 900;
}

.presentation-preset-row button b {
  margin-left: auto;
}

.presentation-preset-row i {
  width: 18px;
  height: 18px;
  border: 1px solid var(--line);
  border-radius: 4px;
}

.presentation-chart-table-preview {
  max-height: 180px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.presentation-inspector-tabs {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.presentation-image-drop-field {
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: #f8fafc;
  color: var(--ink);
  display: grid;
  gap: 5px;
  padding: 14px;
  cursor: pointer;
  text-align: center;
}

.presentation-image-drop-field input {
  width: 100%;
}

.presentation-image-drop-field strong {
  font-size: 14px;
}

.presentation-image-drop-field span {
  color: var(--muted);
  font-size: 12px;
}

.presentation-image-drop-field.drag-over {
  border-color: var(--brand);
  background: #fff7fb;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.compact-tabs {
  margin: 0;
}

.presentation-presenter {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  background: #111318;
  color: #fff;
  padding: 14px;
}

.presentation-presenter-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 12px;
  align-items: center;
  padding-bottom: 12px;
}

.presentation-presenter-stage {
  min-height: 0;
  display: grid;
  place-items: center;
}

.presentation-presenter-stage .presentation-stage-wrap {
  width: min(96vw, calc(96vh * 16 / 9));
  max-width: none;
}

.presentation-presenter-stage .presentation-canvas {
  border: 0;
  border-radius: 4px;
  box-shadow: none;
}

.presentation-end-screen {
  width: min(96vw, calc(96vh * 16 / 9));
  aspect-ratio: 16 / 9;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 16px;
  border-radius: 6px;
  background: #111318;
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}

.presentation-end-screen strong {
  font-size: clamp(34px, 5vw, 76px);
  line-height: 1.05;
}

.presentation-end-screen span {
  color: rgba(255, 255, 255, 0.72);
  font-size: clamp(15px, 2vw, 24px);
  font-weight: 800;
}

.presentation-presenter-notes {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px 12px;
  align-items: center;
  padding-top: 10px;
  color: rgba(255, 255, 255, 0.86);
}

.presentation-presenter-notes p {
  grid-column: 1 / -1;
  margin: 0;
  color: rgba(255, 255, 255, 0.72);
  white-space: pre-wrap;
}

.presentation-presenter.blank-black {
  background: #000;
}

.presentation-presenter.blank-white {
  background: #fff;
  color: #111;
}

.presentation-presenter.blank-black .presentation-presenter-stage,
.presentation-presenter.blank-white .presentation-presenter-stage {
  visibility: hidden;
}

.presentation-presenter.blank-white .presentation-presenter-notes,
.presentation-presenter.blank-white .presentation-presenter-notes p {
  color: #111;
}

@media (max-width: 1120px) {
  .cards {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .dashboard-main,
  .dashboard-wide,
  .detail-grid,
  .request-filter-form,
  .org-admin-layout,
  .permission-filter-form,
  .menu-template-form,
  .columns-2,
  .columns-3 {
    grid-template-columns: 1fr;
  }

  .org-tree-panel {
    position: static;
  }

  .request-action-panel {
    position: static;
  }

  .org-tree-list {
    max-height: 360px;
  }

  .heat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .analysis-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .presentation-workbench {
    grid-template-columns: 240px minmax(0, 1fr);
  }

  .presentation-editor-grid {
    grid-template-columns: 156px minmax(0, 1fr);
  }

  .presentation-project-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .presentation-format-sidebar {
    grid-column: 1 / -1;
    border-left: 0;
    border-top: 1px solid #dadce0;
    max-height: 360px;
  }

  .presentation-inspector {
    grid-column: 1 / -1;
  }

  .presentation-ribbon-panel {
    min-height: 78px;
  }

  .permission-menu-layout {
    grid-template-columns: 1fr 1fr;
  }

  .permission-menu-detail {
    grid-column: 1 / -1;
  }
}

@media (max-width: 760px) {
  .login-shell,
  .app-shell {
    grid-template-columns: 1fr;
  }

  .login-visual {
    min-height: 260px;
    padding: 28px;
  }

  .login-card {
    padding: 28px;
  }

  .sidebar {
    position: static;
    height: auto;
    overflow: visible;
    padding: 14px;
  }

  .nav {
    grid-template-columns: 1fr;
  }

  .nav-group {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .nav-heading {
    grid-column: 1 / -1;
  }

  .home-compose-nav {
    align-items: stretch;
    flex-direction: column;
  }

  .home-compose-nav .dashboard-tabs {
    width: 100%;
  }

  .home-editor-tools .compact-action {
    flex: 1 1 calc(33.333% - 6px);
  }

  .main {
    padding: 16px;
  }

  .presentation-project-head {
    align-items: stretch;
    flex-direction: column;
  }

  .presentation-project-head .primary {
    width: 100%;
  }

  .presentation-project-grid {
    grid-template-columns: 1fr;
  }

  .presentation-workbench {
    grid-template-columns: 1fr;
  }

  .presentation-editor-shell {
    height: auto;
    min-height: auto;
    overflow: visible;
  }

  .presentation-doc-header {
    align-items: stretch;
    flex-direction: column;
  }

  .presentation-doc-title {
    width: 100%;
  }

  .presentation-editor-grid {
    grid-template-columns: 1fr;
  }

  .presentation-slide-navigator {
    border-right: 0;
    border-bottom: 1px solid #dadce0;
    grid-template-rows: auto auto auto;
  }

  .presentation-slide-list.google-like {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 8px;
  }

  .presentation-slide-list.google-like .presentation-slide-thumb {
    flex: 0 0 150px;
    margin-bottom: 0;
  }

  .presentation-canvas-workspace {
    min-height: 320px;
    padding: 18px;
  }

  .presentation-format-sidebar {
    border-left: 0;
    border-top: 1px solid #dadce0;
  }

  .presentation-editor-toolbar,
  .presentation-presenter-top {
    display: grid;
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .presentation-ribbon-tabs button {
    padding: 7px 9px;
  }

  .presentation-ribbon-shape-grid,
  .presentation-ribbon-layout-grid {
    grid-template-columns: repeat(2, minmax(72px, 1fr));
  }

  .presentation-background-setting {
    grid-template-columns: 1fr;
  }

  .presentation-stage-wrap {
    max-width: 100%;
  }

  .presentation-sidebar,
  .presentation-inspector {
    min-width: 0;
  }

  .permission-menu-layout,
  .permission-account-summary,
  .permission-menu-row {
    grid-template-columns: 1fr;
  }

  .permission-org-tree,
  .permission-account-panel,
  .permission-menu-detail {
    height: auto;
  }

  .permission-tree-list,
  .permission-account-list,
  .permission-detail-body {
    max-height: none;
    overflow: visible;
  }

  .permission-section-title,
  .permission-feature-row {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .topbar .toolbar {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr;
    align-items: stretch;
    gap: 10px;
  }

  .request-workbench-head {
    flex-direction: column;
  }

  .request-workbench-stats {
    justify-content: flex-start;
  }

  .request-quick-filter {
    min-width: calc(50% - 4px);
  }

  .date-filter {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
    gap: 8px;
  }

  .date-filter label {
    grid-column: 1 / -1;
  }

  .date-filter span {
    display: none;
  }

  .date-filter input,
  .date-filter button {
    width: 100%;
    min-width: 0;
    padding-left: 8px;
    padding-right: 8px;
  }

  .comment-replies {
    margin-left: 12px;
    padding-left: 10px;
  }

  .input-action,
  .collab-row,
  .template-field-row,
  .survey-field-main,
  .survey-condition-controls,
  .org-edit-form,
  .section-board-head,
  .section-board-row {
    grid-template-columns: 1fr;
  }

  .reservation-compose-single,
  .fixed-reservation-group summary {
    grid-template-columns: 1fr;
  }

  .fixed-reservation-meta {
    text-align: left;
  }

  .section-work-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .scope-tabs {
    width: 100%;
    max-width: 100%;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 6px;
  }

  .scope-tab {
    min-width: auto;
    min-height: 44px;
    padding: 10px 12px;
    font-size: 13px;
  }

  .church-tabs {
    width: 100%;
    max-width: 100%;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 6px;
    padding-bottom: 8px;
  }

  .church-tab {
    min-height: 44px;
    padding: 10px 12px;
    font-size: 13px;
  }

  .dashboard-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 6px;
    margin: 12px -16px 14px;
    padding: 0 16px 4px;
    border-bottom: 0;
  }

  .dashboard-tab {
    flex: 0 0 auto;
    min-height: 40px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    padding: 8px 10px;
    font-size: 13px;
  }

  .dashboard-tab.active {
    background: rgba(215, 0, 91, 0.08);
  }

  .dashboard-cards {
    gap: 10px;
  }

  .card .value {
    font-size: 24px;
  }

  .panel-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .cards,
    .form-grid,
  .space-finder-form,
    .inline-form,
    .slot-grid,
  .heat-grid,
  .analysis-grid,
  .donut-wrap,
  .mini-bar-row,
  .flow-row {
    grid-template-columns: 1fr;
  }

  .request-table-wrap td:first-child {
    min-width: 220px;
  }

  .org-summary,
  .org-child-list,
  .available-space-item,
  .space-edit-form,
  .calendar-filter-form {
    grid-template-columns: 1fr;
  }

  .org-child-row {
    grid-template-columns: minmax(0, 1fr) 42px;
  }

  .org-child-order-actions,
  .org-child-order-button {
    width: 42px;
    min-width: 42px;
  }

  .org-child-order-button {
    min-height: 34px;
  }

  .span-2 {
    grid-column: span 1;
  }

  .echart {
    min-height: 260px;
  }

.echart-graph {
  min-height: 430px;
}

.permission-matrix th,
.permission-matrix td {
  text-align: center;
  vertical-align: middle;
}

.permission-matrix th:first-child,
.permission-matrix td:first-child {
  text-align: left;
  min-width: 180px;
}

.permission-check {
  justify-content: center;
  white-space: nowrap;
}

}

@media (max-width: 480px) {
  .main {
    padding: 12px;
  }

  .sidebar {
    padding: 12px;
  }

  .nav-group {
    grid-template-columns: 1fr;
  }

  .topbar h2 {
    font-size: 22px;
  }

  .panel,
  .card {
    padding: 14px;
  }

  .date-filter {
    grid-template-columns: 1fr;
  }

  .dashboard-tab,
  .scope-tab {
    font-size: 12px;
  }

  .echart {
    min-height: 230px;
  }

  .echart-wide {
    min-height: 260px;
  }

  .echart-graph {
    min-height: 360px;
  }

  .type-distribution-list {
    max-height: 320px;
  }

  .type-distribution-row {
    grid-template-columns: minmax(0, 1fr) 44px 38px;
  }

  .rating-choice-list {
    grid-template-columns: 1fr;
  }

  .rating-choice-list span {
    justify-content: flex-start;
    padding: 0 12px;
  }

  .presentation-workbench {
    grid-template-columns: 1fr;
  }

  .presentation-editor-toolbar,
  .presentation-presenter-top {
    grid-template-columns: 1fr;
    display: grid;
    align-items: stretch;
  }

  .presentation-stage-wrap {
    max-width: 100%;
  }

  .presentation-sidebar,
  .presentation-inspector {
    min-width: 0;
  }
}
