:root {
  --brand: #2563eb;
  --brand-strong: #1d4ed8;
  --ink: #0f172a;
  --ink-strong: #1f2a44;
  --ink-soft: #475569;
  --muted: #5b6476;
  --muted-strong: #6b7280;
  --panel: #ffffff;
  --border: #d8e3f0;
  --border-strong: #e5e7eb;
  --danger: #dc2626;
  --surface: rgba(255, 255, 255, 0.6);
  --accent-bg: linear-gradient(135deg, #2563eb 0%, #38bdf8 100%);
  font-family: "Hiragino Sans", "Noto Sans JP", "Yu Gothic", "Segoe UI",
    system-ui, -apple-system, sans-serif;
  color: var(--ink);
  background-color: #e9eef9;
}
body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(circle at 20% 20%, #e0f2fe, transparent 32%),
    radial-gradient(circle at 80% 0%, #dfe1ff, transparent 28%),
    linear-gradient(160deg, #f8fafc 0%, #eef2ff 60%, #e0f2fe 100%);
}
[hidden] {
  display: none !important;
}
main {
  max-width: 1000px;
  margin: 0 auto;
  padding: 32px 22px 56px;
}
.page-footer {
  padding: 0 22px 28px;
}
.page-footer__inner {
  max-width: 1000px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 0.85rem;
  color: var(--muted);
}
.page-footer__contact {
  display: flex;
  align-items: center;
  gap: 8px;
}
.page-footer__label {
  font-weight: 600;
  color: var(--ink-soft);
}
.support-email {
  font-family: "SFMono-Regular", "Menlo", "Consolas", "Liberation Mono",
    "Noto Sans Mono", monospace;
  font-size: 0.83rem;
  color: var(--muted-strong);
  word-break: break-all;
}
.page-footer__link {
  font-size: 0.75rem;
  color: var(--muted);
  text-decoration: none;
}
.page-footer__link:hover {
  color: var(--muted-strong);
  text-decoration: underline;
}
.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin: 0 0 12px;
}
.page-header-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
}
.header-login-btn {
  width: auto;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 700;
  white-space: nowrap;
  background: #1d4ed8;
  color: #ffffff;
  box-shadow: 0 8px 18px rgba(29, 78, 216, 0.28);
}
.page-title {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.page-title--with-logo {
  flex-direction: row;
  align-items: center;
  gap: 14px;
}
.logo-icon {
  flex-shrink: 0;
}
.logo-icon svg {
  display: block;
  filter: drop-shadow(0 6px 12px rgba(37, 99, 235, 0.2));
  transition: transform 0.3s ease;
}
.page-title--with-logo:hover .logo-icon svg {
  transform: scale(1.05) rotate(-3deg);
}
.title-group {
  display: flex;
  flex-direction: column;
  gap: 0;
}
h1 {
  font-size: 1.75rem;
  margin: 0;
  font-weight: 800;
  letter-spacing: 0.02em;
  background: var(--accent-bg);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: var(--brand);
  line-height: 1.1;
}
.page-subtitle {
  margin: 0;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--muted-strong);
  letter-spacing: 0.06em;
  opacity: 0.9;
}
section {
  background: var(--surface);
  backdrop-filter: blur(12px);
  border-radius: 16px;
  padding: 22px;
  box-shadow: 0 15px 40px rgba(15, 23, 42, 0.08);
  margin-bottom: 26px;
  border: 1px solid rgba(255, 255, 255, 0.6);
}
section h2 {
  font-size: 1.1rem;
  margin: 0 0 10px;
  letter-spacing: 0.01em;
}
#login-section {
  border: 1px solid #dbe2ef;
  background: rgba(255, 255, 255, 0.86);
}
.lp-lead {
  color: #344054;
  line-height: 1.7;
  margin: 8px 0 16px;
  font-size: 0.95rem;
}
.billing-status {
  font-weight: 700;
  margin: 0 0 6px;
  color: var(--ink-strong);
}
.billing-inline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  font-size: 0.75rem;
  color: var(--muted);
  margin-top: 2px;
}
.billing-inline .billing-status {
  font-weight: 600;
  margin: 0;
  color: var(--ink-strong);
}
.billing-inline .billing-detail {
  color: #4b5563;
}
.billing-inline .billing-label {
  color: var(--muted-strong);
}
.billing-inline .billing-button {
  padding: 4px 8px;
  font-size: 0.75rem;
}
.button-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 11px 16px;
  border-radius: 10px;
  background: var(--accent-bg);
  color: #fff;
  font-size: 0.95rem;
  text-decoration: none;
  box-shadow: 0 10px 30px rgba(37, 99, 235, 0.22);
  transition: transform 0.08s ease, box-shadow 0.2s ease;
}
.button-link:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 34px rgba(37, 99, 235, 0.28);
}
.button-link:active {
  transform: translateY(0);
}
.subheading {
  font-size: 1rem;
  margin: 16px 0 8px;
  color: #1f2933;
}
.divider {
  height: 1px;
  background: #e2e8f0;
  margin: 18px 0;
}
.auth-form {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: flex-end;
  margin-bottom: 12px;
  padding: 12px;
  border-radius: 12px;
  background-color: rgba(37, 99, 235, 0.04);
}
.auth-form label {
  flex: 1 1 220px;
}
.auth-form .auth-consent {
  flex: 1 1 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  color: #334155;
}
.auth-form .auth-consent input {
  width: auto;
}
.auth-form .auth-consent a {
  color: #2563eb;
  text-decoration: underline;
}
.auth-form .auth-consent a:hover {
  color: #1d4ed8;
}
.auth-status-bar {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 6px 0;
  border: none;
  background: transparent;
  font-size: 0.85rem;
  color: var(--muted);
}
.auth-status-bar .secondary {
  padding: 6px 10px;
  font-size: 0.8rem;
  border-radius: 999px;
  box-shadow: none;
  background: #eef2ff;
  color: var(--ink-strong);
}
#auth-username {
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.08);
  color: var(--ink-strong);
  font-weight: 600;
}
.error-message {
  color: var(--danger);
  font-size: 0.85rem;
  margin-top: 6px;
}
.info-message {
  font-size: 0.85rem;
  margin-top: 6px;
  color: #0f766e;
}
.info-message.error {
  color: var(--danger);
}
#nurse-form {
  display: grid;
  gap: 12px;
  margin-bottom: 16px;
}
#nurse-form .nurse-fieldset {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px 14px 6px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}
.fieldset-title {
  margin: 0 0 10px;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--ink-strong);
  letter-spacing: 0.01em;
}
.field-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  align-items: end;
}
.field-grid.compact {
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
}
@media (max-width: 720px) {
  .field-grid,
  .field-grid.compact {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  }
}
.shift-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
}
.shift-box {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
  background: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}
