:root {
  color-scheme: light;
  --md-sys-color-primary: #006a60;
  --md-sys-color-on-primary: #ffffff;
  --md-sys-color-primary-container: #9ff2e4;
  --md-sys-color-on-primary-container: #00201c;
  --md-sys-color-secondary-container: #cce8e2;
  --md-sys-color-on-secondary-container: #06201c;
  --md-sys-color-surface: #f8faf9;
  --md-sys-color-surface-container: #edf1ef;
  --md-sys-color-surface-container-high: #e7ebe9;
  --md-sys-color-surface-container-low: #f7f8f8;
  --md-sys-color-surface-variant: #e1e7e4;
  --md-sys-color-on-surface: #191c1b;
  --md-sys-color-on-surface-variant: #3f4946;
  --md-sys-color-outline: #6f7976;
  --md-sys-color-outline-variant: #bec9c5;
  --md-sys-color-error: #ba1a1a;
  --md-sys-elevation-1: 0 1px 2px rgba(25, 28, 27, 0.22), 0 1px 3px 1px rgba(25, 28, 27, 0.1);
}

html {
  scroll-padding-top: 92px;
}

.material-symbols-rounded {
  display: inline-block;
  flex: 0 0 auto;
  font-size: 22px;
  font-variation-settings: "FILL" 0, "wght" 400, "GRAD" 0, "opsz" 24;
  line-height: 1;
}

body.m3-app-shell {
  margin: 0;
  background: var(--md-sys-color-surface);
  color: var(--md-sys-color-on-surface);
  font-family: Roboto, "Noto Sans JP", "Yu Gothic UI", Meiryo, sans-serif;
  letter-spacing: 0;
}

[id] {
  scroll-margin-top: 92px;
}

.m3-top-app-bar {
  position: sticky;
  top: 0;
  z-index: 1030;
  min-height: 68px;
  padding: 0;
  border-bottom: 1px solid var(--md-sys-color-outline-variant);
  background: rgba(248, 250, 249, 0.96);
  backdrop-filter: blur(12px);
}

.m3-top-app-bar .container-fluid {
  display: flex;
  align-items: center;
  width: min(100%, 1440px);
  min-height: 68px;
  margin: 0 auto;
  padding: 8px 24px;
  gap: 12px;
}

.m3-app-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: max-content;
  color: var(--md-sys-color-on-surface);
  font-size: 18px;
  font-weight: 600;
  height: 40px;
  padding-top: 0;
  padding-bottom: 0;
  margin-top: 0;
  margin-bottom: 0;
  line-height: 1;
}

.m3-top-app-bar .navbar-brand {
  align-self: center;
  display: inline-flex;
  align-items: center;
}

.m3-brand-mark {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border-radius: 10px;
  background: var(--md-sys-color-surface);
  color: var(--md-sys-color-on-primary-container);
  overflow: hidden;
  box-shadow: inset 0 0 0 1px var(--md-sys-color-outline-variant);
}

.m3-brand-mark img {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  object-fit: cover;
}

.m3-top-app-bar .nav-link {
  padding: 10px 16px !important;
  border-radius: 999px;
  color: var(--md-sys-color-on-surface-variant);
  font-weight: 500;
}

.m3-top-app-bar .nav-link:hover,
.m3-top-app-bar .nav-link:focus,
.m3-top-app-bar .nav-link.show {
  background: var(--md-sys-color-secondary-container);
  color: var(--md-sys-color-on-secondary-container);
}

.m3-top-app-bar .dropdown-menu {
  padding: 8px;
  border: 1px solid var(--md-sys-color-outline-variant);
  border-radius: 8px;
  background: var(--md-sys-color-surface);
  box-shadow: var(--md-sys-elevation-1);
}

.m3-top-app-bar .dropdown-item {
  padding: 10px 14px;
  border-radius: 6px;
}

.m3-top-app-bar .dropdown-item:hover,
.m3-top-app-bar .dropdown-item:focus {
  background: var(--md-sys-color-secondary-container);
  color: var(--md-sys-color-on-secondary-container);
}

.app-main-shell {
  width: min(100% - 32px, 1320px);
  margin: 0 auto;
  padding: 22px 0 56px;
}

/* Shared page surfaces keep the legacy management forms visually consistent. */
.app-main-shell > .border.rounded-5,
.app-main-shell > section.border,
.app-main-shell > .card,
.m3-page-surface {
  border: 1px solid var(--md-sys-color-outline-variant) !important;
  border-radius: 8px !important;
  background: var(--md-sys-color-surface) !important;
  box-shadow: none !important;
}

.app-main-shell > .border.rounded-5 {
  margin-top: 0 !important;
  padding: clamp(20px, 3vw, 32px) !important;
}

.app-main-shell .form-control,
.app-main-shell .form-select,
.m3-public-main .form-control,
.m3-public-main .form-select {
  min-height: 48px;
  border-color: var(--md-sys-color-outline);
  border-radius: 6px;
  background: var(--md-sys-color-surface);
  color: var(--md-sys-color-on-surface);
}

.app-main-shell .form-control:focus,
.app-main-shell .form-select:focus,
.m3-public-main .form-control:focus,
.m3-public-main .form-select:focus {
  border-color: var(--md-sys-color-primary);
  box-shadow: 0 0 0 1px var(--md-sys-color-primary);
}

.app-main-shell .table,
.m3-public-main .table {
  --bs-table-bg: transparent;
  --bs-table-border-color: var(--md-sys-color-outline-variant);
}

.app-main-shell .table > :not(caption) > * > *,
.m3-public-main .table > :not(caption) > * > * {
  padding: 14px 12px;
  vertical-align: middle;
}

.m3-public-app-bar {
  position: sticky;
  top: 0;
  z-index: 1030;
  border-bottom: 1px solid var(--md-sys-color-outline-variant);
  background: rgba(248, 250, 249, 0.96);
  backdrop-filter: blur(12px);
}

.m3-public-app-bar-inner {
  display: flex;
  width: min(100% - 32px, 1240px);
  min-height: 68px;
  align-items: center;
  gap: 16px;
  margin: 0 auto;
}

.m3-public-brand {
  text-decoration: none;
}

.m3-header-page-title {
  overflow: hidden;
  color: var(--md-sys-color-on-surface-variant);
  font-size: 14px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.m3-public-header-actions {
  margin-left: auto;
}

.m3-public-header-actions .btn {
  gap: 6px;
}

.m3-public-main {
  width: min(100% - 32px, 1040px);
  margin: 0 auto;
  padding: 32px 0 56px;
}

.m3-public-main > .m3-page-surface {
  padding: clamp(20px, 4vw, 36px);
}

.company-login-shell {
  min-height: 100vh;
  background:
    linear-gradient(180deg, rgba(159, 242, 228, 0.18), transparent 260px),
    var(--md-sys-color-surface-container);
}

.company-login-main {
  display: grid;
  min-height: calc(100vh - 68px);
  place-items: center;
  padding: clamp(24px, 6vw, 56px) 16px;
}

.company-login-card {
  display: grid;
  width: min(100%, 920px);
  grid-template-columns: minmax(260px, 360px) minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid var(--md-sys-color-outline-variant);
  border-radius: 8px;
  background: var(--md-sys-color-surface);
  box-shadow: 0 16px 40px rgba(25, 28, 27, 0.14);
}

.company-login-visual {
  position: relative;
  min-height: 520px;
  background: var(--md-sys-color-surface-container-high);
}

.company-login-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.72) contrast(1.05);
}

.company-login-visual::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(180deg, transparent 54%, rgba(0, 0, 0, 0.18));
  pointer-events: none;
}

.company-login-panel {
  display: flex;
  min-width: 0;
  flex-direction: column;
  justify-content: center;
  padding: clamp(28px, 5vw, 56px);
}

.company-login-heading {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}

.company-login-icon {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 50%;
  background: var(--md-sys-color-primary-container);
  color: var(--md-sys-color-on-primary-container);
}

.company-login-eyebrow {
  margin: 0 0 2px;
  color: var(--md-sys-color-on-surface-variant);
  font-size: 13px;
  font-weight: 700;
}

.company-login-heading h1 {
  margin: 0;
  color: var(--md-sys-color-on-surface);
  font-size: 24px;
  font-weight: 700;
  line-height: 1.25;
}

.company-login-description {
  margin: 0 0 24px;
  color: var(--md-sys-color-on-surface-variant);
  font-size: 15px;
  font-weight: 500;
  line-height: 1.7;
}

.company-login-form {
  display: grid;
  gap: 18px;
}

.m3-text-field {
  position: relative;
  display: block;
}

.m3-text-field input {
  width: 100%;
  height: 58px;
  padding: 20px 16px 8px;
  border: 1px solid var(--md-sys-color-outline);
  border-radius: 6px;
  background: var(--md-sys-color-surface);
  color: var(--md-sys-color-on-surface);
  font: inherit;
  font-size: 16px;
  font-weight: 600;
  outline: none;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.m3-text-field span {
  position: absolute;
  top: 9px;
  left: 16px;
  color: var(--md-sys-color-on-surface-variant);
  font-size: 12px;
  font-weight: 700;
  pointer-events: none;
}

.m3-text-field input:focus {
  border-color: var(--md-sys-color-primary);
  box-shadow: 0 0 0 1px var(--md-sys-color-primary);
}

.m3-text-field input:focus + span {
  color: var(--md-sys-color-primary);
}

.company-login-message {
  display: flex;
  min-height: 48px;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 8px;
  background: #ffdad6;
  color: #410002;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.45;
}

.company-login-message .material-symbols-rounded {
  color: var(--md-sys-color-error);
}

.company-login-actions {
  display: flex;
  justify-content: flex-end;
  padding-top: 4px;
}

.m3-filled-button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 24px;
  border: 0;
  border-radius: 999px;
  background: var(--md-sys-color-primary);
  color: var(--md-sys-color-on-primary);
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  transition: background-color 160ms ease, box-shadow 160ms ease, transform 120ms ease;
}

.m3-filled-button:hover,
.m3-filled-button:focus {
  background: #00564e;
  color: var(--md-sys-color-on-primary);
  box-shadow: var(--md-sys-elevation-1);
}

.m3-filled-button:active {
  transform: translateY(1px);
}

.top-login-shell {
  min-height: 100vh;
  background:
    linear-gradient(180deg, rgba(159, 242, 228, 0.22), transparent 300px),
    var(--md-sys-color-surface);
}

.top-login-main {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: calc(100vh - 68px);
  padding: clamp(40px, 6vh, 72px) 16px 56px;
}

.top-login-hero {
  display: grid;
  width: min(100%, 900px);
  align-content: start;
  gap: 28px;
}

.top-login-copy {
  display: grid;
  gap: 8px;
  text-align: center;
}

.top-login-eyebrow {
  margin: 0;
  color: var(--md-sys-color-primary);
  font-size: 13px;
  font-weight: 700;
}

.top-login-copy h1 {
  margin: 0;
  color: var(--md-sys-color-on-surface);
  font-size: clamp(30px, 4vw, 46px);
  font-weight: 800;
  line-height: 1.16;
}

.top-login-copy p:last-child {
  margin: 0;
  color: var(--md-sys-color-on-surface-variant);
  font-size: 16px;
  font-weight: 600;
}

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

.top-account-card {
  display: grid;
  min-height: 190px;
  align-content: start;
  gap: 10px;
  padding: 24px;
  border: 1px solid var(--md-sys-color-outline-variant);
  border-radius: 8px;
  background: var(--md-sys-color-surface);
  color: var(--md-sys-color-on-surface);
  text-decoration: none;
  box-shadow: 0 12px 30px rgba(25, 28, 27, 0.08);
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 120ms ease;
}

.top-account-card:hover,
.top-account-card:focus {
  border-color: var(--md-sys-color-primary);
  color: var(--md-sys-color-on-surface);
  box-shadow: 0 16px 36px rgba(25, 28, 27, 0.14);
  transform: translateY(-1px);
}

.top-account-card.is-disabled {
  opacity: 0.58;
  pointer-events: none;
}

.top-account-icon {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 50%;
  background: var(--md-sys-color-primary-container);
  color: var(--md-sys-color-on-primary-container);
}

.top-account-title {
  font-size: 18px;
  font-weight: 800;
}

.top-account-description {
  color: var(--md-sys-color-on-surface-variant);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.65;
}

.top-account-action {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  gap: 4px;
  margin-top: auto;
  color: var(--md-sys-color-primary);
  font-size: 14px;
  font-weight: 800;
}

.all-user-worktime-page {
  display: grid;
  gap: 14px;
}

.all-user-worktime-header {
  display: grid;
  grid-template-columns: minmax(340px, auto) minmax(0, 1fr);
  align-items: center;
  gap: 16px;
  padding: 14px;
  border: 1px solid var(--md-sys-color-outline-variant);
  border-radius: 8px;
  background: var(--md-sys-color-surface);
  box-shadow: 0 8px 24px rgba(25, 28, 27, 0.06);
}

.all-user-worktime-summary {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  color: var(--md-sys-color-on-surface-variant);
  font-size: 14px;
  font-weight: 800;
}

.all-user-worktime-summary .material-symbols-rounded {
  color: var(--md-sys-color-primary);
}

.all-user-table-shell {
  overflow: hidden;
  border: 1px solid var(--md-sys-color-outline-variant);
  border-radius: 8px;
  background: var(--md-sys-color-surface);
  box-shadow: 0 8px 24px rgba(25, 28, 27, 0.06);
}

.all-user-table-scroll {
  overflow: auto;
  max-height: calc(100vh - 220px);
}

