.tk-root {
  --tk-bg: #f4f6f2;
  --tk-surface: #fff;
  --tk-line: #d9dfd2;
  --tk-text: #18211d;
  --tk-muted: #667066;
  --tk-primary: #176b55;
  --tk-primary-dark: #0f4f3e;
  --tk-warn: #b75f22;
  --tk-soft: #e7eee6;
  color: var(--tk-text);
  font-family: -apple-system, BlinkMacSystemFont, "Noto Sans JP", "Segoe UI", sans-serif;
}

.tk-root * {
  box-sizing: border-box;
}

.tk-root button,
.tk-root input,
.tk-root select {
  font: inherit;
}

.tk-root button {
  border: 0;
  cursor: pointer;
}

.tk-loading,
.tk-login {
  min-height: 70vh;
  display: grid;
  grid-template-columns: repeat(2, minmax(320px, 460px));
  justify-content: center;
  align-items: start;
  gap: 20px;
  padding: 24px;
  background: var(--tk-bg);
}

.tk-card {
  background: var(--tk-surface);
  border: 1px solid var(--tk-line);
  border-radius: 8px;
  box-shadow: 0 18px 45px rgba(31, 42, 35, 0.08);
  padding: 20px;
}

.tk-login-card {
  width: min(460px, 100%);
  display: grid;
  gap: 14px;
}

.tk-login-card h1,
.tk-top h1,
.tk-card h2,
.tk-work h2 {
  margin: 0;
}

.tk-login-card p,
.tk-profile p,
.tk-work p,
.tk-request p {
  margin: 0;
  color: var(--tk-muted);
}

.tk-login-card label,
.tk-form {
  display: grid;
  gap: 10px;
}

.tk-login-card input,
.tk-login-card select,
.tk-form input,
.tk-form select {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--tk-line);
  border-radius: 8px;
  padding: 0 12px;
  background: #fbfcfa;
}

.tk-primary,
.tk-secondary,
.tk-ghost {
  min-height: 40px;
  padding: 0 16px;
  border-radius: 8px;
  font-weight: 800;
}

.tk-primary:disabled,
.tk-secondary:disabled,
.tk-ghost:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

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

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

.tk-ghost {
  width: 100%;
  margin-top: 12px;
  color: #16211b;
  background: #f0c66b;
}

.tk-message {
  min-height: 24px;
  color: var(--tk-warn) !important;
  font-weight: 800;
}

.tk-help {
  color: var(--tk-muted);
  font-size: 0.9rem;
  line-height: 1.6;
}

.tk-shell {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  min-height: 78vh;
  background: var(--tk-bg);
}

.tk-sidebar {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 24px;
  color: #fff;
  background: #1c2822;
}

.tk-brand {
  display: flex;
  gap: 12px;
  align-items: center;
}

.tk-brand strong,
.tk-brand span,
.tk-profile strong {
  display: block;
}

.tk-brand span {
  color: rgba(255, 255, 255, 0.72);
}

.tk-mark {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: #16211b;
  background: #f0c66b;
  font-weight: 900;
}

.tk-nav {
  display: grid;
  gap: 10px;
}

.tk-nav button {
  padding: 13px 14px;
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.78);
  background: rgba(255, 255, 255, 0.08);
  text-align: left;
}

.tk-nav button.active {
  color: #16211b;
  background: #f0c66b;
  font-weight: 800;
}

.tk-profile {
  margin-top: auto;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 8px;
}

.tk-label,
.tk-card-head span {
  color: var(--tk-muted);
  font-size: 0.84rem;
  font-weight: 800;
}

.tk-profile .tk-label {
  color: rgba(255, 255, 255, 0.58);
}

.tk-main {
  padding: 28px;
}