.shift-box__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  color: var(--ink-strong);
  font-size: 0.95rem;
}
.shift-box__range {
  font-size: 0.85rem;
  color: #56627b;
}
.shift-box__inputs {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: end;
  gap: 8px;
  margin-top: 10px;
}
.shift-box__inputs label.mini {
  font-size: 0.8rem;
  color: #56627b;
}
.shift-box__inputs label.mini input {
  margin-top: 4px;
}
body.modal-open {
  overflow: hidden;
}
label {
  font-size: 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: #48525f;
  letter-spacing: 0.01em;
}
.compact-field {
  max-width: 100%;
}
.compact-field select {
  padding: 8px;
}
input,
select {
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  font-size: 0.95rem;
  background: #fff;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
input:focus,
select:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}
button {
  padding: 11px 16px;
  border: none;
  border-radius: 10px;
  background: var(--accent-bg);
  color: #fff;
  font-size: 0.95rem;
  cursor: pointer;
  transition: transform 0.08s ease, box-shadow 0.2s ease;
  box-shadow: 0 10px 30px rgba(37, 99, 235, 0.22);
}
button:disabled {
  background-color: #94a3b8;
  cursor: not-allowed;
  box-shadow: none;
}
button:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 14px 34px rgba(37, 99, 235, 0.28);
}
button:active:not(:disabled) {
  transform: translateY(0);
}
button.secondary {
  background: #eef2ff;
  color: #0f172a;
  box-shadow: none;
}
a.secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 11px 16px;
  border-radius: 10px;
  background: #eef2ff;
  color: #0f172a;
  text-decoration: none;
  box-shadow: none;
}
a.secondary:hover {
  filter: brightness(0.98);
}
.heading-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin: 0 0 12px;
}
.heading-row--spaced {
  margin-top: 18px;
}
.heading-row__title {
  margin: 0;
}
.heading-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.chip-button {
  background: #fff;
  color: #1f2937;
  border: 1px solid #d5deeb;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.82rem;
  line-height: 1.2;
  box-shadow: none;
}
.chip-button:hover:not(:disabled) {
  background: #eef2ff;
  box-shadow: none;
  transform: translateY(0);
}
.edit-toolbar {
  margin: 12px 0 6px;
  padding: 12px 14px;
  border: 1px dashed #cbd5e1;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.85);
}
.edit-toolbar__row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
#schedule-output.editing {
  position: relative;
  z-index: 0;
  outline: 3px solid rgba(245, 158, 11, 0.45);
  border-radius: 12px;
  padding: 6px;
  background: linear-gradient(135deg, rgba(255, 247, 237, 0.9), rgba(255, 255, 255, 0.95));
}
#schedule-output.editing::before {
  content: "編集モード";
  position: absolute;
  top: 8px;
  right: 12px;
  background: #f59e0b;
  color: #fff;
  font-weight: 700;
  padding: 6px 10px;
  border-radius: 999px;
  box-shadow: 0 10px 20px rgba(245, 158, 11, 0.25);
  z-index: 1;
  pointer-events: none;
}
#schedule-output.editing .schedule-cell.editable-cell {
  box-shadow: inset 0 0 0 2px rgba(245, 158, 11, 0.45);
  background: rgba(245, 158, 11, 0.08);
}
#schedule-output.editing .schedule-cell.editable-cell:hover {
  background: rgba(245, 158, 11, 0.16);
}
.edit-toolbar__actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.hint.small {
  font-size: 0.85rem;
  color: #4b5563;
  margin: 10px 0 0;
}
.inline-error {
  margin: 8px 0 0;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(220, 38, 38, 0.08);
  border: 1px solid rgba(220, 38, 38, 0.35);
  color: #b91c1c;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 6px;
}
.inline-error[hidden] {
  display: none !important;
}
.inline-error::before {
  content: "⚠";
}
.switch {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
  font-weight: 600;
  color: #1f2937;
}
.switch input {
  display: none;
}
.switch-slider {
  position: relative;
  width: 46px;
  height: 26px;
  background: var(--border-strong);
  border-radius: 999px;
  transition: background 0.2s ease;
}
.switch-slider::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.2);
  transition: transform 0.2s ease;
}
.switch input:checked + .switch-slider {
  background: linear-gradient(135deg, #2563eb 0%, #38bdf8 100%);
}
.switch input:checked + .switch-slider::after {
  transform: translateX(20px);
}
.switch-label {
  font-size: 0.95rem;
}
.schedule-cell {
  position: relative;
}
.schedule-cell.editable-cell {
  cursor: pointer;
}
.schedule-cell.editable-cell:hover {
  background: rgba(37, 99, 235, 0.08);
}
.schedule-cell.fixed-cell {
  background: rgba(16, 185, 129, 0.08);
}
.shift-badge.fixed {
  box-shadow: inset 0 0 0 1px #10b981;
}
.shift-badge.fixed::after {
  content: "📌";
  position: absolute;
  top: -6px;
  right: -6px;
  width: 16px;
  height: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  background: #ecfdf3;
  color: #047857;
  border-radius: 50%;
  box-shadow: 0 4px 10px rgba(4, 120, 87, 0.25);
  pointer-events: none;
}
.shift-badge.fixed.leader::after {
  top: -4px;
  right: -4px;
  transform: translateX(14px);
  width: 12px;
  height: 12px;
  font-size: 0.55rem;
  background: #e0f7ed;
  box-shadow: 0 2px 6px rgba(4, 120, 87, 0.25);
}
#schedule-output:not(.editing) .schedule-cell.fixed-cell {
  background: transparent;
}
#schedule-output:not(.editing) .shift-badge.fixed {
  box-shadow: none;
}
#schedule-output:not(.editing) .shift-badge.fixed::after {
  display: none;
}
.cell-editor {
  position: absolute;
  min-width: 230px;
  background: #fff;
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.15);
  padding: 12px;
  z-index: 2000;
}
.cell-editor__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  font-weight: 700;
}
.cell-editor__body {
  display: grid;
  gap: 10px;
  margin-bottom: 12px;
}
.cell-editor__actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.icon-btn {
  background: transparent;
  color: var(--ink-soft);
  border: 1px solid var(--border-strong);
  width: 28px;
  height: 28px;
  padding: 0;
  line-height: 1;
  border-radius: 8px;
}
.icon-btn:hover {
  background: #f1f5f9;
}
.leader-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  color: #1f2937;
}
.leader-toggle input {
  width: 16px;
  height: 16px;
}
#nurse-form button[type="submit"] {
  padding: 8px 12px;
  font-size: 0.85rem;
  grid-column: 1 / -1;
  justify-self: flex-start;
}
#nurse-table .table-actions button {
  min-width: auto;
  padding: 4px 8px;
  font-size: 0.78rem;
  flex: 0 0 auto;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}
