:root {
  color-scheme: light;
  --bg: #f7f2e8;
  --bg-soft: #fffaf1;
  --panel: rgba(255, 255, 255, 0.76);
  --panel-strong: rgba(239, 224, 188, 0.58);
  --line: rgba(185, 154, 92, 0.24);
  --text: #30302c;
  --muted: #7a7163;
  --primary: #caa45f;
  --primary-dark: #8d6a32;
  --accent: #ead7a9;
  --danger: #b75d55;
  --ok: #7f957d;
  --shadow: 0 24px 70px rgba(118, 96, 54, 0.16);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 14% 10%, rgba(216, 179, 95, 0.2), transparent 30%),
    radial-gradient(circle at 88% 2%, rgba(242, 217, 157, 0.12), transparent 26%),
    radial-gradient(circle at 72% 88%, rgba(120, 95, 48, 0.16), transparent 24%),
    linear-gradient(135deg, #030303 0%, #080806 48%, #17140f 100%);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans TC", sans-serif;
}

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

button {
  border: 0;
  cursor: pointer;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(10, 10, 9, 0.76);
  color: var(--text);
  outline: none;
  padding: 11px 12px;
}

select option {
  background: #15130f;
  color: var(--text);
}

textarea {
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(216, 179, 95, 0.82);
  box-shadow: 0 0 0 3px rgba(216, 179, 95, 0.16);
}

h1,
h2,
h3,
p {
  margin: 0;
}

.hidden {
  display: none !important;
}

.login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.login-card {
  width: min(1220px, 100%);
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(504px, 0.95fr);
  gap: 24px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(12, 12, 10, 0.78);
  box-shadow: var(--shadow);
  backdrop-filter: blur(24px);
  overflow: hidden;
}

.login-hero {
  display: grid;
  align-content: space-between;
  min-height: 560px;
  padding: 52px 56px 44px;
  background:
    linear-gradient(145deg, rgba(216, 179, 95, 0.14), rgba(242, 217, 157, 0.045)),
    rgba(255, 255, 255, 0.035);
}

.eyebrow {
  color: var(--primary);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.login-hero h1 {
  margin-top: 30px;
  max-width: 620px;
  font-size: clamp(28px, 3.2vw, 38px);
  line-height: 1.28;
  letter-spacing: 0.04em;
  font-weight: 820;
}

.login-headline {
  display: grid;
  gap: 10px;
}

.login-headline span {
  display: block;
  white-space: nowrap;
}

.headline-keep {
  white-space: nowrap;
}

.login-hero p {
  margin-top: 24px;
  max-width: 500px;
  color: var(--muted);
  line-height: 1.85;
}

.login-copy {
  align-self: center;
}

.login-note {
  align-self: end;
  max-width: none;
  border-top: 1px solid rgba(216, 179, 95, 0.16);
  padding-top: 16px;
  color: #c9bb9c !important;
  font-size: 14px;
  letter-spacing: 0.02em;
}

.glass-card,
.panel,
.modal-card {
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(20px);
}

.login-form {
  padding: 42px;
  display: grid;
  align-content: center;
  gap: 16px;
  min-width: 420px;
}

.login-form h2 {
  max-width: 100%;
  font-size: 28px;
  line-height: 1.35;
  word-break: keep-all;
}

.login-form .primary-btn {
  white-space: nowrap;
}

.checkbox-field {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: fit-content;
  color: #f4ead8;
  font-size: 14px;
  font-weight: 850;
  cursor: pointer;
  user-select: none;
}

.checkbox-field input {
  width: 18px;
  height: 18px;
  accent-color: #d8b35f;
  cursor: pointer;
}

.login-remember {
  margin-top: -2px;
}

.field {
  display: grid;
  gap: 8px;
  color: #f4ead8;
  font-size: 14px;
  font-weight: 800;
}

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

.auto-link {
  color: #ffe1a1;
  text-decoration: underline;
  text-decoration-color: rgba(216, 179, 95, 0.56);
  text-underline-offset: 3px;
  overflow-wrap: anywhere;
}

.auto-link:hover,
.auto-link:focus-visible {
  color: #fff3cc;
  text-decoration-color: rgba(255, 225, 161, 0.95);
}

.linked-text-block {
  display: grid;
  gap: 8px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid rgba(216, 179, 95, 0.18);
}

.linked-text-block h4,
.linked-text-block p {
  margin: 0;
}

.linked-text-block p {
  color: var(--muted);
  line-height: 1.7;
  overflow-wrap: anywhere;
}

.test-warning {
  border: 1px solid rgba(216, 179, 95, 0.36);
  border-radius: 10px;
  padding: 10px 12px;
  background: rgba(216, 179, 95, 0.12);
  color: #ffe7a3;
  font-size: 13px;
  font-weight: 900;
  line-height: 1.5;
}

.dashboard-test-warning {
  display: inline-flex;
  width: fit-content;
  margin-top: 12px;
}

.people-test-warning {
  width: fit-content;
  max-width: 760px;
  margin-top: 12px;
}

.person-line .delete-user {
  display: none !important;
}

.primary-btn,
.secondary-btn,
.ghost-btn,
.danger-btn,
.mini-btn {
  min-height: 40px;
  border-radius: 8px;
  padding: 0 14px;
  font-weight: 900;
}

.primary-btn {
  background: linear-gradient(135deg, #7b561c, #d8b35f 48%, #fff0bd);
  color: #120d04;
  box-shadow: 0 14px 30px rgba(216, 179, 95, 0.18);
}

.secondary-btn {
  background: rgba(216, 179, 95, 0.12);
  color: var(--text);
  border: 1px solid var(--line);
}

.ghost-btn {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--line);
}

.danger-btn {
  background: rgba(255, 119, 112, 0.16);
  color: #ffd3d0;
  border: 1px solid rgba(255, 119, 112, 0.34);
}

.mini-btn {
  min-height: 32px;
  padding: 0 10px;
  font-size: 13px;
}

.app-layout {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 24px 18px;
  border-right: 1px solid var(--line);
  background: rgba(4, 4, 4, 0.82);
  backdrop-filter: blur(18px);
}

.brand {
  margin-bottom: 28px;
}

.brand h2 {
  margin-top: 6px;
  font-size: 18px;
  line-height: 1.35;
}

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

.nav button {
  width: 100%;
  text-align: left;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  padding: 12px;
  font-weight: 850;
}

.nav button.active,
.nav button:hover {
  background: rgba(216, 179, 95, 0.14);
  color: var(--text);
}

.sidebar-footer {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  display: grid;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
}

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

.topbar,
.page-head,
.actions,
.filter-row,
.card-head,
.modal-head,
.person-line,
.reminder-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.topbar {
  margin-bottom: 22px;
}

.mobile-menu {
  display: none;
}

.scope-select {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  white-space: nowrap;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.scope-select select {
  min-width: 150px;
  padding: 9px 10px;
}

.topbar .actions {
  flex-wrap: wrap;
  justify-content: flex-end;
  column-gap: 14px;
  row-gap: 10px;
}

.inline-select {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
}

.inline-select span {
  white-space: nowrap;
}

.inline-select select {
  min-width: 190px;
  padding: 9px 10px;
}

.data-view-control {
  display: inline-flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 10px;
  margin-top: 14px;
  border: 1px solid rgba(216, 179, 95, 0.2);
  border-radius: 14px;
  padding: 8px 10px;
  background: rgba(8, 8, 7, 0.42);
  box-shadow: inset 0 1px 0 rgba(255, 240, 189, 0.06);
}

.data-view-control .inline-select {
  flex-wrap: nowrap;
  border: 0;
  padding: 0;
  background: transparent;
}

.data-view-label {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  border: 1px solid rgba(216, 179, 95, 0.22);
  border-radius: 999px;
  padding: 0 13px;
  background: rgba(216, 179, 95, 0.1);
  color: #f4d889;
  font-size: 13px;
  font-weight: 900;
  white-space: nowrap;
}

.readonly-view {
  width: fit-content;
}

.user-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
}

.user-menu-wrap {
  position: relative;
  justify-self: end;
}

.user-pill:hover {
  border-color: rgba(216, 179, 95, 0.72);
  background: rgba(216, 179, 95, 0.12);
}

.user-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  z-index: 10;
  display: grid;
  gap: 10px;
  min-width: 230px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(12, 11, 9, 0.95);
  box-shadow: var(--shadow);
  padding: 14px;
  color: var(--muted);
  backdrop-filter: blur(18px);
}

.avatar {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #7b561c, #d8b35f, #fff0bd);
  color: #171006;
  font-weight: 950;
}

.page-head {
  align-items: flex-start;
  margin-bottom: 18px;
}

.page-title h1 {
  font-size: clamp(28px, 4vw, 44px);
}

.page-title p {
  margin-top: 6px;
  color: var(--muted);
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 22px;
}

.dashboard-command-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.38fr) minmax(360px, 1fr);
  grid-template-rows: minmax(230px, 250px) minmax(350px, 390px);
  gap: 22px;
  align-items: stretch;
}

.dashboard-lower-grid {
  margin-top: 22px;
}

.glass-card,
.panel {
  border-radius: 16px;
  padding: 24px;
}

.hero-card {
  grid-column: span 7;
  min-height: 250px;
  display: grid;
  align-content: space-between;
  background:
    linear-gradient(135deg, rgba(216, 179, 95, 0.16), rgba(255, 240, 189, 0.08)),
    rgba(255, 255, 255, 0.055);
}

.command-hero-card {
  position: relative;
  grid-column: 1;
  grid-row: 1 / span 2;
  min-height: 610px;
  overflow: hidden;
  padding: clamp(28px, 3vw, 38px);
  background:
    linear-gradient(180deg, rgba(8, 8, 8, 0.2) 0%, rgba(8, 7, 6, 0.52) 47%, rgba(4, 4, 4, 0.95) 100%),
    radial-gradient(circle at 46% 54%, rgba(255, 231, 165, 0.64) 0 1.1%, rgba(216, 179, 95, 0.5) 1.3% 2.2%, rgba(216, 179, 95, 0.25) 2.3% 10%, transparent 24%),
    radial-gradient(ellipse at 48% 58%, rgba(216, 179, 95, 0.26), transparent 42%),
    linear-gradient(104deg, transparent 0 20%, rgba(255, 240, 189, 0.13) 35%, transparent 56%),
    linear-gradient(256deg, transparent 0 16%, rgba(216, 179, 95, 0.095) 38%, transparent 66%),
    repeating-linear-gradient(90deg, rgba(255, 240, 189, 0.035) 0 1px, transparent 1px 88px),
    repeating-linear-gradient(0deg, rgba(255, 240, 189, 0.025) 0 1px, transparent 1px 74px),
    linear-gradient(135deg, #171716 0%, #0c0c0c 42%, #060606 100%);
  box-shadow:
    inset 0 0 0 1px rgba(216, 179, 95, 0.2),
    inset 0 -160px 170px rgba(0, 0, 0, 0.48),
    0 28px 90px rgba(0, 0, 0, 0.34);
}

.command-hero-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, transparent 0 3%, rgba(3, 3, 3, 0.78) 3% 6%, transparent 6% 9%, rgba(2, 2, 2, 0.88) 9% 12%, transparent 12% 15%, rgba(1, 1, 1, 0.88) 15% 19%, transparent 19% 24%, rgba(2, 2, 2, 0.82) 24% 28%, transparent 28% 32%, rgba(2, 2, 2, 0.92) 32% 36%, transparent 36% 41%, rgba(3, 3, 3, 0.84) 41% 44%, transparent 44% 50%, rgba(2, 2, 2, 0.9) 50% 54%, transparent 54% 59%, rgba(3, 3, 3, 0.78) 59% 62%, transparent 62% 66%, rgba(2, 2, 2, 0.84) 66% 70%, transparent 70% 76%, rgba(2, 2, 2, 0.9) 76% 80%, transparent 80% 85%, rgba(3, 3, 3, 0.78) 85% 88%, transparent 88% 100%) 0 58% / 100% 28% no-repeat,
    repeating-linear-gradient(90deg, rgba(255, 231, 165, 0.12) 0 1px, transparent 1px 22px) 0 58% / 100% 28% no-repeat,
    linear-gradient(to top, rgba(2, 2, 2, 0.96) 0%, rgba(4, 4, 4, 0.72) 34%, transparent 70%);
  opacity: 0.95;
  pointer-events: none;
}

