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

body {
  font-family: 'Segoe UI', system-ui, sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
  padding: 20px;
  color: #2d3748;
}

.container { max-width: 960px; margin: 0 auto; }

/* Header */
header {
  background: rgba(255,255,255,0.97);
  border-radius: 20px;
  padding: 24px 32px;
  margin-bottom: 24px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}
.header-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
header h1 { font-size: 28px; background: linear-gradient(135deg, #667eea, #764ba2); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.user-info { display: flex; align-items: center; gap: 12px; font-size: 14px; color: #718096; }
nav { display: flex; gap: 8px; }
nav a { color: #667eea; text-decoration: none; padding: 8px 16px; border-radius: 10px; font-weight: 500; font-size: 14px; transition: all 0.2s; }
nav a:hover, nav a.active { background: linear-gradient(135deg, #667eea, #764ba2); color: white; }

/* Cards */
.card {
  background: rgba(255,255,255,0.97);
  border-radius: 20px;
  padding: 32px;
  margin-bottom: 20px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.15);
}
.card h2 { font-size: 18px; margin-bottom: 20px; color: #2d3748; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin-bottom: 20px; }
.card-action {
  text-decoration: none; color: inherit; text-align: center; padding: 40px 20px;
  transition: transform 0.2s; cursor: pointer;
}
.card-action:hover { transform: translateY(-4px); }
.card-icon { font-size: 48px; margin-bottom: 12px; }
.card-action h2 { font-size: 20px; margin-bottom: 8px; }
.card-action p { color: #718096; font-size: 14px; }

/* Forms */
.level-section {
  margin-bottom: 28px;
  padding: 24px;
  background: #f7fafc;
  border-radius: 16px;
  border-left: 4px solid #667eea;
}
.level-title { font-size: 18px; font-weight: 700; color: #2d3748; margin-bottom: 20px; }
.form-group { margin-bottom: 18px; }
label { display: block; color: #4a5568; font-weight: 600; margin-bottom: 8px; font-size: 14px; }
input[type="text"], select, textarea {
  width: 100%; padding: 11px 15px; border: 2px solid #e2e8f0;
  border-radius: 10px; font-size: 14px; font-family: inherit;
  transition: border-color 0.2s; background: white;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: #667eea; box-shadow: 0 0 0 3px rgba(102,126,234,0.1); }
textarea { resize: vertical; min-height: 80px; }
.input-row { display: flex; gap: 10px; align-items: stretch; }
.input-row select { flex: 1; }
.field-group { background: white; padding: 16px; border-radius: 12px; border: 2px solid #e2e8f0; margin-bottom: 12px; }

/* Rating */
.rating-buttons { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.rating-btn {
  width: 44px; height: 44px; border: 2px solid #e2e8f0; background: white;
  border-radius: 10px; font-size: 15px; font-weight: 600; cursor: pointer;
  transition: all 0.2s; color: #4a5568;
}
.rating-btn:hover { border-color: #667eea; background: #eef2ff; }
.rating-btn.active { background: linear-gradient(135deg, #667eea, #764ba2); color: white; border-color: #667eea; transform: scale(1.1); }

/* Buttons */
.btn {
  padding: 11px 20px; border: none; border-radius: 10px; font-size: 14px;
  font-weight: 600; cursor: pointer; transition: all 0.2s; font-family: inherit;
  text-decoration: none; display: inline-flex; align-items: center; gap: 6px;
}
.btn-sm { padding: 7px 14px; font-size: 13px; }
.btn-success { background: linear-gradient(135deg, #48bb78, #38a169); color: white; }
.btn-success:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(72,187,120,0.4); }
.btn-danger { background: linear-gradient(135deg, #f56565, #e53e3e); color: white; }
.btn-secondary { background: linear-gradient(135deg, #a0aec0, #718096); color: white; }
.btn-block { width: 100%; justify-content: center; padding: 16px; font-size: 16px; margin-top: 24px; }

/* Tooltip */
.tooltip {
  display: inline-flex; align-items: center; justify-content: center;
  width: 16px; height: 16px; background: #667eea; color: white;
  border-radius: 50%; font-size: 10px; cursor: help; margin-left: 4px; vertical-align: middle;
}

/* Status */
.status { padding: 14px 18px; border-radius: 10px; font-weight: 500; margin-bottom: 20px; text-align: center; }
.status.success { background: #c6f6d5; color: #22543d; }
.status.error { background: #fed7d7; color: #742a2a; }

/* Modal */
.modal {
  position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(0,0,0,0.5); display: flex; align-items: center;
  justify-content: center; z-index: 1000;
}
.modal-content { background: white; padding: 32px; border-radius: 20px; width: 90%; max-width: 400px; }
.modal-content h3 { font-size: 20px; margin-bottom: 4px; color: #2d3748; }

/* Stats */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 16px; margin-bottom: 20px; }
.stat-card {
  background: rgba(255,255,255,0.97); border-radius: 16px; padding: 24px;
  text-align: center; box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}
.stat-value { font-size: 32px; font-weight: 700; background: linear-gradient(135deg, #667eea, #764ba2); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.stat-label { color: #718096; font-size: 13px; margin-top: 4px; }
.charts-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; margin-bottom: 20px; }

/* Entries */
.entry-row { padding: 16px 0; border-bottom: 1px solid #e2e8f0; }
.entry-row:last-child { border-bottom: none; }
.entry-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.entry-content { color: #4a5568; font-size: 14px; margin-bottom: 4px; }
.entry-date { color: #a0aec0; font-size: 12px; }

/* Badges */
.badge { padding: 3px 10px; border-radius: 20px; font-size: 12px; font-weight: 600; }
.badge-level { background: #eef2ff; color: #667eea; }
.badge-positive { background: #c6f6d5; color: #276749; }
.badge-negative { background: #fed7d7; color: #742a2a; }
.badge-neutral { background: #fefcbf; color: #744210; }
.badge-person { background: #e9d8fd; color: #553c9a; }

.hidden { display: none !important; }
.muted { color: #a0aec0; font-size: 14px; }

@media (max-width: 600px) {
  body { padding: 12px; }
  header { padding: 16px; }
  .card { padding: 20px; }
  .header-top { flex-direction: column; align-items: flex-start; gap: 12px; }
}