.result col.col-name {
  width: var(--name-col, 140px);
}
.result col.col-day {
  width: var(--day-col, 42px);
}
.daily-view-table th:nth-child(1),
.daily-view-table td:nth-child(1) {
  width: 8%;
}
.daily-view-table th:nth-child(2),
.daily-view-table td:nth-child(2),
.daily-view-table th:nth-child(3),
.daily-view-table td:nth-child(3),
.daily-view-table th:nth-child(4),
.daily-view-table td:nth-child(4),
.daily-view-table th:nth-child(5),
.daily-view-table td:nth-child(5) {
  width: 18%;
}
.daily-view-table th:nth-child(6),
.daily-view-table td:nth-child(6) {
  width: 20%;
}
#nurse-table th,
#nurse-table td {
  padding: 6px 8px;
}
#nurse-table {
  table-layout: fixed;
}
#nurse-table th:nth-child(1),
#nurse-table td:nth-child(1) {
  width: 4.8%;
  min-width: 54px;
}
#nurse-table th:nth-child(1) {
  text-align: center;
}
#nurse-table th:nth-child(2),
#nurse-table td:nth-child(2) {
  width: 18%;
}
#nurse-table th:nth-child(3),
#nurse-table td:nth-child(3) {
  width: 8%;
  min-width: 68px;
}
#nurse-table th:nth-child(4),
#nurse-table td:nth-child(4),
#nurse-table th:nth-child(5),
#nurse-table td:nth-child(5),
#nurse-table th:nth-child(6),
#nurse-table td:nth-child(6) {
  width: 10%;
  min-width: 90px;
}
#nurse-table th:nth-child(7),
#nurse-table td:nth-child(7) {
  width: 20%;
  min-width: 170px;
}
#nurse-table th:nth-child(8),
#nurse-table td:nth-child(8) {
  width: 12%;
  min-width: 130px;
}
#nurse-table td {
  vertical-align: middle;
}
#nurse-table .order-cell {
  text-align: center;
}
#nurse-table .order-cell input {
  padding: 4px 6px;
  text-align: center;
  appearance: textfield;
  -moz-appearance: textfield;
}
#nurse-table .order-cell input::-webkit-outer-spin-button,
#nurse-table .order-cell input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
#nurse-table input,
#nurse-table select {
  width: 100%;
  box-sizing: border-box;
  padding: 6px 8px;
  border-radius: 6px;
  font-size: 0.85rem;
}
.range-separator {
  font-size: 0.85rem;
  color: var(--muted-strong);
}
#nurse-table .editing-row td {
  background-color: #f8fafc;
}
#nurse-table .sub-label {
  display: block;
  font-size: 0.7rem;
  color: var(--muted-strong);
  font-weight: 400;
  margin-top: 1px;
  white-space: nowrap;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}
