:root {
  --border-color: #d6deea;
  --button-color: #666666;
  --default-margin: .5rem;
  --default-radius: .65rem;
  --default-padding: 6px;
  --default-font: 'メイリオ', sans-serif;
  --default-font-size: 12px;
  --default-font-color: #243041;
  --header-bg: linear-gradient(135deg, #2157aa 0%, #163d7c 100%);
  --header-height: 4.5rem;
  --menu-width: 240px;
  --mobile-header-height: 4rem;
  --menu-bar-height: 3.35rem;
  --mobile-menu-bar-height: 3rem;
  --menu-bg: #eef3f9;
  --menu-hover-bg: #dbe8fb;
  --table-header-bg: #fff;
  --app-bg: #f3f6fb;
  --sidebar-border: #ccd8e7;
  --sidebar-text: #30445f;
  --sidebar-active-bg: linear-gradient(135deg, #ffffff 0%, #edf4ff 100%);
  --sidebar-active-border: #98b8eb;
  --input-control-height: 2.95rem;
  --button-height: var(--input-control-height);
  --list-control-radius: 0.6rem;
  --list-control-font-size: 1.1rem;
  --list-search-icon-size: 1.7rem;
  --list-search-icon-left: 0.9rem;
  --list-search-input-padding-left: 2.35rem;
  --list-action-button-min-width: 8.5rem;
  --list-card-radius: 1rem;
  --list-card-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
  --list-table-header-font-size: 1rem;
}

* {
  box-sizing: border-box;
  font-size: var(--default-font-size);
  font-family: var(--default-font);
  color: var(--default-font-color);
}

/*
 * ダッシュボード
 */
html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: var(--app-bg);
  .page {
    min-height: 100vh;
    display: grid;
    grid-template-rows: var(--header-height) 1fr;
    height: 100%;
    .header {
      /* See below */
      .user-menu {
        /* See below */
      }
    }
    .content {
      /* See below */
    }
  }
}

/*
 * ヘッダー
 */
.header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  background: var(--header-bg);
  box-shadow: 0 12px 32px rgba(18, 42, 90, 0.22);
  color: #fff;
  .header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
  }
  .logo {
    display: inline-block;
    color: #fff;
    font-size: 1.35rem;
    font-weight: bold;
    letter-spacing: 0.08em;
    text-decoration: none;
    text-transform: uppercase;
    text-shadow: 0 1px 0 rgba(0, 0, 0, 0.08);
  }
}

/*
 * ユーザーメニュー
 */
.user-menu {
  position: relative;
  display: inline-flex;
  align-items: center;
  &:hover .user-dropdown,
  &:focus-within .user-dropdown {
    display: block;
  }
  .user-trigger {
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    border-radius: 999px;
    padding: 0 1rem;
    width: auto;
    min-width: 9rem;
    height: 2.35rem;
    line-height: 2.35rem;
    cursor: pointer;
    &:hover,
    &:focus-visible {
      border-color: rgba(255, 255, 255, 0.5);
      background: rgba(255, 255, 255, 0.18);
    }
  }
  .user-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    min-width: 180px;
    background: rgba(248, 251, 255, 0.98);
    border: 1px solid #d7e1ef;
    border-radius: 1rem;
    box-shadow: 0 16px 32px rgba(19, 37, 74, 0.18);
    padding: 0.4rem;
    display: none;
    z-index: 50;
    .user-dropdown-item {
      width: 100%;
      text-align: left;
      background: transparent;
      color: #314766;
      border: none;
      border-radius: 0.75rem;
      padding: 0 0.8rem;
      height: 2.25rem;
      line-height: 2.25rem;
      cursor: pointer;
      &:hover {
        background: #eaf2ff;
      }
    }
  }
}

/*
 * コンテント
 */

.dashboard-section {
  .list-card {
    border: 1px solid var(--border-color);
    border-radius: var(--default-radius);
    padding: 0.75rem;
    margin-bottom: 0.75rem;
  }
}

/*
 * パネルヘッダー
 */
.panel-header {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  align-items: center;
  margin-bottom: 0.75rem;
  .search-bar {
    display: inline-flex;
    align-items: stretch;
    .search-input-wrap {
      position: relative;
      display: inline-flex;
      align-items: stretch;
    }
    input {
      width: 14rem;
      padding-right: 2rem;
      border-top-right-radius: 0;
      border-bottom-right-radius: 0;
    }
    .checkbox-option input[type="checkbox"] {
      width: auto;
      padding: 0;
      border-radius: 0;
    }
    .search-clear-button {
      position: absolute;
      top: 50%;
      right: 0.5rem;
      transform: translateY(-50%);
      width: 1.25rem;
      min-width: 1.25rem;
      height: 1.25rem;
      padding: 0;
      border: 0;
      border-radius: 999px;
      background: transparent;
      color: #666;
      line-height: 1;
    }
    .search-clear-button:hover,
    .search-clear-button:focus {
      background: #e5e5e5;
      color: #333;
    }
    button {
      width: 5rem;
      border-top-left-radius: 0;
      border-bottom-left-radius: 0;
    }
  }
  label[for="work-logs-input-month"],
  label[for="work-logs-input-user"] {
    width: auto;
    margin-right: 0.25em;
  }
}
.panel-header .wlci-random-toggle {
  margin-bottom: 0;
  label {
    display: inline-flex;
    align-items: center;
    gap: 0.1rem;
    width: auto;
    white-space: nowrap;
  }
}
.panel-header .wlci-random-count {
  margin-bottom: 0;
  label {
    width: auto;
    margin-right: 0.25rem;
  }
  input {
    width: 6rem;
  }
}
.panel-header .wlci-random-count.is-disabled label,
.panel-header .wlci-random-count.is-disabled input {
  color: #888;
}
.panel-header .wlci-create-actions {
  flex-basis: 100%;
  justify-content: flex-start;
}

/*
 * フォーム
 */
.form-item {
  margin-bottom: var(--default-margin);
  &:has(textarea) label {
    vertical-align: top;
    padding-top: var(--default-padding);
  }
}
.checkbox-group-title {
  display: inline-block;
  width: 8rem;
}
.checkbox-option {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  width: auto;
  margin-right: 1rem;
  input {
    width: auto;
    height: auto;
    line-height: normal;
  }
}
.checkbox-options {
  display: inline-block;
  width: calc(100% - 8.5rem);
  vertical-align: top;
}
label {
  display: inline-block;
  width: 8rem;
}
input,
select,
textarea {
  width: 20rem;
  padding: 0 var(--default-padding);
  outline: none;
  border: 1px solid var(--border-color);
  border-radius: var(--default-radius);
}
input,
select {
  height: var(--input-control-height);
  line-height: var(--input-control-height);
}
textarea {
  padding-top: var(--default-padding);
  padding-bottom: var(--default-padding);
  resize: vertical;
}
input[type="checkbox"],
input[type="radio"] {
  width: auto;
  height: auto;
  padding: 0;
}
input[type="file"] {
  width: 100%;
  height: auto;
  min-height: var(--button-height);
  line-height: normal;
  padding-top: 0.2rem;
  padding-bottom: 0.2rem;
}
button {
  min-height: var(--button-height);
  height: var(--button-height);
  line-height: var(--button-height);
  width: 10rem;
  background-color: var(--button-color);
  border: none;
  border-radius: var(--default-radius);
  color: #fff;
  cursor: pointer;
  transition: filter 0.15s ease-in-out;
  &:hover {
    filter: brightness(0.9);
  }
}
.button-plain {
  min-height: 0;
  width: auto;
  height: auto;
  line-height: normal;
  background: transparent;
  color: inherit;
  &:hover,
  &:focus-visible {
    filter: none;
  }
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
}

/*
 * テーブル/アクション共通
 */
.data-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin-bottom: 0.5rem;
  tbody tr.is-selected {
    background: #eef4ff;
  }
  th, td {
    border-bottom: 1px solid #e8edf5;
    padding: 0.95rem 0.75rem;
    text-align: left;
  }
  td {
    background: #fff;
    vertical-align: middle;
  }
  th {
    background: #fff;
    white-space: nowrap;
    color: #5f6b7a;
    font-size: var(--list-table-header-font-size);
    font-weight: 700;
    &.sortable {
      padding: 0;
      .sort-button {
        width: 100%;
        height: 100%;
        line-height: normal;
        display: inline-flex;
        align-items: center;
        justify-content: flex-start;
        gap: 0.25rem;
        padding: 0.85rem 0.75rem;
        border: none;
        border-radius: 0;
        background: transparent;
        font-size: var(--list-table-header-font-size);
        font-weight: 700;
        color: #5f6b7a;
        filter: none;
        .sort-indicator {
          color: #9aa8bf;
          min-width: 0.9rem;
          text-align: center;
        }
        &.is-active {
          .sort-indicator {
            color: #0f2f6b;
          }
        }
      }
    }
  }
  .table-actions {
    white-space: nowrap;
    .icon-button {
      min-height: 0;
      width: 2.2rem;
      height: 2.2rem;
      line-height: 1;
      padding: 0;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      background: transparent;
      border: 0;
      border-radius: 999px;
      margin-right: 0.25rem;
      font-size: 1.3rem;
      color: #5b6471;
      cursor: pointer;
      &:hover {
        background: #eef3f8;
        color: #1d2736;
      }
    }
  }
}
.pager {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  justify-content: space-between;
  button {
    width: 2rem;
    min-width: 2rem;
    padding: 0;
  }
}