.command-hero-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(76deg, transparent 0 42%, rgba(255, 231, 165, 0.28) 49%, transparent 57%) 0 52% / 100% 48% no-repeat,
    linear-gradient(104deg, transparent 0 39%, rgba(216, 179, 95, 0.22) 48%, transparent 58%) 0 52% / 100% 48% no-repeat,
    linear-gradient(90deg, transparent 0 44%, rgba(255, 240, 189, 0.22) 49.8%, rgba(255, 240, 189, 0.34) 50%, rgba(255, 240, 189, 0.2) 50.2%, transparent 56%) 0 56% / 100% 44% no-repeat,
    repeating-linear-gradient(90deg, rgba(255, 240, 189, 0.115) 0 1px, transparent 1px 54px) 0 68% / 100% 32% no-repeat,
    repeating-linear-gradient(0deg, rgba(255, 240, 189, 0.07) 0 1px, transparent 1px 42px) 0 68% / 100% 32% no-repeat,
    linear-gradient(to top, rgba(0, 0, 0, 0.82), transparent 44%);
  opacity: 0.68;
  pointer-events: none;
}

.hero-content,
.hero-quote,
.action-energy-panel {
  position: relative;
  z-index: 2;
}

.hero-content .eyebrow {
  letter-spacing: 0.24em;
  color: #f0cc72;
  text-shadow: 0 0 24px rgba(216, 179, 95, 0.24);
}

.command-hero-card .hero-content {
  max-width: 620px;
  padding: 2px 0 0;
  filter: drop-shadow(0 18px 36px rgba(0, 0, 0, 0.42));
}

.command-hero-card .hero-content h2 {
  color: #fff8e8;
  text-shadow:
    0 18px 44px rgba(0, 0, 0, 0.72),
    0 0 28px rgba(216, 179, 95, 0.22);
}

.command-hero-card .hero-content .muted {
  color: rgba(245, 236, 214, 0.76);
  text-shadow: 0 12px 30px rgba(0, 0, 0, 0.7);
}

.hero-quote {
  display: grid;
  gap: 6px;
  max-width: 460px;
  color: #f2d37c;
  font-size: clamp(22px, 2.1vw, 34px);
  font-weight: 950;
  line-height: 1.45;
  text-shadow: 0 12px 34px rgba(0, 0, 0, 0.45);
}

.hero-quote::before {
  content: "“";
  color: rgba(244, 216, 137, 0.82);
  font-size: 54px;
  line-height: 0.8;
}

.action-energy-panel {
  display: grid;
  gap: 12px;
  max-width: 620px;
  border: 1px solid rgba(216, 179, 95, 0.28);
  border-radius: 16px;
  padding: 16px;
  background:
    linear-gradient(135deg, rgba(216, 179, 95, 0.12), rgba(255, 240, 189, 0.035)),
    rgba(9, 8, 6, 0.66);
  box-shadow:
    inset 0 1px 0 rgba(255, 240, 189, 0.08),
    0 18px 48px rgba(0, 0, 0, 0.24);
}

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

.energy-head span {
  color: #efe6d3;
  font-size: 14px;
  font-weight: 950;
  letter-spacing: 0.08em;
}

.energy-head strong {
  color: #fff3c9;
  font-size: 26px;
  line-height: 1;
  text-shadow: 0 0 20px rgba(216, 179, 95, 0.25);
}

.energy-bar {
  position: relative;
  height: 13px;
  overflow: hidden;
  border: 1px solid rgba(216, 179, 95, 0.28);
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.62), rgba(255, 255, 255, 0.04)),
    rgba(0, 0, 0, 0.36);
}

.energy-bar::after {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(90deg, transparent 0 18px, rgba(255, 240, 189, 0.12) 18px 19px);
  opacity: 0.48;
}

.energy-bar span {
  position: absolute;
  inset: 0 auto 0 0;
  border-radius: inherit;
  background:
    linear-gradient(90deg, rgba(125, 83, 24, 0.95), rgba(216, 179, 95, 0.96), rgba(255, 240, 189, 0.98));
  box-shadow:
    0 0 22px rgba(216, 179, 95, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

.action-energy-panel p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}

.command-todo-card {
  grid-column: 2;
  grid-row: 2;
  min-height: 350px;
  max-height: 420px;
  overflow: hidden;
}

.command-schedule-card {
  grid-column: 2;
  grid-row: 1;
  min-height: 220px;
  max-height: 260px;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(216, 179, 95, 0.11), rgba(255, 240, 189, 0.028)),
    rgba(255, 255, 255, 0.055);
}

.schedule-range-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.schedule-range-btn {
  border: 1px solid rgba(216, 179, 95, 0.24);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.045);
  color: var(--muted);
  min-height: 32px;
  padding: 6px 12px;
  font-weight: 800;
  cursor: pointer;
  transition:
    background 0.18s ease,
    border-color 0.18s ease,
    color 0.18s ease,
    box-shadow 0.18s ease;
}

.schedule-range-btn:hover,
.schedule-range-btn:focus-visible,
.schedule-range-btn.active {
  border-color: rgba(216, 179, 95, 0.72);
  background:
    linear-gradient(135deg, rgba(216, 179, 95, 0.22), rgba(255, 240, 189, 0.08)),
    rgba(255, 255, 255, 0.06);
  color: #fff0c2;
  box-shadow: 0 0 18px rgba(216, 179, 95, 0.12);
}

.dashboard-click {
  position: relative;
  transition:
    transform 0.18s ease,
    border-color 0.18s ease,
    background 0.18s ease,
    box-shadow 0.18s ease;
  cursor: pointer;
}

.dashboard-click:hover,
.dashboard-click:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(216, 179, 95, 0.72);
  background: rgba(216, 179, 95, 0.1);
  box-shadow: 0 24px 70px rgba(216, 179, 95, 0.13);
}

.dashboard-click.active {
  border-color: rgba(216, 179, 95, 0.9);
  background:
    linear-gradient(135deg, rgba(216, 179, 95, 0.16), rgba(255, 240, 189, 0.08)),
    rgba(255, 255, 255, 0.085);
}

.click-hint {
  display: inline-flex;
  width: fit-content;
  margin-top: 12px;
  border: 1px solid rgba(216, 179, 95, 0.25);
  border-radius: 999px;
  padding: 5px 10px;
  color: #f4d889;
  background: rgba(216, 179, 95, 0.1);
  font-size: 12px;
  font-weight: 900;
}

.active-detail {
  border-color: rgba(216, 179, 95, 0.42);
  background: rgba(8, 8, 7, 0.78);
}

.data-viewer-section {
  grid-column: 1 / -1;
  margin-top: 0;
}

.data-viewer-card {
  border: 1px solid rgba(216, 179, 95, 0.44);
  box-shadow:
    inset 0 1px 0 rgba(255, 240, 189, 0.08),
    0 22px 60px rgba(0, 0, 0, 0.28);
}

.data-viewer-head {
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(216, 179, 95, 0.18);
}

.data-viewer-head h3 {
  margin-top: 4px;
}

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

.detail-bucket {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.055);
  padding: 14px;
}

.detail-bucket h4 {
  margin: 0;
  font-size: 16px;
}

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

.dashboard-row {
  display: grid;
  width: 100%;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.065);
  color: var(--text);
  padding: 13px 14px;
  text-align: left;
  transition:
    transform 0.16s ease,
    border-color 0.16s ease,
    background 0.16s ease;
}

.dashboard-row:hover,
.dashboard-row:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(216, 179, 95, 0.72);
  background: rgba(216, 179, 95, 0.1);
}

.dashboard-row strong {
  font-size: 15px;
}

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

.table-shell {
  width: 100%;
  margin-top: 14px;
  overflow: auto;
  border: 1px solid rgba(216, 179, 95, 0.22);
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.18);
}

.dashboard-table {
  width: 100%;
  min-width: 780px;
  border-collapse: collapse;
}

.dashboard-table th,
.dashboard-table td {
  border-bottom: 1px solid rgba(216, 179, 95, 0.13);
  padding: 12px 14px;
  text-align: left;
  vertical-align: top;
  font-size: 13px;
  line-height: 1.5;
}

.dashboard-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: rgba(34, 27, 16, 0.94);
  color: #f4d889;
  font-size: 12px;
  font-weight: 950;
}

.dashboard-table td {
  color: #efe6d3;
}

.todo-reminder-table th:nth-child(4),
.todo-reminder-table td:nth-child(4) {
  min-width: 118px;
  width: 118px;
}

.todo-type-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 96px;
  padding-inline: 14px;
  white-space: nowrap;
  word-break: keep-all;
}

.dashboard-table-row {
  cursor: pointer;
  transition:
    background 0.16s ease,
    box-shadow 0.16s ease;
}

.dashboard-table-row:hover,
.dashboard-table-row:focus-visible {
  background: rgba(216, 179, 95, 0.1);
  box-shadow: inset 3px 0 0 rgba(216, 179, 95, 0.72);
  outline: none;
}

.mobile-card-list {
  display: none;
  gap: 10px;
  margin-top: 14px;
}

.mobile-data-card {
  display: grid;
  width: 100%;
  gap: 7px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.065);
  color: var(--text);
  padding: 14px;
  text-align: left;
  cursor: pointer;
}

.mobile-data-card strong {
  font-size: 16px;
}

