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

:root {
  --primary: #579950;
  --primary-dark: #3e6d38;
  --secondary: #6c757d;
  --danger: #dc3545;
  --success: #28a745;
  --warning: #ffc107;
  --light: #f8f9fa;
  --dark: #343a40;
  --border: #dee2e6;
  --bg: #f5f7fa;
  --card-bg: #ffffff;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Noto Sans KR', sans-serif;
  line-height: 1.6;
  color: var(--dark);
  background: var(--bg);
}

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

/* Header */
header {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
  padding: 40px 0;
  text-align: center;
}

header h1 {
  font-size: 1.8rem;
  margin-bottom: 8px;
}

header .subtitle {
  font-size: 1rem;
  opacity: 0.9;
}

/* Progress Section */
.progress-section {
  background: var(--card-bg);
  padding: 20px;
  border-radius: 8px;
  margin: 20px 0;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.progress-bar {
  height: 24px;
  background: var(--light);
  border-radius: 12px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary) 0%, var(--success) 100%);
  transition: width 0.3s ease;
  width: 0%;
}

.progress-stats {
  display: flex;
  justify-content: space-between;
  margin-top: 10px;
  font-weight: 600;
}

/* Controls */
.controls {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.btn {
  padding: 10px 20px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 500;
  transition: all 0.2s;
}

.btn-primary {
  background: var(--primary);
  color: white;
}

.btn-primary:hover {
  background: var(--primary-dark);
}

.btn-secondary {
  background: var(--light);
  color: var(--dark);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  background: var(--border);
}

.btn-danger {
  background: var(--danger);
  color: white;
}

.btn-danger:hover {
  background: #c82333;
}

/* Domains */
.domain {
  background: var(--card-bg);
  border-radius: 8px;
  margin-bottom: 16px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
  overflow: hidden;
}

.domain-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  cursor: pointer;
  background: var(--card-bg);
  transition: background 0.2s;
}

.domain-header:hover {
  background: var(--light);
}

.domain-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--dark);
}

.domain-progress {
  font-size: 0.9rem;
  color: var(--secondary);
}

.domain-toggle {
  font-size: 1.2rem;
  transition: transform 0.2s;
}

.domain-toggle.expanded {
  transform: rotate(180deg);
}

.domain-items {
  display: none;
  border-top: 1px solid var(--border);
}

.domain-items.expanded {
  display: block;
}

/* Checklist Items */
.check-item {
  display: flex;
  align-items: flex-start;
  padding: 14px 20px;
  border-bottom: 1px solid var(--light);
  transition: background 0.2s;
}

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

.check-item:hover {
  background: var(--light);
}

.check-item label {
  display: flex;
  align-items: flex-start;
  cursor: pointer;
  flex: 1;
}

.check-item input[type="checkbox"] {
  width: 20px;
  height: 20px;
  margin-right: 12px;
  margin-top: 2px;
  accent-color: var(--primary);
  cursor: pointer;
}

.check-item .item-text {
  flex: 1;
}

.check-item .item-title {
  font-weight: 500;
  margin-bottom: 2px;
}

.check-item .item-desc {
  font-size: 0.85rem;
  color: var(--secondary);
}

/* N/A Toggle */
.na-toggle {
  margin-left: 10px;
  padding: 4px 8px;
  font-size: 0.75rem;
  background: var(--light);
  border: 1px solid var(--border);
  border-radius: 4px;
  cursor: pointer;
}

.na-toggle.active {
  background: var(--warning);
  border-color: var(--warning);
}

/* Summary */
.summary-section {
  background: var(--card-bg);
  padding: 24px;
  border-radius: 8px;
  margin-top: 20px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.summary-section h2 {
  margin-bottom: 16px;
  color: var(--primary-dark);
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}

.summary-card {
  padding: 16px;
  border-radius: 6px;
  background: var(--light);
}

.summary-card .label {
  font-size: 0.85rem;
  color: var(--secondary);
  margin-bottom: 4px;
}

.summary-card .value {
  font-size: 1.5rem;
  font-weight: 700;
}

.summary-card.pass .value { color: var(--success); }
.summary-card.fail .value { color: var(--danger); }
.summary-card.na .value { color: var(--secondary); }

/* Footer */
footer {
  text-align: center;
  padding: 30px 0;
  color: var(--secondary);
  font-size: 0.9rem;
}

/* Print Styles */
@media print {
  .controls, footer { display: none; }
  .domain-items { display: block !important; }
  body { background: white; }
}

/* Responsive */
@media (max-width: 600px) {
  header h1 { font-size: 1.4rem; }
  .controls { flex-direction: column; }
  .btn { width: 100%; }
}