.users-panel-header,
.list-panel-header {
  margin-bottom: 0.9rem;
}
.users-panel-header-row,
.list-panel-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0;
}
.users-panel-header .search-bar,
.list-panel-header .search-bar {
  flex: 1 1 auto;
}
.list-search-bar {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}
.list-search-bar-with-toggle {
  justify-content: flex-start;
}
.users-search-bar {
  position: relative;
}
.users-search-bar::before {
  content: "⌕";
  position: absolute;
  top: 50%;
  left: var(--list-search-icon-left);
  transform: translateY(-50%);
  color: #9aa3af;
  font-size: var(--list-search-icon-size);
  line-height: 1;
  z-index: 1;
  pointer-events: none;
}
.users-search-bar:has(input:not(:placeholder-shown))::before,
.users-search-bar:has(input:focus)::before {
  opacity: 0;
}
.list-search-input-wrap {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
}
.list-search-bar-with-toggle .list-search-input-wrap {
  flex: 0 0 auto;
}
.list-search-input-wrap .search-input-wrap {
  display: flex;
  width: 100%;
}
.list-search-input-wrap::before {
  content: "⌕";
  position: absolute;
  top: 50%;
  left: var(--list-search-icon-left);
  transform: translateY(-50%);
  color: #9aa3af;
  font-size: var(--list-search-icon-size);
  line-height: 1;
  z-index: 1;
  pointer-events: none;
}
.list-search-input-wrap:has(input:not(:placeholder-shown))::before,
.list-search-input-wrap:has(input:focus)::before {
  opacity: 0;
}
.users-panel-header .search-bar input,
.list-panel-header .search-bar input,
.data-browser-header-actions .search-bar input {
  position: relative;
  z-index: 0;
  width: min(23rem, 100%);
  min-height: var(--input-control-height);
  padding-left: var(--list-search-input-padding-left);
  border-radius: var(--list-control-radius);
  font-size: var(--list-control-font-size);
}
.users-panel-header #user-create,
.list-panel-header button[id$="create"] {
  width: auto;
  min-width: var(--list-action-button-min-width);
  min-height: var(--button-height);
  padding: 0 1rem;
  border-radius: var(--list-control-radius);
  background: #676767;
}
.users-table-card,
.list-table-card {
  background: #fff;
  border: 1px solid #d9e0ea;
  border-radius: var(--list-card-radius);
  overflow: hidden;
  box-shadow: var(--list-card-shadow);
}
.users-role-tabs {
  display: flex;
  gap: 0.25rem;
  padding: 0.85rem 1.1rem 0;
  border-bottom: 1px solid #e8edf5;
}
.users-role-tab {
  width: auto;
  min-width: 0;
  padding: 0 0.9rem 0.7rem;
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  background: transparent;
  color: #5f6b7a;
  font-weight: 700;
}
.users-role-tab.is-active {
  color: #1d4ed8;
  border-bottom-color: #1d4ed8;
}
.users-table {
  margin-bottom: 0;
}
.users-table th:first-child,
.users-table td:first-child {
  padding-left: 1.4rem;
}
.users-table th:last-child,
.users-table td:last-child {
  padding-right: 1.4rem;
}
.users-col-id {
  width: 4.5rem;
}
.users-col-name {
  width: 20%;
}
.users-col-furigana,
.users-col-email {
  width: 20%;
}
.users-col-permissions,
.users-col-health {
  width: 10%;
}
.users-col-actions {
  width: 5.5rem;
}
.users-name-wrap {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}
.users-avatar {
  width: 2rem;
  height: 2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #cfd7e3;
  border-radius: 999px;
  background: linear-gradient(180deg, #f6f8fb 0%, #e9eef5 100%);
  color: #6b7280;
  font-size: 0.85rem;
  font-weight: 700;
}
.users-name-text {
  font-weight: 700;
  color: #3f4651;
}
.users-permission-cell {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}
.users-role-chip {
  display: inline-flex;
  align-items: center;
  min-height: 1.55rem;
  padding: 0 0.55rem;
  border-radius: 0.4rem;
  background: #f1f5f9;
  color: #556070;
  font-size: 0.82rem;
}
.users-role-chip.is-admin {
  background: #dcedff;
  color: #1f5fa8;
}
.users-role-chip.is-member {
  background: #f3f4f6;
  color: #4b5563;
}
.users-health-status {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: #4b5563;
  font-size: 0.9rem;
  font-weight: 600;
}
.users-health-status::before {
  content: "";
  width: 0.38rem;
  height: 0.38rem;
  border-radius: 999px;
  background: #9ca3af;
}
.users-health-status.is-consented {
  color: #16a34a;
}
.users-health-status.is-consented::before {
  background: #22c55e;
}
.users-health-status.is-pending {
  color: #6b7280;
}
.users-health-status.is-exempt {
  color: #2563eb;
}
.users-health-status.is-exempt::before {
  background: #60a5fa;
}
.users-pager,
.list-pager {
  padding: 1rem 1.4rem 1.1rem;
}
.users-pager-actions,
.list-pager-actions {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}
.users-page-number,
.list-page-number {
  min-width: 3.5rem;
  text-align: center;
  color: #111827;
  font-weight: 600;
}
.users-pager-actions button,
.list-pager-actions button {
  border-radius: 0.45rem;
  background: #fff;
  color: #111827;
  border: 1px solid #d1d9e6;
}
.users-pager-actions button:disabled,
.list-pager-actions button:disabled {
  opacity: 0.45;
}
.list-inline-toggle {
  width: auto;
  margin: 0;
  white-space: nowrap;
}
.list-inline-toggle span {
  margin-left: 0.3rem;
}
.list-data-table {
  margin-bottom: 0;
}
.list-data-table th:first-child,
.list-data-table td:first-child {
  padding-left: 1.4rem;
}
.list-data-table th:last-child,
.list-data-table td:last-child {
  padding-right: 1.4rem;
}

.settings-panel {
  max-width: 100%;
}
.settings-category {
  margin-top: 0.9rem;
  border: 0;
}
.settings-category:first-child {
  margin-top: 0;
}
.settings-category summary {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.25rem;
  border: 1px solid #c8d2e1;
  border-radius: var(--default-radius);
  background: #f8fbff;
  font-weight: bold;
  cursor: pointer;
  user-select: none;
  transition: border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}
.settings-category summary::-webkit-details-marker {
  display: none;
}
.settings-category summary::after {
  content: "▾";
  color: #46618f;
  font-size: 1.4rem;
  transition: transform 0.2s ease;
}
.settings-category[open] summary {
  border-color: #aebed8;
  background: #f2f7ff;
  box-shadow: 0 1px 3px rgba(48, 74, 120, 0.08);
}
.settings-category[open] summary::after {
  transform: rotate(180deg);
}
.settings-category-body {
  overflow: hidden;
  max-height: none;
  opacity: 1;
  padding: 0.85rem 0.35rem 0.2rem;
  transition: max-height 0.22s ease, opacity 0.18s ease, padding-top 0.18s ease, padding-bottom 0.18s ease;
}
.settings-category-body.is-collapsed {
  max-height: 0;
  opacity: 0;
  padding-top: 0;
  padding-bottom: 0;
}
.settings-custom-items-switch {
  display: flex;
  gap: 0;
  margin-bottom: 0.9rem;
  border-bottom: 1px solid #c8d2e1;
}
.local-match-weight-set-select {
  margin-right: 0.75rem;
}
.settings-custom-items-switch [data-local-weight-action] + [data-local-weight-action] {
  margin-left: 0.5rem;
}
.settings-custom-items-tab {
  min-width: 5.5rem;
  padding: 0.7rem 1rem 1.6rem;
  margin-bottom: -1px;
  border: 1px solid #d8dfeb;
  border-bottom: 0;
  border-radius: 0.7rem 0.7rem 0 0;
  background: transparent;
  color: #5a6f92;
  line-height: 1.2;
}
.settings-custom-items-tab.is-active {
  background: #fff;
  border-color: #c8d2e1;
  color: #1f4aa8;
  font-weight: bold;
}
.settings-custom-items-tab:hover {
  background: #f6f9ff;
  color: #355b9d;
}
.settings-custom-items-pane {
  display: none;
}
.settings-custom-items-pane.is-active {
  display: block;
  padding-top: 0.35rem;
}
.work-log-custom-items-panel.is-embedded {
  padding-top: 0.1rem;
}
.work-log-custom-items-panel.is-embedded .panel-header {
  margin-bottom: 0.75rem;
}
.work-log-custom-items-panel.is-embedded .data-table {
  margin-bottom: 0;
}
.settings-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  label {
    width: auto;
    font-weight: bold;
  }
  textarea {
    width: 100%;
    min-height: 10rem;
    font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  }
}
.settings-synonyms-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  align-items: start;
}
.settings-synonyms-grid textarea[readonly] {
  background: #f5f7fb;
}
.user-settings-checkbox-row {
  align-items: flex-start;
}
.user-settings-checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  line-height: 1.5;
  width: calc(8rem + 20rem);
  max-width: 100%;
}
.user-settings-checkbox-label input[type="checkbox"] {
  margin-top: 0.2rem;
  flex: 0 0 auto;
}
.user-settings-checkbox-text {
  display: block;
  flex: 1 1 auto;
}
.settings-actions {
  margin-top: 0.75rem;
}
.unused-tags-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(12rem, 1fr));
  gap: 0.45rem;
}
.unused-tags-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.6rem;
  border: 1px solid #d8dfeb;
  border-radius: var(--default-radius);
  background: #fff;
}
.local-match-weight-row {
  min-width: 0;
}
.local-match-weight-row input[type="number"] {
  width: 5rem;
  max-width: 100%;
}
.local-match-weight-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
  gap: 0.45rem 1rem;
  align-items: start;
}
.data-browser-save-notice {
  margin-left: 0.5rem;
  color: #1d4ed8;
  opacity: 0;
  transform: translateY(2px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  pointer-events: none;
}
.data-browser-save-notice.is-visible {
  opacity: 1;
  transform: translateY(0);
  animation: data-browser-save-notice-fade 3s ease forwards;
}
@keyframes data-browser-save-notice-fade {
  0% {
    opacity: 0;
    transform: translateY(2px);
  }
  12%,
  70% {
    opacity: 1;
    transform: translateY(0);
  }
  100% {
    opacity: 0;
    transform: translateY(-2px);
  }
}

.data-browser-root {
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.data-browser-root > .data-browser-header {
  flex: 0 0 auto;
}
.data-browser-panel {
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  grid-template-rows: minmax(10rem, 30%) 0.75rem minmax(20rem, 70%);
  gap: 0;
  height: auto;
  overflow: hidden;
}
.data-browser-list-wrap {
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.data-browser-resizer {
  position: relative;
  cursor: row-resize;
  background: transparent;
  user-select: none;
  touch-action: none;
}
.data-browser-resizer::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 1px;
  background: #ccc;
  transform: translateY(-50%);
}
.data-browser-resizer::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 3rem;
  height: 0.35rem;
  border: 1px solid #b8c4d6;
  border-radius: 999px;
  background: #fff;
  transform: translate(-50%, -50%);
}
.data-browser-resizer:hover::after,
.data-browser-resizer:focus-visible::after,
.data-browser-panel.is-resizing .data-browser-resizer::after {
  border-color: #2050A4;
  background: #eef4ff;
}
.data-browser-list-header {
  display: grid;
  gap: 0.45rem;
  margin-bottom: 0.25rem;
  padding: 0.15rem 0.2rem;
  border-bottom: 1px solid #ddd;
  background: #fff;
  .sort-button {
    position: relative;
    width: 100%;
    min-width: 0;
    text-align: left;
    border: none;
    border-radius: 0;
    background: transparent;
    color: #23344f;
    font-weight: bold;
    padding: 0.45rem 0.35rem;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    white-space: nowrap;
    overflow: hidden;
    filter: none;
    .sort-indicator {
      color: #9aa8bf;
      min-width: 0.9rem;
      flex: 0 0 auto;
      text-align: center;
    }
    &.is-active {
      .sort-indicator {
        color: #0f2f6b;
      }
    }
  }
  .sort-button-icon {
    justify-content: center;
    text-align: center;
    padding-left: 0.2rem;
    padding-right: 0.2rem;
  }
  .data-browser-header-label {
    position: relative;
    min-width: 0;
    color: #23344f;
    font-weight: bold;
    padding: 0.45rem 0.35rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .data-browser-header-label-icon {
    text-align: center;
    padding-left: 0.2rem;
    padding-right: 0.2rem;
  }
}
.data-browser-column-resizer {
  position: absolute;
  top: 0;
  right: -0.35rem;
  width: 0.7rem;
  height: 100%;
  cursor: col-resize;
  touch-action: none;
  z-index: 1;
}
.data-browser-column-resizer::after {
  content: "";
  position: absolute;
  top: 18%;
  bottom: 18%;
  left: 50%;
  width: 1px;
  background: #c4cede;
  transform: translateX(-50%);
}
.data-browser-list-header > *:hover .data-browser-column-resizer::after,
.data-browser-list-wrap.is-column-resizing .data-browser-column-resizer::after {
  background: #2050A4;
}
.data-browser-list-wrap {
  --data-browser-columns: 4.5rem 10.5rem 14rem 1fr;
}
.data-browser-list-wrap .data-browser-list-header {
  grid-template-columns: var(--data-browser-columns);
}
.data-browser-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.5rem;
  flex: 0 0 auto;
}
.data-browser-title-row {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.75rem;
  min-width: 0;
}
.data-browser-count {
  flex: 0 0 auto;
  color: #666;
  text-align: left;
  white-space: nowrap;
}
.data-browser-header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  justify-content: flex-start;
  width: 100%;
  .data-browser-mail-status {
    min-width: 8rem;
    text-align: left;
    color: #666;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    &::before {
      content: "";
      width: 0;
      height: 0;
      border: 0 solid transparent;
      border-radius: 50%;
      flex: 0 0 auto;
      opacity: 0;
    }
  }
  .data-browser-mail-status.is-running {
    color: #0b67c2;
    &::before {
      width: 0.8rem;
      height: 0.8rem;
      border-width: 2px;
      border-style: solid;
      border-color: #9fc2f2 #9fc2f2 #9fc2f2 #0b67c2;
      opacity: 1;
      animation: data-browser-status-spin 0.8s linear infinite;
    }
  }
  .data-browser-mail-status.is-waiting {
    color: #8a5a00;
  }
  .data-browser-mail-status.is-completed {
    color: #1f7a1f;
  }
  .data-browser-mail-status.is-failed {
    color: #c02020;
  }
  .search-bar {
    display: inline-flex;
    align-items: stretch;
    gap: 0.75rem;
    .search-input-wrap {
      position: relative;
      display: inline-flex;
      align-items: stretch;
    }
    input {
      width: min(23rem, 100%);
      min-height: var(--input-control-height);
      padding-right: 2rem;
      padding-left: var(--list-search-input-padding-left);
      border-radius: var(--list-control-radius);
      font-size: var(--list-control-font-size);
    }
    .search-clear-button {
      position: absolute;
      top: 50%;
      right: 0.5rem;
      transform: translateY(-50%);
      width: 1.25rem;
      min-width: 1.25rem;
      height: 1.25rem;
      padding: 0;
      border: 0;
      border-radius: 999px;
      background: transparent;
      color: #666;
      line-height: 1;
    }
    .search-clear-button:hover,
    .search-clear-button:focus {
      background: #e5e5e5;
      color: #333;
    }
    button {
      width: 5rem;
      min-height: var(--button-height);
      border-radius: var(--list-control-radius);
    }
  }
}
.data-browser-header-actions .data-browser-count {
  margin-left: auto;
}
.data-browser-mode {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  label {
    width: auto;
    display: inline-block;
    white-space: nowrap;
  }
  select {
    width: auto;
    min-width: 5.5rem;
    max-width: 7rem;
    padding: 0.2rem 1.6rem 0.2rem 0.45rem;
  }
}
@media (max-width: 900px) {
  .data-browser-root {
    height: 100%;
  }
  .work-logs-admin-panel {
    height: calc(100vh - var(--mobile-header-height));
  }
  .data-browser-header {
    align-items: flex-start;
    flex-direction: column;
  }
  .data-browser-title-row {
    align-items: center;
  }
  .data-browser-header-actions {
    width: 100%;
    justify-content: flex-start;
  }
}

