/* 정원에이전시 - 스마트 견적 & ROI 산출기 스타일시트 */
:root {
  --bg-dark: #0a0e17;
  --bg-card: #111827;
  --bg-card-hover: #172238;
  --bg-input: #1a2234;
  --border-color: #243046;
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --accent-gold: #f59e0b;
  --accent-cyan: #06b6d4;
  --accent-green: #10b981;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  --radius: 12px;
}

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

body {
  background-color: var(--bg-dark);
  color: var(--text-main);
  font-family: 'Pretendard', -apple-system, sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Global Dock */
.global-dock {
  background: #060911;
  border-bottom: 1px solid var(--border-color);
  padding: 8px 16px;
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(8px);
}

.dock-container {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  overflow-x: auto;
}

.dock-brand {
  font-size: 13px;
  font-weight: 800;
  color: var(--accent-gold);
  white-space: nowrap;
}

.dock-links {
  display: flex;
  gap: 6px;
  min-width: max-content;
}

.dock-item {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 12px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 6px;
  background: rgba(30, 41, 59, 0.4);
  border: 1px solid transparent;
  transition: all 0.2s;
  white-space: nowrap;
}

.dock-item:hover {
  color: #fff;
  border-color: var(--primary);
}

.dock-item.active {
  background: rgba(37, 99, 235, 0.2);
  color: #60a5fa;
  border-color: #3b82f6;
}

/* Header */
.header {
  background: linear-gradient(180deg, #0d1527 0%, var(--bg-dark) 100%);
  padding: 40px 20px 24px;
  text-align: center;
  border-bottom: 1px solid var(--border-color);
}

.header-content {
  max-width: 900px;
  margin: 0 auto;
}

.header-badge {
  display: inline-block;
  background: rgba(245, 158, 11, 0.15);
  color: var(--accent-gold);
  border: 1px solid rgba(245, 158, 11, 0.4);
  padding: 4px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
}

.header h1 {
  font-size: 32px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 8px;
}

.subtitle {
  color: var(--text-muted);
  font-size: 15px;
}

/* Main */
.main-container {
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
  padding: 30px 20px 60px;
  flex: 1;
}

.grid-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
}

@media (min-width: 1024px) {
  .grid-layout {
    grid-template-columns: 1.15fr 1fr;
  }
}

/* Card Common */
.control-card, .summary-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.card-title {
  font-size: 20px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 24px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-color);
}

/* Param Group */
.param-group {
  margin-bottom: 24px;
  background: rgba(15, 23, 42, 0.6);
  padding: 18px;
  border-radius: 10px;
  border: 1px solid var(--border-color);
}

.param-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.param-header label {
  font-size: 15px;
  font-weight: 600;
  color: #e2e8f0;
}

.param-value {
  font-size: 17px;
  font-weight: 700;
  color: var(--accent-gold);
  font-family: 'JetBrains Mono', monospace;
}

input[type="range"] {
  width: 100%;
  height: 8px;
  border-radius: 4px;
  background: #1e293b;
  outline: none;
  cursor: pointer;
  accent-color: var(--primary);
}

.slider-ticks {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  font-size: 11px;
  color: var(--text-dim);
}

/* Toggles Grid */
.toggles-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-bottom: 24px;
}

@media (min-width: 640px) {
  .toggles-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.toggle-card {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 14px 16px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
  transition: all 0.2s;
}

.toggle-card:hover {
  border-color: var(--primary);
  background: var(--bg-card-hover);
}

.toggle-card input[type="checkbox"] {
  display: none;
}

.toggle-custom {
  width: 20px;
  height: 20px;
  border: 2px solid var(--border-color);
  border-radius: 4px;
  margin-top: 2px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.toggle-card input[type="checkbox"]:checked + .toggle-custom {
  background: var(--primary);
  border-color: var(--primary);
}

.toggle-card input[type="checkbox"]:checked + .toggle-custom::after {
  content: '✓';
  color: #fff;
  font-size: 13px;
  font-weight: 900;
}

.toggle-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.toggle-text strong {
  font-size: 14px;
  color: #fff;
}

.toggle-text span {
  font-size: 12px;
  color: var(--text-muted);
}

.facility-select-wrap {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.facility-select-wrap label {
  font-size: 14px;
  font-weight: 600;
  color: #cbd5e1;
}

select {
  padding: 12px 14px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  color: #fff;
  font-size: 14px;
  outline: none;
}

/* Right Summary */
.hero-price-box {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.15) 0%, rgba(15, 23, 42, 0.8) 100%);
  border: 2px solid rgba(37, 99, 235, 0.4);
  border-radius: 12px;
  padding: 24px;
  text-align: center;
  margin-bottom: 24px;
}

.price-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.price-value {
  font-size: 34px;
  font-weight: 900;
  color: var(--accent-gold);
  font-family: 'JetBrains Mono', monospace;
  margin-bottom: 6px;
}

.price-sub {
  font-size: 13px;
  color: var(--text-dim);
}

/* ROI Grid */
.roi-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}