.tk-top,
.tk-work,
.tk-card-head,
.tk-request {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.tk-view {
  display: grid;
  gap: 18px;
  margin-top: 22px;
}

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

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

.tk-grid-three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.tk-stat {
  background: #f7f8f4;
}

.tk-stat.accent {
  background: #eef7f2;
}

.tk-stat strong,
.tk-stat span {
  display: block;
}

.tk-stat strong {
  font-size: 1.7rem;
}

.tk-stat span {
  color: var(--tk-muted);
}

.tk-table-wrap {
  width: 100%;
  overflow-x: auto;
  margin-top: 14px;
}

.tk-root table {
  width: 100%;
  min-width: 700px;
  border-collapse: collapse;
}

.tk-root th,
.tk-root td {
  padding: 12px 10px;
  border-bottom: 1px solid var(--tk-line);
  text-align: left;
}

.tk-root th {
  color: var(--tk-muted);
  font-size: 0.85rem;
}

.tk-badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  color: var(--tk-primary-dark);
  background: var(--tk-soft);
  font-weight: 800;
  white-space: nowrap;
}

.tk-badge.warn {
  color: var(--tk-warn);
  background: #fff0e4;
}

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

.tk-request {
  padding: 14px;
  border: 1px solid var(--tk-line);
  border-radius: 8px;
  background: #fbfcfa;
}

.tk-empty {
  padding: 14px;
  color: var(--tk-muted);
  background: #fbfcfa;
  border-radius: 8px;
}

.tk-account-form,
.tk-office-form {
  margin-top: 14px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.tk-account-edit-list {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.tk-account-edit-row {
  display: grid;
  grid-template-columns: 1.1fr 1fr 1fr 0.9fr 1.25fr 0.9fr 0.8fr auto;
  gap: 8px;
  align-items: end;
  padding: 12px;
  border: 1px solid var(--tk-line);
  border-radius: 8px;
  background: #fbfcfa;
}

.tk-account-edit-row label {
  display: grid;
  gap: 5px;
  color: var(--tk-muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.tk-account-edit-row input,
.tk-account-edit-row select {
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--tk-line);
  border-radius: 8px;
  padding: 0 10px;
  background: #fff;
  color: var(--tk-text);
  font-weight: 500;
}

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

.tk-office-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 0.7fr);
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--tk-line);
  border-radius: 8px;
  background: #fbfcfa;
}

.tk-office-row strong,
.tk-office-row span {
  display: block;
}

.tk-office-row span {
  color: var(--tk-muted);
  font-size: 0.88rem;
}

.tk-office-row div:last-child {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 110px auto;
  gap: 8px;
}

.tk-office-row input,
.tk-office-row select {
  min-height: 38px;
  border: 1px solid var(--tk-line);
  border-radius: 8px;
  padding: 0 10px;
  background: #fff;
  color: var(--tk-text);
}

.tk-link {
  padding: 0;
  color: var(--tk-primary-dark);
  background: transparent;
  font-weight: 800;
}

.tk-bars {
  display: grid;
  gap: 14px;
  margin-top: 16px;
}

.tk-bar-row {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr) 56px;
  align-items: center;
  gap: 12px;
}

.tk-bar-row div {
  height: 14px;
  overflow: hidden;
  border-radius: 999px;
  background: #e6ebe3;
}

.tk-bar-row span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--tk-primary), #2b5f8a);
}

.tk-bar-row em {
  color: var(--tk-muted);
  font-style: normal;
}

@media (max-width: 900px) {
  .tk-shell {
    grid-template-columns: 1fr;
  }

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

  .tk-sidebar {
    padding: 18px;
  }

  .tk-nav {
    grid-template-columns: repeat(3, 1fr);
  }

  .tk-nav button {
    text-align: center;
  }

  .tk-profile {
    margin-top: 0;
  }

  .tk-main {
    padding: 20px;
  }

  .tk-grid,
  .tk-grid-three,
  .tk-account-form,
  .tk-office-form,
  .tk-account-edit-row,
  .tk-office-row,
  .tk-office-row div:last-child {
    grid-template-columns: 1fr;
  }

  .tk-top,
  .tk-work,
  .tk-card-head,
  .tk-request {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 560px) {
  .tk-nav,
  .tk-bar-row {
    grid-template-columns: 1fr;
  }
}