@media (max-width: 768px) {
  :root {
    --default-font-size: 14px;
  }
  html, body {
    .page {
      grid-template-rows: var(--mobile-header-height) 1fr;
    }
  }
  .header {
    padding: 0 1rem;
  }
  .content {
    grid-template-columns: 1fr;
    position: relative;
    gap: 0.75rem;
    padding: 0.75rem;
    .sidebar {
      position: fixed;
      top: var(--mobile-header-height);
      left: 0;
      bottom: 0;
      width: min(78vw, 18rem);
      max-width: 100%;
      transform: translateX(-100%);
      transition: transform 0.2s ease;
      z-index: 20;
      overflow-y: auto;
      border-radius: 0 1.1rem 1.1rem 0;
      box-shadow: 0 18px 40px rgba(19, 37, 74, 0.24);
    }
    .main {
      padding: 0.75rem;
    }
  }
  .header .logo {
    font-size: 1.1rem;
  }
  .user-menu .user-trigger {
    min-width: 0;
    max-width: 11rem;
    padding: 0 0.85rem;
  }
  .panel-header,
  .data-browser-header,
  .data-browser-title-row,
  .data-browser-header-actions,
  .pager {
    align-items: stretch;
    flex-direction: column;
  }
  .panel-header .search-bar,
  .data-browser-header-actions .search-bar,
  .users-panel-header .search-bar,
  .list-panel-header .search-bar {
    display: flex;
    width: 100%;
  }
  label,
  .checkbox-group-title,
  input,
  select,
  textarea,
  button {
    width: 100%;
    max-width: 100%;
  }
  .checkbox-option {
    width: auto;
    margin-right: 0.5rem;
  }
  .user-menu .user-dropdown {
    right: 0;
    left: auto;
  }
  .data-table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }
  .users-panel-header-row {
    align-items: stretch;
    flex-direction: column;
  }
  .list-panel-header-row {
    align-items: stretch;
    flex-direction: column;
  }
  .users-panel-header .search-bar input,
  .list-panel-header .search-bar input {
    width: 100%;
  }
  .users-panel-header #user-create,
  .list-panel-header button[id$="create"] {
    width: 100%;
  }
  .users-role-tabs {
    overflow-x: auto;
  }
  .users-pager,
  .list-pager {
    align-items: stretch;
    flex-direction: column;
  }
  .users-pager-actions,
  .list-pager-actions {
    justify-content: flex-end;
  }
  .modal-overlay .modal {
    width: calc(100vw - 1rem);
    max-height: calc(100vh - 1rem);
  }
}
.data-browser-list-wrap,
.data-browser-detail-wrap {
  border: 1px solid #ccc;
  border-radius: var(--default-radius);
  background: #fff;
  overflow: hidden;
}
.data-browser-panel.is-resizing {
  cursor: row-resize;
}
.data-browser-panel.is-resizing * {
  cursor: row-resize !important;
  user-select: none;
}