.all-user-worktime-table {
  width: max-content;
  min-width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
}

.all-user-worktime-table th,
.all-user-worktime-table td {
  border-right: 1px solid var(--md-sys-color-outline-variant);
  border-bottom: 1px solid var(--md-sys-color-outline-variant);
}

.all-user-worktime-table th:last-child,
.all-user-worktime-table td:last-child {
  border-right: 0;
}

.all-user-worktime-table thead th {
  position: sticky;
  top: 0;
  z-index: 3;
  height: 52px;
  padding: 10px 8px;
  background: var(--md-sys-color-surface-container);
  color: var(--md-sys-color-on-surface-variant);
  font-size: 13px;
  font-weight: 800;
  text-align: center;
}

.all-user-worktime-table tbody tr:hover .all-user-day-cell,
.all-user-worktime-table tbody tr:hover .all-user-name-cell {
  background-color: var(--md-sys-color-secondary-container);
}

.all-user-sticky {
  position: sticky;
  left: 0;
  z-index: 2;
}

.all-user-name-header {
  width: 260px;
  min-width: 260px;
  max-width: 260px;
  z-index: 4 !important;
  text-align: left !important;
}

.all-user-day-header {
  width: 88px;
  min-width: 88px;
  max-width: 88px;
  line-height: 1.2;
  white-space: normal;
}

.all-user-day-header br {
  display: block;
}

.all-user-name-cell {
  width: 260px;
  min-width: 260px;
  max-width: 260px;
  padding: 0;
  background: var(--md-sys-color-surface);
  vertical-align: top;
}

.all-user-person {
  display: grid;
  gap: 9px;
  padding: 14px;
  text-align: left;
}

.all-user-person-main {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.all-user-name {
  color: var(--md-sys-color-on-surface);
  font-size: 15px;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.all-user-lock {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #ffdad6;
  color: #410002;
  font-size: 11px;
  font-weight: 800;
}

.all-user-lock .material-symbols-rounded {
  font-size: 16px;
}

.all-user-download {
  display: inline-flex;
  width: fit-content;
  min-height: 32px;
  align-items: center;
  gap: 4px;
  padding: 0 10px;
  border: 1px solid var(--md-sys-color-outline-variant);
  border-radius: 999px;
  color: var(--md-sys-color-primary);
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
}

.all-user-download:hover,
.all-user-download:focus {
  background: var(--md-sys-color-secondary-container);
  color: var(--md-sys-color-primary);
}

.all-user-download .material-symbols-rounded {
  font-size: 17px;
}

.all-user-total {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  color: var(--md-sys-color-on-surface-variant);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.45;
}

.all-user-total span {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--md-sys-color-surface-container);
}

.all-user-day-cell {
  width: 88px;
  min-width: 88px;
  max-width: 88px;
  height: 76px;
  padding: 6px;
  background-color: var(--all-user-day-bg, var(--md-sys-color-surface));
  color: var(--md-sys-color-on-surface);
  font-size: 12px;
  overflow: hidden;
  text-align: center;
  vertical-align: middle;
  white-space: normal;
}

.all-user-day-cell span {
  display: block;
}

.all-user-day-cell.is-empty {
  color: var(--md-sys-color-on-surface-variant);
}

.all-user-time {
  color: var(--md-sys-color-primary);
  font-size: 14px;
  font-weight: 800;
  line-height: 1.45;
  white-space: nowrap;
}

.all-user-day-off {
  min-height: 18px;
  margin-top: 4px;
  color: var(--md-sys-color-on-surface-variant);
  font-size: 11px;
  font-weight: 700;
  overflow-wrap: anywhere;
}

@media (max-width: 620px) {
  html {
    scroll-padding-top: 84px;
  }

  [id] {
    scroll-margin-top: 84px;
  }

  .m3-public-app-bar-inner {
    width: min(100% - 24px, 1240px);
    min-height: 60px;
  }

  .m3-app-brand {
    gap: 8px;
    font-size: 15px;
  }

  .m3-brand-mark {
    width: 34px;
    height: 34px;
  }

  .m3-header-page-title {
    display: none;
  }

  .m3-public-main {
    width: min(100% - 24px, 1040px);
    padding-top: 20px;
  }

  .company-login-main {
    min-height: calc(100vh - 60px);
    place-items: start center;
    padding: 20px 12px 32px;
  }

  .company-login-card {
    grid-template-columns: 1fr;
  }

  .company-login-visual {
    min-height: 180px;
    max-height: 220px;
  }

  .company-login-panel {
    padding: 24px 20px 28px;
  }

  .company-login-heading {
    align-items: flex-start;
    gap: 12px;
  }

  .company-login-heading h1 {
    font-size: 21px;
  }

  .company-login-actions {
    justify-content: stretch;
  }

  .m3-filled-button {
    width: 100%;
  }

  .top-login-main {
    min-height: calc(100vh - 60px);
    padding: 28px 12px 36px;
  }

  .top-login-hero {
    gap: 20px;
  }

  .top-login-copy {
    text-align: left;
  }

  .top-account-grid {
    grid-template-columns: 1fr;
  }

  .top-account-card {
    min-height: 156px;
    padding: 20px;
  }

  .all-user-worktime-header {
    grid-template-columns: 1fr;
  }

  .all-user-worktime-summary {
    justify-content: flex-start;
  }

  .all-user-table-scroll {
    max-height: calc(100vh - 250px);
  }

  .all-user-worktime-table {
    min-width: 980px;
  }

  .all-user-name-header,
  .all-user-name-cell {
    width: 220px;
    min-width: 220px;
    max-width: 220px;
  }

  .all-user-day-header {
    width: 78px;
    min-width: 78px;
    max-width: 78px;
  }

  .all-user-day-cell {
    width: 78px;
    min-width: 78px;
    max-width: 78px;
    height: 72px;
    padding: 6px;
  }
}

.btn,
input.btn,
a.btn {
  min-height: 40px;
  padding: 9px 20px;
  border-radius: 999px !important;
  box-shadow: none !important;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
}

button.btn,
a.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 20px;
  vertical-align: middle;
}

input.btn {
  line-height: 20px;
  vertical-align: middle;
}

.btn > i {
  line-height: 1;
}

.btn-primary {
  border-color: var(--md-sys-color-primary) !important;
  background: var(--md-sys-color-primary) !important;
  color: var(--md-sys-color-on-primary) !important;
}

.btn-secondary,
.btn-outline-secondary,
.btn-default,
.btn-info {
  border: 1px solid var(--md-sys-color-outline) !important;
  background: transparent !important;
  color: var(--md-sys-color-primary) !important;
}

.btn-secondary:hover,
.btn-outline-secondary:hover,
.btn-default:hover,
.btn-info:hover {
  background: var(--md-sys-color-secondary-container) !important;
}

.m3-icon-button,
.m3-icon-action {
  display: inline-grid;
  width: 40px;
  height: 40px;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--md-sys-color-on-surface-variant);
  cursor: pointer;
}

.m3-icon-button:hover,
.m3-icon-action:hover {
  background: var(--md-sys-color-secondary-container);
  color: var(--md-sys-color-on-secondary-container);
}

.m3-icon-action {
  width: 48px;
  height: 48px;
  font-size: 18px;
}

.worktime-page {
  display: grid;
  gap: 14px;
}

.worktime-sticky-overview {
  position: sticky;
  top: 76px;
  z-index: 1020;
  padding: 2px 0;
}

.worktime-page-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 68px;
  padding: 9px 10px 9px 12px;
  border: 1px solid rgba(111, 121, 118, 0.24);
  border-radius: 20px;
  background: rgba(248, 250, 249, 0.94);
  box-shadow: 0 10px 30px rgba(25, 28, 27, 0.10);
  backdrop-filter: blur(18px) saturate(140%);
}

.worktime-toolbar-core {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 14px;
}

.month-navigator,
.worktime-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.month-navigator {
  flex: 0 0 auto;
  justify-content: flex-start;
}

.worktime-actions {
  min-width: 0;
  justify-content: flex-end;
  white-space: nowrap;
}

.worktime-actions .btn {
  display: inline-flex;
  min-width: 40px;
  min-height: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 8px 12px;
  border-color: transparent !important;
  border-radius: 12px;
  background: transparent !important;
  color: var(--md-sys-color-on-surface-variant) !important;
  line-height: 20px;
}

.worktime-actions .btn:hover {
  background: var(--md-sys-color-secondary-container) !important;
  color: var(--md-sys-color-on-secondary-container) !important;
}

.worktime-month-step {
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  place-items: center;
  border-radius: 12px;
  color: var(--md-sys-color-primary);
  text-decoration: none;
  transition: background-color 150ms ease, transform 150ms ease;
}

.worktime-month-step:hover,
.worktime-month-step:focus-visible {
  background: var(--md-sys-color-secondary-container);
  color: var(--md-sys-color-on-secondary-container);
  transform: translateY(-1px);
}

.worktime-month-step .material-symbols-rounded {
  font-size: 26px;
}

.worktime-month-heading {
  display: grid;
  min-width: 128px;
  gap: 1px;
  text-align: center;
}

.worktime-month-heading > span {
  color: var(--md-sys-color-on-surface-variant);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.12em;
  line-height: 1;
  text-transform: uppercase;
}

.workspace-switcher {
  display: inline-grid;
  grid-template-columns: auto minmax(0, auto);
  align-self: center;
  min-height: 40px;
  height: 40px;
  margin: 0;
  align-items: center;
  gap: 6px;
  padding: 0 12px;
  border: 1px solid var(--md-sys-color-outline-variant);
  border-radius: 999px;
  background: var(--md-sys-color-surface-container);
  color: var(--md-sys-color-on-surface-variant);
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}

.workspace-switcher label {
  display: inline-flex;
  align-items: center;
  margin: 0;
  height: 100%;
  line-height: 20px;
  white-space: nowrap;
}

.workspace-switcher select {
  display: block;
  width: auto;
  height: 24px;
  min-height: 24px;
  margin: 0;
  padding-top: 0;
  padding-bottom: 0;
  max-width: 180px;
  line-height: 20px;
  vertical-align: middle;
  border: 0;
  background: transparent;
  color: var(--md-sys-color-primary);
  font: inherit;
  font-weight: 700;
  outline: 0;
  line-height: 24px;
}

.worktime-actions .btn > i {
  display: inline-flex;
  align-items: center;
  height: 20px;
  line-height: 20px;
}

.workspace-create {
  position: relative;
}

.workspace-create summary {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border-radius: 50%;
  color: var(--md-sys-color-primary);
  cursor: pointer;
  list-style: none;
}

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

.workspace-create[open] form {
  position: absolute;
  z-index: 10;
  top: 46px;
  right: 0;
  display: grid;
  width: 260px;
  gap: 8px;
  padding: 14px;
  border: 1px solid var(--md-sys-color-outline-variant);
  border-radius: 8px;
  background: var(--md-sys-color-surface);
  box-shadow: var(--md-sys-elevation-1);
}

.month-title {
  margin: 0;
  color: var(--md-sys-color-on-surface);
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.1;
  text-align: center;
}

.worktime-lock-button {
  gap: 7px;
  border-width: 1px !important;
  font-weight: 800;
}

.worktime-lock-button .material-symbols-rounded {
  font-size: 20px;
  font-variation-settings: "FILL" 1, "wght" 500, "GRAD" 0, "opsz" 24;
}

.worktime-actions .worktime-lock-button.is-locked {
  border-color: var(--md-sys-color-primary) !important;
  background: var(--md-sys-color-primary) !important;
  color: var(--md-sys-color-on-primary) !important;
}

.worktime-actions .worktime-lock-button.is-locked:hover,
.worktime-actions .worktime-lock-button.is-locked:focus {
  background: #00564e !important;
  color: var(--md-sys-color-on-primary) !important;
}

.worktime-actions .worktime-lock-button.is-unlocked {
  border-color: var(--md-sys-color-outline) !important;
  background: var(--md-sys-color-surface) !important;
  color: var(--md-sys-color-primary) !important;
}

.worktime-actions .worktime-lock-button.is-unlocked:hover,
.worktime-actions .worktime-lock-button.is-unlocked:focus {
  background: var(--md-sys-color-secondary-container) !important;
}

.worktime-summary {
  display: inline-flex;
  min-width: 154px;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 7px 13px 7px 11px;
  border: 1px solid rgba(0, 106, 96, 0.16);
  border-radius: 15px;
  background: linear-gradient(135deg, rgba(159, 242, 228, 0.76), rgba(204, 232, 226, 0.58));
  color: var(--md-sys-color-on-primary-container);
}

.worktime-summary-icon {
  color: var(--md-sys-color-primary);
  font-size: 19px;
  font-variation-settings: "FILL" 1, "wght" 500, "GRAD" 0, "opsz" 24;
}

.worktime-summary-label {
  color: var(--md-sys-color-on-surface-variant);
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.worktime-summary strong {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
}

@media (max-width: 991px) {
  .worktime-sticky-overview {
    top: 72px;
  }
}

@media print {
  .worktime-sticky-overview {
    position: static;
  }
}

.worktime-view-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 14px;
  border: 1px solid var(--md-sys-color-outline-variant);
  border-radius: 8px;
  background: var(--md-sys-color-surface);
}

.m3-view-switch {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border-radius: 999px;
  background: var(--md-sys-color-surface-container-high);
}

.m3-view-button {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 16px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--md-sys-color-on-surface-variant);
  font-size: 14px;
  font-weight: 600;
}

.m3-view-button.is-selected {
  background: var(--md-sys-color-primary);
  color: var(--md-sys-color-on-primary);
}

