* {
  box-sizing: border-box;
  font-family: "Noto Sans KR", -apple-system, BlinkMacSystemFont, "Segoe UI", "Malgun Gothic", sans-serif;
}

body {
  margin: 0;
  padding: 0;
  background: linear-gradient(135deg, #f5f7fa 0%, #e8ecf1 100%);
  color: #1a1a1a;
  min-height: 100vh;
}

h1 {
  margin-bottom: 12px;
  font-size: 2rem;
  font-weight: 700;
  color: #1a1a1a;
  text-align: center;
}

p.description {
  margin-top: 0;
  margin-bottom: 32px;
  color: #666;
  text-align: center;
  font-size: 1rem;
}

form {
  background: #ffffff;
  border-radius: 16px;
  padding: 40px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08), 0 1px 3px rgba(0, 0, 0, 0.05);
  max-width: 1000px;
  margin: 40px auto;
  border: 1px solid rgba(0, 0, 0, 0.05);
}

fieldset {
  border: 2px solid #e8e8e8;
  border-radius: 12px;
  margin-bottom: 28px;
  padding: 24px 28px 28px;
  background: #fafbfc;
  transition: all 0.3s ease;
}

fieldset:hover {
  border-color: #d0d7de;
  background: #ffffff;
}

legend {
  padding: 0 16px;
  font-weight: 700;
  font-size: 1.1rem;
  color: #1a1a1a;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

label {
  display: block;
  margin-bottom: 10px;
  font-weight: 600;
  color: #2d3748;
  font-size: 0.95rem;
}

input[type="text"],
input[type="number"],
input[type="email"],
input[type="tel"],
select {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid #e2e8f0;
  border-radius: 10px;
  font-size: 1rem;
  box-sizing: border-box;
  transition: all 0.2s ease;
  background: #ffffff;
  color: #1a1a1a;
}

input[type="text"]:focus,
input[type="number"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
select:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

input[type="number"][readonly],
input[type="text"][readonly] {
  text-align: right;
  font-weight: 600;
  color: #1a1a1a !important;
  background-color: #f8f9fa !important;
  border-color: #d1d5db !important;
  position: relative;
}

input[type="text"][readonly][data-value] {
  color: #1a1a1a !important;
  font-weight: 600;
  background-color: #f8f9fa !important;
}

.btn-secondary {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #fff;
  padding: 12px 24px;
  border: none;
  border-radius: 10px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.btn-secondary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(102, 126, 234, 0.4);
}

.contact-status {
  margin-left: 12px;
  font-size: 0.9rem;
  font-weight: 500;
  color: #667eea;
}

.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.modal[hidden] {
  display: none !important;
}

.modal-content {
  background: #fff;
  border-radius: 16px;
  padding: 0;
  max-width: 520px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: modalFadeIn 0.3s ease;
}

@keyframes modalFadeIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 28px;
  border-bottom: 2px solid #e8e8e8;
  background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
}

.modal-header h3 {
  margin: 0;
  font-size: 1.4rem;
  font-weight: 700;
  color: #1a1a1a;
}

.modal-close {
  background: none;
  border: none;
  font-size: 28px;
  color: #6b7280;
  cursor: pointer;
  padding: 0;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.modal-close:hover {
  color: #1a1a1a;
  background: #f3f4f6;
}

.modal-body {
  padding: 28px;
}

.modal-body > div {
  margin-bottom: 20px;
}

.modal-body > div:last-child {
  margin-bottom: 0;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding: 20px 28px;
  border-top: 2px solid #e8e8e8;
  background: #fafbfc;
}

.btn-primary {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #fff;
  padding: 12px 28px;
  border: none;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(102, 126, 234, 0.4);
}

.required-star {
  color: #ef4444;
  font-size: 0.9rem;
  margin-left: 4px;
  font-weight: 700;
}

.two-column {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}

.product-list {
  border: 2px solid #e8e8e8;
  border-radius: 12px;
  padding: 20px;
  background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.product-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 0;
  border-bottom: 1px solid #e8e8e8;
  transition: all 0.2s ease;
}

.product-item:last-child {
  border-bottom: none;
}

.product-item:hover {
  padding-left: 8px;
}

.product-item span {
  font-weight: 600;
  color: #2d3748;
}

.vat-option {
  display: flex;
  gap: 12px;
  margin-top: 8px;
}

.vat-option label {
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 0;
}

.total-highlight {
  margin-top: 20px;
  padding: 20px 24px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border: none;
  border-radius: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 600;
  color: #ffffff;
  box-shadow: 0 4px 16px rgba(102, 126, 234, 0.3);
}

.price-tag {
  font-size: 1.1rem;
  font-weight: 700;
  color: #1a1a1a;
}

.vat-note {
  margin-top: 12px;
  font-size: 0.9rem;
  color: #6b7280;
  font-style: italic;
}

.product-info small {
  display: block;
  margin-top: 4px;
  font-size: 0.85rem;
  color: #6b7280;
  font-weight: 500;
}

.product-addon {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: flex-end;
}

.checkbox-inline {
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #374151;
}

.service-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 16px;
}

.service-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border: 2px solid #e8e8e8;
  border-radius: 12px;
  padding: 16px 20px;
  gap: 24px;
  transition: all 0.2s ease;
  background: #ffffff;
}