.mobile-data-card span {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.mobile-data-card b {
  color: #dec883;
}

.mobile-data-card .todo-type-row {
  white-space: nowrap;
  word-break: keep-all;
}

.mobile-data-card:hover,
.mobile-data-card:focus-visible {
  border-color: rgba(216, 179, 95, 0.72);
  background: rgba(216, 179, 95, 0.1);
  outline: none;
}

.compact-empty {
  margin-top: 12px;
  padding: 13px;
}

.hero-card h2 {
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.08;
}

.quick-card {
  grid-column: span 5;
}

.stat-card {
  grid-column: span 4;
}

.three-stat-card {
  grid-column: span 4;
}

.wide-card {
  grid-column: span 6;
}

.full-card {
  grid-column: span 12;
}

.stat-number {
  margin-top: 8px;
  font-size: 38px;
  font-weight: 950;
}

.card-description {
  display: block;
  margin-top: 8px;
  color: #c9bfa9;
  font-size: 13px;
  line-height: 1.55;
}

.muted {
  color: var(--muted);
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.compact-chip-row {
  justify-content: flex-end;
  margin-top: 0;
}

.chip,
.status-chip {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border-radius: 999px;
  padding: 0 10px;
  background: rgba(255, 255, 255, 0.1);
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
}

.status-chip {
  background: rgba(216, 179, 95, 0.14);
  color: #f4d889;
}

.level-chip {
  border: 1px solid rgba(216, 179, 95, 0.34);
  background: rgba(8, 8, 7, 0.5);
  color: #f7e3a9;
}

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

.schedule-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.command-schedule-card .schedule-list,
.command-todo-card .list {
  gap: 8px;
  margin-top: 12px;
}

.command-schedule-card .empty,
.command-todo-card .empty {
  margin-top: 12px;
  padding: 14px;
}

.schedule-empty-state {
  display: grid;
  gap: 8px;
  margin-top: 14px;
  border: 1px dashed rgba(216, 179, 95, 0.34);
  border-radius: 16px;
  background:
    radial-gradient(circle at 20% 20%, rgba(216, 179, 95, 0.14), transparent 42%),
    rgba(255, 255, 255, 0.045);
  padding: 16px;
  color: var(--muted);
}

.schedule-empty-state strong {
  color: #fff0c2;
}

.schedule-empty-state .mini-btn {
  width: fit-content;
  margin-top: 2px;
}

.schedule-line {
  display: grid;
  grid-template-columns: 68px minmax(0, 1fr) auto auto;
  gap: 12px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 14px;
  background:
    linear-gradient(135deg, rgba(216, 179, 95, 0.075), rgba(255, 240, 189, 0.02)),
    rgba(255, 255, 255, 0.055);
  padding: 12px;
}

.command-schedule-card .schedule-line {
  grid-template-columns: 62px minmax(0, 1fr) auto;
  gap: 10px;
  padding: 10px;
  border-color: rgba(216, 179, 95, 0.24);
  background:
    linear-gradient(135deg, rgba(216, 179, 95, 0.105), rgba(255, 240, 189, 0.025)),
    rgba(12, 11, 9, 0.62);
}

.command-schedule-card .private-chip {
  display: none;
}

.command-todo-card .reminder-line {
  padding: 10px 12px;
}

.schedule-time {
  display: grid;
  gap: 4px;
  border-right: 1px solid rgba(216, 179, 95, 0.2);
  padding-right: 12px;
  min-height: 44px;
  align-content: center;
}

.schedule-time strong {
  color: #f4d889;
  font-size: 16px;
}

.schedule-time span {
  color: #efe6d3;
  font-weight: 850;
}

.command-schedule-card .schedule-time {
  border-right-color: rgba(216, 179, 95, 0.28);
  text-align: center;
}

.command-schedule-card .schedule-time strong {
  font-size: 14px;
}

.command-schedule-card .schedule-time span {
  font-size: 15px;
}

.schedule-main {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.schedule-main strong {
  color: #fff4d8;
}

.schedule-main strong,
.schedule-main span {
  overflow-wrap: anywhere;
}

.private-chip {
  border-color: rgba(244, 216, 137, 0.34);
  background: rgba(244, 216, 137, 0.18);
  color: #ffe6a6;
}

.schedule-line > .status-chip {
  width: fit-content;
}

.reminder-line,
.person-line,
.customer-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.065);
  padding: 12px;
}

.clickable-line {
  cursor: pointer;
  transition:
    transform 0.16s ease,
    border-color 0.16s ease,
    background 0.16s ease;
}

.clickable-line:hover,
.clickable-line:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(216, 179, 95, 0.7);
  background: rgba(216, 179, 95, 0.1);
}

.reminder-line strong,
.person-line strong,
.customer-card strong {
  display: block;
}

.customer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 14px;
}

.search-panel {
  display: grid;
  gap: 16px;
}

.query-search-row {
  margin-bottom: 0;
}

.type-filter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
  gap: 10px;
}

.type-filter-card {
  display: grid;
  gap: 8px;
  min-height: 86px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px;
  background:
    linear-gradient(135deg, rgba(216, 179, 95, 0.08), rgba(255, 240, 189, 0.025)),
    rgba(255, 255, 255, 0.055);
  color: var(--text);
  text-align: left;
  transition:
    transform 0.16s ease,
    border-color 0.16s ease,
    background 0.16s ease,
    box-shadow 0.16s ease;
}

.type-filter-card span {
  color: #efe6d3;
  font-size: 14px;
  font-weight: 900;
}

.type-filter-card strong {
  color: #f4d889;
  font-size: 28px;
  line-height: 1;
}

.type-filter-card:hover,
.type-filter-card:focus-visible,
.type-filter-card.active {
  transform: translateY(-1px);
  border-color: rgba(216, 179, 95, 0.78);
  background:
    linear-gradient(135deg, rgba(216, 179, 95, 0.18), rgba(255, 240, 189, 0.06)),
    rgba(255, 255, 255, 0.08);
  box-shadow: 0 18px 46px rgba(216, 179, 95, 0.1);
  outline: none;
}

.recruiting-filter-block {
  display: grid;
  gap: 10px;
}

.recruiting-filter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
}

.recruiting-filter-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 50px;
  border: 1px solid rgba(216, 179, 95, 0.18);
  border-radius: 10px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.045);
  color: var(--text);
  text-align: left;
}

.recruiting-filter-card span {
  color: #efe6d3;
  font-weight: 850;
}

.recruiting-filter-card strong {
  color: #f4d889;
  font-size: 18px;
}

.recruiting-filter-card:hover,
.recruiting-filter-card:focus-visible,
.recruiting-filter-card.active {
  border-color: rgba(216, 179, 95, 0.72);
  background: rgba(216, 179, 95, 0.12);
  outline: none;
}

.customer-level-filter-block {
  display: grid;
  gap: 12px;
  border: 1px solid rgba(216, 179, 95, 0.18);
  border-radius: 14px;
  padding: 14px;
  background:
    linear-gradient(135deg, rgba(216, 179, 95, 0.075), rgba(255, 240, 189, 0.03)),
    rgba(255, 255, 255, 0.045);
}

.customer-level-filter-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 14px;
}

.customer-level-filter-head h3 {
  margin: 3px 0 0;
  color: var(--text);
  font-size: 18px;
  line-height: 1.2;
}

.customer-level-filter-head p,
.customer-level-kicker {
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

.customer-level-pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.customer-level-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 46px;
  border: 1px solid rgba(216, 179, 95, 0.22);
  border-radius: 999px;
  padding: 10px 18px;
  background: rgba(255, 255, 255, 0.055);
  color: var(--text);
  font-size: 15px;
  font-weight: 900;
  line-height: 1;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
  transition:
    transform 0.16s ease,
    border-color 0.16s ease,
    background 0.16s ease,
    box-shadow 0.16s ease;
}

.customer-level-pill span {
  white-space: nowrap;
}

.customer-level-pill strong {
  display: inline-grid;
  place-items: center;
  min-width: 28px;
  height: 28px;
  border-radius: 999px;
  padding: 0 8px;
  background: rgba(216, 179, 95, 0.14);
  color: #f4d889;
  font-size: 15px;
  font-weight: 950;
}

.customer-level-pill:hover,
.customer-level-pill:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(216, 179, 95, 0.62);
  background: rgba(216, 179, 95, 0.12);
  box-shadow: 0 14px 28px rgba(216, 179, 95, 0.09);
  outline: none;
}

.customer-level-pill.active {
  border-color: rgba(216, 179, 95, 0.82);
  background:
    linear-gradient(135deg, rgba(216, 179, 95, 0.26), rgba(255, 240, 189, 0.12));
  color: #fff3c9;
  box-shadow:
    inset 0 1px 0 rgba(255, 240, 189, 0.16),
    0 16px 34px rgba(216, 179, 95, 0.12);
}

.customer-level-pill.active strong {
  background: rgba(255, 240, 189, 0.2);
  color: #fff0bd;
}

.customer-query-table .dashboard-table {
  min-width: 980px;
}

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

.clickable-customer-card {
  cursor: pointer;
  transition:
    transform 0.16s ease,
    border-color 0.16s ease,
    background 0.16s ease,
    box-shadow 0.16s ease;
}

.clickable-customer-card:hover,
.clickable-customer-card:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(216, 179, 95, 0.72);
  background:
    linear-gradient(135deg, rgba(216, 179, 95, 0.12), rgba(255, 240, 189, 0.04)),
    rgba(255, 255, 255, 0.09);
  box-shadow: 0 18px 44px rgba(216, 179, 95, 0.12);
  outline: none;
}

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

.detail-summary {
  position: sticky;
  top: 20px;
}

.service-panel {
  min-width: 0;
}

.service-head-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}

.service-add-btn {
  min-height: 42px;
  padding: 0 20px;
  border-radius: 9px;
  font-size: 14px;
  font-weight: 950;
  letter-spacing: 0.02em;
}

.service-action-btn {
  min-height: 42px;
  padding: 0 20px;
  border-radius: 9px;
  font-size: 14px;
  font-weight: 950;
  letter-spacing: 0.02em;
}

.danger-outline-btn {
  min-height: 40px;
  border: 1px solid rgba(183, 93, 85, 0.56);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.78), rgba(255, 246, 244, 0.62));
  color: #a7423b;
  padding: 0 16px;
  font-weight: 950;
  box-shadow: 0 10px 22px rgba(183, 93, 85, 0.08);
}

.danger-outline-btn:hover,
.danger-outline-btn:focus-visible {
  border-color: rgba(183, 93, 85, 0.82);
  background:
    linear-gradient(135deg, rgba(255, 249, 248, 0.96), rgba(255, 232, 228, 0.86));
  color: #8f332d;
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(183, 93, 85, 0.14);
}

.resource-store-switcher {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}

.resource-store-pill {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 16px;
  border: 1px solid rgba(190, 160, 92, 0.28);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: #4b4032;
  font-size: 14px;
  font-weight: 850;
  box-shadow: 0 10px 22px rgba(85, 69, 38, 0.06);
}

.resource-store-pill strong {
  min-width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 7px;
  border-radius: 999px;
  background: rgba(203, 169, 92, 0.16);
  color: #8c6a28;
  font-size: 13px;
}

