/* RAT v2 PWA — стили (совместимы с Shared.html) */
:root {
  --bg: #f4f6fb;
  --card: #ffffff;
  --text: #1a2233;
  --muted: #6b7487;
  --accent: #3457d5;
  --accent-hover: #2a46b0;
  --danger: #d5344f;
  --ok: #1f9d55;
  --border: #e3e7f0;
  --radius: 14px;
  --shadow: 0 6px 24px rgba(26, 34, 51, 0.08);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 40px 16px;
}
.card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 32px;
  width: 100%;
  max-width: 420px;
}
.card.wide { max-width: 820px; padding: 24px 28px 28px; }
h1 { font-size: 22px; margin-bottom: 4px; }
.sub { color: var(--muted); font-size: 14px; margin-bottom: 24px; }
label { display: block; font-size: 13px; font-weight: 600; margin: 14px 0 6px; }
input, select {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 15px;
  outline: none;
}
input:focus, select:focus { border-color: var(--accent); }
button {
  width: 100%;
  margin-top: 20px;
  padding: 12px;
  border: none;
  border-radius: 10px;
  background: var(--accent);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}
button:hover { background: var(--accent-hover); }
button:disabled { opacity: .55; cursor: default; }
button.secondary {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--border);
  margin-top: 10px;
}
.msg { margin-top: 14px; font-size: 14px; display: none; }
.msg.error { color: var(--danger); display: block; }
.msg.ok { color: var(--ok); display: block; }
.hidden { display: none !important; }
.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  background: #e9eefc;
  color: var(--accent);
}
.badge.pro { background: #e5f7ec; color: var(--ok); }
.list-item {
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 10px;
  margin-top: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}
.tab-bar {
  display: flex; gap: 2px; border-bottom: 1px solid var(--border);
  margin: 18px 0; overflow-x: auto;
}
.tab-btn {
  background: none; border: none; color: var(--muted); font-size: 14px; font-weight: 600;
  padding: 10px 14px; margin: 0; width: auto; border-radius: 0; cursor: pointer;
  position: relative; white-space: nowrap;
}
.tab-btn.active { color: var(--accent); }
.tab-btn.active::after {
  content: ""; position: absolute; left: 10px; right: 10px; bottom: -1px;
  height: 2px; background: var(--accent); border-radius: 2px;
}
.tab-panel { display: none; }
.tab-panel.active { display: block; }
.course-block {
  border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; margin-top: 12px;
}
.course-block h3 { font-size: 15px; margin: 0 0 4px; }
.course-meta { font-size: 12px; color: var(--muted); margin-bottom: 8px; }
.grades-table { width: 100%; border-collapse: collapse; font-size: 13px; margin-top: 8px; }
.grades-table th, .grades-table td {
  text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--border);
}
.grades-table th { color: var(--muted); font-weight: 600; font-size: 12px; }
.essay-card {
  border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; margin-top: 12px;
}
.essay-card .feedback {
  margin-top: 10px; padding: 10px 12px; background: #f6f8fc; border-radius: 8px;
  white-space: pre-wrap; font-size: 13px; line-height: 1.45;
}
.profile-row { margin-top: 10px; font-size: 14px; }
.profile-row b { display: inline-block; min-width: 110px; color: var(--muted); font-weight: 600; }
.empty-note { color: var(--muted); font-size: 14px; margin-top: 8px; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 16px; }
.btn-row button { width: auto; margin-top: 0; padding: 10px 16px; }
.banner {
  background: #fff3cd; color: #856404; padding: 10px 14px; border-radius: 8px;
  font-size: 13px; margin-bottom: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 6px;
}
.brand-logo {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  display: block;
  border-radius: 50%;
}
.brand.compact .brand-logo { width: 36px; height: 36px; }
.brand-name {
  font-size: 1.25em;
  font-weight: 700;
  line-height: 1.15;
  color: var(--text);
}
.brand.compact .brand-name { font-size: 1.05em; }
.brand-slogan {
  font-size: 0.72em;
  color: var(--muted);
  margin-top: 2px;
  font-weight: 500;
}
.portal-header { margin-top: 14px; }
.portal-header h1 { font-size: 20px; margin: 0; }
.portal-meta { color: var(--muted); font-size: 13px; margin-top: 4px; }

.install-title {
  font-size: 22px;
  margin: 18px 0 8px;
  line-height: 1.25;
}
.install-steps {
  margin-top: 8px;
  padding: 14px 16px;
  background: #f6f8fc;
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--text);
}
.install-steps ol {
  margin: 0;
  padding-left: 1.2em;
}
.install-steps li { margin: 8px 0; }
.install-steps p { margin: 0; color: var(--muted); }
.install-note {
  margin-top: 16px !important;
  margin-bottom: 0 !important;
  font-size: 12px !important;
}
.ios-share {
  display: inline-block;
  font-size: 16px;
  line-height: 1;
  vertical-align: middle;
}
