/* GoIT-style: #ff6b08, #1b1b1b, light bg, rounded-2xl, spacing */
:root {
  --bg: #f5f5f7;
  --bg-card: #ffffff;
  --accent: #ff6b08;
  --accent-hover: #e55f07;
  --text: #1b1b1b;
  --text-muted: #6b7280;
  --border: rgba(0, 0, 0, 0.08);
  --radius: 16px;
  --radius-sm: 12px;
  --shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  --font: 'Manrope', -apple-system, BlinkMacSystemFont, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
}

.header {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  padding: 16px 24px;
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.25rem;
  color: var(--text);
  letter-spacing: -0.02em;
}

.logo-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--accent), #ff8c42);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}

.logo-text {
  font-weight: 800;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

.progress-inline {
  font-size: 0.95rem;
  color: var(--text);
}

.progress-inline strong {
  color: var(--accent);
}

.stavka-inline {
  font-size: 0.95rem;
  color: var(--text);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.input-stavka {
  width: 5em;
  padding: 6px 8px;
  font-size: 0.95rem;
  font-family: inherit;
  border: 1px solid var(--border);
  border-radius: 8px;
  text-align: center;
}

.input-stavka:focus {
  outline: none;
  border-color: var(--accent);
}

.profile {
  display: flex;
  align-items: center;
  gap: 12px;
}

.profile-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), #ff8c42);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}

.profile-info {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.profile-name {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text);
}

.profile-role {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.main {
  padding: 40px 24px 60px;
}

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

.page-title {
  font-size: 2rem;
  font-weight: 800;
  color: var(--text);
  margin: 0 0 8px;
  letter-spacing: -0.03em;
  line-height: 1.2;
}

.page-subtitle {
  font-size: 1rem;
  color: var(--text-muted);
  margin: 0 0 28px;
}

.select-year {
  width: 10em;
  min-width: 140px;
  padding: 8px 12px;
  font-size: 1rem;
  font-family: inherit;
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-left: 8px;
  background: var(--bg-card);
  color: var(--text);
  cursor: pointer;
}

.select-year:focus {
  outline: none;
  border-color: var(--accent);
}

.card {
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  padding: 28px 32px;
  margin-bottom: 24px;
}

.card-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.card-title i {
  color: var(--accent);
}

.card-title-meta {
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--text-muted);
}

.teaching-table {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.teaching-row {
  display: grid;
  grid-template-columns: 1fr 120px;
  align-items: center;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

.teaching-row:last-child {
  border-bottom: none;
}

.header-row {
  padding-bottom: 8px;
  margin-bottom: 4px;
  border-bottom: 2px solid var(--border);
}

.section-total {
  margin: 16px 0 0;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
}

.section-total strong {
  color: var(--accent);
}

.header-row .col-type,
.header-row .col-hours {
  font-weight: 700;
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.col-type {
  font-weight: 500;
  color: var(--text);
}

.input-hours {
  width: 100%;
  max-width: 120px;
  padding: 10px 14px;
  font-size: 1rem;
  font-family: inherit;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  color: var(--text);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.input-hours:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(255, 107, 8, 0.15);
}

.input-text {
  width: 100%;
  padding: 10px 14px;
  font-size: 1rem;
  font-family: inherit;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  color: var(--text);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.input-text:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(255, 107, 8, 0.15);
}

.methodical-list,
.scientific-list,
.organizational-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 16px;
}

.methodical-row,
.scientific-row,
.organizational-row {
  display: grid;
  grid-template-columns: 1fr 100px 44px;
  align-items: center;
  gap: 12px;
}

.methodical-name,
.scientific-name,
.org-activity {
  grid-column: 1;
}

.methodical-hours,
.scientific-hours,
.org-hours {
  max-width: 100px;
}

.btn-icon {
  width: 44px;
  height: 44px;
  border: none;
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, color 0.2s;
}

.btn-icon:hover {
  background: #fee2d5;
  color: var(--accent);
}

.btn-add-row {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  font-size: 0.95rem;
  font-weight: 600;
  font-family: inherit;
  color: var(--accent);
  background: transparent;
  border: 2px solid var(--accent);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

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

.card-summary {
  margin-top: 8px;
  margin-bottom: 0;
}

.summary-by-type {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px 24px;
  margin-bottom: 24px;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: 1rem;
  color: var(--text);
}

.summary-value {
  font-weight: 700;
  color: var(--text);
}

.subsection-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 12px;
}

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

.report-sem {
  padding: 14px;
  background: var(--bg);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

.report-sem-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 8px;
}

.report-sem-line {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text);
}

.input-pct {
  width: 3.5em;
  padding: 4px 6px;
  font-size: 0.9rem;
  font-family: inherit;
  border: 1px solid var(--border);
  border-radius: 6px;
  text-align: center;
}

.conclusion-block {
  margin-bottom: 20px;
}

.conclusion-label {
  display: block;
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 8px;
  color: var(--text);
}

.input-textarea {
  width: 100%;
  padding: 12px 14px;
  font-size: 1rem;
  font-family: inherit;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  color: var(--text);
  resize: vertical;
  min-height: 80px;
}

.input-textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(255, 107, 8, 0.15);
}

.summary-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 8px;
}

.btn {
  padding: 14px 28px;
  font-size: 1rem;
  font-weight: 700;
  font-family: inherit;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.btn-outline {
  background: transparent;
  border: 2px solid var(--accent);
  color: var(--accent);
}

.btn-outline:hover {
  background: rgba(255, 107, 8, 0.08);
}

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

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

@media (max-width: 640px) {
  .header-right {
    width: 100%;
  }
  .reports-grid {
    grid-template-columns: 1fr;
  }
  .summary-by-type {
    grid-template-columns: 1fr;
  }
  .methodical-row,
  .scientific-row,
  .organizational-row {
    grid-template-columns: 1fr 80px 40px;
    gap: 8px;
  }
  .teaching-row {
    grid-template-columns: 1fr 80px;
  }
  .input-hours {
    max-width: none;
  }
}