#nurse-table .range-fieldset {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
  gap: 4px 6px;
  align-items: center;
}
#nurse-table .editing-row .range-fieldset {
  grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
  gap: 4px 6px;
}
#nurse-table .range-fieldset .mini-label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.85rem;
  color: #334155;
}
#nurse-table .range-fieldset .label-text {
  font-size: 0.78rem;
  color: var(--ink-soft);
}
#nurse-table .range-fieldset input {
  width: 100%;
}
th,
td {
  border: 1px solid var(--border-strong);
  padding: 10px 12px;
  text-align: left;
}
th {
  background: #f2f6ff;
  font-weight: 700;
  color: var(--ink-strong);
}
.result td:not(:first-child),
.daily-view-table td:not(:first-child) {
  text-align: center;
}
.result td,
.daily-view-table td {
  vertical-align: middle;
}
.weekday-sat {
  color: #0f62fe;
}
.weekday-sun,
.weekday-holiday {
  color: var(--danger);
}
.weekday-sun {
  background-color: #fff5f5;
}
.weekday-sat {
  background-color: #f5f8ff;
}
.weekday-holiday {
  background-color: #fff8eb;
}
.shift-badge {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  font-size: 0.8rem;
  font-weight: 600;
  color: #fff;
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}
.shift-badge.leader {
  padding: 0;
}
.shift-badge.shift-day {
  background-color: #0ea5e9;
}
.shift-badge.shift-early {
  background-color: #f4b740;
}
.shift-badge.shift-late {
  background-color: #f97316;
}
.shift-badge.shift-night {
  background-color: #7c3aed;
}
.shift-badge.shift-recovery {
  background-color: #c084fc;
}
.shift-badge.shift-rest {
  background-color: #94a3b8;
}
.shift-badge.shift-empty {
  background-color: #cbd5f5;
  color: var(--ink-soft);
}
.shift-badge .leader-star {
  position: absolute;
  top: -4px;
  right: -4px;
  width: 14px;
  height: 14px;
  border-radius: 999px;
  background-color: rgba(255, 255, 255, 0.92);
  color: #f59e0b;
  font-size: 0.55rem;
  line-height: 14px;
  text-align: center;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.25);
  font-weight: 700;
}
@media print {
  .shift-badge .leader-star {
    background-color: #ffffff;
    box-shadow: none;
  }
}
tbody tr:nth-child(even) {
  background-color: #f9fbff;
}
.table-wrapper {
  overflow-x: auto;
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  background: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}
.table-wrapper--spaced {
  margin-top: 14px;
}
.table-actions {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  justify-content: flex-start;
}
.table-actions button {
  flex: 0 0 auto;
  min-width: 50px;
  white-space: nowrap;
}
#nurse-table .table-actions {
  flex-wrap: nowrap;
  gap: 6px;
}
#nurse-table .editing-row .table-actions {
  flex-wrap: wrap;
}
.table-actions button[data-remove] {
  background-color: var(--danger);
  color: #fff;
}
.assignment-entry {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.9rem;
  padding-left: 10px;
  position: relative;
  white-space: nowrap;
}
.assignment-entry::before {
  content: "•";
  position: absolute;
  left: 0;
  color: #94a3b8;
}
.assignment-entry:first-of-type::before {
  content: "";
}
.assignment-entry .leader-mark {
  color: #2563eb;
  font-weight: 600;
  font-size: 0.75rem;
}
.summary-warning {
  color: var(--danger);
  font-weight: 600;
  font-size: 0.85rem;
  margin-left: 4px;
}
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}
.hint {
  color: #56627b;
  font-size: 0.85rem;
  margin: 6px 0 0;
}
.empty {
  padding: 12px;
  color: #94a3b8;
  font-size: 0.9rem;
  border: 1px dashed #cbd5f5;
  border-radius: 8px;
  text-align: center;
}
@media (max-width: 600px) {
  form {
    grid-template-columns: 1fr;
  }
  button {
    width: 100%;
  }
  .actions {
    flex-direction: column;
  }
}
.schedule-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: flex-end;
  margin-bottom: 12px;
}
.schedule-controls .month-field {
  flex: 1;
  min-width: 200px;
}
.required-staff-group {
  flex: 1 1 100%;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 12px 14px 14px;
  background-color: #f8fafc;
}
.required-staff-group .group-title {
  margin: 0 0 8px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink-soft);
}
.required-staff-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 10px;
}
.required-staff-grid label {
  font-size: 0.8rem;
}
.required-staff-grid input {
  padding: 6px 8px;
}
.schedule-controls button {
  align-self: flex-end;
  padding: 10px 18px;
}
#schedule-output {
  margin-top: 18px;
}
@media (max-width: 600px) {
  .schedule-controls {
    flex-direction: column;
    align-items: stretch;
  }
  .schedule-controls button {
    width: 100%;
  }
}
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}
.modal-card {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(15, 23, 42, 0.25);
  max-width: 360px;
  width: 100%;
  padding: 24px;
}
.legal-card {
  max-width: 640px;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
}
.legal-content {
  overflow-y: auto;
  padding-right: 6px;
}
.legal-section h3 {
  margin: 12px 0 6px;
  font-size: 1rem;
}
.legal-section p {
  margin: 0 0 8px;
  color: var(--ink-soft);
  font-size: 0.9rem;
}
.legal-section ol {
  margin: 0 0 12px 20px;
  color: #1f2933;
  font-size: 0.9rem;
  line-height: 1.6;
}
.settings-card {
  max-width: 420px;
}
.settings-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}
.settings-title {
  margin: 0;
  font-weight: 700;
  color: #0f172a;
}
.settings-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 16px;
}
.settings-legal {
  margin: 0 0 16px;
  font-size: 0.9rem;
  color: #334155;
}
.settings-legal a {
  color: #2563eb;
  text-decoration: underline;
}
.settings-legal a:hover {
  color: #1d4ed8;
}
.settings-support {
  margin: 0 0 12px;
  font-size: 0.9rem;
  color: #334155;
}
.settings-billing {
  margin: 12px 0 8px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #f8fafc;
}
.settings-section-title {
  margin: 0 0 6px;
  font-weight: 700;
  color: #0f172a;
}
.settings-billing-status {
  margin: 0 0 6px;
  font-weight: 600;
  color: var(--ink-strong);
}
.settings-billing-detail {
  margin: 0 0 10px;
  font-size: 0.85rem;
  color: var(--muted);
}
.settings-portal-link {
  margin-top: 8px;
}
.success-page {
  max-width: 760px;
}
.success-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 28px;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.08);
  text-align: center;
}
.success-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  margin: 0 auto 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  font-weight: 700;
  color: #2563eb;
  background: rgba(37, 99, 235, 0.12);
}
.success-detail {
  margin: 8px 0 18px;
  color: var(--ink-soft);
}
.success-actions {
  display: flex;
  justify-content: center;
}
.modal-card p {
  margin: 0 0 16px;
  font-size: 1rem;
  color: #0f172a;
}
.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* ===== LP Sections ===== */

