* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "游明朝", "Yu Mincho", "ヒラギノ明朝 Pro", "Hiragino Mincho Pro",
    "MS P明朝", "MS PMincho", serif;
  background-color: #f5f5f5;
  line-height: 1.6;
  color: #333;
}

.container {
  max-width: 800px;
  margin: 0 auto;
  padding: 20px;
}

.card {
  background: white;
  border-radius: 8px;
  padding: 30px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  margin-bottom: 20px;
}

h1 {
  color: #2c3e50;
  margin-bottom: 30px;
  text-align: center;
}

h2 {
  color: #34495e;
  margin-bottom: 20px;
  font-size: 1.4em;
}

.form-group {
  margin-bottom: 20px;
}

label {
  display: block;
  margin-bottom: 8px;
  font-weight: bold;
  color: #555;
}

input[type="text"],
input[type="tel"],
input[type="date"],
input[type="number"],
select {
  width: 100%;
  padding: 10px;
  border: 2px solid #ddd;
  border-radius: 4px;
  font-size: 16px;
  transition: border-color 0.3s;
}

input:focus,
select:focus {
  outline: none;
  border-color: #3498db;
}

.btn {
  background-color: #3498db;
  color: white;
  padding: 12px 30px;
  border: none;
  border-radius: 4px;
  font-size: 16px;
  cursor: pointer;
  transition: background-color 0.3s;
}

.btn:hover {
  background-color: #2980b9;
}

.btn-secondary {
  background-color: #95a5a6;
  margin-right: 10px;
}

.btn-secondary:hover {
  background-color: #7f8c8d;
}

.btn-danger {
  background-color: #e74c3c;
}

.btn-danger:hover {
  background-color: #c0392b;
}

.button-group {
  display: flex;
  gap: 10px;
  margin-top: 30px;
}

.toggle-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.toggle {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 24px;
}

.toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: 0.4s;
  border-radius: 24px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 4px;
  bottom: 4px;
  background-color: white;
  transition: 0.4s;
  border-radius: 50%;
}

input:checked + .slider {
  background-color: #3498db;
}

input:checked + .slider:before {
  transform: translateX(26px);
}

.item-row {
  display: flex;
  gap: 10px;
  margin-bottom: 10px;
  align-items: center;
}

.item-row input {
  flex: 1;
}

.item-row .btn-danger {
  padding: 8px 15px;
  font-size: 14px;
}

.add-item-btn {
  margin-top: 10px;
}

.invoice-preview {
  background: #f9f9f9;
  padding: 20px;
  border-radius: 4px;
  margin-top: 20px;
}

.invoice-table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
}

.invoice-table th,
.invoice-table td {
  border: 1px solid #ddd;
  padding: 10px;
  text-align: left;
}

.invoice-table th {
  background-color: #f5f5f5;
  font-weight: bold;
}

.text-right {
  text-align: right;
}

.profile-selector {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
}

.profile-selector select {
  flex: 1;
}

.screen {
  display: none;
}

.screen.active {
  display: block;
}

.progress-bar {
  display: flex;
  justify-content: center;
  margin-bottom: 30px;
}

.progress-step {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: #ddd;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  color: white;
  margin: 0 20px;
  position: relative;
}

.progress-step.active {
  background-color: #3498db;
}

.progress-step.completed {
  background-color: #27ae60;
}

.progress-step:not(:last-child)::after {
  content: "";
  position: absolute;
  width: 40px;
  height: 2px;
  background-color: #ddd;
  left: 100%;
  top: 50%;
  transform: translateY(-50%);
}

.progress-step.completed:not(:last-child)::after {
  background-color: #27ae60;
}

@media print {
  body {
    background-color: white;
    margin: 0;
    padding: 0;
  }

  .container {
    max-width: 100%;
    padding: 0;
    margin: 0;
  }

  .card {
    box-shadow: none;
    padding: 0;
    margin: 0;
    border-radius: 0;
  }

  .button-group,
  .progress-bar,
  .form-group,
  .profile-selector,
  h1,
  .no-print {
    display: none !important;
  }

  .print-only {
    display: block !important;
  }

  .invoice-preview {
    background: white;
    padding: 0;
    margin: 0;
  }

  @page {
    size: A4;
    margin: 0;
  }
}