.resource-store-pill:hover,
.resource-store-pill:focus-visible,
.resource-store-pill.active {
  border-color: rgba(190, 160, 92, 0.58);
  background: linear-gradient(135deg, rgba(255, 251, 240, 0.96), rgba(245, 232, 196, 0.72));
  box-shadow: 0 14px 28px rgba(166, 128, 54, 0.12);
  transform: translateY(-1px);
}

.resource-store-hint {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  margin-bottom: 14px;
  padding: 0 14px;
  border: 1px solid rgba(190, 160, 92, 0.24);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.68);
  color: #66553b;
  font-size: 14px;
  font-weight: 850;
}

.resource-claimants {
  color: #786f61;
  font-size: 13px;
  font-weight: 800;
}

.service-action-btn:hover,
.service-action-btn:focus-visible,
.service-add-btn:hover,
.service-add-btn:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 16px 32px rgba(177, 137, 62, 0.26);
}

.timeline {
  position: relative;
  display: grid;
  gap: 14px;
  margin-top: 16px;
  padding-left: 18px;
}

.timeline::before {
  content: "";
  position: absolute;
  top: 8px;
  bottom: 8px;
  left: 6px;
  width: 2px;
  background: linear-gradient(180deg, rgba(216, 179, 95, 0.78), rgba(255, 240, 189, 0.12));
}

.timeline-item {
  position: relative;
}

.timeline-dot {
  position: absolute;
  top: 18px;
  left: -17px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 0 6px rgba(216, 179, 95, 0.12);
}

.timeline-card {
  display: grid;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.07);
  padding: 14px;
}

.service-record-card {
  cursor: pointer;
  transition:
    transform 0.16s ease,
    border-color 0.16s ease,
    background 0.16s ease,
    box-shadow 0.16s ease;
}

.service-record-card:hover,
.service-record-card:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(216, 179, 95, 0.72);
  background:
    linear-gradient(135deg, rgba(216, 179, 95, 0.13), rgba(255, 240, 189, 0.045)),
    rgba(255, 255, 255, 0.09);
  box-shadow: 0 18px 44px rgba(216, 179, 95, 0.12);
  outline: none;
}

.service-detail-view {
  display: grid;
  gap: 16px;
}

.service-detail-content {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.07);
  padding: 16px;
  color: var(--text);
  line-height: 1.8;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.highlight-service .timeline-card {
  border-color: rgba(242, 217, 157, 0.82);
  background:
    linear-gradient(135deg, rgba(216, 179, 95, 0.18), rgba(255, 240, 189, 0.05)),
    rgba(255, 255, 255, 0.085);
  box-shadow: 0 18px 46px rgba(216, 179, 95, 0.14);
}

.timeline-card .muted {
  display: block;
  margin-top: 4px;
  font-size: 13px;
}

.service-content {
  color: #efe6d3;
  line-height: 1.7;
  white-space: pre-wrap;
}

.customer-meta {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 14px;
}

.card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pagination-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid rgba(216, 179, 95, 0.14);
}

.pagination-pages {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
}

.pagination-btn {
  min-width: 40px;
  min-height: 38px;
  border: 1px solid rgba(216, 179, 95, 0.22);
  border-radius: 8px;
  padding: 0 12px;
  background: rgba(255, 255, 255, 0.045);
  color: var(--text);
  font-weight: 900;
  cursor: pointer;
  transition:
    transform 0.16s ease,
    border-color 0.16s ease,
    background 0.16s ease;
}

.pagination-btn:hover,
.pagination-btn:focus-visible,
.pagination-btn.active {
  transform: translateY(-1px);
  border-color: rgba(216, 179, 95, 0.76);
  background: rgba(216, 179, 95, 0.14);
  outline: none;
}

.pagination-btn:disabled {
  cursor: not-allowed;
  opacity: 0.42;
  transform: none;
}

.pagination-status {
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
}

.filter-row {
  margin-bottom: 16px;
  align-items: stretch;
}

.filter-row input {
  min-width: min(420px, 100%);
}

.filter-row select {
  max-width: 180px;
}

.panel {
  margin-bottom: 16px;
}

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

.form-section {
  display: grid;
  gap: 14px;
  border: 1px solid rgba(216, 179, 95, 0.18);
  border-radius: 14px;
  background:
    linear-gradient(135deg, rgba(216, 179, 95, 0.07), rgba(255, 240, 189, 0.018)),
    rgba(255, 255, 255, 0.035);
  padding: 16px;
}

.form-section h3 {
  margin: 0;
  color: #f4d889;
  font-size: 14px;
  letter-spacing: 0.08em;
}

.system-section {
  opacity: 0.92;
}

.form-section.hidden {
  display: none;
}

.identity-choice {
  display: grid;
  gap: 12px;
  padding: 15px;
  border: 1px solid rgba(185, 154, 92, 0.28);
  border-radius: 16px;
  background:
    linear-gradient(135deg, rgba(255, 252, 245, 0.92), rgba(244, 235, 218, 0.62)),
    rgba(255, 255, 255, 0.76);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.82),
    0 12px 26px rgba(109, 85, 46, 0.08);
}

.identity-choice-copy {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.identity-choice-copy strong {
  color: #76551f;
  font-size: 15px;
  letter-spacing: 0.06em;
}

.identity-choice-copy span {
  color: #827a6c;
  font-size: 12px;
}

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

.identity-choice-btn {
  min-height: 46px;
  border: 1px solid rgba(185, 154, 92, 0.32);
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(246, 239, 224, 0.74));
  color: #534b40;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.02em;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.82);
  transition:
    transform 0.18s ease,
    border-color 0.18s ease,
    box-shadow 0.18s ease,
    background 0.18s ease;
}

.identity-choice-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(170, 126, 51, 0.56);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 10px 22px rgba(177, 137, 67, 0.14);
}