.roi-item {
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 14px 10px;
  text-align: center;
}

.roi-num {
  font-size: 18px;
  font-weight: 800;
  color: var(--accent-cyan);
  font-family: 'JetBrains Mono', monospace;
}

.roi-num.green { color: var(--accent-green); }
.roi-num.gold { color: var(--accent-gold); }

.roi-label {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* Items Preview */
.items-preview-wrap {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 16px;
  margin-bottom: 24px;
}

.items-preview-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding-bottom: 8px;
}

.warranty-badge {
  background: rgba(16, 185, 129, 0.15);
  color: var(--accent-green);
  border: 1px solid rgba(16, 185, 129, 0.3);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
}

.items-list {
  max-height: 220px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.item-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  padding: 6px 0;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.05);
}

.item-name {
  color: #cbd5e1;
  max-width: 65%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.item-cost {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 600;
  color: #fff;
}

/* Action Buttons */
.action-buttons {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.btn {
  padding: 15px 20px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
  text-align: center;
}

.btn-primary {
  background: #1e293b;
  color: #fff;
  border: 1px solid #334155;
}

.btn-primary:hover {
  background: #334155;
  border-color: #475569;
}

.btn-accent {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  color: #fff;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.4);
}

.btn-accent:hover {
  background: #1d4ed8;
}

.btn-block {
  width: 100%;
}

.btn-tiny {
  background: var(--primary);
  color: #fff;
  border: none;
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

/* Modals */
.modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}

.modal-box {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  max-width: 550px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7);
  padding: 24px;
}

.modal-box.sheet-modal {
  max-width: 900px;
  background: #ffffff;
  color: #000000;
}

.modal-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-color);
}

.sheet-modal .modal-top {
  border-bottom-color: #e2e8f0;
}

.doc-badge {
  background: rgba(37, 99, 235, 0.15);
  color: var(--primary);
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
}

.close-btn {
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 22px;
  cursor: pointer;
}

/* Form */
.lead-form-wrap {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.lead-desc {
  font-size: 14px;
  color: var(--text-muted);
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-size: 13px;
  font-weight: 600;
  color: #cbd5e1;
}

.form-group input {
  padding: 12px 14px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  color: #fff;
  font-size: 14px;
  outline: none;
}

/* Printable Standard Sheet */
.printable-sheet {
  background: #ffffff;
  color: #1e293b;
  padding: 20px 10px;
  font-size: 13px;
}

.sheet-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  border-bottom: 2px solid #0f172a;
  padding-bottom: 14px;
  margin-bottom: 18px;
}

.sheet-title {
  font-size: 28px;
  font-weight: 900;
  letter-spacing: 4px;
  color: #0f172a;
}

.sheet-meta {
  font-size: 11px;
  line-height: 1.6;
  color: #475569;
}

.sheet-summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  padding: 14px 20px;
  margin-bottom: 18px;
  border-radius: 6px;
}

.sheet-summary-row strong {
  font-size: 20px;
  color: #1e3a8a;
  margin-left: 10px;
}

.seal-box {
  width: 50px;
  height: 50px;
  border: 2px solid #dc2626;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #dc2626;
  font-size: 10px;
  font-weight: 900;
  transform: rotate(-10deg);
}

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

.sheet-table th, .sheet-table td {
  border: 1px solid #cbd5e1;
  padding: 8px 10px;
  font-size: 12px;
}

.sheet-table th {
  background: #e2e8f0;
  font-weight: 700;
  text-align: center;
  color: #0f172a;
}

.sheet-table tfoot th {
  background: #f8fafc;
  text-align: right;
  font-weight: 700;
}

.sheet-table tfoot .total-row th {
  background: #e2e8f0;
  font-size: 14px;
  color: #1e3a8a;
}

.sheet-terms {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  padding: 14px;
  border-radius: 6px;
  font-size: 11px;
  color: #475569;
}

.sheet-terms h4 {
  font-size: 12px;
  color: #0f172a;
  margin-bottom: 6px;
}

.sheet-terms ol {
  padding-left: 18px;
  line-height: 1.7;
}

/* Toast */
.toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent-green);
  color: #000;
  padding: 10px 22px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 700;
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 2000;
}

.toast.show { opacity: 1; }

.footer {
  border-top: 1px solid var(--border-color);
  padding: 24px;
  text-align: center;
  font-size: 13px;
  color: var(--text-dim);
  background: #060911;
}

@media print {
  body * {
    visibility: hidden;
  }
  #printableArea, #printableArea * {
    visibility: visible;
  }
  #printableArea {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    padding: 0;
  }
}
