:root {
  color-scheme: light;
  --bg: #f4f6f8;
  --panel: #ffffff;
  --panel-strong: #f9fbfc;
  --ink: #19202a;
  --muted: #667085;
  --soft: #d9e0e7;
  --line: #e5eaf0;
  --blue: #6b7280;
  --blue-strong: #374151;
  --green: #14845f;
  --amber: #a15c06;
  --red: #b42318;
  --teal: #0f766e;
  --violet: #6d5bd0;
  --shadow: 0 18px 50px rgba(24, 32, 42, 0.1);
}

[data-theme="dark"] {
  color-scheme: dark;
  --bg: #15191f;
  --panel: #202631;
  --panel-strong: #252d39;
  --ink: #f4f7fb;
  --muted: #a8b3c1;
  --soft: #3b4655;
  --line: #303948;
  --blue: #9ca3af;
  --blue-strong: #d1d5db;
  --green: #51d2a0;
  --amber: #f1b15e;
  --red: #ff8b80;
  --teal: #6bd5cf;
  --violet: #b1a4ff;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
  --dark-page: #111827;
  --dark-surface: #1f2937;
  --dark-surface-soft: #263244;
  --dark-border: #3b4a5f;
  --dark-text: #f8fafc;
  --dark-text-muted: #cbd5e1;
  --dark-text-soft: #94a3b8;
  --dark-input: #182231;
  --dark-active: #2563eb;
  --dark-active-soft: #1e3a5f;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family:
    "Pretendard",
    "Apple SD Gothic Neo",
    "Malgun Gothic",
    Arial,
    sans-serif;
  letter-spacing: 0;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--ink);
  cursor: pointer;
  min-height: 40px;
  white-space: nowrap;
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    background 160ms ease;
}

button:hover {
  border-color: var(--blue);
}

button:active {
  transform: translateY(1px);
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(37, 99, 235, 0.25);
  outline-offset: 2px;
}

button[hidden] {
  display: none !important;
}

input,
select,
textarea {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--ink);
  padding: 10px 12px;
}

[data-theme="dark"] input,
[data-theme="dark"] select,
[data-theme="dark"] textarea {
  border-color: var(--dark-border);
  background: var(--dark-input);
  color: var(--dark-text);
}

[data-theme="dark"] input::placeholder,
[data-theme="dark"] textarea::placeholder {
  color: var(--dark-text-soft);
  opacity: 1;
}

[data-theme="dark"] select option {
  background: var(--dark-input);
  color: var(--dark-text);
}

[data-theme="dark"] input:-webkit-autofill,
[data-theme="dark"] textarea:-webkit-autofill,
[data-theme="dark"] select:-webkit-autofill {
  -webkit-text-fill-color: var(--dark-text);
  box-shadow: 0 0 0 1000px var(--dark-input) inset;
}

[data-theme="dark"] img,
[data-theme="dark"] svg,
[data-theme="dark"] .avatar,
[data-theme="dark"] .member-avatar,
[data-theme="dark"] .brand-logo {
  filter: none;
}

textarea {
  resize: vertical;
  line-height: 1.55;
}

.permission-panel {
  display: grid;
  gap: 8px;
  margin-top: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-strong);
}

.permission-panel-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}

.permission-panel-head span,
.permission-note,
.permission-manager small {
  color: var(--muted);
  font-size: 0.84rem;
}

.permission-mode-link {
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.84rem;
  padding: 2px 0;
  cursor: pointer;
  white-space: nowrap;
}

.permission-mode-link:hover {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.permission-panel label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 0.84rem;
}

.permission-panel select {
  min-height: 34px;
  padding: 6px 9px;
  font-size: 0.9rem;
}

.permission-current-user {
  display: grid;
  gap: 4px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65);
}

.permission-current-user span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.permission-current-user strong {
  color: var(--ink);
  font-size: 0.98rem;
  font-weight: 800;
}

[data-theme="dark"] .permission-panel {
  border-color: var(--dark-border);
  background: var(--dark-surface);
  color: var(--dark-text);
}

[data-theme="dark"] .permission-panel-head strong {
  color: var(--dark-text);
}

[data-theme="dark"] .permission-panel-head span,
[data-theme="dark"] .permission-note,
[data-theme="dark"] .permission-manager small {
  color: var(--dark-text-muted);
}

[data-theme="dark"] .permission-mode-link {
  color: var(--dark-text-muted);
}

[data-theme="dark"] .permission-mode-link:hover {
  color: var(--dark-text);
}

[data-theme="dark"] .permission-current-user {
  border-color: #475569;
  background: #273244;
  color: var(--dark-text);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

[data-theme="dark"] .permission-current-user span {
  color: #cbd5e1;
}

[data-theme="dark"] .permission-current-user strong {
  color: #f8fafc;
}

.shared-sync-status {
  display: grid;
  gap: 3px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.shared-sync-status span {
  color: var(--muted);
  font-size: 0.78rem;
}

.shared-sync-status strong {
  color: var(--ink);
  font-size: 0.82rem;
  line-height: 1.35;
}

.shared-sync-status.synced {
  border-color: #b7e4c7;
  background: #f3fbf6;
}

.shared-sync-status.cached,
.shared-sync-status.error {
  border-color: #ffd6a5;
  background: #fff8ec;
}

.permission-manager {
  display: grid;
  gap: 7px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

.permission-admin-open {
  width: 100%;
  min-height: 40px;
}

.permission-manager-dialog {
  width: min(1240px, calc(100vw - 28px));
  max-height: calc(100vh - 46px);
  padding: 0;
  overflow: hidden;
}

.permission-manager-dialog::backdrop {
  background: rgba(15, 23, 42, 0.45);
}

.permission-dialog-head {
  padding: 22px 26px 16px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.permission-dialog-head h2 {
  margin: 2px 0 4px;
  font-size: 1.78rem;
}

.permission-dialog-head p {
  margin: 0;
  color: var(--muted);
}

.permission-dialog-grid {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 16px;
  max-height: calc(100vh - 134px);
  overflow-y: auto;
  overflow-x: hidden;
  padding: 18px 22px 22px;
  background: var(--bg);
}

.permission-dialog-summary,
.permission-manager-dialog .access-code-manager {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}

.permission-dialog-summary {
  align-self: start;
  display: grid;
  gap: 10px;
  padding: 18px;
}

.permission-dialog-summary strong {
  color: var(--muted);
  font-size: 0.88rem;
}

.permission-dialog-summary span {
  font-size: 1.2rem;
  font-weight: 800;
}

.permission-dialog-summary p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.permission-dialog-tips {
  display: grid;
  gap: 6px;
}

.permission-add-member {
  width: 100%;
  min-height: 40px;
}

.permission-dialog-tips span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel-strong);
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 700;
}

.permission-manager-dialog .access-code-manager {
  min-width: 0;
  padding: 18px;
}

.permission-manager-dialog .permission-checks label {
  font-size: 0.86rem;
}

.permission-manager-dialog .access-code-actions {
  justify-content: flex-start;
}

.access-code-form-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.8fr) minmax(0, 1.4fr);
  gap: 10px;
  align-items: end;
}

.access-code-form-grid label,
.permission-manager-dialog .access-code-manager label {
  min-width: 0;
}

.access-code-custom-field input {
  font-family: Consolas, "Courier New", monospace;
  font-weight: 800;
  letter-spacing: 0;
}

@media (max-width: 980px) {
  .permission-manager-dialog {
    width: calc(100vw - 20px);
  }

  .permission-dialog-grid {
    grid-template-columns: 1fr;
    padding: 14px;
  }

  .permission-dialog-summary {
    grid-template-columns: minmax(120px, 0.4fr) minmax(0, 1fr);
    align-items: center;
  }

  .permission-dialog-summary p,
  .permission-dialog-tips {
    grid-column: 1 / -1;
  }

  .permission-dialog-tips {
    display: flex;
    flex-wrap: wrap;
  }
}

@media (max-width: 720px) {
  .permission-dialog-head {
    padding: 16px;
  }

  .permission-dialog-head h2 {
    font-size: 1.45rem;
  }

  .permission-dialog-summary {
    grid-template-columns: 1fr;
  }

  .access-code-form-grid {
    grid-template-columns: 1fr;
  }

  .permission-manager-dialog .access-code-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .permission-manager-dialog .access-code-actions button {
    width: 100%;
  }
}

.permission-checks {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.permission-checks label {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
  min-height: 30px;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--ink);
  font-size: 0.76rem;
  white-space: nowrap;
}

.permission-checks input {
  width: auto;
  min-height: auto;
  padding: 0;
}

.permission-manager-head,
.access-code-actions,
.access-code-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.access-code-manager {
  display: grid;
  gap: 8px;
}

.access-code-manager > label {
  gap: 4px;
}

.permission-manager-head small,
.access-code-row span,
.issued-code-box small {
  display: block;
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.35;
}

.access-code-actions button {
  min-height: 34px;
  padding-inline: 10px;
  white-space: nowrap;
}

.issued-code-box {
  display: grid;
  gap: 4px;
  padding: 10px;
  border: 1px solid #93c5fd;
  border-radius: 8px;
  background: #eff6ff;
}

.issued-code-box strong {
  font-family: Consolas, "Courier New", monospace;
  letter-spacing: 0;
}

.access-code-list {
  display: grid;
  gap: 6px;
}

.approval-authority-panel {
  display: grid;
  gap: 8px;
  margin-top: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.approval-authority-panel strong {
  font-size: 0.95rem;
}

.approval-authority-panel small {
  color: var(--muted);
  line-height: 1.45;
}

.approval-authority-checks {
  margin-top: 2px;
}

.access-code-row {
  padding: 8px 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.access-code-row > div {
  min-width: 0;
}

.access-code-row strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.access-code-row button {
  flex: 0 0 auto;
  min-height: 32px;
  padding-inline: 9px;
  white-space: nowrap;
}

.readonly-badge,
.permission-readonly {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel-strong);
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 700;
}

.permission-readonly {
  width: 100%;
  border-radius: 8px;
}

.login-gate {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    linear-gradient(135deg, rgba(37, 99, 235, 0.08), transparent 42%),
    var(--bg);
}

.login-gate[hidden] {
  display: none;
}

.login-card {
  width: min(420px, 100%);
  display: grid;
  gap: 18px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.login-brand {
  display: flex;
  gap: 16px;
  align-items: center;
}

.login-brand h1 {
  margin: 3px 0 0;
  font-size: 24px;
}

.login-logo {
  display: grid;
  width: 64px;
  height: 64px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 18px;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0;
  background: var(--panel-strong);
}

.login-message {
  min-height: 20px;
  margin: -4px 0 0;
  color: var(--red);
  font-size: 14px;
}

.login-note {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.password-field {
  position: relative;
  display: block;
}

.password-field input {
  width: 100%;
  padding-right: 46px;
}

.password-toggle {
  position: absolute;
  right: 10px;
  top: 50%;
  width: 30px;
  height: 30px;
  display: inline-grid;
  place-items: center;
  transform: translateY(-50%);
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 16px;
  cursor: pointer;
}

.password-toggle:hover,
.password-toggle[aria-pressed="true"] {
  background: var(--panel-strong);
  color: var(--ink);
}

.auto-login-line {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-strong);
  font-weight: 800;
}

.auto-login-line input {
  width: 18px;
  height: 18px;
  accent-color: var(--ink);
}

.mobile-quick-actions {
  display: none;
}

.app-locked {
  display: none !important;
}

.app-shell {
  display: grid;
  grid-template-columns: minmax(280px, 340px) minmax(0, 1fr);
  min-height: 100vh;
}

.dashboard-panel {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 24px;
  border-right: 1px solid var(--line);
  background: var(--panel);
  overflow-y: auto;
}

.brand-block,
.workspace-header,
.dialog-head,
.section-head,
.board-toolbar,
.member-profile,
.task-row,
.report-row,
.template-item,
.file-actions {
  display: flex;
  align-items: center;
}

.brand-block,
.workspace-header,
.dialog-head,
.section-head,
.board-toolbar,
.member-profile {
  justify-content: space-between;
  gap: 16px;
}

.brand-block {
  align-items: flex-start;
}

.brand-copy {
  flex: 1;
  min-width: 0;
}

.brand-copy span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.88rem;
}

.logo-button {
  display: grid;
  place-items: center;
  width: 86px;
  min-width: 86px;
  height: 58px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  overflow: hidden;
}

.logo-button img {
  display: block;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.logo-button span {
  color: #111111;
  font-size: 1.15rem;
  font-weight: 500;
  line-height: 1;
}

.visually-hidden {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  clip-path: inset(50%);
}

.eyebrow {
  margin: 0 0 5px;
  color: var(--blue);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: clamp(1.28rem, 2vw, 1.55rem);
}

h2 {
  margin-bottom: 0;
  font-size: clamp(1.25rem, 2.4vw, 1.8rem);
}

h3 {
  margin-bottom: 8px;
  font-size: 1rem;
}

.icon-button {
  display: inline-grid;
  place-items: center;
  width: 42px;
  min-width: 42px;
  height: 42px;
  padding: 0;
  font-size: 1.1rem;
}

.today-card {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-strong);
}

.today-card p {
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 0.9rem;
}

.today-card strong {
  display: grid;
  gap: 2px;
  font-size: 1.06rem;
  line-height: 1.36;
}

.today-card strong span {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.workspace-metrics {
  grid-template-columns: repeat(6, minmax(112px, 1fr));
  gap: 10px;
}

.metric-tile {
  min-height: 96px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-strong);
  color: inherit;
  text-align: left;
}

button.metric-tile {
  cursor: pointer;
}

.workspace-metrics .metric-tile {
  min-height: 74px;
  background: var(--panel);
  box-shadow: 0 12px 30px rgba(24, 32, 42, 0.06);
}

.workspace-metrics .metric-tile.active {
  border-color: #93b4ef;
  background: #eef5ff;
  box-shadow: 0 10px 24px rgba(23, 70, 162, 0.1);
}

.workspace-metrics .metric-tile:hover {
  border-color: #b6c9ea;
}

.metric-tile span {
  color: var(--muted);
  font-size: 0.84rem;
}

.metric-tile strong {
  display: block;
  margin-top: 8px;
  font-size: 1.95rem;
  line-height: 1;
}

.metric-tile.active span,
.metric-tile.active strong {
  font-weight: 900;
}

.workspace-metrics .metric-tile strong {
  font-size: 1.62rem;
}

[data-theme="dark"] .workspace-metrics .metric-tile {
  border-color: var(--dark-border);
  background: var(--dark-surface);
  color: var(--dark-text);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.22);
}

[data-theme="dark"] .workspace-metrics .metric-tile span {
  color: var(--dark-text-muted);
}

[data-theme="dark"] .workspace-metrics .metric-tile strong {
  color: var(--dark-text);
}

[data-theme="dark"] .workspace-metrics .metric-tile.active {
  border-color: #60a5fa;
  background: var(--dark-active-soft);
  color: #ffffff;
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.28);
}

[data-theme="dark"] .workspace-metrics .metric-tile.active span,
[data-theme="dark"] .workspace-metrics .metric-tile.active strong {
  color: #ffffff;
}

[data-theme="dark"] .workspace-metrics .metric-tile:hover {
  border-color: #60a5fa;
  background: var(--dark-surface-soft);
}

[data-theme="dark"] .workspace-metrics .metric-tile.active:hover {
  background: #1d4ed8;
}

.action-stack {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
  width: 100%;
}

.action-stack button {
  white-space: nowrap;
}

.file-actions button,
.file-label {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 10px 12px;
}

.sidebar-app-link {
  display: grid;
  justify-items: center;
  gap: 6px;
  width: 100%;
  padding: 10px 12px;
  box-sizing: border-box;
  border: 1px solid #d7dee8;
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  transition:
    border-color 0.2s ease,
    background 0.2s ease,
    box-shadow 0.2s ease;
}

.sidebar-app-link img {
  display: block;
  width: 56px;
  height: 56px;
  border-radius: 8px;
  object-fit: cover;
}

.sidebar-app-link:hover {
  border-color: #cbd5e1;
  background: #f8fafc;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
}

.sidebar-record-menu {
  appearance: none;
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  align-items: center;
  column-gap: 10px;
  width: 100%;
  min-width: 0;
  height: 44px;
  min-height: 44px;
  box-sizing: border-box;
  margin: 0;
  padding: 0 14px;
  border: 1px solid #d7dee8;
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  line-height: 1;
  text-align: left;
}

.sidebar-record-menu__icon {
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: inherit;
}

.sidebar-record-menu__icon svg {
  display: block;
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sidebar-record-menu__label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-record-menu--primary {
  border-color: #4b5563;
  background: #4b5563;
  color: #ffffff;
  font-weight: 700;
}

.sidebar-record-menu--secondary {
  border-color: #d7dee8;
  background: #ffffff;
  color: var(--ink);
}

.sidebar-record-menu:hover {
  transform: none;
}

.sidebar-record-menu--primary:hover {
  border-color: #111827;
  background: #111827;
}

.sidebar-record-menu--secondary:hover {
  border-color: #cbd5e1;
  background: #f8fafc;
}

[data-theme="dark"] .sidebar-record-menu,
[data-theme="dark"] .sidebar-record-menu--primary,
[data-theme="dark"] .sidebar-record-menu--secondary {
  border-color: #475569;
  background: #273244;
  color: #f8fafc;
}

[data-theme="dark"] .sidebar-record-menu__icon,
[data-theme="dark"] .sidebar-record-menu__label {
  color: inherit;
}

[data-theme="dark"] .sidebar-record-menu:hover,
[data-theme="dark"] .sidebar-record-menu--primary:hover,
[data-theme="dark"] .sidebar-record-menu--secondary:hover {
  border-color: #64748b;
  background: #334155;
  color: #ffffff;
  transform: none;
}

[data-theme="dark"] .sidebar-record-menu:active,
[data-theme="dark"] .sidebar-record-menu.active {
  border-color: #60a5fa;
  background: #1e3a5f;
  color: #ffffff;
}

.primary-action {
  border-color: #4b5563;
  background: #4b5563;
  color: #ffffff;
  font-weight: 800;
}

.primary-action:hover {
  border-color: #111827;
  background: #111827;
}

.side-section {
  display: grid;
  gap: 10px;
}

.compact h2 {
  font-size: 1rem;
}

.alert-list {
  display: grid;
  gap: 8px;
}

.section-head.compact:has(#noticeTitle) + .alert-list {
  gap: 6px;
}

.alert-item {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-strong);
}

.alert-item strong {
  font-size: 0.9rem;
}

.alert-item span {
  color: var(--muted);
  font-size: 0.82rem;
}

.mail-card {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-strong);
}

.mail-card strong {
  font-size: 0.9rem;
  overflow-wrap: anywhere;
}

.mail-card span {
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.45;
}

.mail-card button {
  width: 100%;
}

.mail-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.82fr);
  gap: 8px;
}

.file-actions {
  flex-direction: column;
  gap: 8px;
}

.file-label {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
}

#importInput {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  clip-path: inset(50%);
}

.backup-layout {
  display: grid;
  grid-template-columns: minmax(260px, 0.75fr) minmax(0, 1.25fr);
  gap: 14px;
  margin-top: 18px;
  min-height: min(62vh, 560px);
}

.backup-panel {
  display: grid;
  align-content: start;
  gap: 12px;
  min-height: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-strong);
  overflow: auto;
}

.backup-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.backup-stat,
.backup-last {
  display: grid;
  gap: 5px;
  min-height: 68px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.backup-last {
  grid-column: 1 / -1;
}

.backup-stat span,
.backup-last span,
.backup-row span,
.backup-result span:not(.badge) {
  color: var(--muted);
  font-size: 0.78rem;
}

.backup-stat strong,
.backup-last strong {
  font-size: 1.18rem;
}

.backup-actions,
.backup-history,
.backup-results {
  display: grid;
  gap: 8px;
}

.backup-row,
.backup-result {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.backup-row div,
.backup-result div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.backup-row strong,
.backup-result strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workspace {
  min-width: 0;
  padding: 20px 28px;
  overflow: auto;
}

.workspace-header {
  position: sticky;
  top: 0;
  z-index: 3;
  padding-bottom: 16px;
  background: var(--bg);
}

.workspace-title-block {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.workspace-title-block h2 {
  overflow: hidden;
  margin: 0;
  font-size: 2rem;
  line-height: 1.14;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.date-weather-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.date-weather-bar strong {
  color: var(--ink);
  font-size: 0.98rem;
  font-weight: 900;
}

.date-weather-bar span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 10px;
  border: 1px solid color-mix(in srgb, var(--blue) 26%, var(--line));
  border-radius: 999px;
  background: color-mix(in srgb, var(--blue) 8%, var(--panel));
  color: var(--blue-strong);
  font-size: 0.82rem;
  font-weight: 900;
  white-space: nowrap;
}

.header-tools {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  min-width: min(100%, 520px);
}

.search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  width: min(100%, 300px);
  min-width: 230px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 0 10px;
}

.search-box input {
  min-width: 0;
  border: 0;
  background: transparent;
  padding-inline: 0;
  text-overflow: ellipsis;
}

.header-tools > button {
  min-width: 72px;
  padding-inline: 12px;
}

#logoutBtn {
  min-width: 74px;
}

.board-view {
  display: grid;
  gap: 16px;
}

.consult-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 14px 32px rgba(24, 32, 42, 0.06);
}

.consult-box-main {
  display: flex;
  align-items: center;
  gap: 18px;
  min-width: 0;
}

.consult-box-main > div:first-child {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.consult-box-main strong {
  font-size: 0.98rem;
}

.consult-box-main span {
  color: var(--muted);
  font-size: 0.82rem;
}

.consult-counts {
  display: flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
}

.consult-counts span {
  min-height: 34px;
  padding: 8px 14px;
  border: 1px solid #dbe4ef;
  border-radius: 999px;
  background: #f8fafc;
  color: #475569;
  font-size: 0.88rem;
  font-weight: 900;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.06);
}

.consult-counts b {
  color: #111827;
  font-size: 1rem;
}

.consult-counts span:nth-child(1) {
  border-color: #fecaca;
  background: #fef2f2;
  color: #b91c1c;
}

.consult-counts span:nth-child(1) b {
  color: #dc2626;
}

.consult-counts span:nth-child(2) {
  border-color: #bfdbfe;
  background: #eff6ff;
  color: #1d4ed8;
}

.consult-counts span:nth-child(2) b {
  color: #2563eb;
}

.consult-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.consult-actions button {
  min-height: 34px;
  padding: 7px 11px;
  border: 1px solid #334155;
  border-radius: 8px;
  background: #475569;
  color: #ffffff;
  font-weight: 900;
  white-space: nowrap;
}

.consult-actions button:first-child {
  background: #475569;
  color: #ffffff;
}

dialog.consult-inbox-dialog {
  width: min(99vw, 1680px);
  max-width: 1680px;
  height: min(96vh, 1040px);
  max-height: 96vh;
  padding: 0;
  overflow: hidden;
}

.consult-dialog-head {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px 14px;
  border-bottom: 1px solid var(--line);
  background: var(--panel);
}

.consult-dialog-head span {
  color: var(--brand);
  font-size: 0.76rem;
  font-weight: 900;
}

.consult-dialog-head h2 {
  margin: 2px 0 4px;
  font-size: 1.65rem;
}

.consult-dialog-head p {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
}

.consult-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  padding: 14px 20px 0;
}

.consult-summary-grid div,
.consult-summary-grid button {
  display: grid;
  gap: 3px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.consult-summary-grid div:nth-child(2),
.consult-summary-grid button:nth-child(2) {
  border-color: #fecaca;
  background: #fef2f2;
}

.consult-summary-grid div:nth-child(3),
.consult-summary-grid button:nth-child(3) {
  border-color: #bfdbfe;
  background: #eff6ff;
}

.consult-summary-grid button.active {
  border-color: #1746a2;
  background: #eaf2ff;
  box-shadow: 0 8px 20px rgba(23, 70, 162, 0.1);
}

.consult-summary-grid span {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 900;
}

.consult-summary-grid strong {
  font-size: 1.6rem;
}

.consult-summary-grid div:nth-child(2) span,
.consult-summary-grid div:nth-child(2) strong,
.consult-summary-grid button:nth-child(2) span,
.consult-summary-grid button:nth-child(2) strong {
  color: #dc2626;
}

.consult-summary-grid div:nth-child(3) span,
.consult-summary-grid div:nth-child(3) strong,
.consult-summary-grid button:nth-child(3) span,
.consult-summary-grid button:nth-child(3) strong {
  color: #2563eb;
}

.consult-dialog-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 14px 20px 0;
}

.consult-toolbar-main,
.consult-toolbar-admin {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.consult-toolbar-admin {
  margin-left: auto;
}

.consult-dialog-toolbar button,
.consult-detail-actions button,
.consult-empty-panel button {
  min-height: 36px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--ink);
  font-weight: 900;
}

.consult-dialog-toolbar button.active,
.consult-detail-actions .primary-action {
  border-color: #475569;
  background: #475569;
  color: #ffffff;
}