/* Hero */
.lp-hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  align-items: center;
}
.lp-hero__heading {
  font-size: 1.8rem;
  line-height: 1.4;
  margin: 0 0 12px;
  letter-spacing: 0.01em;
}
.lp-cta-btn {
  padding: 14px 28px;
  font-size: 1.05rem;
  font-weight: 700;
  border-radius: 12px;
  background: var(--accent-bg);
  color: #fff;
  border: none;
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(37, 99, 235, 0.22);
  transition: transform 0.08s ease, box-shadow 0.2s ease;
}
.lp-cta-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 14px 34px rgba(37, 99, 235, 0.32);
}
.lp-trust {
  margin: 12px 0 0;
  font-size: 0.82rem;
  color: var(--muted);
}

/* Hero Shift Preview */
.lp-hero__visual {
  display: flex;
  justify-content: center;
}
.lp-shift-preview {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
  width: 100%;
  max-width: 340px;
}
.lp-shift-preview__header {
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--ink-strong);
  margin-bottom: 10px;
  text-align: center;
}
.lp-shift-preview__grid {
  display: grid;
  gap: 4px;
}
.lp-shift-preview__row {
  display: grid;
  grid-template-columns: 48px repeat(5, 1fr);
  gap: 4px;
  align-items: center;
}
.lp-shift-preview__row--head {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--muted);
  text-align: center;
}
.lp-shift-preview__row--head span:first-child {
  visibility: hidden;
}
.lp-shift-preview__name {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--ink-strong);
  white-space: nowrap;
}
.lp-sp {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  font-size: 0.72rem;
  font-weight: 700;
  color: #fff;
  margin: 0 auto;
}
.lp-sp--day { background-color: #0ea5e9; }
.lp-sp--early { background-color: #f4b740; }
.lp-sp--late { background-color: #f97316; }
.lp-sp--night { background-color: #7c3aed; }
.lp-sp--recovery { background-color: #c084fc; }
.lp-sp--rest { background-color: #94a3b8; }

/* Problems Section */
.lp-section-title {
  text-align: center;
  font-size: 1.3rem;
  margin: 0 0 24px;
  color: var(--ink);
}
.lp-problems,
.lp-features,
.lp-steps,
.lp-pricing,
.lp-faq {
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 22px 0;
}
.lp-problems__grid,
.lp-features__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.lp-problem-card,
.lp-feature-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 14px;
  text-align: center;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.06);
}
.lp-problem-card {
  padding: 20px;
}
.lp-problem-card__icon {
  color: var(--danger);
  margin-bottom: 10px;
}
.lp-problem-card h3,
.lp-feature-card h3 {
  margin: 0 0 8px;
  color: var(--ink-strong);
}
.lp-problem-card h3 {
  font-size: 0.95rem;
}
.lp-problem-card p,
.lp-feature-card p {
  font-size: 0.85rem;
  color: var(--ink-soft);
  line-height: 1.6;
  margin: 0;
}

/* Features Section */
.lp-feature-card {
  padding: 24px 20px;
}
.lp-feature-card__icon {
  color: var(--brand);
  margin-bottom: 12px;
}
.lp-feature-card h3 {
  font-size: 1rem;
}

/* Steps Section */
.lp-steps__grid {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 12px;
}
.lp-step {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 24px 20px;
  text-align: center;
  flex: 1;
  max-width: 260px;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.06);
}
.lp-step__number {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--accent-bg);
  color: #fff;
  font-size: 1.1rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 12px;
}
.lp-step h3 {
  font-size: 0.95rem;
  margin: 0 0 6px;
  color: var(--ink-strong);
}
.lp-step p {
  font-size: 0.85rem;
  color: var(--ink-soft);
  line-height: 1.6;
  margin: 0;
}
.lp-step__arrow {
  display: flex;
  align-items: center;
  padding-top: 40px;
  color: var(--muted);
}

/* Pricing Section */
.lp-pricing__card {
  max-width: 400px;
  margin: 0 auto;
  background: var(--panel);
  border: 2px solid var(--brand);
  border-radius: 18px;
  padding: 32px 28px;
  text-align: center;
  box-shadow: 0 8px 30px rgba(37, 99, 235, 0.1);
}
.lp-pricing__trial {
  margin: 0 0 8px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--brand);
}
.lp-pricing__price {
  margin-bottom: 20px;
}
.lp-pricing__amount {
  font-size: 2.4rem;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -0.02em;
}
.lp-pricing__unit {
  font-size: 0.95rem;
  color: var(--ink-soft);
  margin-left: 4px;
}
.lp-pricing__list {
  list-style: none;
  padding: 0;
  margin: 0 0 24px;
  text-align: left;
}
.lp-pricing__list li {
  padding: 8px 0;
  font-size: 0.9rem;
  color: var(--ink-soft);
  border-bottom: 1px solid var(--border);
  position: relative;
  padding-left: 24px;
}
.lp-pricing__list li:last-child {
  border-bottom: none;
}
.lp-pricing__list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: rgba(37, 99, 235, 0.1);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%232563eb' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 10px;
}

