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

:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --secondary: #10b981;
  --accent: #8b5cf6;
  --dark: #1e293b;
  --light: #f8fafc;
  --warning: #f59e0b;
  --danger: #ef4444;
  --success: #22c55e;
  --gray: #94a3b8;
  --border: #e2e8f0;
  --soft-blue: #eff6ff;
  --soft-green: #ecfdf5;
  --soft-yellow: #fffbeb;
  --shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
  --radius: 16px;
}

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(135deg, #f0f9ff, #e0f2fe);
  color: var(--dark);
  line-height: 1.6;
  padding: 20px;
  min-height: 100vh;
}

.container {
  max-width: 1280px;
  margin: 0 auto;
  background: white;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

header {
  background: linear-gradient(120deg, var(--primary), var(--accent));
  color: white;
  padding: 24px 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.logo {
  display: flex;
  align-items: center;
  gap: 14px;
}

.logo i {
  font-size: 2rem;
}

.logo h1 {
  font-size: 1.7rem;
  font-weight: 700;
}

.controls {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.btn {
  padding: 10px 18px;
  border-radius: 10px;
  border: none;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.25s ease;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.12);
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 10px rgba(0, 0, 0, 0.16);
}

.btn:active {
  transform: translateY(0);
}

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

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

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

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

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

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

main {
  padding: 24px;
}

.flex-container {
  display: flex;
  gap: 24px;
  margin-bottom: 24px;
  align-items: stretch;
}

@media (max-width: 900px) {
  .flex-container {
    flex-direction: column;
  }
}

.panel {
  background: white;
  border-radius: 14px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  padding: 24px;
  flex: 1;
  border: 1px solid #f1f5f9;
}

.panel-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  color: var(--primary);
  font-size: 1.25rem;
  font-weight: 700;
}

.input-group {
  margin-bottom: 18px;
}

label {
  display: block;
  margin-bottom: 8px;
  font-weight: 700;
  color: var(--dark);
}

textarea {
  width: 100%;
  padding: 14px;
  border: 2px solid var(--border);
  border-radius: 10px;
  font-family: inherit;
  font-size: 1rem;
  min-height: 170px;
  transition: border 0.3s, box-shadow 0.3s;
  resize: vertical;
  background: #fff;
}

textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.help-text {
  margin-top: 8px;
  font-size: 0.9rem;
  color: #64748b;
}

.file-input {
  position: relative;
  margin-top: 10px;
}

.file-input input {
  position: absolute;
  left: 0;
  top: 0;
  opacity: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
}

.file-input-label {
  display: block;
  padding: 16px 18px;
  background: #f8fafc;
  border: 2px dashed #cbd5e1;
  border-radius: 10px;
  text-align: center;
  font-weight: 600;
  color: var(--gray);
  cursor: pointer;
  transition: all 0.25s;
}

.file-input-label:hover {
  background: #eff6ff;
  border-color: var(--primary);
  color: var(--primary);
}

.action-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 16px;
  margin-top: 10px;
  margin-bottom: 18px;
}

.stat-card {
  background: white;
  border-radius: 14px;
  padding: 18px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
  text-align: center;
  border: 1px solid #f1f5f9;
}

.stat-card i {
  font-size: 2rem;
  margin-bottom: 10px;
  color: var(--primary);
}

.stat-card h3 {
  font-size: 1rem;
  margin-bottom: 6px;
  color: var(--dark);
}

.stat-value {
  font-size: 1.8rem;
  font-weight: 800;
  margin: 8px 0;
  word-break: break-word;
}

.stat-good {
  color: var(--success);
}

.stat-average {
  color: var(--warning);
}

.stat-poor {
  color: var(--danger);
}

.stat-neutral {
  color: var(--primary);
}

.stat-description {
  font-size: 0.9rem;
  color: #64748b;
}

.notice {
  background: var(--soft-yellow);
  border-left: 5px solid var(--warning);
  padding: 15px 16px;
  border-radius: 0 10px 10px 0;
  margin: 18px 0;
}