.consult-toolbar-admin button {
  border-color: #d8b4fe;
  background: #faf5ff;
  color: #7e22ce;
}

.consult-toolbar-admin button.active {
  border-color: #7e22ce;
  background: #7e22ce;
  color: #ffffff;
}

.consult-inbox-layout {
  display: grid;
  grid-template-columns: minmax(320px, 420px) minmax(0, 1fr);
  gap: 14px;
  height: calc(min(96vh, 1040px) - 220px);
  min-height: 0;
  padding: 14px 20px 20px;
  overflow: hidden;
}

.consult-list {
  display: grid;
  align-content: start;
  gap: 8px;
  min-height: 0;
  max-height: none;
  overflow: auto;
}

.consult-card {
  display: grid;
  gap: 6px;
  width: 100%;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  text-align: left;
}

.consult-card.active {
  border-color: #475569;
  box-shadow: inset 0 0 0 1px #475569;
}

.consult-card > span,
.consult-detail-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.consult-card strong {
  font-size: 0.94rem;
  overflow-wrap: anywhere;
}

.consult-card small {
  color: var(--muted);
  font-size: 0.78rem;
}

.consult-card-customer {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.consult-card-customer b {
  color: var(--ink);
  font-size: 0.86rem;
  font-weight: 800;
}

.consult-status {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 4px 8px;
  border-radius: 999px;
  background: #eef2ff;
  color: #4338ca;
  font-size: 0.72rem;
  font-style: normal;
  font-weight: 900;
  white-space: nowrap;
}

.consult-status-new {
  background: #ecfeff;
  color: #0e7490;
}

.consult-status-unchecked {
  background: #fff7ed;
  color: #c2410c;
}

.consult-status-checking {
  background: #eff6ff;
  color: #1d4ed8;
}

.consult-status-completed {
  background: #f1f5f9;
  color: #475569;
}

.consult-status-contract {
  background: #f5f3ff;
  color: #7c3aed;
}

.consult-detail-panel {
  display: grid;
  justify-items: center;
  align-content: start;
  min-height: 0;
  height: 100%;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  overflow: auto;
}

.consult-detail-panel > * {
  width: min(100%, 820px);
}

.consult-admin-form,
.consumer-consult-form {
  display: grid;
  gap: 12px;
}

.consult-copy-editor {
  display: grid;
  gap: 18px;
}

.consult-copy-editor-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  padding: 18px;
  border: 1px solid #dbe3ef;
  border-radius: 14px;
  background: #fff;
}

.consult-copy-editor-head h3 {
  margin: 4px 0 6px;
  font-size: 22px;
}

.consult-copy-editor-head p {
  margin: 0;
  color: #64748b;
}

.consult-copy-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.consult-copy-field {
  display: grid;
  gap: 6px;
  padding: 12px;
  border: 1px solid #dbe3ef;
  border-radius: 12px;
  background: #fff;
}

.consult-copy-field span {
  font-size: 13px;
  font-weight: 800;
  color: #334155;
}

.consult-copy-field input,
.consult-copy-field textarea {
  width: 100%;
  border: 1px solid #d6deea;
  border-radius: 10px;
  padding: 10px 12px;
  font: inherit;
}

@media screen and (max-width: 768px) {
  .consult-copy-editor-head,
  .consult-copy-grid {
    display: grid;
    grid-template-columns: 1fr;
  }
}

.section-head.compact:has(#noticeTitle) {
  align-items: center;
}

#noticeTitle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  margin-bottom: 8px;
}

.notice-preview-title,
.notice-view-all,
.notice-preview-item,
.notice-empty {
  font: inherit;
  cursor: pointer;
}

.notice-preview-title {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 0;
  background: transparent;
  color: #111827;
  font-size: 0.96rem;
  font-weight: 700;
}

.notice-preview-title em {
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: #d62020;
  color: #fff;
  font-style: normal;
  font-size: 0.72rem;
  line-height: 18px;
  text-align: center;
}

.notice-icon {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  border-radius: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  color: #ef5b4d;
  font-size: 18px;
  font-weight: 900;
  line-height: 1;
  padding: 0;
}

.notice-preview-title.has-unread .notice-icon {
  box-shadow: none;
}

.notice-view-all {
  flex: 0 0 auto;
  border: 0;
  background: transparent;
  color: #69758a;
  font-size: 0.78rem;
  font-weight: 800;
}

.notice-preview-item {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  grid-template-areas:
    "badge title"
    ". date";
  gap: 3px 10px;
  align-items: center;
  width: 100%;
  min-height: 56px;
  padding: 8px 10px;
  border: 1px solid #dfe5ee;
  border-left: 3px solid #dfe5ee;
  border-radius: 10px;
  background: #fff;
  color: #111827;
  text-align: left;
  box-shadow: 0 3px 9px rgba(15, 23, 42, 0.045);
  transition: box-shadow 0.18s ease, border-color 0.18s ease;
}

.notice-preview-item:hover {
  box-shadow: 0 6px 14px rgba(15, 23, 42, 0.08);
}

.notice-preview-item.notice {
  border-color: #ffc7bd;
  border-left-color: #ef5b4d;
  background: #fff5f2;
  color: #6f211c;
}

.notice-preview-item.chat {
  border-color: #c8d4ff;
  border-left-color: #5068e8;
  background: #f2f6ff;
  color: #243b82;
}

.notice-preview-item.unread {
  --notice-accent-strong: #ef5b4d;
  --notice-accent-soft: #ffc7bd;
  animation: noticeAccentPulse 1.1s ease-in-out infinite;
  box-shadow: 0 4px 11px rgba(15, 23, 42, 0.075);
}

.notice-preview-item.chat.unread {
  --notice-accent-strong: #5068e8;
  --notice-accent-soft: #c8d4ff;
}

.notice-preview-unread-dot,
.notice-preview-item.unread::after {
  content: none !important;
  display: none !important;
}

.notice-preview-item.unread strong {
  font-weight: 900;
}

.notice-preview-badge {
  grid-area: badge;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  width: 64px;
  min-width: 64px;
  max-width: 64px;
  min-height: 20px;
  padding: 0 7px;
  border-radius: 999px;
  background: #e5483f;
  color: #fff;
  font-size: 0.69rem;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  text-align: center;
}

.notice-preview-badge.notice {
  letter-spacing: 0.16em;
  text-indent: 0.16em;
}

.notice-preview-item.chat .notice-preview-badge {
  background: #4664e8;
  color: #fff;
}

.notice-preview-text {
  grid-area: title;
  min-width: 0;
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  font-size: 0.82rem;
  line-height: 1.28;
  color: inherit;
}

.notice-preview-item.pinned.notice .notice-preview-text::before {
  content: "📌";
  display: inline-block;
  margin-right: 4px;
  font-size: 0.72rem;
  line-height: 1;
  vertical-align: 0.05em;
}

.notice-preview-date {
  grid-area: date;
  justify-self: end;
  color: #8b2d27;
  font-size: 0.69rem;
  font-weight: 700;
  line-height: 1.1;
  margin-top: 0;
}

.notice-preview-item.chat .notice-preview-date {
  color: #2f4aa7;
}

.notice-empty {
  width: 100%;
  padding: 12px;
  border: 1px dashed #d7dee8;
  border-radius: 9px;
  background: #fbfcfe;
  color: #69758a;
}

dialog.notice-board-dialog.approval-archive-dialog {
  width: min(98vw, 1500px);
  height: min(95vh, 980px);
  max-height: 94vh;
  min-width: 0;
  margin: auto;
  box-sizing: border-box;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

dialog.notice-board-dialog.approval-archive-dialog:not([open]) {
  display: none;
}

.notice-board-dialog .notice-board-detail {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  height: 100%;
  max-height: 100%;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 22px;
  overflow-x: hidden;
  overflow-y: hidden;
}

.notice-board-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 18px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.notice-board-toolbar > button,
.notice-detail-actions button,
.notice-form button {
  min-height: 38px;
  padding: 8px 14px;
  border: 1px solid #d8dee8;
  border-radius: 8px;
  background: #fff;
  color: #1f2937;
  font-weight: 800;
}

.notice-board-toolbar > button {
  background: #2f3a4a;
  color: #fff;
  border-color: #2f3a4a;
}

.notice-board-body {
  flex: 1;
  min-height: 0;
  min-width: 0;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow-x: hidden;
  overflow-y: auto;
  display: grid;
  gap: 10px;
  padding-right: 4px;
}

.notice-board-body:has(.notice-detail) {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.notice-board-body:has(.notice-form) {
  overflow: hidden;
}

.notice-board-card button {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  display: grid;
  gap: 6px;
  padding: 14px 16px;
  border: 1px solid #dfe5ee;
  border-radius: 10px;
  background: #fff;
  text-align: left;
}

.notice-board-card.notice button,
.notice-board-card.pinned button {
  border-color: #f1c8bc;
  background: #fff8f5;
}

.notice-kind {
  color: #b23d25;
  font-size: 0.78rem;
  font-weight: 900;
}

.notice-board-card strong {
  color: #111827;
  font-size: 1rem;
}

.notice-board-card small,
.notice-detail-head p,
.notice-form-help {
  color: #69758a;
  font-size: 0.82rem;
}

.notice-detail {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px;
  border: 1px solid #dfe5ee;
  border-radius: 12px;
  background: #fff;
  flex: 0 1 auto;
  height: auto;
  max-height: 100%;
  min-height: 0;
  min-width: 0;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow-x: hidden;
  overflow-y: hidden;
  position: static;
  transform: none;
}

.notice-detail *,
.notice-comments *,
.notice-comment-form *,
.notice-form *,
.notice-board-toolbar *,
.notice-board-body * {
  max-width: 100%;
  box-sizing: border-box;
  min-width: 0;
}

.notice-detail-head h3 {
  margin: 6px 0;
  color: #111827;
  font-size: 1.35rem;
  font-weight: 800;
  line-height: 1.35;
  opacity: 1;
  visibility: visible;
  overflow-wrap: anywhere;
  word-break: break-word;
  white-space: pre-wrap;
}

.notice-detail-head,
.notice-detail-head p,
.notice-kind,
.notice-board-card strong,
.notice-board-card small {
  max-width: 100%;
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.notice-detail-scroll {
  flex: 0 1 auto;
  min-height: 0;
  min-width: 0;
  width: 100%;
  max-width: 100%;
  max-height: clamp(180px, 42vh, 520px);
  overflow-y: auto;
  overflow-x: hidden;
  display: grid;
  align-content: start;
  gap: 14px;
  padding: 0 4px 0 0;
  position: static;
  transform: none;
}

.notice-detail-content {
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  color: #1f2937;
  line-height: 1.8;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
  height: auto;
  opacity: 1;
  visibility: visible;
  position: static;
  transform: none;
  overflow-x: hidden;
}

.notice-comments {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  margin-top: 2px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  min-height: 0;
  overflow-x: hidden;
}

.notice-comments-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 10px;
}

.notice-comments-head h4 {
  margin: 0;
  font-size: 0.96rem;
}

.notice-comment-list {
  display: grid;
  gap: 5px;
  margin-bottom: 7px;
  min-height: 0;
  min-width: 0;
  width: 100%;
  max-width: 100%;
  padding-right: 4px;
  overflow-x: hidden;
}

.notice-comment-card {
  height: auto;
  min-height: 0;
  padding: 8px 12px;
  box-sizing: border-box;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #f8fafc;
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.notice-comment-card.editing {
  background: #ffffff;
  border-color: #cbd5e1;
}

.notice-comment-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 3px;
  font-size: 0.82rem;
}

.notice-comment-meta strong {
  min-width: 0;
  color: var(--text);
}

.notice-comment-meta-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 5px;
  margin-left: auto;
}

.notice-comment-meta span,
.notice-comment-empty {
  color: var(--muted);
}

.notice-comment-meta-actions button {
  min-height: 0;
  padding: 2px 5px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: #475569;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.2;
}

.notice-comment-meta-actions button.danger {
  color: #b42318;
}

.notice-comment-content {
  margin: 3px 0 0;
  line-height: 1.4;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.notice-comment-tools,
.notice-comment-actions {
  position: static;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 5px;
}

.notice-comment-form,
.notice-comment-edit-form {
  display: grid;
  gap: 5px;
  flex-shrink: 0;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  padding-top: 8px;
  border-top: 1px solid #edf1f6;
  background: #ffffff;
  overflow-x: hidden;
}

.notice-comment-form textarea,
.notice-comment-edit-form textarea {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  height: 58px;
  min-height: 52px;
  max-height: 88px;
  resize: vertical;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.notice-emoji-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  min-width: 0;
  max-width: 100%;
  white-space: normal;
  overflow-x: hidden;
}

.notice-emoji-bar button {
  width: 26px;
  min-width: 26px;
  height: 26px;
  min-height: 26px;
  padding: 0;
  border-radius: 999px;
  background: #ffffff;
  border-color: #dbe4ef;
  font-size: 0.95rem;
}

.notice-emoji-bar button:hover {
  border-color: #9fb1c7;
  background: #f8fafc;
}

.notice-detail-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
  min-width: 0;
  max-width: 100%;
}

.notice-detail-actions .danger {
  border-color: #e3b3b3;
  color: #bd1d1d;
}

@media (min-width: 980px) {
  .notice-board-body:has(.notice-detail) {
    display: grid;
  }
}

@media (max-width: 979px) {
  .notice-detail {
    height: auto;
    max-height: 100%;
  }

  .notice-comment-form {
    position: sticky;
    bottom: 0;
    z-index: 2;
    padding-bottom: 2px;
  }
}

.notice-form {
  display: grid;
  grid-template-rows: auto auto minmax(180px, 1fr) auto auto auto;
  gap: 12px;
  height: 100%;
  min-height: 0;
  min-width: 0;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow-x: hidden;
  overflow-y: hidden;
  padding: 18px;
  border: 1px solid #dfe5ee;
  border-radius: 12px;
  background: #fff;
}

.notice-form label {
  display: grid;
  gap: 6px;
  color: #374151;
  font-size: 0.85rem;
  font-weight: 800;
}

.notice-form input,
.notice-form select,
.notice-form textarea {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  border: 1px solid #d8dee8;
  border-radius: 8px;
  padding: 10px 12px;
  background: #fff;
  color: #111827;
  font: inherit;
  box-sizing: border-box;
}

.notice-form label:has(textarea) {
  min-height: 0;
  grid-template-rows: auto minmax(0, 1fr);
}

.notice-form textarea {
  min-height: 180px;
  height: 100%;
  resize: vertical;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.notice-form .notice-detail-actions {
  position: sticky;
  bottom: 0;
  z-index: 2;
  margin: 0 -18px -18px;
  padding: 12px 18px 16px;
  border-top: 1px solid #eef2f7;
  background: #fff;
}

.notice-pin-check {
  grid-template-columns: auto 1fr;
  align-items: center;
}

.notice-pin-check input {
  width: auto;
}

@keyframes noticeAccentPulse {
  0%,
  100% {
    border-left-color: var(--notice-accent-strong);
  }
  50% {
    border-left-color: var(--notice-accent-soft);
  }
}

@media (prefers-reduced-motion: reduce) {
  .notice-preview-item.unread {
    animation: none;
    border-left-color: var(--notice-accent-strong);
  }
}

@media (max-width: 768px) {
  dialog.notice-board-dialog.approval-archive-dialog {
    width: min(98vw, 1500px);
    height: min(95dvh, 980px);
    max-height: 94dvh;
    margin: auto;
    border-radius: 8px;
  }

  #noticeTitle {
    align-items: center;
  }

  .notice-preview-item {
    grid-template-columns: 64px minmax(0, 1fr);
    padding: 7px 9px;
    min-height: 54px;
  }

  .notice-preview-text {
    font-size: 0.78rem;
  }

  .notice-view-all {
    font-size: 0.72rem;
  }

  .notice-board-toolbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }

  .notice-board-dialog .notice-board-detail {
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    padding: 16px;
  }

  .notice-board-body:has(.notice-form) {
    overflow: auto;
  }

  .notice-form {
    height: auto;
    min-height: 100%;
    overflow: visible;
    grid-template-rows: auto auto minmax(220px, auto) auto auto auto;
  }
}

.consult-admin-builder {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.consult-admin-items {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.consult-admin-item {
  position: relative;
  display: grid;
  gap: 10px;
  align-content: start;
  margin: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.consult-admin-item legend {
  padding: 0 4px;
}

.consult-admin-item.add {
  border-color: #bfdbfe;
  border-style: dashed;
  background: #eff6ff;
}

.consult-admin-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  min-height: 0;
  padding-bottom: 0;
  border-bottom: 0;
}

.consult-admin-card-head strong {
  font-size: 1rem;
}

.consult-admin-card-head span {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 900;
  text-align: right;
}

.consult-admin-title {
  flex: 1 1 280px;
}

.consult-admin-title input {
  font-size: 1rem;
  font-weight: 900;
}

.consult-admin-legend-input {
  width: min(260px, 62vw);
  min-height: 24px;
  border: 0;
  background: transparent;
  color: #111827;
  font-size: 0.98rem;
  font-weight: 900;
  padding: 0;
}

.consult-admin-legend-input:hover,
.consult-admin-legend-input:focus {
  outline: 0;
  background: transparent;
  color: #2563eb;
}

.consult-admin-legend-input::placeholder {
  color: #64748b;
}

.consult-admin-top-tools {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin-top: -8px;
}

.consult-admin-choice-type {
  position: relative;
  display: flex;
  flex: 0 0 auto;
  gap: 0;
  padding: 3px;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  background: #e2e8f0;
}

.consult-admin-choice-type label {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 46px;
  min-height: 28px;
  padding: 5px 10px;
  border-radius: 999px;
  color: #64748b;
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 900;
  transition: color 0.15s ease, background 0.15s ease;
}

.consult-admin-choice-type label.active {
  background: #475569;
  color: #ffffff;
  box-shadow: 0 6px 14px rgba(15, 23, 42, 0.18);
}

.consult-admin-choice-type input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.consult-admin-choice-boxes {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.consult-admin-choice-boxes.one-col {
  display: grid;
  grid-template-columns: 1fr;
}

.consult-admin-new-item {
  border-color: #bfdbfe;
  border-style: dashed;
  background: #eff6ff;
}

.consult-admin-choice-box {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 8px;
  border: 1px solid #dbe4ef;
  border-radius: 999px;
  background: #ffffff;
  min-width: 0;
}

.consult-admin-choice-box span {
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 900;
}

.consult-admin-choice-box.add {
  border-color: #bfdbfe;
  border-style: dashed;
  background: #ffffff;
}

.consult-admin-choice-box input {
  width: auto;
  min-width: 30px;
  max-width: 104px;
  min-height: 28px;
  border: 0 !important;
  outline: 0 !important;
  box-shadow: none !important;
  border-radius: 0;
  padding: 0;
  background: transparent !important;
  font-weight: 900;
  text-align: center;
  font-size: 0.82rem;
}

.consult-admin-choice-box input:hover,
.consult-admin-choice-box input:focus {
  outline: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
}

.consult-admin-move-tools {
  display: flex;
  gap: 4px;
  font-style: normal;
}

.consult-admin-move-tools {
  position: static;
  opacity: 1;
  pointer-events: auto;
}

.consult-admin-choice-box button,
.consult-admin-move-tools button {
  min-height: 30px;
  padding: 5px 9px;
  border: 1px solid #dbe4ef;
  border-radius: 999px;
  background: #fff;
  color: #475569;
  font-size: 0.74rem;
  font-weight: 900;
}

.consult-admin-row,
.consumer-basic-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(180px, 1fr));
  gap: 10px;
}

.consult-admin-form label,
.consumer-consult-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 900;
}

.consult-admin-form input,
.consult-admin-form select,
.consult-admin-form textarea,
.consumer-consult-form input,
.consumer-consult-form textarea {
  width: 100%;
  min-height: 40px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font: inherit;
}

.consult-admin-options {
  grid-column: 1 / -1;
}

.consumer-consult-head,
.consumer-consult-brand {
  display: grid;
  gap: 6px;
}

