* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: 'Segoe UI', Arial, sans-serif;
  background: #f0f4f8;
  color: #1f2937;
  min-height: 100vh;
}

.login-page {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #11519c, #3b82f6);
}
.login-box {
  background: #fff;
  padding: 40px;
  border-radius: 12px;
  width: 360px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}
.login-box h1 { font-size: 20px; margin-bottom: 6px; color: #11519c; }
.subtitle { color: #6b7280; margin-bottom: 24px; font-size: 14px; }
.login-box label {
  display: block;
  font-size: 13px;
  margin: 12px 0 4px;
  color: #374151;
}
.login-box input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 14px;
}
.login-box input:focus { outline: 2px solid #3b82f6; border-color: transparent; }
.login-box button {
  width: 100%;
  margin-top: 20px;
  padding: 12px;
  background: #11519c;
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 15px;
  cursor: pointer;
}
.login-box button:hover { background: #3b82f6; }
.error { color: #dc2626; font-size: 13px; margin-top: 10px; }

header {
  background: #11519c;
  color: #fff;
  padding: 30px 16px 30px 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 16px;
  flex: 1;
  min-width: 0;
}

.header-emblem {
  flex-shrink: 0;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.header-emblem img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.header-text {
  min-width: 0;
}

.header-org {

  font-weight: 600;
  line-height: 1.35;
}

.header-sub {
  font-size: 12px;
  color: #c7d5f0;
  margin-top: 3px;
}

.logo { font-weight: 600; font-size: 16px; }
.user-info { display: flex; align-items: center; gap: 16px; flex-shrink: 0; }


#logoutBtn {
  background: #fff;
  border: 1px solid #fff;
  color: #11519c;
  padding: 6px 14px;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 600;
  font-size: 14px;
}
#logoutBtn:hover {
  background: transparent;
  color: #fff;
}

.back-link { color: #fff; text-decoration: none; font-size: 14px; }
.back-link:hover { text-decoration: underline; }

main { max-width: 1000px; margin: 32px auto; padding: 0 20px; }
main h2 { margin-bottom: 16px; color: #11519c; }
.muted { color: #6b7280; font-size: 13px; }
.err { color: #dc2626; }

/* === НОВОЕ: блок с кодом успеваемости === */
.grade-code-block {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(135deg, #fff8e1, #ffecb3);
  border-left: 4px solid #d4af37;
  padding: 10px 18px;
  border-radius: 8px;
  margin-bottom: 24px;
}
.grade-code-label {
  font-size: 14px;
  color: #78350f;
  font-weight: 600;
}
.grade-code-value {
  font-family: 'Courier New', monospace;
  font-size: 18px;
  font-weight: 700;
  color: #11519c;
  letter-spacing: 2px;
  padding: 2px 8px;
  background: rgba(255,255,255,0.7);
  border-radius: 4px;
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
  margin: 24px 0 40px;
}
.card {
  background: #fff;
  padding: 20px;
  border-radius: 10px;
  text-decoration: none;
  color: inherit;
  border-left: 4px solid #11519c;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  transition: transform 0.15s, box-shadow 0.15s;
}
.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.12);
}
.card h3 { font-size: 15px; margin-bottom: 6px; color: #11519c; }
.card p { font-size: 13px; color: #6b7280; }

.portfolio-section {
  background: #fff;
  padding: 24px;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.portfolio-section h2 { font-size: 18px; margin-bottom: 8px; }
.portfolio-section p { color: #6b7280; font-size: 14px; margin-bottom: 16px; }

.upload-form { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.upload-form button {
  background: #11519c;
  color: #fff;
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
}
.upload-form button:hover { background: #11519c; }

.status { margin-top: 12px; font-size: 14px; }
.status.ok  { color: #059669; }
.status.err { color: #dc2626; }

.portfolio-list { list-style: none; margin-top: 16px; }
.portfolio-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  border-bottom: 1px solid #e5e7eb;
  font-size: 14px;
}
.portfolio-list li:last-child { border-bottom: none; }
.portfolio-list a { color: #11519c; text-decoration: none; }
.portfolio-list a:hover { text-decoration: underline; }
.delete-btn {
  background: none;
  border: none;
  color: #dc2626;
  cursor: pointer;
  font-size: 16px;
}

.plan-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.plan-table th, .plan-table td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid #e5e7eb;
  font-size: 14px;
}
.plan-table th { background: #11519c; color: #fff; }
.plan-table tr:hover { background: #f9fafb; }