@keyframes data-browser-status-spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}
.data-browser-detail-wrap {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}
.data-browser-list {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  padding: 0.15rem 0.2rem;
  outline: none;
}
.data-browser-item {
  width: 100%;
  height: auto;
  min-height: 1.7rem;
  line-height: 1.15;
  display: grid;
  grid-template-columns: var(--data-browser-columns, 4.5rem 10.5rem 14rem 1fr);
  gap: 0.45rem;
  align-items: center;
  text-align: left;
  padding: 0.22rem 0.35rem;
  margin-bottom: 0.12rem;
  background: transparent;
  color: #23344f;
  border: 1px solid transparent;
  border-radius: var(--default-radius);
  font-size: 12px;
  .data-browser-item-cell {
    display: block;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
  }
  .data-browser-item-cell {
    color: #475467;
  }
  .data-browser-item-cell.is-icon {
    text-align: center;
    overflow: visible;
    text-overflow: clip;
    font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif;
    font-size: 14px;
    line-height: 1;
  }
  .data-browser-item-cell:last-child {
    color: #23344f;
  }
  &:hover,
  &:focus-visible,
  &.is-selected {
    background: #eef4ff;
    border-color: #b7c8ea;
    color: #12356f;
    filter: none;
  }
}
.data-browser-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  padding: 0.12rem 0.42rem;
  color: #26466d;
  background: #e8f1fc;
  border: 1px solid #bdd2ec;
  border-radius: 999px;
  font-size: 0.78rem;
  line-height: 1.25;
}
.data-browser-tag-editor {
  margin-bottom: 0.75rem;
  padding: 0.75rem;
  background: #fff;
  border: 1px solid #ccc;
  border-radius: var(--default-radius);
}
.data-browser-tag-editor > label {
  font-weight: bold;
}
.data-browser-tag-input-row,
.data-browser-tag-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.4rem;
}
.data-browser-tag-input-row input {
  flex: 1 1 16rem;
  min-width: 0;
}
.data-browser-tag-input-row input::-webkit-calendar-picker-indicator {
  display: none !important;
}
.data-browser-tag-editor .data-browser-tag {
  gap: 0.1rem;
  padding: 0 0.2rem;
  font-size: 0.85rem;
}
.data-browser-tag-remove {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: auto;
  min-width: 0;
  height: auto;
  margin: 0;
  padding: 0.05rem 0.12rem;
  color: inherit;
  background: transparent;
  border: 0;
  font: inherit;
  line-height: 1.25;
}
.browser-columns-grid {
  display: grid;
  grid-template-columns: minmax(16rem, 24rem) auto minmax(16rem, 24rem);
  gap: 0.45rem;
  align-items: center;
  justify-content: start;
}
.browser-columns-list {
  min-width: 0;
}
.browser-columns-title {
  margin-bottom: 0.35rem;
  font-size: 0.9rem;
  color: #475467;
}
.browser-columns-actions {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  justify-self: center;
}
.browser-columns-editor select {
  width: 100%;
  min-height: 12rem;
}
@media (max-width: 768px) {
  .browser-columns-grid {
    grid-template-columns: 1fr;
  }
  .settings-synonyms-grid {
    grid-template-columns: 1fr;
  }
  .browser-columns-actions {
    flex-direction: row;
    flex-wrap: wrap;
  }
}
.data-browser-detail-standard,
.data-browser-detail {
  margin: 0;
  padding: 0.75rem;
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  background: #fbfcff;
}
.data-browser-detail {
  white-space: pre-wrap;
  word-break: break-word;
}
.data-browser-detail-standard {
  display: block;
}
.data-browser-attachments {
  display: none;
  flex: 0 0 auto;
  padding: 0 0.75rem 0.75rem;
  background: #fbfcff;
  .data-browser-attachments-title {
    font-weight: bold;
    margin-bottom: 0.35rem;
  }
  .data-browser-attachments-list {
    margin: 0;
    padding-left: 1.25rem;
  }
}
.data-browser-context-menu {
  position: fixed;
  z-index: 1600;
  min-width: 9rem;
  padding: 0.25rem;
  background: #fff;
  border: 1px solid #cfd8ea;
  border-radius: var(--default-radius);
  box-shadow: 0 8px 24px rgba(15, 47, 107, 0.18);
}
.data-browser-context-menu-item {
  width: 100%;
  height: auto;
  line-height: 1.4;
  padding: 0.5rem 0.75rem;
  text-align: left;
  background: transparent;
  color: #23344f;
  border-radius: calc(var(--default-radius) - 2px);
}
.data-browser-context-menu-item:hover {
  background: #ffe3e3;
  color: #991b1b;
  filter: none;
}
.data-browser-kv-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  th, td {
    border: 1px solid #ccc;
    padding: 0.2rem 0.3rem 0.1rem 0.3rem;
    vertical-align: top;
    text-align: left;
  }
  th {
    width: 12rem;
    background: var(--table-header-bg);
    white-space: nowrap;
  }
  td {
    background: #fff;
  }
  table {
    margin: 0.2rem 0;
  }
}
.data-browser-match-detail {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.data-browser-match-editor {
  padding: 0.75rem;
  background: #fff;
  border: 1px solid #ccc;
  border-radius: var(--default-radius);
}
.data-browser-match-field {
  display: grid;
  grid-template-columns: 5rem minmax(0, 1fr);
  align-items: start;
  gap: 0.5rem;
}
.data-browser-match-field label {
  width: auto;
  padding-top: 0.35rem;
}
.data-browser-match-editor textarea,
.data-browser-match-editor select {
  width: 100%;
}
.data-browser-match-columns {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
}
.data-browser-match-panel {
  min-width: 0;
}
.data-browser-match-panel-title {
  margin: 0 0 0.35rem;
  font-size: 1rem;
  color: #23344f;
}
.data-browser-empty {
  color: #667085;
}

@media (min-width: 1200px) {
  .data-browser-match-columns {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: start;
  }
}

/*
 * エラーページ
 */
.error-page {
  padding: 1rem;
}

/*
 * モーダル
 */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  &.is-open {
    display: flex;
  }
  .modal {
    width: min(520px, 90vw);
    background: #fff;
    border-radius: var(--default-radius);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    padding: 1rem;
    .modal-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      margin-bottom: 0.5rem;
      h2 {
        margin: 0;
        font-size: 1.2rem;
      }
      .modal-close {
        width: 2rem;
        height: 2rem;
        border-radius: 50%;
        background: #eee;
        color: #333;
      }
    }
    .modal-body {
      margin: 0.5rem 0 1rem;
      .checkbox-row {
        display: flex;
        gap: 1rem;
        align-items: center;
        label {
          display: inline-flex;
          align-items: center;
          gap: 0.3rem;
          white-space: nowrap;
        }
      }
      .work-log-custom-item-slider-flags-wrap {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
        label {
          white-space: nowrap;
        }
      }
      .team-match-actions {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
        margin-top: 0.75rem;
        .team-match-option {
          width: 100%;
          height: auto;
          min-height: 2.5rem;
          line-height: 1.4;
          padding: 0.5rem 0.75rem;
          text-align: left;
        }
      }
      .match-request-form {
        display: flex;
        flex-direction: column;
        gap: 0.75rem;
      }
      .match-request-field {
        display: flex;
        flex-direction: column;
        gap: 0.35rem;
        label {
          display: block;
          width: auto;
          font-weight: 600;
        }
        input,
        select {
          display: block;
          width: min(32rem, calc(100vw - 8rem));
          max-width: 100%;
        }
      }
      .match-request-help {
        display: none;
        margin: 0;
        color: #666;
        font-size: 0.9rem;
        line-height: 1.5;
      }
      .match-request-error {
        display: none;
        margin: 0;
        color: #b42318;
        font-size: 0.9rem;
        line-height: 1.5;
      }
      .modal-details {
        display: none;
        background: #f6f6f6;
        border: 1px solid #e0e0e0;
        padding: 0.5rem;
        border-radius: var(--default-radius);
        white-space: pre-wrap;
      }
    }
    .modal-footer {
      display: flex;
      justify-content: flex-end;
      gap: 0.75rem;
    }
  }
}