.consumer-consult-brand {
  justify-items: start;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.consumer-consult-brand img {
  width: min(260px, 48vw);
  max-height: 96px;
  object-fit: contain;
  object-position: left center;
  margin-bottom: 4px;
}

.consumer-consult-head span,
.consumer-consult-brand strong {
  color: var(--brand);
  font-size: 0.78rem;
  font-weight: 900;
}

.consumer-consult-head h3,
.consumer-consult-brand h1 {
  margin: 0;
  font-size: clamp(1.6rem, 3vw, 2.6rem);
}

.consumer-consult-head p,
.consumer-consult-brand p {
  margin: 0;
  color: var(--muted);
}

.consumer-choice-section {
  display: grid;
  gap: 14px;
}

.consumer-choice-field {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.consumer-choice-field legend {
  padding: 0 4px;
  color: #111827;
  font-weight: 900;
}

.consumer-choice-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.consumer-choice {
  min-height: 42px;
  padding: 10px 14px;
  border: 1px solid #dbe4ef;
  border-radius: 999px;
  background: #ffffff;
  color: #1f2937;
  font-weight: 900;
}

.consumer-choice.selected {
  border-color: #2563eb;
  background: #eff6ff;
  color: #1d4ed8;
  box-shadow: inset 0 0 0 1px #2563eb;
}

.consumer-choice-field.has-selection .consumer-choice:not(.selected) {
  opacity: 0.28;
}

.consumer-choice-detail {
  width: min(520px, 100%);
  margin-top: 10px;
}

.consumer-choice.empty {
  color: var(--muted);
  border-style: dashed;
}

.consult-readonly-form {
  margin-top: 12px;
}

.consult-readonly-section {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid #e4e1db;
  border-radius: 12px;
  background: #fff;
}

.consult-readonly-section-title {
  margin: 0;
  padding-bottom: 8px;
  border-bottom: 1px solid #e4e1db;
  color: #8a8178;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.consult-readonly-form input,
.consult-readonly-form textarea {
  background: #f8fafc;
  font-weight: 900;
}

.consult-readonly-field .consumer-choice {
  cursor: default;
}

.consult-consumer-readonly {
  display: grid;
  gap: 18px;
  width: min(680px, 100%);
  margin: 18px auto 0;
  padding: clamp(22px, 4vw, 34px);
  border: 1px solid #dedbd6;
  border-radius: 16px;
  background: #fff;
  color: #191919;
}

.consult-consumer-logo {
  font-size: 2rem;
  font-weight: 300;
  letter-spacing: 0.12em;
}

.consult-consumer-kicker {
  margin: 0;
  color: #8a8178;
  font-size: 0.82rem;
  font-weight: 800;
}

.consult-consumer-readonly > h3 {
  margin: -6px 0 6px;
  color: #111827;
  font-size: clamp(1.2rem, 2vw, 1.55rem);
  line-height: 1.65;
}

.consult-consumer-section {
  display: grid;
  gap: 14px;
}

.consult-consumer-divider {
  height: 1px;
  margin-top: 2px;
  background: #dedbd6;
}

.consult-consumer-section-title {
  margin: 0;
  color: #8a8178;
  font-size: 0.86rem;
  font-weight: 900;
}

.consult-consumer-row {
  display: grid;
  gap: 10px;
}

.consult-consumer-row.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.consult-consumer-question {
  display: grid;
  gap: 7px;
}

.consult-consumer-label {
  color: #111827;
  font-size: 0.86rem;
  font-weight: 900;
}

.consult-consumer-hint {
  margin: -2px 0 2px;
  color: #9a5a43;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.55;
}

.consult-consumer-input {
  width: 100%;
  min-height: 44px;
  padding: 11px 13px;
  border: 1px solid #d9d5ce;
  border-radius: 8px;
  background: #fafafa;
  color: #111827;
  font: inherit;
  font-weight: 800;
  box-sizing: border-box;
}

textarea.consult-consumer-input {
  resize: vertical;
  line-height: 1.6;
}

.consult-consumer-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.consult-consumer-option {
  display: flex;
  align-items: center;
  min-height: 38px;
  padding: 8px 12px;
  border: 1px solid #d9d5ce;
  border-radius: 7px;
  background: #fff;
  color: #6b7280;
  font-size: 0.86rem;
  font-weight: 800;
}

.consult-consumer-option.selected {
  border-color: #111827;
  background: #f6f4ef;
  color: #111827;
  box-shadow: inset 0 0 0 1px #111827;
}

.consult-consumer-options.has-selection .consult-consumer-option:not(.selected) {
  opacity: 0.3;
}

.consult-consumer-option.empty {
  border-style: dashed;
  opacity: 1;
}

.consult-consumer-readonly .consult-attachment-readonly {
  padding: 0;
  border: 0;
  background: transparent;
}

.consult-consumer-readonly .consult-attachment-readonly > strong {
  display: none;
}

.consult-consumer-readonly .consult-attachment-preview {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.consult-consumer-privacy {
  display: grid;
  gap: 6px;
  max-height: 160px;
  overflow: auto;
  padding: 14px;
  border: 1px solid #e8e4dd;
  border-radius: 9px;
  background: #f7f5f1;
  color: #4b5563;
  font-size: 0.82rem;
  line-height: 1.65;
}

.consult-consumer-privacy strong {
  color: #111827;
}

.consult-info-grid.compact {
  margin-top: 0;
}

.consumer-message {
  display: grid;
  gap: 6px;
}

.consumer-notice-card {
  display: grid;
  gap: 24px;
  max-width: 720px;
  margin: 0 auto;
  padding: clamp(26px, 5vw, 46px);
  border: 1px solid #dedbd6;
  border-left: 1px solid #dedbd6;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 16px 44px rgba(15, 23, 42, 0.06);
}

.consumer-consult-step {
  display: grid;
  gap: 12px;
}

.consumer-consult-step[hidden] {
  display: none !important;
}

.consumer-notice-logo {
  display: flex;
  justify-content: center;
}

.consumer-notice-logo img {
  width: min(178px, 42vw);
  max-height: 72px;
  object-fit: contain;
}

.consumer-notice-title {
  display: grid;
  gap: 6px;
  text-align: center;
}

.consumer-notice-title h2 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(1.72rem, 3.4vw, 2.55rem);
  letter-spacing: 0;
}

.consumer-notice-title p {
  margin: 0;
  color: #64748b;
  font-weight: 900;
}

.consumer-notice-body {
  color: #334155;
  line-height: 1.85;
  font-weight: 800;
}

.consumer-notice-body p {
  margin: 0;
}

.consult-notice-intro {
  display: grid;
  gap: 18px;
  padding-top: 4px;
  padding-bottom: 28px;
  border-bottom: 1px solid #dedbd6;
}

.consult-notice-hello {
  color: #6b7280;
  font-size: 0.96rem;
  font-weight: 700;
}

.consult-notice-tagline {
  color: #111827;
  font-size: clamp(1.34rem, 2.5vw, 1.78rem);
  line-height: 1.58;
  letter-spacing: 0;
}

.consult-notice-subcopy {
  color: #7a6d67;
  font-size: 0.95rem;
  line-height: 1.75;
}

.consult-notice-block {
  display: grid;
  gap: 18px;
  padding: clamp(18px, 3vw, 28px);
  border: 1px solid #eeeae5;
  border-radius: 14px;
  background: #f6f3ef;
}

.consult-notice-block-title {
  color: #8a8178;
  font-size: 0.88rem;
  font-weight: 900;
}

.consult-notice-list {
  display: grid;
  gap: 0;
}

.consult-notice-item {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 14px;
  padding: 18px 0;
  border-top: 1px solid #dedbd6;
}

.consult-notice-item:first-child {
  border-top: 0;
  padding-top: 0;
}

.consult-notice-item:last-child {
  padding-bottom: 0;
}

.consult-notice-icon {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1px solid #d8d2cb;
  border-radius: 50%;
  background: #fff;
  color: #8a8178;
  font-size: 0.9rem;
  line-height: 1;
}

.consult-notice-item strong {
  display: block;
  margin-bottom: 6px;
  color: #1f2937;
  font-size: 1rem;
  line-height: 1.55;
}

.consult-notice-item p {
  color: #6b7280;
  font-size: 0.94rem;
  line-height: 1.72;
}

.consult-notice-tag {
  display: inline-flex;
  width: fit-content;
  margin-top: 10px;
  padding: 4px 11px;
  border: 1px solid #dedbd6;
  border-radius: 999px;
  background: #fff;
  color: #8a8178;
  font-size: 0.82rem;
  font-style: normal;
  font-weight: 800;
}

.consult-notice-confirm {
  text-align: center;
  color: #7a6d67;
  font-size: 0.94rem;
  line-height: 1.7;
}

.notice-size-small .consumer-notice-body {
  font-size: 0.94rem;
}

.notice-size-medium .consumer-notice-body {
  font-size: 1rem;
}

.notice-size-large .consumer-notice-body {
  font-size: 1.1rem;
}

.notice-font-system {
  font-family: inherit;
}

.notice-font-gothic {
  font-family: "Malgun Gothic", "Apple SD Gothic Neo", sans-serif;
}

.notice-font-serif {
  font-family: "Noto Serif KR", Georgia, serif;
}

.consumer-notice-agree {
  display: flex !important;
  grid-template-columns: none !important;
  align-items: center;
  gap: 8px !important;
  justify-content: center;
  width: 100%;
  padding: 14px 16px;
  border: 1px solid #cfc8c0;
  border-radius: 9px;
  color: var(--ink) !important;
  font-weight: 900;
}

.consumer-notice-agree input {
  width: 18px !important;
  min-height: 18px !important;
  padding: 0 !important;
}

.consumer-privacy-box {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid #d8e4f2;
  border-radius: 8px;
  background: #f8fbff;
}

.consumer-privacy-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}

.consumer-privacy-head strong {
  color: var(--ink);
  font-size: 1rem;
}

.consumer-privacy-head span {
  flex: 0 0 auto;
  padding: 4px 8px;
  border-radius: 999px;
  background: #e8f0ff;
  color: #1d4ed8;
  font-size: 0.78rem;
  font-weight: 900;
}

.consumer-privacy-box p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.45;
}

.consumer-privacy-detail {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}

.consumer-privacy-detail summary {
  cursor: pointer;
  padding: 10px 12px;
  color: var(--ink);
  font-weight: 900;
}

.consumer-privacy-detail div {
  max-height: 260px;
  overflow: auto;
  padding: 0 12px 12px;
  color: #334155;
  font-size: 0.9rem;
  line-height: 1.65;
  white-space: pre-wrap;
}

.consumer-privacy-agree {
  display: flex !important;
  grid-template-columns: none !important;
  align-items: center;
  gap: 8px !important;
  width: fit-content;
  color: var(--ink) !important;
  font-size: 0.95rem !important;
  font-weight: 900;
}

.consumer-privacy-agree input {
  width: 17px !important;
  min-height: 17px !important;
  padding: 0 !important;
}

.consumer-submit-message {
  min-height: 22px;
  color: #15803d;
  font-weight: 900;
}

.consult-attachment-box,
.consult-attachment-readonly {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.consult-attachment-box > div:first-child,
.consult-attachment-readonly > strong {
  display: grid;
  gap: 3px;
  color: #111827;
  font-weight: 900;
}

.consult-attachment-box span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.consult-attachment-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  min-height: 40px;
  padding: 9px 14px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #ffffff;
  color: #111827;
  font-weight: 900;
  cursor: pointer;
}

.consult-attachment-button input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.consult-attachment-preview {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  min-height: 54px;
}

.consult-attachment-preview > span,
.consult-attachment-empty {
  display: grid;
  place-items: center;
  min-height: 54px;
  grid-column: 1 / -1;
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.consult-attachment-thumb {
  display: grid;
  gap: 5px;
  min-width: 0;
  margin: 0;
}

.consult-attachment-view-button {
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.consult-attachment-view-button:hover img,
.consult-attachment-view-button:hover .consult-file-thumb {
  border-color: #94a3b8;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.12);
}

.consult-attachment-thumb img,
.consult-file-thumb {
  width: 100%;
  aspect-ratio: 1 / 0.78;
  border: 1px solid #dbe4ef;
  border-radius: 8px;
  background: #ffffff;
  object-fit: contain;
}

.consult-file-thumb {
  display: grid;
  place-items: center;
  color: #475569;
  font-weight: 900;
}

.consult-attachment-thumb figcaption,
.consult-attachment-caption {
  overflow: hidden;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.consult-attachment-caption {
  display: grid;
  gap: 2px;
}

.consult-attachment-caption strong {
  overflow: hidden;
  color: #111827;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.consult-attachment-caption small {
  color: #64748b;
  font-size: 0.7rem;
  font-weight: 800;
}

.consult-attachment-viewer {
  width: min(96vw, 900px);
  max-height: min(92vh, 820px);
  padding: 22px;
}

.consult-attachment-stage {
  display: grid;
  place-items: center;
  min-height: 360px;
  margin-top: 16px;
  padding: 16px;
  border: 1px solid #dbe4ef;
  border-radius: 12px;
  background: #f8fafc;
  overflow: auto;
}

.consult-attachment-stage img {
  max-width: 100%;
  max-height: 68vh;
  border-radius: 10px;
  object-fit: contain;
}

.consult-attachment-stage iframe {
  width: 100%;
  height: min(68vh, 640px);
  border: 0;
  border-radius: 10px;
  background: #ffffff;
}

.consult-attachment-unavailable {
  display: grid;
  gap: 8px;
  width: min(100%, 520px);
  padding: 24px;
  border: 1px solid #dbe4ef;
  border-radius: 12px;
  background: #ffffff;
  color: #475569;
  line-height: 1.55;
}

.consult-attachment-unavailable strong {
  color: #111827;
}

.consult-attachment-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 14px;
}

.consult-attachment-box p {
  min-height: 18px;
  margin: 0;
  color: #15803d;
  font-size: 0.78rem;
  font-weight: 900;
}

.consumer-mode-page {
  min-height: 100vh;
  background: #eef2f6;
}

.consumer-consult-page {
  min-height: 100vh;
  padding: clamp(18px, 4vw, 46px);
}

.consumer-consult-shell {
  display: grid;
  gap: 20px;
  width: min(100%, 820px);
  margin: 0 auto;
  padding: clamp(18px, 4vw, 36px);
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 24px 80px rgba(15, 23, 42, 0.12);
}

.consult-readonly-form,
.consult-admin-form,
.consumer-consult-form {
  max-width: 820px;
}

.consult-detail-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 116px;
  align-items: start;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.consult-detail-head > div {
  min-width: 0;
}

.consult-detail-head h3 {
  overflow: hidden;
  margin: 8px 0 4px;
  font-size: 1.25rem;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.consult-detail-head p {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.consult-detail-head select {
  width: 116px;
  min-width: 0;
  min-height: 36px;
  padding: 8px 26px 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  font-weight: 800;
}

.consult-info-grid,
.consult-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(180px, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.consult-info-row,
.consult-note-block {
  display: grid;
  gap: 5px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.consult-info-row span,
.consult-note-block span,
.consult-form label {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
}

.consult-info-row strong {
  font-size: 0.9rem;
  overflow-wrap: anywhere;
  word-break: keep-all;
}

.consult-note-block {
  margin-top: 10px;
}

.consult-note-block p {
  margin: 0;
  white-space: pre-wrap;
}

.consult-detail-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 14px;
}

.consult-detail-actions .danger-light {
  border-color: #fecaca;
  color: #dc2626;
}

.consult-empty-panel {
  display: grid;
  place-items: center;
  gap: 12px;
  min-height: 340px;
  color: var(--muted);
  text-align: center;
}

.consult-form-head h3 {
  margin: 0 0 4px;
  font-size: 1.18rem;
}

.consult-form-head.compact h3 {
  margin-bottom: 4px;
  font-size: 1rem;
}

.consult-form-head p {
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
}

.consult-form label {
  display: grid;
  gap: 6px;
}

.consult-form label.wide {
  grid-column: 1 / -1;
}

.consult-form input,
.consult-form select,
.consult-form textarea {
  width: 100%;
  min-height: 38px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font: inherit;
}

.consult-admin-notice,
.consult-admin-privacy {
  display: grid;
  gap: 10px;
  margin-top: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.consult-admin-tabs {
  display: flex;
  gap: 8px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #f8fafc;
}

.consult-admin-tabs button {
  flex: 1;
  min-height: 40px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-weight: 900;
  cursor: pointer;
}

.consult-admin-tabs button.active {
  background: #111827;
  color: #fff;
}

.consult-admin-tab-panel {
  display: grid;
  gap: 12px;
}

.consult-admin-tab-panel[hidden] {
  display: none !important;
}

.consult-admin-notice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.consult-admin-notice-preview {
  padding: 0;
  border: 0;
  background: transparent;
}

.consult-admin-logo-preview {
  position: relative;
  gap: 12px;
}

.consult-admin-logo-preview .consult-admin-check.inline {
  position: absolute;
  right: 0;
  top: 0;
  width: auto;
  min-height: 34px;
  padding: 7px 10px;
  font-size: 0.82rem;
}

.consult-admin-notice-title-edit input {
  width: 100%;
  border: 1px solid #d8e4f2;
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  text-align: center;
  font-weight: 900;
}

.consult-admin-notice-title-edit input[name="notice-title"] {
  min-height: 50px;
  font-size: clamp(1.45rem, 3vw, 2.2rem);
}

.consult-admin-notice-title-edit input[name="notice-subtitle"] {
  min-height: 42px;
  color: #64748b;
  font-size: 1rem;
}

.consult-admin-notice-body-edit {
  width: 100%;
  min-height: 460px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #334155;
  overflow: visible;
  outline: none;
}

.consult-admin-notice-body-edit:focus {
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.consult-rich-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 10px;
  border: 1px solid #d8e4f2;
  border-radius: 10px;
  background: #f8fafc;
}

.consult-rich-toolbar button,
.consult-rich-toolbar label {
  display: inline-flex !important;
  grid-template-columns: none !important;
  align-items: center;
  gap: 6px !important;
  width: auto;
  min-height: 36px;
  padding: 7px 10px;
  border: 1px solid #d8e4f2;
  border-radius: 999px;
  background: #fff;
  color: var(--ink) !important;
  font-size: 0.9rem;
  font-weight: 900;
}

.consult-rich-toolbar input[type="color"] {
  width: 32px !important;
  min-height: 24px !important;
  padding: 0 !important;
  border: 0;
  background: transparent;
}

.consult-rich-palette {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 8px;
  border: 1px solid #d8e4f2;
  border-radius: 999px;
  background: #fff;
}

.consult-rich-toolbar .consult-rich-color-chip {
  width: 24px;
  min-height: 24px;
  height: 24px;
  padding: 0;
  border: 2px solid #fff;
  border-radius: 999px;
  background: var(--chip-color);
  box-shadow: 0 0 0 1px #cbd5e1;
}

.consult-rich-toolbar .consult-rich-color-chip:hover {
  box-shadow: 0 0 0 2px #2563eb;
}

.consult-rich-toolbar select {
  width: auto;
  min-height: 28px;
  padding: 2px 8px;
  border: 1px solid #d8e4f2;
  border-radius: 999px;
}

.consult-admin-notice-tools {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.consult-admin-notice-grid .wide {
  grid-column: 1 / -1;
}

.consult-admin-check {
  display: flex !important;
  grid-template-columns: none !important;
  align-items: center;
  gap: 8px !important;
  min-height: 40px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink) !important;
  font-weight: 900;
}

.consult-admin-check input {
  width: 17px !important;
  min-height: 17px !important;
  padding: 0 !important;
}

.consumer-notice-agree.preview-only {
  opacity: 0.8;
  cursor: default;
}

.consult-admin-privacy textarea {
  min-height: 72px;
  line-height: 1.5;
}

.consult-admin-notice textarea[name="notice-body"] {
  min-height: 240px;
  white-space: pre-wrap;
}

.consult-admin-privacy textarea[name="privacy-body"] {
  min-height: 260px;
  white-space: pre-wrap;
}

.project-strip {
  position: relative;
  z-index: 5;
  display: grid;
  gap: 10px;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 14px 32px rgba(24, 32, 42, 0.06);
}

.project-strip-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.project-strip-head div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.project-strip-head strong {
  font-size: 0.98rem;
}

.project-strip-head span {
  overflow: hidden;
  color: var(--muted);
  font-size: 0.82rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-strip-head button {
  min-height: 32px;
  padding: 6px 10px;
  white-space: nowrap;
}

.project-stage-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  min-width: 0;
}

.project-stage-pill {
  appearance: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  min-width: 0;
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  color: #475569;
  font: inherit;
  font-size: 0.75rem;
  font-weight: 900;
  text-align: left;
  white-space: nowrap;
  cursor: pointer;
  opacity: 0.72;
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease,
    opacity 160ms ease,
    transform 160ms ease;
}

.project-stage-pill b {
  font-size: 0.84rem;
}

.project-stage-pill:hover,
.project-stage-pill.active {
  opacity: 1;
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
}

.project-stage-pill.active {
  border-width: 2px;
  color: #111827;
  box-shadow:
    0 0 0 2px rgba(255, 255, 255, 0.9),
    0 10px 24px rgba(15, 23, 42, 0.16);
  filter: saturate(1.25);
}

.project-stage-summary:has(.project-stage-pill.active) .project-stage-pill:not(.active) {
  opacity: 0.38;
  background: #f8fafc;
  color: #64748b;
  box-shadow: none;
}

.project-card-row {
  display: grid;
  gap: 6px;
  min-width: 0;
  overflow: visible;
}

.project-card {
  position: relative;
  appearance: none;
  display: grid;
  gap: 6px;
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-strong);
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition:
    border-color 160ms ease,
    transform 160ms ease,
    box-shadow 160ms ease;
}

.project-card:hover,
.project-card.active {
  border-color: var(--blue);
  transform: translateY(-1px);
  box-shadow: 0 10px 26px rgba(37, 99, 235, 0.12);
}

.project-card.active {
  background: #f3f4f6;
}

.project-card-top,
.project-card-stats,
.project-member-line {
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
}

.project-card-top {
  justify-content: space-between;
}

.project-name-line {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.project-dot {
  width: 9px;
  min-width: 9px;
  height: 9px;
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(107, 114, 128, 0.12);
}

.project-card-top strong,
.project-name-line strong {
  overflow: hidden;
  font-size: 0.92rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-stage-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 6px;
  border: 1px solid #d1d5db;
  border-radius: 999px;
  color: #374151;
  font-size: 0.68rem;
  font-style: normal;
  font-weight: 900;
  white-space: nowrap;
}

.project-stage-control {
  position: relative;
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
}

.project-stage-badge {
  cursor: pointer;
  transition:
    box-shadow 160ms ease,
    transform 160ms ease;
}

.project-stage-badge:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.1);
}

.project-stage-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 80;
  display: grid;
  gap: 4px;
  width: 112px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.16);
}

.project-stage-option {
  display: block;
  padding: 6px 8px;
  border: 1px solid transparent;
  border-radius: 7px;
  font-size: 0.72rem;
  font-weight: 900;
  white-space: nowrap;
  cursor: pointer;
}

.project-stage-option.active {
  border-color: currentColor;
}

.stage-estimate {
  border-color: #e9d5ff;
  background: #faf5ff;
  color: #7e22ce;
}

.stage-contract {
  border-color: #fed7aa;
  background: #fff7ed;
  color: #c2410c;
}

.stage-active {
  border-color: #99f6e4;
  background: #f0fdfa;
  color: #0f766e;
}

.stage-done {
  border-color: #cbd5e1;
  background: #f8fafc;
  color: #64748b;
}

.project-card-meta {
  overflow: hidden;
  color: var(--muted);
  font-size: 0.72rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-card-stats {
  flex-wrap: nowrap;
}

.project-card-stats b {
  min-width: 0;
  padding: 3px 5px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
  font-size: 0.66rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-card-stats b.danger {
  border-color: #fecaca;
  background: #fff1f2;
  color: #b42318;
}

.project-member-line {
  flex-wrap: nowrap;
  overflow: hidden;
}

.project-member-line i {
  min-width: 0;
  padding: 3px 6px;
  border-radius: 999px;
  background: #f3f4f6;
  color: #4b5563;
  font-size: 0.66rem;
  font-style: normal;
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-detail-panel {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid color-mix(in srgb, var(--blue) 30%, var(--line));
  border-radius: 8px;
  background: #fbfdff;
}

.project-detail-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.project-detail-head div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.project-detail-head strong {
  overflow: hidden;
  font-size: 1rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-detail-head span:not(.badge) {
  overflow: hidden;
  color: var(--muted);
  font-size: 0.8rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-task-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.project-management-dialog .approval-archive-detail {
  grid-template-rows: auto minmax(0, 1fr);
}

.project-management-head-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.project-management-content {
  min-height: 0;
  overflow-y: auto;
  padding: 2px 4px 18px;
}

.project-management-summary {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}

.project-management-summary span,
.project-management-summary button {
  display: grid;
  gap: 2px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-align: left;
  cursor: pointer;
}

.project-management-summary button.active {
  border-color: #93b4ef;
  background: #eaf2ff;
  color: #1746a2;
  box-shadow: 0 8px 20px rgba(23, 70, 162, 0.1);
}

.project-management-summary button:hover {
  border-color: #b6c9ea;
}

.project-management-summary b {
  color: var(--ink);
  font-size: 1.15rem;
}

.project-management-summary button.active b {
  color: #1746a2;
  font-weight: 900;
}

.project-management-tools {
  display: grid;
  grid-template-columns: minmax(220px, 1.8fr) repeat(5, minmax(120px, 1fr)) auto;
  gap: 8px;
  margin-bottom: 14px;
}

.project-management-tools input,
.project-management-tools select,
.project-management-tools button,
.project-management-form input,
.project-management-form select,
.project-management-form textarea,
.project-member-pick input[type="text"] {
  width: 100%;
  min-width: 0;
  min-height: 38px;
  box-sizing: border-box;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font: inherit;
}

.project-management-tools input,
.project-management-tools select,
.project-management-form input,
.project-management-form select,
.project-management-form textarea,
.project-member-pick input[type="text"] {
  padding: 8px 10px;
}

.project-import-entry {
  display: flex;
  justify-content: flex-end;
  margin: 0 0 10px;
}

.project-import-panel {
  display: grid;
  gap: 10px;
  margin: 0 0 12px;
  padding: 12px;
  border: 1px solid color-mix(in srgb, var(--blue) 24%, var(--line));
  border-radius: 8px;
  background: color-mix(in srgb, var(--blue) 5%, #fff);
}

.project-import-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.project-import-head strong,
.project-import-results strong {
  display: block;
  color: var(--ink);
}

.project-import-head p,
.project-import-warning,
.project-import-results p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.45;
}

.project-import-list {
  display: grid;
  gap: 9px;
}

.project-import-candidate {
  display: grid;
  gap: 9px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.project-import-checkline {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 9px;
  align-items: start;
}

.project-import-checkline span,
.project-import-meta {
  min-width: 0;
}

.project-import-checkline strong,
.project-import-checkline small {
  display: block;
}

.project-import-checkline small,
.project-import-meta {
  color: var(--muted);
  font-size: 0.78rem;
}

.project-import-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px 12px;
}

.project-import-warning {
  color: #b45309;
  font-weight: 800;
}

.project-import-controls {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.project-import-controls label {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
}

.project-import-controls select {
  width: 100%;
  min-width: 0;
  min-height: 36px;
  padding: 7px 9px;
  box-sizing: border-box;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font: inherit;
}

.project-import-results {
  display: grid;
  gap: 6px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

.project-import-results p.success {
  color: #15803d;
}

.project-import-results p.danger {
  color: #b42318;
}

.project-management-list {
  display: grid;
  gap: 8px;
}

.project-management-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(150px, auto) auto;
  gap: 12px;
  align-items: center;
  min-height: 92px;
  box-sizing: border-box;
  padding: 10px 12px;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease;
}

.project-management-card:hover,
.project-management-card:focus-visible {
  border-color: #1746a2;
  box-shadow: 0 8px 22px rgba(23, 70, 162, 0.12);
  outline: none;
}

.project-management-card-main,
.project-management-card-side {
  display: grid;
  gap: 3px;
  min-width: 0;
  line-height: 1.25;
}

.project-management-card-main small,
.project-management-card-main p,
.project-management-card-side span,
.project-management-card-side small {
  overflow: hidden;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-management-card-main strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 1rem;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-management-card-main p {
  margin: 0;
}

.project-management-card-side {
  row-gap: 3px;
}

.project-management-card-side b {
  color: var(--ink);
  font-size: 0.84rem;
  line-height: 1.25;
}

.project-management-card > button {
  align-self: center;
  min-height: 36px;
  padding-top: 0;
  padding-bottom: 0;
  white-space: nowrap;
}

.project-management-status {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 2px 8px;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  background: #f8fafc;
  color: #475569;
  font-size: 0.72rem;
  font-weight: 900;
}

.project-status-select-wrap {
  justify-self: start;
  position: relative;
  display: inline-flex;
  max-width: 100%;
}

.project-status-select {
  appearance: none;
  max-width: 128px;
  padding-right: 22px;
  cursor: pointer;
  line-height: 1;
}

.project-status-select-wrap::after {
  position: absolute;
  top: 50%;
  right: 8px;
  color: currentColor;
  font-size: 0.62rem;
  pointer-events: none;
  content: "\25BE";
  transform: translateY(-50%);
}

.project-status-select:hover {
  filter: brightness(0.98);
}

.project-status-select:disabled {
  cursor: wait;
  opacity: 0.7;
}

.project-management-status.status-preparing {
  border-color: #bfdbfe;
  background: #eff6ff;
  color: #1d4ed8;
}

.project-management-status.status-in_progress {
  border-color: #99f6e4;
  background: #f0fdfa;
  color: #0f766e;
}

.project-management-status.status-on_hold {
  border-color: #fde68a;
  background: #fffbeb;
  color: #a16207;
}

.project-management-status.status-completed {
  border-color: #bbf7d0;
  background: #f0fdf4;
  color: #15803d;
}

.project-management-status.status-cancelled {
  border-color: #fecaca;
  background: #fff1f2;
  color: #b42318;
}

.project-progress-bar {
  height: 6px;
  overflow: hidden;
  margin: 1px 0;
  border-radius: 999px;
  background: #e5e7eb;
}

.project-progress-bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #1746a2;
}

.project-management-detail,
.project-management-form {
  display: grid;
  gap: 14px;
}

.project-management-detail-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.project-management-detail-title {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.project-management-detail-title h4,
.project-management-form h4 {
  margin: 3px 0;
  font-size: 1.1rem;
}

.project-management-detail-title p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
  white-space: pre-wrap;
}

.project-management-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.project-management-tabs button.active {
  border-color: #1746a2;
  background: #1746a2;
  color: #fff;
}

.project-overview-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.project-overview-grid span,
.project-activity-list {
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.project-overview-grid b {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 0.74rem;
}

.project-member-list {
  display: grid;
  gap: 0;
}

.project-member-list-head,
.project-member-list article {
  display: grid;
  grid-template-columns: minmax(140px, 1.1fr) minmax(220px, 1.5fr) minmax(150px, 0.8fr) minmax(150px, 0.8fr);
  align-items: center;
  column-gap: 16px;
  min-width: 0;
  box-sizing: border-box;
}

.project-member-list-head {
  padding: 0 12px 6px;
  color: #64748b;
  font-size: 12px;
  font-weight: 600;
}

.project-member-list article {
  margin-bottom: 7px;
  padding: 10px 12px;
  border: 1px solid #dfe6ef;
  border-radius: 9px;
  background: #f8fafc;
}

.project-member-list article:hover {
  background: #f3f6fa;
}

.project-member-list article.project-member-leader {
  border-color: #bfd3f5;
  background: #eef5ff;
}

.project-member-list article.inactive {
  opacity: 0.7;
}

.project-member-list article strong,
.project-member-list article span,
.project-member-list article small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-member-list article small {
  color: #64748b;
  font-size: 0.82rem;
}

.project-member-list article em {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  padding: 4px 8px;
  border-radius: 999px;
  background: #e5e7eb;
  color: #475569;
  font-size: 0.78rem;
  font-style: normal;
  font-weight: 700;
  line-height: 1;
}

.project-member-list article em.leader {
  background: #dbeafe;
  color: #1d4ed8;
}

.project-activity-list {
  display: grid;
  gap: 7px;
}

.project-activity-list p {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
}

.project-activity-list span {
  display: inline-block;
  min-width: 82px;
  color: #64748b;
  font-weight: 800;
}

.project-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.project-form-grid label,
.project-member-picker {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.project-form-grid label.wide,
.project-member-picker {
  grid-column: 1 / -1;
}

.project-member-picker > div {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.project-member-pick {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) minmax(110px, 0.7fr);
  gap: 8px;
  align-items: center;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.project-member-pick span {
  display: grid;
  min-width: 0;
}

.project-member-pick small {
  overflow: hidden;
  color: var(--muted);
  font-size: 0.72rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-task-card {
  appearance: none;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  min-width: 0;
  min-height: 46px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--ink);
  font: inherit;
  text-align: left;
}

.project-task-card strong,
.project-task-card small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-task-card strong {
  font-size: 0.86rem;
}

.project-task-card small {
  color: var(--muted);
  font-size: 0.74rem;
}

.project-task-tab {
  display: grid;
  gap: 12px;
}

.project-task-member-tabs-wrap {
  min-width: 0;
  padding: 10px;
  border: 1px solid #d8e3f8;
  border-radius: 10px;
  background: #f7faff;
}

.project-task-member-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
}

.project-task-member-tabs button {
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid #d8dce5;
  border-radius: 999px;
  background: #fff;
  color: #4b5563;
  font-size: 0.86rem;
  font-weight: 700;
  white-space: nowrap;
}

.project-task-member-tabs button.active {
  border-color: #93b4ef;
  background: #eaf2ff;
  color: #1746a2;
  box-shadow: inset 0 0 0 1px rgba(23, 70, 162, 0.08);
}

.project-task-summary {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.project-task-summary span,
.project-task-candidates,
.project-management-task-card {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.project-task-summary b {
  display: block;
  margin-bottom: 3px;
  color: var(--muted);
  font-size: 0.74rem;
}

.project-task-toolbar {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, auto));
  gap: 8px;
  align-items: center;
}

.project-task-toolbar input,
.project-task-toolbar select {
  min-width: 0;
}

.project-task-aux-actions,
.project-task-filter-panel {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  min-width: 0;
}

.project-task-aux-actions {
  justify-content: flex-end;
  padding-top: 2px;
}

.project-task-filter-panel {
  padding: 10px 12px;
  border: 1px solid #dbe4f0;
  border-radius: 8px;
  background: #f8fafc;
}

.project-task-filter-panel select,
.project-task-filter-panel input {
  min-width: 160px;
}

.project-task-filter-panel input {
  flex: 1 1 240px;
}

.project-task-list,
.project-task-candidates {
  display: grid;
  gap: 8px;
}

.project-task-member-heading,
.project-task-member-group-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
  color: var(--text);
  font-weight: 800;
}

.project-task-member-heading {
  padding: 2px 2px 0;
}

.project-task-group-list,
.project-task-member-group {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.project-task-member-group {
  padding-top: 4px;
}

.project-task-member-group-head span {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 700;
  white-space: nowrap;
}

.project-management-task-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 8px;
  align-items: center;
}

.project-management-task-card strong,
.project-management-task-card p,
.project-task-candidates b,
.project-task-candidates small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-management-task-card p,
.project-task-candidates small {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.78rem;
}

.project-management-status.status-open {
  border-color: #bfdbfe;
  background: #eff6ff;
  color: #1d4ed8;
}

.project-management-status.status-done {
  border-color: #bbf7d0;
  background: #f0fdf4;
  color: #15803d;
}

.project-management-status.status-late {
  border-color: #fecaca;
  background: #fff1f2;
  color: #be123c;
}

.project-task-candidates label {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px;
  align-items: center;
}

.member-add-fab {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 5;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 38px;
  padding: 8px 12px;
  border-color: var(--ink);
  background: var(--ink);
  color: var(--panel);
  font-size: 0.86rem;
  font-weight: 800;
  box-shadow: var(--shadow);
}

.member-add-fab:hover {
  border-color: var(--blue);
  background: var(--blue);
}

.board-toolbar {
  align-items: stretch;
}

.segment-control {
  display: grid;
  grid-template-columns: repeat(4, minmax(68px, 1fr));
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.segment-control button {
  min-height: 36px;
  border: 0;
  background: transparent;
  color: var(--muted);
}

.segment-control .active {
  background: var(--ink);
  color: var(--panel);
}

.quiet-button {
  padding-inline: 14px;
}

.member-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.member-card {
  display: grid;
  gap: 0;
  min-height: 0;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
  text-align: left;
  overflow: hidden;
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    opacity 180ms ease;
}

.member-card:hover {
  transform: translateY(-2px);
}

.member-card-hit {
  display: grid;
  grid-template-columns: minmax(270px, 0.82fr) 252px minmax(300px, 0.95fr) minmax(500px, 1.45fr);
  gap: 12px;
  align-items: center;
  width: 100%;
  min-height: 0;
  padding: 12px 14px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: inherit;
  text-align: left;
}

.member-card-hit:hover {
  border-color: transparent;
}

.member-card-hit > .member-profile,
.member-card-hit > .mini-stats,
.member-card-hit > .task-preview,
.member-card-hit > .weekly-tabs-card {
  min-width: 0;
}

.member-profile {
  position: relative;
}

.member-card-hit > .member-profile {
  align-self: center;
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) 48px;
  align-items: center;
  gap: 12px;
}

.member-card-hit .member-profile .avatar {
  width: 64px;
  min-width: 64px;
  height: 64px;
}

.member-card-hit .member-title strong {
  font-size: 1.12rem;
}

.member-card-hit .member-title span {
  font-size: 0.86rem;
}

.member-card-hit > .mini-stats {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-self: center;
  align-items: stretch;
}

.member-card-hit > .task-preview {
  align-content: center;
  align-self: center;
}

.member-card-hit > .weekly-tabs-card {
  align-content: center;
}

.avatar {
  display: grid;
  place-items: center;
  width: 46px;
  min-width: 46px;
  height: 46px;
  border-radius: 50%;
  background: #dbeafe;
  color: #1d4ed8;
  font-weight: 900;
}

.member-avatar {
  overflow: hidden;
  background: #eef2f7;
  color: inherit;
}

.member-avatar-svg {
  display: block;
  width: 100%;
  height: 100%;
}

.member-avatar-img {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  object-fit: cover;
}

[data-theme="dark"] .avatar {
  background: #1e3a5f;
  color: #bfdbfe;
}

.member-title {
  min-width: 0;
}

.member-title strong {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  overflow: hidden;
  font-size: 1rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.member-name-text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rhythm-icons {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex: 0 0 auto;
}

.rhythm-icon {
  display: inline-grid;
  place-items: center;
  width: 19px;
  min-width: 19px;
  height: 19px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #f3f4f6;
  color: #94a3b8;
  font-size: 0.72rem;
  line-height: 1;
}

.rhythm-icon.fresh {
  border-color: #bfdbfe;
  background: #eff6ff;
  color: #2563eb;
}

.rhythm-icon.yellow {
  border-color: #fde68a;
  background: #fffbeb;
  color: #a15c06;
}

.rhythm-icon.orange {
  border-color: #fed7aa;
  background: #fff7ed;
  color: #c2410c;
}

.rhythm-icon.danger {
  border-color: #fecaca;
  background: #fff1f2;
  color: #b42318;
}

.rhythm-icon.unknown {
  border-style: dashed;
  color: #64748b;
}

.rhythm-icon.compass.on {
  border-color: #bfdbfe;
  background: #eff6ff;
  color: #2563eb;
}

.rhythm-icon.compass.off {
  background: #f3f4f6;
  color: #cbd5e1;
  opacity: 0.58;
}

.member-title span,
.meta-text {
  color: var(--muted);
  font-size: 0.8rem;
}

.mini-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.mini-stat {
  display: grid;
  align-content: center;
  min-height: 58px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-strong);
}

.mini-stat span {
  display: block;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.72rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mini-stat strong {
  display: block;
  margin-top: 3px;
  font-size: 1.05rem;
  line-height: 1.1;
}

#memberWorkspaceDialog {
  width: min(99vw, 1760px);
  height: min(97vh, 1080px);
  max-height: 97vh;
  overflow: hidden;
}

#memberWorkspaceDialog[open] {
  display: flex;
  flex-direction: column;
}

.member-workspace-body {
  min-height: 0;
  flex: 1;
  overflow: hidden;
}

.member-workspace {
  display: grid;
  grid-template-columns: minmax(250px, 0.36fr) minmax(0, 1.64fr);
  gap: 16px;
  height: 100%;
  min-height: 0;
}

.member-workspace-profile,
.member-workspace-main {
  min-height: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-strong);
}

.member-workspace-profile {
  display: grid;
  align-content: start;
  gap: 16px;
  padding: 16px;
  overflow: auto;
}

.member-workspace-profile > .member-profile {
  display: grid;
  justify-items: center;
  justify-content: center;
  gap: 10px;
  text-align: center;
}

.member-workspace-profile > .member-profile .avatar {
  width: 132px;
  min-width: 132px;
  height: 132px;
}

.member-workspace-profile > .member-profile .member-title {
  display: grid;
  justify-items: center;
  gap: 3px;
}

.member-workspace-profile > .member-profile .member-title strong {
  justify-content: center;
  font-size: 1.15rem;
}

.member-workspace-profile > .member-profile .member-title > span {
  font-size: 0.88rem;
}

.avatar-picker-toggle {
  min-height: 34px;
  padding: 7px 10px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.avatar-picker-panel {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.avatar-picker-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.avatar-picker-head strong {
  font-size: 0.88rem;
}

.avatar-picker-head span {
  color: var(--muted);
  font-size: 0.72rem;
  white-space: nowrap;
}

.avatar-picker-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.avatar-option {
  display: grid;
  justify-items: center;
  gap: 6px;
  min-height: 116px;
  padding: 10px 7px;
  border-radius: 8px;
  font-size: 0.66rem;
  line-height: 1.25;
  text-align: center;
  white-space: normal;
}

.avatar-option .avatar {
  width: 74px;
  min-width: 74px;
  height: 74px;
}

.avatar-option.selected {
  border-color: var(--blue);
  background: #eef2ff;
  color: var(--blue-strong);
}

.avatar-option.is-selected {
  border-color: var(--blue);
  background: #eef2ff;
  color: var(--blue-strong);
}

.member-workspace-main {
  padding: 16px;
  overflow: hidden;
}

.kakao-copy-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.kakao-copy-actions .kakao-icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 0;
  min-height: 38px;
  padding: 7px 8px;
  border-color: #f2d35d;
  background: #fee500;
  color: #241f1f;
  font-size: 0.76rem;
  font-weight: 800;
}

.kakao-copy-actions .kakao-icon-button:hover {
  border-color: #e3c447;
  background: #f7dc00;
}

.kakao-bubble {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 18px;
  border-radius: 999px;
  background: #241f1f;
  color: #fee500;
  font-size: 0.68rem;
  font-weight: 900;
  line-height: 1;
}

.kakao-bubble::after {
  content: "";
  position: absolute;
  left: 5px;
  bottom: -4px;
  width: 7px;
  height: 7px;
  background: #241f1f;
  clip-path: polygon(0 0, 100% 0, 0 100%);
}

.expanded-card-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 12px;
  height: 100%;
  min-height: 0;
}

.app-tabs {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
}

.app-tabs button {
  min-height: 38px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-weight: 800;
}

.app-tabs button.active {
  background: var(--ink);
  color: var(--panel);
}

.expanded-card-content {
  min-height: 0;
  overflow: auto;
}

.inline-section {
  display: grid;
  gap: 12px;
}

.inline-task-list {
  display: grid;
  gap: 8px;
}

.selected-task-head {
  padding: 10px 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.selected-task-list {
  max-height: min(34vh, 320px);
  overflow: auto;
  padding-right: 4px;
}

.inline-task-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 58px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  text-align: left;
  cursor: pointer;
}

.inline-task-card[draggable="true"] {
  cursor: grab;
  user-select: none;
}

.inline-task-card.is-dragging {
  cursor: grabbing;
  opacity: 0.58;
}

.inline-task-card.calendar-drop-target {
  border-color: var(--blue);
  box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--blue) 26%, transparent);
}

.inline-task-card strong,
.inline-task-card small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.inline-task-card small {
  color: var(--muted);
  font-size: 0.78rem;
}

.inline-card-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 6px;
}

.inline-card-actions button,
.report-history-actions [data-action="delete-saved-report"] {
  min-height: 28px;
  padding: 4px 8px;
  border-color: #fecaca;
  background: #fff1f2;
  color: #b42318;
  font-size: 0.72rem;
  font-weight: 800;
}

.inline-card-actions .copy-task-button {
  border-color: #d7dee8;
  background: #ffffff;
  color: #475569;
}

.inline-card-actions .edit-task-button {
  border-color: #bfdbfe;
  background: #eff6ff;
  color: #1d4ed8;
}

.inline-card-actions .complete-task-button {
  border-color: #bbf7d0;
  background: #f0fdf4;
  color: #15803d;
}

.inline-card-actions .copy-task-button:hover,
.inline-card-actions .edit-task-button:hover {
  border-color: #b8c4d4;
  background: #f8fafc;
}

.inline-card-actions .complete-task-button:hover {
  border-color: #86efac;
  background: #dcfce7;
}

.inline-card-actions button:hover,
.report-history-actions [data-action="delete-saved-report"]:hover {
  border-color: #fda4af;
  background: #ffe4e6;
}

.inline-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.inline-form > label {
  align-content: start;
}

.postit-section {
  gap: 10px;
}

.postit-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.postit-toolbar .primary-action {
  min-height: 36px;
  padding: 8px 13px;
  border-radius: 999px;
  font-size: 0.86rem;
}

.memo-subtabs {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.memo-subtabs button {
  min-height: 34px;
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 800;
  cursor: pointer;
}

.memo-subtabs button.active {
  border-color: #1f2937;
  background: #1f2937;
  color: #fff;
}

.member-memo-tab-list {
  display: grid;
  gap: 10px;
}

.memo-tab-card {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--postit-border, #e5d27a);
  border-left-width: 4px;
  border-radius: 10px;
  background: var(--postit-bg, #fff8b8);
  box-shadow: 0 8px 16px rgba(15, 23, 42, 0.08);
  box-sizing: border-box;
}

.memo-tab-card.unread {
  border-left-color: #111827;
}

.memo-tab-card-head,
.memo-tab-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}

.memo-tab-card-head strong {
  min-width: 0;
  color: var(--ink);
  font-size: 0.94rem;
}

.memo-tab-card-head span,
.memo-tab-card-foot span {
  flex-shrink: 0;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.memo-tab-card-content {
  color: var(--ink);
  font-size: 0.9rem;
  line-height: 1.45;
  white-space: normal;
  overflow-wrap: anywhere;
}

.memo-tab-card-content em {
  color: var(--muted);
  font-style: normal;
  font-weight: 800;
}

.memo-tab-card-foot {
  justify-content: flex-end;
}

.memo-tab-card-foot button {
  min-height: 30px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-weight: 800;
  cursor: pointer;
}

.memo-tab-card-foot button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.memo-reply-sent {
  margin: 0;
  color: #2563eb;
  font-size: 0.78rem;
  font-weight: 800;
}

.memo-reply-panel {
  display: grid;
  gap: 8px;
  margin-top: 8px;
  padding: 10px;
  border: 1px solid var(--postit-border, #dbe3ee);
  border-radius: 9px;
  background: color-mix(in srgb, var(--postit-bg, #fff8b8) 42%, #fff);
  box-sizing: border-box;
}

.memo-reply-target,
.memo-reply-warning {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.memo-reply-target strong {
  color: var(--ink);
}

.memo-reply-panel textarea {
  width: 100%;
  min-height: 72px;
  resize: vertical;
  box-sizing: border-box;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  color: var(--ink);
  font: inherit;
}

.memo-reply-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.memo-reply-actions select,
.memo-reply-actions button {
  min-height: 30px;
  box-sizing: border-box;
}

.memo-reply-actions select {
  min-width: 130px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 8px;
  background: #fff;
}

.memo-reply-actions button {
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-weight: 800;
  cursor: pointer;
}

.memo-reply-actions button.primary {
  border-color: #2563eb;
  background: #2563eb;
  color: #fff;
}

.postit-compose {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 150px auto;
  gap: 12px;
  align-items: end;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffdf4;
}

.postit-compose label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.postit-compose textarea,
.postit-compose select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--ink);
}

.postit-compose textarea {
  min-height: 82px;
  resize: vertical;
}

.postit-board {
  position: relative;
  min-height: 440px;
  border: 1px dashed #d7dee8;
  border-radius: 10px;
  background:
    linear-gradient(90deg, rgba(148, 163, 184, 0.08) 1px, transparent 1px),
    linear-gradient(rgba(148, 163, 184, 0.08) 1px, transparent 1px),
    #f8fafc;
  background-size: 24px 24px;
  overflow: auto;
}

.postit-board-drop-target {
  border-color: var(--blue);
  box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--blue) 20%, transparent);
}

.postit-empty {
  margin: 18px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
}

.postit-card {
  position: absolute;
  left: var(--postit-x);
  top: var(--postit-y);
  display: grid;
  gap: 8px;
  width: 204px;
  min-height: 160px;
  padding: 12px;
  border: 1px solid var(--postit-border);
  border-radius: 8px;
  background: var(--postit-bg);
  box-shadow:
    0 9px 14px rgba(15, 23, 42, 0.20),
    2px 3px 0 rgba(15, 23, 42, 0.06);
  cursor: grab;
  transition:
    box-shadow 0.16s ease,
    transform 0.16s ease,
    opacity 0.16s ease;
}

.postit-card::after {
  content: "";
  position: absolute;
  right: -1px;
  bottom: -1px;
  width: 34px;
  height: 34px;
  border-bottom-right-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.72) 0%, rgba(255, 255, 255, 0.42) 44%, rgba(15, 23, 42, 0.12) 45%, rgba(15, 23, 42, 0.03) 100%);
  box-shadow: -3px -3px 5px rgba(15, 23, 42, 0.06);
  pointer-events: none;
}

.postit-card.is-dragging {
  z-index: 10;
  opacity: 0.82;
  transform: rotate(-0.4deg) scale(1.015);
  box-shadow:
    0 12px 18px rgba(15, 23, 42, 0.26),
    2px 4px 0 rgba(15, 23, 42, 0.08);
  cursor: grabbing;
}

.postit-card-head {
  display: flex;
  align-items: center;
  gap: 6px;
}

.postit-send-toggle {
  flex: 1;
  min-height: 30px;
  padding: 4px 7px;
  border-color: rgba(71, 85, 105, 0.18);
  background: rgba(255, 255, 255, 0.78);
  color: #334155;
  font-size: 0.72rem;
  font-weight: 900;
  text-align: center;
}

.postit-drag-handle {
  flex: 1;
  color: #475569;
  font-size: 0.72rem;
  font-weight: 900;
  user-select: none;
}

.postit-card select {
  width: 72px;
  min-height: 30px;
  padding: 4px 6px;
  border: 1px solid rgba(15, 23, 42, 0.14);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.74);
  font-size: 0.72rem;
  font-weight: 800;
}

.postit-delete {
  min-height: 30px;
  padding: 4px 7px;
  border-color: rgba(185, 28, 28, 0.24);
  background: rgba(255, 255, 255, 0.78);
  color: #b91c1c;
  font-size: 0.72rem;
  font-weight: 900;
}

.postit-card textarea {
  width: 100%;
  min-height: 104px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #111827;
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.55;
  resize: vertical;
  outline: none;
}

.postit-save-row {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  color: rgba(51, 65, 85, 0.78);
  font-size: 0.68rem;
  font-weight: 900;
}

.postit-save-row button {
  display: none;
  min-height: 24px;
  padding: 3px 7px;
  border-color: rgba(185, 28, 28, 0.24);
  background: rgba(255, 255, 255, 0.78);
  color: #b91c1c;
  font-size: 0.68rem;
  font-weight: 900;
}

.postit-card[data-save-status="saving"] .postit-save-row {
  color: #2563eb;
}

.postit-card[data-save-status="failed"] .postit-save-row {
  color: #b91c1c;
}

.postit-card[data-save-status="failed"] .postit-save-row button {
  display: inline-flex;
}

.postit-send-panel {
  display: grid;
  gap: 7px;
  padding: 8px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.76);
}

.postit-send-panel label {
  display: grid;
  gap: 5px;
  color: #475569;
  font-size: 0.72rem;
  font-weight: 900;
}

.postit-send-panel select {
  width: 100%;
  min-height: 30px;
  border: 1px solid rgba(15, 23, 42, 0.14);
  border-radius: 6px;
  background: #fff;
  font-size: 0.75rem;
}

.postit-send-actions {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
}

.postit-send-actions button {
  min-height: 28px;
  padding: 4px 8px;
  font-size: 0.72rem;
  font-weight: 900;
}

.member-avatar-wrap {
  position: relative;
  display: inline-flex;
  width: fit-content;
  min-width: 0;
  flex: 0 0 auto;
  overflow: visible;
}

.member-avatar-wrap .avatar {
  flex: 0 0 auto;
}

.member-memo-badge {
  position: absolute;
  right: -14px;
  bottom: -8px;
  z-index: 5;
  display: block;
  width: 42px;
  height: 38px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #5f370e;
  font-size: 0.72rem;
  font-weight: 950;
  line-height: 1;
}

.member-memo-badge.mine {
  cursor: pointer;
}

.member-memo-badge.public {
  pointer-events: none;
}

.member-memo-note {
  position: absolute;
  right: 7px;
  bottom: 5px;
  width: 24px;
  height: 24px;
  border: 1px solid var(--memo-note-border, #facc15);
  border-radius: 4px;
  background: var(--memo-note-bg, #fff7bf);
  box-shadow: 0 4px 8px rgba(120, 53, 15, 0.18);
}

.member-memo-note::after {
  content: "";
  position: absolute;
  right: -1px;
  bottom: -1px;
  width: 8px;
  height: 8px;
  border-bottom-right-radius: 4px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.65), rgba(120, 53, 15, 0.16));
  box-shadow: -1px -1px 2px rgba(120, 53, 15, 0.12);
}

.member-memo-note.note-1 {
  transform: rotate(5deg);
}

.member-memo-note.note-2 {
  right: 1px;
  bottom: 11px;
  transform: rotate(-4deg);
}

.member-memo-note.note-3 {
  right: -4px;
  bottom: 17px;
  transform: rotate(8deg);
}

.member-memo-count,
.member-memo-more {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  border-radius: 999px;
  background: #78350f;
  color: #fffaf0;
  box-shadow: 0 2px 5px rgba(67, 20, 7, 0.22);
  font-size: 0.62rem;
  font-weight: 950;
}

.member-memo-count {
  right: -2px;
  bottom: 0;
}

.member-memo-more {
  right: -3px;
  top: 0;
}

.member-memo-badge.mine:hover {
  transform: translateY(-1px);
}

.member-memo-dialog {
  width: min(560px, calc(100vw - 24px));
  max-width: calc(100vw - 24px);
  max-height: calc(100vh - 24px);
  padding: 0;
  border: 0;
  border-radius: 14px;
  overflow: hidden;
}

.member-memo-dialog-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  max-height: calc(100vh - 24px);
  padding: 22px;
  background: #fff;
}

.member-memo-list {
  display: grid;
  gap: 10px;
  min-height: 0;
  overflow: auto;
  padding-right: 4px;
}

.member-memo-message {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--postit-border);
  border-radius: 10px;
  background: var(--postit-bg);
}

.member-memo-message.read {
  opacity: 0.78;
}

.member-memo-message-head,
.member-memo-message-foot {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
  color: #475569;
  font-size: 0.78rem;
  font-weight: 800;
}

.member-memo-message-content {
  color: #111827;
  line-height: 1.55;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.member-memo-message-foot button {
  min-height: 28px;
  padding: 4px 9px;
  border-color: rgba(185, 28, 28, 0.24);
  color: #b91c1c;
  background: rgba(255, 255, 255, 0.72);
  font-weight: 900;
}

.range-toggle-line {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  width: fit-content;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.range-toggle-line input {
  width: auto;
  min-height: 0;
}

.range-date-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  align-content: start;
  padding: 10px;
  border: 1px solid color-mix(in srgb, var(--blue) 26%, var(--line));
  border-radius: 8px;
  background: color-mix(in srgb, var(--blue) 5%, #ffffff);
}

.range-date-fields[hidden] {
  display: none !important;
}

.range-date-fields .input-guide {
  grid-column: 1 / -1;
}

.inline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.inline-actions [data-action="copy-current-report"] {
  border-color: #f2d35d;
  background: #fee500;
  color: #241f1f;
  font-weight: 900;
}

.inline-actions [data-action="copy-current-report"]:hover {
  border-color: #e3c447;
  background: #f7dc00;
}

.report-history-panel {
  display: grid;
  gap: 10px;
  padding-top: 4px;
}

.report-history-list {
  display: grid;
  gap: 8px;
  max-height: min(34vh, 320px);
  overflow: auto;
  padding-right: 4px;
}

.report-history-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-height: 58px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.report-history-card strong,
.report-history-card small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.report-history-card small {
  color: var(--muted);
  font-size: 0.76rem;
}

.report-history-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.report-history-actions button {
  min-height: 32px;
  padding: 6px 8px;
  font-size: 0.76rem;
}

.report-history-actions [data-action="edit-saved-report"] {
  border-color: #d1d5db;
  background: #f9fafb;
  color: #374151;
  font-weight: 800;
}

.report-history-actions [data-action="copy-saved-report"] {
  border-color: #f2d35d;
  background: #fee500;
  color: #241f1f;
  font-weight: 900;
}

.inline-head-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.inline-head-actions button {
  min-height: 34px;
  padding-inline: 12px;
}

.inline-head-actions .add-task-emphasis,
.inline-head-actions .add-report-emphasis {
  border-color: #4b5563;
  background: #4b5563;
  color: #ffffff;
  font-weight: 900;
}

.inline-head-actions .add-task-emphasis:hover,
.inline-head-actions .add-report-emphasis:hover {
  border-color: #111827;
  background: #111827;
}

.selected-date-guide {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.selected-date-guide span {
  flex: 0 0 auto;
  padding: 4px 8px;
  border-radius: 999px;
  background: #f3f4f6;
  color: #374151;
  font-size: 0.74rem;
  font-weight: 900;
}

.selected-date-guide strong {
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.78rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.weekly-planner-section {
  height: 100%;
  grid-template-rows: auto auto minmax(0, 1fr);
}

.week-plan-form {
  display: grid;
  gap: 12px;
}

.week-plan-helper {
  margin: 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--blue) 8%, var(--panel));
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.45;
}

.member-calendar {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.member-calendar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.member-calendar-head strong,
.member-calendar-head span {
  display: block;
}

.member-calendar-head strong {
  font-size: 1rem;
}

.member-calendar-head span {
  color: var(--muted);
  font-size: 0.78rem;
}

.member-calendar-head button {
  min-height: 34px;
  padding-inline: 12px;
}

.calendar-month-tools {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  flex-wrap: wrap;
}

.calendar-month-tools button {
  min-width: 40px;
  white-space: nowrap;
}

.calendar-month-tools .calendar-today-jump {
  border-color: color-mix(in srgb, var(--blue) 34%, var(--line));
  color: var(--blue);
  font-weight: 900;
}

.calendar-month-tools select,
.calendar-month-tools input[type="text"] {
  width: 136px;
  min-height: 34px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-strong);
  color: var(--ink);
  font: inherit;
  font-weight: 800;
}

.calendar-month-tools select {
  width: auto;
  min-width: 86px;
}

.calendar-direct-month {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--muted);
  font-size: 0.78rem;
  white-space: nowrap;
}

.calendar-direct-month input[type="text"] {
  width: 136px;
}

.calendar-weekdays,
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
}

.calendar-weekdays span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  text-align: center;
}