.identity-choice-btn.active {
  border-color: rgba(160, 112, 36, 0.68);
  background: linear-gradient(135deg, #b98b42, #ddbd78 54%, #f7e6b0);
  color: #342614;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.72),
    0 12px 28px rgba(177, 137, 67, 0.2);
}

.full-field {
  grid-column: 1 / -1;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(0, 0, 0, 0.58);
}

.modal-card {
  width: min(860px, 100%);
  max-height: min(88vh, 820px);
  overflow: auto;
  border-radius: 18px;
  padding: 20px;
}

.dashboard-data-modal {
  z-index: 28;
  background:
    radial-gradient(circle at 50% 18%, rgba(216, 179, 95, 0.14), transparent 38%),
    rgba(0, 0, 0, 0.68);
  backdrop-filter: blur(8px);
}

.dashboard-data-modal .modal-card {
  width: min(1080px, 100%);
  border: 1px solid rgba(216, 179, 95, 0.42);
  background:
    linear-gradient(135deg, rgba(216, 179, 95, 0.11), rgba(255, 240, 189, 0.035)),
    rgba(8, 8, 7, 0.96);
  box-shadow:
    inset 0 1px 0 rgba(255, 240, 189, 0.09),
    0 28px 90px rgba(0, 0, 0, 0.62);
}

.dashboard-modal-head {
  align-items: start;
  border-bottom: 1px solid rgba(216, 179, 95, 0.18);
  padding-bottom: 14px;
}

.dashboard-modal-head h2 {
  color: #fff3cc;
}

.modal-head-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.dashboard-modal-body {
  margin-top: 16px;
}

.detail-description {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.dashboard-data-modal .table-shell {
  max-height: min(58vh, 560px);
}

.dashboard-schedule-modal-list {
  max-height: min(58vh, 560px);
  overflow: auto;
  padding-right: 4px;
}

.schedule-view-all {
  width: fit-content;
  margin-top: 12px;
}

.modal-head {
  margin-bottom: 16px;
}

.modal-actions {
  position: sticky;
  bottom: -20px;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin: 18px -20px -20px;
  padding: 14px 20px;
  border-top: 1px solid var(--line);
  background: rgba(12, 11, 9, 0.92);
  backdrop-filter: blur(14px);
}

.empty {
  color: var(--muted);
  border: 1px dashed var(--line);
  border-radius: 12px;
  padding: 18px;
  text-align: center;
}

.warning {
  color: var(--accent);
}

@media (max-width: 1023px) {
  .login-page {
    align-items: start;
    padding: 18px;
  }

  .login-card {
    grid-template-columns: 1fr;
    gap: 0;
    max-width: 640px;
  }

  .login-form {
    min-width: 0;
  }
}

@media (max-width: 900px) {
  .app-layout,
  .dashboard-grid,
  .dashboard-command-grid,
  .detail-grid,
  .dashboard-detail-grid {
    grid-template-columns: 1fr;
  }

  .login-hero {
    min-height: auto;
    padding: 34px 28px 26px;
  }

  .login-copy {
    margin: 42px 0 34px;
  }

  .login-form {
    padding: 28px;
  }

  .detail-summary {
    position: static;
  }

  .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 30;
    width: min(82vw, 290px);
    transform: translateX(-105%);
    transition: transform 0.2s ease;
    box-shadow: 18px 0 50px rgba(0, 0, 0, 0.42);
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .mobile-menu {
    display: inline-flex;
    width: fit-content;
  }

  .hero-card,
  .command-hero-card,
  .command-todo-card,
  .command-schedule-card,
  .quick-card,
  .stat-card,
  .wide-card,
  .full-card {
    grid-column: span 1;
    grid-row: auto;
  }

  .page-head,
  .filter-row,
  .topbar {
    display: grid;
  }

  .topbar {
    grid-template-columns: auto 1fr;
  }

  .topbar .actions {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .user-menu-wrap {
    justify-self: end;
  }

  .actions,
  .filter-row select {
    max-width: none;
    width: 100%;
  }

  .data-view-control,
  .data-view-control .inline-select,
  .data-view-control select,
  .data-view-label {
    width: 100%;
  }

  .data-view-control {
    display: flex;
    flex-wrap: wrap;
  }

  .data-view-control .inline-select {
    justify-content: space-between;
  }

  .page-head .actions {
    grid-template-columns: 1fr;
  }

  .pagination-bar {
    justify-content: stretch;
  }

  .pagination-pages,
  .pagination-status {
    width: 100%;
  }

  .pagination-status {
    text-align: center;
  }

  .hero-card {
    min-height: 190px;
  }

  .command-hero-card {
    min-height: 470px;
  }
}

@media (max-width: 768px) {
  .table-shell {
    display: none;
  }

  .mobile-card-list {
    display: grid;
  }
}

@media (max-width: 620px) {
  body {
    overflow-x: hidden;
  }

  .main,
  .login-hero,
  .login-form {
    padding: 20px;
  }

  .login-hero h1 {
    font-size: clamp(18px, 5vw, 26px);
    line-height: 1.45;
  }

  .headline-keep {
    white-space: nowrap;
  }

  .login-hero p {
    font-size: 14px;
    line-height: 1.75;
  }

  .login-note {
    font-size: 13px;
  }

  .login-form {
    gap: 14px;
  }

  .identity-choice {
    padding: 13px;
  }

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

  .identity-choice-btn {
    min-height: 44px;
    font-size: 13px;
  }

  .customer-level-filter-block {
    padding: 12px;
  }

  .customer-level-filter-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  .customer-level-filter-head h3 {
    font-size: 17px;
  }

  .customer-level-pill-row {
    gap: 9px;
  }

  .customer-level-pill {
    min-height: 46px;
    padding: 10px 14px;
    font-size: 14px;
  }

  .customer-level-pill strong {
    min-width: 26px;
    height: 26px;
    font-size: 14px;
  }

  .primary-btn,
  .secondary-btn,
  .ghost-btn,
  .danger-btn {
    min-height: 46px;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-grid {
    gap: 12px;
  }

  .dashboard-command-grid {
    gap: 12px;
  }

  .command-hero-card {
    min-height: 360px;
  }

  .hero-quote {
    font-size: 22px;
  }

  .schedule-line {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .schedule-time {
    display: flex;
    gap: 10px;
    align-items: baseline;
    border-right: 0;
    border-bottom: 1px solid rgba(216, 179, 95, 0.18);
    padding: 0 0 8px;
  }

  .glass-card,
  .panel {
    padding: 15px;
  }

  .page-title h1 {
    font-size: 28px;
  }

  .stat-number {
    font-size: 32px;
  }

  .card-head,
  .reminder-line,
  .person-line {
    align-items: flex-start;
  }

  .service-panel .card-head {
    display: grid;
  }

  .service-head-actions {
    width: 100%;
    justify-content: stretch;
  }

  .service-head-actions .service-add-btn {
    flex: 1;
  }

  .table-shell {
    display: none;
  }

  .mobile-card-list {
    display: grid;
  }

  .dashboard-detail-grid {
    gap: 12px;
  }

  .detail-bucket {
    padding: 12px;
  }

  .modal-backdrop {
    align-items: end;
    padding: 10px;
  }

  .modal-card {
    width: 100%;
    max-height: 92vh;
    border-radius: 16px;
    padding: 16px;
  }

  .modal-actions {
    bottom: -16px;
    margin: 16px -16px -16px;
    padding: 12px 16px;
  }

  textarea {
    min-height: 112px;
  }

  .modal-actions,
  .actions,
  .card-actions {
    display: grid;
  }

  .modal-actions {
    grid-template-columns: 1fr;
    justify-content: stretch;
  }

  .modal-actions button,
  .actions button,
  .card-actions button {
    width: 100%;
    justify-content: center;
  }

  .sidebar-footer {
    position: static;
    margin-top: 28px;
  }
}

@media (max-width: 430px) {
  .login-page {
    padding: 12px;
  }

  .login-card {
    border-radius: 18px;
  }

  .login-copy {
    margin: 34px 0 28px;
  }

  .login-hero h1 {
    font-size: clamp(17px, 4.9vw, 23px);
  }

  .headline-keep {
    letter-spacing: 0;
  }

  .main {
    padding: 16px;
  }

  .topbar {
    gap: 10px;
  }

  .user-pill {
    padding: 7px 10px;
  }

  .avatar {
    width: 28px;
    height: 28px;
  }
}

@media (max-width: 390px) {
  .login-hero h1 {
    font-size: 18px;
  }

  .login-hero,
  .login-form {
    padding: 18px;
  }

  .headline-keep {
    letter-spacing: -0.01em;
  }

  .identity-choice-grid {
    grid-template-columns: 1fr;
  }
}

/* 白金科技版主題覆蓋：保留既有功能與版面，只更新整體視覺語言。 */
body {
  background:
    radial-gradient(circle at 10% 8%, rgba(255, 255, 255, 0.92), transparent 26%),
    radial-gradient(circle at 86% 2%, rgba(222, 200, 149, 0.34), transparent 30%),
    radial-gradient(circle at 76% 86%, rgba(154, 174, 151, 0.16), transparent 28%),
    linear-gradient(135deg, #fbf7ee 0%, #f3eadb 46%, #e9ddc8 100%);
  color: var(--text);
}

input,
select,
textarea {
  border-color: rgba(185, 154, 92, 0.28);
  background: rgba(255, 255, 255, 0.9);
  color: var(--text);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.82);
}

select option {
  background: #fffaf1;
  color: var(--text);
}

input::placeholder,
textarea::placeholder {
  color: rgba(122, 113, 99, 0.72);
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(198, 155, 75, 0.76);
  box-shadow: 0 0 0 3px rgba(202, 164, 95, 0.18);
}

input[aria-invalid="true"],
textarea[aria-invalid="true"] {
  border-color: rgba(177, 78, 54, 0.72);
  box-shadow: 0 0 0 3px rgba(177, 78, 54, 0.12);
}

.field-hint {
  color: #8a8070;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.45;
}

.field-error {
  color: #9c4f38;
  white-space: pre-line;
}

.deal-price-input-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.deal-price-input-wrap input {
  flex: 1;
  min-width: 0;
}

.deal-price-unit {
  flex: 0 0 auto;
  color: var(--muted);
  font-weight: 700;
}

.note-attachments,
.customer-note-images {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(185, 154, 92, 0.26);
  border-radius: 12px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(252, 246, 235, 0.78)),
    rgba(255, 255, 255, 0.82);
  box-shadow: 0 14px 32px rgba(118, 96, 54, 0.08);
}

.note-attachments:focus {
  outline: 2px solid rgba(185, 154, 92, 0.36);
  outline-offset: 2px;
}

.note-attachments-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

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

.note-attachments-head span:not(.note-attachment-badge),
.note-image-meta small {
  color: var(--muted);
  font-size: 0.88rem;
}

.note-attachment-badge {
  flex: 0 0 auto;
  padding: 6px 10px;
  border: 1px solid rgba(185, 154, 92, 0.28);
  border-radius: 999px;
  color: #7c5b1d;
  font-size: 0.78rem;
  font-weight: 800;
  background: rgba(241, 224, 186, 0.54);
}

.note-image-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.note-image-empty {
  width: 100%;
  min-height: 92px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 6px;
  color: #8a8070;
  text-align: center;
  border: 1px dashed rgba(185, 154, 92, 0.42);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.58);
}

.note-image-empty strong {
  color: #57462d;
}

.note-image-empty span {
  font-size: 0.9rem;
}

.note-image-list.readonly {
  margin-top: 4px;
}

.note-image-item {
  position: relative;
  width: 148px;
  display: grid;
  gap: 8px;
  padding: 9px;
  border: 1px solid rgba(185, 154, 92, 0.22);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 10px 24px rgba(118, 96, 54, 0.08);
  overflow: hidden;
}

.note-image-item.readonly {
  color: inherit;
  text-decoration: none;
}

.note-image-item img {
  width: 100%;
  height: 100px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid rgba(185, 154, 92, 0.16);
  background: #fff;
}

.note-image-fallback {
  min-height: 100px;
  display: grid;
  place-items: center;
  text-align: center;
  color: #9c4f38;
  border: 1px dashed rgba(156, 79, 56, 0.28);
  border-radius: 10px;
  background: rgba(255, 246, 242, 0.72);
  font-size: 0.9rem;
  font-weight: 800;
}

.note-image-meta,
.note-image-item.readonly span {
  display: grid;
  gap: 2px;
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 0.9rem;
}

.note-image-delete {
  min-height: 34px;
}

.assignment-lock {
  display: grid;
  gap: 8px;
  padding: 12px 14px;
  border: 1px solid rgba(185, 154, 92, 0.24);
  border-radius: 12px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.82), rgba(248, 240, 224, 0.56)),
    rgba(255, 255, 255, 0.62);
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.assignment-lock strong {
  color: #453f35;
  font-size: 14px;
  font-weight: 900;
}

.resource-pool-card {
  border-style: solid;
}

.joined-chip {
  border-color: rgba(103, 137, 96, 0.28);
  background: rgba(220, 236, 213, 0.76);
  color: #526f45;
}

.resource-summary {
  display: grid;
  gap: 14px;
}

.resource-summary h3 {
  margin: 0;
  color: #34332f;
  font-size: 22px;
}

.login-page {
  background:
    linear-gradient(120deg, rgba(255, 255, 255, 0.66), rgba(246, 236, 217, 0.56)),
    radial-gradient(circle at 18% 18%, rgba(218, 186, 116, 0.28), transparent 30%),
    radial-gradient(circle at 84% 78%, rgba(149, 166, 145, 0.16), transparent 30%);
}

.login-card,
.glass-card,
.panel,
.modal-card {
  border-color: rgba(185, 154, 92, 0.24);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.86), rgba(250, 244, 232, 0.68)),
    rgba(255, 255, 255, 0.72);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.86),
    var(--shadow);
}

.login-card {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(248, 240, 224, 0.8)),
    rgba(255, 255, 255, 0.7);
}

.login-hero {
  background:
    radial-gradient(circle at 24% 56%, rgba(214, 174, 93, 0.3), transparent 30%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.78), rgba(241, 228, 201, 0.6));
}

.login-form h2,
.brand h2,
.page-title h1,
.modal-head h2,
.dashboard-modal-head h2,
.card-head h3,
.hero-content h2 {
  color: #34332f;
}

.login-hero h1 {
  color: #2f2f2b;
}

.login-hero p,
.login-note,
.field,
.checkbox-field {
  color: var(--muted) !important;
}

.login-note {
  border-top-color: rgba(185, 154, 92, 0.24);
}

.eyebrow {
  color: var(--primary-dark);
}

.test-warning {
  border-color: rgba(202, 164, 95, 0.34);
  background: rgba(255, 249, 233, 0.82);
  color: #7a5c24;
}

.primary-btn {
  background: linear-gradient(135deg, #9a7438, #d4af66 48%, #fff0bf);
  color: #2b2110;
  box-shadow: 0 14px 28px rgba(177, 137, 62, 0.22);
}

.secondary-btn,
.ghost-btn,
.mini-btn {
  border-color: rgba(185, 154, 92, 0.28);
  background: rgba(255, 255, 255, 0.64);
  color: #4a453c;
}

.secondary-btn:hover,
.ghost-btn:hover,
.mini-btn:hover {
  border-color: rgba(198, 155, 75, 0.58);
  background: rgba(255, 248, 232, 0.92);
}

.danger-btn {
  border-color: rgba(183, 93, 85, 0.32);
  background: rgba(183, 93, 85, 0.08);
  color: #9c4039;
}

.app-layout {
  background:
    radial-gradient(circle at 24% 0%, rgba(255, 255, 255, 0.8), transparent 28%),
    linear-gradient(135deg, #fbf7ee 0%, #f2eadc 55%, #e9decb 100%);
}

.sidebar {
  border-right-color: rgba(185, 154, 92, 0.22);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.86), rgba(246, 238, 223, 0.82)),
    rgba(255, 255, 255, 0.74);
  box-shadow: 12px 0 36px rgba(118, 96, 54, 0.09);
}

.nav button {
  color: #6f675b;
}

.nav button.active,
.nav button:hover {
  background:
    linear-gradient(135deg, rgba(214, 184, 116, 0.28), rgba(255, 249, 233, 0.78));
  color: #2f2f2b;
  box-shadow: inset 3px 0 0 rgba(202, 164, 95, 0.78);
}