/*
 * ローディング
 */
.loading-overlay {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(15, 47, 107, 0.16);
  z-index: 2000;
  &.is-open {
    display: flex;
  }
  .loading-spinner {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 4px solid #dbe7ff;
    border-top-color: #2050A4;
    animation: spin 0.8s linear infinite;
  }
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.wl-consent-modal {
  width: min(840px, 94vw) !important;
}

.wl-consent-preview {
  border: 1px solid #d6d6d6;
  border-radius: var(--default-radius);
  overflow: hidden;
  background: #f8f8f8;
}

.wl-consent-preview iframe {
  width: 100%;
  height: min(70vh, 720px);
  border: 0;
  display: block;
}

.wl-consent-check {
  display: flex;
  gap: 0.5rem;
  align-items: flex-start;
  margin-top: 0.75rem;
  white-space: nowrap;
}

.wl-consent-comment {
  margin: 0.75rem 0 1rem;
  padding: 0.85rem 1rem;
  border: 1px solid #c7d7f4;
  border-left: 4px solid #2050A4;
  border-radius: var(--default-radius);
  background: #f4f8ff;
}

.wl-consent-comment-label {
  margin: 0 0 0.35rem;
  color: #163d86;
}

.wl-consent-comment #health-data-consent-comment {
  margin: 0;
}

.wl-ai-comment {
  margin-top: 0.5rem;
  margin-bottom: 0.5rem;
  padding: 0.9rem 1rem;
  border: 1px solid #cfe3d4;
  border-left: 4px solid #2f855a;
  border-radius: var(--default-radius);
  background: #f3fbf6;
  color: #1f3d2d;
  white-space: pre-wrap;
  line-height: 1.6;
}

.wl-consent-modal .modal-footer {
  gap: 0.75rem;
}

/*
 * カレンダー
 */
.calendar-detail {
  margin-top: 1rem;
  .calendar-detail-header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-end;
    gap: 0.5rem 1rem;
    margin-bottom: 0.75rem;
    .calendar-year-selector {
      label {
        width: auto;
        margin-right: 0.5rem;
      }
      select {
        width: 10rem;
      }
    }
  }
  .calendar-detail-subtitle {
    margin: 0.25rem 0 0;
    color: #555;
  }
  .calendar-year-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 0.75rem;
  }
  .calendar-basic-holiday-item {
    display: flex;
    align-items: flex-start;
    & > label {
      flex: 0 0 8rem;
    }
  }
  .calendar-basic-holiday-group {
    width: 20rem;
  }
  .calendar-basic-holiday-row + .calendar-basic-holiday-row {
    margin-top: .25rem;
  }
  .calendar-month-card {
    border: 1px solid #ccc;
    border-radius: var(--default-radius);
    background: #fff;
    padding: 0.5rem;
    h3 {
      margin: 0 0 0.5rem;
    }
    &.is-outside-holiday-range {
      background: #f0f0f0;
      border-color: #d0d0d0;
      .calendar-month-grid {
        opacity: 0.75;
      }
    }
    .calendar-month-grid {
      display: grid;
      grid-template-columns: repeat(7, minmax(0, 1fr));
      gap: 0.2rem;
      .calendar-weekday {
        text-align: center;
        color: #555;
        padding-bottom: 0.15rem;
        &.is-sunday {
          color: #b42318;
        }
        &.is-saturday {
          color: #1d4ed8;
        }
      }
      .calendar-day-cell {
        width: 100%;
        min-height: 2rem;
        padding: 0.15rem;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        border: 1px solid #d4d9e3;
        border-radius: 0.35rem;
        background: #fff;
        color: #23344f;
        line-height: normal;
        &:hover {
          filter: none;
          border-color: #7aa2e3;
          background: #f6f9ff;
        }
        &.is-empty,
        &.is-empty:hover {
          border-style: dashed;
          background: #fafbfc;
          border-color: #edf0f4;
          cursor: default;
        }
        &.is-disabled,
        &.is-disabled:hover {
          background: #e8e8e8;
          border-color: #cdcdcd;
          color: #8a8a8a;
          cursor: not-allowed;
        }
        .calendar-day-number {
          width: 100%;
          text-align: center;
        }
        &.is-sunday .calendar-day-number {
          color: #b42318;
        }
        &.is-saturday .calendar-day-number {
          color: #1d4ed8;
        }
        &.is-basic-holiday {
          background: #ffd6de;
        }
        &.is-special-holiday {
          background: #ffb8c6;
          border-color: #df7f95;
        }
        &.is-special-workday {
          background: #e7f0ff;
          border-color: #9db9f1;
        }
      }
    }
  }
}

@media (max-width: 640px) {
  .calendar-detail {
    .calendar-year-grid {
      grid-template-columns: 1fr;
    }
  }
}

/*
 * 勤怠ルール(期間)
 */
.work-rule-break-time-item {
  display: flex;
  align-items: flex-start;
  & > label {
    flex: 0 0 8rem;
  }
  #work-rule-break-times {
    width: 20rem;
    .break-time-start,
    .break-time-end {
      width: 8.5rem;
    }
    .break-time-row {
      display: flex;
      align-items: center;
      gap: .4rem;
      margin-bottom: .3rem;
      span {
        display: inline-block;
        width: 1rem;
        text-align: center;
      }
    }
  }
}

/*
 * チケット
 */
.ticket-detail-link {
  width: auto;
  min-width: 0;
  padding: 0;
  height: auto;
  line-height: 1.4;
  color: #1f4aa8;
  background: transparent;
  text-align: left;
  &:hover {
    background: transparent;
    filter: none;
    text-decoration: underline;
  }
}
.ticket-detail-modal {
  width: min(920px, 94vw);
  .ticket-detail-body {
    max-height: 72vh;
    overflow-y: auto;
    .ticket-detail-meta {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 8px 1rem;
      margin-bottom: 8px;
      div {
        display: flex;
        align-items: center;
        gap: 0.5rem;
        min-height: 2rem;
      }
      .ticket-detail-label {
        flex: 0 0 5rem;
        font-weight: normal;
      }
      .form-item {
        display: flex;
        align-items: center;
        gap: 0;
        margin-bottom: 0;
        label {
          flex: 0 0 5rem;
        }
        select {
          width: calc(100% - 5rem);
        }
      }
    }
    .ticket-detail-section {
      h3 {
        margin: 0 0 8px;
        font-weight: normal;
      }
      & + .ticket-detail-section {
        margin-top: 8px;
      }
      .form-item {
        display: flex;
        align-items: flex-start;
        label {
          flex: 0 0 5rem;
        }
        input,
        textarea {
          width: calc(100% - 5rem);
        }
        #ticket-comment-body {
          width: 100%;
        }
      }
      .ticket-detail-text {
        margin: 0;
        padding: 0.75rem;
        border: 1px solid #ccc;
        border-radius: var(--default-radius);
        background: #f8fbff;
        white-space: pre-wrap;
        word-break: break-word;
      }
      .ticket-comments-list {
        display: flex;
        flex-direction: column;
        gap: 8px;
        .ticket-comments-empty {
          margin: 0;
          color: #666;
        }
        .ticket-comment-item {
          padding: 0.75rem;
          border: 1px solid #ccc;
          border-radius: var(--default-radius);
          background: #fff;
          .ticket-comment-meta {
            display: flex;
            justify-content: space-between;
            gap: 1rem;
            margin-bottom: 0.4rem;
            color: #4b5a70;
            font-weight: bold;
          }
          .ticket-comment-author {
          }
          .ticket-comment-body {
            margin: 0;
            white-space: pre-wrap;
            word-break: break-word;
          }
        }
      }
      textarea {
        width: 100%;
      }
    }
  }
}