.calendar-cell {
  display: grid;
  align-content: start;
  gap: 4px;
  min-height: 104px;
  padding: 7px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-strong);
  text-align: left;
}

.calendar-cell:hover {
  border-color: var(--blue);
}

.calendar-cell.today {
  box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--blue) 45%, transparent);
}

.calendar-cell.selected {
  border-color: var(--green);
  background: color-mix(in srgb, var(--green) 12%, var(--panel));
  box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--green) 45%, transparent);
}

.calendar-cell.outside-month {
  opacity: 0.45;
}

.calendar-cell.saturday {
  border-color: color-mix(in srgb, var(--blue) 28%, var(--line));
  background: color-mix(in srgb, var(--blue) 7%, var(--panel));
}

.calendar-cell.sunday {
  border-color: color-mix(in srgb, var(--red) 28%, var(--line));
  background: color-mix(in srgb, var(--red) 6%, var(--panel));
}

.calendar-date {
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 900;
}

.calendar-cell.saturday .calendar-date {
  color: #2563eb;
}

.calendar-cell.sunday .calendar-date {
  color: var(--red);
}

.calendar-cell.holiday {
  border-color: color-mix(in srgb, var(--red) 32%, var(--line));
  background: color-mix(in srgb, var(--red) 5%, var(--panel));
}

