:root {
  --bg: #f5f8fc;
  --surface: #ffffff;
  --surface-soft: #f8fbff;
  --surface-disabled: #e7e7e7;
  --line: #d9e4f2;
  --text: #1f2937;
  --text-main: #0f172a;
  --text-sub: #475569;
  --muted: #6b7280;
  --primary: #2563eb;
  --primary-soft: #dbeafe;
  --secoundary: #9333ea;
  --danger: #dc2626;
  --success: #059669;
  --work-soft: #dcfce7;
  --holiday-soft: #ffe4e6;
  --leave-soft: #eff6ff;
  --shadow: 0 10px 30px rgba(37, 99, 235, 0.08);
  --radius: 12px;
  --btn-hover-soft: #acd3ff;
}

* { box-sizing: border-box; }
html, body { height: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "BIZ UDGothic", "BIZ UDPGothic", "Hiragino Sans", "Yu Gothic", sans-serif;
}

a {
  color: inherit;
  text-decoration: none;
}

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

.app-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.page {
  width: min(1320px, calc(100% - 32px));
  margin: 24px auto 40px;
}

.page-title {
  margin-bottom: 14px;
  /* padding: 24px 28px; */
  /* border: 1px solid var(--line); */
  /* border-radius: 20px; */
  /* background: linear-gradient(135deg, #ffffff 0%, #f8fbff 100%); */
  /* box-shadow: 0 10px 30px rgba(15, 23, 42, 0.05); */
}

.page-title h1 {
  margin: 0;
  color: var(--text-main);
  font-size: 32px;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: 0.02em;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  /* box-shadow: var(--shadow); */
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  font-weight: 700;
}

.brand-badge {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--primary), #60a5fa);
  color: #fff;
  font-weight: 800;
}

.brand-title {
  font-size: 16px;
  font-weight: 800;
  line-height: 1.2;
}

.brand-subtitle {
  font-size: 12px;
  line-height: 1.2;
}

.top-links {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.hamburger {
  display: none;
  position: relative;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}

.hamburger span,
.hamburger::before,
.hamburger::after {
  content: "";
  display: block;
  width: 18px;
  height: 2px;
  margin: 0 auto;
  border-radius: 999px;
  background: var(--text);
}

.hamburger::before,
.hamburger::after {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

.hamburger::before { top: 13px; }
.hamburger::after { bottom: 13px; }

.badge-tenant {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 13px;
  font-weight: 700;
}

.btn,
.chip-btn,
.link-btn {
  cursor: pointer;
  transition: .2s ease;
}

.btn {
  padding: 12px 18px;
  border: none;
  border-radius: var(--radius);
  font-weight: 700;
}

.btn:hover {
  background: var(--btn-hover-soft);
  transform: translateY(-1px);
}

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

.btn-secondary {
  background: var(--primary-soft);
  color: var(--primary);
}

.btn-outline {
  background: #fff;
  color: var(--text);
  border: 1px solid var(--line);
}

.btn-danger {
  background: #fee2e2;
  color: var(--danger);
}

.btn-disabled {
  pointer-events: none;
  background: var(--surface-disabled);
  color: var(--muted);
}

.link-btn {
  border: none;
  background: transparent;
  padding: 0;
  color: var(--primary);
  font-weight: 700;
}

.chip-btn {
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
}

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

.field {
  gap: 8px;
}

.field label {
  font-size: 14px;
  font-weight: 700;
}

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

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

.time-unset {
  color: #bbb;
}

.section {
  margin-bottom: 20px;
  padding: 20px;
}

.section-title {
  margin: 0;
  font-size: 20px;
}

.subtle {
  margin: 0.5rem 0 ; /* 上下 | 左右 */
  color: var(--muted);
}

.toolbar,
.action-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.toolbar {
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.toolbar-left,
.toolbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-soft);
  font-size: 12px;
  font-weight: 700;
}

.tag.primary {
  border-color: #bfdbfe;
  background: var(--primary-soft);
  color: var(--primary);
}

.tag.work {
  border-color: #bbf7d0;
  background: var(--work-soft);
  color: #166534;
}

.tag.holiday {
  border-color: #d1d5db;
  background: var(--holiday-soft);
  color: #4b5563;
}

.tag.leave {
  border-color: #bfdbfe;
  background: var(--leave-soft);
  color: #1d4ed8;
}

.tag.commute-office {
  border-color: #fed7aa;
  background: #fff7ed;
  color: #c2410c;
}

.tag.commute-remote {
  border: 1px dashed #6b7280;
  background: #f9fafb;
  color: #374151;
}

.eyebrow {
  display: inline-flex;
  margin-bottom: 14px;
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.side-panel-head,
.panel-head,
.section-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.side-panel-head h2,
.panel-head h3 {
  margin: 0;
}


.focus-metric {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
}

.focus-metric span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.focus-metric strong {
  font-size: 24px;
  line-height: 1;
}

.status-dot,
.panel-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 11px;
  border: 1px solid #bbf7d0;
  border-radius: 999px;
  background: #ecfdf3;
  color: #047857;
  font-size: 12px;
  font-weight: 800;
}

.mini-note {
  margin-top: 16px;
  padding: 14px 16px;
  border: 1px dashed #bfd7ff;
  border-radius: 16px;
  background: #f8fbff;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.inline-note {
  padding: 12px 14px;
  border: 1px dashed #bfd7ff;
  border-radius: 12px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 14px;
}

.message-success {
  border-color: #bbf7d0;
  background: #ecfdf3;
  color: #047857;
}

.message-error {
  border-color: #fecaca;
  background: #fef2f2;
  color: #dc2626;
}

.repeat-list { display: grid; gap: 12px; }
.repeat-row {
  display: grid; grid-template-columns: 1fr 1fr auto; gap: 12px; align-items: end; padding: 14px;
  border: 1px solid var(--line); border-radius: 14px; background: var(--surface-soft);
}
.repeat-row-transport { grid-template-columns: 1.1fr 1.1fr .9fr .8fr 1.1fr auto; }

.segment {
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  font-weight: 700;
  cursor: pointer;
}

.segment.active {
  border-color: #93c5fd;
  background: var(--primary-soft);
  color: var(--primary);
}

.site-footer {
  margin-top: auto;
  padding: 20px;
  border-top: 1px solid var(--line);
  background: var(--surface);
}

.footer-inner {
  width: min(1320px, calc(100% - 32px));
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-links {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.footer-links a {
  font-size: 13px;
  color: var(--muted);
}

.footer-links a:hover {
  color: var(--primary);
}

.footer-copy {
  font-size: 12px;
  color: var(--muted);
}

@media (max-width: 1024px) {
  .quick-actions {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .page {
    width: min(100% - 16px, 100%);
    margin-top: 16px;
  }

  .topbar {
    min-height: 52px;
    padding: 8px 12px;
  }

  .brand-badge {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    font-size: 14px;
  }

  .brand-title {
    font-size: 14px;
  }

  .brand-subtitle {
    display: none;
  }

  .hamburger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .top-links {
    position: absolute;
    top: calc(100% + 8px);
    right: 12px;
    z-index: 20;
    display: none;
    min-width: 220px;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #fff;
    box-shadow: var(--shadow);
  }

  .topbar.menu-open .top-links {
    display: flex;
  }

  .top-links .badge-tenant {
    justify-content: center;
  }

  .top-links .link-btn {
    padding: 8px 4px;
    text-align: left;
  }

  .section {
    padding: 18px;
  }

}