.calendar-field-controls {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  color: var(--md-sys-color-on-surface-variant);
  font-size: 13px;
}

.calendar-field-label {
  margin-right: 2px;
  font-weight: 700;
}

.calendar-field-controls label {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  gap: 6px;
  padding: 4px 11px 4px 8px;
  border: 1px solid var(--md-sys-color-outline-variant);
  border-radius: 999px;
  background: var(--md-sys-color-surface);
  color: var(--md-sys-color-on-surface-variant);
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease;
}

.calendar-field-controls label:has(input:checked) {
  border-color: color-mix(in srgb, var(--md-sys-color-primary) 38%, var(--md-sys-color-outline-variant));
  background: var(--md-sys-color-secondary-container);
  color: var(--md-sys-color-on-secondary-container);
}

.calendar-field-controls input {
  display: grid;
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  margin: 0;
  place-items: center;
  border: 2px solid var(--md-sys-color-outline);
  border-radius: 5px;
  appearance: none;
  background: transparent;
}

.calendar-field-controls input:checked {
  border-color: var(--md-sys-color-primary);
  background: var(--md-sys-color-primary);
}

.calendar-field-controls input:checked::before {
  width: 9px;
  height: 7px;
  content: "";
  clip-path: polygon(14% 44%, 0 60%, 38% 100%, 100% 18%, 84% 0, 36% 64%);
  background: var(--md-sys-color-on-primary);
}

.calendar-field-controls input:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--md-sys-color-primary) 28%, transparent);
  outline-offset: 2px;
}

.worktime-calendar {
  overflow: hidden;
  border: 1px solid var(--md-sys-color-outline-variant);
  border-radius: 8px;
  background: var(--md-sys-color-surface);
}

.worktime-shift {
  overflow: hidden;
  border: 1px solid var(--md-sys-color-outline-variant);
  border-radius: 8px;
  background: var(--md-sys-color-surface);
}

.worktime-shift-scroll {
  overflow-x: auto;
  overflow-y: hidden;
  width: 100%;
  scrollbar-gutter: stable;
}

.worktime-shift-table {
  width: max-content;
  min-width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
}

.shift-name-col {
  width: 150px;
}

.shift-day-col {
  width: 58px;
}

.worktime-shift-table th,
.worktime-shift-table td {
  width: 58px;
  min-width: 58px;
  max-width: 58px;
  padding: 0;
  border-right: 1px solid var(--md-sys-color-outline-variant);
  border-bottom: 1px solid var(--md-sys-color-outline-variant);
  text-align: center;
}

.worktime-shift-table th {
  padding: 10px 2px 8px;
  background: var(--md-sys-color-surface-container);
  color: var(--shift-weekday-color, var(--md-sys-color-on-surface));
  font-size: 15px;
  font-weight: 700;
}

.worktime-shift-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
}

.worktime-shift-table .shift-name-header,
.worktime-shift-table .shift-person-name {
  position: sticky;
  left: 0;
  z-index: 3;
  width: 150px;
  min-width: 150px;
  max-width: 150px;
  padding: 8px 10px;
  background: var(--md-sys-color-surface-container);
  color: var(--md-sys-color-on-surface);
  font-size: 13px;
  font-weight: 800;
  text-align: left;
  box-shadow: 1px 0 0 var(--md-sys-color-outline-variant);
}

.worktime-shift-table .shift-name-header {
  z-index: 4;
}

.worktime-shift-table .shift-person-name {
  background: var(--md-sys-color-surface);
  vertical-align: middle;
  overflow-wrap: anywhere;
}

.worktime-shift-table th.is-today {
  background: var(--md-sys-color-primary-container);
  color: var(--md-sys-color-on-primary-container);
  box-shadow: inset 0 -3px 0 var(--md-sys-color-primary);
}

.worktime-shift-table th small {
  display: block;
  margin-top: 2px;
  color: var(--shift-weekday-color, var(--md-sys-color-on-surface-variant));
  font-size: 11px;
  font-weight: 600;
}

.worktime-shift-table td {
  height: 80px;
}

.worktime-shift-table td button {
  overflow: hidden;
  width: 100%;
  min-height: 80px;
  padding: 8px 5px;
  border: 0;
  background: transparent;
  color: var(--md-sys-color-primary);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.3;
  overflow-wrap: anywhere;
  cursor: pointer;
}

.worktime-shift-table td button:hover,
.worktime-shift-table td button:focus-visible {
  outline: 2px solid var(--md-sys-color-primary);
  outline-offset: -2px;
  background: var(--md-sys-color-secondary-container);
}

.friend-shift-row td {
  height: 58px;
  padding: 6px 4px;
  color: var(--md-sys-color-on-surface-variant);
  font-size: 11px;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.friend-shift-row td span.is-unset {
  color: var(--md-sys-color-outline);
}

.friend-shift-row .shift-person-name {
  background: var(--md-sys-color-surface-container);
  color: var(--md-sys-color-on-surface-variant);
}

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

.friend-request-form .form-label {
  grid-column: 1 / -1;
  margin: 0;
}

.friend-request-form .btn {
  gap: 6px;
}

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

.friend-list-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--md-sys-color-outline-variant);
  border-radius: 8px;
}

.friend-list-item > div {
  display: grid;
  min-width: 0;
  margin-right: auto;
}

.friend-list-item > div span,
.friend-status {
  color: var(--md-sys-color-on-surface-variant);
  font-size: 13px;
}

@media (max-width: 620px) {
  .friend-request-form {
    grid-template-columns: 1fr;
  }

  .friend-request-form .btn {
    width: 100%;
  }

  .friend-list-item {
    align-items: flex-start;
    flex-wrap: wrap;
  }
}

.worktime-calendar-weekdays,
.worktime-calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.worktime-calendar-weekdays {
  background: var(--md-sys-color-surface-container);
  color: var(--md-sys-color-on-surface-variant);
  font-size: 12px;
  font-weight: 700;
  text-align: center;
}

.worktime-calendar-weekdays span {
  padding: 10px 4px;
}

.worktime-calendar-weekdays span:first-child {
  color: var(--md-sys-color-error);
}

.worktime-calendar-weekdays span:last-child {
  color: var(--md-sys-color-primary);
}

.worktime-calendar-cell,
.worktime-calendar-blank {
  min-height: 82px;
  border: 0;
  border-right: 1px solid var(--md-sys-color-outline-variant);
  border-bottom: 1px solid var(--md-sys-color-outline-variant);
}

.worktime-calendar-cell:has(.calendar-entry:not([hidden]):not(.is-unset)) {
  min-height: 112px;
}

.worktime-calendar-cell {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto repeat(4, min-content);
  align-content: start;
  gap: 5px;
  padding: 8px;
  background: var(--calendar-day-color, var(--md-sys-color-surface));
  color: var(--md-sys-color-on-surface);
  text-align: left;
  cursor: pointer;
}

.worktime-calendar-cell:hover,
.worktime-calendar-cell:focus-visible {
  position: relative;
  z-index: 1;
  outline: 2px solid var(--md-sys-color-primary);
  outline-offset: -2px;
  background: var(--md-sys-color-secondary-container);
}

.worktime-calendar-cell.is-today {
  background: var(--md-sys-color-primary-container);
  box-shadow: inset 0 0 0 2px var(--md-sys-color-primary);
}

.worktime-calendar-cell.is-today .calendar-day-number {
  display: inline-grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 50%;
  background: var(--md-sys-color-primary);
  color: var(--md-sys-color-on-primary);
}

.calendar-day-number {
  color: var(--calendar-weekday-color, var(--md-sys-color-on-surface));
  font-size: 20px;
  font-weight: 700;
}

.calendar-weekday {
  color: var(--calendar-weekday-color, var(--md-sys-color-on-surface-variant));
  font-size: 13px;
  font-weight: 600;
}

.calendar-entry {
  display: block;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  overflow: hidden;
  grid-column: 1 / -1;
  color: var(--md-sys-color-on-surface);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.calendar-entry.is-unset {
  color: #9aa5a1;
  font-weight: 600;
}

.calendar-field-tag {
  min-width: 0;
  padding: 5px 9px;
  border-radius: 999px;
  background: var(--md-sys-color-primary-container);
  color: var(--md-sys-color-on-primary-container);
  font-size: 15px;
  font-weight: 800;
}

.calendar-field-tag.is-unset {
  background: var(--md-sys-color-surface-container-high);
  color: #9aa5a1;
}

.calendar-field-start::before,
.calendar-field-end::before,
.calendar-field-work::before {
  content: none;
}

.m3-detail-worktimes h6 {
  margin: 0;
  font-weight: 600;
}

.m3-detail-time-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.m3-detail-time-field {
  position: relative;
  display: grid;
  min-height: 56px;
  align-items: center;
  padding: 6px 14px 10px;
  border: 1px solid var(--md-sys-color-outline);
  border-radius: 8px;
  background: var(--md-sys-color-surface);
  color: var(--md-sys-color-on-surface-variant);
  font-size: 12px;
  font-weight: 600;
  line-height: 18px;
}

.m3-detail-time-field .m3-time-dialog-trigger {
  width: 100%;
  min-height: 28px;
  padding: 0;
  border: 0;
  border-radius: 0 !important;
  background: transparent;
  color: var(--md-sys-color-primary);
  font-size: 22px;
  font-weight: 600;
  text-align: center;
  box-shadow: none !important;
}

.m3-detail-time-field.is-unset .m3-time-dialog-trigger,
.m3-time-dialog-trigger.is-unset {
  color: var(--md-sys-color-outline);
}

.m3-detail-time-field:hover,
.m3-detail-time-field:focus-within {
  background: var(--md-sys-color-secondary-container);
  color: var(--md-sys-color-on-secondary-container);
}

.m3-detail-time-field .m3-time-dialog-trigger:focus-visible {
  outline: 0;
}

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

.worktime-day-card {
  overflow: hidden;
  border: 1px solid var(--md-sys-color-outline-variant);
  border-radius: 8px;
  background: var(--worktime-day-bg, var(--md-sys-color-surface)) !important;
  box-shadow: 0 1px 2px rgba(25, 28, 27, 0.06);
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 120ms ease;
}

.worktime-day-card:hover {
  border-color: color-mix(in srgb, var(--md-sys-color-primary) 40%, var(--md-sys-color-outline-variant));
  box-shadow: 0 8px 24px rgba(25, 28, 27, 0.1);
}

.worktime-day-card.is-today {
  position: relative;
  border-color: var(--md-sys-color-primary);
  background: linear-gradient(90deg, rgba(0, 106, 96, 0.1), var(--md-sys-color-surface) 34%) !important;
  box-shadow: 0 10px 26px rgba(0, 106, 96, 0.18);
}

.worktime-day-card.is-today::before {
  position: absolute;
  inset: 0 auto 0 0;
  width: 6px;
  content: "";
  background: var(--md-sys-color-primary);
}

.worktime-day-card.is-today .worktime-date-block {
  background: var(--md-sys-color-primary-container);
}

.worktime-day-card.is-today .worktime-day-number {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 50%;
  background: var(--md-sys-color-primary);
  color: var(--md-sys-color-on-primary) !important;
}

.worktime-day-card.is-today .worktime-weekday {
  color: var(--md-sys-color-on-primary-container) !important;
}

.worktime-day-card.is-today .worktime-day-off:empty::after {
  content: "今日";
  color: var(--md-sys-color-primary);
  font-weight: 800;
}

.worktime-day-layout {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  min-height: 118px;
}

.worktime-date-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 14px 10px;
  border-right: 1px solid rgba(111, 121, 118, 0.25);
  background: var(--md-sys-color-surface-container);
}

.worktime-day-number {
  font-size: 26px;
  font-weight: 800;
  line-height: 1.15;
}

.worktime-weekday {
  font-size: 14px;
  font-weight: 700;
}

.worktime-day-off {
  min-height: 18px;
  margin-top: 3px;
  font-size: 12px;
  font-weight: 600;
  text-align: center;
}

.worktime-entry-block {
  display: grid;
  align-content: center;
  gap: 10px;
  min-width: 0;
  padding: 14px 16px;
}

.worktime-primary-row {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.worktime-time-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(170px, 220px));
  gap: 10px;
  width: min(100%, 450px);
  justify-self: start;
}

.m3-time-button {
  display: flex;
  width: 100%;
  min-width: 0;
  min-height: 58px;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 8px 14px 10px;
  border: 1px solid var(--md-sys-color-outline);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--md-sys-color-primary);
  cursor: pointer;
  transition: background-color 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.m3-time-button:hover,
.m3-time-button:focus {
  border-color: var(--md-sys-color-primary);
  background: var(--md-sys-color-secondary-container);
  color: var(--md-sys-color-on-secondary-container);
  box-shadow: 0 0 0 1px var(--md-sys-color-primary);
  outline: 0;
}

.m3-time-label {
  float: none;
  width: auto;
  margin: 0 0 0 4px;
  padding: 0 5px;
  background: transparent;
  color: var(--md-sys-color-on-surface-variant);
  font-size: 12px;
  font-weight: 500;
  line-height: 18px;
}