.sidebar-footer {
  color: var(--muted);
}

.data-view-control,
.user-pill,
.user-menu,
.type-filter-card,
.recruiting-filter-card,
.customer-level-filter-block,
.customer-level-pill,
.customer-card,
.timeline-card,
.dashboard-row,
.mobile-data-card,
.detail-bucket {
  border-color: rgba(185, 154, 92, 0.22);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.78), rgba(250, 244, 232, 0.58)),
    rgba(255, 255, 255, 0.66);
  color: var(--text);
}

.data-view-label,
.click-hint,
.status-chip {
  border-color: rgba(202, 164, 95, 0.28);
  background: rgba(238, 220, 181, 0.54);
  color: #755721;
}

.user-menu {
  box-shadow: 0 18px 52px rgba(118, 96, 54, 0.18);
}

.user-pill:hover {
  border-color: rgba(202, 164, 95, 0.58);
  background: rgba(255, 249, 233, 0.92);
}

.avatar {
  background: linear-gradient(135deg, #b88a42, #dfc077, #fff1c2);
  color: #2d2110;
}

.command-hero-card {
  border-color: rgba(190, 153, 84, 0.32);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.62) 0%, rgba(250, 241, 223, 0.74) 52%, rgba(235, 219, 190, 0.92) 100%),
    radial-gradient(circle at 48% 50%, rgba(255, 238, 190, 0.78) 0 1.2%, rgba(211, 169, 84, 0.5) 1.5% 2.6%, rgba(211, 169, 84, 0.24) 2.7% 15%, transparent 34%),
    radial-gradient(ellipse at 48% 56%, rgba(211, 169, 84, 0.28), transparent 47%),
    linear-gradient(104deg, transparent 0 20%, rgba(255, 244, 211, 0.58) 36%, transparent 60%),
    linear-gradient(256deg, transparent 0 14%, rgba(211, 169, 84, 0.18) 38%, transparent 68%),
    repeating-linear-gradient(90deg, rgba(128, 112, 78, 0.055) 0 1px, transparent 1px 88px),
    repeating-linear-gradient(0deg, rgba(128, 112, 78, 0.04) 0 1px, transparent 1px 74px),
    linear-gradient(135deg, #fffdf7 0%, #f4ead9 42%, #e7d9bf 100%);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.58),
    inset 0 -150px 170px rgba(214, 184, 116, 0.16),
    0 28px 76px rgba(118, 96, 54, 0.16);
}

.command-hero-card::before {
  background:
    linear-gradient(90deg, transparent 0 3%, rgba(104, 91, 65, 0.24) 3% 6%, transparent 6% 9%, rgba(93, 80, 56, 0.28) 9% 12%, transparent 12% 15%, rgba(85, 74, 52, 0.3) 15% 19%, transparent 19% 24%, rgba(100, 86, 59, 0.25) 24% 28%, transparent 28% 32%, rgba(88, 76, 52, 0.28) 32% 36%, transparent 36% 41%, rgba(104, 91, 65, 0.24) 41% 44%, transparent 44% 50%, rgba(88, 76, 52, 0.29) 50% 54%, transparent 54% 59%, rgba(104, 91, 65, 0.22) 59% 62%, transparent 62% 66%, rgba(95, 82, 58, 0.26) 66% 70%, transparent 70% 76%, rgba(88, 76, 52, 0.28) 76% 80%, transparent 80% 85%, rgba(104, 91, 65, 0.22) 85% 88%, transparent 88% 100%) 0 58% / 100% 28% no-repeat,
    repeating-linear-gradient(90deg, rgba(180, 145, 75, 0.16) 0 1px, transparent 1px 22px) 0 58% / 100% 28% no-repeat,
    linear-gradient(to top, rgba(182, 153, 96, 0.26) 0%, rgba(241, 228, 201, 0.48) 34%, transparent 70%);
  opacity: 0.9;
}

.command-hero-card::after {
  background:
    linear-gradient(76deg, transparent 0 42%, rgba(201, 161, 84, 0.32) 49%, transparent 57%) 0 52% / 100% 48% no-repeat,
    linear-gradient(104deg, transparent 0 39%, rgba(221, 190, 120, 0.24) 48%, transparent 58%) 0 52% / 100% 48% no-repeat,
    linear-gradient(90deg, transparent 0 44%, rgba(201, 161, 84, 0.28) 49.8%, rgba(255, 247, 226, 0.72) 50%, rgba(201, 161, 84, 0.22) 50.2%, transparent 56%) 0 56% / 100% 44% no-repeat,
    repeating-linear-gradient(90deg, rgba(132, 112, 74, 0.12) 0 1px, transparent 1px 54px) 0 68% / 100% 32% no-repeat,
    repeating-linear-gradient(0deg, rgba(132, 112, 74, 0.08) 0 1px, transparent 1px 42px) 0 68% / 100% 32% no-repeat,
    linear-gradient(to top, rgba(255, 255, 255, 0.45), transparent 44%);
  opacity: 0.76;
}

.command-hero-card .hero-content {
  filter: none;
}

.command-hero-card .hero-content h2 {
  color: #34332f;
  text-shadow: 0 18px 44px rgba(255, 255, 255, 0.52);
}

.command-hero-card .hero-content .muted {
  color: rgba(74, 70, 61, 0.78);
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.55);
}

.hero-content .eyebrow {
  color: #9c7435;
  text-shadow: none;
}

.hero-quote {
  color: #9b712e;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.72);
}

.hero-quote::before {
  color: rgba(172, 128, 52, 0.58);
}

.action-energy-panel {
  border-color: rgba(185, 154, 92, 0.26);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.74), rgba(244, 232, 205, 0.58)),
    rgba(255, 255, 255, 0.66);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.86),
    0 18px 40px rgba(118, 96, 54, 0.1);
}

.energy-head span,
.schedule-main strong,
.schedule-time span,
.dashboard-table td,
.service-content,
.type-filter-card span,
.recruiting-filter-card span,
.customer-level-pill span {
  color: #4a453c;
}

.energy-head strong,
.schedule-time strong,
.type-filter-card strong,
.recruiting-filter-card strong,
.customer-level-pill strong,
.mobile-data-card b,
.form-section h3 {
  color: #9b712e;
}

.energy-bar {
  border-color: rgba(185, 154, 92, 0.26);
  background: rgba(214, 202, 177, 0.46);
}

.energy-bar::after {
  background: repeating-linear-gradient(90deg, transparent 0 18px, rgba(255, 255, 255, 0.46) 18px 19px);
}

.energy-bar span {
  background: linear-gradient(90deg, #a77a37, #d6b46c, #fff0bd);
  box-shadow:
    0 0 20px rgba(202, 164, 95, 0.38),
    inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.command-schedule-card,
.command-todo-card {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.84), rgba(250, 244, 232, 0.62)),
    rgba(255, 255, 255, 0.72);
}

.schedule-range-btn {
  border-color: rgba(185, 154, 92, 0.24);
  background: rgba(255, 255, 255, 0.68);
  color: #766c5d;
}

.schedule-range-btn:hover,
.schedule-range-btn:focus-visible,
.schedule-range-btn.active {
  border-color: rgba(202, 164, 95, 0.62);
  background:
    linear-gradient(135deg, rgba(214, 184, 116, 0.34), rgba(255, 249, 233, 0.9));
  color: #6f501d;
  box-shadow: 0 10px 24px rgba(177, 137, 62, 0.1);
}

.dashboard-click:hover,
.dashboard-click:focus-visible,
.dashboard-click.active,
.clickable-customer-card:hover,
.clickable-customer-card:focus-visible,
.clickable-line:hover,
.clickable-line:focus-visible,
.dashboard-row:hover,
.dashboard-row:focus-visible,
.mobile-data-card:hover,
.mobile-data-card:focus-visible,
.type-filter-card:hover,
.type-filter-card:focus-visible,
.type-filter-card.active,
.recruiting-filter-card:hover,
.recruiting-filter-card:focus-visible,
.recruiting-filter-card.active,
.customer-level-pill:hover,
.customer-level-pill:focus-visible,
.customer-level-pill.active {
  border-color: rgba(202, 164, 95, 0.62);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.86), rgba(244, 232, 205, 0.74));
  box-shadow: 0 18px 42px rgba(118, 96, 54, 0.13);
}

.customer-level-filter-block {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.72), rgba(250, 244, 232, 0.52)),
    rgba(255, 255, 255, 0.58);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.customer-level-filter-head h3 {
  color: #34332f;
}

.customer-level-filter-head p,
.customer-level-kicker {
  color: #827766;
}

.customer-level-pill {
  border-color: rgba(185, 154, 92, 0.26);
  background: rgba(255, 255, 255, 0.72);
  color: #4a453c;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.78),
    0 8px 18px rgba(118, 96, 54, 0.06);
}

.customer-level-pill strong {
  background: rgba(238, 220, 181, 0.6);
  color: #8a6428;
}

.customer-level-pill.active {
  border-color: rgba(202, 164, 95, 0.72);
  background:
    linear-gradient(135deg, rgba(214, 184, 116, 0.38), rgba(255, 249, 233, 0.94));
  color: #4a3820;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.86),
    0 14px 28px rgba(177, 137, 62, 0.14);
}

.customer-level-pill.active strong {
  background: rgba(255, 255, 255, 0.64);
  color: #76551f;
}

.active-detail,
.data-viewer-card {
  border-color: rgba(202, 164, 95, 0.34);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.86), rgba(248, 240, 224, 0.68));
}

.table-shell {
  border-color: rgba(185, 154, 92, 0.22);
  background: rgba(255, 255, 255, 0.55);
}

.dashboard-table th {
  background: rgba(242, 230, 205, 0.96);
  color: #806022;
}

.dashboard-table td {
  border-bottom-color: rgba(185, 154, 92, 0.14);
}

.dashboard-table-row:hover,
.dashboard-table-row:focus-visible {
  background: rgba(244, 232, 205, 0.6);
  box-shadow: inset 3px 0 0 rgba(202, 164, 95, 0.72);
}

.card-description {
  color: rgba(104, 94, 80, 0.82);
}

.chip,
.status-chip,
.level-chip,
.private-chip {
  border-color: rgba(185, 154, 92, 0.22);
  background: rgba(244, 232, 205, 0.62);
  color: #74551f;
}

.schedule-empty-state,
.empty {
  border-color: rgba(185, 154, 92, 0.28);
  background:
    radial-gradient(circle at 20% 20%, rgba(214, 184, 116, 0.18), transparent 42%),
    rgba(255, 255, 255, 0.66);
  color: var(--muted);
}

.schedule-empty-state strong {
  color: #74551f;
}

.schedule-line,
.command-schedule-card .schedule-line,
.reminder-line,
.person-line {
  border-color: rgba(185, 154, 92, 0.22);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.82), rgba(248, 240, 224, 0.58)),
    rgba(255, 255, 255, 0.7);
}

.schedule-time,
.command-schedule-card .schedule-time {
  border-right-color: rgba(185, 154, 92, 0.22);
}