.calendar-cell.holiday .calendar-date {
  color: var(--red);
}

.calendar-items {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.calendar-items em {
  display: block;
  overflow: hidden;
  min-height: 17px;
  padding: 2px 5px;
  border-radius: 999px;
  background: var(--panel);
  color: var(--ink);
  font-size: 0.66rem;
  line-height: 1.15;
  font-style: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.calendar-items .calendar-empty {
  width: 24px;
  padding-inline: 0;
  color: var(--muted);
  text-align: center;
}

.calendar-items .holiday-label {
  background: #fee2e2;
  color: #b42318;
  font-weight: 900;
}

.report-calendar .calendar-items .calendar-report-chip {
  background: var(--report-color, var(--green));
  color: #ffffff;
  font-weight: 800;
}

.calendar-items .calendar-task-chip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 3px;
  overflow: hidden;
  min-height: 18px;
  padding: 2px 4px 2px 6px;
  border-radius: 999px;
  background: var(--task-color, var(--green));
  color: #ffffff;
  font-family: "Malgun Gothic", "Apple SD Gothic Neo", system-ui, sans-serif;
  font-size: 0.68rem;
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: 0;
}

.calendar-items .calendar-task-chip em {
  min-width: 0;
  min-height: 0;
  padding: 0;
  background: transparent;
  color: inherit;
  font-size: inherit;
  font-weight: inherit;
}

.calendar-items .calendar-task-chip.done {
  background: #e5e7eb;
  color: #6b7280;
  opacity: 0.82;
  text-decoration: line-through;
}

.calendar-task-complete {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  min-width: 27px;
  height: 15px;
  padding: 0 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: #374151;
  font-size: 0.55rem;
  font-weight: 900;
  text-decoration: none;
  cursor: pointer;
}

.calendar-items .calendar-task-chip[draggable="true"] {
  cursor: grab;
  user-select: none;
}

.calendar-items .calendar-task-chip.is-dragging {
  cursor: grabbing;
  opacity: 0.55;
}

.calendar-cell.calendar-drop-target {
  border-color: var(--blue);
  box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--blue) 34%, transparent);
}

.calendar-items .calendar-task-chip.calendar-drop-target {
  outline: 2px solid color-mix(in srgb, #ffffff 80%, var(--blue));
  outline-offset: 1px;
}

.report-color-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 6px;
  border-radius: 50%;
  vertical-align: 1px;
}


.week-plan-days {
  display: grid;
  grid-template-columns: repeat(7, minmax(120px, 1fr));
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.week-plan-days label {
  display: grid;
  gap: 6px;
  min-width: 120px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.week-plan-days label.today {
  border-color: var(--blue);
  background: color-mix(in srgb, var(--blue) 8%, var(--panel));
}

.week-plan-days label.saturday,
.schedule-day.saturday,
.weekly-day-chip.saturday {
  border-color: color-mix(in srgb, var(--blue) 28%, var(--line));
  background: color-mix(in srgb, var(--blue) 7%, var(--panel));
}

.week-plan-days label.sunday,
.schedule-day.sunday,
.weekly-day-chip.sunday {
  border-color: color-mix(in srgb, var(--red) 28%, var(--line));
  background: color-mix(in srgb, var(--red) 6%, var(--panel));
}

.week-plan-days label.saturday span,
.schedule-day.saturday .schedule-day-head strong,
.schedule-day.saturday .schedule-day-head span,
.weekly-day-chip.saturday span {
  color: #2563eb;
}

.week-plan-days label.sunday span,
.schedule-day.sunday .schedule-day-head strong,
.schedule-day.sunday .schedule-day-head span,
.weekly-day-chip.sunday span {
  color: var(--red);
}

.week-plan-days label.holiday,
.schedule-day.holiday,
.weekly-day-chip.holiday {
  border-color: color-mix(in srgb, var(--red) 32%, var(--line));
  background: color-mix(in srgb, var(--red) 5%, var(--panel));
}

.week-plan-days label.holiday span,
.schedule-day.holiday .schedule-day-head strong,
.schedule-day.holiday .schedule-day-head span,
.weekly-day-chip.holiday span {
  color: var(--red);
}

.week-plan-days .holiday-label,
.schedule-day-body .holiday-label {
  display: inline-block;
  width: fit-content;
  padding: 2px 6px;
  border-radius: 999px;
  background: #fee2e2;
  color: #b42318;
  font-size: 0.64rem;
  font-style: normal;
  font-weight: 900;
}

.week-plan-days span {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 900;
}

.week-plan-days input {
  min-height: 38px;
  padding: 8px 9px;
  font-size: 0.82rem;
}

.week-plan-options {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(120px, 160px) minmax(110px, 140px);
  gap: 8px;
  align-items: end;
}

.schedule-board {
  display: grid;
  grid-template-columns: repeat(7, minmax(128px, 1fr));
  gap: 7px;
  min-height: 0;
  overflow-x: auto;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.schedule-day {
  display: grid;
  grid-template-rows: auto minmax(150px, 1fr);
  min-width: 128px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-strong);
}

.schedule-day.today {
  border-color: var(--blue);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--blue) 45%, transparent);
}

.schedule-day-head {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 9px;
  border-bottom: 1px solid var(--line);
}

.schedule-day-head strong {
  font-size: 0.82rem;
}

.schedule-day-head span {
  color: var(--muted);
  font-size: 0.68rem;
}

.schedule-day-body {
  display: grid;
  align-content: start;
  gap: 6px;
  min-height: 0;
  padding: 8px;
  overflow-y: auto;
}

.schedule-task {
  display: grid;
  grid-template-columns: minmax(0, 1fr) repeat(2, auto);
  gap: 4px;
  align-items: start;
  min-height: 46px;
  padding: 6px 6px 6px 8px;
  border: 1px solid var(--line);
  border-color: color-mix(in srgb, var(--task-color, var(--blue)) 34%, var(--line));
  border-left-width: 4px;
  border-radius: 8px;
  background: color-mix(in srgb, var(--task-color, var(--blue)) 8%, var(--panel));
}

.schedule-task.done {
  border-color: #d1d5db;
  background: #f3f4f6;
  opacity: 0.78;
}

.schedule-task.done strong,
.schedule-task.done small {
  color: #6b7280;
  text-decoration: line-through;
}

.schedule-task-main {
  display: grid;
  gap: 2px;
  min-width: 0;
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
  text-align: left;
}

.schedule-task-main:hover {
  border-color: transparent;
}

.schedule-task strong,
.schedule-task small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.schedule-task strong {
  font-size: 0.82rem;
  line-height: 1.25;
}

.schedule-task small,
.schedule-empty {
  color: var(--muted);
  font-size: 0.66rem;
  line-height: 1.25;
}

.schedule-task-copy,
.schedule-task-complete,
.schedule-task-delete {
  display: grid;
  place-items: center;
  width: 22px;
  min-width: 22px;
  height: 22px;
  min-height: 22px;
  padding: 0;
  border-color: #fecaca;
  background: #fff1f2;
  color: #b42318;
  font-size: 0.78rem;
  font-weight: 900;
  line-height: 1;
}

.schedule-task-copy {
  width: auto;
  min-width: 34px;
  padding-inline: 7px;
  border-color: #d7dee8;
  background: #ffffff;
  color: #475569;
  font-size: 0.66rem;
}

.schedule-task-copy:hover {
  border-color: #b8c4d4;
  background: #f8fafc;
}

.schedule-task-complete {
  width: auto;
  min-width: 56px;
  padding-inline: 7px;
  border-color: #bbf7d0;
  background: #f0fdf4;
  color: #15803d;
  font-size: 0.66rem;
}

.schedule-task-complete:hover {
  border-color: #86efac;
  background: #dcfce7;
}

.schedule-task-delete:hover {
  border-color: #fda4af;
  background: #ffe4e6;
}

.schedule-empty {
  display: grid;
  min-height: 64px;
  place-items: center;
  border: 1px dashed var(--line);
  border-radius: 8px;
}

.task-preview {
  display: grid;
  gap: 6px;
}

.task-preview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 24px;
}

.task-preview-head strong {
  font-size: 0.82rem;
}

.task-preview-head span {
  color: var(--muted);
  font-size: 0.78rem;
}

.task-pill {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-strong);
}

.task-pill span:nth-child(2) {
  overflow: hidden;
  font-size: 0.84rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.task-pill .badge {
  min-width: 42px;
  font-size: 0.72rem;
}

.weekly-snapshot {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--blue) 7%, var(--panel));
}

.weekly-line {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.weekly-line > span {
  color: var(--blue-strong);
  font-size: 0.72rem;
  font-weight: 900;
}

.weekly-line > strong,
.weekly-next-task strong {
  overflow: hidden;
  font-size: 0.84rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.weekly-line small,
.weekly-next-task small {
  overflow: hidden;
  color: var(--muted);
  font-size: 0.73rem;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.weekly-next-task {
  display: grid;
  gap: 2px;
  min-width: 0;
  padding-top: 3px;
}

.weekly-tabs-card {
  display: grid;
  gap: 7px;
}

.weekly-tabs-row {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 6px;
  min-width: 0;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-strong);
}

.weekly-tabs-row.report-row-ui {
  background: color-mix(in srgb, var(--blue) 7%, var(--panel));
}

.weekly-tab-label {
  display: grid;
  align-content: center;
  gap: 2px;
  min-width: 0;
  padding: 6px;
  border-radius: 8px;
  color: #ffffff;
}

.report-row-ui .weekly-tab-label {
  background: var(--blue);
}

.weekly-tab-label strong,
.weekly-tab-label span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.weekly-tab-label strong {
  font-size: 0.72rem;
}

.weekly-tab-label span {
  opacity: 0.86;
  font-size: 0.64rem;
}

.weekly-day-strip {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 4px;
  min-width: 0;
}

.weekly-day-chip {
  appearance: none;
  display: grid;
  align-content: center;
  gap: 3px;
  min-width: 0;
  min-height: 36px;
  padding: 4px 3px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--ink);
  font: inherit;
  text-align: center;
  cursor: pointer;
  transition:
    border-color 160ms ease,
    transform 160ms ease,
    background 160ms ease;
}

.weekly-day-chip:hover {
  border-color: var(--blue);
  transform: translateY(-1px);
}

.weekly-day-chip.today {
  border-width: 2px;
  border-color: var(--ink);
  box-shadow:
    inset 0 0 0 1px color-mix(in srgb, var(--blue) 42%, transparent),
    0 0 0 2px color-mix(in srgb, var(--blue) 12%, transparent);
}

.weekly-day-chip.has-item {
  border-color: color-mix(in srgb, var(--task-color, var(--blue)) 34%, var(--line));
  border-bottom-width: 4px;
  background: #ffffff;
}

.weekly-day-chip span,
.weekly-day-chip strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.weekly-day-chip span {
  color: var(--muted);
  font-size: 0.6rem;
  font-weight: 900;
}

.weekly-day-chip strong {
  font-size: 0.62rem;
  letter-spacing: 0;
}

.weekly-task-popover {
  position: fixed;
  z-index: 1200;
  width: min(320px, calc(100vw - 24px));
  max-height: 240px;
  overflow-y: auto;
  box-sizing: border-box;
  padding: 10px 12px;
  border: 1px solid #dbe3ee;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.18);
}

.weekly-task-popover[hidden] {
  display: none;
}

.weekly-task-popover::after {
  position: absolute;
  left: 50%;
  width: 10px;
  height: 10px;
  border-right: 1px solid #dbe3ee;
  border-bottom: 1px solid #dbe3ee;
  background: #fff;
  content: "";
  transform: translateX(-50%) rotate(45deg);
}

.weekly-task-popover[data-placement="top"]::after {
  bottom: -6px;
}

.weekly-task-popover[data-placement="bottom"]::after {
  top: -6px;
  transform: translateX(-50%) rotate(225deg);
}

.weekly-task-popover__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.weekly-task-popover__head strong {
  min-width: 0;
  color: var(--ink);
  font-size: 0.88rem;
}

.weekly-task-popover__head button {
  width: 24px;
  height: 24px;
  border: 0;
  border-radius: 999px;
  background: #f1f5f9;
  color: var(--muted);
  cursor: pointer;
}

.weekly-task-popover__body {
  display: grid;
  gap: 6px;
}

.weekly-task-popover__item {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr) auto;
  align-items: center;
  gap: 7px;
  padding: 0 0 6px;
  border-bottom: 1px solid #eef2f7;
  color: var(--ink);
  font-size: 0.8rem;
  line-height: 1.35;
}

.weekly-task-popover__item .status-dot {
  background: var(--task-color, var(--blue));
}

.weekly-task-popover__item:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.weekly-task-popover__item span:nth-child(2) {
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.weekly-task-popover__item.done span:nth-child(2) {
  color: var(--muted);
  text-decoration: line-through;
}

.weekly-task-popover__item em {
  color: var(--muted);
  font-size: 0.72rem;
  font-style: normal;
  white-space: nowrap;
}

.weekly-task-popover__empty {
  padding: 4px 0 2px;
  color: var(--muted);
  font-size: 0.8rem;
}

[data-theme="dark"] .week-plan-days label,
[data-theme="dark"] .schedule-day,
[data-theme="dark"] .weekly-day-chip {
  border-color: var(--dark-border);
  background: var(--dark-surface);
  color: var(--dark-text);
}

[data-theme="dark"] .week-plan-days label.today,
[data-theme="dark"] .schedule-day.today,
[data-theme="dark"] .weekly-day-chip.today {
  border-color: #93c5fd;
  background: color-mix(in srgb, #2563eb 22%, var(--dark-surface));
  color: #ffffff;
}

[data-theme="dark"] .week-plan-days label.saturday,
[data-theme="dark"] .schedule-day.saturday,
[data-theme="dark"] .weekly-day-chip.saturday {
  border-color: color-mix(in srgb, #60a5fa 48%, var(--dark-border));
  background: color-mix(in srgb, #2563eb 14%, var(--dark-surface));
}

[data-theme="dark"] .week-plan-days label.sunday,
[data-theme="dark"] .schedule-day.sunday,
[data-theme="dark"] .weekly-day-chip.sunday,
[data-theme="dark"] .week-plan-days label.holiday,
[data-theme="dark"] .schedule-day.holiday,
[data-theme="dark"] .weekly-day-chip.holiday {
  border-color: color-mix(in srgb, #fca5a5 48%, var(--dark-border));
  background: color-mix(in srgb, #b91c1c 16%, var(--dark-surface));
}

[data-theme="dark"] .weekly-day-chip.has-item {
  border-color: color-mix(in srgb, var(--task-color, #60a5fa) 60%, var(--dark-border));
  background: color-mix(in srgb, var(--task-color, #60a5fa) 18%, var(--dark-surface));
  color: var(--dark-text);
}

[data-theme="dark"] .weekly-day-chip:hover {
  border-color: #93c5fd;
  background: var(--dark-surface-soft);
  transform: none;
}

[data-theme="dark"] .week-plan-days label span,
[data-theme="dark"] .schedule-day-head strong,
[data-theme="dark"] .schedule-day-head span,
[data-theme="dark"] .weekly-day-chip span,
[data-theme="dark"] .weekly-day-chip strong {
  color: inherit;
}

[data-theme="dark"] .weekly-day-chip span {
  color: var(--dark-text-muted);
}

[data-theme="dark"] .weekly-day-chip.has-item span,
[data-theme="dark"] .weekly-day-chip.has-item strong,
[data-theme="dark"] .weekly-day-chip.today span,
[data-theme="dark"] .weekly-day-chip.today strong {
  color: #ffffff;
}

[data-theme="dark"] .weekly-task-popover {
  border-color: var(--dark-border);
  background: var(--dark-surface);
  color: var(--dark-text);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.42);
}

[data-theme="dark"] .weekly-task-popover::after {
  border-color: var(--dark-border);
  background: var(--dark-surface);
}

[data-theme="dark"] .weekly-task-popover__head strong,
[data-theme="dark"] .weekly-task-popover__item {
  color: var(--dark-text);
}

[data-theme="dark"] .weekly-task-popover__head button {
  background: var(--dark-surface-soft);
  color: var(--dark-text-muted);
}

[data-theme="dark"] .weekly-task-popover__item {
  border-bottom-color: var(--dark-border);
}

[data-theme="dark"] .weekly-task-popover__item.done span:nth-child(2),
[data-theme="dark"] .weekly-task-popover__item em,
[data-theme="dark"] .weekly-task-popover__empty {
  color: var(--dark-text-muted);
}

.status-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--blue);
}

.status-dot.done {
  background: var(--green);
}

.status-dot.late {
  background: var(--red);
}

.status-dot.waiting {
  background: var(--amber);
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  padding: 3px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.76rem;
  white-space: nowrap;
}

.badge.success {
  border-color: rgba(20, 132, 95, 0.28);
  color: var(--green);
  background: rgba(20, 132, 95, 0.08);
}

[data-theme="dark"] button {
  border-color: var(--dark-border);
  background: var(--dark-surface);
  color: var(--dark-text);
}

[data-theme="dark"] button:hover {
  border-color: #64748b;
  background: var(--dark-surface-soft);
}

[data-theme="dark"] button:disabled,
[data-theme="dark"] button[disabled],
[data-theme="dark"] select:disabled,
[data-theme="dark"] input:disabled,
[data-theme="dark"] textarea:disabled {
  border-color: #3b4655;
  background: #202938;
  color: #cbd5e1;
  cursor: not-allowed;
  opacity: 0.78;
}

[data-theme="dark"] .primary-action,
[data-theme="dark"] button.primary,
[data-theme="dark"] .primary {
  border-color: #60a5fa;
  background: #2563eb;
  color: #ffffff;
}

[data-theme="dark"] .badge {
  border-color: var(--dark-border);
  background: var(--dark-surface-soft);
  color: var(--dark-text-muted);
}

[data-theme="dark"] .badge.success {
  border-color: rgba(81, 210, 160, 0.45);
  background: rgba(81, 210, 160, 0.14);
  color: #bbf7d0;
}

.empty-mini {
  padding: 12px;
  border: 1px dashed var(--soft);
  border-radius: 8px;
  color: var(--muted);
  font-size: 0.85rem;
  text-align: center;
}

.member-view {
  display: grid;
  gap: 16px;
}

.detail-grid {
  display: grid;
  grid-template-columns: minmax(260px, 0.78fr) minmax(0, 1.22fr);
  gap: 16px;
}

.panel {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.profile-card {
  display: grid;
  gap: 16px;
  align-content: start;
}

.profile-card .avatar {
  width: 64px;
  height: 64px;
  font-size: 1.3rem;
}

.info-list {
  display: grid;
  gap: 10px;
}

.info-line {
  display: grid;
  gap: 3px;
}

.info-line span {
  color: var(--muted);
  font-size: 0.78rem;
}

.info-line strong {
  overflow-wrap: anywhere;
}

.detail-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.section-stack {
  display: grid;
  gap: 16px;
}

.task-list,
.report-list {
  display: grid;
  gap: 8px;
}

.task-row,
.report-row {
  justify-content: space-between;
  gap: 12px;
  min-height: 64px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-strong);
}

.task-row-main,
.report-row-main {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.task-row-main strong,
.report-row-main strong {
  overflow-wrap: anywhere;
}

.row-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.row-actions button {
  min-height: 34px;
  padding: 6px 9px;
}

.empty-state {
  display: grid;
  place-items: center;
  min-height: 120px;
  border: 1px dashed var(--soft);
  border-radius: 8px;
  color: var(--muted);
  text-align: center;
}

.empty-state.small {
  min-height: 56px;
  padding: 10px;
  font-size: 0.84rem;
}

.alert-item {
  color: inherit;
  text-align: left;
}

.app-dialog {
  position: relative;
  width: min(92vw, 620px);
  max-height: 90vh;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--ink);
  box-shadow: var(--shadow);
  overflow: auto;
}

.app-dialog::backdrop {
  background: rgba(15, 23, 42, 0.45);
}

.large-dialog {
  width: min(94vw, 860px);
}

#templateDialog {
  width: min(98vw, 1500px);
  height: min(95vh, 980px);
  max-height: 94vh;
}

#templateDialog.fullscreen-dialog {
  width: 100vw;
  height: 100vh;
  max-height: 100vh;
  border-radius: 0;
}

#memberWorkspaceDialog.fullscreen-dialog {
  width: 100vw;
  height: 100vh;
  max-height: 100vh;
  border-radius: 0;
}

#templateDialog[open] {
  display: flex;
  flex-direction: column;
}

#templateDialog .dialog-head,
#templateDialog .template-tools,
#templateDialog .template-task-tools,
#templateDialog .dialog-actions {
  flex-shrink: 0;
}

.dialog-head-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 700;
}

.check-line {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-strong);
  color: var(--ink);
}