/*
 * 勤怠ログ
 */
.work-logs-input-table-wrap {
  overflow-x: auto;
  .work-logs-input-table {
    width: 100%;
    table-layout: auto;
    th, td {
      white-space: nowrap;
      padding: 0 0.3rem;
      text-align: center;
      white-space: nowrap;
    }
    th {
      text-align: center;
    }
  }
}
.work-logs-input-table-wrap {
  .work-logs-input-table {
    .wl-work-type.wl-cell-input {
      width: 7rem;
      min-width: 7rem;
      box-sizing: border-box;
    }
    .wl-main-row.is-selected {
      background: #eef6ff;
    }
    .wl-detail-row {
      td {
        padding: 0;
        white-space: normal;
        background: #fff;
      }
      .wl-detail-fields {
        max-height: 0;
        overflow: hidden;
        opacity: 0;
        transform: translateY(-0.2rem);
        transition: max-height 0.28s ease, opacity 0.28s ease, transform 0.28s ease, padding 0.28s ease;
        padding: 0 0.25rem;
      }
      &.is-open {
        td {
          padding: 0.5rem;
          background: #f8fbff;
        }
        .wl-detail-fields {
          max-height: 20rem;
          opacity: 1;
          transform: translateY(0);
          padding: 0;
        }
      }
    }
    .wl-detail-fields {
      display: flex;
      flex-wrap: wrap;
      gap: 0.6rem 1rem;
      align-items: flex-start;
    }
    .wl-detail-field {
      flex: 0 0 calc(25% - 0.75rem);
      width: calc(25% - 0.75rem);
      label {
        display: block;
        width: 100%;
        box-sizing: border-box;
        margin: 0;
        margin-bottom: 0.2rem;
        font-size: 0.9rem;
        text-align: left;
      }
      input,
      textarea,
      select {
        width: 100%;
        box-sizing: border-box;
        margin: 0;
      }
      .wl-link-button {
        display: inline-block;
        padding: 0.45rem 0.75rem;
        border: 1px solid #7aa7d9;
        border-radius: var(--default-radius);
        background: #e8f2ff;
        color: #1f4f82;
        text-decoration: none;
      }
      .wl-slider-wrap {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 0.5rem;
        .wl-slider-input {
          flex: 1 1 auto;
          width: 100%;
        }
        .wl-slider-value {
          display: none;
        }
        .wl-slider-scale {
          width: 100%;
          display: flex;
          align-items: center;
          justify-content: space-between;
          gap: 0.5rem;
          font-size: 0.75rem;
          color: #4a5568;
          line-height: 1.2;
        }
        .wl-slider-scale-min,
        .wl-slider-scale-max {
          white-space: nowrap;
          font-size: 1.1rem;
          line-height: 1;
          transform: translateY(-0.3rem);
        }
      }
    }
    .wl-required {
      color: #c53030;
      margin-left: 0.2rem;
    }
    .wl-save {          /* 保存 */
      width: 3.2rem;
      min-width: 3.2rem;
      height: 1.8rem;
      line-height: 1.8rem;
      padding: 0 0.3rem;
    }
    .wl-break-edit {
      width: 3.2rem;
      min-width: 3.2rem;
      height: 1.8rem;
      line-height: 1.8rem;
      padding: 0 0.3rem;
    }
    .wl-break-status {
      min-width: 3rem;
      font-size: 0.85rem;
      &.is-dirty {
        background: #fff6bf;
      }
      .wl-break-has-mark {
        margin-left: 0.25rem;
      }
      .wl-break-has-mark.is-empty {
        color: #fff;
      }
    }
    .wl-cell-input {
      width: auto;
      min-width: 0;
      &.is-dirty {
        background: #fff6bf;
      }
      &:focus,
      &:focus-visible {
        outline: 2px solid #2b6cb0;
        outline-offset: 0;
        border-color: #2b6cb0;
        background: #eef6ff;
      }
      &[type="range"]:focus,
      &[type="range"]:focus-visible {
        outline: none;
        border-color: transparent;
        background: transparent;
      }
    }
    .wl-clock-in,
    .wl-clock-out {
      width: 6.0rem;
      min-width: 6.0rem;
      padding-right: 0.1rem;
      &::-webkit-calendar-picker-indicator {
        width: 1rem;
        min-width: 1rem;
        margin-left: -0.2rem;
        padding: 0;
      }
      &::-webkit-datetime-edit {
        padding: 0;
      }
      &::-webkit-datetime-edit-fields-wrapper {
        padding: 0;
      }
      &::-webkit-datetime-edit-hour-field,
      &::-webkit-datetime-edit-minute-field {
        padding: 0;
      }
    }
    .wl-date-holiday {
      background: #ffd6de;
      color: #c62828;
    }
    .wl-date-saturday {
      background: #ffd6de;
      color: #1565c0;
    }
    .wl-date {
      font-weight: 700;
      cursor: pointer;
    }
    .wl-contract-note {
      display: block;
      font-size: 0.75rem;
      color: #777;
    }
    .wl-actions {
      min-width: 7rem;
      display: flex;
      gap: 0.3rem;
      justify-content: center;
    }
  }
}
.work-logs-admin-daily .data-table tbody td.wl-date-holiday {
  background: #ffd6de;
  color: #c62828;
}
.work-logs-admin-daily .data-table tbody td.wl-date-saturday {
  background: #e3f2fd;
  color: #1565c0;
}
.work-logs-admin-daily .data-table tbody td.wl-date {
  font-weight: 700;
  white-space: nowrap;
}
@media (max-width: 640px) {
  .work-logs-input-table-wrap {
    .work-logs-input-table {
      --wl-mobile-grid-columns: repeat(5, minmax(0, 1fr));
      --wl-mobile-grid-gap: 0.25rem;
      display: block;
      thead {
        display: block;
        tr {
          display: grid;
          grid-template-columns: var(--wl-mobile-grid-columns);
          gap: var(--wl-mobile-grid-gap);
          margin-bottom: 0.2rem;
          th {
            box-sizing: border-box;
            display: flex;
            align-items: center;
            justify-content: center;
            min-width: 0;
            min-height: 2.2rem;
            padding: 0.15rem;
            white-space: normal;
            line-height: 1.2;
          }
        }
      }
      tbody {
        display: block;
      }
      .wl-main-row {
        display: grid;
        grid-template-columns: var(--wl-mobile-grid-columns);
        gap: var(--wl-mobile-grid-gap);
        margin-bottom: 0.2rem;
        padding: 0.35rem 0;
        border-bottom: 1px solid #d9e2f1;
        td {
          box-sizing: border-box;
          display: flex;
          align-items: center;
          justify-content: center;
          min-width: 0;
          min-height: 2.2rem;
          padding: 0.15rem;
          white-space: normal;
          overflow: hidden;
        }
      }
      .wl-detail-row {
        margin-bottom: 0.4rem;
        td {
          display: block;
        }
        &.is-open {
          display: block;
        }
      }
      .wl-date {
        flex-direction: column;
        line-height: 1.2;
      }
      .wl-cell-input {
        width: 100%;
        min-width: 0;
      }
      .wl-clock-in,
      .wl-clock-out {
        padding-left: 0.05rem;
      }
      .wl-actions {
        min-width: 0;
        button {
          flex: 0 0 auto;
          min-width: 0;
        }
      }
      .wl-detail-field {
        flex: 0 0 calc(50% - 0.5rem);
        width: calc(50% - 0.5rem);
      }
    }
  }
}
.wl-required {
  color: #c53030;
}
.wl-summary-matrix,
.wl-summary-strip {
  gap: 0.5rem;
  margin-top: 0.8rem;
  .wl-summary-box {
    background: #f4f7fc;
    border: 1px solid #d5deef;
    border-radius: 0.35rem;
    padding: 0.4rem 0.7rem;
  }
}
.wl-summary-matrix {
  display: inline-grid;
  grid-template-columns: repeat(3, max-content);
}
.wl-summary-strip {
  display: flex;
  flex-wrap: wrap;
}
.wl-summary-spacer {
  min-width: 0;
}
.wl-monthly-panel .wl-detail-fields {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1rem;
  align-items: flex-start;
}
.wl-monthly-panel .wl-detail-field {
  flex: 0 0 calc(25% - 0.75rem);
  width: calc(25% - 0.75rem);
  input,
  textarea,
  select {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }
}
.wl-break-modal {
  width: min(30rem, calc(100vw - 2rem));
}
.wl-break-modal-date {
  margin-top: 0;
}
.wl-break-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}
.wl-break-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto;
  gap: 0.5rem;
  align-items: center;
}
.wl-break-row input {
  width: 100%;
  box-sizing: border-box;
}
.wl-break-row-sep {
  text-align: center;
}
@media (max-width: 640px) {
  .wl-break-row {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }
  .wl-break-row-sep {
    display: none;
  }
}
.work-logs-admin-layout {
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  grid-template-rows: minmax(10rem, 30%) 0.75rem minmax(20rem, 70%);
  gap: 0;
  overflow: hidden;
}
.work-logs-admin-panel {
  height: calc(100vh - 4rem);
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}
.work-logs-admin-panel .panel-header {
  align-items: center;
}
.work-logs-admin-panel .panel-header h1,
.work-logs-admin-panel .panel-header .form-item,
.work-logs-admin-panel .panel-header .panel-actions {
  margin-bottom: 0;
}
.work-logs-admin-panel .panel-header .form-item,
.work-logs-admin-panel .panel-header .panel-actions {
  display: flex;
  align-items: center;
}
.work-logs-admin-panel .panel-header .panel-actions {
  gap: 0.5rem;
}
#work-logs-admin-consent-comment-modal #work-logs-admin-consent-comment-text {
  width: calc(100% - 8.5rem);
  max-width: calc(100% - 8.5rem);
  box-sizing: border-box;
}
.work-logs-admin-users-wrap,
.work-logs-admin-details-wrap {
  min-height: 0;
  overflow: hidden;
}
.work-logs-admin-users,
.work-logs-admin-details {
  min-width: 0;
}
.work-logs-admin-users h2,
.work-logs-admin-details h2 {
  margin-top: 0;
  margin-bottom: 0.5rem;
  font-size: 1.1rem;
}
.work-logs-admin-users {
  height: 100%;
  overflow-x: auto;
  overflow-y: auto;
}
.work-logs-admin-users:focus {
  outline: none;
}
.work-logs-admin-users .data-table {
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
  width: 100%;
}
.work-logs-admin-users .data-table th,
.work-logs-admin-users .data-table td {
  border-top-width: 0;
  border-left-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.work-logs-admin-users .data-table thead tr:first-child th {
  border-top-width: 1px;
}
.work-logs-admin-users .data-table tr > :first-child {
  border-left-width: 1px;
}
.work-logs-admin-users .data-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  text-align: center;
  background: var(--table-header-bg);
  overflow: visible;
  padding-right: 1rem;
}
.work-logs-admin-daily .data-table thead th {
  text-align: center;
}
.work-logs-admin-daily .data-table tbody td:nth-child(-n+10) {
  text-align: center;
}
.work-logs-admin-daily .data-table .is-numeric {
  text-align: right;
}
.work-logs-admin-users .data-table tbody tr.is-selected {
  background: #dbe8ff;
  scroll-margin-top: 2.2rem;
}
.work-logs-admin-users .data-table tbody td:nth-child(5),
.work-logs-admin-users .data-table tbody td:nth-child(6),
.work-logs-admin-users .data-table tbody td:nth-child(7),
.work-logs-admin-users .data-table tbody td:nth-child(8),
.work-logs-admin-users .data-table tbody td:nth-child(9),
.work-logs-admin-users .data-table tbody td:nth-child(12) {
  text-align: right;
}
.work-logs-admin-users .data-table tbody td:first-child {
  text-align: center;
}
.work-logs-admin-users .data-table thead th:nth-child(10),
.work-logs-admin-users .data-table thead th:nth-child(11),
.work-logs-admin-users .data-table tbody td:nth-child(10),
.work-logs-admin-users .data-table tbody td:nth-child(11) {
  white-space: nowrap;
}
.work-logs-admin-daily .data-table thead th:nth-child(9),
.work-logs-admin-daily .data-table thead th:nth-child(10),
.work-logs-admin-daily .data-table tbody td:nth-child(9),
.work-logs-admin-daily .data-table tbody td:nth-child(10) {
  white-space: nowrap;
}
.work-logs-admin-details {
  height: 100%;
  overflow-x: auto;
  overflow-y: auto;
}
.work-logs-admin-column-resizer {
  position: absolute;
  top: 0;
  right: -0.35rem;
  width: 0.7rem;
  height: 100%;
  cursor: col-resize;
  touch-action: none;
  z-index: 2;
}
.work-logs-admin-column-resizer::after {
  content: "";
  position: absolute;
  top: 18%;
  bottom: 18%;
  left: 50%;
  width: 1px;
  background: #c4cede;
  transform: translateX(-50%);
}
.work-logs-admin-users.is-column-resizing .work-logs-admin-column-resizer::after,
.work-logs-admin-users .data-table thead th:hover .work-logs-admin-column-resizer::after {
  background: #2050A4;
}
.work-logs-admin-resizer {
  position: relative;
  cursor: row-resize;
  background: transparent;
  user-select: none;
  touch-action: none;
}
.work-logs-admin-resizer::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 1px;
  background: #ccc;
  transform: translateY(-50%);
}
.work-logs-admin-resizer::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 3rem;
  height: 0.35rem;
  border: 1px solid #b8c4d6;
  border-radius: 999px;
  background: #fff;
  transform: translate(-50%, -50%);
}
.work-logs-admin-resizer:hover::after,
.work-logs-admin-resizer:focus-visible::after,
.work-logs-admin-layout.is-resizing .work-logs-admin-resizer::after {
  border-color: #2050A4;
  background: #eef4ff;
}
.work-logs-admin-monthly,
.work-logs-admin-daily {
  margin-top: 1rem;
}
.work-logs-admin-monthly h3,
.work-logs-admin-daily h3 {
  margin-bottom: 0.5rem;
}
.work-logs-admin-alert-level {
  font-weight: 700;
}
.work-logs-admin-alert-inline {
  display: flex;
  align-items: center;
  width: 100%;
  min-width: 0;
}
.work-logs-admin-alert-prefix {
  flex: 0 0 auto;
  white-space: nowrap;
}
.work-logs-admin-alert-text {
  display: block;
  flex: 1 1 auto;
  width: auto;
  max-width: none;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.work-logs-admin-users .data-table td.work-logs-admin-alert-cell {
  overflow: visible;
  text-overflow: clip;
}
.work-logs-admin-alert-level.is-caution {
  color: #b26a00;
}
.work-logs-admin-consent-link {
  margin-left: 0.35rem;
}
.work-logs-admin-alert-level.is-warning {
  color: #c03a2b;
}
.work-logs-admin-alert-level.is-critical {
  color: #8e1b1b;
}
#work-logs-admin-run-assessment.is-running {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  line-height: 1;
}
.work-logs-admin-button-spinner {
  width: 0.9rem;
  height: 0.9rem;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  flex: 0 0 0.9rem;
}
#work-logs-admin-request-health-data-consent {
  width: auto;
  min-width: 16rem;
  padding: 0 0.75rem;
}
@media (max-width: 640px) {
  .wl-monthly-panel .wl-detail-field {
    flex: 0 0 calc(50% - 0.5rem);
    width: calc(50% - 0.5rem);
  }
}
.wlci-options {
  margin: 0;
  white-space: pre-wrap;
  text-align: left;
}
.chat-root {
  height: 100%;
}
.chat-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 16px;
  height: 100%;
  min-height: 0;
}
.chat-sidebar,
.chat-main {
  background: #fff;
  border: 1px solid #d8dee8;
  border-radius: 10px;
  min-height: 0;
}
.chat-sidebar {
  display: grid;
  grid-template-rows: auto 1fr;
  overflow: hidden;
}
.chat-sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px;
  border-bottom: 1px solid #e5e7eb;
}
.chat-thread-list {
  padding: 4px;
  overflow: auto;
  min-height: 0;
}
.chat-thread-item {
  display: flex;
  align-items: center;
  gap: 2px;
  box-sizing: border-box;
  width: 100%;
  padding: 0;
}
.chat-thread-main {
  flex: 1 1 auto;
  min-width: 0;
  background: transparent;
  text-align: left;
  padding: 3px 5px;
  border-radius: 8px;
  cursor: pointer;
  outline: none;
}
.chat-thread-item.is-active .chat-thread-main,
.chat-thread-item:hover .chat-thread-main {
  background: #dbeafe;
}
.chat-thread-main:focus-visible {
  background: #dbeafe;
}
.chat-thread-delete {
  flex: 0 0 auto;
  border: 0;
  background: transparent;
  color: #6b7280;
  border-radius: 6px;
  width: 20px;
  height: 20px;
  cursor: pointer;
}
.chat-thread-delete:hover,
.chat-thread-delete:focus-visible {
  background: #fee2e2;
  color: #b91c1c;
}
.chat-thread-title,
.chat-thread-meta {
  display: block;
}
.chat-thread-title {
  width: 100%;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.chat-thread-meta {
  margin-top: 4px;
  font-size: 12px;
  color: #6b7280;
}
.chat-main {
  display: grid;
  grid-template-rows: 1fr auto;
  overflow: hidden;
}
.chat-message-list {
  padding: 16px;
  overflow: auto;
  min-height: 0;
}
.chat-message {
  display: flex;
  margin-bottom: 12px;
}
.chat-message.is-user {
  justify-content: flex-end;
}
.chat-message-bubble {
  max-width: min(720px, 85%);
  padding: 12px 14px;
  border-radius: 12px;
  background: #f3f4f6;
}
.chat-message.is-assistant .chat-message-bubble {
  max-width: 100%;
}
.chat-message-text p {
  margin: 0 0 0.35rem 0;
}
.chat-message-text p:last-child {
  margin-bottom: 0;
}
.chat-message-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 18px;
}
.chat-message-spinner {
  width: 12px;
  height: 12px;
  border: 2px solid rgba(32, 80, 164, 0.18);
  border-top-color: #2050A4;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  flex: 0 0 12px;
}
.chat-message-spinner.is-inline {
  display: inline-block;
  margin-left: 8px;
  vertical-align: -1px;
}
.chat-message.is-user .chat-message-bubble {
  background: #dbeafe;
}
.chat-message-error {
  margin-top: 6px;
  color: #b91c1c;
  font-size: 12px;
}
.chat-compose {
  padding: 12px;
  border-top: 1px solid #e5e7eb;
}
.chat-compose textarea {
  width: 100%;
  resize: vertical;
}
.chat-compose-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 8px;
}
.chat-compose-hint {
  color: #6b7280;
  font-size: 12px;
}
.chat-compose-actions button {
  margin-left: auto;
}
@media (max-width: 768px) {
  .chat-layout {
    grid-template-columns: 1fr;
    height: auto;
  }
}