.m3-time-button strong {
  overflow: hidden;
  width: 100%;
  font-size: 22px;
  font-weight: 800;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.m3-time-button.is-unset {
  border-color: var(--md-sys-color-outline-variant);
  color: var(--md-sys-color-outline);
}

.m3-time-button.is-unset strong {
  color: var(--md-sys-color-outline);
  font-weight: 700;
}

.m3-time-button.is-unset .m3-time-label {
  color: var(--md-sys-color-outline);
}

.worktime-shift-table td button.is-unset {
  color: var(--md-sys-color-outline);
}

.worktime-meta-row {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.worktime-chips {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.worktime-chip,
.worktime-note,
.worktime-tag {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  border-radius: 999px;
  font-size: 12px;
}

.worktime-tag {
  padding: 4px 12px;
  background: var(--md-sys-color-primary-container);
  color: var(--md-sys-color-on-primary-container);
  font-weight: 600;
}

.worktime-tag:empty {
  display: none;
}

.worktime-chip {
  padding: 4px 10px;
  background: var(--md-sys-color-surface-container-high);
  color: var(--md-sys-color-on-surface-variant);
  cursor: pointer;
}

.worktime-project-chip.is-empty {
  display: none;
}

.worktime-project-chip span:first-child:not(:empty) + span:not(:empty)::before {
  content: " / ";
}

.worktime-note {
  color: var(--md-sys-color-on-surface-variant);
}

.worktime-row-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 4px;
}

.m3-detail-action {
  display: inline-flex;
  min-width: 132px;
  min-height: 50px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 20px;
  border: 0;
  border-radius: 999px;
  background: var(--md-sys-color-primary);
  color: var(--md-sys-color-on-primary);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: none;
  transition: background-color 160ms ease, box-shadow 160ms ease, transform 120ms ease;
}

.m3-detail-action:hover {
  background: #00564e;
  box-shadow: var(--md-sys-elevation-1);
}

.m3-detail-action:active {
  transform: translateY(1px);
}

.m3-detail-action:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--md-sys-color-primary) 35%, transparent);
  outline-offset: 2px;
}

.detail-tag-manual-editor {
  display: grid;
  width: 100%;
  min-height: 52px;
  grid-template-columns: auto minmax(0, 1fr) 44px;
  align-items: center;
  gap: 6px;
  padding: 3px 4px 3px 14px;
  border: 1px solid var(--md-sys-color-outline);
  border-radius: 999px;
  background: var(--md-sys-color-surface);
  color: var(--md-sys-color-on-surface-variant);
}

.tag-manual-input {
  min-width: 0;
  border: 0;
  background: transparent;
  color: var(--md-sys-color-on-surface);
  font-size: 15px;
  outline: 0;
}

.tag-manual-save {
  display: inline-grid;
  width: 44px;
  height: 44px;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: var(--md-sys-color-primary);
  color: var(--md-sys-color-on-primary);
  cursor: pointer;
}

.detail-tag-manual-editor:focus-within {
  border-color: var(--md-sys-color-primary);
  box-shadow: 0 0 0 1px var(--md-sys-color-primary);
}

.tag-manual-save:disabled,
.tag-manual-input:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.desktop-tag-presets {
  display: none;
  width: min(100%, 380px);
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}

.desktop-tag-button {
  min-width: 0;
  min-height: 40px;
  padding: 5px 6px;
  border: 2px solid transparent;
  border-radius: 8px;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.quick-tag-button.is-selected {
  border: 2px solid var(--md-sys-color-on-surface);
  box-shadow: 0 0 0 2px var(--md-sys-color-surface) inset;
}

.mobile-tag-mode-panel,
.mobile-worktime-mode {
  display: none;
}

@media (min-width: 1100px) {
  .desktop-tag-presets {
    display: grid;
  }
}

.modal-content {
  overflow: hidden;
  border: 1px solid var(--md-sys-color-outline-variant);
  border-radius: 8px;
  background: var(--md-sys-color-surface);
  box-shadow: 0 8px 24px rgba(25, 28, 27, 0.22);
}

#detail-dialog .modal-dialog {
  max-width: 640px;
}

.m3-detail-footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 16px;
  border-top: 1px solid var(--md-sys-color-outline-variant);
}

.m3-danger-button,
.m3-secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 18px;
  border-radius: 999px;
  font-weight: 700;
  line-height: 1;
  border: 1px solid transparent;
  background: transparent;
}

.m3-danger-button {
  gap: 8px;
  color: var(--md-sys-color-error);
  border-color: var(--md-sys-color-error);
}

.m3-danger-button:hover {
  background: color-mix(in srgb, var(--md-sys-color-error) 10%, transparent);
}

.m3-danger-button:disabled {
  opacity: .55;
  cursor: wait;
}

.m3-secondary-button {
  color: var(--md-sys-color-primary);
  border-color: var(--md-sys-color-outline-variant);
}

.m3-secondary-button:hover {
  background: var(--md-sys-color-secondary-container);
}

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

.m3-detail-tag-input {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

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

.m3-detail-projects h6 {
  margin: 0;
  font-weight: 600;
}

.m3-detail-project-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 150px;
  gap: 10px;
}

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

.m3-tag-preset {
  display: flex;
  min-height: 52px;
  min-width: 0;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 7px 10px;
  border: 0;
  border-radius: 999px;
  color: #ffffff;
  cursor: pointer;
}