.check-line input {
  width: 18px;
  min-width: 18px;
  height: 18px;
  min-height: 18px;
  margin: 0;
  padding: 0;
}

.wide-field {
  grid-column: 1 / -1;
}

.input-guide {
  display: block;
  margin-top: 6px;
  color: #94a3b8;
  font-size: 0.78rem;
  line-height: 1.4;
}

.site-custom-input {
  margin-top: 8px;
}

.report-photo-field {
  display: grid;
  gap: 10px;
}

.report-photo-upload {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border: 1px dashed #b8c3cf;
  border-radius: 8px;
  background: #f9fbfc;
}

.report-photo-upload div {
  display: grid;
  gap: 4px;
}

.report-photo-upload strong {
  color: var(--ink);
  font-size: 0.9rem;
}

.report-photo-upload span {
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.4;
}

.report-photo-upload input {
  max-width: 310px;
}

.report-photo-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  min-height: 120px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.report-photo-item {
  display: grid;
  grid-template-rows: 112px auto;
  gap: 6px;
  min-width: 0;
  margin: 0;
  padding: 7px;
  border: 1px solid #e5eaf0;
  border-radius: 8px;
  background: #f9fbfc;
}

.report-photo-open,
.report-photo-item > img {
  width: 100%;
  height: 112px;
  min-height: 112px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: #eef2f6;
  overflow: hidden;
}

.report-photo-open img,
.report-photo-item > img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.report-photo-item figcaption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  min-width: 0;
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.25;
}

.report-photo-item figcaption span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.report-photo-item figcaption button {
  min-height: 24px;
  padding: 3px 7px;
  border-color: #fecaca;
  background: #fff1f2;
  color: #b42318;
  font-size: 0.68rem;
  font-weight: 800;
}

.report-photo-item figcaption em {
  flex: 0 0 auto;
  color: #64748b;
  font-style: normal;
  font-weight: 800;
}

.report-save-status {
  align-self: center;
  min-width: 150px;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 800;
  line-height: 1.35;
}

.report-save-status[data-tone="loading"] {
  color: #4b5563;
}

.report-save-status[data-tone="success"] {
  color: #047857;
}

.report-save-status[data-tone="error"] {
  color: #b42318;
}

.report-saved-photo-row {
  display: flex;
  gap: 5px;
  margin-top: 7px;
}

.report-saved-photo-row button {
  width: 42px;
  height: 42px;
  min-height: 42px;
  padding: 0;
  border-radius: 7px;
  overflow: hidden;
}

.report-saved-photo-row img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.help-note {
  margin-top: 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-strong);
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.5;
}

.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 0;
  margin: 18px 0 0;
}

.dialog-actions button {
  padding-inline: 16px;
}

.template-layout {
  display: grid;
  grid-template-columns: minmax(220px, 260px) minmax(0, 1fr);
  gap: 14px;
  margin-top: 18px;
  min-height: 0;
  flex: 1;
}

.template-tools,
.template-task-tools {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(180px, 0.6fr);
  gap: 12px;
  margin-top: 14px;
}

.template-task-tools {
  grid-template-columns: minmax(0, 1fr) minmax(180px, 0.5fr);
  align-items: end;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-strong);
}

.template-task-tools label {
  font-size: 0.78rem;
  color: var(--muted);
}

.template-task-tools select,
.template-task-tools input {
  min-height: 36px;
  padding-block: 7px;
}

.template-list {
  display: grid;
  align-content: start;
  gap: 6px;
  max-height: none;
  min-height: 0;
  overflow: auto;
  padding-right: 4px;
}

.template-item {
  justify-content: space-between;
  gap: 6px;
  min-height: 48px;
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-strong);
  text-align: left;
}

.template-item span:first-child {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.template-item strong {
  overflow: hidden;
  font-size: 0.88rem;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.template-item small {
  color: var(--muted);
  font-size: 0.7rem;
  line-height: 1.15;
}

.template-item .badge {
  min-height: 22px;
  padding: 2px 7px;
  font-size: 0.68rem;
}

.template-item.active {
  border-color: var(--blue);
  background: rgba(37, 99, 235, 0.08);
}

.document-form-panel {
  min-width: 0;
  max-height: none;
  min-height: 0;
  overflow: auto;
  padding: 18px;
  border: 1px solid #d9e0e7;
  border-radius: 8px;
  background:
    linear-gradient(#eef2f6 1px, transparent 1px),
    linear-gradient(90deg, #eef2f6 1px, transparent 1px),
    #f6f8fb;
  background-size: 18px 18px;
}

.document-paper {
  display: grid;
  gap: 10px;
  width: min(100%, 210mm);
  min-height: 297mm;
  margin: 0 auto;
  padding: 13mm 14mm;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: #ffffff;
  color: #19202a;
  box-shadow: 0 18px 46px rgba(24, 32, 42, 0.14);
}

.expense-document-paper {
  gap: 9px;
  padding: 10mm 11mm;
}

.expense-document-paper .document-form-head {
  padding-bottom: 8px;
}

.expense-document-paper .document-summary {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  border: 1px solid #d9e0e7;
}

.expense-document-paper .document-summary label {
  padding: 5px 7px;
  border-right: 1px solid #d9e0e7;
  border-bottom: 0;
}

.expense-document-paper .document-summary label:nth-child(n + 5) {
  display: none;
}

.expense-document-paper .document-summary label:nth-child(4) {
  border-right: 0;
}

.expense-document-paper .document-field-grid {
  grid-template-columns: 1.38fr 0.92fr 0.72fr 1.5fr 0.78fr;
  gap: 6px;
}

.expense-document-paper .document-field:first-child,
.expense-document-paper .wide-doc-field {
  grid-column: 1 / -1;
}

.expense-document-paper .document-field:first-child input {
  min-height: 42px;
  font-size: 1.05rem;
  font-weight: 900;
}

.expense-document-paper .document-field:not(:first-child) {
  padding: 0;
  border: 0;
  background: transparent;
}

.expense-document-paper .document-field {
  min-width: 0;
}

.expense-document-paper .document-field input,
.expense-document-paper .document-field textarea,
.expense-document-paper .document-field select {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  font-size: 0.78rem;
}

.expense-document-paper .document-field:not(:first-child) {
  font-size: 0.72rem;
}

.expense-document-paper .document-field:not(:first-child) input {
  min-height: 34px;
  padding: 6px 7px;
}

.expense-document-paper .document-table-scroll {
  overflow-x: hidden;
  border-radius: 0;
}

.expense-document-paper .document-table {
  min-width: 0;
  width: 100%;
  table-layout: fixed;
}

.expense-document-paper .document-table th:nth-child(1),
.expense-document-paper .document-table td:nth-child(1) {
  width: 17%;
}

.expense-document-paper .document-table th:nth-child(2),
.expense-document-paper .document-table td:nth-child(2) {
  width: 31%;
}

.expense-document-paper .document-table th:nth-child(3),
.expense-document-paper .document-table td:nth-child(3),
.expense-document-paper .document-table th:nth-child(4),
.expense-document-paper .document-table td:nth-child(4),
.expense-document-paper .document-table th:nth-child(5),
.expense-document-paper .document-table td:nth-child(5) {
  width: 13%;
}

.expense-document-paper .document-table th:nth-child(6),
.expense-document-paper .document-table td:nth-child(6) {
  width: 13%;
}

.expense-document-paper .document-table th,
.expense-document-paper .document-table td {
  padding: 4px;
  font-size: 0.72rem;
}

.expense-document-paper .document-table input {
  min-height: 30px;
  padding: 4px 5px;
  font-size: 0.76rem;
}

.annual-leave-document-paper {
  gap: var(--annual-gap, 8px);
  width: 210mm;
  min-width: 210mm;
  min-height: 297mm;
  padding: 11mm 12mm;
  overflow: hidden;
}

.annual-leave-document-page {
  --annual-gap: 6px;
  --annual-cell-padding: 8px 9px;
  --annual-base-row-height: 8.5mm;
  --annual-leave-type-height: 16mm;
  --annual-reason-height: 27mm;
  --annual-handover-height: 38mm;
  --annual-guide-height: 24mm;
}

#templateDialog.annual-leave-template-mode .document-form-panel {
  overflow-x: auto;
}

.annual-leave-document-head {
  padding-bottom: 8px;
}

.annual-leave-document-head h3 {
  font-size: 1.55rem;
}

.annual-leave-summary,
.annual-leave-info-table {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border: 1px solid #d9e0e7;
}

.annual-leave-summary label {
  padding: 5px 7px;
  border-right: 1px solid #d9e0e7;
  border-bottom: 0;
}

.annual-leave-summary label:last-child {
  border-right: 0;
}

.annual-leave-summary input {
  min-height: 32px;
  padding: 5px 6px;
  border-radius: 0;
}

.annual-leave-info-table th,
.annual-leave-info-table td {
  width: 25%;
  text-align: left;
}

.annual-leave-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  background: #fff;
}

.annual-leave-table th,
.annual-leave-table td {
  border: 1px solid #cbd5e1;
  padding: var(--annual-cell-padding);
  color: #111827;
  font-size: 0.82rem;
  line-height: 1.35;
  vertical-align: middle;
  word-break: keep-all;
  overflow-wrap: anywhere;
}

.annual-leave-table th {
  width: 18%;
  background: #f8fafc;
  font-weight: 800;
  text-align: center;
}

.annual-leave-table tr {
  height: var(--annual-base-row-height);
}

.annual-leave-table tr:nth-child(3) {
  height: var(--annual-leave-type-height);
}

.annual-leave-table tr:nth-child(4) {
  height: var(--annual-reason-height);
}

.annual-leave-table tr:nth-child(9) {
  height: var(--annual-handover-height);
}

.annual-leave-table input,
.annual-leave-table textarea {
  width: 100%;
  min-width: 0;
  border: 0;
  background: transparent;
  color: #111827;
  font: inherit;
  resize: vertical;
  outline: none;
}

.annual-leave-table textarea[data-doc-field="reason"] {
  min-height: calc(var(--annual-reason-height) - 14px);
}

.annual-leave-table textarea[data-doc-field="handoverContent"] {
  min-height: calc(var(--annual-handover-height) - 14px);
}

.annual-leave-table input:focus,
.annual-leave-table textarea:focus {
  box-shadow: inset 0 -2px 0 #2563eb;
}

.annual-leave-radio-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px 10px;
}

.annual-leave-radio-grid label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
  color: #111827;
  font-weight: 700;
}

.annual-leave-radio-grid input {
  width: auto;
}

.annual-leave-other {
  margin-top: 7px;
}

.annual-leave-period-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.annual-leave-period-grid label {
  display: grid;
  gap: 3px;
}

.annual-leave-period-grid span {
  color: #64748b;
  font-size: 0.72rem;
  font-weight: 800;
}

.annual-leave-choice-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px 10px;
}

.annual-leave-choice-grid span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.annual-leave-guide-box {
  display: grid;
  gap: 4px;
  min-height: var(--annual-guide-height);
  padding: 9px 11px;
  align-content: center;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  background: #eff6ff;
  color: #1e3a8a;
}

.annual-leave-guide-box p {
  margin: 0;
  font-size: 0.78rem;
  line-height: 1.4;
}

.annual-leave-paper-footer {
  margin-top: 5px;
  text-align: center;
}

.annual-leave-paper-footer p {
  margin: 0 0 14px;
  color: #111827;
  font-size: 0.86rem;
  font-weight: 800;
}

.annual-leave-paper-footer strong {
  display: block;
  text-align: right;
  color: #111827;
  font-weight: 900;
}

.expense-document-paper .document-table-section {
  gap: 5px;
  padding-top: 2px;
}

.expense-document-paper .document-table-section .section-head.compact {
  align-items: center;
  margin-bottom: 0;
}

.expense-document-paper .document-table-section .section-head h3 {
  font-size: 0.95rem;
}

.expense-document-paper .document-table-section .section-head button {
  min-height: 30px;
  padding: 5px 10px;
}

.expense-document-paper [data-table-section="vendorRows"] .document-table th:nth-child(1),
.expense-document-paper [data-table-section="vendorRows"] .document-table td:nth-child(1) {
  width: 18%;
}

.expense-document-paper [data-table-section="vendorRows"] .document-table th:nth-child(2),
.expense-document-paper [data-table-section="vendorRows"] .document-table td:nth-child(2) {
  width: 15%;
}

.expense-document-paper [data-table-section="vendorRows"] .document-table th:nth-child(3),
.expense-document-paper [data-table-section="vendorRows"] .document-table td:nth-child(3) {
  width: 12%;
}

.expense-document-paper [data-table-section="vendorRows"] .document-table th:nth-child(4),
.expense-document-paper [data-table-section="vendorRows"] .document-table td:nth-child(4) {
  width: 24%;
}

.expense-document-paper [data-table-section="vendorRows"] .document-table th:nth-child(5),
.expense-document-paper [data-table-section="vendorRows"] .document-table td:nth-child(5) {
  width: 14%;
}

.expense-document-paper [data-table-section="vendorRows"] .document-table th:nth-child(6),
.expense-document-paper [data-table-section="vendorRows"] .document-table td:nth-child(6) {
  width: 17%;
}

.expense-document-paper [data-table-section="expenseRows"] .document-table th:nth-child(1),
.expense-document-paper [data-table-section="expenseRows"] .document-table td:nth-child(1) {
  width: 18%;
}

.expense-document-paper [data-table-section="expenseRows"] .document-table th:nth-child(2),
.expense-document-paper [data-table-section="expenseRows"] .document-table td:nth-child(2) {
  width: 28%;
}

.expense-document-paper [data-table-section="expenseRows"] .document-table th:nth-child(3),
.expense-document-paper [data-table-section="expenseRows"] .document-table td:nth-child(3),
.expense-document-paper [data-table-section="expenseRows"] .document-table th:nth-child(4),
.expense-document-paper [data-table-section="expenseRows"] .document-table td:nth-child(4),
.expense-document-paper [data-table-section="expenseRows"] .document-table th:nth-child(5),
.expense-document-paper [data-table-section="expenseRows"] .document-table td:nth-child(5) {
  width: 13%;
}

.expense-document-paper [data-table-section="expenseRows"] .document-table th:nth-child(6),
.expense-document-paper [data-table-section="expenseRows"] .document-table td:nth-child(6) {
  width: 15%;
}

.expense-document-paper .document-table th:nth-child(1),
.expense-document-paper .document-table td:nth-child(1) {
  width: 18%;
}

.expense-document-paper .document-table th:nth-child(2),
.expense-document-paper .document-table td:nth-child(2) {
  width: 28%;
}

.expense-document-paper .document-table th:nth-child(3),
.expense-document-paper .document-table td:nth-child(3),
.expense-document-paper .document-table th:nth-child(4),
.expense-document-paper .document-table td:nth-child(4),
.expense-document-paper .document-table th:nth-child(5),
.expense-document-paper .document-table td:nth-child(5) {
  width: 13%;
}

.expense-document-paper .document-table th:nth-child(6),
.expense-document-paper .document-table td:nth-child(6) {
  width: 15%;
}

.expense-document-paper .document-table td:nth-child(3) input,
.expense-document-paper .document-table td:nth-child(4) input,
.expense-document-paper .document-table td:nth-child(5) input {
  text-align: right;
  font-weight: 800;
}

.document-brand-line {
  height: 5px;
  border-radius: 2px;
  background: #2563eb;
}

.document-form-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 2px 0 11px;
  border-bottom: 1px solid #e5eaf0;
}

.document-form-head h3 {
  margin-bottom: 4px;
  color: #19202a;
  font-size: 1.36rem;
  letter-spacing: 0;
}

.document-form-head strong {
  display: block;
  color: #667085;
  font-size: 0.84rem;
}

.document-label {
  min-width: 136px;
  padding: 7px 10px;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  background: #eff6ff;
  color: #1746a2;
  font-size: 0.72rem;
  font-weight: 900;
  text-align: center;
}

.document-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border: 1px solid #cbd5e1;
  border-radius: 0;
  overflow: hidden;
}

.document-summary label {
  display: grid;
  gap: 3px;
  min-height: 54px;
  padding: 7px 8px;
  border-right: 1px solid #e5eaf0;
  border-bottom: 1px solid #e5eaf0;
  background: #f9fbfc;
}

.document-summary label:nth-child(4n) {
  border-right: 0;
}

.document-summary label:nth-last-child(-n + 4) {
  border-bottom: 0;
}

.document-summary span,
.document-purpose span,
.attachment-box span {
  color: #667085;
  font-size: 0.72rem;
}

.document-summary input,
.document-summary select {
  min-height: 27px;
  padding: 4px 0;
  border: 0;
  border-bottom: 1px solid transparent;
  border-radius: 0;
  background: transparent;
  color: #19202a;
  font-size: 0.82rem;
  font-weight: 800;
}

.document-summary input:focus,
.document-summary select:focus {
  border-bottom-color: #2563eb;
  outline: 0;
}

.document-summary input::placeholder {
  color: #94a3b8;
  font-weight: 600;
}

.approval-line-editor {
  display: grid;
  gap: 10px;
  padding: 11px;
  border: 1px solid #d7dee8;
  background: #fbfcfe;
}

.expense-document-paper .approval-line-editor {
  gap: 7px;
  padding: 8px;
}

.expense-document-paper .approval-line-editor .section-head {
  margin-bottom: 0;
}

.approval-line-editor .section-head p {
  margin: 3px 0 0;
  color: #667085;
  font-size: 0.76rem;
}

.approval-status-pill {
  align-self: start;
  padding: 5px 9px;
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  background: #eff6ff;
  color: #1746a2;
  font-size: 0.72rem;
  font-weight: 900;
}

.approval-line-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.approval-line-grid label {
  display: grid;
  gap: 5px;
  color: #4b5563;
  font-size: 0.76rem;
  font-weight: 800;
}

.approval-line-grid select {
  min-height: 36px;
  font-size: 0.84rem;
}

.approval-line-grid input {
  min-height: 36px;
  font-size: 0.84rem;
}

.expense-document-paper .approval-line-grid {
  gap: 6px;
}

.expense-document-paper .approval-line-grid label {
  gap: 4px;
  font-size: 0.72rem;
}

.expense-document-paper .approval-line-grid select,
.expense-document-paper .approval-line-grid input {
  min-height: 32px;
  padding: 5px 7px;
  font-size: 0.78rem;
}

.approval-stamp-preview,
.approval-step-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.approval-stamp {
  display: inline-grid;
  place-items: center;
  width: 56px;
  height: 56px;
  margin: 0 auto;
  border: 2px solid #cbd5e1;
  border-radius: 50%;
  color: #94a3b8;
  font-size: 0.72rem;
  font-style: normal;
  font-weight: 900;
  line-height: 1.12;
  text-align: center;
}

.approval-stamp.approved {
  border-color: #b42318;
  color: #b42318;
  background: rgba(180, 35, 24, 0.04);
}

.expense-document-paper .approval-stamp {
  width: 44px;
  height: 44px;
  font-size: 0.62rem;
}

.approval-line-save-note {
  margin: 0;
  justify-self: stretch;
  padding: 10px 12px;
  border: 1px solid #dbe4ee;
  border-radius: 8px;
  background: #f8fafc;
  color: #4b5f78;
  font-size: 0.84rem;
  font-weight: 800;
  line-height: 1.45;
}

.approval-line-save-note strong {
  color: #1746a2;
}

.document-purpose {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border-left: 4px solid #2563eb;
  background: #f9fbfc;
}

.document-purpose em {
  color: #2563eb;
  font-size: 0.72rem;
  font-style: normal;
  font-weight: 900;
}

.document-composition {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid #e5eaf0;
  background: #ffffff;
}

.document-composition > strong {
  color: #19202a;
  font-size: 0.86rem;
}

.document-composition div {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.document-composition span {
  padding: 4px 8px;
  border: 1px solid #d9e0e7;
  border-radius: 999px;
  background: #f1f5f9;
  color: #475569;
  font-size: 0.7rem;
  font-weight: 800;
}

.document-field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.document-field {
  color: #4b5563;
}

.document-field input,
.document-field select,
.document-field textarea,
.document-memo textarea,
.document-table input {
  background: #ffffff;
  color: #19202a;
  font-size: 0.84rem;
}

.wide-doc-field,
.document-memo {
  grid-column: 1 / -1;
}

.document-table-section {
  display: grid;
  gap: 8px;
  padding-top: 4px;
}

.document-table-section .section-head button {
  min-height: 34px;
  padding: 6px 10px;
}

.document-table-scroll {
  overflow: auto;
  border: 1px solid #d9e0e7;
  border-radius: 8px;
}

.document-table {
  width: 100%;
  min-width: 680px;
  border-collapse: collapse;
}

.document-table th,
.document-table td {
  border-bottom: 1px solid #e5eaf0;
  border-right: 1px solid #e5eaf0;
  padding: 6px;
  text-align: left;
}

.document-table th {
  background: #f3f6f9;
  color: #4b5563;
  font-size: 0.72rem;
}

.document-table tfoot th {
  border-right: 1px solid #d9e0e7;
  background: #eaf2ff;
  color: #1746a2;
  font-size: 0.82rem;
  font-weight: 900;
  text-align: right;
}

.document-table tfoot th:first-child {
  text-align: left;
}

.document-table th:last-child,
.document-table td:last-child,
.document-table tfoot th:last-child {
  border-right: 0;
}

.document-table tr:last-child td {
  border-bottom: 0;
}

.document-table input {
  min-height: 31px;
  border: 0;
  padding: 6px;
}

.attachment-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px;
  border: 1px dashed #b8c3cf;
  border-radius: 8px;
  background: #f9fbfc;
}

.attachment-box div {
  display: grid;
  gap: 4px;
}

.attachment-box input {
  max-width: 280px;
}

.photo-preview-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  min-height: 128px;
  padding: 12px;
  border: 1px solid #d9e0e7;
  border-radius: 8px;
  background: #ffffff;
}

.photo-preview-item,
.file-preview-item,
.empty-photo-preview {
  min-height: 110px;
  border: 1px solid #e5eaf0;
  border-radius: 8px;
  background: #f9fbfc;
}

.photo-preview-item {
  display: grid;
  grid-template-rows: minmax(92px, 1fr) auto;
  gap: 6px;
  margin: 0;
  padding: 8px;
}

.photo-preview-item img {
  width: 100%;
  height: 110px;
  border-radius: 6px;
  object-fit: contain;
  background: #eef2f6;
}