/*
 * Header navigation redesign
 */
body {
  background: #fff;
}

.page {
  min-height: 100vh;
  height: 100vh;
  display: block;
  overflow: hidden;
}

.header {
  position: sticky;
  top: 0;
  z-index: 50;
  padding: 0 1.25rem;
  border-bottom: 1px solid #d8e1ec;
  background: #fff;
  box-shadow: none;
}

.header .logo {
  color: #1c355e;
  text-shadow: none;
}

.header .user-trigger {
  color: #314766;
  background: transparent;
  border-color: transparent;
}

.header .user-trigger:hover,
.header .user-trigger:focus-visible {
  background: transparent;
  border-color: transparent;
}

.user-trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-width: 0;
  padding: 0;
}

.user-trigger-icon {
  position: relative;
  display: inline-block;
  width: 1.6rem;
  height: 1.6rem;
  flex: 0 0 auto;
  border: 1px solid #c6ced8;
  border-radius: 999px;
}

.user-trigger-icon::before,
.user-trigger-icon::after {
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  border: 1.5px solid #9aa4b2;
  background: transparent;
}

.user-trigger-icon::before {
  top: 0.1rem;
  width: 0.48rem;
  height: 0.48rem;
  border-radius: 999px;
}

.user-trigger-icon::after {
  bottom: 0.12rem;
  width: 0.9rem;
  height: 0.54rem;
  border-top-left-radius: 0.52rem;
  border-top-right-radius: 0.52rem;
  border-bottom: 0;
}