.m3-tag-preset strong,
.m3-tag-preset span {
  overflow: hidden;
  max-width: 100%;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.m3-tag-preset span {
  font-size: 11px;
}

.m3-tag-preset-1 { background: #006a60; }
.m3-tag-preset-2 { background: #3f51b5; }
.m3-tag-preset-3 { background: #2e7d32; }
.m3-tag-preset-4 { background: #a15c00; }
.m3-tag-preset-5 { background: #ad1457; }
.m3-tag-preset-6 { background: #00658d; }
.m3-tag-preset-7 { background: #6b5778; }
.m3-tag-preset-8 { background: #525f1f; }

.form-control,
.form-select {
  min-height: 48px;
  border-color: var(--md-sys-color-outline);
  border-radius: 6px;
  background-color: var(--md-sys-color-surface);
}

.m3-time-dialog {
  border: 0;
  border-radius: 8px;
}

.time-input-presets {
  display: grid;
  gap: 8px;
}

.time-input-editor {
  display: grid;
  grid-template-columns: 92px minmax(150px, 220px) 92px;
  align-items: center;
  justify-content: center;
  gap: 20px;
}

.time-input-presets {
  grid-column: 1;
}

.time-input-value {
  grid-column: 2;
}

.time-input-adjustments {
  grid-column: 3;
}

.time-input-editor:not(.has-presets) {
  grid-template-columns: minmax(150px, 220px) 92px;
}

.time-input-editor:not(.has-presets) .time-input-value {
  grid-column: 1;
}

.time-input-editor:not(.has-presets) .time-input-adjustments {
  grid-column: 2;
}

.time-input-adjustments {
  display: grid;
  gap: 8px;
}

.time-input-presets .btn,
.time-input-adjustments .btn {
  width: 92px;
}

.time-input-value {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 32px;
  font-weight: 700;
}

.time-input-number {
  width: 68px;
  height: 64px;
  border: 1px solid var(--md-sys-color-outline);
  border-radius: 6px;
  background: var(--md-sys-color-surface);
  color: var(--md-sys-color-on-surface);
  font-size: 28px;
  font-weight: 700;
  text-align: center;
}

.time-input-number:focus {
  border-color: var(--md-sys-color-primary);
  box-shadow: 0 0 0 1px var(--md-sys-color-primary);
  outline: 0;
}

.m3-time-dialog-trigger {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--md-sys-color-outline);
  border-radius: 6px;
  background: var(--md-sys-color-surface);
  color: var(--md-sys-color-primary);
  font-weight: 700;
  text-align: center;
  cursor: pointer;
}

.m3-time-dialog-trigger:focus-visible {
  border-color: var(--md-sys-color-primary);
  box-shadow: 0 0 0 1px var(--md-sys-color-primary);
  outline: 0;
}

/* Settings fields keep their natural width and wrap only when necessary. */
.m3-wrap-fields {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

/* Company work-policy fields use a dedicated grid so option groups do not split across columns. */
.company-work-policy-form {
  display: grid;
  gap: 1.5rem;
}
.company-policy-section {
  padding: 1.25rem;
  border: 1px solid var(--md-sys-color-outline-variant, #c5c9c7);
  border-radius: 12px;
  background: var(--md-sys-color-surface-container-low, #f7f8f8);
}
.company-policy-section h5 {
  margin: 0 0 .25rem;
  font-size: 1rem;
  font-weight: 700;
}
.company-policy-description {
  margin: 0 0 1rem;
  color: var(--md-sys-color-on-surface-variant, #5d625f);
  font-size: .875rem;
}
.company-policy-fields {
  display: grid;
  grid-template-columns: minmax(0, 15rem);
  gap: 1rem 1.25rem;
  align-items: end;
}
.company-policy-fields--three { grid-template-columns: repeat(3, minmax(0, 15rem)); }
.company-policy-fields--four { grid-template-columns: repeat(4, minmax(0, 15rem)); }
.company-work-policy-form .company-policy-flex-field {
  display: flex;
  align-items: center;
  min-height: 48px;
  padding: 0 .95rem;
  border: 1px solid var(--md-sys-color-outline-variant, #c5c9c7);
  border-radius: 8px;
  background: var(--md-sys-color-surface-container-low, #f7f8f8);
}
.company-work-policy-form .company-policy-flex-field .form-check {
  margin: 0;
}
.company-work-policy-form > button[type="submit"] {
  justify-self: start;
  width: 8.5rem;
  min-height: 42px;
}
.company-policy-holidays {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--md-sys-color-outline-variant, #c5c9c7);
}
.company-policy-option-label {
  flex: 0 0 6rem;
  color: var(--md-sys-color-on-surface-variant, #45464f);
  font-size: .92rem;
  font-weight: 700;
}
.company-policy-checks {
  display: flex;
  flex-wrap: wrap;
  gap: .55rem 1.1rem;
}
.company-policy-checks .form-check {
  margin: 0;
  min-width: 2.35rem;
}
@media (max-width: 1050px) {
  .company-policy-fields--three { grid-template-columns: repeat(2, minmax(0, 15rem)); }
  .company-policy-fields--four { grid-template-columns: repeat(2, minmax(0, 15rem)); }
}
@media (max-width: 700px) {
  .company-policy-section { padding: 1rem; }
  .company-policy-fields, .company-policy-fields--three, .company-policy-fields--four { grid-template-columns: 1fr; }
  .company-policy-holidays { align-items: flex-start; flex-direction: column; gap: .65rem; }
  .company-policy-option-label { flex-basis: auto; }
}

.m3-wrap-fields > [class*="col-"] {
  box-sizing: border-box;
  flex: 0 1 15rem;
  width: auto;
  max-width: 100%;
  padding: 0;
}

.m3-wrap-fields > .d-flex {
  min-height: 3.75rem;
}

.user-list-heading, .compensation-page-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.compensation-page { max-width: 1240px; margin: 0 auto; }
.compensation-page-heading { margin-bottom: 1.5rem; }
.compensation-section {
  margin-top: 1.25rem;
  padding: 1.25rem;
  border: 1px solid var(--md-sys-color-outline-variant, #c5c9c7);
  border-radius: 12px;
  background: var(--md-sys-color-surface-container-low, #f7f8f8);
}
.compensation-section h5 { margin: 0 0 .3rem; font-size: 1rem; font-weight: 700; }
.compensation-description { margin: 0 0 1rem; color: var(--md-sys-color-on-surface-variant, #5f6368); font-size: .9rem; }
.compensation-price-mode { display: flex; flex-wrap: wrap; gap: .75rem 1.5rem; }
.compensation-price-mode label, .compensation-check { display: flex; align-items: center; gap: .45rem; font-weight: 600; }
.compensation-rate-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.compensation-rate .form-label { min-height: 2.4rem; display: flex; align-items: end; }
.field-hint { color: var(--md-sys-color-on-surface-variant, #5f6368); font-size: .78rem; line-height: 1.4; }
.compensation-band-head, .compensation-band-row { display: grid; grid-template-columns: 10rem 10rem minmax(0, 12rem); gap: .75rem; align-items: end; }
.compensation-band-head { margin-bottom: .35rem; color: var(--md-sys-color-on-surface-variant, #5f6368); font-size: .82rem; font-weight: 700; }
.compensation-band-row { padding: .35rem 0; }
.compensation-description { margin: 0 0 1rem; color: var(--md-sys-color-on-surface-variant, #5d625f); font-size: .875rem; }
.compensation-fields { display: grid; gap: 1rem 1.25rem; }
.compensation-fields--three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.compensation-adjustment-head, .compensation-adjustment-row {
  display: grid;
  grid-template-columns: minmax(8rem, .7fr) minmax(14rem, 1.35fr) minmax(8rem, .8fr);
  gap: .65rem;
  align-items: center;
}
.compensation-adjustment-head { margin: 0 0 .45rem; color: var(--md-sys-color-on-surface-variant, #5d625f); font-size: .8rem; font-weight: 700; }
.compensation-adjustment-row + .compensation-adjustment-row { margin-top: .55rem; }
@media (max-width: 700px) {
  .user-list-heading, .compensation-page-heading { align-items: flex-start; flex-direction: column; }
  .compensation-section { padding: 1rem; }
  .compensation-fields--three { grid-template-columns: 1fr; }
  .compensation-rate-grid { grid-template-columns: 1fr; }
  .compensation-rate .form-label { min-height: auto; }
  .compensation-band-head { display: none; }
  .compensation-band-row { grid-template-columns: 1fr; gap: .45rem; padding: .75rem 0; border-top: 1px solid var(--md-sys-color-outline-variant, #c5c9c7); }
  .compensation-adjustment-head { display: none; }
  .compensation-adjustment-row { grid-template-columns: 1fr; gap: .45rem; padding: .75rem 0; }
  .compensation-adjustment-row + .compensation-adjustment-row { border-top: 1px solid var(--md-sys-color-outline-variant, #c5c9c7); margin-top: 0; }
}

[data-time-input-dialog] {
  cursor: pointer;
  font-weight: 700;
  text-align: center;
}

@media (max-width: 991.98px) {
  .m3-top-app-bar .container-fluid {
    padding-inline: 16px;
  }

  .m3-top-app-bar .navbar-collapse {
    padding: 10px 0 14px;
  }

  .worktime-page-header {
    grid-template-columns: minmax(0, 1fr) auto;
    padding: 8px;
  }

  .month-navigator {
    justify-content: flex-start;
  }

  .worktime-actions {
    justify-content: flex-end;
  }

  .worktime-action-label {
    display: none;
  }

  .worktime-actions .btn {
    width: 40px;
    padding-inline: 8px;
  }

  .worktime-view-controls {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 700px) {
  .worktime-sticky-overview {
    top: 72px;
  }

  .worktime-page-header {
    grid-template-columns: 1fr;
    gap: 5px;
    min-height: 0;
    border-radius: 17px;
  }

  .worktime-toolbar-core {
    justify-content: space-between;
    gap: 6px;
  }

  .worktime-month-step {
    width: 34px;
    height: 34px;
    flex-basis: 34px;
  }

  .worktime-month-heading {
    min-width: 96px;
  }

  .worktime-month-heading > span {
    display: none;
  }

  .month-title {
    font-size: 19px;
  }

  .worktime-summary {
    min-width: 104px;
    min-height: 38px;
    padding: 6px 10px;
    border-radius: 12px;
  }

  .worktime-summary-icon,
  .worktime-summary-label {
    display: none;
  }

  .worktime-summary strong {
    font-size: 19px;
  }

  .worktime-actions {
    min-width: 0;
    justify-content: flex-end;
    gap: 3px;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .worktime-actions::-webkit-scrollbar {
    display: none;
  }

  .workspace-switcher {
    max-width: 190px;
  }

  .workspace-switcher label {
    display: none;
  }

  .workspace-switcher select {
    max-width: 154px;
  }

  .shift-name-col {
    width: 104px;
  }

  .worktime-shift-table .shift-name-header,
  .worktime-shift-table .shift-person-name {
    width: 104px;
    min-width: 104px;
    max-width: 104px;
    padding-inline: 8px;
  }

  .worktime-calendar {
    overflow-x: hidden;
  }

  .worktime-calendar-weekdays,
  .worktime-calendar-grid {
    min-width: 0;
  }

  .worktime-calendar-cell,
  .worktime-calendar-blank {
    min-height: 54px;
  }

  .worktime-calendar-cell:has(.calendar-entry:not([hidden]):not(.is-unset)) {
    min-height: 68px;
  }

  .worktime-calendar-cell {
    gap: 2px;
    padding: 4px 3px;
  }

  .worktime-calendar-weekdays span {
    padding: 6px 2px;
  }

  .calendar-day-number {
    font-size: 15px;
    line-height: 1.05;
  }

  .calendar-weekday {
    font-size: 10px;
    line-height: 1.05;
  }

  .calendar-entry {
    font-size: 10px;
    line-height: 1.12;
  }

  .calendar-field-tag {
    padding: 2px 3px;
    border-radius: 5px;
    font-size: 9px;
  }

  .calendar-field-controls {
    gap: 5px;
  }

  .calendar-field-controls label {
    min-height: 30px;
    padding: 4px 9px 4px 7px;
    font-size: 12px;
  }

  .calendar-field-controls input {
    width: 15px;
    height: 15px;
    border-radius: 4px;
  }
}

@media (max-width: 620px), (max-width: 991.98px) and (pointer: coarse) {
  .app-main-shell {
    width: min(100% - 20px, 1240px);
    padding-top: 16px;
  }

  .m3-app-brand {
    font-size: 16px;
  }

  .m3-brand-mark {
    width: 36px;
    height: 36px;
  }

  .month-title {
    order: -1;
    width: 100%;
    min-width: 0;
    font-size: 23px;
  }

  .month-navigator .btn {
    flex: 1 1 0;
    min-width: 0;
    padding-inline: 10px;
  }

  .worktime-actions .btn {
    flex: 1 1 auto;
  }

  .worktime-summary {
    justify-content: space-between;
    padding-inline: 14px;
  }

  .worktime-day-layout {
    grid-template-columns: 72px minmax(0, 1fr);
    min-height: 116px;
  }

  .worktime-date-block {
    padding-inline: 8px;
  }

  .worktime-entry-block {
    padding: 12px 10px;
  }

  .worktime-primary-row {
    display: block;
  }

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

  .m3-time-button {
    width: 100%;
    min-height: 56px;
    padding: 10px 12px 8px;
  }

  .m3-time-button strong {
    width: 100%;
    font-size: 20px;
    text-align: center;
  }

  .worktime-meta-row {
    align-items: flex-end;
  }

  .m3-detail-action {
    min-width: 112px;
    min-height: 46px;
    padding-inline: 14px;
  }

  .mobile-worktime-mode {
    position: fixed;
    z-index: 1020;
    right: 16px;
    bottom: 12px;
    left: 16px;
    display: grid;
    width: min(calc(100% - 32px), 360px);
    min-height: 56px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-inline: auto;
    padding: 4px;
    border: 1px solid var(--md-sys-color-outline-variant);
    border-radius: 999px;
    background: var(--md-sys-color-surface-container-high);
    box-shadow: 0 4px 14px rgba(25, 28, 27, 0.22);
  }

  .mobile-mode-button {
    display: inline-flex;
    min-width: 0;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--md-sys-color-on-surface-variant);
    font-weight: 700;
  }

  .mobile-mode-button.is-selected {
    background: var(--md-sys-color-secondary-container);
    color: var(--md-sys-color-on-secondary-container);
  }

  .worktime-page {
    padding-bottom: 72px;
  }

  .worktime-page.mobile-tag-mode .worktime-time-grid {
    display: none;
  }

  .worktime-page.mobile-tag-mode .mobile-tag-mode-panel {
    display: grid;
    gap: 10px;
  }

  .worktime-page.mobile-tag-mode .worktime-chips {
    display: none;
  }

  .worktime-page.mobile-tag-mode .worktime-meta-row {
    justify-content: flex-end;
  }

  .mobile-tag-current {
    display: flex;
    min-height: 28px;
    align-items: center;
    gap: 6px;
    color: var(--md-sys-color-on-surface-variant);
    font-size: 13px;
  }

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

  .mobile-tag-button {
    min-width: 0;
    min-height: 42px;
    padding: 6px 4px;
    border: 2px solid transparent;
    border-radius: 8px;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.15;
    overflow-wrap: anywhere;
  }

  .mobile-tag-button.is-selected {
    border-color: var(--md-sys-color-on-surface);
    box-shadow: 0 0 0 2px var(--md-sys-color-surface) inset;
  }

  .mobile-tag-button.is-empty {
    grid-column: 1 / -1;
    background: var(--md-sys-color-surface-container-high);
    color: var(--md-sys-color-on-surface-variant);
  }

  .m3-detail-tag-input {
    grid-template-columns: 1fr;
  }

  .m3-detail-project-row {
    grid-template-columns: minmax(0, 1fr) 120px;
  }

  .m3-tag-presets {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .time-input-editor {
    grid-template-columns: minmax(52px, 60px) minmax(118px, 1fr) minmax(52px, 60px);
    gap: 6px;
  }

  .time-input-editor:not(.has-presets) {
    grid-template-columns: minmax(118px, 1fr) minmax(52px, 60px);
  }

  .time-input-presets,
  .time-input-adjustments {
    gap: 6px;
    grid-template-columns: 1fr;
  }

  .time-input-presets .btn,
  .time-input-adjustments .btn {
    width: 100%;
    min-height: 36px;
    padding-inline: 4px;
    font-size: 12px;
  }

  .time-input-value {
    gap: 4px;
    font-size: 26px;
  }

  .time-input-number {
    width: 50px;
    height: 56px;
    font-size: 24px;
  }
}

.m3-ad-unit {
  display: block;
  width: 100%;
  min-height: 96px;
  margin: 14px 0;
  padding: 10px 12px;
  border: 1px solid var(--md-sys-color-outline-variant);
  border-radius: 12px;
  background: color-mix(in srgb, var(--md-sys-color-surface-container-low) 80%, transparent);
}

.m3-ad-label {
  display: block;
  margin-bottom: 4px;
  color: var(--md-sys-color-on-surface-variant);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0;
}

@media print {
  .m3-top-app-bar,
  .worktime-actions,
  .month-navigator .btn,
  .worktime-row-actions,
  .m3-ad-unit {
    display: none !important;
  }

  .app-main-shell {
    width: 100%;
    padding: 0;
  }

  .worktime-day-card {
    break-inside: avoid;
  }
}

.m3-header-profile {
  flex-direction: column;
  align-items: flex-end;
  margin-right: 12px;
  padding-right: 12px;
  border-right: 1px solid var(--md-sys-color-outline-variant, #c6c8c8);
  line-height: 1.2;
  white-space: nowrap;
}

.m3-header-profile-name {
  font-size: 0.78rem;
  font-weight: 700;
}

.m3-header-profile-meta {
  margin-top: 2px;
  color: var(--md-sys-color-on-surface-variant, #5f6368);
  font-size: 0.68rem;
}

.paid-page { display: grid; gap: 20px; }
.arigato-page { display: grid; gap: 20px; max-width: 1120px; }.arigato-hero { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 28px; border-radius: 16px; background: linear-gradient(135deg, #b3265e, #e77e9d); color: #fff; }.arigato-hero h1 { margin: 0; font-size: clamp(1.5rem, 2.4vw, 2.1rem); font-weight: 900; letter-spacing: .02em; }.arigato-hero p { margin: 5px 0 0; opacity: .9; }.arigato-hero .btn { display: inline-flex; gap: 8px; border-color: rgba(255,255,255,.75); color: #fff; }.arigato-period { display: flex; align-items: center; gap: 10px; padding: 13px 18px; border: 1px solid var(--md-sys-color-outline-variant, #c5c9c7); border-radius: 12px; background: var(--md-sys-color-surface, #fff); }.arigato-period i { color: #b3265e; }.arigato-period span { color: var(--md-sys-color-on-surface-variant, #5f6368); font-size: .82rem; }.arigato-period strong { font-size: .95rem; }.arigato-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 20px; }.arigato-send-card, .arigato-points, .arigato-feed, .arigato-ranking { padding: 24px; border: 1px solid var(--md-sys-color-outline-variant, #c5c9c7); border-radius: 16px; background: var(--md-sys-color-surface, #fff); box-shadow: 0 8px 24px rgba(25,28,27,.06); }.arigato-section-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 18px; }.arigato-section-heading h2 { margin: 0; font-size: 1.2rem; font-weight: 800; }.arigato-heading-icon { color: #b3265e; font-size: 1.5rem; }.arigato-form { display: grid; grid-template-columns: minmax(150px, .7fr) minmax(130px, .45fr); gap: 14px; }.arigato-form label { display: grid; gap: 6px; color: var(--md-sys-color-on-surface-variant, #5f6368); font-size: .8rem; font-weight: 700; }.arigato-form-comment, .arigato-form button { grid-column: 1 / -1; }.arigato-form button { justify-self: start; gap: 8px; }.arigato-points { display: grid; align-content: start; gap: 14px; background: #fff5f7; }.arigato-points > div { display: flex; justify-content: space-between; align-items: baseline; padding-bottom: 12px; border-bottom: 1px solid #f4c6d3; }.arigato-points span { color: #70404d; font-size: .82rem; }.arigato-points strong { color: #9d174d; font-size: 1.8rem; }.arigato-points-note { margin: 0; color: #70404d; font-size: .8rem; }.arigato-feed-list { display: grid; gap: 10px; }.arigato-feed-item { display: grid; grid-template-columns: 38px 1fr; gap: 12px; padding: 14px 0; border-top: 1px solid var(--md-sys-color-outline-variant, #e0e3e2); }.arigato-feed-item:first-child { border-top: 0; }.arigato-feed-icon { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: #ffe3eb; color: #b3265e; }.arigato-feed-meta { color: var(--md-sys-color-on-surface-variant, #5f6368); font-size: .73rem; }.arigato-feed-item h3 { margin: 3px 0; font-size: .96rem; font-weight: 800; }.arigato-feed-item h3 i { margin: 0 5px; color: #b3265e; font-size: .75rem; }.arigato-feed-item h3 span { margin-left: 8px; color: #b3265e; font-size: .8rem; }.arigato-feed-item p { margin: 0; color: var(--md-sys-color-on-surface-variant, #5f6368); }.arigato-ranking { display: grid; gap: 10px; }.arigato-rank { display: grid; grid-template-columns: 42px 1fr auto; align-items: center; gap: 12px; padding: 14px; border-radius: 12px; background: var(--md-sys-color-surface-container-low, #f7f8f8); }.arigato-rank-number { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: #b3265e; color: #fff; font-weight: 900; }.arigato-rank h2 { margin: 0; font-size: 1rem; }.arigato-rank p { margin: 2px 0 0; color: var(--md-sys-color-on-surface-variant, #5f6368); font-size: .78rem; }.arigato-rank strong { color: #9d174d; font-size: 1.3rem; }.arigato-rank small { font-size: .72rem; }
@media (max-width: 760px) { .arigato-hero { align-items: flex-start; flex-direction: column; padding: 22px; }.arigato-layout { grid-template-columns: 1fr; }.arigato-send-card, .arigato-points, .arigato-feed, .arigato-ranking { padding: 18px; }.arigato-form { grid-template-columns: 1fr; }.arigato-form-comment, .arigato-form button { grid-column: auto; } }
.paid-hero { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 24px 28px; border-radius: 16px; background: linear-gradient(135deg, #00796b, #42a995); color: #fff; }
.paid-hero h1 { margin: 0; font-size: clamp(1.35rem, 2vw, 1.9rem); font-weight: 800; }
.paid-hero p { margin: 5px 0 0; opacity: .88; }
.paid-month-nav { display: flex; gap: 8px; }
.paid-month-nav .btn { gap: 8px; background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.7); color: #fff; }
.paid-person-card { padding: 24px; border: 1px solid var(--md-sys-color-outline-variant, #c5c9c7); border-radius: 16px; background: var(--md-sys-color-surface, #fff); box-shadow: 0 8px 24px rgba(25,28,27,.06); }
.paid-person-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.paid-person-heading p { color: var(--md-sys-color-on-surface-variant, #5f6368); font-weight: 700; }
.paid-person-heading h2 { margin: 0; font-size: 1.25rem; font-weight: 800; }
.paid-person-status { padding: 5px 10px; border-radius: 999px; background: var(--md-sys-color-secondary-container, #c2f2e7); color: var(--md-sys-color-on-secondary-container, #004d40); font-size: .75rem; font-weight: 800; }
.paid-summary-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.paid-summary { padding: 16px; border-radius: 12px; background: var(--md-sys-color-surface-container-low, #f7f8f8); }
.paid-summary span, .paid-summary small { color: var(--md-sys-color-on-surface-variant, #5f6368); font-size: .78rem; font-weight: 700; }
.paid-summary strong { display: block; margin-top: 4px; font-size: 1.65rem; line-height: 1; }
.paid-summary--accent { background: #c2f2e7; color: #003d34; }
.paid-timeline-wrap { margin-top: 22px; }
.paid-timeline-heading { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 10px; }
.paid-timeline-heading h3 { margin: 0; font-size: .95rem; font-weight: 800; }.paid-timeline-heading span { color: var(--md-sys-color-on-surface-variant, #5f6368); font-size: .78rem; }
.paid-timeline { display: grid; grid-template-columns: repeat(12, minmax(76px, 1fr)); gap: 8px; overflow-x: auto; padding-bottom: 4px; }
.paid-month { display: grid; gap: 7px; min-height: 82px; padding: 10px; border: 1px solid var(--md-sys-color-outline-variant, #c5c9c7); border-radius: 10px; background: #fff; }.paid-month span { color: var(--md-sys-color-on-surface-variant, #5f6368); font-size: .72rem; line-height: 1.25; }.paid-month strong { font-size: 1.1rem; }.paid-month small { margin-left: 2px; color: var(--md-sys-color-on-surface-variant, #5f6368); font-size: .7rem; }.paid-month--yellow { background: #fff8d7; }.paid-month--lightgreen { background: #e5f5df; }.paid-month--lightgray { background: #edf0f1; color: #6c7273; }
@media (max-width: 700px) { .paid-hero { align-items: flex-start; flex-direction: column; padding: 20px; }.paid-summary-grid { grid-template-columns: 1fr; }.paid-person-card { padding: 18px; }.paid-timeline { grid-template-columns: repeat(12, 78px); } }

/* All-user attendance follows the paid-leave pattern: a person card with a
   self-contained horizontal timeline, rather than one very wide grid. */
.all-user-worktime-page { gap: 20px; min-width: 0; }
.all-user-worktime-page > * { min-width: 0; }
.all-user-worktime-header { padding: 20px 24px; border-radius: 16px; }
.all-user-worktime-card { min-width: 0; padding: 24px; border: 1px solid var(--md-sys-color-outline-variant); border-radius: 16px; background: var(--md-sys-color-surface); box-shadow: 0 8px 24px rgba(25, 28, 27, .06); }
.all-user-card-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.all-user-person-main { display: flex; min-width: 0; align-items: center; gap: 10px; flex-wrap: wrap; }
.all-user-card-index { margin: 0 0 3px; color: var(--md-sys-color-on-surface-variant); font-size: .75rem; font-weight: 700; }
.all-user-name { margin: 0; color: var(--md-sys-color-on-surface); font-size: 1.25rem; font-weight: 800; overflow-wrap: anywhere; }
.all-user-lock { min-height: 26px; }
.all-user-download { flex: 0 0 auto; min-height: 36px; }
.all-user-total { margin-bottom: 18px; }
.all-user-total span { min-height: 28px; padding: 3px 10px; }
.all-user-days-wrap { width: 100%; min-width: 0; max-width: 100%; overflow-x: auto; overscroll-behavior-inline: contain; padding: 2px 2px 8px; scrollbar-width: thin; }
.all-user-days { display: grid; grid-template-columns: repeat(31, 88px); gap: 8px; width: max-content; }
.all-user-day-card { display: grid; align-content: start; gap: 3px; min-height: 108px; padding: 10px; border: 1px solid var(--md-sys-color-outline-variant); border-radius: 12px; background: var(--all-user-day-bg, var(--md-sys-color-surface-container-low)); color: var(--md-sys-color-on-surface); overflow: hidden; text-align: center; }
.all-user-day-card h3 { margin: 0 0 5px; color: var(--md-sys-color-on-surface-variant); font-size: .72rem; font-weight: 800; line-height: 1.25; }
.all-user-day-card.is-empty { background: var(--md-sys-color-surface-container-low); color: var(--md-sys-color-on-surface-variant); }
.all-user-day-card.is-saturday { background: #edf5ff; border-color: #c7d9f5; }
.all-user-day-card.is-saturday h3 { color: #1d5fa7; }
.all-user-day-card.is-sunday { background: #fff0f0; border-color: #f0cccc; }
.all-user-day-card.is-sunday h3 { color: #b3261e; }
.all-user-time { font-size: .84rem; }
.all-user-day-off { margin-top: 2px; }
.all-user-empty-state { display: grid; min-height: 180px; place-content: center; gap: 8px; padding: 24px; border: 1px solid var(--md-sys-color-outline-variant); border-radius: 16px; background: var(--md-sys-color-surface); color: var(--md-sys-color-on-surface-variant); text-align: center; }
.all-user-empty-state .material-symbols-rounded { margin: 0 auto; color: var(--md-sys-color-primary); font-size: 32px; }
.all-user-empty-state p { margin: 0; font-weight: 700; }
@media (max-width: 620px) { .all-user-worktime-header { padding: 18px; border-radius: 12px; }.all-user-worktime-card { padding: 18px; border-radius: 12px; }.all-user-card-heading { align-items: flex-start; flex-direction: column; }.all-user-days { grid-template-columns: repeat(31, 78px); }.all-user-day-card { min-height: 102px; padding: 9px 6px; } }

/* Keep ordinary controls usable when a table or flex layout becomes narrow. */
.app-main-shell .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  min-width: max-content;
  white-space: nowrap;
  border-radius: 8px;
}

/* Shared modern page header: a concise purpose statement with a restrained line-icon watermark. */
.feature-hero { --feature-start: #00695c; --feature-end: #26a69a; position: relative; isolation: isolate; display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 154px; padding: 26px 30px; overflow: hidden; border-radius: 18px; background: linear-gradient(135deg, var(--feature-start), var(--feature-end)); color: #fff; box-shadow: 0 14px 32px rgba(20, 62, 57, .16); }
.feature-hero--rose { --feature-start: #a61b4d; --feature-end: #e77e9d; }.feature-hero--blue { --feature-start: #155f96; --feature-end: #4d9fd2; }.feature-hero--violet { --feature-start: #5b3f98; --feature-end: #9879d7; }.feature-hero--amber { --feature-start: #9a6200; --feature-end: #d99c30; }.feature-hero--slate { --feature-start: #3f5663; --feature-end: #718a96; }
.feature-hero-copy { position: relative; z-index: 2; max-width: 720px; }.feature-hero-eyebrow { margin: 0 0 5px; font-size: .72rem; font-weight: 800; letter-spacing: .12em; opacity: .78; }.feature-hero h1 { margin: 0; font-size: clamp(1.45rem, 2.4vw, 2.15rem); font-weight: 900; letter-spacing: .01em; }.feature-hero-copy > p:last-child { margin: 8px 0 0; font-size: .94rem; line-height: 1.65; opacity: .92; }.feature-hero-watermark { position: absolute; z-index: 1; right: 24px; bottom: -27px; font-size: 190px; line-height: 1; opacity: .15; pointer-events: none; }.feature-hero-actions { position: relative; z-index: 3; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }.feature-hero-actions .btn { background: #fff; color: var(--feature-start); border-color: #fff; box-shadow: 0 3px 10px rgba(0,0,0,.16); }.feature-hero-actions .btn:hover { background: #f3f7f7; color: var(--feature-start); border-color: #f3f7f7; }
@media (max-width: 720px) { .feature-hero { align-items: flex-start; min-height: 142px; padding: 22px; flex-direction: column; }.feature-hero-watermark { right: 8px; font-size: 150px; }.feature-hero-actions { justify-content: flex-start; } }

/* Attendance uses a full in-page header at rest, then keeps only month, total and compact actions while scrolling. */
.worktime-page-header { position: relative; overflow: hidden; background: linear-gradient(135deg, #00695c, #239f90); border-color: transparent; color: #fff; transition: min-height 180ms ease, padding 180ms ease, border-radius 180ms ease, background 180ms ease, box-shadow 180ms ease; }
.worktime-toolbar-core, .worktime-actions { position: relative; z-index: 1; }.worktime-header-watermark { position: absolute; right: 18px; bottom: -42px; z-index: 0; color: #fff; font-size: 178px; opacity: .16; pointer-events: none; }.worktime-month-heading > span, .worktime-heading-description { color: rgba(255,255,255,.8); }.worktime-heading-description { margin: 0; font-size: .73rem; font-weight: 700; white-space: nowrap; }.worktime-page-header .month-title { color: #fff; }.worktime-page-header .worktime-summary { background: rgba(255,255,255,.17); color: #fff; border-color: rgba(255,255,255,.25); }.worktime-page-header .worktime-summary-label, .worktime-page-header .worktime-summary-icon { color: rgba(255,255,255,.84); }.worktime-page-header .worktime-actions .btn, .worktime-page-header .workspace-switcher { background: rgba(255,255,255,.94) !important; color: #00695c !important; border-color: rgba(255,255,255,.9) !important; box-shadow: 0 3px 10px rgba(0,0,0,.11); }.worktime-page-header .workspace-switcher select { color: #00695c; }.worktime-page-header .worktime-month-step { color: #fff; }.worktime-page-header .worktime-month-step:hover, .worktime-page-header .worktime-month-step:focus-visible { background: rgba(255,255,255,.18); color: #fff; }
.worktime-sticky-overview.is-condensed .worktime-page-header { min-height: 48px; padding: 5px 8px; border: 1px solid rgba(111,121,118,.24); border-radius: 14px; background: rgba(248,250,249,.97); box-shadow: 0 7px 20px rgba(25,28,27,.13); }.worktime-sticky-overview.is-condensed .worktime-header-watermark, .worktime-sticky-overview.is-condensed .worktime-month-heading > span, .worktime-sticky-overview.is-condensed .worktime-heading-description, .worktime-sticky-overview.is-condensed .workspace-switcher label, .worktime-sticky-overview.is-condensed .worktime-action-label { display: none; }.worktime-sticky-overview.is-condensed .worktime-toolbar-core { gap: 7px; }.worktime-sticky-overview.is-condensed .month-navigator { gap: 2px; }.worktime-sticky-overview.is-condensed .worktime-month-step { width: 32px; height: 32px; flex-basis: 32px; color: var(--md-sys-color-primary); }.worktime-sticky-overview.is-condensed .worktime-month-step:hover { background: var(--md-sys-color-secondary-container); color: var(--md-sys-color-on-secondary-container); }.worktime-sticky-overview.is-condensed .worktime-month-heading { min-width: 92px; }.worktime-sticky-overview.is-condensed .month-title { color: var(--md-sys-color-on-surface); font-size: 17px; }.worktime-sticky-overview.is-condensed .worktime-summary { min-height: 32px; padding: 4px 8px; background: var(--md-sys-color-secondary-container); color: var(--md-sys-color-on-secondary-container); border-color: transparent; }.worktime-sticky-overview.is-condensed .worktime-summary-label, .worktime-sticky-overview.is-condensed .worktime-summary-icon { color: var(--md-sys-color-on-secondary-container); }.worktime-sticky-overview.is-condensed .worktime-summary strong { font-size: 17px; }.worktime-sticky-overview.is-condensed .worktime-actions { gap: 3px; }.worktime-sticky-overview.is-condensed .worktime-actions .btn, .worktime-sticky-overview.is-condensed .workspace-switcher { width: 32px; min-width: 32px; min-height: 32px; height: 32px; padding: 4px; background: transparent !important; color: var(--md-sys-color-on-surface-variant) !important; border-color: transparent !important; box-shadow: none; }.worktime-sticky-overview.is-condensed .workspace-switcher { display: none; }
@media (max-width: 720px) { .worktime-page-header { min-height: 0; }.worktime-header-watermark { font-size: 134px; right: 3px; }.worktime-heading-description { display: none; }.worktime-sticky-overview.is-condensed .worktime-page-header { grid-template-columns: minmax(0, 1fr) auto; }.worktime-sticky-overview.is-condensed .worktime-actions { flex-wrap: nowrap; }.worktime-sticky-overview.is-condensed .worktime-actions .btn:nth-of-type(n+3) { display: none; } }

.user-list-table-scroll {
  overflow-x: auto;
}

.user-list-table {
  min-width: 980px;
}

.user-list-table th,
.user-list-table td {
  white-space: nowrap;
}

.user-list-table th:nth-child(3),
.user-list-table td:nth-child(3) {
  min-width: 160px;
}

.user-list-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-width: max-content;
}

.m3-top-app-bar .dropdown-menu {
  min-width: 248px;
  max-height: min(72vh, 620px);
  overflow-y: auto;
}

.m3-menu-section {
  margin: 10px 8px 4px;
  padding: 0 6px;
  color: var(--md-sys-color-on-surface-variant, #5f6368);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: .05em;
}

.m3-menu-section:first-child {
  margin-top: 4px;
}

.m3-menu-icon {
  width: 1.4rem;
  color: var(--md-sys-color-primary, #00796b);
  text-align: center;
}

.m3-header-actions .btn {
  min-width: max-content;
  white-space: nowrap;
  border-radius: 8px;
}

.m3-header-profile {
  max-width: 240px;
}

.m3-header-profile-name,
.m3-header-profile-meta {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Shared page rhythm: every management screen uses the same reading width.
   Tables are a single, clipped surface; surrounding controls remain separate
   cards instead of appearing as ungrouped content on the page background. */
.m3-page-container,
.m3-list-page {
  width: min(100%, 1240px);
  margin: 0 auto;
}

.m3-list-page {
  max-width: 1240px !important;
}

.m3-surface-card,
.m3-card,
.m3-form-card,
.m3-info-card {
  box-sizing: border-box;
  width: 100%;
  border: 1px solid var(--md-sys-color-outline-variant, #bec9c5);
  border-radius: 16px;
  background: var(--md-sys-color-surface, #f8faf9);
  box-shadow: 0 2px 6px rgba(25, 28, 27, .05);
}

/* Use this for a table's outer surface.  The clipping makes the table header,
   rows and horizontal scroll area read as one card at every screen width. */
.m3-list-card,
.m3-list-page > .table-responsive {
  overflow: hidden;
  border: 1px solid var(--md-sys-color-outline-variant, #bec9c5);
  border-radius: 16px;
  background: var(--md-sys-color-surface, #f8faf9);
  box-shadow: 0 2px 6px rgba(25, 28, 27, .05);
}

.m3-list-card {
  padding: 0 !important;
}

/* Existing list templates progressively receive the same treatment without
   requiring each route to duplicate a wrapper class. */
.m3-surface-card:has(> .table-responsive):not(:has(> .row)):not(:has(> form)),
.m3-surface-card:has(> table.table):not(:has(> .row)):not(:has(> form)) {
  overflow: hidden;
  padding: 0 !important;
}

.m3-surface-card:has(> table.table):not(:has(> .row)):not(:has(> form)) > table.table {
  width: 100%;
}

.m3-list-card > .table-responsive,
.m3-list-page > .table-responsive {
  margin: 0;
}

.m3-list-card .table,
.m3-list-page > .table-responsive .table {
  margin-bottom: 0;
}

.m3-list-card .table > thead > tr > th,
.m3-list-page > .table-responsive .table > thead > tr > th {
  border-bottom-width: 1px;
  background: var(--md-sys-color-surface-container, #edf1ef);
  color: var(--md-sys-color-on-surface-variant, #3f4946);
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .025em;
  white-space: nowrap;
}

.m3-list-card .table > tbody > tr,
.m3-list-page > .table-responsive .table > tbody > tr {
  transition: background-color 140ms ease;
}

.m3-list-card .table > tbody > tr:hover,
.m3-list-page > .table-responsive .table > tbody > tr:hover {
  background: rgba(0, 106, 96, .045);
}

.m3-list-card > .alert,
.m3-list-card > h2,
.m3-list-card > .m3-list-card-heading {
  margin-inline: 24px;
}

.m3-surface-card:has(> .table-responsive):not(:has(> .row)):not(:has(> form)) > .alert,
.m3-surface-card:has(> .table-responsive):not(:has(> .row)):not(:has(> form)) > h2,
.m3-surface-card:has(> .table-responsive):not(:has(> .row)):not(:has(> form)) > .m3-list-card-heading {
  margin-inline: 24px;
}

.m3-list-card > .alert:first-child,
.m3-list-card > h2:first-child,
.m3-list-card > .m3-list-card-heading:first-child {
  margin-top: 24px;
}

.m3-surface-card:has(> .table-responsive):not(:has(> .row)):not(:has(> form)) > .alert:first-child,
.m3-surface-card:has(> .table-responsive):not(:has(> .row)):not(:has(> form)) > h2:first-child,
.m3-surface-card:has(> .table-responsive):not(:has(> .row)):not(:has(> form)) > .m3-list-card-heading:first-child {
  margin-top: 24px;
}

@media (max-width: 720px) {
  .m3-page-container,
  .m3-list-page {
    width: 100%;
  }

  .m3-surface-card,
  .m3-card,
  .m3-form-card,
  .m3-info-card,
  .m3-list-card,
  .m3-list-page > .table-responsive {
    border-radius: 12px;
  }
}

/* Worktime list refresh: keep each day compact and predictable.  Times remain
   the visual anchor, while secondary choices and actions no longer compete
   with the attendance record. */
.worktime-day-list {
  gap: 10px;
}

.worktime-sticky-sentinel {
  height: 0;
  margin: 0;
  padding: 0;
}

.worktime-day-card {
  border-radius: 16px;
}

.worktime-day-layout {
  grid-template-columns: 80px minmax(0, 1fr);
  min-height: 98px;
}

.worktime-date-block {
  gap: 0;
  padding: 12px 8px;
}

.worktime-day-number {
  font-size: 24px;
}

.worktime-entry-block {
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
  padding: 12px 16px 10px;
}

.worktime-primary-row {
  gap: 14px;
}

.worktime-time-grid {
  grid-template-columns: repeat(2, minmax(148px, 190px));
  width: min(100%, 390px);
  gap: 8px;
}

.m3-time-button {
  min-height: 52px;
  padding: 5px 10px 8px;
  border-radius: 12px;
}

.m3-time-button strong {
  font-size: 20px;
}

.worktime-meta-row {
  min-height: 38px;
  padding-top: 8px;
  border-top: 1px solid rgba(111, 121, 118, .18);
}

.worktime-chip,
.worktime-note,
.worktime-tag {
  min-height: 26px;
  font-size: 11px;
}

.worktime-tag {
  padding: 3px 9px;
}

.worktime-chip {
  padding: 3px 8px;
}

.worktime-row-actions {
  gap: 6px;
}

.m3-detail-action {
  min-width: 40px;
  min-height: 40px;
  padding: 0;
  border-radius: 12px;
}

.m3-detail-action > span:last-child {
  display: none;
}

.m3-icon-action {
  width: 40px;
  height: 40px;
  border: 1px solid var(--md-sys-color-outline-variant);
  border-radius: 12px;
  background: var(--md-sys-color-surface-container);
}

@media (min-width: 1100px) {
  .desktop-tag-presets {
    display: flex;
    width: min(40vw, 360px);
    max-width: 360px;
    gap: 5px;
    overflow-x: auto;
    padding: 2px;
    scrollbar-width: thin;
  }

  .desktop-tag-button {
    flex: 0 0 auto;
    min-height: 34px;
    padding: 5px 10px;
    border-width: 1px;
    border-radius: 9px;
    font-size: 11px;
    white-space: nowrap;
  }

  .quick-tag-button.is-selected {
    border-width: 2px;
  }
}

@media (max-width: 720px) {
  .worktime-day-card {
    border-radius: 12px;
  }

  .worktime-day-layout {
    grid-template-columns: 66px minmax(0, 1fr);
    min-height: 0;
  }

  .worktime-entry-block {
    padding: 10px;
  }

  .worktime-meta-row {
    align-items: center;
  }

  .m3-detail-action {
    min-width: 104px;
    padding-inline: 12px;
  }

  .m3-detail-action > span:last-child {
    display: inline;
  }
}

/* Organization master: readable hierarchy with no internal document IDs. */
.organization-list-card {
  overflow: hidden;
  padding: 0 !important;
}

.organization-list-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  padding: 22px 24px 18px;
  border-bottom: 1px solid var(--md-sys-color-outline-variant);
}

.organization-list-heading .text-uppercase {
  margin: 0;
  color: var(--md-sys-color-primary);
  font-size: .7rem;
  font-weight: 800;
  letter-spacing: .1em;
}

.organization-list-heading h2 {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 800;
}

.organization-list-heading > p {
  max-width: 420px;
  margin: 0;
  color: var(--md-sys-color-on-surface-variant);
  font-size: .84rem;
  text-align: right;
}

.organization-list {
  display: grid;
}

.organization-list-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  min-height: 78px;
  padding: 12px 20px 12px calc(20px + min(var(--organization-depth), 5) * 24px);
  border-bottom: 1px solid rgba(111, 121, 118, .18);
  transition: background-color 140ms ease;
}

.organization-list-item:last-child {
  border-bottom: 0;
}

.organization-list-item:hover {
  background: rgba(91, 63, 152, .045);
}

.organization-item-main {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 12px;
}

.organization-item-icon {
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  place-items: center;
  border-radius: 12px;
  background: #eee8fb;
  color: #5b3f98;
}

.organization-item-main h3 {
  margin: 0;
  color: var(--md-sys-color-on-surface);
  font-size: 1rem;
  font-weight: 800;
}

.organization-item-main p {
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 4px 0 0;
  color: var(--md-sys-color-on-surface-variant);
  font-size: .78rem;
}

.organization-item-main p .material-symbols-rounded {
  font-size: 15px;
}

.organization-item-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 7px;
}

.organization-item-actions .btn {
  min-height: 34px;
  gap: 5px;
  padding-inline: 11px;
  border-radius: 9px;
}

.organization-item-actions .material-symbols-rounded {
  font-size: 16px;
}

.organization-list-empty {
  display: grid;
  min-height: 180px;
  place-content: center;
  gap: 8px;
  color: var(--md-sys-color-on-surface-variant);
  text-align: center;
}

.organization-list-empty .material-symbols-rounded {
  margin: 0 auto;
  font-size: 40px;
  color: #7656b3;
}

.organization-list-empty p {
  margin: 0;
}

@media (max-width: 720px) {
  .organization-list-heading {
    align-items: start;
    flex-direction: column;
    padding: 18px;
  }

  .organization-list-heading > p {
    text-align: left;
  }

  .organization-list-item {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 14px 14px 14px calc(14px + min(var(--organization-depth), 2) * 14px);
  }

  .organization-item-actions {
    justify-content: flex-start;
  }
}

/* Keep the attendance identity while condensed; only the density changes. */
.worktime-sticky-overview.is-condensed .worktime-page-header {
  border-color: transparent;
  background: linear-gradient(135deg, #00695c, #239f90);
  box-shadow: 0 7px 20px rgba(0, 72, 64, .24);
}

.worktime-sticky-overview.is-condensed .month-title,
.worktime-sticky-overview.is-condensed .worktime-month-step {
  color: #fff;
}

.worktime-sticky-overview.is-condensed .worktime-month-step:hover {
  background: rgba(255, 255, 255, .18);
  color: #fff;
}

.worktime-sticky-overview.is-condensed .worktime-summary {
  background: rgba(255, 255, 255, .18);
  color: #fff;
  border-color: rgba(255, 255, 255, .24);
}

.worktime-sticky-overview.is-condensed .worktime-summary-label,
.worktime-sticky-overview.is-condensed .worktime-summary-icon {
  color: rgba(255, 255, 255, .88);
}

.worktime-sticky-overview.is-condensed .worktime-actions .btn {
  color: #00695c !important;
  background: rgba(255, 255, 255, .94) !important;
  border-color: rgba(255, 255, 255, .94) !important;
}

/* The time controls no longer use a fieldset legend.  This prevents the
   border from cutting through 出勤/退勤 and reads as a modern compact card. */
.m3-time-button {
  position: relative;
  min-height: 58px;
  padding: 24px 12px 8px;
  border-radius: 14px;
  background: rgba(255, 255, 255, .82);
}

.m3-time-label {
  position: absolute;
  top: 8px;
  left: 12px;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--md-sys-color-on-surface-variant);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .04em;
  line-height: 1;
}

.m3-time-button strong {
  align-self: end;
  font-size: 19px;
  line-height: 1.1;
}

/* The supplied ST WORKTIME mark has a light rectangular canvas.  Crop it
   slightly inside a neutral frame so no pale strip is visible at the edge. */
.m3-brand-mark {
  border: 1px solid var(--md-sys-color-outline-variant);
  background: #fff;
  box-shadow: none;
}

.m3-brand-mark img {
  transform: scale(1.32);
  border-radius: 0;
}

/* A mixed form-and-table page is two distinct cards, not one clipped table. */
.payslip-list-card {
  padding: 24px !important;
}

.payslip-list-card > .table-responsive {
  overflow: hidden;
  border: 1px solid var(--md-sys-color-outline-variant);
  border-radius: 12px;
}

@media (max-width: 720px) {
  .payslip-list-card {
    padding: 18px !important;
  }
}

/* Work-report editor: input and preview are intentionally separate surfaces. */
.report-editor-shell {
  display: grid;
  gap: 18px;
}

.report-editor-card {
  overflow: hidden;
  border-left: 4px solid var(--md-sys-color-primary);
}

.report-editor-card .d-flex.justify-content-between {
  align-items: center;
}

.report-editor-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 8px;
  border: 1px solid var(--md-sys-color-outline-variant);
  border-radius: 12px;
  background: var(--md-sys-color-surface-container);
}

.report-editor-toolbar button {
  min-height: 30px;
  padding: 4px 10px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: #fff;
  color: var(--md-sys-color-primary);
  font-size: .78rem;
  font-weight: 700;
}

.report-editor-toolbar button:hover,
.report-editor-toolbar button:focus-visible {
  border-color: var(--md-sys-color-primary);
  background: var(--md-sys-color-secondary-container);
}

.report-editor-area {
  min-height: 11rem;
  resize: vertical;
  margin-top: 8px;
  border-radius: 12px !important;
}

.report-preview-pane {
  min-height: 54px;
  border: 1px solid var(--md-sys-color-outline-variant) !important;
  border-radius: 12px !important;
  background: #fff !important;
  color: var(--md-sys-color-on-surface);
  line-height: 1.7;
}

.report-preview-pane > :last-child {
  margin-bottom: 0;
}

@media (max-width: 720px) {
  .report-editor-card {
    border-left-width: 3px;
  }
}

/* Shared completion feedback. The region is fixed so a redirect never hides the result below the fold. */
.m3-toast-region {
  position: fixed;
  z-index: 2100;
  right: 24px;
  bottom: 24px;
  display: grid;
  gap: 10px;
  width: min(360px, calc(100vw - 32px));
  pointer-events: none;
}

.m3-toast {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  padding: 12px 12px 12px 15px;
  border: 1px solid rgba(0, 105, 92, .2);
  border-radius: 14px;
  background: rgba(255, 255, 255, .98);
  box-shadow: 0 14px 32px rgba(25, 45, 40, .2);
  color: var(--md-sys-color-on-surface);
  font-weight: 700;
  pointer-events: auto;
  animation: m3-toast-enter 180ms ease-out;
}

.m3-toast > .fa-circle-check { color: var(--md-sys-color-primary); font-size: 1.1rem; }
.m3-toast button { display: inline-grid; place-items: center; width: 30px; min-width: 30px; height: 30px; min-height: 30px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--md-sys-color-on-surface-variant); }
.m3-toast button:hover, .m3-toast button:focus-visible { background: var(--md-sys-color-secondary-container); color: var(--md-sys-color-primary); }

@keyframes m3-toast-enter { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* Work reports: keep every list, form and detail view within the same content rhythm. */
.report-page-shell { display: grid; gap: 18px; }
.report-list-card { overflow: hidden; }
.report-list-card .table { margin-bottom: 0; }
.report-list-card .report-list-card-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0; padding: 18px 24px; border-bottom: 1px solid var(--md-sys-color-outline-variant); }
.report-list-card .table-responsive { margin: 0; }
.report-view-shell { width: min(100%, 980px); margin: 0 auto; display: grid; gap: 18px; }
.report-view-card { width: 100%; border: 1px solid var(--md-sys-color-outline-variant); border-radius: 16px; background: var(--md-sys-color-surface); box-shadow: 0 3px 10px rgba(34, 52, 48, .05); }
.report-view-card .report-rendered { line-height: 1.8; overflow-wrap: anywhere; }
.report-view-card .report-rendered iframe { width: 100%; min-height: 12rem; border: 0; border-radius: 10px; background: #fff; }
.report-navigation { display: flex; justify-content: space-between; gap: 12px; min-height: 40px; }
.report-navigation > span { flex: 1; }
.m3-action-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.m3-action-row form { margin: 0; }

@media (max-width: 720px) {
  .m3-toast-region { right: 16px; bottom: 16px; }
  .report-list-card .report-list-card-heading { align-items: flex-start; padding: 16px 18px; }
  .report-navigation .btn { max-width: calc(50% - 6px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}

/* Public legal documents: long-form reading width with the shared surface styling. */
.m3-legal-main { width: min(100% - 32px, 860px); margin: 24px auto 40px; }
.m3-legal-document { padding: 32px; border: 1px solid var(--md-sys-color-outline-variant); border-radius: 16px; background: var(--md-sys-color-surface); box-shadow: 0 3px 10px rgba(34, 52, 48, .05); line-height: 1.9; }
.m3-legal-document h1 { margin: 0 0 8px; font-size: 1.75rem; }
.m3-legal-document h2 { margin: 32px 0 10px; padding-top: 4px; font-size: 1.15rem; }
.m3-legal-document h2:first-of-type { margin-top: 24px; }
.m3-legal-document p, .m3-legal-document li { overflow-wrap: anywhere; }
.m3-legal-document ol, .m3-legal-document ul { padding-left: 1.4em; }
.m3-legal-document li { margin-bottom: 6px; }
.m3-legal-lead { color: var(--md-sys-color-on-surface-variant); margin-bottom: 0; }
.m3-legal-table { width: 100%; margin: 12px 0 4px; border-collapse: collapse; }
.m3-legal-table th, .m3-legal-table td { padding: 10px 12px; border: 1px solid var(--md-sys-color-outline-variant); text-align: left; vertical-align: top; }
.m3-legal-table thead th { background: var(--md-sys-color-surface-variant); font-weight: 600; }
.m3-legal-table--definition th { width: 34%; background: var(--md-sys-color-surface-variant); font-weight: 600; }

.m3-public-footer { width: min(100% - 32px, 860px); margin: 0 auto 32px; padding-top: 20px; border-top: 1px solid var(--md-sys-color-outline-variant); text-align: center; }
.m3-public-footer-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 20px; }
.m3-public-footer-links a { color: var(--md-sys-color-on-surface-variant); font-size: .9rem; text-decoration: none; }
.m3-public-footer-links a:hover { text-decoration: underline; }
.m3-public-footer-note { margin: 10px 0 0; color: var(--md-sys-color-on-surface-variant); font-size: .82rem; }

@media (max-width: 720px) {
  .m3-legal-document { padding: 22px 18px; }
  .m3-legal-table--definition th { width: auto; }
  .m3-legal-table, .m3-legal-table thead, .m3-legal-table tbody, .m3-legal-table tr, .m3-legal-table th, .m3-legal-table td { display: block; }
  .m3-legal-table thead { display: none; }
  .m3-legal-table tr { margin-bottom: 12px; border: 1px solid var(--md-sys-color-outline-variant); border-radius: 10px; overflow: hidden; }
  .m3-legal-table th, .m3-legal-table td { border: 0; }
}

/* Landing page: describe the product without a login so reviewers and crawlers can see it. */
.top-login-subcopy { margin-top: 6px; color: var(--md-sys-color-on-surface-variant); font-size: .95rem; }
.top-info { width: min(100%, 900px); margin: 56px 0 0; }
.top-info h2 { margin: 0 0 18px; font-size: 1.3rem; text-align: center; }
.top-info-note { margin: 18px 0 0; color: var(--md-sys-color-on-surface-variant); font-size: .88rem; text-align: center; }
.top-feature-grid { display: grid; gap: 16px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.top-plan-grid { display: grid; gap: 16px; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.top-feature, .top-plan { padding: 20px; border: 1px solid var(--md-sys-color-outline-variant); border-radius: 16px; background: var(--md-sys-color-surface); box-shadow: 0 3px 10px rgba(34, 52, 48, .05); }
.top-feature .material-symbols-rounded { color: var(--md-sys-color-primary); font-size: 28px; }
.top-feature h3, .top-plan h3 { margin: 8px 0 6px; font-size: 1.02rem; }
.top-feature p, .top-plan p { margin: 0; color: var(--md-sys-color-on-surface-variant); font-size: .9rem; line-height: 1.7; }
.top-plan h3 { font-size: .95rem; }
.top-plan-price { margin: 0 0 8px !important; color: var(--md-sys-color-on-surface) !important; font-size: 1.15rem; font-weight: 700; }
.top-plan-price span { margin-left: 5px; font-size: .72rem; font-weight: 400; color: var(--md-sys-color-on-surface-variant); }

@media (max-width: 860px) {
  .top-info { margin-top: 40px; }
  .top-plan-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 560px) {
  .top-feature-grid, .top-plan-grid { grid-template-columns: minmax(0, 1fr); }
}

/* Follow the browser/OS theme without requiring an account-level setting. */
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --md-sys-color-primary: #80d5c7;
    --md-sys-color-on-primary: #003731;
    --md-sys-color-primary-container: #005047;
    --md-sys-color-on-primary-container: #9ff2e4;
    --md-sys-color-secondary-container: #354b46;
    --md-sys-color-on-secondary-container: #cce8e2;
    --md-sys-color-surface: #101413;
    --md-sys-color-surface-container-low: #181c1b;
    --md-sys-color-surface-container: #1c211f;
    --md-sys-color-surface-container-high: #262b29;
    --md-sys-color-surface-variant: #3f4946;
    --md-sys-color-on-surface: #e1e3e1;
    --md-sys-color-on-surface-variant: #bec9c5;
    --md-sys-color-outline: #89938f;
    --md-sys-color-outline-variant: #3f4946;
    --md-sys-color-error: #ffb4ab;
    --md-sys-elevation-1: 0 1px 2px rgba(0, 0, 0, .5), 0 1px 3px 1px rgba(0, 0, 0, .28);
  }

  body.m3-app-shell {
    --bs-body-color: var(--md-sys-color-on-surface);
    --bs-body-bg: var(--md-sys-color-surface);
    --bs-secondary-color: var(--md-sys-color-on-surface-variant);
    --bs-border-color: var(--md-sys-color-outline-variant);
    --bs-tertiary-bg: var(--md-sys-color-surface-container);
    --mdb-body-color: var(--md-sys-color-on-surface);
    --mdb-body-bg: var(--md-sys-color-surface);
    --mdb-border-color: var(--md-sys-color-outline-variant);
  }

  .m3-top-app-bar,
  .m3-public-app-bar,
  .worktime-sticky-overview.is-condensed .worktime-page-header {
    background: rgba(16, 20, 19, .96);
  }

  .m3-app-shell .card,
  .m3-app-shell .modal-content,
  .m3-app-shell .dropdown-menu,
  .m3-app-shell .list-group-item,
  .m3-app-shell .accordion-item,
  .m3-app-shell .accordion-button {
    border-color: var(--md-sys-color-outline-variant);
    background-color: var(--md-sys-color-surface);
    color: var(--md-sys-color-on-surface);
  }

  .m3-app-shell .dropdown-item,
  .m3-app-shell .modal-header,
  .m3-app-shell .modal-footer,
  .m3-app-shell .table {
    border-color: var(--md-sys-color-outline-variant);
    color: var(--md-sys-color-on-surface);
  }

  .m3-app-shell .text-muted,
  .m3-app-shell .form-text,
  .m3-app-shell .form-label,
  .m3-app-shell .form-check-label {
    color: var(--md-sys-color-on-surface-variant) !important;
  }

  .app-main-shell .form-control,
  .app-main-shell .form-select,
  .m3-public-main .form-control,
  .m3-public-main .form-select,
  .m3-app-shell textarea,
  .m3-app-shell select,
  .m3-app-shell input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
  .m3-app-shell select option {
    border-color: var(--md-sys-color-outline);
    background-color: var(--md-sys-color-surface-container-low);
    color: var(--md-sys-color-on-surface);
  }

  .m3-app-shell input::placeholder,
  .m3-app-shell textarea::placeholder {
    color: var(--md-sys-color-on-surface-variant);
    opacity: .8;
  }

  .m3-app-shell .btn-outline-secondary {
    border-color: var(--md-sys-color-outline);
    color: var(--md-sys-color-on-surface-variant);
  }

  .m3-app-shell .btn-outline-secondary:hover,
  .m3-app-shell .btn-outline-secondary:focus-visible {
    border-color: var(--md-sys-color-primary);
    background: var(--md-sys-color-secondary-container);
    color: var(--md-sys-color-on-secondary-container);
  }

  .m3-time-button,
  .report-editor-toolbar button,
  .report-preview-pane,
  .paid-month,
  .m3-toast {
    background: var(--md-sys-color-surface-container-high) !important;
    color: var(--md-sys-color-on-surface);
  }

  .arigato-points {
    border-color: #70404d;
    background: #2b1b20;
  }

  .arigato-points span,
  .arigato-points-note {
    color: #e7b9c7;
  }

  .arigato-points strong,
  .arigato-rank strong,
  .arigato-heading-icon,
  .arigato-period i {
    color: #ffb0c8;
  }

  .arigato-feed-icon {
    background: #4a2531;
    color: #ffb0c8;
  }

  .paid-summary--accent {
    background: #164a42;
    color: #bcece2;
  }

  .paid-month--yellow { background: #393316; }
  .paid-month--lightgreen { background: #1f3821; }
  .paid-month--lightgray { background: #292d2e; color: var(--md-sys-color-on-surface-variant); }

  .all-user-day-card.is-saturday {
    border-color: #405b7a;
    background: #17283a;
  }

  .all-user-day-card.is-saturday h3 { color: #a8c8f0; }

  .all-user-day-card.is-sunday {
    border-color: #754541;
    background: #351d1c;
  }

  .all-user-day-card.is-sunday h3 { color: #ffb4ab; }

  .m3-toast {
    border-color: #397168;
    box-shadow: 0 14px 32px rgba(0, 0, 0, .48);
  }

  .report-view-card .report-rendered iframe {
    background: var(--md-sys-color-surface-container-high);
  }
}
