:root {
  --bg-top: #f6efe2;
  --bg-bottom: #dcefe3;
  --surface: rgba(255, 255, 255, 0.86);
  --surface-strong: #ffffff;
  --ink: #18322b;
  --muted: #5f776e;
  --line: rgba(24, 50, 43, 0.12);
  --accent: #2f7a67;
  --accent-soft: rgba(47, 122, 103, 0.12);
  --warn: #b46a38;
  --neutral: #7b8791;
  --shadow: 0 24px 70px rgba(50, 80, 68, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Segoe UI", Tahoma, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.75), transparent 28%),
    linear-gradient(160deg, var(--bg-top), var(--bg-bottom));
}

.page-shell {
  width: min(1380px, calc(100% - 32px));
  margin: 32px auto 48px;
  display: grid;
  gap: 18px;
}

.hero-card,
.upload-card,
.control-card,
.table-card,
.team-section {
  background: var(--surface);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 24px;
  box-shadow: var(--shadow);
}

.hero-card {
  padding: 28px;
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: end;
}

.eyebrow {
  /* text-align: center; */
  margin: 0 0 8px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
}

h1,
h3 {
  margin: 0;
}

h1 {
  font-size: clamp(30px, 5vw, 48px);
  line-height: 1.05;
  max-width: 760px;
}

.hero-copy,
.hint,
.message,
.error-list p,
.user-cell span,
.section-head p,
.muted-inline {
  color: var(--muted);
}

.hero-copy {
  max-width: 760px;
  margin: 12px 0 0;
  line-height: 1.6;
}

.hero-stats {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.hero-actions {
  display: flex;
  align-items: center;
}

.stat {
  min-width: 132px;
  padding: 16px 18px;
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(237, 248, 242, 0.92));
  border: 1px solid var(--line);
}

.stat-label {
  display: block;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  margin-bottom: 6px;
}

.stat strong {
  font-size: 34px;
}

.upload-card,
.control-card,
.team-section,
.table-card {
  padding: 22px;
}

.upload-form,
.filter-grid,
.team-create {
  display: flex;
  gap: 14px;
  align-items: center;
  flex-wrap: wrap;
}

.menu-tabs,
.period-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.menu-tabs {
  justify-content: space-between;
}

.menu-tabs-main,
.menu-tabs-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.menu-tabs-actions {
  margin-left: auto;
}

.guest-login-section {
  min-height: calc(100vh - 80px);
  display: grid;
  place-items: center;
  padding: 24px 16px;
}

.guest-login-card {
  width: min(460px, 100%);
  padding: clamp(24px, 3vw, 26px);
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 28px;
  background: var(--surface);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.guest-login-card h2 {
  margin: 0;
  font-size: clamp(25px, 4vw, 34px);
  line-height: 1.15;
}

.guest-login-copy {
  margin: 10px 0 20px;
  color: var(--muted);
  line-height: 1.6;
}

.guest-login-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  margin-bottom: 18px;
  padding: 4px;
  border-radius: 8px;
  background: rgba(24, 50, 43, 0.08);
}

.guest-login-tabs button {
  min-width: 0;
  min-height: 40px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  box-shadow: none;
}

.guest-login-tabs button.active {
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 2px 8px rgba(24, 50, 43, 0.12);
}

.guest-login-form {
  display: grid;
  gap: 12px;
}

.guest-login-form label {
  display: grid;
  gap: 8px;
}

.guest-login-form label > span {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.guest-login-form input,
.guest-login-form select,
.guest-login-form button {
  width: 100%;
  min-height: 48px;
}

.guest-login-error {
  margin: -4px 0 0;
  color: var(--warn);
  font-size: 13px;
  text-align: center;
}

.menu-tab,
.ghost-button {
  background: rgba(24, 50, 43, 0.08);
  color: var(--ink);
}

.menu-tab.active {
  background: linear-gradient(135deg, #256d5c, #3f8d77);
  color: white;
}

.period-control {
  display: grid;
  gap: 8px;
  min-width: 320px;
  flex: 1;
}

.period-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.period-picker {
  min-width: 280px;
  flex: 1;
}

.period-picker select {
  width: 100%;
}

.upload-box,
.control-field {
  display: grid;
  gap: 8px;
}

.upload-box {
  min-width: 280px;
  flex: 1;
  padding: 16px 18px;
  border-radius: 18px;
  border: 1px dashed rgba(47, 122, 103, 0.4);
  background: var(--accent-soft);
}

.upload-box input,
.control-field input,
.control-field select,
.team-select {
  width: 100%;
}

.control-field {
  min-width: 220px;
}

.control-field span {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

input,
select,
button {
  border-radius: 14px;
  font: inherit;
}

.login-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 14px 22px;
  background: rgba(24, 50, 43, 0.08);
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
}

input,
select {
  border: 1px solid var(--line);
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.88);
  color: var(--ink);
}

button {
  border: 0;
  border-radius: 999px;
  padding: 14px 22px;
  background: linear-gradient(135deg, #256d5c, #3f8d77);
  color: white;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}

button:disabled {
  opacity: 0.7;
  cursor: progress;
}

.secondary-button {
  background: rgba(24, 50, 43, 0.08);
  color: var(--ink);
}

.secondary-button:hover {
  background: rgba(24, 50, 43, 0.14);
}

.message {
  margin: 12px 0 0;
}

.notice {
  margin-top: 14px;
  padding: 16px 18px;
  border-radius: 18px;
  border: 1px solid transparent;
  box-shadow: 0 10px 26px rgba(24, 50, 43, 0.08);
}

.notice strong {
  display: block;
  margin-bottom: 4px;
  font-size: 15px;
  letter-spacing: 0.02em;
}

.notice p {
  margin: 0;
  line-height: 1.5;
}

.read-only-notice {
  margin-top: 0;
}

.notice-success {
  background: rgba(47, 122, 103, 0.14);
  border-color: rgba(47, 122, 103, 0.28);
  color: #194c3f;
}

.notice-info {
  background: rgba(92, 123, 168, 0.14);
  border-color: rgba(92, 123, 168, 0.28);
  color: #294e7a;
}

.notice-warning {
  background: rgba(180, 106, 56, 0.14);
  border-color: rgba(180, 106, 56, 0.28);
  color: #7a431f;
}

.notice-error {
  background: rgba(189, 88, 88, 0.14);
  border-color: rgba(189, 88, 88, 0.3);
  color: #7f2f2f;
}

.upload-overlay {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(24, 50, 43, 0.48);
  cursor: wait;
}

body:has(.modal-backdrop),
body:has(.lightbox-backdrop),
body:has(.upload-overlay),
body:has(.fill-overlay) {
  overflow: hidden;
}

.upload-overlay-card {
  width: min(360px, 100%);
  padding: 28px 32px;
  text-align: center;
  background: var(--surface-strong);
  border-radius: 18px;
  box-shadow: var(--shadow);
  border: 1px solid rgba(255, 255, 255, 0.65);
}

.upload-spinner {
  width: 38px;
  height: 38px;
  margin: 0 auto 16px;
  border-radius: 50%;
  border: 3px solid rgba(47, 122, 103, 0.2);
  border-top-color: var(--accent);
  animation: fill-spin 0.9s linear infinite;
}

.upload-overlay-card h3 {
  margin: 0 0 8px;
  font-size: 18px;
}

.upload-overlay-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.upload-toast {
  position: fixed;
  top: 22px;
  right: 22px;
  z-index: 90;
  width: min(380px, calc(100vw - 32px));
  padding: 16px 18px;
  border-radius: 16px;
  border: 1px solid transparent;
  box-shadow: 0 18px 44px rgba(24, 50, 43, 0.18);
  background: var(--surface-strong);
  animation: toast-slide-in 160ms ease-out;
}

.upload-toast strong {
  display: block;
  margin-bottom: 4px;
}

.upload-toast p {
  margin: 0;
  line-height: 1.45;
}

.upload-toast-success {
  border-color: rgba(47, 122, 103, 0.32);
  color: #194c3f;
}

.upload-toast-error {
  border-color: rgba(189, 88, 88, 0.34);
  color: #7f2f2f;
}

.upload-toast-warning {
  border-color: rgba(180, 106, 56, 0.34);
  color: #7a431f;
}

@keyframes toast-slide-in {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.error-list {
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(180, 106, 56, 0.08);
  border: 1px solid rgba(180, 106, 56, 0.18);
}

.error-list.compact {
  margin-top: 10px;
  padding: 10px 12px;
}

.error-list p,
.section-head p {
  margin: 4px 0 0;
}

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

.job-card {
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid var(--line);
}

.job-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}

.job-head strong,
.job-summary,
.job-meta {
  display: block;
  margin: 0;
}

.job-head p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.job-summary {
  margin-top: 8px;
  color: var(--ink);
}

.job-meta {
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
}

.job-status {
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.job-status.queued {
  background: rgba(123, 135, 145, 0.14);
  color: #50606b;
}

.job-status.processing {
  background: rgba(47, 122, 103, 0.14);
  color: #1b7059;
}

.job-status.done {
  background: rgba(41, 142, 114, 0.14);
  color: #1b7059;
}

.job-status.failed {
  background: rgba(189, 88, 88, 0.14);
  color: #7f2f2f;
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.section-head-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.icon-button {
  width: 34px;
  height: 34px;
  min-width: 34px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.icon-button.is-loading svg {
  animation: spin 0.7s linear infinite;
}

.section-badges,
.project-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-self: center;
}

.mini-pill,
.tag,
.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  border-radius: 999px;
}

.mini-pill {
  padding: 7px 12px;
  background: rgba(41, 142, 114, 0.12);
  color: #1b7059;
}

.mini-pill.neutral {
  background: rgba(123, 135, 145, 0.12);
  color: #58646d;
}

.mini-pill.warning {
  background: rgba(180, 106, 56, 0.14);
  color: #7a431f;
}

.desktop-settings-form {
  display: grid;
  gap: 16px;
}

.jira-settings-form {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
}

.jira-settings-group {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.jira-url-settings {
  display: grid;
  gap: 10px;
  grid-column: 1 / -1;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
}

.jira-url-settings .jira-settings-group-head {
  grid-column: 1 / -1;
}

.jira-settings-group + .jira-settings-group {
  border-left: 1px solid var(--line);
  padding-left: 16px;
}

.jira-settings-group-head {
  align-items: center;
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.jira-settings-group-head span {
  color: var(--muted);
  font-size: 0.88rem;
}

.jira-settings-table {
  border-collapse: separate;
  border-spacing: 0;
  min-width: 560px;
}

.jira-settings-table-wrap {
  max-height: 420px;
  overflow: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.jira-settings-table thead th {
  background: var(--surface-strong);
  border-bottom: 1px solid var(--line);
  border-top: 0;
  box-shadow: 0 2px 0 var(--line);
  position: sticky;
  top: 0;
  z-index: 5;
}

.jira-settings-table th:nth-child(1),
.jira-settings-table th:nth-child(2) {
  width: 200px;
}

.jira-settings-table input,
.jira-settings-table select,
.jira-settings-table textarea {
  width: 100%;
  min-width: 120px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
  font: inherit;
}

.jira-settings-table textarea {
  min-width: 200px;
  min-height: 42px;
  resize: vertical;
}

.jira-settings-form > .desktop-settings-footer {
  grid-column: 1 / -1;
}

.jira-settings-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.desktop-feature-list {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.66);
}

.desktop-feature-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 18px;
  transition: background 160ms ease, border-color 160ms ease;
}

.desktop-feature-row + .desktop-feature-row {
  border-top: 1px solid var(--line);
}

.desktop-feature-row.is-enabled {
  background: linear-gradient(90deg, rgba(47, 122, 103, 0.08), rgba(255, 255, 255, 0.5));
}

.desktop-feature-icon {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--muted);
}

.desktop-feature-row.is-enabled .desktop-feature-icon {
  border-color: rgba(47, 122, 103, 0.24);
  background: rgba(47, 122, 103, 0.12);
  color: var(--accent);
}

.desktop-feature-copy {
  min-width: 0;
}

.desktop-feature-title {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
}

.desktop-feature-title strong {
  font-size: 15px;
}

.desktop-feature-title > span {
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(123, 135, 145, 0.12);
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.desktop-feature-copy p,
.desktop-settings-footer p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.desktop-feature-control {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}

.desktop-feature-state {
  min-width: 52px;
  color: var(--neutral);
  font-size: 12px;
  font-weight: 700;
  text-align: right;
}

.desktop-feature-state.is-visible {
  color: var(--accent);
}

.desktop-feature-switch {
  position: relative;
  display: inline-flex;
  cursor: pointer;
}

.desktop-feature-switch input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.desktop-feature-switch-track {
  position: relative;
  display: block;
  width: 50px;
  height: 28px;
  border: 1px solid rgba(123, 135, 145, 0.3);
  border-radius: 999px;
  background: rgba(123, 135, 145, 0.22);
  transition: background 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.desktop-feature-switch-thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 7px rgba(24, 50, 43, 0.24);
  transition: transform 160ms ease;
}

.desktop-feature-switch input:checked + .desktop-feature-switch-track {
  border-color: var(--accent);
  background: var(--accent);
}

.desktop-feature-switch input:checked + .desktop-feature-switch-track .desktop-feature-switch-thumb {
  transform: translateX(22px);
}

.desktop-feature-switch input:focus-visible + .desktop-feature-switch-track {
  box-shadow: 0 0 0 4px var(--accent-soft);
}

.desktop-feature-switch input:disabled + .desktop-feature-switch-track {
  opacity: 0.55;
  cursor: not-allowed;
}

.desktop-settings-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-top: 2px;
}

.desktop-settings-footer button {
  flex: 0 0 auto;
  min-width: 132px;
}

.desktop-settings-footer button:disabled {
  cursor: default;
}

@media (max-width: 700px) {
  .jira-settings-form {
    grid-template-columns: 1fr;
  }

  .jira-url-settings {
    grid-template-columns: 1fr;
  }

  .jira-settings-group + .jira-settings-group {
    border-left: 0;
    border-top: 1px solid var(--line);
    padding-left: 0;
    padding-top: 16px;
  }

  .desktop-feature-row {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .desktop-feature-control {
    grid-column: 1 / -1;
    justify-content: space-between;
    padding-left: 62px;
  }

  .desktop-settings-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .desktop-settings-footer button {
    width: 100%;
  }

  .jira-settings-actions {
    width: 100%;
  }
}

.reminder-summary {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.tag {
  padding: 6px 10px;
  background: rgba(24, 50, 43, 0.08);
  color: var(--ink);
}

.table-wrap {
  overflow-x: auto;
}

.review-table-head {
  position: sticky;
  top: 0;
  z-index: 4;
  background: var(--surface);
  height: 46px;
  min-height: 46px;
  margin-bottom: 0;
  padding-bottom: 0;
  align-items: center;
}

.review-table-head-title {
  display: grid;
  gap: 2px;
}

.review-table-head h3 {
  font-size: 18px;
  line-height: 1.15;
}

.review-table-head p {
  margin: 0;
  font-size: 13px;
  line-height: 1.15;
}

.review-table-head-actions {
  align-items: center;
}

.review-table-scroll {
  margin-top: 4px;
  max-height: min(58vh, 560px);
  overflow: auto;
  overscroll-behavior: contain;
}

.review-table-section thead th {
  position: sticky;
  top: 0;
  z-index: 3;
  background: var(--surface-strong);
  box-shadow: 0 1px 0 var(--line);
}

.account-users-card {
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}

.account-users-table-wrap {
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  max-height: 500px;
  overflow-y: auto;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
}

.account-users-table-wrap table {
  width: 1850px;
  min-width: 1850px;
  max-width: none;
}

.account-users-table-wrap thead th {
  position: sticky;
  top: 0;
  background: var(--surface-strong);
  z-index: 1;
}

.account-user-create-inline {
  flex-wrap: nowrap;
  align-items: flex-end;
  margin-left: auto;
}

.account-user-create-inline .control-field {
  min-width: 180px;
}

.account-users-table-wrap tbody tr.account-user-row-disabled,
.account-users-table-wrap tbody tr.account-user-row-disabled:hover {
  background: rgba(148, 163, 184, 0.2);
}

.account-user-row-disabled input:disabled,
.account-user-row-disabled select:disabled {
  color: #6b7280;
  background: rgba(229, 231, 235, 0.9);
  cursor: not-allowed;
  opacity: 0.8;
}

.managed-project-create {
  align-items: flex-end;
  margin-bottom: 12px;
}

.project-scope-controls {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.project-scope-controls .managed-project-create {
  flex: 2 1 360px;
  margin-bottom: 0;
}

.project-scope-controls .project-scope-select {
  flex: 1 1 240px;
  margin: 0;
}

.project-scope-card .project-scope-select,
.logwork-project-select-field {
  min-width: 240px;
  max-width: 360px;
}

.settings-project-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.managed-project-table-wrap input {
  width: 100%;
}

.managed-project-table-wrap {
  max-height: 320px;
  overflow-y: auto;
}

.logwork-section-head {
  align-items: flex-end;
  flex-wrap: wrap;
}

.logwork-table-toolbar,
.logwork-row-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logwork-table-toolbar {
  flex: 1;
  justify-content: flex-end;
}

.logwork-template-panel {
  display: flex;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 12px;
  margin: 18px 0 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(47, 122, 103, 0.05);
}

.logwork-template-edit-group,
.logwork-template-create-group,
.logwork-subtask-group {
  display: flex;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}

.logwork-template-create-group {
  margin-left: auto;
}

.logwork-template-select-field {
  min-width: 220px;
}

.logwork-template-name-field {
  min-width: 240px;
}

.logwork-subtask-group {
  flex: 1 1 420px;
}

.logwork-story-field-group {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 44px;
  align-items: end;
  gap: 8px;
  flex: 1 1 280px;
  min-width: 280px;
}

.logwork-subtask-group button,
.create-subtask-confirm-modal .delete-confirm-actions button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.button-spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  margin-right: 8px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 999px;
  animation: spin 0.7s linear infinite;
  flex-shrink: 0;
}

.logwork-story-key-field {
  min-width: 0;
}

.logwork-story-key-field select {
  min-height: 44px;
}

.logwork-story-reload-button {
  width: 44px;
  height: 44px;
  min-width: 44px;
  padding: 0;
  align-self: end;
  border-radius: 8px;
}

.logwork-template-empty-state {
  padding: 34px 20px;
  border: 1px dashed rgba(47, 122, 103, 0.35);
  border-radius: 14px;
  background: rgba(47, 122, 103, 0.04);
  color: var(--muted);
  text-align: center;
  font-weight: 700;
}

.worklog-manage-panel {
  align-items: center;
}

.worklog-manage-refresh-button {
  width: 44px;
  height: 44px;
  min-width: 44px;
  border-radius: 999px;
}

.worklog-manage-status {
  display: inline-flex;
  align-items: end;
  min-height: 44px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
}

.worklog-manage-status-error {
  color: #a23030;
}

.worklog-manage-status-success {
  color: var(--brand-strong);
}

.worklog-issue-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  max-width: 100%;
}

.worklog-manage-table th:nth-child(1),
.worklog-manage-table td:nth-child(1) {
  min-width: 180px;
}

.worklog-manage-table th:nth-child(2),
.worklog-manage-table td:nth-child(2) {
  width: 180px;
}

.worklog-manage-table th:nth-child(4),
.worklog-manage-table td:nth-child(4) {
  width: 120px;
}

.worklog-manage-modal {
  width: min(960px, calc(100vw - 48px));
  max-height: min(760px, calc(100vh - 48px));
  display: flex;
  flex-direction: column;
}

.worklog-manage-modal-head {
  flex-shrink: 0;
}

.worklog-manage-modal-table-wrap {
  min-height: 0;
  max-height: 520px;
  overflow: auto;
}

.worklog-manage-modal-table {
  table-layout: fixed;
  min-width: 860px;
}

.worklog-manage-modal-table .worklog-select-column {
  width: 64px;
}

.worklog-manage-modal-table .worklog-issue-column {
  width: 190px;
}

.worklog-manage-modal-table .worklog-date-column {
  width: 150px;
}

.worklog-manage-modal-table .worklog-time-column {
  width: 150px;
}

.worklog-manage-modal-table .worklog-state-column {
  width: 112px;
}

.worklog-manage-modal-table th:nth-child(1),
.worklog-manage-modal-table td:nth-child(1) {
  padding-left: 8px;
  padding-right: 8px;
  text-align: center;
}

.worklog-manage-modal-table th:nth-child(1) .boolean-grid-cell,
.worklog-manage-modal-table td:nth-child(1) .boolean-grid-cell {
  justify-content: center;
  width: 100%;
}

.worklog-comment {
  display: block;
  max-width: 420px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.worklog-manage-modal-loading {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 52px;
  font-weight: 700;
}

.worklog-manage-modal-table tr.worklog-row-deleting {
  background: rgba(47, 130, 112, 0.12);
  box-shadow: inset 4px 0 0 var(--accent);
}

.worklog-manage-modal-table tr.worklog-row-deleting:focus {
  outline: 2px solid rgba(47, 130, 112, 0.45);
  outline-offset: -2px;
}

.worklog-delete-state {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 74px;
  padding: 5px 8px;
  border-radius: 999px;
  background: rgba(111, 126, 121, 0.12);
  color: #34423e;
  font-size: 12px;
  font-weight: 800;
}

.worklog-delete-state-deleting,
.worklog-delete-state-waiting {
  background: rgba(47, 130, 112, 0.13);
  color: var(--accent);
}

.worklog-delete-state-deleted {
  background: rgba(47, 130, 112, 0.18);
  color: var(--accent-strong);
}

.worklog-delete-state-failed {
  background: rgba(157, 38, 52, 0.13);
  color: #9d2634;
}

.worklog-manage-modal-actions {
  flex-shrink: 0;
  gap: 10px;
  padding-top: 18px;
}

.logwork-endpoint-field {
  min-width: min(460px, 100%);
}

.logwork-month-field {
  min-width: 190px;
}

.logwork-month-field select,
.logwork-month-field input,
.logwork-template-select-field select {
  appearance: none;
  min-height: 46px;
  padding: 11px 44px 11px 15px;
  border: 1px solid rgba(47, 122, 103, 0.28);
  border-radius: 14px;
  background-color: rgba(255, 255, 255, 0.96);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23256d5c' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  color: var(--ink);
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 5px 14px rgba(24, 50, 43, 0.06);
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

.logwork-month-field input {
  background-image: none;
  padding-right: 15px;
  text-transform: uppercase;
}

.logwork-month-field select:hover:not(:disabled),
.logwork-month-field input:hover:not(:disabled),
.logwork-template-select-field select:hover:not(:disabled) {
  border-color: rgba(47, 122, 103, 0.62);
  background-color: #fff;
}

.logwork-month-field select:focus,
.logwork-month-field input:focus,
.logwork-template-select-field select:focus {
  outline: none;
  border-color: #2f7a67;
  box-shadow: 0 0 0 4px rgba(47, 122, 103, 0.14), 0 6px 16px rgba(24, 50, 43, 0.08);
}

.logwork-month-field select:disabled,
.logwork-month-field input:disabled,
.logwork-template-select-field select:disabled {
  opacity: 0.58;
  cursor: not-allowed;
}

.logwork-endpoint-field input[readonly] {
  background: rgba(24, 50, 43, 0.06);
  color: var(--muted);
}

.logwork-default-table {
  min-width: 980px;
}

.logwork-default-table input,
.logwork-default-table select {
  width: 100%;
  min-width: 140px;
}

.logwork-default-table input[readonly] {
  background: rgba(24, 50, 43, 0.06);
  color: var(--muted);
  cursor: default;
}

.logwork-generated-table td:nth-child(5) input {
  min-width: 220px;
}

.logwork-default-table:not(.logwork-generated-table) td:nth-child(5),
.logwork-generated-table td:nth-child(5),
.logwork-generated-table td:nth-child(6) {
  width: 280px;
  max-width: 280px;
}

.logwork-default-table:not(.logwork-generated-table) th:nth-child(4),
.logwork-default-table:not(.logwork-generated-table) td:nth-child(4) {
  width: 100px;
  min-width: 100px;
  max-width: 100px;

  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
}

.logwork-default-table:not(.logwork-generated-table) td:nth-child(4) input {
  min-width: 50px;
}

.logwork-selection-cell {
  width: 52px;
  min-width: 52px;
  max-width: 52px;
  text-align: center;
}

.logwork-default-table input.logwork-row-select-checkbox {
  width: 18px;
  min-width: 18px;
  height: 18px;
  accent-color: #2f7a67;
  cursor: pointer;
}

.logwork-default-table input.logwork-row-select-checkbox:disabled {
  cursor: not-allowed;
}

.logwork-truncated-input,
.logwork-mapping-select {
  max-width: 260px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.logwork-row-actions {
  align-items: center;
  white-space: nowrap;
}

.logwork-generated-table-wrap {
  max-height: 620px;
  overflow: auto;
}

.logwork-generated-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--surface-strong);
}

.logwork-generated-table tfoot td {
  position: sticky;
  bottom: 0;
  z-index: 2;
  background: var(--surface-strong);
}

.logwork-generated-table tbody tr.logwork-row-is-active,
.logwork-generated-table tbody tr.logwork-row-is-active:hover {
  background: rgba(47, 122, 103, 0.16);
}

.logwork-generated-table tbody tr.logwork-row-is-selected,
.logwork-generated-table tbody tr.logwork-row-is-selected:hover {
  background: rgba(47, 122, 103, 0.11);
}

.logwork-generated-table tbody tr:not(.logwork-row-is-active) {
  cursor: pointer;
}

.system-date-picker-trigger {
  width: 100%;
  min-width: 170px;
  min-height: 44px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  padding: 9px 11px;
  border: 1px solid rgba(47, 122, 103, 0.24);
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
  font-size: 14px;
  font-weight: 400;
  text-align: left;
  cursor: pointer;
  box-shadow: inset 0 1px 2px rgba(24, 50, 43, 0.04);
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

.system-date-picker-trigger > span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.system-date-picker-trigger svg {
  fill: none;
  stroke: var(--accent);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.system-date-picker-trigger .system-date-picker-chevron {
  transition: transform 0.18s ease;
}

.system-date-picker-trigger.is-open .system-date-picker-chevron {
  transform: rotate(180deg);
}

.system-date-picker-trigger:hover:not(:disabled) {
  border-color: rgba(47, 122, 103, 0.58);
  background: #fff;
}

.system-date-picker-trigger:focus-visible,
.system-date-picker-trigger.is-open {
  outline: none;
  border-color: #2f7a67;
  box-shadow: 0 0 0 4px rgba(47, 122, 103, 0.12);
}

.system-date-picker-trigger:disabled {
  opacity: 0.62;
  cursor: not-allowed;
}

.system-date-picker-popover {
  position: fixed;
  z-index: 100;
  width: min(320px, calc(100vw - 24px));
  max-height: calc(100vh - 24px);
  overflow-y: auto;
  padding: 14px;
  border: 1px solid rgba(47, 122, 103, 0.18);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.98);
  color: var(--ink);
  box-shadow: 0 22px 56px rgba(24, 50, 43, 0.22);
  backdrop-filter: blur(16px);
  animation: system-date-picker-in 0.16s ease-out;
}

.system-date-picker-header {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) 36px;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.system-date-picker-header strong {
  text-align: center;
  font-size: 15px;
  letter-spacing: 0.01em;
}

.system-date-picker-nav,
.system-date-picker-day,
.system-date-picker-today {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: transparent;
  color: var(--ink);
  box-shadow: none;
}

.system-date-picker-nav {
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: 11px;
}

.system-date-picker-nav:hover {
  background: var(--accent-soft);
  color: var(--accent);
}

.system-date-picker-nav svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.system-date-picker-weekdays,
.system-date-picker-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 4px;
}

.system-date-picker-weekdays {
  margin-bottom: 5px;
}

.system-date-picker-weekdays span {
  padding: 4px 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-align: center;
  text-transform: uppercase;
}

.system-date-picker-day {
  width: 36px;
  height: 36px;
  padding: 0;
  justify-self: center;
  border-radius: 11px;
  font-size: 13px;
  font-weight: 700;
  transition: background-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.system-date-picker-day:hover {
  background: var(--accent-soft);
  color: var(--accent);
  transform: translateY(-1px);
}

.system-date-picker-day.is-outside-month {
  color: rgba(95, 119, 110, 0.42);
}

.system-date-picker-day.is-today {
  box-shadow: inset 0 0 0 1.5px rgba(47, 122, 103, 0.48);
  color: var(--accent);
}

.system-date-picker-day.is-selected,
.system-date-picker-day.is-selected:hover {
  background: linear-gradient(135deg, #256d5c, #3f8d77);
  color: #fff;
  box-shadow: 0 7px 16px rgba(37, 109, 92, 0.24);
}

.system-date-picker-footer {
  display: flex;
  justify-content: flex-end;
  margin-top: 12px;
  padding-top: 11px;
  border-top: 1px solid var(--line);
}

.system-date-picker-today {
  min-height: 34px;
  padding: 7px 13px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 13px;
  font-weight: 800;
}

.system-date-picker-today:hover {
  background: rgba(47, 122, 103, 0.2);
}

@keyframes system-date-picker-in {
  from {
    opacity: 0;
    transform: translateY(-4px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.logwork-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  /* min-width: 86px; */
  padding: 7px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.logwork-status svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.logwork-status-pending {
  background: rgba(123, 135, 145, 0.14);
  color: #50606b;
}

.logwork-status-spin {
  background: rgba(47, 122, 103, 0.14);
  color: #1b7059;
}

.logwork-status-success {
  background: rgba(41, 142, 114, 0.14);
  color: #16805f;
}

.logwork-status-failed {
  background: rgba(189, 88, 88, 0.14);
  color: #a43232;
}

.logwork-status-has-tooltip {
  position: relative;
  cursor: help;
}

.logwork-status-has-tooltip::before,
.logwork-status-has-tooltip::after {
  position: absolute;
  left: 50%;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 6px);
  transition: opacity 0.16s ease, transform 0.16s ease;
  z-index: 30;
}

.logwork-status-has-tooltip::before {
  content: attr(data-tooltip);
  bottom: calc(100% + 10px);
  width: max-content;
  min-width: 220px;
  max-width: 320px;
  padding: 8px 12px;
  border-radius: 8px;
  background: #2d3748;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.22);
  color: #fff;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.5;
  text-align: left;
  white-space: normal;
  word-break: break-word;
}

.logwork-status-has-tooltip::after {
  content: "";
  bottom: calc(100% + 2px);
  border: 6px solid transparent;
  border-top-color: #2d3748;
}

.logwork-status-has-tooltip:hover::before,
.logwork-status-has-tooltip:hover::after,
.logwork-status-has-tooltip:focus-visible::before,
.logwork-status-has-tooltip:focus-visible::after {
  opacity: 1;
  transform: translate(-50%, 0);
}

.logwork-status-spinner {
  width: 14px;
  height: 14px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

.logwork-footer-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.project-select {
  min-width: 140px;
}

.work-item-id-button {
  min-width: 0;
  padding: 0;
  color: var(--accent);
  font: inherit;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.work-item-id-button:hover {
  color: var(--accent-strong, #184f43);
}

.azure-devops-email-input {
  min-width: 220px;
}

.account-detail-input {
  min-width: 160px;
}

.display-name-input,
.invoice-name-input {
  min-width: 200px;
}

.boolean-grid-cell {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 700;
}

.boolean-grid-cell input {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
}

.integration-page,
.integration-table-card {
  display: grid;
  gap: 18px;
}

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

.integration-provider-card {
  display: grid;
  gap: 16px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.45);
}

.integration-provider-head,
.integration-table-head,
.azure-sync-actions,
.jira-sync-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.integration-provider-head h4 {
  margin: 3px 0 0;
  font-size: 18px;
}

.integration-provider-kicker {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.field-hint {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.token-input-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 44px;
}

.token-input-row input {
  min-width: 0;
  border-radius: 10px 0 0 10px;
}

.token-check-button {
  border-radius: 0 10px 10px 0;
  padding: 0;
  min-height: 42px;
  font-size: 18px;
}

.integration-status {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
}

.integration-status.success {
  color: #1b7059;
}

.integration-status.error {
  color: #a63f36;
}

.integration-status.checking,
.integration-status.syncing {
  color: var(--muted);
}

.integration-sync-stack {
  display: grid;
  gap: 14px;
}

.integration-table-card.is-disabled {
  opacity: 0.58;
}

.integration-table-card.is-disabled .integration-table-wrap {
  pointer-events: none;
  user-select: none;
}

.integration-disabled-copy {
  margin: 0;
  color: var(--muted);
  font-weight: 700;
}

.integration-table-wrap {
  max-height: 420px;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.integration-table {
  min-width: 1500px;
}

.jira-table {
  min-width: 2800px;
}

.jira-table .jira-wide-field-column {
  width: 300px;
  min-width: 300px;
  max-width: 300px;
}

.jira-table .jira-compact-field-column {
  min-width: 150px;
}

.jira-table .jira-compact-result-column {
  width: 160px;
  min-width: 160px;
}

.jira-table .jira-compact-status-column {
  width: 120px;
  min-width: 120px;
}

.azure-jira-mapping-table {
  min-width: 900px;
}

.azure-jira-mapping-table-wrap {
  max-height: 300px;
}

.transition-flow-actions,
.transition-flow-progress-summary {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.transition-flow-progress {
  display: grid;
  gap: 10px;
  padding-top: 4px;
}

.transition-flow-progress-summary {
  justify-content: space-between;
  color: var(--muted);
  font-size: 13px;
}

.transition-flow-results-table {
  min-width: 840px;
}

.transition-flow-modal {
  width: min(1400px, 100%);
  display: grid;
  gap: 16px;
}

.transition-flow-modal-head {
  align-items: flex-start;
}

.transition-flow-modal-body {
  display: grid;
  grid-template-columns: minmax(300px, 0.8fr) minmax(520px, 1.4fr);
  gap: 20px;
  min-height: 420px;
}

.transition-flow-recorder,
.transition-flow-steps,
.transition-dynamic-form {
  display: grid;
  align-content: start;
  gap: 14px;
}

.transition-flow-recorder {
  padding-right: 20px;
  border-right: 1px solid var(--line);
}

.transition-flow-recorder h4,
.transition-flow-steps h4 {
  margin: 0;
  font-size: 15px;
}

.transition-current-status,
.transition-unsupported-field,
.transition-validation-errors p {
  margin: 0;
  font-size: 13px;
}

.transition-current-status,
.transition-unsupported-field {
  color: var(--muted);
}

.transition-validation-errors {
  display: grid;
  gap: 4px;
  color: #a63f36;
  font-weight: 700;
}

.transition-dynamic-form textarea {
  width: 100%;
  min-height: 96px;
  resize: vertical;
}

.transition-flow-steps .table-wrap {
  max-height: 52vh;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.transition-flow-steps-table {
  min-width: 760px;
}

.transition-flow-steps-table pre {
  max-width: 360px;
  margin: 8px 0 0;
  padding: 8px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  font-size: 11px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.transition-flow-modal-actions {
  gap: 8px;
}

@media (max-width: 900px) {
  .transition-flow-modal-body {
    grid-template-columns: minmax(0, 1fr);
  }

  .transition-flow-recorder {
    padding-right: 0;
    padding-bottom: 18px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
}

.integration-table tfoot td {
  position: sticky;
  bottom: 0;
  z-index: 2;
  background: var(--surface-strong);
}

.integration-table tbody tr.integration-row-is-selected,
.integration-table tbody tr.integration-row-is-selected:hover {
  background: rgba(47, 122, 103, 0.11);
}

.jira-table tbody tr {
  cursor: pointer;
}

.integration-table input.logwork-row-select-checkbox {
  width: 18px;
  min-width: 18px;
  height: 18px;
  accent-color: #2f7a67;
  cursor: pointer;
}

.integration-summary-cell {
  min-width: 300px;
  white-space: normal;
}

.integration-long-cell {
  min-width: 180px;
  white-space: normal;
}

.integration-description-cell {
  min-width: 340px;
  white-space: pre-wrap;
}

.integration-ellipsis-cell {
  max-width: 340px;
  min-width: 260px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.jira-field-input {
  min-width: 150px;
}

.jira-field-textarea {
  min-width: 240px;
  max-width: 340px;
}

.jira-row-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
}

.jira-row-status-spin {
  background: rgba(47, 122, 103, 0.14);
  color: #1b7059;
}

.jira-row-status-spinner {
  width: 12px;
  height: 12px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

.integration-convert-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 12px;
  justify-content: center;
}

.convert-button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.convert-button span {
  font-size: 18px;
}

.jira-sync-actions {
  align-items: flex-end;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.sync-jira-project-field {
  min-width: 240px;
}

.sync-jira-project-field select:disabled {
  opacity: 1;
  color: var(--ink);
  cursor: not-allowed;
}

.sync-jira-project-field select,
.jira-sync-actions > button {
  height: 44px;
  min-height: 44px;
}

.jira-sync-actions > button {
  padding-top: 0;
  padding-bottom: 0;
}

.jira-field-mapping-button {
  width: 44px;
  height: 44px;
  min-width: 44px;
  align-self: flex-end;
  padding: 0;
  border-radius: 8px;
}

.azure-sync-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.integration-filter-summary {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 13px;
}

.integration-filter-summary .mini-pill {
  padding: 5px 9px;
  font-size: 11px;
}

.compact-field {
  min-width: 170px;
}

.sync-action-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 18px;
  line-height: 1;
}

.table-input,
.table-textarea {
  width: 100%;
  min-width: 110px;
  padding: 8px 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-strong);
  color: var(--ink);
  font: inherit;
}

.table-textarea {
  min-width: 260px;
  resize: vertical;
}

.project-key-input {
  max-width: 110px;
}

.issue-type-input {
  max-width: 130px;
}

.row-error {
  display: block;
  max-width: 220px;
  margin-top: 7px;
  color: #a63f36;
  line-height: 1.35;
}

@media (max-width: 900px) {
  .logwork-template-panel,
  .logwork-template-edit-group,
  .logwork-template-create-group {
    align-items: stretch;
    flex-direction: column;
    width: 100%;
  }

  .logwork-template-create-group {
    margin-left: 0;
  }

  .logwork-template-select-field,
  .logwork-template-name-field {
    width: 100%;
  }

  .integration-token-grid {
    grid-template-columns: 1fr;
  }

  .integration-provider-head,
  .integration-table-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .jira-sync-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .azure-sync-actions {
    width: 100%;
    justify-content: flex-start;
  }
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 1220px;
}

th,
td {
  text-align: left;
  padding: 14px 12px;
  border-top: 1px solid var(--line);
  vertical-align: middle;
}

th {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
}

.review-column-header,
.weekday-header-label,
.weekday-header-date {
  display: block;
}

.review-column-header {
  display: inline-grid;
  gap: 4px;
  justify-items: center;
  line-height: 1.25;
}

.review-column-title {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.review-column-subtitle {
  margin-top: 4px;
  font-size: 11px;
  font-weight: 600;
  color: var(--neutral);
  letter-spacing: 0;
  text-transform: none;
}

.review-column-header .review-column-subtitle {
  margin-top: 0;
}

.number-cell {
  width: 56px;
  min-width: 56px;
  text-align: center;
  color: var(--muted);
  font-weight: 700;
}

tbody tr:hover {
  background: rgba(255, 255, 255, 0.55);
}

tbody tr.weekly-row-is-highlighted,
tbody tr.weekly-row-is-highlighted:hover {
  background: rgba(47, 122, 103, 0.14);
}

tbody tr.weekly-row-is-highlighted td:first-child {
  box-shadow: inset 4px 0 0 var(--accent-strong);
}

.user-cell {
  text-align: center;
  display: grid;
  gap: 4px;
}

.inline-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  justify-self: start;
  padding: 7px 12px;
  font-size: 12px;
}

.worklog-manage-table .inline-button {
  min-width: 88px;
}

.pill {
  min-width: 74px;
  padding: 8px 12px;
}

.pill.ok {
  background: rgba(41, 142, 114, 0.14);
  color: #1b7059;
}

.pill.warn {
  background: rgba(180, 106, 56, 0.14);
  color: var(--warn);
}

.pill.pill-missing {
  background: rgba(0, 0, 0, 0.06);
  color: var(--muted);
}

.row-missing-user td {
  color: var(--muted);
  opacity: 0.7;
}

/* ── Warning icon + tooltip ─────────────────────────────────── */
.warn-icon-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.warn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(180, 106, 56, 0.14);
  color: var(--warn);
  font-size: 15px;
  cursor: default;
  line-height: 1;
  transition: background 0.15s;
}

.warn-icon:hover {
  background: rgba(180, 106, 56, 0.26);
}

/* Portal tooltip – rendered into document.body, never clipped by overflow */
.warn-tooltip-portal {
  pointer-events: none;
  background: #2d3748;
  color: #fff;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.5;
  white-space: pre-line;
  padding: 8px 12px;
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.22);
  min-width: 220px;
  max-width: 320px;
  z-index: 9999;
  word-break: break-word;
}

.warn-tooltip-portal::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: #2d3748;
}

.day-cell {
  min-width: 92px;
  position: relative;
  overflow: hidden;
}

.day-cell::before {
  content: "";
  position: absolute;
  inset: 4px;
  border-radius: 12px;
  pointer-events: none;
  z-index: 0;
}

.day-missing::before {
  background: rgba(189, 88, 88, 0.12);
}

.day-over::before {
  background: rgba(189, 88, 88, 0.18);
}

.day-off-fill {
  position: absolute;
  top: 4px;
  right: auto;
  bottom: 4px;
  left: 4px;
  max-width: calc(100% - 8px);
  background: rgba(123, 135, 145, 0.18);
  border-radius: 12px;
  pointer-events: none;
  z-index: 0;
}

.day-value {
  font-weight: 700;
  position: relative;
  z-index: 1;
  text-align: center;
}

.day-note {
  text-align: center;
}

.cell-link {
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  border-radius: 0;
  position: relative;
  z-index: 1;
}

.monthly-week-cell {
  min-width: 152px;
}

.monthly-week-cell-is-highlighted::before {
  background: rgba(47, 122, 103, 0.14);
  box-shadow: inset 0 0 0 2px rgba(47, 122, 103, 0.38);
}

.monthly-week-cell .cell-link {
  min-height: 76px;
  padding: 10px 8px 14px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
}

.monthly-week-cell .day-note {
  margin-top: 0;
}

.monthly-week-cell .day-note.compact {
  line-height: 1.35;
}

.cell-link:hover .day-value {
  text-decoration: underline;
}

.day-note {
  margin-top: 4px;
  font-size: 12px;
  line-height: 1.4;
  color: var(--neutral);
  position: relative;
  z-index: 1;
}

.day-note.compact {
  font-size: 11px;
  line-height: 1.25;
}

.user-cell-actions {
  display: flex;
  justify-self: center;
  /* flex-wrap: wrap; */
  gap: 6px;
  margin-top: 6px;
  align-items: center;
}

.user-cell-actions .muted-inline {
  font-size: 11px;
  color: var(--muted);
}

.primary-button {
  background: var(--accent);
  color: #fff;
  border: 1px solid var(--accent);
  border-radius: 999px;
  padding: 4px 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.primary-button:hover:not(:disabled) {
  background: #266857;
  border-color: #266857;
}

.primary-button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.day-off-confirm-modal {
  width: min(860px, 100%);
  max-width: 860px;
  padding: 18px;
  border-radius: 16px;
}

.day-off-confirm-modal .section-head {
  margin-bottom: 14px;
}

.day-off-confirm-modal .section-head h3 {
  font-size: 24px;
  line-height: 1.15;
}

.day-off-confirm-modal .section-head p {
  margin-top: 4px;
  font-size: 14px;
  line-height: 1.4;
}

.day-off-confirm-list {
  display: grid;
  gap: 10px;
  max-height: min(58vh, 520px);
  overflow: auto;
  padding-right: 4px;
}

.day-off-confirm-record {
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}

.day-off-confirm-record-head,
.day-off-confirm-columns,
.day-off-confirm-row {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) minmax(220px, 1.4fr) 94px 108px;
  gap: 12px;
  align-items: center;
  padding: 8px 12px;
}

.day-off-confirm-record-head {
  grid-template-columns: 1fr auto;
  background: rgba(47, 122, 103, 0.06);
}

.day-off-confirm-record-head div {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.day-off-confirm-record-head strong {
  font-size: 16px;
}

.day-off-confirm-record-head span,
.day-off-confirm-day span {
  color: var(--muted);
  font-size: 11px;
}

.day-off-confirm-columns {
  background: var(--surface);
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
}

.day-off-confirm-day {
  display: grid;
  gap: 1px;
}

.day-off-confirm-day strong {
  font-size: 15px;
}

.day-off-confirm-columns + .day-off-confirm-row,
.day-off-confirm-row + .day-off-confirm-row {
  border-top: 1px solid rgba(24, 50, 43, 0.12);
}

.day-off-choice-group {
  display: inline-flex;
  gap: 6px;
  flex-wrap: wrap;
  width: fit-content;
}

.day-off-choice-group.requires-choice {
  padding: 4px;
  border: 1px solid rgba(180, 106, 56, 0.35);
  border-radius: 8px;
  background: rgba(180, 106, 56, 0.08);
}

.day-off-choice {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 4px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  background: #fff;
}

.day-off-choice input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.day-off-choice.selected {
  border-color: var(--accent);
  background: rgba(47, 122, 103, 0.08);
}

.day-off-hours-field {
  display: grid;
  gap: 3px;
}

.day-off-hours-field.placeholder {
  visibility: hidden;
  pointer-events: none;
}

.day-off-hours-field input {
  width: 74px;
  min-height: 30px;
  padding: 4px 8px;
  border: 1.5px solid rgba(24, 50, 43, 0.28);
  border-radius: 6px;
  background: #fff;
  box-shadow: inset 0 1px 2px rgba(24, 50, 43, 0.06);
  font: inherit;
  font-weight: 700;
}

.day-off-hours-field input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(47, 122, 103, 0.14);
  outline: none;
}

.day-off-confirm-status {
  grid-column: 4;
  justify-self: start;
  width: fit-content;
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
}

.day-off-confirm-status.warning {
  color: var(--warn);
  background: rgba(180, 106, 56, 0.12);
}

.day-off-confirm-status.ok {
  color: var(--accent);
  background: rgba(47, 122, 103, 0.12);
}

.day-off-missing-warning {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 14px;
  padding: 12px;
  border: 1px solid rgba(180, 106, 56, 0.24);
  border-radius: 10px;
  background: rgba(180, 106, 56, 0.08);
}

.day-off-missing-warning strong {
  display: block;
  color: var(--warn);
  font-size: 14px;
}

.day-off-missing-warning p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.day-off-warning-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-shrink: 0;
}

.day-off-confirm-modal .modal-actions {
  gap: 8px;
  margin-top: 14px;
}

.day-off-confirm-modal .modal-actions button,
.day-off-warning-actions button {
  min-height: 40px;
  padding: 0 16px;
  border-radius: 10px;
}

@media (max-width: 760px) {
  .day-off-confirm-record-head,
  .day-off-confirm-columns,
  .day-off-confirm-row {
    grid-template-columns: 1fr;
  }

  .day-off-confirm-columns {
    display: none;
  }

  .day-off-confirm-status {
    grid-column: auto;
  }

  .day-off-missing-warning,
  .day-off-warning-actions {
    align-items: stretch;
    flex-direction: column;
  }
}

.account-login-card {
  padding: 28px;
}

.account-login-form {
  display: grid;
  grid-template-columns: minmax(220px, 320px);
  gap: 14px;
  margin-top: 16px;
}

.account-login-form .control-field {
  margin-bottom: 0;
}

.account-login-form input[type="text"],
.account-login-form input[type="password"] {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  font-size: 14px;
}

.account-login-form .modal-actions {
  margin-top: 4px;
}

.error-text {
  color: var(--warn);
}

.account-header-card .section-head {
  align-items: center;
}

.team-select {
  min-width: 140px;
}

.action-group {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

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

.audit-item {
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid var(--line);
}

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

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

.modal-card {
  width: min(1080px, 100%);
  max-height: calc(100vh - 48px);
  overflow: auto;
  padding: 22px;
  border-radius: 24px;
  background: var(--surface-strong);
  box-shadow: var(--shadow);
}

.azure-jira-field-mapping-modal {
  width: min(760px, 100%);
}

.azure-sync-field-modal {
  width: min(920px, 100%);
}

.azure-sync-field-modal-head {
  align-items: flex-end;
}

.azure-sync-field-table-wrap {
  max-height: min(520px, 60vh);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.azure-sync-field-table {
  width: 100%;
  min-width: 720px;
}

.azure-sync-field-table th:last-child,
.azure-sync-field-table td:last-child {
  width: 120px;
}

.azure-sync-field-table input {
  width: 100%;
  min-width: 220px;
}

.azure-sync-field-remove {
  width: 100%;
}

.azure-sync-field-modal-actions {
  gap: 8px;
  padding-top: 22px;
}

.azure-field-config-button {
  flex: 0 0 44px;
}

.azure-jira-field-mapping-table-wrap {
  max-height: min(520px, 60vh);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.azure-jira-field-mapping-table {
  width: 100%;
  min-width: 560px;
}

.azure-jira-field-mapping-table th:first-child,
.azure-jira-field-mapping-table td:first-child {
  width: 52%;
}

.azure-jira-field-mapping-table select {
  width: 100%;
  min-width: 220px;
}

.azure-jira-field-mapping-table td strong,
.azure-jira-field-mapping-table td small {
  display: block;
}

.azure-jira-field-mapping-table td small {
  margin-top: 4px;
  color: var(--muted);
}

.modal-card:has(> .review-account-card) {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.review-modal-grid {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}

.review-modal-scroll {
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-height: 0;
  overflow-y: auto;
  padding-right: 6px;
}

.review-record-footer {
  flex: 0 0 auto;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  background: var(--surface-strong);
}

.review-image-panel,
.review-edit-panel {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.review-edit-panel {
  justify-content: space-between;
}

.review-image {
  width: 100%;
  height: 500px;
  object-fit: contain;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: #f3f6f4;
}

.review-image-clickable {
  cursor: zoom-in;
  transition: opacity 0.15s;
}

.review-image-clickable:hover {
  opacity: 0.88;
}

.review-image-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 14px;
  object-fit: unset;
}

.review-hours-grid {
  display: flex;
  gap: 6px;
  align-self: center;
  flex: 1;
  min-height: 0;
}

.day-hour-card {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 10px 6px 8px;
  background: var(--surface-strong);
  border: 1px solid var(--line);
  border-radius: 14px;
  min-width: 0;
  min-height: 0;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.day-hour-card:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.day-hour-card.day-off-card {
  opacity: 0.55;
}

.day-hour-label {
  font-size: 10px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.day-hour-bar-track {
  width: 100%;
  flex: 1;
  min-height: 40px;
  background: var(--accent-soft);
  border-radius: 6px;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
}

.day-hour-bar-fill {
  width: 100%;
  background: var(--accent);
  border-radius: 4px 4px 0 0;
  transition: height 0.25s ease;
  min-height: 0;
}

.day-off-card .day-hour-bar-fill {
  background: var(--neutral);
}

.day-hour-input-row {
  display: flex;
  align-items: baseline;
  gap: 2px;
}

.day-hour-input-row input {
  width: 40px;
  text-align: center;
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  padding: 3px 2px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: transparent;
  appearance: textfield;
  -moz-appearance: textfield;
}

.day-hour-input-row input::-webkit-outer-spin-button,
.day-hour-input-row input::-webkit-inner-spin-button {
  -webkit-appearance: none;
}

.review-account-card {
  margin-bottom: 18px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
}

.review-account-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.review-account-details {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 10px 16px;
  margin: 0;
}

.review-account-detail {
  min-width: 0;
}

.review-account-detail dt {
  margin-bottom: 3px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.review-account-detail dd {
  margin: 0;
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
  overflow-wrap: anywhere;
  white-space: nowrap;
}

.day-hour-unit {
  font-size: 10px;
  color: var(--muted);
  font-weight: 600;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
}

.delete-confirm-modal {
  width: min(400px, 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 36px 32px 28px;
  gap: 0;
}

.delete-confirm-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(162, 48, 48, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #b53a3a;
  margin-bottom: 18px;
}

.create-subtask-confirm-icon {
  background: rgba(47, 122, 103, 0.12);
  color: #2f7a67;
  font-size: 34px;
  font-weight: 500;
  line-height: 1;
}

.delete-confirm-title {
  font-size: 18px;
  font-weight: 700;
  margin: 0 0 10px;
  color: var(--text);
}

.delete-confirm-body {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
  margin: 0 0 28px;
}

.delete-confirm-body strong {
  color: var(--text);
  font-weight: 600;
}

.delete-confirm-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  width: 100%;
}

.settings-project-delete-impact-modal {
  width: min(520px, 100%);
}

.settings-project-impact-list {
  width: 100%;
  display: grid;
  gap: 8px;
  margin: 0 0 20px;
}

.settings-project-impact-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 9px 12px;
  border: 1px solid rgba(24, 50, 43, 0.1);
  border-radius: 8px;
  background: rgba(24, 50, 43, 0.04);
  color: var(--muted);
  font-size: 13px;
}

.settings-project-impact-row strong {
  min-width: 42px;
  color: var(--ink);
  text-align: right;
}

.fill-overlay {
  position: fixed;
  inset: 0;
  background: rgba(24, 50, 43, 0.45);
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 24px;
  cursor: wait;
}

body:has(.fill-overlay) #luckysheet-info-detail,
body:has(.fill-overlay) .luckysheet-info,
body:has(.fill-overlay) .luckysheet-modal-dialog-mask {
  display: none !important;
}

.fill-overlay__card {
  background: var(--surface-strong);
  border-radius: 18px;
  padding: 28px 32px;
  width: min(360px, 100%);
  box-shadow: var(--shadow);
  text-align: center;
}

.fill-overlay__spinner {
  width: 36px;
  height: 36px;
  margin: 0 auto 16px;
  border-radius: 50%;
  border: 3px solid rgba(41, 142, 114, 0.2);
  border-top-color: #1b7059;
  animation: fill-spin 0.9s linear infinite;
}

@keyframes fill-spin {
  to { transform: rotate(360deg); }
}

.fill-overlay__title {
  margin: 0 0 10px;
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
}

.fill-overlay__cell {
  margin: 0 0 14px;
  font-size: 13px;
  color: var(--muted);
}

.fill-overlay__bar {
  width: 100%;
  height: 6px;
  background: rgba(0, 0, 0, 0.08);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 8px;
}

.fill-overlay__bar-fill {
  height: 100%;
  background: #1b7059;
  transition: width 80ms linear;
}

.fill-overlay__count {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
}

.fill-done-modal {
  width: min(360px, 100%);
  text-align: center;
  padding: 32px 28px;
}

.fill-done-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(41, 142, 114, 0.14);
  color: #1b7059;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
}

.fill-done-title {
  margin: 0 0 8px;
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
}

.fill-done-body {
  margin: 0 0 22px;
  font-size: 14px;
  color: var(--muted);
}

.fill-done-actions {
  display: flex;
  justify-content: center;
}

.danger-button {
  background: rgba(162, 48, 48, 0.12);
  color: #8f1f1f;
  border: 1px solid rgba(162, 48, 48, 0.24);
}

.danger-button:hover {
  background: rgba(162, 48, 48, 0.18);
}

.empty {
  text-align: center;
  color: var(--muted);
  padding: 34px 12px;
}

/* Upload action buttons column */
.upload-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.upload-actions button {
  width: 100%;
}

/* Screenshot capture button */
.screenshot-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, #3a6b9f, #5889bf);
  color: white;
  border: none;
  border-radius: 999px;
  padding: 14px 22px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: background 0.2s, box-shadow 0.2s, transform 0.15s;
}

.screenshot-button:hover:not(:disabled) {
  background: linear-gradient(135deg, #2f5a8a, #4a7bb0);
  box-shadow: 0 6px 20px rgba(58, 107, 159, 0.28);
  transform: translateY(-1px);
}

.screenshot-button:active:not(:disabled) {
  transform: translateY(0);
}

.screenshot-button:disabled {
  opacity: 0.7;
  cursor: progress;
}

.capture-icon {
  flex-shrink: 0;
}

.capture-spinner {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  flex-shrink: 0;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Screenshot preview modal */
.screenshot-preview-modal {
  width: min(900px, 100%);
}

.screenshot-preview-body {
  margin: 14px 0;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #f3f6f4;
  max-height: calc(100vh - 240px);
  overflow-y: auto;
}

.screenshot-preview-img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
}

.screenshot-preview-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  padding-top: 8px;
}

.screenshot-preview-actions .secondary-button {
  padding: 12px 20px;
  font-size: 15px;
  font-weight: 700;
}

/* Upload cleanup confirm modal */
.cleanup-confirm-modal {
  width: min(560px, 100%);
}

.cleanup-file-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 320px;
  overflow-y: auto;
  margin: 4px 0 16px;
  padding: 4px 0;
}

.cleanup-file-item {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 12px;
  border-radius: 10px;
  background: rgba(162, 48, 48, 0.06);
  border: 1px solid rgba(162, 48, 48, 0.14);
}

.cleanup-file-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  word-break: break-all;
}

.cleanup-file-meta {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
  flex-shrink: 0;
}

/* Image lightbox */
.lightbox-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.82);
  z-index: 30;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 18px;
}

.lightbox-toolbar {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  min-height: 44px;
}

.lightbox-close-button {
  border: 0;
  border-radius: 999px;
  padding: 9px 14px;
  color: var(--ink);
  background: #eef3f0;
  font-weight: 900;
}

.lightbox-close-button {
  background: white;
}

.lightbox-stage {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.08);
}

.lightbox-img {
  display: block;
  max-width: none;
  max-height: none;
  height: auto;
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.5);
  cursor: zoom-in;
  transform-origin: top left;
}

.page-mascot-dock {
  position: fixed;
  left: clamp(14px, 2vw, 28px);
  top: clamp(14px, 2vw, 28px);
  z-index: 30;
  filter: drop-shadow(0 18px 28px rgba(15, 23, 42, 0.2));
}

.page-mascot-dock-right {
  position: fixed;
  right: clamp(14px, 2vw, 28px);
  top: clamp(14px, 2vw, 28px);
  z-index: 30;
  filter: drop-shadow(0 18px 28px rgba(15, 23, 42, 0.2));
}

.page-mascot {
  transition: transform 0.16s ease, filter 0.16s ease;
}

.page-mascot:hover {
  transform: translateY(-2px);
  filter: brightness(1.04);
}

@media (max-width: 760px), (pointer: coarse) {
  .page-mascot-dock {
    display: none;
  }
  .page-mascot-dock-right {
    display: none;
  }
}

.screenshot-preview-actions button:not(.secondary-button) {
  padding: 12px 20px;
  font-size: 15px;
}

/* User status badges */
.badge-enabled {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 99px;
  font-size: 12px;
  font-weight: 600;
  background: rgba(34, 197, 94, 0.12);
  color: #16a34a;
  border: 1px solid rgba(34, 197, 94, 0.25);
  white-space: nowrap;
}

.badge-disabled {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 99px;
  font-size: 12px;
  font-weight: 600;
  background: rgba(156, 163, 175, 0.15);
  color: #6b7280;
  border: 1px solid rgba(156, 163, 175, 0.3);
  white-space: nowrap;
}

/* Project tag badges */
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.project-tag-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  background: var(--accent-light, rgba(99, 102, 241, 0.12));
  color: var(--accent, #6366f1);
  border-radius: 99px;
  font-size: 13px;
  font-weight: 600;
  border: 1px solid var(--accent-light, rgba(99, 102, 241, 0.2));
  white-space: nowrap;
}

.project-tag-badge.small {
  font-size: 11px;
  padding: 2px 7px;
}

.tag-delete-btn {
  background: none;
  border: none;
  padding: 0 0 0 2px;
  margin: 0;
  cursor: pointer;
  font-size: 15px;
  line-height: 1;
  color: inherit;
  opacity: 0.6;
  transition: opacity 0.15s;
}

.tag-delete-btn:hover {
  opacity: 1;
}

/* User tags cell in account users table */
.user-tags-cell {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 140px;
}

.tag-multiselect {
  font-size: 12px;
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 6px;
  padding: 2px 4px;
  background: var(--surface, #fff);
  color: var(--ink);
  width: 100%;
}

@media (max-width: 900px) {
  .page-shell {
    width: min(100% - 20px, 1380px);
    margin-top: 20px;
  }

  .hero-card {
    padding: 22px;
    flex-direction: column;
    align-items: stretch;
  }

  .hero-stats {
    width: 100%;
  }

  .stat {
    flex: 1;
  }

  .upload-card,
  .control-card,
  .team-section,
  .table-card {
    padding: 18px;
  }

  .team-create {
    width: 100%;
  }

  .review-hours-grid {
    flex-wrap: wrap;
  }

  .day-hour-card {
    min-width: 60px;
  }
}

.sheet-template-editor {
  margin-top: 16px;
}

.univer-container {
  position: relative;
  display: block;
  width: 100%;
  min-width: 600px;
  margin-top: 12px;
  border: 1px solid #d0d7de;
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
  box-sizing: border-box;
}

.univer-container__inner {
  position: relative;
  display: block;
  width: 100%;
  height: 600px;
  box-sizing: content-box;
  background: #fff;
  overflow: hidden;
}

/* Reset global box-sizing + element styles inside Luckysheet container so
   Luckysheet's CSS (which assumes content-box and unstyled buttons/tables)
   is not broken by app-wide rules. */
#sheet-template-luckysheet,
#sheet-template-luckysheet *,
#sheet-template-luckysheet *::before,
#sheet-template-luckysheet *::after {
  box-sizing: content-box;
}

#sheet-template-luckysheet {
  margin: 0;
  padding: 0;
  font-family: Arial, "Microsoft YaHei", sans-serif;
  font-size: 11px;
  line-height: normal;
  color: #000;
}

#sheet-template-luckysheet button {
  background: none;
  border: 0;
  color: inherit;
  font: inherit;
  padding: 0;
  margin: 0;
  cursor: default;
  border-radius: 0;
  box-shadow: none;
  text-transform: none;
  letter-spacing: normal;
  line-height: normal;
}

#sheet-template-luckysheet input,
#sheet-template-luckysheet select,
#sheet-template-luckysheet textarea {
  background: transparent;
  border: 0;
  color: inherit;
  font: inherit;
  padding: 0;
  margin: 0;
  box-shadow: none;
  outline: none;
}

#sheet-template-luckysheet table {
  border-collapse: separate;
  border-spacing: 0;
  width: auto !important;
  min-width: 0 !important;
  max-width: none !important;
  table-layout: auto;
}

#sheet-template-luckysheet td,
#sheet-template-luckysheet th {
  padding: 0;
  border: 0;
  text-align: inherit;
  font-weight: inherit;
  font-size: inherit;
  text-transform: none;
  letter-spacing: normal;
  background: transparent;
  vertical-align: middle;
}

#sheet-template-luckysheet img,
#sheet-template-luckysheet svg {
  max-width: none;
  vertical-align: baseline;
}

#sheet-template-luckysheet canvas {
  display: block;
  max-width: none;
  vertical-align: top;
}

#sheet-template-luckysheet .luckysheet-rows-h-selected,
#sheet-template-luckysheet .luckysheet-rows-h-selected:hover {
  margin-top: -4px;
}

/* Luckysheet appends dropdowns/menus to body — keep them unaffected too. */
.luckysheet-cols-menu,
.luckysheet-cols-menu *,
.luckysheet-modal-dialog,
.luckysheet-modal-dialog *,
.luckysheet-formula-search-c,
.luckysheet-formula-search-c *,
.luckysheet-stat-area,
.luckysheet-stat-area * {
  box-sizing: content-box;
}

.link-button {
  background: none;
  border: none;
  color: #2563eb;
  cursor: pointer;
  padding: 0;
  font: inherit;
}

.link-button:hover { text-decoration: underline; }

.link-button.danger { color: #b91c1c; }

.sheet-template-list {
  list-style: none;
  margin: 16px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
}

.sheet-template-card {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px;
  border: 1px solid #e1e6ed;
  border-radius: 10px;
  background: #fff;
  transition: border-color 120ms ease, box-shadow 120ms ease, transform 120ms ease;
}

.sheet-template-card:hover {
  border-color: #b8c2cf;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.06);
  transform: translateY(-1px);
}

.sheet-template-card.active {
  border-color: #2563eb;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.18);
}

.sheet-template-card__icon {
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: #eef2ff;
  color: #4f46e5;
}

.sheet-template-card__body {
  flex: 1 1 auto;
  min-width: 0;
}

.sheet-template-card__name {
  font-weight: 600;
  font-size: 15px;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sheet-template-card__meta {
  margin-top: 4px;
  font-size: 12px;
  color: #64748b;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
}

.sheet-template-card__actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: stretch;
  flex: 0 0 auto;
}

.chip-button {
  appearance: none;
  border: 1px solid #d0d7de;
  background: #fff;
  color: #334155;
  font-size: 12px;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 120ms ease, color 120ms ease, border-color 120ms ease;
}

.chip-button:hover { background: #f1f5f9; }
.chip-button:disabled { opacity: 0.5; cursor: not-allowed; }

.chip-button--primary {
  border-color: #2563eb;
  color: #2563eb;
}
.chip-button--primary:hover { background: #2563eb; color: #fff; }

.chip-button--danger {
  border-color: #fecaca;
  color: #b91c1c;
}
.chip-button--danger:hover { background: #b91c1c; color: #fff; border-color: #b91c1c; }

.sheet-template-confirm {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid #bbf7d0;
  border-radius: 8px;
  background: #f0fdf4;
  color: #166534;
  font-weight: 600;
  cursor: pointer;
  user-select: none;
}

.sheet-template-confirm input {
  width: 18px;
  height: 18px;
  accent-color: #16a34a;
  cursor: pointer;
}

.sheet-template-confirm input:disabled {
  cursor: not-allowed;
}

.sheet-template-confirm:has(input:disabled) {
  cursor: default;
}

.sheet-template-empty {
  margin-top: 16px;
  padding: 32px 16px;
  text-align: center;
  border: 1px dashed #cbd5e1;
  border-radius: 10px;
  background: #f8fafc;
  color: #475569;
}

.sheet-template-empty__icon {
  color: #94a3b8;
  margin-bottom: 8px;
  display: flex;
  justify-content: center;
}

.sheet-template-empty p { margin: 0; }

.fill-modal-backdrop {
  backdrop-filter: blur(4px);
  background: rgba(15, 23, 42, 0.55);
}

.fill-modal {
  width: min(440px, 92vw);
  padding: 0;
  border-radius: 14px;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.25);
  overflow: hidden;
  background: #ffffff;
}

.fill-modal__header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 20px 22px 14px;
  border-bottom: 1px solid #eef2f7;
  background: linear-gradient(135deg, #f8fbff 0%, #eef4ff 100%);
}

.fill-modal__icon {
  flex: 0 0 40px;
  height: 40px;
  border-radius: 10px;
  background: #2563eb;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 14px rgba(37, 99, 235, 0.3);
}

.fill-modal__titles h3 {
  margin: 0 0 4px;
  font-size: 17px;
  font-weight: 600;
  color: #0f172a;
}

.fill-modal__titles p {
  margin: 0;
  font-size: 13px;
  color: #64748b;
  line-height: 1.45;
}

.fill-modal__body {
  padding: 18px 22px 6px;
}

.fill-modal__field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.fill-modal__label {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #475569;
}

.fill-modal__select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #cbd5f5;
  border-radius: 8px;
  background: #ffffff;
  font-size: 14px;
  color: #0f172a;
  appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path fill='none' stroke='%2364748b' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round' d='M1 1l5 5 5-5'/></svg>");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.fill-modal__select:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.fill-modal__actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 16px 22px 20px;
}

.fill-modal__btn {
  border: none;
  padding: 9px 18px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.05s ease, box-shadow 0.15s ease;
}

.fill-modal__btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.fill-modal__btn--ghost {
  background: #f1f5f9;
  color: #334155;
}

.fill-modal__btn--ghost:hover:not(:disabled) {
  background: #e2e8f0;
}

.fill-modal__btn--primary {
  background: #2563eb;
  color: #fff;
  box-shadow: 0 6px 14px rgba(37, 99, 235, 0.25);
}

.fill-modal__btn--primary:hover:not(:disabled) {
  background: #1d4ed8;
}

.fill-modal__btn--primary:active:not(:disabled) {
  transform: translateY(1px);
}

input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not(#sheet-template-luckysheet *),
select:not(#sheet-template-luckysheet *) {
  box-sizing: border-box;
  height: 44px;
  min-height: 44px;
  padding-top: 0;
  padding-bottom: 0;
  line-height: 42px;
  vertical-align: middle;
}

button:not(#sheet-template-luckysheet *) {
  box-sizing: border-box;
  height: 44px;
  min-height: 44px;
  padding-top: 0;
  padding-bottom: 0;
  line-height: 1.2;
  vertical-align: middle;
}
