* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Outfit", "Noto Sans JP", "Noto Sans", "Vazirmatn", sans-serif;
  background: #f4f1ec;
  color: #1f1f1f;
}

header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 2rem;
  background: #1f2a2e;
  color: #f9f4ef;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  font-size: 20pt;
  text-transform: none;
}

.brand-mark {
  width: 75px;
  display: block;
}

nav a {
  color: #f9f4ef;
  text-decoration: none;
  margin-left: 1rem;
  font-weight: 600;
  padding: 0.35rem 0.5rem;
  border-radius: 6px;
  transition:
    background 0.2s ease,
    color 0.2s ease;
}

nav a:hover {
  background: rgba(249, 244, 239, 0.18);
  color: #ffffff;
}

nav a.is-active {
  background: #f4d03f;
  color: #1f2a2e;
}

main {
  padding: 2rem;
}

h1,
h2 {
  margin-top: 0;
}

h1 {
  font-size: 1.6rem;
  font-weight: 700;
}

.grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  margin-bottom: 2rem;
}

.card {
  background: #ffffff;
  padding: 1.5rem;
  border-radius: 12px;
  box-shadow: 0 12px 24px rgba(31, 42, 46, 0.08);
}

.page-header {
  margin-bottom: 1.5rem;
}

.page-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.page-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.page-actions button {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.page-actions svg {
  width: 16px;
  height: 16px;
}

label {
  display: block;
  margin-bottom: 1rem;
  font-weight: 600;
}

input,
select {
  width: 100%;
  padding: 0.6rem 0.75rem;
  margin-top: 0.4rem;
  border-radius: 8px;
  border: 1px solid #c4c4c4;
  font-size: 1rem;
  background: #ffffff;
  color: #1f2a2e;
}

button,
.button-link {
  background: #1f2a2e;
  color: #ffffff;
  border: none;
  padding: 0.6rem 1.2rem;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 400;
  font-size: 1rem;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

button.danger {
  background: #a83a32;
}

.actions-row {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.actions {
  display: flex;
  gap: 0.5rem;
  align-items: stretch;
  justify-content: flex-end;
  vertical-align: bottom;
}

.row-actions {
  position: relative;
  display: inline-flex;
  align-items: center;
  margin: 0 auto;
  width: max-content;
}

.actions-toggle {
  width: 32px;
  height: 32px;
  padding: 0;
  border: none;
  border-radius: 6px;
  background: transparent;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  color: #6b7280;
}

.actions-toggle:hover {
  background: #f3f4f6;
}

.actions-toggle:hover .actions-dot {
  background: #111827;
}

.actions-toggle.is-open {
  background: #e5e7eb;
}

.actions-toggle.is-open .actions-dot {
  background: #111827;
  transform: scale(1.1);
}

.actions-dot {
  width: 4px;
  height: 4px;
  border-radius: 999px;
  background: #9ca3af;
  display: block;
}

.actions-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 0.5rem);
  min-width: 160px;
  display: none;
  flex-direction: column;
  gap: 0.25rem;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 0.4rem;
  box-shadow:
    0 10px 15px -3px rgba(15, 23, 42, 0.1),
    0 4px 6px -4px rgba(15, 23, 42, 0.1);
  z-index: 10;
}

.actions-menu.is-open {
  display: flex;
}

.actions-menu .button-link,
.actions-menu button {
  width: 100%;
  background: transparent;
  color: #111827;
  border: none;
  padding: 0.45rem 0.75rem;
  border-radius: 6px;
  text-align: left;
  font-size: inherit;
  line-height: inherit;
}

.actions-menu .button-link:hover,
.actions-menu button:hover {
  background: #f3f4f6;
}

.actions-menu button.danger {
  color: #b91c1c;
}

.actions-menu button.danger:hover {
  background: #fee2e2;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  text-align: left;
  padding: 0.75rem;
  border-bottom: 1px solid #e2e2e2;
}

.bulk-actions,
.bulk-select {
  text-align: center;
  width: 1%;
}

.bulk-actions {
  padding: 0.5rem;
}

.employee-select {
  width: 18px;
  height: 18px;
  accent-color: #1f2a2e;
  cursor: pointer;
}

.bulk-delete-button {
  background: transparent;
  border: none;
  color: #b91c1c;
  padding: 0.2rem;
  border-radius: 6px;
  cursor: pointer;
}

.bulk-delete-button:hover {
  background: #fee2e2;
}

.bulk-delete-button svg {
  width: 20px;
  height: 20px;
  display: block;
}

.icon {
  width: 18px;
  height: 18px;
  display: block;
}

.notice {
  padding: 0.75rem 1rem;
  background: #e6f0e9;
  border-radius: 8px;
  color: #2c5330;
  margin-bottom: 1rem;
}

.alert {
  padding: 0.75rem 1rem;
  background: #f5d6d1;
  border-radius: 8px;
  color: #7f2f28;
  margin-bottom: 1rem;
}

.hint {
  margin: 0;
  display: block;
  font-size: 0.9rem;
  color: #4f4f4f;
  font-weight: 400;
}

.qr {
  width: 72px;
  height: 72px;
  display: block;
}

.modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background: rgba(31, 42, 46, 0.55);
  z-index: 20;
}

.modal.is-open {
  display: flex;
}

.modal-content {
  width: 100%;
  max-width: 520px;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

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

.modal-close {
  background: transparent;
  color: #1f2a2e;
  border: 1px solid #c4c4c4;
}