.notice.error {
  background: #fef2f2;
  border-left-color: var(--danger);
}

.notice.success {
  background: var(--soft-green);
  border-left-color: var(--success);
}

.notice.info {
  background: var(--soft-blue);
  border-left-color: var(--primary);
}

.notice-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
  font-weight: 700;
}

.notice.error .notice-title {
  color: var(--danger);
}

.notice.success .notice-title {
  color: var(--success);
}

.notice.info .notice-title {
  color: var(--primary);
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 14px;
  margin: 18px 0 24px;
}

.summary-box {
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
}

.summary-box .label {
  font-size: 0.9rem;
  color: #64748b;
  margin-bottom: 6px;
  font-weight: 600;
}

.summary-box .value {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--dark);
}

table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 18px;
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

th, td {
  padding: 14px 16px;
  text-align: center;
  border-bottom: 1px solid var(--border);
}

th {
  background: linear-gradient(120deg, var(--primary), var(--accent));
  color: white;
  font-weight: 700;
  font-size: 0.95rem;
}

tr:last-child td {
  border-bottom: none;
}

tr:nth-child(even) {
  background-color: #f8fafc;
}

.table-wrap {
  overflow-x: auto;
  border-radius: 12px;
}

.badge {
  display: inline-block;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 700;
}

.badge.good {
  background: #dcfce7;
  color: #166534;
}

.badge.average {
  background: #fef3c7;
  color: #92400e;
}

.badge.poor {
  background: #fee2e2;
  color: #991b1b;
}

.chart-container {
  background: white;
  border-radius: 14px;
  padding: 24px;
  margin-top: 24px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  border: 1px solid #f1f5f9;
}

.chart-header {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.chart-header h3 {
  color: var(--primary);
}

.muted {
  color: #64748b;
  font-size: 0.95rem;
}

footer {
  text-align: center;
  padding: 18px;
  color: #64748b;
  font-size: 0.92rem;
  border-top: 1px solid var(--border);
  background: #fcfdff;
}

.pulse {
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.03); }
  100% { transform: scale(1); }
}

.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.65);
  overflow: auto;
  padding: 20px;
}

.modal-content {
  background: white;
  margin: 2% auto;
  width: 100%;
  max-width: 900px;
  border-radius: 16px;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
  animation: modalOpen 0.3s ease;
  position: relative;
  overflow: hidden;
}

@keyframes modalOpen {
  from { opacity: 0; transform: translateY(-35px); }
  to { opacity: 1; transform: translateY(0); }
}

.modal-header {
  background: linear-gradient(120deg, var(--primary), var(--accent));
  color: white;
  padding: 18px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.modal-header h2 {
  font-size: 1.35rem;
  font-weight: 700;
}

.close {
  color: white;
  font-size: 2rem;
  font-weight: bold;
  cursor: pointer;
  transition: transform 0.2s ease;
  line-height: 1;
}

.close:hover {
  transform: scale(1.12);
}

.modal-body {
  padding: 22px;
  max-height: 78vh;
  overflow-y: auto;
}

.guide-section {
  margin-bottom: 24px;
}

.guide-section h3 {
  color: var(--primary);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.1rem;
}

.guide-section ul {
  padding-left: 24px;
  margin-top: 10px;
}

.guide-section li {
  margin-bottom: 8px;
}

.highlight {
  background: var(--soft-blue);
  padding: 3px 8px;
  border-radius: 6px;
  font-weight: 700;
}

.example {
  background: #f8fafc;
  border-left: 4px solid var(--primary);
  padding: 14px;
  margin: 12px 0;
  border-radius: 0 8px 8px 0;
  font-family: Consolas, Monaco, monospace;
  white-space: pre-wrap;
}

.status-inline {
  margin-top: 10px;
  font-size: 0.95rem;
  color: #475569;
}

.small {
  font-size: 0.9rem;
}

.divider {
  height: 1px;
  background: var(--border);
  margin: 18px 0;
}