.photo-preview-item figcaption,
.file-preview-item {
  overflow: hidden;
  color: #667085;
  font-size: 0.72rem;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-preview-item,
.empty-photo-preview {
  display: grid;
  place-items: center;
  padding: 10px;
  color: #667085;
  font-size: 0.82rem;
  text-align: center;
}

.danger-button {
  border-color: rgba(180, 35, 24, 0.35);
  color: var(--red);
}

.danger-button:hover {
  border-color: var(--red);
  background: rgba(180, 35, 24, 0.08);
}

.approval-alert-chip {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  width: fit-content;
  min-height: 19px;
  margin-top: 3px;
  padding: 1px 5px;
  border-color: rgba(180, 35, 24, 0.24);
  border-radius: 999px;
  background: #fff7ed;
  color: #7f1d1d;
  font-size: 0.64rem;
  font-weight: 900;
}

.approval-icon {
  display: inline-grid;
  place-items: center;
  width: 14px;
  height: 14px;
  min-width: 14px;
  border-radius: 50%;
  background: #b42318;
  color: #fff !important;
  font-size: 0.48rem;
  font-weight: 900;
  line-height: 1;
}

.approval-dialog {
  width: min(880px, calc(100vw - 48px));
  max-height: min(840px, calc(100vh - 48px));
  margin: 24px auto;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.approval-detail {
  display: grid;
  gap: 14px;
  padding: 20px;
}

.approval-detail-head,
.approval-actions {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.approval-actions button.primary {
  border-color: #1746a2;
  background: #1746a2;
  color: #fff;
}

.approval-actions button.payment-action {
  border-color: #2563eb;
  background: #2563eb;
}

.approval-actions button.danger {
  border-color: #dc2626;
  background: #dc2626;
  color: #fff;
}

.approval-actions button.danger.outline {
  background: #fff;
  color: #b42318;
}

.approval-detail-head h3 {
  margin: 4px 0;
  font-size: 1.35rem;
}

.approval-document-preview {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid #d7dee8;
  border-radius: 10px;
  background: #fff;
}

.approval-document-title span {
  color: #667085;
  font-size: 0.78rem;
  font-weight: 900;
}

.approval-document-title h4,
.approval-document-section h4 {
  margin: 4px 0 0;
  color: var(--ink);
  font-size: 1.1rem;
}

.approval-document-preview .print-info-table,
.approval-document-preview .print-data-table,
.approval-document-preview .print-sign-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.approval-document-preview .print-info-table th,
.approval-document-preview .print-info-table td,
.approval-document-preview .print-data-table th,
.approval-document-preview .print-data-table td,
.approval-document-preview .print-sign-table th,
.approval-document-preview .print-sign-table td {
  padding: 8px;
  border: 1px solid #d7dee8;
  color: #111827;
  font-size: 0.82rem;
  line-height: 1.45;
  vertical-align: top;
}

.approval-document-preview .print-info-table th,
.approval-document-preview .print-data-table th,
.approval-document-preview .print-sign-table th {
  background: #f3f6f9;
  color: #4b5563;
  font-weight: 900;
}

.approval-document-preview .print-field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.approval-document-preview .print-field {
  min-height: 52px;
  padding: 9px;
  border: 1px solid #d7dee8;
  border-radius: 7px;
  background: #fff;
}

.approval-document-preview .print-field.wide,
.approval-document-preview .print-note-box {
  grid-column: 1 / -1;
}

.approval-document-preview .print-field span,
.approval-document-preview .print-note-box span {
  display: block;
  margin-bottom: 5px;
  color: #667085;
  font-size: 0.76rem;
  font-weight: 900;
}

.approval-document-preview .print-field strong,
.approval-document-preview .print-note-box strong {
  display: block;
  color: #111827;
  font-size: 0.9rem;
  line-height: 1.45;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.approval-document-footer {
  display: grid;
  gap: 8px;
}

.approval-document-footer h4 {
  margin: 0;
  color: var(--ink);
  font-size: 1.02rem;
}

.approval-document-note-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.approval-document-note-grid > div {
  min-height: 58px;
  padding: 10px;
  border: 1px solid #d7dee8;
  border-radius: 7px;
  background: #fff;
}

.approval-document-note-grid span {
  display: block;
  margin-bottom: 6px;
  color: #667085;
  font-size: 0.76rem;
  font-weight: 900;
}

.approval-document-note-grid strong,
.approval-document-note-grid li {
  color: #111827;
  font-size: 0.9rem;
  line-height: 1.45;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.approval-document-note-grid ul {
  display: grid;
  gap: 4px;
  margin: 0;
  padding-left: 18px;
}

.approval-attachment-list {
  display: grid;
  gap: 6px;
  margin-top: 6px;
}

.approval-attachment-list button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid #d7dee8;
  border-radius: 8px;
  background: #f8fafc;
  color: #111827;
  text-align: left;
  cursor: pointer;
}

.approval-attachment-list button:hover {
  border-color: #94a3b8;
  background: #fff;
}

.approval-attachment-list span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.86rem;
  font-weight: 900;
}

.approval-attachment-list small {
  flex: 0 0 auto;
  color: #667085;
  font-size: 0.74rem;
  font-weight: 800;
}

.approval-attachment-dialog {
  width: min(920px, calc(100vw - 56px));
}

.approval-attachment-viewer {
  display: grid;
  gap: 14px;
  padding: 20px;
}

.approval-attachment-stage {
  display: grid;
  place-items: center;
  min-height: 360px;
  max-height: calc(100vh - 210px);
  overflow: auto;
  padding: 14px;
  border: 1px solid #d7dee8;
  border-radius: 10px;
  background: #f8fafc;
}

.approval-attachment-stage img {
  display: block;
  max-width: 100%;
  max-height: calc(100vh - 250px);
  object-fit: contain;
  border-radius: 8px;
  background: #fff;
}

.approval-attachment-file-card {
  display: grid;
  gap: 10px;
  width: min(520px, 100%);
  padding: 18px;
  border: 1px solid #d7dee8;
  border-radius: 10px;
  background: #fff;
}

.approval-attachment-file-card strong {
  color: var(--ink);
  font-size: 1rem;
}

.approval-attachment-file-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.approval-attachment-file-card a {
  justify-self: start;
  padding: 10px 14px;
  border: 1px solid #1746a2;
  border-radius: 8px;
  color: #1746a2;
  font-weight: 900;
  text-decoration: none;
}

.document-attachment-confirm-dialog {
  width: min(960px, calc(100vw - 56px));
}

.document-attachment-confirm-stage {
  align-items: start;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  justify-items: stretch;
}

.document-attachment-confirm-item {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 12px;
  border: 1px solid #d7dee8;
  border-radius: 10px;
  background: #fff;
}

.document-attachment-confirm-item img {
  width: 100%;
  max-height: 420px;
  object-fit: contain;
  border-radius: 8px;
  background: #f8fafc;
}

.document-attachment-confirm-item figcaption,
.document-attachment-confirm-pdf strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 0.92rem;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.document-attachment-confirm-pdf {
  display: grid;
  gap: 10px;
  min-height: 420px;
  padding: 12px;
  border: 1px solid #d7dee8;
  border-radius: 10px;
  background: #fff;
}

.document-attachment-confirm-pdf iframe {
  width: 100%;
  height: 380px;
  border: 1px solid #d7dee8;
  border-radius: 8px;
  background: #f8fafc;
}

.document-attachment-confirm-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.approval-current-box,
.approval-payment-info,
.approval-memo {
  display: grid;
  gap: 4px;
  padding: 11px;
  border: 1px solid #d7dee8;
  border-radius: 8px;
  background: #f8fafc;
}

.approval-current-box span,
.approval-payment-info span,
.approval-memo span {
  color: #667085;
  font-size: 0.8rem;
  font-weight: 800;
}

.approval-payment-info {
  border-color: #bfdbfe;
  background: #eff6ff;
}

.approval-payment-info strong {
  color: #1746a2;
}

.approval-step-card {
  display: grid;
  gap: 5px;
  min-height: 132px;
  padding: 10px;
  border: 1px solid #d7dee8;
  border-radius: 8px;
  text-align: center;
}

.approval-step-card > span,
.approval-step-card em {
  color: #667085;
  font-size: 0.76rem;
  font-style: normal;
  font-weight: 800;
}

.approval-step-card.approved {
  border-color: rgba(180, 35, 24, 0.34);
  background: rgba(180, 35, 24, 0.03);
}

.approval-step-card.rejected {
  border-color: rgba(220, 38, 38, 0.34);
  background: rgba(254, 242, 242, 0.8);
}

.approval-stamp.rejected {
  border-color: #dc2626;
  color: #dc2626;
  background: rgba(220, 38, 38, 0.04);
}

.approval-detail-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.approval-detail-line {
  display: grid;
  gap: 4px;
  min-height: 48px;
  padding: 9px;
  border: 1px solid #d7dee8;
  border-radius: 8px;
}

.approval-detail-line span {
  color: #667085;
  font-size: 0.76rem;
  font-weight: 800;
}

@media (max-width: 768px) {
  .approval-document-preview {
    padding: 12px;
  }

  .approval-document-preview .print-field-grid {
    grid-template-columns: 1fr;
  }

  .approval-document-note-grid {
    grid-template-columns: 1fr;
  }

  .approval-document-preview .print-info-table th,
  .approval-document-preview .print-info-table td {
    display: block;
    width: 100%;
  }
}

.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 10;
  max-width: min(360px, calc(100vw - 32px));
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--ink);
  color: var(--panel);
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition:
    opacity 180ms ease,
    transform 180ms ease;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.global-loading {
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(15, 23, 42, 0.32);
  backdrop-filter: blur(3px);
}

.workspace-loading {
  position: absolute;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(15, 23, 42, 0.32);
  backdrop-filter: blur(3px);
}

.workspace-loading[hidden],
.global-loading[hidden] {
  display: none;
}

.workspace-loading-card,
.global-loading-card {
  display: grid;
  justify-items: center;
  gap: 10px;
  width: min(360px, 100%);
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 24px 80px rgba(15, 23, 42, 0.28);
  text-align: center;
}

.workspace-loading-card strong,
.global-loading-card strong {
  color: var(--ink);
  font-size: 1rem;
}

.workspace-loading-card span,
.global-loading-card span {
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.5;
}

.loading-spinner {
  width: 34px;
  height: 34px;
  border: 4px solid #e5eaf0;
  border-top-color: #4b5563;
  border-radius: 999px;
  animation: loading-spin 800ms linear infinite;
}

@keyframes loading-spin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 1500px) {
  .member-card-hit {
    grid-template-columns: minmax(250px, 0.8fr) 252px minmax(360px, 1fr);
  }

  .member-card-hit > .weekly-tabs-card {
    grid-column: 1 / -1;
  }
}

@media (max-width: 980px) {
  .member-card-hit {
    grid-template-columns: minmax(210px, 0.9fr) minmax(250px, 1.1fr);
  }

  .app-shell {
    grid-template-columns: 1fr;
  }

  .dashboard-panel {
    position: static;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .detail-grid {
    grid-template-columns: 1fr;
  }

  .member-workspace {
    grid-template-columns: 1fr;
  }

  .backup-layout {
    grid-template-columns: 1fr;
  }

  .member-workspace-profile {
    max-height: 230px;
  }

  .workspace-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .consult-box,
  .consult-box-main {
    align-items: stretch;
    flex-direction: column;
  }

  .consult-actions {
    width: 100%;
  }

  .consult-actions button {
    flex: 1;
  }

  .consult-inbox-layout {
    grid-template-columns: 1fr;
  }

  .consult-list {
    min-height: auto;
    max-height: 240px;
  }

  .consult-info-grid,
  .consult-form-grid,
  .consult-admin-builder,
  .consult-admin-items,
  .consult-admin-row,
  .consumer-basic-grid {
    grid-template-columns: 1fr;
  }

  .consult-attachment-preview {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .consult-consumer-readonly {
    padding: 18px;
    border-radius: 12px;
  }

  .consult-consumer-row.two,
  .consult-consumer-options,
  .consult-consumer-readonly .consult-attachment-preview {
    grid-template-columns: 1fr;
  }

  .consult-dialog-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .consult-toolbar-admin {
    margin-left: 0;
  }
}

@media (max-width: 720px) {
  .member-card-hit {
    grid-template-columns: 1fr;
  }

  .project-task-grid {
    grid-template-columns: 1fr;
  }

  .project-strip-head,
  .project-detail-head {
    align-items: stretch;
    flex-direction: column;
  }

  .member-card-hit > .weekly-tabs-card {
    grid-column: auto;
  }

  .weekly-tabs-row {
    grid-template-columns: 1fr;
  }

  .dashboard-panel,
  .workspace {
    padding: 16px;
  }

  .workspace-header,
  .board-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .header-tools {
    width: 100%;
    min-width: 0;
    justify-content: stretch;
  }

  .workspace-title-block h2 {
    font-size: 1.6rem;
  }

  .search-box {
    width: 100%;
    min-width: 0;
    flex: 1;
  }

  .member-grid {
    grid-template-columns: 1fr;
  }

  .workspace-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .consult-counts,
  .consult-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .form-grid,
  .inline-form,
  .template-layout,
  .template-tools,
  .template-task-tools,
  .document-field-grid {
    grid-template-columns: 1fr;
  }

  .app-tabs {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    border-radius: 8px;
  }

  .app-tabs button {
    border-radius: 8px;
  }

  .week-plan-options {
    grid-template-columns: 1fr;
  }

  .member-calendar-head {
    align-items: stretch;
    flex-direction: column;
  }

  .calendar-month-tools {
    justify-content: stretch;
  }

  .calendar-month-tools select {
    flex: 1 1 96px;
  }

  .calendar-month-tools input[type="text"] {
    flex: 1;
    width: auto;
    min-width: 128px;
  }

  .calendar-direct-month {
    flex: 1 1 100%;
  }

  .calendar-grid {
    overflow-x: auto;
    grid-template-columns: repeat(7, minmax(108px, 1fr));
  }

  .calendar-weekdays {
    grid-template-columns: repeat(7, minmax(108px, 1fr));
    overflow-x: auto;
  }

  .document-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .document-summary label:nth-child(4n) {
    border-right: 1px solid #e5eaf0;
  }

  .document-summary label:nth-child(2n) {
    border-right: 0;
  }

  .document-summary label:nth-last-child(-n + 4) {
    border-bottom: 1px solid #e5eaf0;
  }

  .document-summary label:nth-last-child(-n + 2) {
    border-bottom: 0;
  }

  .document-form-head,
  .attachment-box {
    align-items: stretch;
    flex-direction: column;
  }

  .wide-field {
    grid-column: auto;
  }

  .dialog-actions {
    flex-wrap: wrap;
  }

  .dialog-actions button {
    flex: 1 1 140px;
  }
}

@media (max-width: 520px) {
  .metric-grid,
  .mini-stats,
  .detail-actions {
    grid-template-columns: 1fr;
  }

  .member-add-fab {
    right: 16px;
    bottom: 16px;
  }

  .segment-control {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .header-tools {
    flex-direction: column;
  }

  .header-tools button {
    width: 100%;
  }

  .task-row,
  .report-row {
    align-items: stretch;
    flex-direction: column;
  }

  .row-actions {
    justify-content: flex-end;
  }
}

/* Final override: keep the admin permission dialog wide and horizontal. */
dialog.app-dialog.permission-manager-dialog {
  width: min(1280px, calc(100vw - 32px));
  max-width: none;
  height: auto;
  max-height: calc(100vh - 36px);
  padding: 0;
  overflow: hidden;
}

dialog.permission-manager-dialog .permission-dialog-grid {
  display: grid;
  grid-template-columns: minmax(260px, 0.34fr) minmax(620px, 1fr);
  gap: 18px;
  max-height: calc(100vh - 136px);
  overflow-y: auto;
  overflow-x: hidden;
  padding: 18px 22px 22px;
}

dialog.permission-manager-dialog .access-code-manager {
  min-width: 0;
}

dialog.permission-manager-dialog .access-code-form-grid {
  grid-template-columns: minmax(180px, 1fr) minmax(140px, 0.8fr) minmax(300px, 1.3fr);
}

dialog.permission-manager-dialog .permission-checks {
  display: grid;
  grid-template-columns: repeat(3, minmax(150px, 1fr));
  gap: 8px;
}

dialog.permission-manager-dialog .permission-checks label {
  justify-content: flex-start;
  min-width: 0;
}

dialog.permission-manager-dialog .access-code-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
}

dialog.permission-manager-dialog .access-code-actions button {
  flex: 0 0 auto;
}

dialog.permission-manager-dialog .access-code-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (max-width: 1050px) {
  dialog.permission-manager-dialog .permission-dialog-grid {
    grid-template-columns: 1fr;
  }

  dialog.permission-manager-dialog .permission-dialog-summary {
    grid-template-columns: minmax(160px, 0.35fr) minmax(0, 1fr);
  }

  dialog.permission-manager-dialog .permission-dialog-summary p,
  dialog.permission-manager-dialog .permission-dialog-tips {
    grid-column: 1 / -1;
  }
}

@media (max-width: 780px) {
  dialog.app-dialog.permission-manager-dialog {
    width: calc(100vw - 18px);
  }

  dialog.permission-manager-dialog .access-code-form-grid,
  dialog.permission-manager-dialog .permission-checks,
  dialog.permission-manager-dialog .access-code-list {
    grid-template-columns: 1fr;
  }
}

/* Mobile personal workspace: keep desktop intact, make phone task/report work usable. */
@media (max-width: 768px) {
  html {
    font-size: 16px;
  }

  html:has(dialog[open]),
  body:has(dialog[open]) {
    overflow: hidden;
  }

  body {
    overflow-x: hidden;
  }

  button,
  input,
  select,
  textarea {
    font-size: 16px;
  }

  dialog.app-dialog,
  #memberWorkspaceDialog,
  #taskDialog,
  #reportDialog {
    position: fixed !important;
    inset: 0 !important;
    width: 100vw !important;
    height: 100dvh !important;
    max-width: 100vw !important;
    max-height: 100dvh !important;
    margin: 0 !important;
    padding: 0 !important;
    border-width: 0 !important;
    border-radius: 0 !important;
    overflow: hidden !important;
    background: var(--panel);
    box-sizing: border-box;
  }

  dialog.app-dialog::backdrop {
    background: rgba(15, 23, 42, 0.78);
  }

  dialog.app-dialog[open],
  #memberWorkspaceDialog[open],
  #taskDialog[open],
  #reportDialog[open] {
    display: flex !important;
    flex-direction: column;
  }

  #taskDialog form,
  #reportDialog form,
  dialog.app-dialog > form {
    width: 100%;
    max-width: 100%;
    display: flex;
    flex: 1;
    min-height: 0;
    min-width: 0;
    flex-direction: column;
    overflow: hidden;
    box-sizing: border-box;
  }

  dialog.app-dialog *,
  #memberWorkspaceDialog *,
  #taskDialog *,
  #reportDialog * {
    max-width: 100%;
    box-sizing: border-box;
  }

  #templateDialog {
    position: fixed !important;
    inset: 0 !important;
    width: 100vw !important;
    height: 100dvh !important;
    max-width: none !important;
    max-height: none !important;
    margin: 0 !important;
    border-radius: 0 !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
  }

  #templateDialog[open] {
    display: flex !important;
    flex-direction: column;
  }

  #templateDialog .template-layout {
    display: flex;
    flex: 0 0 auto;
    flex-direction: column;
    width: 100%;
    max-width: 100%;
    height: auto;
    min-height: auto;
    margin-top: 10px;
    overflow: visible;
  }

  #templateDialog .template-list {
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
    width: 100%;
    min-height: 64px;
    height: auto;
    max-height: none;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 0 0 6px;
    -webkit-overflow-scrolling: touch;
  }

  #templateDialog .template-item {
    display: flex;
    flex: 0 0 auto;
    min-width: 160px;
    visibility: visible;
    opacity: 1;
  }

  #templateDialog .document-form-panel {
    display: block;
    width: 100%;
    height: clamp(300px, 46dvh, 420px);
    min-height: 300px;
    overflow-x: auto;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  #templateDialog .document-paper {
    width: 210mm;
    min-width: 210mm;
    max-width: none;
    flex-shrink: 0;
  }

  dialog.app-dialog .dialog-head,
  #memberWorkspaceDialog .dialog-head,
  #taskDialog .dialog-head,
  #reportDialog .dialog-head {
    position: sticky;
    top: 0;
    z-index: 20;
    flex: 0 0 auto;
    padding: calc(12px + env(safe-area-inset-top)) 16px 12px;
    background: var(--panel);
    border-bottom: 1px solid var(--line);
  }

  dialog.app-dialog .dialog-head h2 {
    font-size: 1.25rem;
    line-height: 1.25;
  }

  dialog.app-dialog .dialog-head .icon-button {
    width: 44px;
    min-width: 44px;
    height: 44px;
    font-size: 22px;
  }

  .member-workspace-body {
    width: 100%;
    max-width: 100%;
    flex: 1;
    min-height: 0;
    min-width: 0;
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }

  .member-workspace {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    min-height: 100%;
    min-width: 0;
    padding: 10px;
    overflow-x: hidden;
  }

  .member-workspace-profile {
    position: static;
    max-height: none;
    margin-bottom: 12px;
    padding: 14px;
    overflow: visible;
  }

  .member-workspace-profile > .member-profile {
    grid-template-columns: auto minmax(0, 1fr);
    justify-items: start;
    text-align: left;
  }

  .member-workspace-profile > .member-profile .avatar {
    width: 88px;
    min-width: 88px;
    height: 88px;
  }

  .member-workspace-profile > .member-profile .member-title {
    justify-items: start;
  }

  .member-workspace-profile > .member-profile .member-title strong {
    font-size: 1.2rem;
  }

  .member-workspace-profile > .member-profile .member-title > span {
    font-size: 0.92rem;
    line-height: 1.35;
  }

  .member-workspace-main {
    display: flex;
    width: 100%;
    max-width: 100%;
    min-height: 0;
    min-width: 0;
    flex-direction: column;
    border-radius: 10px;
    overflow-x: hidden;
    padding-bottom: 92px;
  }

  .mobile-quick-actions {
    position: sticky;
    bottom: 8px;
    z-index: 8;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    padding: 8px;
    margin: 0 0 8px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.16);
    backdrop-filter: blur(10px);
  }

  .mobile-quick-actions button {
    min-height: 50px;
    padding: 12px 10px;
    border-radius: 8px;
    background: var(--ink);
    color: #ffffff;
    font-size: 16px;
    font-weight: 900;
  }

  .mobile-quick-actions button + button {
    background: #2563eb;
  }

  .member-workspace-main .app-tabs {
    position: sticky;
    top: 0;
    z-index: 10;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
    max-width: 100%;
    min-width: 0;
    gap: 6px;
    padding: 8px;
    background: var(--panel);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.08);
  }

  .member-workspace-main .app-tabs button {
    width: 100%;
    min-width: 0;
    min-height: 48px;
    padding: 10px 8px;
    font-size: 1rem;
    white-space: normal;
  }

  .inline-section,
  .weekly-planner-section {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow-x: hidden;
    padding: 12px;
  }

  .expanded-card-content {
    min-height: 0;
    min-width: 0;
    overflow-x: hidden;
  }

  .selected-date-guide {
    align-items: flex-start;
    flex-direction: column;
    padding: 12px;
  }

  .selected-date-guide span {
    font-size: 0.9rem;
  }

  .selected-date-guide strong {
    width: 100%;
    font-size: 0.92rem;
    white-space: normal;
  }

  .inline-head-actions {
    justify-content: stretch;
  }

  .inline-head-actions button,
  .inline-actions button,
  .dialog-actions button {
    flex: 1 1 140px;
    min-height: 48px;
    padding: 12px 14px;
    font-size: 1rem;
  }

  .selected-task-list,
  .report-history-list {
    max-height: none;
    overflow: visible;
    padding-right: 0;
  }

  .inline-task-list,
  .report-history-list {
    gap: 10px;
  }

  .inline-task-card,
  .report-history-card {
    grid-template-columns: minmax(0, 1fr);
    align-items: stretch;
    min-height: 76px;
    padding: 14px;
    gap: 10px;
  }

  .inline-task-card strong,
  .report-history-card strong {
    font-size: 1.03rem;
    line-height: 1.35;
    white-space: normal;
  }

  .inline-task-card small,
  .report-history-card small {
    font-size: 0.9rem;
    line-height: 1.4;
    white-space: normal;
  }

  .inline-card-actions,
  .report-history-actions {
    justify-content: stretch;
  }

  .inline-card-actions button,
  .report-history-actions button,
  .report-history-actions [data-action="delete-saved-report"] {
    flex: 1 1 110px;
    min-height: 44px;
    padding: 10px 12px;
    font-size: 0.94rem;
  }

  .inline-form,
  .form-grid {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    grid-template-columns: 1fr;
    gap: 14px;
    margin-top: 0;
    overflow-x: hidden;
  }

  .postit-compose {
    grid-template-columns: 1fr;
  }

  .postit-board {
    display: grid;
    gap: 12px;
    min-height: auto;
    padding: 12px;
    overflow: visible;
  }

  .postit-card {
    position: relative;
    left: auto;
    top: auto;
    width: 100%;
    min-height: 150px;
    transform: none;
  }

  #taskDialog .form-grid,
  #reportDialog .form-grid {
    width: 100%;
    max-width: 100%;
    flex: 1;
    min-height: 0;
    min-width: 0;
    padding: 16px;
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }

  .inline-form label,
  .form-grid label {
    min-width: 0;
    font-size: 0.95rem;
  }

  .inline-form input,
  .inline-form select,
  .inline-form textarea,
  .form-grid input,
  .form-grid select,
  .form-grid textarea {
    min-height: 48px;
    padding: 12px;
    font-size: 16px;
  }

  .inline-form textarea,
  .form-grid textarea {
    min-height: 170px;
    line-height: 1.5;
  }

  #taskDialog .dialog-actions,
  #reportDialog .dialog-actions,
  dialog.app-dialog > form > .dialog-actions {
    position: sticky;
    bottom: 0;
    z-index: 20;
    flex: 0 0 auto;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
    max-width: 100%;
    min-width: 0;
    gap: 10px;
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
    border-top: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 -10px 24px rgba(15, 23, 42, 0.12);
  }

  #taskDialog .dialog-actions button,
  #reportDialog .dialog-actions button,
  dialog.app-dialog > form > .dialog-actions button {
    width: 100%;
    min-width: 0;
    min-height: 50px;
    padding: 12px;
    font-size: 16px;
    font-weight: 900;
  }

  .inline-actions {
    position: sticky;
    bottom: 0;
    z-index: 12;
    padding: 10px 0 calc(10px + env(safe-area-inset-bottom));
    background: linear-gradient(180deg, rgba(255, 255, 255, 0), var(--panel) 24%);
  }

  .report-photo-upload,
  .attachment-box {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    align-items: stretch;
    flex-direction: column;
    gap: 12px;
    padding: 14px;
  }

  .report-photo-upload strong,
  .attachment-box strong {
    font-size: 1rem;
  }

  .report-photo-upload span,
  .attachment-box span {
    font-size: 0.9rem;
  }

  .report-photo-upload input,
  .attachment-box input {
    width: 100%;
    max-width: none;
    min-height: 52px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
  }

  .report-photo-grid,
  .photo-preview-grid {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    min-height: 170px;
    padding: 12px;
  }

  .document-attachment-confirm-dialog {
    width: calc(100vw - 20px);
    max-width: calc(100vw - 20px);
  }

  .document-attachment-confirm-stage {
    grid-template-columns: 1fr;
    min-height: 55vh;
    max-height: calc(100dvh - 230px);
    padding: 10px;
  }

  .document-attachment-confirm-item img {
    max-height: 55vh;
  }

  .document-attachment-confirm-actions {
    position: sticky;
    bottom: 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 10px 0 calc(10px + env(safe-area-inset-bottom));
    background: #fff;
  }

  .document-attachment-confirm-actions button {
    min-height: 50px;
    font-size: 16px;
    font-weight: 900;
  }

  .safe-report-action-bar {
    bottom: env(safe-area-inset-bottom) !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 10px !important;
    padding: 10px !important;
    border-radius: 10px 10px 0 0 !important;
    box-shadow: 0 -12px 28px rgba(15, 23, 42, 0.16) !important;
  }

  .safe-report-action-bar button {
    width: 100%;
    min-height: 50px;
    font-size: 16px;
    font-weight: 900;
  }

  .report-photo-item,
  .photo-preview-item {
    grid-template-rows: 138px auto;
    padding: 8px;
  }

  .report-photo-open,
  .report-photo-item > img,
  .photo-preview-item img {
    height: 138px;
    min-height: 138px;
  }

  .report-photo-item figcaption,
  .photo-preview-item figcaption,
  .file-preview-item {
    font-size: 0.82rem;
  }

  .report-photo-item figcaption button {
    min-height: 40px;
    padding: 8px 10px;
    font-size: 0.86rem;
  }

  .member-calendar {
    padding: 10px;
  }

  .member-calendar-head {
    gap: 10px;
  }

  .member-calendar-head strong {
    font-size: 1.12rem;
  }

  .member-calendar-head span {
    font-size: 0.9rem;
  }

  .calendar-month-tools button,
  .calendar-month-tools select,
  .calendar-month-tools input[type="text"] {
    min-height: 44px;
    font-size: 16px;
  }

  .calendar-grid,
  .calendar-weekdays {
    grid-template-columns: repeat(7, minmax(92px, 1fr));
  }

  .calendar-cell {
    min-height: 112px;
    padding: 7px;
  }

  .calendar-date {
    font-size: 0.96rem;
  }