.timeline::before {
  background: linear-gradient(180deg, rgba(202, 164, 95, 0.74), rgba(202, 164, 95, 0.1));
}

.timeline-dot {
  background: var(--primary);
  box-shadow: 0 0 0 6px rgba(202, 164, 95, 0.14);
}

.service-record-card:hover,
.service-record-card:focus-visible {
  border-color: rgba(202, 164, 95, 0.66);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(244, 232, 205, 0.78));
  box-shadow: 0 18px 42px rgba(118, 96, 54, 0.13);
}

.service-detail-content {
  border-color: rgba(185, 154, 92, 0.22);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.82), rgba(248, 240, 224, 0.58)),
    rgba(255, 255, 255, 0.7);
  color: #4a453c;
}

.highlight-service .timeline-card {
  border-color: rgba(202, 164, 95, 0.66);
  background:
    linear-gradient(135deg, rgba(255, 248, 232, 0.92), rgba(239, 224, 188, 0.48)),
    rgba(255, 255, 255, 0.8);
}

.form-section {
  border-color: rgba(185, 154, 92, 0.2);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.78), rgba(248, 240, 224, 0.56));
}

.modal-backdrop {
  background: rgba(105, 96, 78, 0.28);
  backdrop-filter: blur(8px);
}

.dashboard-data-modal {
  background:
    radial-gradient(circle at 50% 18%, rgba(214, 184, 116, 0.18), transparent 38%),
    rgba(105, 96, 78, 0.3);
}

.dashboard-data-modal .modal-card {
  border-color: rgba(185, 154, 92, 0.32);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.94), rgba(248, 240, 224, 0.86)),
    rgba(255, 255, 255, 0.88);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.88),
    0 28px 84px rgba(118, 96, 54, 0.2);
}

.dashboard-modal-head {
  border-bottom-color: rgba(185, 154, 92, 0.2);
}

.modal-actions {
  border-top-color: rgba(185, 154, 92, 0.2);
  background: rgba(255, 250, 241, 0.94);
}

.auto-link {
  color: #8f681f;
  text-decoration-color: rgba(202, 164, 95, 0.62);
}

.auto-link:hover,
.auto-link:focus-visible {
  color: #5f4515;
  text-decoration-color: rgba(143, 104, 31, 0.95);
}

.linked-text-block {
  border-top-color: rgba(185, 154, 92, 0.18);
}

.pagination-bar {
  border-top-color: rgba(185, 154, 92, 0.16);
}

.pagination-btn {
  border-color: rgba(185, 154, 92, 0.24);
  background: rgba(255, 255, 255, 0.7);
  color: #4a453c;
}

.pagination-btn:hover,
.pagination-btn:focus-visible,
.pagination-btn.active {
  border-color: rgba(202, 164, 95, 0.66);
  background: rgba(244, 232, 205, 0.82);
}

.warning {
  color: #9b712e;
}

@media (max-width: 900px) {
  .sidebar {
    background:
      linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(246, 238, 223, 0.94)),
      rgba(255, 255, 255, 0.92);
    box-shadow: 18px 0 50px rgba(118, 96, 54, 0.18);
  }
}

@media (max-width: 620px) {
  .schedule-time {
    border-bottom-color: rgba(185, 154, 92, 0.2);
  }
}

/* 首頁白金科技版質感微調 */
.dashboard-command-grid .glass-card,
.dashboard-lower-grid .glass-card {
  border-color: rgba(190, 155, 86, 0.28);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.9), rgba(250, 244, 232, 0.72)),
    rgba(255, 255, 255, 0.76);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.92),
    0 20px 54px rgba(118, 96, 54, 0.14),
    0 0 0 1px rgba(255, 255, 255, 0.28);
}

.dashboard-command-grid .glass-card:hover,
.dashboard-lower-grid .dashboard-click:hover,
.dashboard-lower-grid .dashboard-click:focus-visible {
  transform: translateY(-2px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.95),
    0 24px 64px rgba(118, 96, 54, 0.18),
    0 0 34px rgba(214, 184, 116, 0.14);
}

.command-hero-card {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.58) 0%, rgba(250, 243, 229, 0.72) 44%, rgba(235, 219, 190, 0.94) 100%),
    radial-gradient(circle at 22% 72%, rgba(255, 247, 219, 0.92) 0 1.5%, rgba(213, 169, 82, 0.52) 1.7% 3.2%, rgba(213, 169, 82, 0.22) 3.3% 20%, transparent 42%),
    radial-gradient(circle at 68% 24%, rgba(222, 190, 126, 0.24), transparent 28%),
    radial-gradient(circle at 82% 76%, rgba(175, 157, 104, 0.18) 0 1px, transparent 2px),
    radial-gradient(circle at 72% 58%, rgba(175, 157, 104, 0.16) 0 1px, transparent 2px),
    radial-gradient(circle at 56% 69%, rgba(175, 157, 104, 0.14) 0 1px, transparent 2px),
    linear-gradient(68deg, transparent 0 28%, rgba(201, 161, 84, 0.2) 38%, transparent 51%),
    linear-gradient(104deg, transparent 0 20%, rgba(255, 246, 218, 0.62) 34%, transparent 57%),
    repeating-linear-gradient(90deg, rgba(132, 112, 74, 0.06) 0 1px, transparent 1px 82px),
    repeating-linear-gradient(0deg, rgba(132, 112, 74, 0.045) 0 1px, transparent 1px 66px),
    linear-gradient(135deg, #fffdf8 0%, #f4ead9 42%, #e8dac2 100%);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.72),
    inset 0 -130px 160px rgba(214, 184, 116, 0.15),
    0 26px 76px rgba(118, 96, 54, 0.18),
    0 0 48px rgba(214, 184, 116, 0.12);
}

.command-hero-card::before {
  background:
    linear-gradient(90deg, transparent 0 3%, rgba(93, 80, 56, 0.2) 3% 6%, transparent 6% 9%, rgba(85, 72, 50, 0.26) 9% 12%, transparent 12% 15%, rgba(78, 68, 48, 0.3) 15% 19%, transparent 19% 24%, rgba(96, 82, 56, 0.23) 24% 28%, transparent 28% 32%, rgba(84, 72, 50, 0.27) 32% 36%, transparent 36% 41%, rgba(100, 86, 59, 0.22) 41% 44%, transparent 44% 50%, rgba(82, 70, 49, 0.28) 50% 54%, transparent 54% 59%, rgba(101, 88, 63, 0.2) 59% 62%, transparent 62% 66%, rgba(93, 80, 58, 0.24) 66% 70%, transparent 70% 76%, rgba(84, 72, 50, 0.28) 76% 80%, transparent 80% 85%, rgba(100, 86, 59, 0.2) 85% 88%, transparent 88% 100%) 0 57% / 100% 30% no-repeat,
    repeating-linear-gradient(90deg, rgba(180, 145, 75, 0.16) 0 1px, transparent 1px 22px) 0 57% / 100% 30% no-repeat,
    linear-gradient(73deg, transparent 0 44%, rgba(182, 141, 62, 0.2) 49%, transparent 54%) 0 58% / 100% 42% no-repeat,
    linear-gradient(107deg, transparent 0 39%, rgba(222, 190, 120, 0.22) 48%, transparent 59%) 0 58% / 100% 42% no-repeat,
    linear-gradient(to top, rgba(182, 153, 96, 0.24) 0%, rgba(241, 228, 201, 0.42) 34%, transparent 72%);
  opacity: 0.94;
}

.command-hero-card::after {
  background:
    linear-gradient(78deg, transparent 0 43%, rgba(188, 146, 62, 0.34) 49%, transparent 56%) 0 55% / 100% 45% no-repeat,
    linear-gradient(101deg, transparent 0 39%, rgba(225, 195, 130, 0.26) 48%, transparent 59%) 0 55% / 100% 45% no-repeat,
    linear-gradient(90deg, transparent 0 44%, rgba(201, 161, 84, 0.28) 49.8%, rgba(255, 248, 226, 0.8) 50%, rgba(201, 161, 84, 0.24) 50.2%, transparent 57%) 0 56% / 100% 44% no-repeat,
    repeating-linear-gradient(90deg, rgba(132, 112, 74, 0.13) 0 1px, transparent 1px 48px) 0 68% / 100% 32% no-repeat,
    repeating-linear-gradient(0deg, rgba(132, 112, 74, 0.08) 0 1px, transparent 1px 38px) 0 68% / 100% 32% no-repeat,
    radial-gradient(circle at 24% 67%, rgba(255, 246, 210, 0.62), transparent 18%),
    linear-gradient(to top, rgba(255, 255, 255, 0.5), transparent 44%);
  opacity: 0.82;
}

.hero-quote {
  width: fit-content;
  border-left: 3px solid rgba(190, 145, 62, 0.48);
  border-radius: 0 14px 14px 0;
  padding: 12px 18px 12px 20px;
  background:
    linear-gradient(90deg, rgba(255, 249, 233, 0.78), rgba(255, 255, 255, 0.22));
  color: #8e641f;
  box-shadow: 0 16px 40px rgba(118, 96, 54, 0.08);
}

.primary-btn {
  background:
    linear-gradient(135deg, #a67834 0%, #d5b36c 48%, #fff0bf 100%);
  color: #2c2110;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.45),
    0 14px 30px rgba(177, 137, 62, 0.24);
}

.primary-btn:hover,
.primary-btn:focus-visible {
  filter: brightness(1.04);
  transform: translateY(-1px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.55),
    0 18px 36px rgba(177, 137, 62, 0.28);
}

.secondary-btn,
.ghost-btn {
  border-color: rgba(185, 154, 92, 0.34);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.82), rgba(255, 248, 232, 0.58));
}

.sidebar {
  border-right-color: rgba(185, 154, 92, 0.3);
  box-shadow:
    inset -1px 0 0 rgba(214, 184, 116, 0.22),
    14px 0 38px rgba(118, 96, 54, 0.1);
}

.nav button {
  display: flex;
  align-items: center;
  gap: 8px;
  border-left: 2px solid transparent;
}

.nav button.active,
.nav button:hover {
  border-left-color: rgba(190, 145, 62, 0.58);
  background:
    linear-gradient(135deg, rgba(238, 220, 181, 0.5), rgba(255, 252, 244, 0.82));
  box-shadow:
    inset 2px 0 0 rgba(202, 164, 95, 0.48),
    0 10px 24px rgba(118, 96, 54, 0.08);
}

.sidebar-footer {
  border: 1px solid rgba(185, 154, 92, 0.22);
  border-radius: 14px;
  padding: 12px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.76), rgba(250, 244, 232, 0.62));
  box-shadow: 0 14px 34px rgba(118, 96, 54, 0.1);
}

.command-schedule-card,
.command-todo-card {
  border-color: rgba(190, 155, 86, 0.3);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.92),
    0 18px 48px rgba(118, 96, 54, 0.13),
    0 0 34px rgba(214, 184, 116, 0.08);
}