.service-item:hover {
  border-color: #667eea;
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.1);
  transform: translateY(-1px);
}

.service-item span {
  font-weight: 600;
  color: #2d3748;
}

.service-item small {
  display: block;
  margin-top: 4px;
  color: #6b7280;
  font-size: 0.85rem;
}

.service-item input[type="checkbox"],
.service-item input[type="radio"] {
  width: 20px;
  height: 20px;
  cursor: pointer;
  accent-color: #667eea;
}

.service-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 6px;
}

.service-group-title {
  font-weight: 700;
  font-size: 1rem;
  color: #1a1a1a;
  margin-bottom: 6px;
  padding: 10px 0;
  border-bottom: 3px solid #667eea;
}

.note-inline {
  font-weight: 500;
  font-size: 0.85rem;
  color: #667eea;
  margin-left: 8px;
}

.service-sub-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-left: 20px;
  margin-top: 10px;
}

.service-sub-list .service-item {
  border: 1px solid #e2e8f0;
  background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
}

.note {
  font-size: 0.9rem;
  color: #6b7280;
  margin-top: 8px;
  line-height: 1.6;
}

.submit-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: flex-end;
  align-items: center;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 2px solid #e8e8e8;
}

.submit-row button {
  min-width: 160px;
  padding: 14px 32px;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 10px;
  transition: all 0.3s ease;
}

.submit-row button:not(:disabled):hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.submit-row button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.quote-preview {
  max-width: 1200px;
  margin: 40px auto;
  padding: 0 20px;
}

.quote-document {
  background: #ffffff;
  border-radius: 12px;
  padding: 40px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  border: 1px solid #e8e8e8;
}

/* 견적서 헤더 */
.quote-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 3px solid #667eea;
}

.quote-company-info {
  flex: 1;
}

.quote-company-name {
  font-size: 2rem;
  font-weight: 700;
  margin: 0 0 12px 0;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.quote-company-details {
  font-size: 0.9rem;
  color: #6b7280;
  line-height: 1.8;
}

.quote-company-details p {
  margin: 4px 0;
}

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

.quote-title h2 {
  font-size: 2.5rem;
  font-weight: 700;
  margin: 0;
  color: #1a1a1a;
}

/* 견적 정보 섹션 */
.quote-info-section {
  margin-bottom: 32px;
  padding: 20px;
  background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
  border-radius: 10px;
  border: 2px solid #e8e8e8;
}

.quote-info-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.quote-info-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.quote-info-label {
  font-size: 0.85rem;
  color: #6b7280;
  font-weight: 600;
}

.quote-info-value {
  font-size: 1.1rem;
  font-weight: 700;
  color: #1a1a1a;
}

/* 고객 정보 섹션 */
.quote-customer-section {
  margin-bottom: 32px;
}

.quote-customer-section h3 {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 16px;
  color: #1a1a1a;
  padding-bottom: 8px;
  border-bottom: 2px solid #667eea;
}

.quote-customer-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.quote-customer-item {
  display: flex;
  justify-content: space-between;
  padding: 12px 16px;
  background: #f8f9fa;
  border-radius: 8px;
  border: 1px solid #e8e8e8;
}

.quote-customer-item span {
  font-weight: 600;
  color: #6b7280;
}

.quote-customer-item strong {
  font-weight: 600;
  color: #1a1a1a;
}

/* 기본 항목 및 부가 서비스 섹션 */
.quote-items-section,
.quote-additional-section {
  margin-bottom: 32px;
}

.quote-items-section h3,
.quote-additional-section h3 {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 16px;
  color: #1a1a1a;
  padding-bottom: 8px;
  border-bottom: 2px solid #667eea;
}

.quote-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 16px;
  background: #ffffff;
  border: 2px solid #e8e8e8;
  border-radius: 8px;
  overflow: hidden;
}