/* FAQ Section */
.lp-faq__list {
  max-width: 640px;
  margin: 0 auto;
}
.lp-faq__item {
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-bottom: 10px;
  background: var(--panel);
  overflow: hidden;
}
.lp-faq__item summary {
  padding: 14px 18px;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--ink-strong);
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.lp-faq__item summary::-webkit-details-marker {
  display: none;
}
.lp-faq__item summary::after {
  content: "+";
  font-size: 1.2rem;
  font-weight: 400;
  color: var(--muted);
  flex-shrink: 0;
  transition: transform 0.2s ease;
}
.lp-faq__item[open] summary::after {
  content: "-";
}
.lp-faq__item p {
  padding: 0 18px 14px;
  margin: 0;
  font-size: 0.9rem;
  color: var(--ink-soft);
  line-height: 1.7;
}

/* Final CTA */
.lp-final-cta {
  text-align: center;
  background: var(--accent-bg);
  border: none;
  border-radius: 18px;
  padding: 40px 22px;
  box-shadow: 0 10px 40px rgba(37, 99, 235, 0.18);
}
.lp-final-cta h2 {
  color: #fff;
  font-size: 1.3rem;
  margin: 0 0 10px;
}
.lp-final-cta p {
  color: rgba(255, 255, 255, 0.85);
  margin: 0 0 20px;
  font-size: 0.95rem;
}
.lp-final-cta .lp-cta-btn {
  background: #fff;
  color: var(--brand);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}
.lp-final-cta .lp-cta-btn:hover:not(:disabled) {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

/* LP Responsive */
@media (max-width: 720px) {
  .lp-hero {
    grid-template-columns: 1fr;
  }
  .lp-hero__heading {
    font-size: 1.5rem;
  }
  .lp-problems__grid,
  .lp-features__grid {
    grid-template-columns: 1fr;
  }
  .lp-steps__grid {
    flex-direction: column;
    align-items: center;
  }
  .lp-step {
    max-width: 100%;
  }
  .lp-step__arrow {
    transform: rotate(90deg);
    padding-top: 0;
  }
}
@media (max-width: 600px) {
  .lp-hero__heading {
    font-size: 1.3rem;
  }
  .lp-cta-btn {
    width: 100%;
  }
  .lp-pricing__card {
    padding: 24px 18px;
  }
}