.command-schedule-card .schedule-line,
.command-todo-card .reminder-line {
  border-color: rgba(185, 154, 92, 0.24);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(248, 240, 224, 0.68));
  box-shadow: 0 8px 22px rgba(118, 96, 54, 0.07);
}

.command-schedule-card .schedule-time {
  border-right-color: rgba(185, 154, 92, 0.24);
}

.command-schedule-card .schedule-time strong {
  color: #8a631f;
  font-size: 15px;
}

.command-schedule-card .schedule-time span {
  color: #3f3b33;
  font-size: 16px;
  font-weight: 950;
}

.schedule-range-btn {
  border-color: rgba(185, 154, 92, 0.28);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.84), rgba(242, 236, 222, 0.72));
}

.schedule-range-btn.active {
  background:
    linear-gradient(135deg, rgba(222, 192, 126, 0.52), rgba(255, 252, 244, 0.92));
}

.command-todo-card .empty {
  position: relative;
  padding: 16px 16px 16px 44px;
  text-align: left;
}

.command-todo-card .empty::before {
  content: "!";
  position: absolute;
  left: 16px;
  top: 16px;
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(238, 220, 181, 0.82);
  color: #8a631f;
  font-size: 13px;
  font-weight: 950;
}

.activity-log-panel {
  gap: 18px;
}

.activity-log-filters {
  align-items: end;
  justify-content: flex-start;
}

.activity-log-filters .compact-field {
  min-width: 180px;
}

.activity-log-search {
  flex: 1 1 320px;
}

.activity-log-table {
  min-width: 920px;
}

.activity-log-table th:nth-child(1),
.activity-log-table td:nth-child(1) {
  min-width: 150px;
}

.activity-log-table th:nth-child(2),
.activity-log-table td:nth-child(2) {
  min-width: 128px;
}

.activity-log-table th:nth-child(7),
.activity-log-table td:nth-child(7) {
  min-width: 220px;
}

.activity-action-chip {
  white-space: nowrap;
}

.activity-log-card {
  cursor: default;
}

.activity-log-card:hover,
.activity-log-card:focus-visible {
  transform: none;
}

/* 手機版第一階段 RWD 優化 */
.sidebar-scrim {
  display: none;
}

@media (max-width: 768px) {
  .note-attachments-head {
    grid-template-columns: 1fr;
    display: grid;
  }

  .note-image-item {
    width: min(46vw, 150px);
  }

  html,
  body,
  #app {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow-x: hidden;
  }

  body {
    min-width: 0;
  }

  #app {
    min-height: 100dvh;
    max-width: 100vw;
  }

  input,
  select,
  textarea,
  .login-card input,
  .login-panel input {
    font-size: 16px !important;
  }

  button {
    touch-action: manipulation;
  }

  .app-layout {
    display: block;
    width: 100%;
    max-width: 100vw;
    min-width: 0;
    overflow-x: hidden;
    min-height: 100vh;
  }

  .main {
    width: 100%;
    max-width: 100vw;
    min-width: 0;
    overflow-x: hidden;
    padding: 14px;
    padding-bottom: calc(22px + env(safe-area-inset-bottom));
  }

  #viewRoot,
  .page,
  .login-page,
  .login-card,
  .dashboard-table,
  .customer-query-table .dashboard-table,
  .activity-log-table {
    max-width: 100%;
    min-width: 0;
    overflow-x: hidden;
  }

  .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 44;
    width: min(86vw, 330px);
    max-width: 86vw;
    height: 100dvh;
    padding: 22px 16px calc(18px + env(safe-area-inset-bottom));
    overflow-y: auto;
    transform: translateX(-105%);
    transition: transform 0.22s ease;
    border-right: 1px solid rgba(185, 154, 92, 0.24);
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .sidebar-scrim {
    position: fixed;
    inset: 0;
    z-index: 40;
    display: block;
    pointer-events: none;
    opacity: 0;
    border: 0;
    background: rgba(62, 54, 42, 0.38);
    backdrop-filter: blur(2px);
    transition: opacity 0.18s ease;
  }

  .sidebar-scrim.open {
    pointer-events: auto;
    opacity: 1;
  }

  .brand {
    margin-bottom: 18px;
  }

  .brand h2 {
    font-size: 17px;
  }

  .nav {
    gap: 10px;
  }

  .nav button {
    min-height: 46px;
    padding: 12px 14px;
    font-size: 15px;
  }

  .sidebar-footer {
    position: static;
    margin-top: 22px;
    padding-top: 14px;
    border-top: 1px solid rgba(185, 154, 92, 0.2);
  }

  .topbar {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 10px;
    margin-bottom: 14px;
  }

  .mobile-menu {
    display: inline-flex;
    min-height: 40px;
    width: fit-content;
    padding: 0 14px;
  }

  .topbar .actions {
    grid-column: 1 / -1;
    grid-row: 2;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    width: 100%;
  }

  .topbar .actions .scope-select {
    grid-column: 1 / -1;
    width: 100%;
  }

  .topbar .actions button,
  .topbar .actions select {
    width: 100%;
    min-height: 40px;
    padding: 8px 10px;
    font-size: 13px;
  }

  .user-menu-wrap {
    justify-self: end;
    min-width: 0;
  }

  .user-pill {
    max-width: 190px;
    min-height: 40px;
    padding: 6px 9px;
  }

  .user-pill span:last-child {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .user-menu {
    right: 0;
    width: min(82vw, 280px);
  }

  .page-head {
    display: grid;
    gap: 10px;
    margin-bottom: 12px;
  }

  .page-title {
    min-width: 0;
  }

  .page-title h1 {
    font-size: 23px;
    line-height: 1.25;
  }

  .page-title p {
    font-size: 13px;
    line-height: 1.55;
  }

  .page-head .actions,
  .actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    width: 100%;
  }

  .page-head .actions button,
  .actions button {
    width: 100%;
    justify-content: center;
  }

  .glass-card,
  .panel,
  .customer-card,
  .person-line,
  .mobile-data-card,
  .detail-bucket,
  .form-section {
    max-width: 100%;
    border-radius: 14px;
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  .glass-card,
  .panel {
    padding: 14px;
    margin-bottom: 12px;
  }

  .dashboard-grid,
  .dashboard-command-grid,
  .dashboard-lower-grid,
  .dashboard-detail-grid,
  .detail-grid,
  .customer-grid,
  .resource-pool-grid {
    grid-template-columns: 1fr !important;
    gap: 12px;
  }

  .dashboard-command-grid {
    grid-template-rows: none !important;
    grid-auto-rows: auto;
    align-items: start;
  }

  .dashboard-command-grid > .glass-card,
  .command-hero-card,
  .command-schedule-card,
  .command-todo-card {
    grid-column: auto !important;
    grid-row: auto !important;
    align-self: start;
    height: auto !important;
    max-height: none !important;
    overflow: visible;
  }

  .command-hero-card {
    min-height: 300px;
    padding: 18px;
  }

  .command-schedule-card,
  .command-todo-card {
    min-height: 0 !important;
    padding: 14px;
  }

  .command-schedule-card .schedule-list,
  .command-todo-card .list,
  .command-schedule-card .empty,
  .command-todo-card .empty,
  .schedule-empty-state {
    margin-top: 10px;
  }

  .schedule-empty-state {
    padding: 12px;
  }

  .schedule-view-all {
    width: 100%;
  }

  .hero-content h2 {
    font-size: 25px;
  }

  .hero-quote {
    font-size: 18px;
    line-height: 1.55;
  }

  .action-energy-panel {
    padding: 12px;
  }

  .stat-number {
    font-size: 28px;
  }

  .filter-row,
  .query-search-row,
  .activity-log-filters {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .filter-row input,
  .filter-row select,
  .query-search-row input,
  .query-search-row select,
  .activity-log-filters input,
  .activity-log-filters select {
    width: 100%;
    max-width: none;
    min-width: 0;
  }

  .type-filter-grid,
  .recruiting-filter-grid,
  .customer-level-pill-row,
  .resource-store-switcher {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }

  .type-filter-card {
    flex: 1 1 142px;
    min-height: 72px;
    padding: 12px;
  }

  .customer-level-pill,
  .resource-store-pill {
    flex: 1 1 calc(50% - 8px);
    min-width: 0;
    min-height: 42px;
    padding: 8px 11px;
  }

  .customer-card {
    padding: 14px;
  }

  .card-head,
  .person-line,
  .reminder-line {
    display: grid;
    align-items: start;
    gap: 10px;
  }

  .customer-meta,
  .detail-grid,
  .detail-bucket,
  .service-content,
  .resource-summary,
  .resource-claimants {
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  .card-actions,
  .service-head-actions,
  .modal-head-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    width: 100%;
  }

  .card-actions button,
  .service-head-actions button,
  .modal-head-actions button {
    width: 100%;
    min-height: 42px;
    justify-content: center;
    white-space: normal;
  }

  .person-line .actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .service-panel .card-head,
  .service-card .card-head {
    display: grid;
  }

  .service-add-btn,
  .service-head-actions .service-add-btn {
    min-height: 46px;
  }

  .form-grid,
  .form-section .form-grid {
    grid-template-columns: 1fr !important;
    gap: 10px;
  }

  .form-section {
    padding: 13px;
    gap: 11px;
  }

  .field {
    gap: 6px;
  }

  input,
  select,
  textarea {
    min-width: 0;
    padding: 10px 11px;
  }

  textarea {
    min-height: 90px;
  }

  .identity-choice {
    padding: 12px;
  }

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

  .identity-choice-btn {
    min-height: 44px;
    padding: 8px;
    font-size: 13px;
    white-space: normal;
  }

  .modal-backdrop {
    align-items: end;
    padding: 10px;
    padding-bottom: max(10px, env(safe-area-inset-bottom));
  }

  .modal-card {
    width: 100%;
    max-width: 100%;
    max-height: 92dvh;
    padding: 15px;
    border-radius: 16px 16px 0 0;
  }

  .modal-head,
  .dashboard-modal-head {
    display: grid;
    gap: 10px;
    align-items: start;
  }

  .modal-head h2,
  .dashboard-modal-head h2 {
    font-size: 20px;
    line-height: 1.3;
  }

  .modal-actions {
    position: sticky;
    bottom: -15px;
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    margin: 14px -15px -15px;
    padding: 12px 15px calc(12px + env(safe-area-inset-bottom));
  }

  .modal-actions button {
    width: 100%;
    min-height: 46px;
  }

  .dashboard-data-modal .modal-card {
    width: 100%;
    max-height: 92dvh;
  }

  .table-shell {
    display: none;
  }

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

@media (max-width: 430px) {
  .main {
    padding: 12px;
  }

  .topbar {
    margin-bottom: 12px;
  }

  .page-title h1 {
    font-size: 21px;
  }

  .glass-card,
  .panel {
    padding: 12px;
  }

  .command-hero-card {
    min-height: 280px;
  }

  .card-actions,
  .service-head-actions,
  .person-line .actions {
    grid-template-columns: 1fr;
  }

  .customer-level-pill,
  .resource-store-pill {
    flex-basis: 100%;
  }
}