.quote-table thead {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #ffffff;
}

.quote-table th {
  padding: 14px 12px;
  text-align: left;
  font-weight: 700;
  font-size: 0.9rem;
  border-right: 1px solid rgba(255, 255, 255, 0.2);
}

.quote-table th:last-child {
  border-right: none;
}

.quote-table td {
  padding: 12px;
  border-bottom: 1px solid #e8e8e8;
  border-right: 1px solid #e8e8e8;
  font-size: 0.9rem;
}

.quote-table td:last-child {
  border-right: none;
}

.quote-table tbody tr:hover {
  background: #f8f9fa;
}

.quote-table tbody tr:last-child td {
  border-bottom: none;
}

.quote-table tfoot {
  background: #f8f9fa;
  font-weight: 700;
}

.quote-summary-row td {
  padding: 16px 12px;
  border-top: 2px solid #667eea;
}

.quote-summary-label {
  text-align: right;
  color: #1a1a1a;
}

.quote-summary-value {
  text-align: right;
  color: #667eea;
  font-size: 1.1rem;
}

/* 약관 섹션 */
.quote-terms-section {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 2px solid #e8e8e8;
}

.quote-terms-section h3 {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 16px;
  color: #1a1a1a;
  padding-bottom: 8px;
  border-bottom: 2px solid #667eea;
}

.quote-terms-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.quote-term-item {
  display: flex;
  gap: 12px;
  padding: 12px;
  background: #f8f9fa;
  border-radius: 8px;
  border-left: 4px solid #667eea;
}

.quote-term-checkbox {
  font-size: 1.2rem;
  color: #667eea;
  font-weight: 700;
  flex-shrink: 0;
}

.quote-term-text {
  font-size: 0.9rem;
  color: #374151;
  line-height: 1.6;
}

.quote-term-text strong {
  color: #1a1a1a;
  font-weight: 700;
}

.checkbox-group {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
}

.checkbox-group label {
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 0;
}

.plan-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.plan-summary {
  border: 2px solid #e8e8e8;
  border-radius: 16px;
  padding: 24px;
  background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
}

.plan-summary:hover {
  border-color: #667eea;
  box-shadow: 0 8px 20px rgba(102, 126, 234, 0.15);
  transform: translateY(-2px);
}

.plan-summary h3 {
  margin: 8px 0 12px;
  font-size: 1.3rem;
  font-weight: 700;
  color: #1a1a1a;
}

.plan-summary .plan-eyebrow {
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  color: #667eea;
  margin: 0;
  font-weight: 700;
}

.plan-summary .plan-price {
  font-size: 1.5rem;
  font-weight: 700;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 16px;
}

.plan-summary ul {
  padding-left: 20px;
  margin: 0;
  color: #374151;
  line-height: 1.8;
}

.plan-summary li {
  margin-bottom: 8px;
}

button {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #fff;
  padding: 14px 32px;
  border: none;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

button:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.contact-info-area {
  display: flex;
  align-items: center;
  gap: 12px;
}

@media (max-width: 768px) {
  body {
    padding: 16px;
  }

  form {
    padding: 24px;
    margin: 20px auto;
  }

  h1 {
    font-size: 1.6rem;
  }

  .two-column {
    grid-template-columns: 1fr;
  }

  .plan-grid {
    grid-template-columns: 1fr;
  }

  .submit-row {
    flex-direction: column;
  }

  .submit-row button {
    width: 100%;
  }

  .total-highlight {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }
}

@media (max-width: 640px) {
  body {
    padding: 12px;
  }

  form {
    padding: 20px;
  }

  fieldset {
    padding: 20px;
  }

  .modal-content {
    width: 95%;
    padding: 0;
  }

  .modal-header,
  .modal-body,
  .modal-footer {
    padding: 20px;
  }
}

