* {
  box-sizing: border-box;
}

:root {
  --bg: #f3f4f6;
  --surface: #ffffff;
  --surface-soft: #f9fafb;
  --text: #111827;
  --muted: #6b7280;
  --border: #e5e7eb;
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --danger: #dc2626;
  --danger-dark: #b91c1c;
  --radius: 14px;
  --shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

body {
  margin: 0;
  font-family: Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
}

.app-header {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: center;
  padding: 36px max(24px, calc((100vw - 1050px) / 2));
  color: white;
  background: linear-gradient(135deg, #111827, #1e3a8a);
}

.app-header h1 {
  margin: 0 0 8px;
  font-size: clamp(2rem, 5vw, 3.5rem);
}

.app-header p {
  margin: 0;
  color: #dbeafe;
}

.header-link {
  display: inline-flex;
  min-width: max-content;
  align-items: center;
  justify-content: center;
  padding: 12px 16px;
  color: white;
  font-weight: 700;
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 999px;
}

.header-link:hover {
  background: rgba(255, 255, 255, 0.12);
}

main {
  width: min(1050px, calc(100% - 32px));
  margin: 32px auto;
  display: grid;
  gap: 24px;
}

section {
  padding: 26px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

h2 {
  margin: 0 0 18px;
  font-size: 1.5rem;
}

p {
  line-height: 1.5;
}

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

.dashboard-card {
  padding: 18px;
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: 12px;
}

.dashboard-card span {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
  text-transform: uppercase;
}

.dashboard-card p {
  margin: 0;
  color: var(--text);
  font-weight: 700;
}

form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: end;
}

label {
  grid-column: 1 / -1;
  font-weight: 700;
}

input {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  color: var(--text);
  background: white;
  border: 1px solid #d1d5db;
  border-radius: 10px;
}

input:focus {
  outline: 3px solid rgba(37, 99, 235, 0.22);
  border-color: var(--primary);
}

button,
.button {
  min-height: 44px;
  padding: 10px 14px;
  color: white;
  font-weight: 700;
  background: var(--primary);
  border: none;
  border-radius: 10px;
  cursor: pointer;
}

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

ul {
  padding: 0;
  margin: 18px 0 0;
  list-style: none;
}

.list-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  margin-top: 10px;
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: 10px;
}

.list-item__text {
  flex: 1;
}

.button--danger {
  background: var(--danger);
}

.button--danger:hover {
  background: var(--danger-dark);
}

.task-filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 16px;
  margin-bottom: 12px;
}

.filter-button {
  color: var(--text);
  background: #e5e7eb;
}

.filter-button:hover {
  background: #d1d5db;
}

#mentorMessages {
  display: grid;
  gap: 10px;
  margin-bottom: 16px;
}

.message {
  max-width: 80%;
  padding: 12px 14px;
  border-radius: 12px;
  line-height: 1.4;
}

.message--user {
  justify-self: end;
  color: white;
  background: var(--primary);
}

.message--mentor {
  justify-self: start;
  background: var(--surface-soft);
  border: 1px solid var(--border);
}

#clearMentorButton {
  margin-top: 10px;
  color: var(--text);
  background: #e5e7eb;
}

#clearMentorButton:hover {
  background: #d1d5db;
}

@media (max-width: 720px) {
  .app-header {
    flex-direction: column;
    align-items: flex-start;
  }

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

  form {
    grid-template-columns: 1fr;
  }

  .list-item {
    align-items: stretch;
    flex-direction: column;
  }

  .message {
    max-width: 100%;
  }
}