.calendar-items em {
    min-height: 18px;
    font-size: 0.72rem;
    padding: 2px 5px;
  }
}

.approval-list-dialog,
.approval-archive-dialog {
  width: min(980px, calc(100vw - 72px));
  max-height: calc(100vh - 72px);
  margin: 36px auto;
  overflow: hidden;
  box-sizing: border-box;
}

.approval-archive-dialog {
  width: min(98vw, 1500px);
  height: min(95vh, 980px);
  max-height: 94vh;
  margin: auto;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.approval-archive-detail {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  height: 100%;
  min-height: 0;
  padding: 22px;
  box-sizing: border-box;
  overflow: hidden;
}

.approval-document-archive-detail {
  grid-template-rows: auto auto auto minmax(0, 1fr);
}

.approval-archive-detail .approval-detail-head {
  align-items: start;
  margin: 0 0 16px;
  padding: 0 0 16px;
  border-bottom: 1px solid var(--line);
}

.approval-archive-detail .approval-archive-tools,
.approval-archive-detail .meeting-record-tools {
  margin-bottom: 18px;
}

.approval-archive-detail .member-document-list {
  min-height: 0;
  align-content: start;
  grid-auto-rows: max-content;
  overflow-y: auto;
  margin-top: 10px;
  padding: 4px 4px 18px;
}

.approval-request-archive-detail {
  grid-template-rows: auto minmax(0, 1fr);
}

.approval-request-archive-detail .approval-request-list {
  min-height: 0;
  align-content: start;
  grid-auto-rows: max-content;
  overflow-y: auto;
  padding: 4px 4px 18px;
}

.meeting-archive-detail .meeting-record-card {
  min-height: 0;
  padding: 10px 12px;
}

.meeting-archive-detail .meeting-record-card .member-document-main p {
  margin-top: 4px;
}

.meeting-attachment-note {
  margin: 10px 0 0;
  padding: 10px 12px;
  border: 1px solid #dbe4f0;
  border-radius: 8px;
  background: #f8fafc;
  color: #64748b;
  font-size: 13px;
}

.approval-request-list,
.member-document-list {
  display: grid;
  gap: 10px;
}

.approval-request-card,
.member-document-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.member-document-card.draft-document-card {
  border-color: #bfdbfe;
  background: #f8fbff;
}

.approval-request-card span,
.member-document-main span {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.approval-request-card strong,
.member-document-main strong {
  display: block;
  margin-top: 4px;
  color: var(--ink);
  font-size: 0.98rem;
}

.approval-request-card p,
.member-document-main p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.45;
}

.approval-request-meta,
.member-document-state {
  min-width: 116px;
  text-align: right;
}

.approval-request-meta em,
.member-document-state em {
  display: block;
  color: #b42318;
  font-style: normal;
  font-weight: 900;
}

.approval-status-badges {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
  flex-wrap: wrap;
}

.approval-status-badges em {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid #fecaca;
  background: #fff1f2;
  color: #b42318;
  font-size: 0.78rem;
  line-height: 1;
}

.approval-status-badges .payment-status.paid {
  border-color: #bfdbfe;
  background: #eff6ff;
  color: #1746a2;
}

.member-document-state.draft em {
  color: #1746a2;
}

.approval-request-meta small,
.member-document-state small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
}

.member-document-box {
  display: grid;
  gap: 12px;
}

.member-document-box .section-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.member-document-box .section-head h3 {
  margin: 0;
}

.member-document-box .section-head p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.84rem;
}

.document-box-tabs {
  display: inline-flex;
  gap: 6px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.document-box-tabs.wide {
  width: fit-content;
  margin-bottom: 12px;
}

.document-box-tabs.payment-filter-tabs {
  width: fit-content;
  margin: -4px 0 12px;
}

.document-box-tabs button {
  min-height: 34px;
  padding: 0 14px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  font-weight: 900;
}

.document-box-tabs button.active {
  background: var(--ink);
  color: #fff;
}

.approval-archive-main-tabs button {
  box-sizing: border-box;
  border: 1px solid transparent;
}

.approval-archive-main-tabs button[data-archive-tab="approved"].active {
  background: #fff1f2;
  color: #b42318;
  border: 1px solid #fecaca;
}

.approval-archive-main-tabs button[data-archive-tab="paid"].active {
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
}

.meeting-record-tools {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.meeting-record-tools input {
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: var(--ink);
  padding: 0 11px;
  font: inherit;
  font-size: 0.86rem;
}

.meeting-record-tools span {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 900;
  white-space: nowrap;
}

.approval-archive-tools {
  display: block;
  height: auto;
  min-height: 0;
  margin: 0 0 12px;
  padding: 14px 12px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  box-sizing: border-box;
  overflow: visible;
}

.approval-archive-filter-row {
  display: grid;
  grid-template-columns:
    minmax(220px, 1.5fr)
    minmax(145px, 0.9fr)
    minmax(145px, 0.9fr)
    minmax(150px, 0.9fr)
    minmax(150px, 0.9fr)
    minmax(170px, 1fr)
    minmax(150px, 0.9fr)
    auto;
  gap: 8px;
  align-items: end;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.approval-archive-tools label {
  display: grid;
  gap: 5px;
  min-width: 0;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 900;
}

.approval-archive-tools input,
.approval-archive-tools select {
  width: 100%;
  min-width: 0;
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 0.86rem;
  font-weight: 800;
}

.approval-archive-tools button {
  min-height: 36px;
  white-space: nowrap;
}

.approval-archive-tools p {
  margin: 9px 0 0;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
  line-height: 1.3;
}

@media (min-width: 800px) and (max-width: 1099px) {
  .approval-archive-filter-row {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.member-document-summary {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.member-document-summary span {
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 900;
}

.member-document-actions {
  display: flex;
  gap: 6px;
  justify-content: flex-end;
}

.member-document-actions button {
  min-height: 34px;
  white-space: nowrap;
}

.member-document-actions button.primary {
  border-color: #1746a2;
  background: #1746a2;
  color: #fff;
}

@media (max-width: 768px) {
  .project-management-summary,
  .project-management-tools,
  .project-management-card,
  .project-task-summary,
  .project-task-toolbar,
  .project-task-filter-panel,
  .project-management-task-card,
  .project-import-controls,
  .project-overview-grid,
  .project-form-grid,
  .project-member-picker > div,
  .project-member-list-head,
  .project-member-list article {
    grid-template-columns: 1fr;
  }

  .project-member-list-head {
    display: none;
  }

  .project-member-list article {
    row-gap: 6px;
  }

  .project-member-list article strong,
  .project-member-list article span,
  .project-member-list article small {
    white-space: normal;
  }

  .project-task-filter-panel select,
  .project-task-filter-panel input,
  .project-task-filter-panel button,
  .project-task-aux-actions button {
    width: 100%;
  }

  .project-management-head-actions,
  .project-management-detail-head {
    align-items: stretch;
    flex-direction: column;
  }

  .project-management-detail-title {
    flex-direction: column;
  }

  .project-member-pick {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .project-member-pick input[type="text"] {
    grid-column: 1 / -1;
  }

  .approval-request-card,
  .member-document-card {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .approval-request-meta,
  .member-document-state {
    text-align: left;
  }

  .member-document-box .section-head {
    align-items: stretch;
    flex-direction: column;
  }

  .member-document-actions {
    justify-content: stretch;
  }

  .member-document-actions button {
    flex: 1;
    min-height: 44px;
  }

  .approval-archive-tools {
    grid-template-columns: 1fr;
  }

  .approval-archive-filter-row {
    grid-template-columns: 1fr;
  }

  .meeting-record-tools {
    grid-template-columns: 1fr;
  }

  .approval-archive-tools input,
  .approval-archive-tools select,
  .approval-archive-tools button {
    min-height: 44px;
    font-size: 16px;
  }

  .approval-archive-dialog {
    width: min(98vw, 1500px);
    height: min(95dvh, 980px);
    max-height: 94dvh;
    border-radius: 8px;
  }

  .approval-archive-detail {
    padding: 16px;
  }

  .approval-archive-detail .approval-detail-head {
    margin-bottom: 12px;
    padding-bottom: 12px;
  }
}

@media (max-width: 430px) {
  .member-workspace {
    padding: 8px;
  }

  .member-workspace-profile > .member-profile .avatar {
    width: 76px;
    min-width: 76px;
    height: 76px;
  }

  .member-workspace-main .app-tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .report-photo-grid,
  .photo-preview-grid {
    grid-template-columns: 1fr;
  }

  .report-photo-item,
  .photo-preview-item {
    grid-template-rows: 180px auto;
  }

  .report-photo-open,
  .report-photo-item > img,
  .photo-preview-item img {
    height: 180px;
    min-height: 180px;
  }
}

/* Consumer consultation editor polish */
.consult-admin-form {
  width: min(100%, 760px);
  margin: 0 auto;
  padding: clamp(22px, 4vw, 42px);
  border: 1px solid #dedbd6;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 16px 44px rgba(15, 23, 42, 0.06);
}

.consult-admin-form > .consult-form-head {
  display: grid;
  gap: 6px;
  padding-bottom: 18px;
  border-bottom: 1px solid #e4e1db;
}

.consult-admin-form > .consult-form-head h3 {
  margin: 0;
  color: #111827;
  font-size: clamp(1.45rem, 2.4vw, 2.1rem);
  letter-spacing: 0;
}

.consult-admin-form > .consult-form-head p {
  color: #6b7280;
  line-height: 1.65;
}

.consult-admin-tabs {
  margin-top: 4px;
  padding: 5px;
  border-color: #dedbd6;
  background: #f7f6f4;
}

.consult-admin-tabs button {
  min-height: 44px;
  color: #6b7280;
  font-size: 0.95rem;
}

.consult-admin-tabs button.active {
  background: #1f2937;
  color: #fff;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.14);
}

.consult-admin-tab-panel {
  gap: 16px;
}

.consult-admin-notice,
.consult-admin-privacy {
  margin-top: 16px;
  padding: 18px;
  border-color: #e4e1db;
  border-radius: 16px;
  background: #f8f7f5;
}

.consult-admin-notice-preview {
  padding: 0;
  border: 0;
  background: transparent;
}

.consult-admin-form .consumer-notice-card {
  max-width: 100%;
  border-color: #dedbd6;
  background: #fff;
  box-shadow: none;
}

.consult-admin-form {
  border-color: #e4e1db;
  background:
    linear-gradient(#ffffff, #ffffff) padding-box,
    linear-gradient(180deg, rgba(148, 113, 83, 0.12), rgba(148, 163, 184, 0.08)) border-box;
}

.consult-admin-form .consumer-notice-title h2,
.consult-admin-form .consult-admin-legend-input {
  letter-spacing: 0;
}

.consult-admin-items,
.consult-admin-form .consumer-choice-section {
  gap: 14px;
}

.consult-rich-toolbar {
  padding: 10px 12px;
  border-color: #e4e1db;
  border-radius: 14px;
  background: #f7f6f4;
}

.consult-rich-toolbar button,
.consult-rich-toolbar label,
.consult-rich-palette {
  border-color: #dedbd6;
}

.consult-admin-notice-title-edit input,
.consult-admin-form input,
.consult-admin-form select,
.consult-admin-form textarea {
  border-color: #dedbd6;
  border-radius: 10px;
  background: #fff;
  color: #111827;
}

.consult-admin-form input:focus,
.consult-admin-form select:focus,
.consult-admin-form textarea:focus,
.consult-admin-notice-body-edit:focus {
  border-color: #9ca3af;
  outline: none;
  box-shadow: 0 0 0 3px rgba(17, 24, 39, 0.08);
}

.consult-admin-item {
  padding: 16px;
  border-color: #e4e1db;
  border-radius: 16px;
  background: #f8f7f5;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.04);
}

.consult-admin-new-item {
  border-color: #d8d1c7;
  background: #fbfaf8;
}

.consult-admin-legend-input {
  color: #111827;
  font-size: 1rem;
}

.consult-admin-top-tools {
  margin-top: -4px;
}

.consult-admin-choice-type {
  border-color: #dedbd6;
  background: #eeeae4;
}

.consult-admin-choice-type label.active {
  background: #475569;
}

.consult-admin-choice-box {
  min-height: 40px;
  padding: 0 12px;
  border-color: #dedbd6;
  background: #fff;
}

.consult-admin-choice-box input {
  min-height: 34px;
  max-width: 140px;
  font-size: 0.9rem;
}

.consult-admin-privacy textarea[name="privacy-body"],
.consult-admin-notice-body-edit {
  max-height: 420px;
  overflow-y: auto;
}

.consult-detail-actions {
  gap: 10px;
}

.consult-detail-actions button {
  min-height: 42px;
  border-radius: 999px;
  font-weight: 900;
}

@media (max-width: 768px) {
  .consult-admin-form {
    width: 100%;
    padding: 20px;
    border-radius: 16px;
  }

  .consult-admin-tabs {
    border-radius: 16px;
  }

  .consult-admin-tabs button {
    border-radius: 12px;
  }

  .consult-admin-notice-tools {
    grid-template-columns: 1fr;
  }

  .consult-admin-choice-boxes {
    gap: 8px;
  }

  .consult-admin-choice-box {
    width: 100%;
  }

  .consult-admin-choice-box input {
    width: 100%;
    max-width: none;
    text-align: left;
  }
}

/* Consumer-form aligned consultation admin editor */
.consult-admin-consumer-shell {
  width: min(100%, 720px);
  padding: clamp(26px, 5vw, 46px);
  border: 1px solid #dedbd6;
  border-radius: 18px;
  background: #fff;
  color: #1a1a1a;
  box-shadow: 0 16px 44px rgba(15, 23, 42, 0.06);
}

.consult-admin-consumer-shell > .consult-form-head {
  display: grid;
  gap: 12px;
  padding-bottom: 24px;
  border-bottom: 0.5px solid #d8d3cb;
  text-align: left;
}

.consult-admin-brand-logo {
  width: 88px;
  max-height: 34px;
  object-fit: contain;
  object-position: left center;
}

.consult-admin-consumer-shell > .consult-form-head h3 {
  font-size: clamp(1.45rem, 2.6vw, 2.05rem);
  font-weight: 700;
  letter-spacing: 0;
}

.consult-admin-consumer-shell > .consult-form-head p {
  max-width: 520px;
  color: #777;
  font-size: 13px;
  line-height: 1.75;
}

.consult-admin-consumer-shell .consult-admin-tabs {
  margin-top: 22px;
  padding: 4px;
  border: 0.5px solid #d8d3cb;
  border-radius: 999px;
  background: #f7f6f4;
}

.consult-admin-consumer-shell .consult-admin-tabs button {
  min-height: 42px;
  border-radius: 999px;
  color: #777;
  font-size: 14px;
  font-weight: 600;
}

.consult-admin-consumer-shell .consult-admin-tabs button.active {
  background: #1a1a1a;
  color: #fff;
  box-shadow: none;
}

.consult-admin-consumer-shell .consult-admin-tab-panel {
  margin-top: 22px;
}

.consult-admin-consumer-shell .consumer-notice-card {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.consult-admin-consumer-shell .consult-admin-logo-preview {
  justify-content: flex-start;
  min-height: 44px;
}

.consult-admin-consumer-shell .consult-admin-logo-preview img {
  width: 88px;
  max-height: 34px;
  object-position: left center;
}

.consult-admin-consumer-shell .consult-admin-logo-preview .consult-admin-check.inline {
  right: 0;
  top: 0;
  border: 0.5px solid #d8d3cb;
  border-radius: 999px;
  background: #f7f6f4;
  color: #777;
}

.consult-admin-consumer-shell .consult-admin-notice-title-edit {
  gap: 8px;
  text-align: left;
}

.consult-admin-consumer-shell .consult-admin-notice-title-edit input {
  text-align: left;
  border: 0.5px solid #d8d3cb;
  border-radius: 8px;
  background: #fff;
  font-weight: 600;
}

.consult-admin-consumer-shell .consult-admin-notice-title-edit input[name="notice-title"] {
  min-height: 48px;
  font-size: 1.08rem;
}

.consult-admin-consumer-shell .consult-admin-notice-title-edit input[name="notice-subtitle"] {
  min-height: 42px;
  color: #777;
  font-size: 0.94rem;
}

.consult-admin-consumer-shell .consult-rich-toolbar,
.consult-admin-consumer-shell .consult-admin-notice-tools {
  border: 0.5px solid #e4e1db;
  border-radius: 12px;
  background: #f7f6f4;
}

.consult-admin-consumer-shell .consult-rich-toolbar button,
.consult-admin-consumer-shell .consult-rich-toolbar label,
.consult-admin-consumer-shell .consult-rich-palette {
  border-color: #dedbd6;
  border-radius: 999px;
  background: #fff;
}

.consult-admin-consumer-shell .consult-admin-notice-body-edit {
  min-height: 420px;
  padding: 1.5rem 1.75rem;
  border: 0;
  border-radius: 12px;
  background: #f7f6f4;
  color: #555;
  line-height: 1.85;
}

.consult-admin-consumer-shell .consult-admin-items {
  gap: 14px;
}

.consult-admin-consumer-shell .consult-admin-item {
  padding: 1rem 1.1rem;
  border: 0.5px solid #e4e1db;
  border-radius: 12px;
  background: #f7f6f4;
  box-shadow: none;
}

.consult-admin-consumer-shell .consult-admin-legend-input,
.consult-admin-consumer-shell .consult-admin-choice-box input,
.consult-admin-consumer-shell .consult-admin-form input,
.consult-admin-consumer-shell input,
.consult-admin-consumer-shell select,
.consult-admin-consumer-shell textarea {
  border: 0.5px solid #d8d3cb;
  border-radius: 8px;
  background: #fff;
  color: #1a1a1a;
}

.consult-admin-consumer-shell .consult-admin-choice-type {
  border: 0.5px solid #d8d3cb;
  background: #eeeae4;
}

.consult-admin-consumer-shell .consult-admin-choice-type label.active {
  background: #1a1a1a;
  color: #fff;
}

.consult-admin-consumer-shell .consult-admin-choice-box {
  min-height: 42px;
  border: 0.5px solid #d8d3cb;
  border-radius: 999px;
  background: #fff;
}

.consult-admin-consumer-shell .consult-admin-consumer-privacy {
  margin-top: 18px;
  padding: 1.2rem;
  border: 0.5px solid #e4e1db;
  border-radius: 12px;
  background: #f7f6f4;
}

.consult-admin-consumer-shell .consult-detail-actions {
  position: sticky;
  bottom: 0;
  z-index: 3;
  margin: 18px -4px -4px;
  padding: 12px 4px 4px;
  background: linear-gradient(rgba(255, 255, 255, 0), #fff 22%);
}

.consult-admin-consumer-shell .consult-detail-actions button {
  min-height: 44px;
  border-radius: 8px;
}

.consult-admin-preview-page {
  display: grid;
  gap: 24px;
}

.consult-admin-kicker {
  margin: 0;
  color: #888;
  font-size: 13px;
  letter-spacing: 0.08em;
}

.consult-admin-hero-edit {
  display: grid;
  gap: 14px;
  padding-bottom: 22px;
  border-bottom: 0.5px solid #d8d3cb;
}

.consult-admin-flow-section {
  display: grid;
  gap: 14px;
  padding-top: 2px;
}

.consult-admin-section-title {
  margin: 0;
  padding-top: 4px;
  border-top: 0.5px solid #d8d3cb;
  color: #aaa;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
}

.consult-admin-notice-section .consult-admin-section-title {
  border-top: 0;
}

.consult-admin-section-items {
  display: grid;
  gap: 12px;
}

.consult-admin-fixed-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.consult-admin-fixed-input {
  min-height: 42px;
  padding: 11px 12px;
  border: 0.5px solid #d8d3cb;
  border-radius: 8px;
  background: #fff;
  color: #aaa;
  font-size: 13px;
}

.consult-admin-upload-preview {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.consult-admin-upload-preview span {
  min-height: 76px;
  display: grid;
  place-items: center;
  border: 0.5px dashed #d0cdc8;
  border-radius: 8px;
  background: #fff;
  color: #aaa;
  font-size: 13px;
}

.consult-admin-consumer-shell .consult-admin-privacy {
  margin-top: 0;
  padding: 0;
  border: 0;
  background: transparent;
}

.consult-admin-consumer-shell .consult-admin-privacy label {
  display: grid;
  gap: 6px;
  color: #555;
  font-size: 13px;
  font-weight: 600;
}

@media (max-width: 768px) {
  .consult-admin-consumer-shell {
    width: 100%;
    padding: 22px;
    border-radius: 16px;
  }

  .consult-admin-consumer-shell .consult-admin-notice-body-edit {
    min-height: 320px;
    padding: 1.15rem;
  }

  .consult-admin-consumer-shell .consult-rich-toolbar,
  .consult-admin-consumer-shell .consult-admin-notice-tools,
  .consult-admin-consumer-shell .consult-admin-top-tools {
    display: grid;
    grid-template-columns: 1fr;
  }

  .consult-admin-fixed-grid,
  .consult-admin-upload-preview {
    grid-template-columns: 1fr;
  }
}