.user-trigger-label {
  display: inline-block;
  color: #314766;
}

#menu-bar {
  display: flex;
  align-items: stretch;
  height: 3.35rem;
  padding: 0 1.25rem;
  background: #fff;
  border-bottom: 1px solid #d9d9d9;
}

#menu-icon,
#menu-title,
#menu-list,
#menu-popup .menu-popup-group-button,
#menu-popup .menu-popup-child {
  font-family: var(--default-font);
  font-size: var(--default-font-size);
  line-height: 1.2;
}

#menu-icon {
  flex: 0 0 auto;
  width: 1.85rem;
  height: 1.85rem;
  margin: auto 0;
  background:
    linear-gradient(#b2bac3 0 0) 0.16rem 0.16rem / 0.42rem 0.42rem no-repeat,
    linear-gradient(#b2bac3 0 0) center 0.16rem / 0.42rem 0.42rem no-repeat,
    linear-gradient(#b2bac3 0 0) calc(100% - 0.16rem) 0.16rem / 0.42rem 0.42rem no-repeat,
    linear-gradient(#b2bac3 0 0) 0.16rem center / 0.42rem 0.42rem no-repeat,
    linear-gradient(#b2bac3 0 0) center center / 0.42rem 0.42rem no-repeat,
    linear-gradient(#b2bac3 0 0) calc(100% - 0.16rem) center / 0.42rem 0.42rem no-repeat,
    linear-gradient(#b2bac3 0 0) 0.16rem calc(100% - 0.16rem) / 0.42rem 0.42rem no-repeat,
    linear-gradient(#b2bac3 0 0) center calc(100% - 0.16rem) / 0.42rem 0.42rem no-repeat,
    linear-gradient(#b2bac3 0 0) calc(100% - 0.16rem) calc(100% - 0.16rem) / 0.42rem 0.42rem no-repeat;
  cursor: pointer;
}

#menu-title {
  display: flex;
  align-items: stretch;
  flex: 0 0 auto;
  margin-left: 1rem;
}

#menu-list {
  display: flex;
  align-items: stretch;
  flex: 0 0 auto;
  margin-left: 0;
  padding-left: 0;
  border-left: 0;
}

#menu-title .menu-item,
#menu-list .menu-item {
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  height: 100%;
  margin: 0;
  cursor: pointer;
  user-select: none;
}

#menu-title .menu-item {
  min-width: max-content;
  padding: 0 4em 0 0;
  color: #2f3b4d;
  font-weight: bold;
  border-bottom: 0;
}

#menu-list .menu-item {
  min-width: calc(4em + 1.6rem);
  padding: 0 0.8rem;
  color: #42566f;
  font-weight: bold;
  border-left: 1px solid #d9d9d9;
  border-right: 1px solid #d9d9d9;
  background: #fff;
}

#menu-list .menu-item + .menu-item {
  margin-left: -1px;
}

#menu-list .menu-item:hover {
  background: #f1f3f5;
}

#menu-list .menu-item.is-active {
  background: #dfe4ea;
  border-left-color: #d9d9d9;
  border-right-color: #d9d9d9;
}

.menu-popup {
  position: absolute;
  top: calc(100% + 0.5rem);
  left: 1.25rem;
  z-index: 40;
  min-width: 16rem;
  max-width: min(26rem, calc(100vw - 2rem));
  max-height: calc(100vh - 5.5rem);
  overflow: auto;
  padding: 0.55rem;
  border: 1px solid #d8e1ec;
  background: #fff;
  box-shadow: 0 18px 40px rgba(35, 53, 89, 0.18);
}

.menu-popup-list {
  display: grid;
  gap: 0.4rem;
}

.menu-popup-group {
  display: grid;
  gap: 0.15rem;
}

#menu-popup .menu-popup-group-button,
#menu-popup .menu-popup-child {
  display: block;
  padding: 0.35rem 0.55rem;
  color: #42566f;
  line-height: 1.25;
  cursor: pointer;
}

#menu-popup .menu-popup-group-button {
  font-weight: bold;
}

.menu-popup-children {
  display: grid;
  gap: 0.1rem;
  padding-left: 0.75rem;
}

#menu-popup .menu-popup-child:hover,
#menu-popup .menu-popup-group-button:hover,
#menu-popup .menu-popup-action.is-active {
  background: #edf3fb;
}

.sidebar-backdrop {
  position: fixed;
  inset: 0;
  z-index: 35;
  background: rgba(16, 27, 48, 0.2);
}

.main {
  min-height: 0;
  height: calc(100vh - var(--header-height) - var(--menu-bar-height));
  margin: 0;
  padding: 0;
  background: #F4F6F9;
  box-shadow: none;
  border-radius: 0;
  overflow: auto;
}

.main .panel,
.main .data-browser-root,
.main .chat-layout {
  background: #F4F6F9;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.main .panel {
  padding: 1rem 1.1rem;
}

@media (max-width: 768px) {
  .header {
    padding: 0 0.75rem;
  }
  #menu-bar {
    height: var(--mobile-menu-bar-height);
    padding: 0 0.75rem;
  }
  #menu-title {
    margin-left: 0.75rem;
  }
  #menu-list {
    margin-left: 0.75rem;
    padding-left: 0.75rem;
  }
  .menu-popup {
    left: 0.75rem;
    max-width: calc(100vw - 1.5rem);
    max-height: calc(100vh - 5rem);
  }
  .main {
    height: calc(100vh - var(--mobile-header-height) - var(--mobile-menu-bar-height));
    padding: 0;
  }
}
