body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
  color: #111827;
  background: #f3f4f6;
}

.wrap {
  max-width: 1024px;
  margin: 0 auto;
  padding: 0 16px;
  box-sizing: border-box;
}

.site-header {
  background: #1f2937;
  color: #fff;
  padding: 10px 0;
}

.logo {
  margin: 0;
  font-size: 18px;
}

.global-nav {
  margin-top: 6px;
}

.global-nav a {
  color: #e5e7eb;
  margin-right: 16px;
  text-decoration: none;
  font-size: 13px;
}
.global-nav a:hover {
  color: #fff;
}

.main {
  padding: 24px 0 40px;
}

.site-footer {
  border-top: 1px solid #e5e7eb;
  padding: 12px 0;
  font-size: 12px;
  color: #6b7280;
  background: #fff;
}

h2 {
  font-size: 18px;
  margin: 0 0 16px;
}

.table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 16px;
}

.table th,
.table td {
  border: 1px solid #e5e7eb;
  padding: 6px 8px;
  text-align: left;
}

.table th {
  background: #f9fafb;
  font-weight: 600;
}

.btn {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 4px;
  border: 1px solid transparent;
  font-size: 13px;
  cursor: pointer;
  text-decoration: none;
}

.btn-primary {
  background: #2563eb;
  border-color: #2563eb;
  color: #fff;
}
.btn-primary:hover {
  background: #1d4ed8;
}

.btn-secondary {
  background: #e5e7eb;
  border-color: #d1d5db;
  color: #111827;
}
.btn-secondary:hover {
  background: #d1d5db;
}

.btn-danger {
  background: #dc2626;
  border-color: #b91c1c;
  color: #fff;
}
.btn-danger:hover {
  background: #b91c1c;
}

/* フォーム */
.form-row {
  display: flex;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.form-row label {
  flex: 0 0 140px;
  max-width: 180px;
  padding: 4px 0;
  font-weight: 500;
}

.form-row .field {
  flex: 1 1 auto;
  padding: 4px 0;
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="number"],
input[type="date"],
textarea,
select {
  width: 100%;
  max-width: 300px;
  padding: 6px 8px;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  box-sizing: border-box;
  font-size: 14px;
}

textarea {
  min-height: 100px;
  max-width: 500px;
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.2);
}

/* 見積明細テーブル */
.items-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 8px;
}
.items-table th,
.items-table td {
  border: 1px solid #e5e7eb;
  padding: 4px 6px;
}
.items-table th {
  background: #f9fafb;
  text-align: center;
}
.items-table input[type="text"],
.items-table input[type="number"] {
  max-width: 100%;
}

/* トータル */
.total-box {
  text-align: right;
  margin-top: 12px;
  font-size: 14px;
}

.alert {
  padding: 8px 10px;
  margin-bottom: 12px;
  border-radius: 4px;
  font-size: 13px;
}
.alert-success {
  background: #ecfdf5;
  border: 1px solid #22c55e;
  color: #166534;
}
.alert-error {
  background: #fef2f2;
  border: 1px solid #ef4444;
  color: #b91c1c;
}

@media (max-width: 768px) {
  .form-row {
    display: block;
  }
  .form-row label {
    margin-bottom: 2px;
  }
}

