:root {
  --bg: #fafafa;
  --surface: #ffffff;
  --text: #171717;
  --text-muted: #737373;
  --border: #e5e5e5;
  --accent: #003399;
  --accent-hover: #002266;
  --erasmus-blue: #003399;
  --erasmus-yellow: #ffcc00;
  --erasmus-yellow-soft: #fff8dc;
  --pending: #d97706;
  --done: #16a34a;
  --locked: #a3a3a3;
  --radius: 10px;
  --sidebar-w: 200px;
  --sidebar-collapsed-w: 56px;
  --sidebar-item-h: 40px;
  --sidebar-top-h: 36px;
  --sidebar-toggle-size: 28px;
  --sidebar-footer-icon: 32px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --stage-pre-bg: #eff6ff;
  --stage-during-bg: #fffbeb;
  --stage-after-bg: #f0fdf4;
}

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

html,
body {
  height: 100%;
}

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

body:has(#app-shell) {
  overflow: hidden;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.app-shell {
  display: flex;
  height: 100vh;
  max-height: 100vh;
  overflow: hidden;
}

.sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  background: var(--surface);
  border-right: 1px solid var(--border);
  padding: 16px 10px;
  display: flex;
  flex-direction: column;
  height: 100vh;
  max-height: 100vh;
  overflow: hidden;
  position: relative;
  z-index: 400;
  box-sizing: border-box;
}

.sidebar nav {
  flex: 1;
  min-height: 0;
  margin-bottom: 12px;
  overflow-y: auto;
}

.sidebar-footer {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sidebar-logo {
  display: flex;
  align-items: center;
  min-height: var(--sidebar-top-h);
  font-weight: 700;
  font-size: 13px;
  line-height: 1.2;
  color: var(--erasmus-blue);
  text-decoration: none;
  flex: 1;
  min-width: 0;
}

.sidebar-logo:hover {
  text-decoration: none;
}

.sidebar-logo .logo-plus {
  color: var(--erasmus-yellow);
  font-weight: 800;
}

.sidebar nav a,
.sidebar nav .sidebar-nav-notifications {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  box-sizing: border-box;
  min-height: var(--sidebar-item-h);
  height: var(--sidebar-item-h);
  padding: 0 12px;
  border-radius: 10px;
  color: var(--text);
  text-decoration: none;
  margin-bottom: 2px;
}

.sidebar nav .sidebar-nav-notifications {
  border: none;
  background: transparent;
  font-family: inherit;
  font-size: 14px;
  cursor: pointer;
  text-align: left;
}

.sidebar nav a:hover,
.sidebar nav .sidebar-nav-notifications:hover {
  background: var(--bg);
  text-decoration: none;
}

.sidebar nav a.active {
  background: var(--erasmus-yellow-soft);
  color: var(--erasmus-blue);
  font-weight: 600;
}

.sidebar nav a.disabled {
  color: var(--text-muted);
  pointer-events: none;
  opacity: 0.6;
}

.main-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  height: 100vh;
  max-height: 100vh;
  overflow: hidden;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 24px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.topbar-title {
  font-size: 15px;
  font-weight: 600;
}

.topbar-context {
  font-size: 13px;
  color: var(--text-muted);
  margin-left: 8px;
}

.topbar-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.content {
  flex: 1;
  min-height: 0;
  padding: 24px;
  overflow-y: auto;
  overflow-x: hidden;
}

.content.content-fill {
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: 24px;
  box-sizing: border-box;
}

.footer-bm {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 20px;
  font-size: 11px;
  line-height: 1.25;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
  background: var(--surface);
  flex-shrink: 0;
}

.footer-bm-left {
  flex: 1;
  min-width: 0;
}

.footer-bm-brand {
  flex-shrink: 0;
  font-size: 11px;
  line-height: 1.25;
  color: var(--text-muted);
  white-space: nowrap;
}

.footer-bm-brand .logo-plus {
  color: var(--erasmus-yellow);
  font-weight: 800;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 14px;
  font-size: 14px;
  font-weight: 500;
  border-radius: 10px;
  border: 1px solid transparent;
  cursor: pointer;
  font-family: inherit;
  text-decoration: none;
}

.btn:hover {
  text-decoration: none;
}

input:focus-visible,
select:focus-visible,
textarea:focus-visible,
.phase-field:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.btn:focus-visible,
.sidebar nav a:focus-visible,
.sidebar nav .sidebar-nav-notifications:focus-visible,
.phase-nav button:focus-visible,
.sidebar-settings-link:focus-visible {
  outline: none;
  box-shadow: none;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

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

/* Primary CTA · same look on landing and in app */
.btn-cta-mobility,
a.btn-cta-mobility {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  background: var(--erasmus-blue);
  color: #fff !important;
  font-weight: 600;
  font-size: 15px;
  line-height: 1.2;
  border: none;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  text-decoration: none !important;
  cursor: pointer;
  font-family: inherit;
}

.btn-cta-mobility:hover,
a.btn-cta-mobility:hover {
  background: var(--accent-hover);
  text-decoration: none !important;
  transform: translateY(-1px);
}

.btn-cta-mobility.btn-sm,
a.btn-cta-mobility.btn-sm {
  padding: 8px 14px;
  font-size: 13px;
}

.btn-feedback-nav,
a.btn-feedback-nav {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: var(--erasmus-yellow);
  color: var(--erasmus-blue) !important;
  border: 1px solid var(--erasmus-yellow);
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  text-decoration: none !important;
  cursor: pointer;
  font-family: inherit;
}

.btn-feedback-nav:hover,
a.btn-feedback-nav:hover {
  background: #e6b800;
  border-color: #e6b800;
  color: var(--erasmus-blue) !important;
  text-decoration: none !important;
}

.btn-feedback-nav-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  line-height: 0;
  color: #ffffff;
}

.btn-feedback-nav-icon svg {
  display: block;
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.sidebar .btn-feedback-nav,
.sidebar nav .btn-feedback-nav {
  display: flex;
  width: 100%;
  justify-content: center;
  margin-top: 8px;
  margin-bottom: 2px;
  box-sizing: border-box;
}

.btn-bm-sidebar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  min-height: var(--sidebar-item-h);
  padding: 0 12px;
  margin-bottom: 0;
  background: var(--erasmus-yellow-soft);
  border: 1px solid var(--erasmus-yellow);
  border-radius: var(--radius);
  color: var(--erasmus-blue);
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  text-align: center;
}

.btn-bm-sidebar:hover {
  background: var(--erasmus-yellow);
  text-decoration: none;
}

.sidebar-school-link {
  display: block;
  width: 100%;
  padding: 8px 10px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  text-align: center;
  text-decoration: none;
  border-radius: var(--radius);
}

.sidebar-school-link:hover {
  background: var(--bg);
  color: var(--accent);
  text-decoration: none;
}

.btn-bm-compact {
  display: none;
}

.sidebar-profile-link {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: var(--sidebar-item-h);
  padding: 0 10px;
  margin-top: 0;
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--text);
  font-size: 13px;
  font-weight: 500;
}

.sidebar-profile-link:hover {
  background: var(--bg);
  text-decoration: none;
}

.sidebar-profile-link.active {
  background: var(--erasmus-yellow-soft);
  color: var(--erasmus-blue);
  font-weight: 600;
}

.sidebar-profile-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--sidebar-footer-icon);
  height: var(--sidebar-footer-icon);
  min-width: var(--sidebar-footer-icon);
  border-radius: 50%;
  background: var(--erasmus-blue);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.sidebar-settings-link {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: var(--sidebar-item-h);
  padding: 0 10px;
  margin-top: 0;
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 500;
}

.sidebar-settings-link:hover {
  background: var(--bg);
  color: var(--text);
  text-decoration: none;
}

.sidebar-settings-link.active {
  background: var(--erasmus-yellow-soft);
  color: var(--erasmus-blue);
  font-weight: 600;
}

.sidebar-settings-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--sidebar-footer-icon);
  height: var(--sidebar-footer-icon);
  min-width: var(--sidebar-footer-icon);
  color: var(--text-muted);
}

.page-toolbar {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 12px;
}

.mobilities-toolbar {
  margin-bottom: 16px;
}

.mobilities-toolbar-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
  margin-left: auto;
  justify-content: flex-end;
}

.toolbar-icon-only {
  display: inline-flex;
  align-items: center;
  color: var(--text-muted);
  flex-shrink: 0;
}

.toolbar-icon-only .ui-icon {
  opacity: 0.75;
}

.toolbar-icon-sort {
  margin-left: 8px;
}

.mobilities-toolbar-select {
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 13px;
  font-family: inherit;
  background: #fff;
}

.mobilities-toolbar-select-sort {
  min-width: 160px;
}

.btn-with-icon {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-with-icon .ui-icon {
  flex-shrink: 0;
  opacity: 0.85;
}

.ui-icon {
  display: block;
}

.page-lead {
  color: var(--text-muted);
  margin: 0 0 20px;
  font-size: 15px;
  line-height: 1.55;
}

.settings-grid {
  display: grid;
  gap: 20px;
  max-width: 720px;
}

.settings-page {
  max-width: 880px;
}

.settings-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.settings-tabs button {
  padding: 8px 14px;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 10px;
  cursor: pointer;
  font-family: inherit;
  font-size: 13px;
}

.settings-tabs button.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.settings-panel {
  padding: 20px 22px;
}

.settings-panel-section {
  margin-bottom: 28px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--border);
}

.settings-panel-section:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.settings-panel-section.settings-section {
  padding: 0;
  border: none;
}

.settings-panel-head {
  margin-bottom: 14px;
}

.settings-panel-head h2 {
  margin: 0 0 6px;
  font-size: 16px;
}

.settings-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 16px;
  margin-bottom: 14px;
}

.settings-row-wide {
  grid-column: 1 / -1;
}

.settings-edit-list {
  margin: 0 0 12px;
  padding: 0;
  list-style: none;
}

.settings-list-item {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.settings-list-item .settings-input {
  flex: 1;
  margin: 0;
}

.settings-inline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.settings-team-table .settings-input {
  width: 100%;
  min-width: 0;
}

.school-profile-page {
  width: 100%;
  max-width: none;
}

.school-profile-toolbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.school-profile-fullname {
  margin: 4px 0 0;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.9);
}

.school-profile-hero-actions {
  margin-top: 10px;
}

.school-section-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.school-section-head h3 {
  margin: 0;
}

.school-profile-about {
  margin: 0 0 14px;
  font-size: 14px;
  line-height: 1.5;
}

.school-profile-dl {
  margin-bottom: 16px;
}

.school-profile-subhead {
  margin: 0 0 8px;
  font-size: 14px;
  font-weight: 600;
}

.school-courses-preview {
  margin: 0;
  padding-left: 20px;
  font-size: 14px;
}

@media (max-width: 640px) {
  .settings-form-grid {
    grid-template-columns: 1fr;
  }
}

.settings-section h2 {
  margin: 0 0 16px;
  font-size: 16px;
}

.settings-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
  font-size: 13px;
}

.settings-input {
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-family: inherit;
  font-size: 14px;
}

.settings-check {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  font-size: 14px;
  cursor: pointer;
}

.settings-note {
  margin: 0 0 12px;
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.55;
}

.btn-secondary {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border);
}

.btn-secondary:hover {
  background: var(--bg);
}

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border: none;
}

.btn-ghost:hover {
  color: var(--text);
  background: var(--bg);
}

/* Cards */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin-bottom: 16px;
}

.card h2,
.card h3 {
  margin: 0 0 12px;
  font-size: 16px;
  font-weight: 600;
}

.card h2 {
  font-size: 18px;
}

/* Badges */
.badge {
  display: inline-block;
  padding: 2px 8px;
  font-size: 12px;
  font-weight: 500;
  border-radius: 999px;
}

.badge-pending {
  background: #fffbeb;
  color: #b45309;
}

.badge-done {
  background: #f0fdf4;
  color: #15803d;
}

.badge-locked {
  background: #f5f5f5;
  color: var(--text-muted);
}

/* Landing */
.landing-hero {
  max-width: 640px;
  margin: 48px auto;
  text-align: center;
}

.landing-hero h1 {
  font-size: 28px;
  font-weight: 600;
  margin: 0 0 12px;
  line-height: 1.25;
}

.landing-hero p {
  color: var(--text-muted);
  font-size: 16px;
  margin: 0 0 32px;
}

.landing-steps {
  text-align: left;
  max-width: 420px;
  margin: 0 auto 32px;
  padding: 0;
  list-style: none;
}

.landing-steps li {
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  display: flex;
  gap: 12px;
}

.landing-steps strong {
  color: var(--accent);
  min-width: 24px;
}

.landing-ctas {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

/* Forms */
.form-grid {
  display: grid;
  gap: 16px;
  max-width: 560px;
}

.form-row label {
  display: block;
  font-weight: 500;
  margin-bottom: 4px;
  font-size: 13px;
}

.form-row input,
.form-row select,
.form-row textarea {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-family: inherit;
  font-size: 14px;
}

.form-row textarea {
  min-height: 80px;
  resize: vertical;
}

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

/* Invite bar */
.invite-bar {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: var(--radius);
  padding: 16px 20px;
  margin-bottom: 20px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  justify-content: space-between;
}

.invite-bar-text {
  flex: 1;
  min-width: 200px;
}

.invite-bar-text strong {
  display: block;
  margin-bottom: 4px;
}

.invite-bar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* Banners */
.account-banner,
.guest-banner,
.success-banner {
  border-radius: var(--radius);
  padding: 14px 18px;
  margin-bottom: 20px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.account-banner {
  background: #fefce8;
  border: 1px solid #fde047;
}

.guest-banner {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
}

.success-banner {
  background: #f0fdf4;
  border: 1px solid #86efac;
}

.account-banner-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* Workspace layout */
.workspace-header {
  margin-bottom: 20px;
}

.workspace-header h1 {
  font-size: 22px;
  margin: 0 0 8px;
}

.workspace-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  color: var(--text-muted);
  font-size: 13px;
}

.workspace-grid {
  display: grid;
  grid-template-columns: 220px 1fr 260px;
  gap: 20px;
  align-items: start;
}

.phase-nav {
  list-style: none;
  padding: 0;
  margin: 0;
}

.phase-nav li {
  margin-bottom: 2px;
}

.phase-nav li + .stage-header {
  margin-top: 12px;
}

.phase-nav .stage-header {
  margin-bottom: 4px;
}

.phase-nav button {
  width: 100%;
  text-align: left;
  padding: 8px 12px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  font-family: inherit;
  font-size: 13px;
  cursor: pointer;
  color: var(--text);
}

.phase-nav button:hover {
  background: var(--bg);
}

.phase-nav button.active {
  background: #eff6ff;
  border-color: transparent;
  color: var(--accent);
}

.phase-nav button.locked {
  color: var(--text-muted);
}

.phase-nav .phase-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  margin-right: 8px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
  background: #eceef1;
  color: var(--text-muted);
  box-shadow: none;
  outline: none;
}

.phase-nav button.active .phase-num {
  background: var(--erasmus-blue, #003399);
  color: #fff;
}

.phase-nav button.phase-done:not(.active) .phase-num {
  background: #eceef1;
  color: var(--text-muted);
}

.phase-nav button.phase-done.active .phase-num {
  background: var(--done);
  color: #fff;
}

.phase-panel h2 {
  font-size: 18px;
  margin: 0 0 8px;
}

.phase-panel .phase-summary {
  color: var(--text-muted);
  margin-bottom: 16px;
}

.phase-locked-hint {
  font-size: 13px;
  color: var(--text-muted);
  background: var(--bg);
  padding: 10px 12px;
  border-radius: 10px;
  margin-bottom: 16px;
}

.phase-info-hint {
  font-size: 13px;
  color: var(--text-muted);
  background: #f0f7ff;
  border: 1px solid rgba(0, 51, 153, 0.12);
  padding: 10px 12px;
  border-radius: 10px;
  margin: 0 0 16px;
  line-height: 1.45;
}

.bm-note {
  background: #f5f5f5;
  border: 1px solid var(--border);
  padding: 12px 14px;
  font-size: 13px;
  margin-top: 12px;
  border-radius: 8px;
}

.checklist-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 12px;
}

.checklist-tabs button {
  padding: 6px 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 10px;
  font-size: 13px;
  cursor: pointer;
  font-family: inherit;
}

.checklist-tabs button.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.checklist {
  list-style: none;
  padding: 0;
  margin: 0;
}

.checklist li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}

.checklist li:last-child {
  border-bottom: none;
}

.checklist input[type="checkbox"] {
  margin-top: 3px;
}

.checklist label {
  flex: 1;
  cursor: pointer;
}

.checklist label.done {
  text-decoration: line-through;
  color: var(--text-muted);
}

.checklist.readonly label {
  cursor: default;
}

.doc-list {
  list-style: disc;
  padding-left: 20px;
  margin: 8px 0;
  color: var(--text-muted);
  font-size: 13px;
}

.summary-dl {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 8px 16px;
  font-size: 14px;
}

.summary-dl dt {
  color: var(--text-muted);
  margin: 0;
}

.summary-dl dd {
  margin: 0;
}

/* Tables */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.data-table th,
.data-table td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
}

.data-table th {
  font-weight: 500;
  color: var(--text-muted);
  font-size: 12px;
}

.mobility-row {
  display: block;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 12px;
  background: var(--surface);
  color: inherit;
  text-decoration: none;
}

.mobility-row-layout {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.mobility-row-thumb-wrap {
  flex-shrink: 0;
  width: 52px;
  height: 52px;
  max-width: 52px;
  flex: 0 0 52px;
  margin-bottom: 0;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border);
  position: relative;
  background: #eef1f5;
}

.mobility-row-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  margin: 0;
  border-radius: 0;
}

.mobility-row-thumb-wrap .mobility-row-thumb-fallback {
  display: none;
  position: absolute;
  inset: 0;
  align-items: center;
  justify-content: center;
  background: #eef1f5;
  color: var(--text-muted);
}

.mobility-row-thumb-wrap .mobility-row-thumb-fallback .mobility-role-svg {
  display: block;
  flex-shrink: 0;
}

.mobility-row-thumb-wrap.is-failed .mobility-row-thumb {
  display: none;
}

.mobility-row-thumb-wrap.is-failed .mobility-row-thumb-fallback {
  display: flex;
}

.mobility-row-body {
  flex: 1;
  min-width: 0;
}

.mobility-row-head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.mobility-row-role-icon {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
}

.mobility-row-role-icon.is-outgoing {
  background: rgba(0, 51, 153, 0.1);
  color: var(--erasmus-blue, #003399);
}

.mobility-row-role-icon.is-incoming {
  background: rgba(184, 134, 11, 0.12);
  color: #9a6f00;
}

.mobility-role-emoji {
  font-size: 15px;
  line-height: 1;
}

.mobility-row-head h3 {
  margin: 0;
  flex: 1;
  min-width: 0;
  font-size: 16px;
}

.mobility-row:hover {
  border-color: var(--accent);
  text-decoration: none;
}

.mobility-row h3 {
  margin: 0 0 8px;
  font-size: 16px;
}

.mobility-row-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 13px;
  color: var(--text-muted);
  width: 100%;
}

.filter-bar {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.filter-bar select {
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
}

.progress-bar {
  height: 6px;
  background: var(--border);
  border-radius: 4px;
  overflow: hidden;
  margin-top: 8px;
  max-width: 200px;
}

.progress-bar fill,
.progress-bar-inner {
  display: block;
  height: 100%;
  background: var(--accent);
  border-radius: 4px;
}

.section-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.demo-tag {
  font-size: 11px;
  color: var(--text-muted);
  font-style: italic;
}

.empty-state {
  text-align: center;
  padding: 48px 24px;
  color: var(--text-muted);
}

.empty-state .btn {
  margin-top: 16px;
}

.mobile-nav-toggle {
  display: none;
}

@media (max-width: 900px) {
  .workspace-grid {
    grid-template-columns: 1fr;
  }

  .phase-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
  }

  .phase-nav li {
    margin: 0;
  }

  .phase-nav button {
    width: auto;
  }
}

@media (max-width: 768px) {
  .app-shell,
  #app-shell-inner {
    height: auto;
    max-height: none;
    overflow: visible;
  }

  .main-wrap {
    height: auto;
    max-height: none;
    overflow: visible;
  }

  .content {
    overflow: visible;
  }

  .app-shell {
    flex-direction: column;
  }

  .sidebar {
    width: 100%;
    height: auto;
    max-height: none;
    border-right: none;
    border-bottom: 1px solid var(--border);
    padding: 12px;
  }

  .sidebar nav {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    overflow: visible;
  }

  .sidebar nav a,
  .sidebar nav .sidebar-nav-notifications {
    margin: 0;
  }

  .content {
    padding: 16px;
  }

}

/* --- Enhanced app shell --- */
#app-shell {
  height: 100vh;
  max-height: 100vh;
  overflow: hidden;
}

#app-shell-inner {
  display: flex;
  height: 100vh;
  max-height: 100vh;
  width: 100%;
  overflow: hidden;
}

#app-shell-inner.sidebar-collapsed {
  overflow: visible;
}

#app-shell-inner.sidebar-collapsed .main-wrap {
  overflow: hidden;
}

.sidebar-top {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  padding: 0 4px 0;
  margin-bottom: 8px;
  gap: 0;
  flex-shrink: 0;
  position: relative;
  min-height: var(--sidebar-top-h);
  height: var(--sidebar-top-h);
  box-sizing: content-box;
}

.sidebar-top-brand {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  min-height: var(--sidebar-top-h);
}

.sidebar-toggle {
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 10px;
  width: var(--sidebar-toggle-size);
  height: var(--sidebar-toggle-size);
  padding: 0;
  cursor: pointer;
  font-size: 14px;
  flex-shrink: 0;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: none;
}

.sidebar nav a .nav-icon,
.sidebar nav .sidebar-nav-notifications .nav-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  flex-shrink: 0;
  color: var(--text-muted);
}

.sidebar-nav-badge {
  margin-left: auto;
  flex-shrink: 0;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--erasmus-blue, #003399);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
  box-sizing: border-box;
}

.sidebar-nav-badge[hidden] {
  display: none;
}

.nav-link-with-badge {
  position: relative;
  overflow: visible;
}

#app-shell-inner.sidebar-collapsed .sidebar-nav-badge {
  position: absolute;
  top: 6px;
  right: 6px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  font-size: 10px;
  line-height: 16px;
}

.sidebar nav a.active .nav-icon {
  color: var(--accent);
}

.topbar-left {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.topbar-auth-hint {
  font-size: 12px;
  color: var(--text-muted);
}

.sidebar-collapsed .sidebar {
  width: var(--sidebar-collapsed-w);
  padding: 16px 6px;
  overflow: visible;
}

.sidebar-collapsed .sidebar-top {
  flex-direction: column;
  align-items: stretch;
  padding: 0;
  margin-bottom: 8px;
  overflow: visible;
  min-height: var(--sidebar-top-h);
  height: var(--sidebar-top-h);
  gap: 0;
}

.sidebar-collapsed .sidebar-top-brand {
  justify-content: center;
  position: relative;
  min-height: var(--sidebar-top-h);
}

.sidebar-collapsed .sidebar-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: auto;
  min-height: var(--sidebar-top-h);
  font-size: 15px;
  line-height: 1;
}

.sidebar-collapsed .sidebar-logo .logo-full {
  display: none;
}

.sidebar-collapsed .sidebar-logo .logo-short {
  display: inline-flex;
  align-items: baseline;
  gap: 0;
}

.sidebar-logo .logo-short {
  display: none;
  font-weight: 800;
  color: var(--erasmus-blue);
}

.sidebar-collapsed .sidebar-logo .logo-short .logo-plus {
  color: var(--erasmus-yellow);
  font-weight: 800;
}

.sidebar-collapsed .sidebar-toggle {
  position: absolute;
  top: calc(var(--sidebar-top-h) / 2);
  right: -20px;
  z-index: 20;
  width: var(--sidebar-toggle-size);
  height: var(--sidebar-toggle-size);
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transform: translateY(-50%);
  box-shadow: none;
}

.sidebar-collapsed .nav-label,
.sidebar-collapsed .btn-bm-full,
.sidebar-collapsed .btn-feedback-nav-label,
.sidebar-collapsed .sidebar-profile-name,
.sidebar-collapsed .sidebar-settings-label {
  display: none;
}

.sidebar-collapsed .sidebar-footer {
  align-items: center;
  gap: 8px;
  padding-top: 12px;
}

.sidebar-collapsed .btn-bm-compact {
  display: flex;
  width: var(--sidebar-item-h);
  height: var(--sidebar-item-h);
  min-width: var(--sidebar-item-h);
  min-height: var(--sidebar-item-h);
  padding: 0;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 800;
  margin-bottom: 0;
}

.sidebar-collapsed .btn-feedback-nav {
  width: var(--sidebar-item-h);
  height: var(--sidebar-item-h);
  min-width: var(--sidebar-item-h);
  min-height: var(--sidebar-item-h);
  padding: 0;
  margin-bottom: 8px;
}

.sidebar-collapsed .sidebar-profile-link,
.sidebar-collapsed .sidebar-settings-link {
  justify-content: center;
  width: var(--sidebar-item-h);
  height: var(--sidebar-item-h);
  min-height: var(--sidebar-item-h);
  padding: 0;
  margin-top: 0;
}

.sidebar-collapsed .sidebar nav a,
.sidebar-collapsed .sidebar nav .sidebar-nav-notifications,
.sidebar-collapsed .sidebar nav .btn-feedback-nav {
  justify-content: center;
  min-height: var(--sidebar-item-h);
  height: var(--sidebar-item-h);
  padding: 0;
}

.sidebar-collapsed .nav-icon {
  width: 20px;
  margin: 0;
}

.mode-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 24px;
  font-size: 13px;
  flex-wrap: wrap;
}

.mode-banner-preview {
  background: #fffbeb;
  border-bottom: 1px solid #fde047;
}

.mode-banner-full {
  background: #ecfdf5;
  border-bottom: 1px solid #86efac;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 13px;
}

.invite-bar-sub,
.account-banner-sub {
  display: block;
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 4px;
}

.create-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 16px clamp(20px, 4vw, 40px);
  background: transparent;
  border-bottom: none;
}

.create-header-start {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.create-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px 8px 11px;
  font-size: 13px;
  font-weight: 600;
  color: var(--erasmus-blue);
  text-decoration: none;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(0, 51, 153, 0.12);
  border-radius: 999px;
  box-shadow: 0 1px 3px rgba(30, 77, 140, 0.06);
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.create-back:hover {
  color: var(--erasmus-blue);
  background: #fff;
  border-color: rgba(0, 51, 153, 0.22);
  text-decoration: none;
  transform: translateX(-2px);
}

.create-back:focus-visible {
  outline: 2px solid var(--erasmus-blue);
  outline-offset: 2px;
}

.create-back-icon {
  flex-shrink: 0;
  opacity: 0.85;
}

.create-header-end {
  position: relative;
  margin-left: auto;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  flex-shrink: 0;
}

.create-heading-title {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--erasmus-blue);
  letter-spacing: -0.02em;
  line-height: 1.2;
  text-align: right;
}

.create-incentive-mount {
  position: fixed;
  top: 54px;
  right: clamp(20px, 4vw, 40px);
  left: auto;
  width: max-content;
  max-width: min(220px, 30vw);
  z-index: 25;
  pointer-events: none;
}

.create-incentive-mount:empty {
  display: none;
}

.create-incentive {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px 10px 10px;
  background: #fff;
  border: 1px solid rgba(30, 77, 140, 0.1);
  border-radius: 12px;
  box-shadow: 0 6px 20px rgba(30, 77, 140, 0.08);
  animation: create-incentive-in 0.35s ease;
  transition: opacity 0.22s ease, transform 0.22s ease;
}

.create-incentive.is-leaving {
  opacity: 0;
  transform: translateY(-6px);
  pointer-events: none;
}

.create-incentive-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  min-width: 36px;
  border-radius: 50%;
  flex-shrink: 0;
}

.create-incentive-icon--spark {
  background: #fff8dc;
  color: #d97706;
}

.create-incentive-icon--check {
  background: #ecfdf5;
  color: #16a34a;
}

.create-incentive-icon--rocket {
  background: #eff6ff;
  color: #1d4ed8;
}

.create-incentive-icon--celebrate {
  background: #fef3c7;
  color: #b45309;
}

.create-incentive-text {
  font-size: 14px;
  font-weight: 600;
  color: #171717;
  line-height: 1.3;
  white-space: nowrap;
}

@keyframes create-incentive-in {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .create-incentive {
    animation: none;
    transition: none;
  }

  .create-incentive.is-leaving {
    transform: none;
  }
}

.create-logo {
  font-weight: 700;
  color: var(--erasmus-blue);
  text-decoration: none;
}

.create-logo .logo-plus {
  color: var(--erasmus-yellow);
  font-weight: 800;
}

.create-flow {
  background: #f3f0ea;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

#create-header-mount {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  min-height: 52px;
  /* Let scroll content pass through; links stay clickable */
  pointer-events: none;
  background: linear-gradient(180deg, #f3f0ea 65%, rgba(243, 240, 234, 0));
}

#create-header-mount .create-header-start,
#create-header-mount .create-header-end,
#create-header-mount a,
#create-header-mount button {
  pointer-events: auto;
}

.create-page-decor {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

.create-page {
  position: relative;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  max-width: none;
  margin: 0;
  padding: 68px clamp(20px, 4vw, 40px) 48px;
  z-index: 1;
  scroll-padding-top: 16px;
}

#create-main {
  position: relative;
  z-index: 1;
}

.create-curve {
  position: absolute;
  display: block;
}

/* Line 1: straight down from top → 90° fillet → straight left (ends clipped) */
.create-curve--top-left {
  top: 0;
  left: -4vw;
  width: min(820px, 88vw);
  height: min(500px, 56vh);
  opacity: 0.9;
}

/* Line 2: straight in from right → 90° fillet → straight down to bottom (ends clipped) */
.create-curve--right-down {
  top: 0;
  right: 0;
  width: min(440px, 42vw);
  height: 100vh;
  min-height: 640px;
  opacity: 0.88;
}

@media (max-width: 768px) {
  .create-curve--top-left {
    width: min(360px, 68vw);
    height: min(280px, 32vh);
    left: -48px;
    opacity: 0.5;
  }

  .create-curve--right-down {
    width: min(260px, 48vw);
    height: min(520px, 62vh);
    right: -40px;
    opacity: 0.45;
  }
}

.create-page .wizard-shell {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: center;
  padding: 0 0 32px;
  isolation: isolate;
}

.create-page .wizard-card {
  position: relative;
  z-index: 5;
  width: 100%;
  max-width: 640px;
  background: var(--surface);
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 14px;
  box-shadow: 0 8px 40px rgba(30, 77, 140, 0.12);
  padding: clamp(28px, 5vw, 40px);
}

.wizard-steps-dots {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-bottom: 12px;
}

.wizard-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #e5e5e5;
  transition: background 0.2s, transform 0.2s;
}

.wizard-dot.is-active {
  background: var(--accent);
  transform: scale(1.25);
}

.wizard-dot.is-done {
  background: #93c5fd;
}

.wizard-step-badge {
  text-align: center;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  margin: 0 0 28px;
  letter-spacing: 0.02em;
}

.wizard-step-title {
  margin: 0 0 8px;
  font-size: clamp(22px, 3vw, 28px);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.wizard-step-desc {
  margin: 0 0 28px;
  color: var(--text-muted);
  font-size: 15px;
  line-height: 1.55;
}

.wizard-field {
  margin-bottom: 20px;
}

.wizard-field label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text);
}

.wizard-optional {
  font-weight: 400;
  color: var(--text-muted);
}

.wizard-input {
  width: 100%;
  padding: 12px 14px;
  font-size: 15px;
  font-family: inherit;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  transition: border-color 0.15s, box-shadow 0.15s;
}

.wizard-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(0, 51, 153, 0.12);
}

.wizard-textarea {
  min-height: 96px;
  resize: vertical;
}

.wizard-field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.wizard-summary {
  margin: 0;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}

.wizard-summary-row {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}

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

.wizard-summary-row dt {
  margin: 0;
  color: var(--text-muted);
  font-weight: 500;
}

.wizard-summary-row dd {
  margin: 0;
}

.wizard-hint {
  font-size: 13px;
  color: var(--text-muted);
  margin: 4px 0 0;
  line-height: 1.5;
}

.wizard-actions {
  display: flex;
  gap: 12px;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.wizard-btn-next,
.wizard-btn-submit {
  flex: 1;
  justify-content: center;
  padding: 12px 20px;
}

.wizard-btn-back {
  flex-shrink: 0;
}

.wizard-form .wizard-step-panel {
  animation: wizard-fade-in 0.25s ease;
}

@keyframes wizard-fade-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.phase-nav .stage-header {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  padding: 12px 12px 4px;
  margin: 0;
  list-style: none;
}

.phase-nav .stage-header.stage-pre { color: #1d4ed8; background: var(--stage-pre-bg); margin: 4px 0 0; border-radius: 8px 8px 0 0; }
.phase-nav .stage-header.stage-during { color: #b45309; background: var(--stage-during-bg); }
.phase-nav .stage-header.stage-after { color: #15803d; background: var(--stage-after-bg); }

.phase-nav button.stage-pre.active {
  background: var(--stage-pre-bg);
  color: #1d4ed8;
}

.phase-nav button.stage-during.active {
  background: var(--stage-during-bg);
  color: #b45309;
}

.phase-nav button.stage-after.active {
  background: var(--stage-after-bg);
  color: #15803d;
}

.phase-nav button.stage-pre.active .phase-num {
  background: #1d4ed8;
  color: #fff;
}

.phase-nav button.stage-during.active .phase-num {
  background: #b45309;
  color: #fff;
}

.phase-nav button.stage-after.active .phase-num {
  background: #15803d;
  color: #fff;
}

.workspace-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0;
}

.workspace-tabs button {
  padding: 10px 16px;
  border: none;
  background: transparent;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}

.workspace-tabs button.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.doc-upload-zone {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
  background: var(--bg);
  margin-bottom: 16px;
}

.doc-upload-zone.locked {
  opacity: 0.7;
  pointer-events: none;
}

.doc-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}

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

.collab-lock {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  text-align: center;
  color: var(--text-muted);
  font-size: 14px;
}

.comment-thread {
  list-style: none;
  padding: 0;
  margin: 0 0 16px;
}

.comment-thread li {
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

.comment-meta {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.comment-form {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.comment-form input {
  flex: 1;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-family: inherit;
}

.partners-list-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.partners-list-header .page-lead {
  margin: 0;
  flex: 1;
  min-width: min(100%, 280px);
}

.partner-search-wrap {
  position: relative;
  flex-shrink: 0;
  width: min(100%, 320px);
  margin-left: auto;
}

.partner-search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

.partner-search {
  width: 100%;
  max-width: none;
  padding: 10px 14px 10px 38px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 15px;
  margin-bottom: 0;
  font-family: inherit;
  background: var(--surface);
}

/* Partners discovery: grid + minimap / expanded map split */
.partners-discovery {
  position: relative;
}

.partners-cards-grid {
  --partners-grid-cols: 4;
  display: grid;
  grid-template-columns: repeat(var(--partners-grid-cols), minmax(0, 1fr));
  gap: 16px;
  align-items: stretch;
  width: 100%;
}

@media (max-width: 1100px) {
  .partners-cards-grid {
    --partners-grid-cols: 3;
  }
}

@media (max-width: 800px) {
  .partners-cards-grid {
    --partners-grid-cols: 2;
  }
}

@media (max-width: 520px) {
  .partners-cards-grid {
    --partners-grid-cols: 1;
  }
}

.partners-discovery.is-map-expanded {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(0, 3fr);
  gap: 20px;
  align-items: start;
  min-height: calc(100vh - 200px);
}

.partners-discovery.is-map-expanded .partners-cards-grid {
  --partners-grid-cols: 1;
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  overflow-y: auto;
  max-height: calc(100vh - 200px);
  padding-right: 4px;
  align-items: stretch;
}

.partner-card-wrap {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 0;
  height: 100%;
}

.partner-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 14px 52px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
  width: 100%;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.12s ease;
  cursor: pointer;
}

.partner-card:hover,
.partner-card:focus-visible {
  border-color: #b8c5d6;
  background: #fafbfc;
  text-decoration: none;
  outline: none;
}

.partner-card.is-highlighted {
  border-color: var(--erasmus-blue, #003399);
  background: rgba(0, 51, 153, 0.04);
}

.partners-discovery.is-map-expanded .partner-card-wrap {
  height: auto;
}

.partner-card-new-request {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 14px;
  justify-content: center;
  z-index: 2;
}

.partners-minimap-wrap {
  min-width: 0;
}

.partners-discovery:not(.is-map-expanded) .partners-minimap-wrap {
  grid-column: var(--partners-grid-cols);
  grid-row: 1;
}

.partners-minimap-tile {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
  padding: 0;
  box-sizing: border-box;
  border: 2px solid var(--erasmus-blue, #003399);
  border-radius: 12px;
  background: #f0f4f8;
  cursor: pointer;
  overflow: hidden;
  text-align: left;
  font-family: inherit;
  box-shadow: 0 0 0 1px rgba(0, 51, 153, 0.08);
  transition: box-shadow 0.15s ease;
}

.partners-minimap-tile:hover,
.partners-minimap-tile:focus-visible {
  background: rgba(0, 51, 153, 0.03);
  outline: none;
  box-shadow: 0 0 0 1px rgba(0, 51, 153, 0.2), 0 4px 12px rgba(0, 51, 153, 0.1);
}

.partners-minimap-preview {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.partners-minimap-placeholder {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 42%;
}

.partners-minimap-footer {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 28px 12px 12px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.92) 45%, #fff 100%);
  pointer-events: none;
}

.partners-minimap-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--erasmus-blue, #003399);
}

.partners-minimap-meta {
  font-size: 11px;
  color: var(--text-muted);
  text-align: center;
}

.partners-map-expanded {
  display: none;
  flex-direction: column;
  min-height: calc(100vh - 200px);
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
  overflow: hidden;
}

.partners-map-expanded.is-visible {
  display: flex;
}

.partners-map-expanded-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.partners-map-expanded-head .partners-map-lead {
  margin: 0;
  font-size: 12px;
}

.partner-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.partner-card-badge {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 3px 8px;
  border-radius: 999px;
  background: #f3f4f6;
  color: var(--text-muted);
}

.partner-card-badge-worked {
  background: rgba(0, 51, 153, 0.1);
  color: var(--erasmus-blue);
}

.partner-card-badge-discovery {
  background: rgba(255, 204, 0, 0.2);
  color: #7a5f00;
}

.partner-card-mob-count {
  font-size: 11px;
  color: var(--text-muted);
}

.partner-card-media {
  position: relative;
  flex: 0 0 auto;
  width: 100%;
  height: 96px;
  margin-bottom: 4px;
  border-radius: 8px;
  overflow: hidden;
  background: #eef1f5;
}

.partner-card-media .partner-card-thumb {
  width: 100%;
  height: 100%;
  margin: 0;
  object-fit: cover;
  display: block;
  border-radius: 0;
}

.partner-card-media .partner-card-thumb.is-failed {
  display: none;
}

.partner-card-media-fallback {
  display: none;
  position: absolute;
  inset: 0;
  align-items: center;
  justify-content: center;
  background: #eef1f5;
  color: var(--text-muted);
}

.partner-card-media.is-failed .partner-card-media-fallback {
  display: flex;
}

.partner-card h3 {
  margin: 0;
  font-size: 17px;
  line-height: 1.3;
}

.partner-card-location {
  margin: 0;
  font-size: 13px;
  color: var(--text-muted);
}

.partner-card-sectors {
  margin: 0;
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.45;
  flex: 1;
}


.partners-toolbar-row {
  display: flex;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 10px 12px;
  margin-bottom: 16px;
  overflow: visible;
  position: relative;
  z-index: 20;
}

.partners-toolbar-left {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 10px;
  flex: 1;
  min-width: 0;
  overflow: visible;
}

.partners-search-compact {
  width: min(240px, 100%);
  flex-shrink: 0;
  margin-left: auto;
}

.partner-filter-slot {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.partner-filter-slot-label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--text-muted);
}

.partner-filter-slot-label .ui-icon {
  opacity: 0.7;
}

.partner-filter-slot-controls {
  display: flex;
  align-items: center;
  gap: 4px;
}

.partner-filter-select {
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 13px;
  font-family: inherit;
  background: #fff;
  min-width: 140px;
}

.partner-filter-remove {
  min-width: 28px;
  padding: 4px 8px;
  line-height: 1;
}

.partner-filter-menu-types {
  min-width: 180px;
}

.partner-filter-menu-empty {
  margin: 0;
  padding: 8px 14px;
  font-size: 13px;
  color: var(--text-muted);
}

.partner-filter-dropdown-wrap {
  position: relative;
  z-index: 50;
}

.partner-filter-menu.is-fixed {
  position: fixed;
  z-index: 500;
}

.partner-filter-menu {
  position: absolute;
  left: 0;
  top: calc(100% + 4px);
  right: auto;
  z-index: 300;
  min-width: 200px;
  max-width: min(280px, calc(100vw - 120px));
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  padding: 8px 0;
}

.partner-filter-menu-group {
  padding: 6px 0;
  border-bottom: 1px solid var(--border);
}

.partner-filter-menu-group:last-child {
  border-bottom: none;
}

.partner-filter-menu-label {
  display: block;
  padding: 4px 14px 6px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}

.partner-filter-menu-item {
  display: block;
  width: 100%;
  text-align: left;
  padding: 8px 14px;
  border: none;
  background: transparent;
  font-family: inherit;
  font-size: 13px;
  cursor: pointer;
}

.partner-filter-menu-item:hover {
  background: var(--bg);
}

.partners-map-lead {
  margin: 0 0 8px;
  font-size: 13px;
  color: var(--text-muted);
}

.partners-map {
  position: relative;
  width: 100%;
  overflow: hidden;
  background: #f8f9fa;
}

.partners-map-mini {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  min-height: 96px;
  aspect-ratio: unset;
  max-height: none;
  border: none;
  border-radius: 0;
}

.partners-map-full {
  flex: 1;
  min-height: 0;
  aspect-ratio: unset;
  max-height: none;
  border-radius: 0;
}

.partners-map-bg,
.partners-map-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  pointer-events: none;
  object-fit: cover;
  object-position: center 42%;
}

.partner-map-pin {
  position: absolute;
  z-index: 2;
  width: 10px;
  height: 10px;
  margin: 0;
  border: 2px solid #fff;
  border-radius: 50%;
  background: #d4a017;
  cursor: pointer;
  padding: 0;
  -webkit-appearance: none;
  appearance: none;
  transform: translate(-50%, -50%);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.partner-map-pin:hover,
.partner-map-pin:focus-visible,
.partner-map-pin.is-highlighted {
  transform: translate(-50%, -50%) scale(1.35);
  box-shadow: 0 2px 8px rgba(0, 51, 153, 0.35);
  outline: none;
  z-index: 3;
}

.partner-map-pin.is-mini {
  width: 8px;
  height: 8px;
  border-width: 1.5px;
}

.partner-map-pin.is-worked {
  background: var(--erasmus-blue, #003399);
}

.partner-map-tooltip {
  position: absolute;
  z-index: 10;
  pointer-events: none;
  min-width: 140px;
  max-width: 220px;
  padding: 8px 10px;
  border-radius: 8px;
  background: #fff;
  border: 1px solid var(--border);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
  font-size: 12px;
  line-height: 1.4;
}

.partner-map-tooltip strong {
  display: block;
  font-size: 13px;
  margin-bottom: 2px;
}

.partner-map-tooltip span {
  display: block;
  color: var(--text-muted);
}

@media (max-width: 960px) {
  .partners-discovery.is-map-expanded {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .partners-discovery.is-map-expanded .partners-cards-grid {
    max-height: 40vh;
  }

  .partners-map-expanded,
  .partners-map-expanded.is-visible {
    min-height: 50vh;
  }

  .partners-discovery:not(.is-map-expanded) .partners-minimap-wrap {
    grid-column: var(--partners-grid-cols);
    grid-row: 1;
  }
}

.partner-search-icon {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  color: var(--text-muted);
  pointer-events: none;
}

.partner-profile-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.partner-profile-dl {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 6px 16px;
  margin: 12px 0 0;
  font-size: 13px;
}

.partner-profile-dl dt {
  color: var(--text-muted);
  font-weight: 500;
}

.partner-profile-dl dd {
  margin: 0;
}

.partner-stay-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.partner-stay-item {
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.partner-stay-item:last-child {
  border-bottom: none;
}

.partner-stay-meta,
.partner-stay-used {
  font-size: 12px;
  color: var(--text-muted);
}

.section-hint {
  margin: 0 0 12px;
  font-size: 13px;
  color: var(--text-muted);
}

.partner-back {
  margin: 0 0 12px;
}

.demo-role-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}

.demo-role-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 16px;
  border-radius: 10px;
  text-decoration: none;
  color: inherit;
}

.demo-role-card strong {
  font-size: 14px;
}

.demo-role-card span {
  font-size: 12px;
  color: var(--text-muted);
}

.demo-role-sending {
  background: rgba(0, 51, 153, 0.08);
}

.demo-role-receiving {
  background: rgba(255, 204, 0, 0.14);
}

.demo-role-card:hover {
  text-decoration: none;
  filter: brightness(0.97);
}

.phase-field-number {
  max-width: 120px;
}

.library-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
}

.library-tabs button {
  padding: 8px 16px;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 10px;
  cursor: pointer;
  font-family: inherit;
}

.library-tabs button.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.template-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}

.sidebar-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 16px;
}

.sidebar-card h3 {
  margin: 0 0 12px;
  font-size: 14px;
}

.progress-ring-text {
  font-size: 24px;
  font-weight: 700;
  color: var(--accent);
}

/* Wizard create · legacy aliases */
.wizard-page-title {
  margin: 0 0 20px;
  font-size: 22px;
}

.wizard-progress-wrap {
  margin-bottom: 28px;
}

.wizard-step-label {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.wizard-progress-bar {
  height: 6px;
}

.form-row-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.wizard-form .wizard-step-panel {
  animation: stepIn 0.35s ease;
}

@keyframes stepIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Toast */
.toast-flash {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(12px);
  padding: 12px 20px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  z-index: 9999;
  opacity: 0;
  transition: opacity 0.3s, transform 0.3s;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
  pointer-events: none;
}

.toast-flash.toast-success {
  background: #ecfdf5;
  color: #166534;
  border: 1px solid #86efac;
}

.toast-flash.toast-error {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

.toast-flash.toast-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Workspace v2 */
.workspace-grid-v2 {
  grid-template-columns: 200px 1fr 280px;
}

.workspace-header-compact {
  margin-bottom: 16px;
}

.workspace-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

.workspace-header-row .workspace-meta {
  margin: 0;
}

.workspace-header-progress {
  min-width: 160px;
}

.progress-label {
  font-size: 12px;
  color: var(--text-muted);
  display: block;
  margin-bottom: 6px;
}

.success-banner-compact,
.guest-banner-compact {
  padding: 10px 14px;
  margin-bottom: 16px;
  font-size: 13px;
}

.step-form-heading {
  margin: 0 0 12px;
  font-size: 14px;
  font-weight: 600;
}

.step-form-section {
  margin-bottom: 16px;
}

.summary-dl-compact {
  margin: 0;
}

.step-upload-field {
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

.step-upload-field:last-child {
  border-bottom: none;
}

.step-upload-field.is-done label {
  color: var(--done);
}

.step-upload-field label {
  display: block;
  font-weight: 500;
  font-size: 13px;
  margin-bottom: 6px;
}

.step-upload-done {
  margin: 0;
  font-size: 13px;
  color: var(--done);
}

.step-upload-hint {
  margin: 0;
  font-size: 13px;
  color: var(--text-muted);
}

.step-upload-control {
  display: inline-flex;
  align-items: center;
  margin: 4px 0 0;
  cursor: pointer;
}

.step-upload-control .btn {
  pointer-events: none;
}

.step-item-value-multiline {
  white-space: pre-wrap;
  line-height: 1.45;
}

.topbar-demo-user {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--bg-subtle, #f3f4f6);
}

.step-upload-control input[type="file"] {
  font-size: 13px;
  max-width: 100%;
}

.step-checkbox-row {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-size: 14px;
}

.phase-instruction {
  font-size: 14px;
  color: var(--text-muted);
  margin: 0 0 16px;
  line-height: 1.5;
}

.step-workspace-lanes {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.step-lane {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  background: var(--surface);
}

.step-lane-yours {
  border-color: rgba(0, 51, 153, 0.35);
}

.step-lane-partner {
  border-color: rgba(255, 204, 0, 0.5);
  background: var(--bg-subtle, #faf9f7);
}

.step-lane-heading {
  margin: 0 0 12px;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--text-muted);
}

.step-lane-empty {
  margin: 0;
  font-size: 13px;
  color: var(--text-muted);
  font-style: italic;
}

.step-lane-items {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.step-item {
  padding: 12px;
  border-radius: 8px;
  background: #fff;
  border: 1px solid var(--border);
}

.step-item.is-done {
  border-color: color-mix(in srgb, var(--done) 40%, var(--border));
}

.step-item.is-readonly {
  background: transparent;
}

.step-item-highlight {
  background: rgba(0, 51, 153, 0.06);
  outline: none;
  border-radius: 6px;
}

.step-item-label {
  font-weight: 500;
  font-size: 13px;
  margin-bottom: 4px;
}

.step-item-hint {
  margin: 0 0 8px;
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.4;
}

.step-item-value {
  margin: 0;
  font-size: 13px;
}

.step-item-waiting {
  color: var(--text-muted);
  font-style: italic;
}

.step-item-bm .bm-note {
  margin-bottom: 12px;
  font-size: 13px;
  line-height: 1.5;
}

.step-summary-card {
  margin-bottom: 16px;
}

.step-invite-hint {
  margin: 16px 0 0;
  font-size: 13px;
  color: var(--text-muted);
}

.sidebar-card-desc-sub {
  margin-top: -4px;
  margin-bottom: 8px;
}

.task-list-auto li[data-task-index] {
  cursor: pointer;
}

.task-list-auto li[data-task-index]:hover {
  background: var(--bg-subtle, #faf9f7);
}

.task-list-auto {
  list-style: none;
  padding: 0;
  margin: 0;
}

.task-list-auto li {
  display: flex;
  gap: 8px;
  padding: 8px 0;
  font-size: 13px;
  border-bottom: 1px solid var(--border);
}

.task-list-auto li.done {
  color: var(--text-muted);
}

.task-list-auto li.done .task-check {
  color: var(--done);
  font-weight: 700;
}

.task-check {
  flex-shrink: 0;
  width: 16px;
  color: var(--locked);
}

.tasks-sidebar-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}

.tasks-sidebar-head h3 {
  margin: 0;
}

.checklist-tabs-compact button {
  padding: 4px 8px;
  font-size: 12px;
}

.sidebar-card-desc {
  font-size: 12px;
  color: var(--text-muted);
  margin: 0 0 12px;
}

.outreach-list {
  margin-bottom: 12px;
}

.invite-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
}

.invite-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  font-size: 13px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
}

.invite-row.is-primary {
  background: #f8fafc;
}

.invite-school {
  font-weight: 500;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.invite-status {
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--bg);
  color: var(--text-muted);
}

.invite-status.is-pending {
  background: #fff7ed;
  color: #c2410c;
}

.invite-status.is-confirmed {
  background: #ecfdf5;
  color: #15803d;
}

.invite-status.is-muted {
  background: #f5f5f5;
  color: #737373;
}

.invite-empty {
  margin: 0 0 12px;
  font-size: 12px;
  color: var(--text-muted);
}

.btn-invite-another {
  width: 100%;
  margin-top: 8px;
  justify-content: center;
}

.btn-updates-toggle {
  justify-content: center;
}

.btn-updates-toggle.is-active {
  background: #eff6ff;
  border-color: #bfdbfe;
  color: var(--accent);
}

.updates-panel h2 {
  margin: 0 0 6px;
  font-size: 20px;
}

.updates-lead {
  margin: 0 0 20px;
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.55;
}

.updates-feed {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 16px;
}

.update-item {
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  box-sizing: border-box;
}

.workspace-step-panel {
  padding: 16px 18px;
  box-sizing: border-box;
}

.update-item-meta {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.update-item-text {
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
}

.updates-compose textarea {
  width: 100%;
  padding: 12px;
  font-family: inherit;
  font-size: 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  resize: vertical;
  margin-bottom: 10px;
}

.updates-compose-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.updates-empty {
  padding: 24px;
  text-align: center;
}

.updates-empty-inline {
  color: var(--text-muted);
  font-size: 14px;
  margin: 0;
}

.phase-panel-updates {
  padding: 0;
  background: transparent;
  min-height: 480px;
  display: flex;
  flex-direction: column;
}

.workspace-updates-stream-col {
  flex: 1;
  min-height: 480px;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}


.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.partner-status {
  font-size: 13px;
  margin: 8px 0;
  font-weight: 500;
}

.partner-status-agreed {
  color: var(--done);
}

.partner-status-seeking {
  color: var(--pending);
}

.sidebar-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.sidebar-card-header h3 {
  margin: 0;
}

.btn-icon-round {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
  padding: 0;
  color: var(--text-muted);
  text-decoration: none;
  box-sizing: border-box;
}

.btn-icon-round:hover {
  background: var(--bg);
  color: var(--text);
}

.partner-settings-panel,
.partner-change-panel {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 8px;
  margin-bottom: 12px;
}

.partner-settings-panel.is-hidden,
.partner-change-panel.is-hidden {
  display: none;
}

.partner-settings-item {
  display: block;
  width: 100%;
  text-align: left;
  padding: 8px 10px;
  border: none;
  background: transparent;
  font-family: inherit;
  font-size: 13px;
  cursor: pointer;
  border-radius: 8px;
}

.partner-settings-item:hover:not(:disabled) {
  background: var(--surface);
}

.partner-settings-item:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.partner-settings-danger {
  color: #b91c1c;
}

.message-step-hint {
  font-size: 11px;
  color: var(--text-muted);
  margin: 6px 0 0;
}

.partner-invite-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.messages-card .messages-scroll {
  max-height: 140px;
  overflow-y: auto;
  margin-bottom: 10px;
}

.message-bubble {
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: 12px;
}

.message-meta {
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 2px;
}

.message-form {
  display: flex;
  gap: 6px;
}

.message-form input {
  flex: 1;
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 13px;
  font-family: inherit;
}

.phase-nav button.phase-done:not(.active) {
  opacity: 1;
}

/* Workspace layout (mobility page) */
.workspace-layout {
  display: grid;
  grid-template-columns: 200px 1fr 280px;
  grid-template-rows: 1fr;
  gap: 16px;
  align-items: start;
}

.workspace-phase-nav {
  grid-column: 1;
  grid-row: 1;
  min-width: 0;
  max-width: 200px;
  width: 100%;
}

.workspace-phase-nav .phase-nav {
  width: 100%;
}

.workspace-step-panel {
  grid-column: 2;
  grid-row: 1;
}

.workspace-right-col {
  grid-column: 3;
  grid-row: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
  position: sticky;
  top: 0;
  align-self: start;
  max-height: calc(100vh - 120px);
  overflow-y: auto;
}

.btn-updates-rail {
  width: 100%;
  justify-content: center;
  margin: 0;
}

.topbar-left {
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.topbar-title {
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 220px;
}

.topbar-status-badge {
  flex-shrink: 0;
  font-size: 11px;
}

.topbar-tools {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.topbar-info-wrap {
  position: relative;
  flex-shrink: 0;
}

.topbar-info-btn {
  width: 28px;
  height: 28px;
  font-size: 13px;
  font-weight: 700;
  font-style: italic;
  font-family: Georgia, serif;
}

.topbar-info-popover {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 50;
  width: max(380px, 22rem);
  max-width: min(440px, calc(100vw - 32px));
  padding: 16px 18px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  box-sizing: border-box;
}

.topbar-info-popover .logo-plus {
  color: var(--erasmus-yellow, #ffcc00);
  font-weight: 800;
}

.topbar-info-popover[hidden] {
  display: none !important;
}

.topbar-info-dl {
  margin: 0;
  font-size: 13px;
  line-height: 1.45;
  display: grid;
  grid-template-columns: minmax(7.5rem, 36%) minmax(0, 1fr);
  gap: 8px 16px;
}

.topbar-info-dl dt {
  color: var(--text-muted);
  font-weight: 500;
  padding-right: 4px;
}

.topbar-info-dl dd {
  margin: 0;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.topbar-progress {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 88px;
}

.topbar-progress-pct {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
}

.progress-bar-thin {
  width: 56px;
  height: 4px;
  margin: 0;
}

.progress-bar-thin .progress-bar-inner {
  height: 100%;
}

.topbar-calendar-btn,
.topbar-share-btn {
  flex-shrink: 0;
}

.step-panel-header {
  margin-bottom: 16px;
}

.step-panel-heading {
  margin: 0 0 4px;
  font-size: 22px;
  font-weight: 600;
}

.step-panel-phase-title {
  margin: 0;
  font-size: 14px;
  color: var(--text-muted);
  font-weight: 500;
}


/* Right rail: progress (below Updates) + next-action card */
.rail-progress-outside {
  padding: 0 2px 4px;
}

.rail-progress-outside .rail-progress-head {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
  width: 100%;
}

.rail-progress-outside .rail-progress-pct {
  flex-shrink: 0;
  margin: 0;
  font-size: 13px;
  line-height: 1;
  font-weight: 700;
  color: var(--erasmus-blue, #003399);
  min-width: 2.5em;
  text-align: right;
}

.rail-progress-outside .rail-progress-bar {
  flex: 1;
  min-width: 0;
  max-width: none;
  height: 6px;
  margin: 0;
}

.rail-status-card {
  padding: 0;
  overflow: hidden;
}

.rail-status-card .focus-strip {
  margin: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  border-bottom: 1px solid var(--border);
}

.rail-status-card .rail-phase-lines {
  margin: 0;
  padding: 10px 14px 12px;
  list-style: none;
}

.progress-rail-lines-compact {
  margin: 0;
}

.progress-rail-lines-compact li {
  padding: 5px 0;
  font-size: 12px;
}

.focus-strip-body {
  padding: 0 14px 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.focus-strip-waiting {
  margin: 0;
  width: 100%;
  font-size: 12px;
  color: var(--text-muted);
}

.focus-strip-waiting-label {
  font-weight: 600;
}

.focus-strip-summary {
  grid-template-columns: 18px 1fr;
  align-items: center;
}

.focus-strip-summary .lane-summary-text {
  grid-column: 2;
  grid-row: 1;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
}

/* Lane hierarchy: tinted toggle + white body (one card) · sections divided by lines only */
.step-workspace-lanes {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.lane-panel {
  border: none;
  border-radius: 10px;
  background: transparent;
  overflow: hidden;
}

.lane-panel:not([open]) {
  overflow: visible;
}

.lane-panel-yours,
.lane-panel-partner {
  border: none;
  background: transparent;
}

.lane-panel > .lane-panel-summary {
  border: none;
  margin: 0;
  border-radius: 10px;
}

.lane-panel[open] > .lane-panel-summary {
  border-radius: 10px 10px 0 0;
}

.lane-panel-yours > .lane-panel-summary {
  background: rgba(0, 51, 153, 0.08);
  color: var(--erasmus-blue, #003399);
}

.lane-panel-yours > .lane-panel-summary:hover {
  background: rgba(0, 51, 153, 0.12);
}

.lane-panel-partner > .lane-panel-summary {
  background: rgba(255, 204, 0, 0.14);
  color: #7a5f00;
}

.lane-panel-partner > .lane-panel-summary:hover {
  background: rgba(255, 204, 0, 0.22);
}

.lane-panel-yours > .lane-panel-summary .lane-summary-meta,
.lane-panel-partner > .lane-panel-summary .lane-summary-meta {
  color: inherit;
  opacity: 0.75;
}

.lane-panel-body {
  margin-top: 0;
  padding: 4px 12px 12px;
  background: #fff;
  border: none;
  border-radius: 0 0 10px 10px;
}

.lane-panel[open] > .lane-panel-body {
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.lane-panel .step-lane-empty {
  margin: 0;
  padding: 12px 0;
  background: transparent;
  font-size: 13px;
  color: var(--text-muted);
}

.lane-section {
  border: none;
  border-radius: 0;
  background: transparent;
  margin: 0;
  box-shadow: none;
}

.lane-section + .lane-section {
  border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.lane-section-summary {
  border: none;
  background: transparent;
}

.lane-section-standalone {
  margin-bottom: 12px;
  background: #fff;
  box-shadow: none;
  border: none;
  border-radius: 10px;
}

.lane-section-standalone + .step-workspace-lanes,
.step-workspace-lanes + .lane-section-standalone {
  margin-top: 0;
}

.lane-section-body {
  padding: 4px 10px 10px;
}

.lane-summary {
  display: grid;
  grid-template-columns: 18px 1fr auto;
  align-items: center;
  gap: 8px 10px;
  padding: 11px 12px;
  cursor: pointer;
  list-style: none;
  user-select: none;
  box-sizing: border-box;
}

.lane-summary::-webkit-details-marker,
.lane-summary::marker {
  display: none;
  content: '';
}

.lane-summary::before {
  content: '';
  grid-column: 1;
  grid-row: 1;
  width: 7px;
  height: 7px;
  justify-self: center;
  align-self: center;
  border-right: 2px solid var(--text-muted);
  border-bottom: 2px solid var(--text-muted);
  transform: rotate(-45deg);
  transition: transform 0.15s ease;
}

details[open] > .lane-summary::before {
  transform: rotate(45deg);
}

.lane-summary-label {
  grid-column: 2;
  font-size: 13px;
  font-weight: 600;
  min-width: 0;
}

.lane-summary-meta {
  grid-column: 3;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  white-space: nowrap;
}

.lane-panel-summary .lane-summary-label {
  font-size: 13px;
}

.lane-section-summary .lane-summary-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
}

.lane-section-icon {
  display: inline-flex;
  flex-shrink: 0;
  color: var(--erasmus-blue, #003399);
}

.lane-section-body .step-item {
  border: none;
  border-radius: 0;
  background: transparent;
  padding: 10px 0;
  margin-bottom: 0;
  box-shadow: none;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.lane-section-body .step-item:last-child {
  border-bottom: none;
}

.lane-section-body .step-item.is-done {
  opacity: 0.9;
}

.lane-section-body .phase-field,
.lane-section-body input[type="text"],
.lane-section-body textarea,
.lane-section-body .step-upload-control .btn {
  border: 1px solid var(--border);
  border-radius: 8px;
}

.lane-section-body .step-checkbox-row {
  border: none;
}

.step-summary-details .step-summary-card {
  padding: 4px 12px 12px;
}

.na-resources-details .na-resources-block {
  padding: 4px 12px 12px;
  margin: 0;
  background: transparent;
  border: none;
}

/* Partner card */
.partner-card-wrap .sidebar-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 10px;
}

.partner-card-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.partner-card-title-row h3 {
  margin: 0;
}

.partner-stage-badge {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--bg-subtle);
  color: var(--text-muted);
}

.invite-row.is-primary {
  background: #f8fafc;
}

.invite-school {
  font-size: 13px;
  font-weight: 500;
  min-width: 0;
  flex: 1;
}

.invite-row-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.invite-state {
  font-size: 12px;
  font-weight: 600;
}

.invite-state.is-sent {
  color: var(--text-muted);
}

.invite-state.is-confirmed {
  color: var(--done);
}

.btn-send-invite-row {
  color: var(--erasmus-blue, #003399);
}

.partner-card-footer {
  margin-top: 10px;
  display: flex;
  justify-content: flex-start;
}

.btn-add-partner {
  padding-left: 0;
  font-weight: 500;
}

.step-item {
  padding: 12px 14px;
  box-sizing: border-box;
}

.edoc-cta-title {
  margin: 0 0 8px;
  font-size: 14px;
}

.edoc-cta-desc {
  margin: 0 0 12px;
  font-size: 13px;
  color: var(--text-muted);
}

@media (max-width: 1100px) {
  .workspace-grid-v2 {
    grid-template-columns: 1fr;
  }

  .workspace-layout {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
  }

  .workspace-phase-nav {
    grid-column: 1;
    grid-row: 1;
  }

  .workspace-step-panel {
    grid-column: 1;
    grid-row: 2;
  }

  .workspace-right-col {
    grid-column: 1;
    grid-row: 3;
  }

  .topbar-info-popover {
    width: min(440px, calc(100vw - 24px));
    left: auto;
    right: 0;
  }

  .topbar-title {
    max-width: 140px;
  }

}

/* Legacy workflow hub (unused) */
.workflow-hub-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  padding: 14px 16px;
  margin-bottom: 16px;
  border: 1px solid var(--border);
  border-radius: 10px;
}

.hub-eyebrow {
  margin: 0 0 4px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}

.hub-next-action {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.35;
}

.hub-header-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  flex-shrink: 0;
}

.hub-owner-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 6px;
  background: var(--bg-subtle, #f5f5f5);
  border: 1px solid var(--border);
}

.hub-status-chip {
  font-size: 11px;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 6px;
}

.hub-status-in-progress,
.hub-status-partnership {
  background: #e8f0fe;
  color: #003399;
}

.hub-status-waiting {
  background: #fff8e6;
  color: #8a6d00;
}

.hub-status-ready-for-bm {
  background: #e6f4ea;
  color: #137333;
}

.hub-meta-item {
  font-size: 12px;
  color: var(--text-muted);
}

.hub-meta-label {
  font-weight: 600;
}

.context-banner {
  padding: 10px 14px;
  margin-bottom: 16px;
  font-size: 13px;
  border-radius: var(--radius);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.context-banner-guest {
  background: #fff8e6;
  border: 1px solid #f0e0a0;
}

.context-banner-success {
  background: #e6f4ea;
  border: 1px solid #b7dfc5;
}

.sidebar-settings-icon .settings-glyph {
  font-size: 22px;
  line-height: 1;
  display: block;
  color: var(--text-muted);
}

.sidebar-settings-link:hover .settings-glyph {
  color: var(--text);
}

.step-schematic-id {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--bg-subtle);
  padding: 1px 5px;
  border-radius: 4px;
  margin-left: 4px;
}

.save-indicator {
  display: inline-block;
  font-size: 12px;
  color: var(--done);
  opacity: 0;
  transition: opacity 0.2s;
  margin-bottom: 8px;
}

.save-indicator.is-visible {
  opacity: 1;
}

.progress-rail-lines {
  list-style: none;
  padding: 0;
  margin: 0 0 8px;
  font-size: 13px;
}

.progress-rail-lines li {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  border-bottom: 1px solid var(--border);
}

.progress-rail-label {
  color: var(--text-muted);
}

.progress-rail-blocked {
  color: var(--text-muted);
  font-size: 12px;
  font-style: italic;
}

.inline-updates {
  margin-top: 20px;
}

.inline-updates-feed {
  max-height: 160px;
  overflow-y: auto;
  margin-bottom: 10px;
}

.inline-updates-compose textarea {
  width: 100%;
  margin-bottom: 8px;
  font-family: inherit;
  font-size: 13px;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: 8px;
}

.update-item-compact {
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}

.bm-readiness-panel {
  margin-bottom: 16px;
  padding: 16px;
}

.bm-vet-warning {
  padding: 10px 12px;
  background: #fff8e6;
  border-radius: 8px;
  font-size: 13px;
  margin: 0 0 12px;
}

.bm-readiness-checks {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
}

.bm-readiness-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.na-resources-block {
  font-size: 12px;
  margin-bottom: 12px;
  padding: 8px 10px;
  background: var(--bg-subtle);
  border-radius: 8px;
}

.na-resource-link {
  margin-left: 8px;
  color: var(--erasmus-blue);
}

.mobility-row-operational .mobility-row-head h3 {
  margin-bottom: 0;
}

.mobility-row-operational .mobility-row-head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-start;
}

.mobility-row-operational .mobility-row-body {
  width: 100%;
}

.mobility-row-next {
  width: 100%;
  margin: 4px 0 8px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
}

.mobility-row-owner {
  flex-shrink: 0;
}

.mobility-row-receiving {
  background: rgba(255, 204, 0, 0.04);
}

.mobility-row-owner-receiving {
  background: rgba(255, 204, 0, 0.18);
  color: #7a5f00;
}

.mobility-row-owner-sending {
  background: rgba(0, 51, 153, 0.1);
  color: var(--erasmus-blue);
}

.mobility-row-progress {
  font-weight: 600;
  color: var(--erasmus-blue);
}

.edoc-cta-card {
  margin-top: 16px;
  padding: 14px 16px;
}

/* Lane role icons */
.lane-role-icon {
  display: inline-flex;
  align-items: center;
  vertical-align: middle;
  margin-right: 6px;
}

.lane-role-icon .mobility-role-emoji {
  font-size: 15px;
  line-height: 1;
}

.partner-context-head .lane-role-icon .mobility-role-emoji {
  font-size: 16px;
}

.lane-summary-label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* Agreement status (derived, not checkbox) */
.step-agreement-status-wrap {
  margin-top: 16px;
}

.agreement-status-panel {
  padding: 16px 18px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fafbfc;
}

.agreement-status-panel.is-active {
  border-color: rgba(0, 51, 153, 0.35);
  background: rgba(0, 51, 153, 0.04);
}

.agreement-status-title {
  margin: 0 0 6px;
  font-size: 15px;
}

.agreement-status-lead {
  margin: 0 0 12px;
  font-size: 13px;
  color: var(--text-muted);
}

.agreement-status-list {
  margin: 0 0 12px;
  padding: 0;
  list-style: none;
}

.agreement-status-list li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  padding: 6px 0;
}

.agreement-status-list li.is-done {
  color: var(--erasmus-blue);
}

.agreement-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ccc;
  flex-shrink: 0;
}

.agreement-status-list li.is-done .agreement-status-dot {
  background: var(--erasmus-blue);
}

.agreement-status-result {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
}

.step-checkbox-reminder {
  opacity: 0.95;
}

.partner-summary-block {
  padding: 10px 12px;
  margin: 8px 0;
  background: #f7f8fa;
  border-radius: 8px;
  font-size: 13px;
}

/* Partner context rail */
.partner-context-card h3 {
  margin: 0;
  font-size: 14px;
}

.partner-context-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.partner-context-dl {
  margin: 0 0 10px;
  font-size: 13px;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4px 12px;
}

.partner-context-dl dt {
  color: var(--text-muted);
  margin: 0;
}

.partner-context-dl dd {
  margin: 0;
}

.partner-context-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.updates-readonly-hint {
  font-size: 13px;
  color: var(--text-muted);
  margin: 0 0 10px;
}

/* Partner profile hero */
.partner-profile-hero {
  border-radius: 14px;
  overflow: hidden;
  margin-bottom: 20px;
  background: linear-gradient(135deg, #e8eef5 0%, #f5f7fa 100%);
  background-size: cover;
  background-position: center;
  border: 1px solid var(--border);
}

.partner-profile-hero-inner {
  display: flex;
  gap: 20px;
  align-items: flex-end;
  padding: 24px;
  background: linear-gradient(to top, rgba(255, 255, 255, 0.95) 0%, rgba(255, 255, 255, 0.75) 100%);
}

.partner-profile-avatar-wrap {
  position: relative;
  width: 96px;
  height: 96px;
  flex-shrink: 0;
  border-radius: 14px;
  overflow: hidden;
  border: 3px solid #fff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  background: #e8eef5;
}

.partner-profile-avatar-wrap .partner-profile-avatar {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border: none;
  border-radius: 0;
  box-shadow: none;
}

.partner-profile-avatar-wrap .partner-profile-avatar-fallback {
  display: none;
  position: absolute;
  inset: 0;
  align-items: center;
  justify-content: center;
  color: var(--erasmus-blue);
}

.partner-profile-avatar-wrap.is-failed .partner-profile-avatar,
.partner-profile-avatar-wrap .partner-profile-avatar.is-failed {
  display: none;
}

.partner-profile-avatar-wrap.is-failed .partner-profile-avatar-fallback {
  display: flex;
}

.partner-profile-name {
  margin: 8px 0 6px;
  font-size: 26px;
  line-height: 1.2;
}

.partner-profile-lead {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 12px;
  color: var(--text-muted);
}

.partner-profile-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.partner-social-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.partner-facts-row {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}

.partner-fact-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
}

.partner-fact-icon {
  color: var(--erasmus-blue);
}

.partner-fact-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--text-muted);
}

.partner-fact-value {
  font-size: 15px;
  font-weight: 600;
}

.stay-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
  margin-top: 12px;
}

.stay-cards-grid-extra {
  margin-top: 14px;
}

.stay-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
}

.stay-card-media {
  position: relative;
  width: 100%;
  height: 140px;
  flex-shrink: 0;
  overflow: hidden;
  background: #f0f2f5;
}

.stay-card-media .stay-card-img {
  display: block;
  width: 100%;
  height: 100%;
  margin: 0;
  object-fit: cover;
}

.stay-card-media-fallback {
  display: none;
  position: absolute;
  inset: 0;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
}

.stay-card-media.is-failed .stay-card-img,
.stay-card-media .stay-card-img.is-failed {
  display: none;
}

.stay-card-media.is-failed .stay-card-media-fallback {
  display: flex;
}

.stay-card-body {
  padding: 12px 14px;
}

.stay-card-body h4 {
  margin: 0 0 4px;
  font-size: 15px;
}

.stay-card-meta,
.stay-card-used {
  margin: 0 0 6px;
  font-size: 12px;
  color: var(--text-muted);
}

.stay-card-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.sector-chip {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  background: rgba(0, 51, 153, 0.08);
  color: var(--erasmus-blue);
}

.partner-profile-hero-inner .partner-profile-avatar-wrap {
  margin-bottom: 0;
}

.partner-card-thumb {
  width: 100%;
  height: 100px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 10px;
  display: block;
}

.partner-card-thumb-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f0f2f5;
  color: var(--text-muted);
}

.partner-card-location {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Layout density */
#app-shell-inner.layout-compact .content {
  padding: 16px 20px;
}

#app-shell-inner.layout-compact .workspace-layout {
  gap: 12px;
}

#app-shell-inner.layout-compact .sidebar-card,
#app-shell-inner.layout-compact .partner-card {
  padding: 12px;
}

#app-shell-inner.sidebar-mode-auto.sidebar-collapsed .sidebar .nav-label {
  display: none;
}

.sidebar nav .sidebar-nav-notifications {
  position: relative;
}

/* Notifications drawer - opens to the right of the sidebar */
.notifications-backdrop {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: var(--sidebar-w);
  z-index: 350;
  background: rgba(0, 0, 0, 0.2);
}

#app-shell-inner.sidebar-collapsed .notifications-backdrop {
  left: var(--sidebar-collapsed-w);
}

.notifications-drawer {
  position: fixed;
  top: 0;
  left: var(--sidebar-w);
  z-index: 360;
  width: min(400px, calc(100vw - var(--sidebar-w)));
  height: 100vh;
  background: #fff;
  border: 1px solid var(--border);
  border-left: none;
  border-radius: 0 12px 12px 0;
  box-shadow: 4px 0 20px rgba(0, 0, 0, 0.08);
  transform: translateX(-100%);
  transition: transform 0.2s ease, visibility 0.2s ease;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  visibility: hidden;
  pointer-events: none;
}

#app-shell-inner.sidebar-collapsed .notifications-drawer {
  left: var(--sidebar-collapsed-w);
  width: min(400px, calc(100vw - var(--sidebar-collapsed-w)));
}

.notifications-drawer.is-open {
  visibility: visible;
  transform: translateX(0);
  pointer-events: auto;
}

.notifications-drawer[hidden] {
  display: none !important;
}

.notifications-drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.notifications-drawer-head h2 {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
}

.notifications-drawer-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

.notifications-drawer-actions .btn {
  font-size: 12px;
  padding: 4px 8px;
}

.notifications-drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 4px 0;
}

.notifications-empty {
  margin: 16px 14px;
  color: var(--text-muted);
  font-size: 13px;
}

.notification-item-compact {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  width: 100%;
  padding: 8px 14px;
  border: none;
  border-bottom: 1px solid var(--border);
  background: transparent;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  box-sizing: border-box;
  font-family: inherit;
  text-align: left;
}

a.notification-item-compact:hover {
  background: var(--bg);
  text-decoration: none;
}

.notification-item-compact.is-unread {
  background: rgba(0, 51, 153, 0.04);
}

.notification-item-compact.is-unread .notification-item-dot {
  background: var(--erasmus-blue, #003399);
}

.notification-item-dot {
  flex-shrink: 0;
  width: 6px;
  height: 6px;
  margin-top: 6px;
  border-radius: 50%;
  background: transparent;
}

.notification-item-text {
  flex: 1;
  min-width: 0;
}

.notification-item-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 2px;
}

.notification-item-title {
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.notification-item-time {
  flex-shrink: 0;
  font-size: 11px;
  color: var(--text-muted);
}

.notification-item-msg {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Documents library */
.library-page {
  max-width: 960px;
}

.library-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  margin-bottom: 14px;
}

.library-search-wrap {
  flex: 1;
  min-width: 200px;
  margin-bottom: 0;
}

.library-search-wrap .library-search,
.library-search-wrap .partner-search {
  margin-bottom: 0;
}

.library-section {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.library-section .library-tabs {
  margin-bottom: 14px;
}

.library-panel {
  width: 100%;
}

.library-panel-card {
  padding: 0;
  overflow: hidden;
  width: 100%;
}

.library-panel-card.library-empty-card {
  padding: 18px 20px;
}

.library-panel-card.library-empty-card p {
  margin: 0;
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.5;
}

.library-panel-lead {
  margin: 0;
  padding: 12px 18px;
  font-size: 13px;
  line-height: 1.45;
  color: var(--text-muted);
  background: #fafbfc;
  border-bottom: 1px solid var(--border);
}

.library-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.library-list-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
}

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

.library-template-text {
  flex: 1;
  min-width: 0;
}

.library-template-text strong {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 2px;
}

.library-edoc-nudge {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 12px;
  margin: 16px 0 0;
  padding: 12px 16px;
  font-size: 13px;
  line-height: 1.45;
  color: var(--text-muted);
  background: #f8f9fb;
  border-radius: 10px;
  border: 1px solid var(--border);
}

.library-edoc-nudge-text {
  margin: 0;
  flex: 1;
  min-width: 200px;
}

.btn-edoc-brand {
  color: var(--erasmus-blue, #003399);
  font-weight: 700;
  border: 1px solid rgba(0, 51, 153, 0.25);
  background: #fff;
}

.btn-edoc-brand:hover {
  background: #f0f4fc;
  border-color: var(--erasmus-blue, #003399);
}

.btn-edoc-brand .logo-plus {
  color: var(--erasmus-yellow, #ffcc00);
  font-weight: 800;
}

.library-empty,
.library-empty-hint {
  font-size: 14px;
  color: var(--text-muted);
  margin: 0;
  padding: 4px 0 8px;
}

.library-empty {
  padding: 16px 18px;
}

.library-empty p {
  margin: 0;
}

.step-edoc-hint {
  margin: 14px 0 0;
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
}

.step-edoc-hint-link {
  color: var(--erasmus-blue, #003399);
  font-weight: 500;
  text-decoration: none;
}

.step-edoc-hint-link:hover {
  text-decoration: underline;
}

.doc-row-main {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.doc-row-meta,
.template-row-meta {
  font-size: 12px;
  color: var(--text-muted);
}

.doc-row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  flex-shrink: 0;
}

.edoc-prefill-preview {
  margin-bottom: 14px;
  padding: 12px 14px;
  background: #f8f9fb;
  border-radius: 8px;
  border: 1px solid var(--border);
}

.edoc-preview-title {
  margin: 0 0 6px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--text-muted);
}

.edoc-preview-list {
  margin: 0;
  padding-left: 18px;
  font-size: 13px;
  line-height: 1.45;
}

/* Modal: mobility picker for eDocuments+ */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.4);
}

.modal-overlay[hidden] {
  display: none;
}

.modal-card {
  width: min(480px, 100%);
  max-height: 90vh;
  overflow-y: auto;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.18);
  padding: 20px 22px;
}

.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 8px;
}

.modal-head h2 {
  margin: 0;
  font-size: 18px;
  color: var(--erasmus-blue, #003399);
  font-weight: 700;
}

.modal-head h2 .logo-plus {
  color: var(--erasmus-yellow, #ffcc00);
  font-weight: 800;
}

.modal-lead {
  margin: 0 0 16px;
  font-size: 13px;
  color: var(--text-muted);
}

.modal-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
  font-size: 13px;
}

.modal-field span {
  font-weight: 600;
}

.modal-preview {
  margin-bottom: 14px;
  padding: 12px;
}

.modal-preview-title {
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--text-muted);
}

.edoc-preview-dl {
  margin: 0;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4px 12px;
  font-size: 13px;
}

.edoc-preview-dl dt {
  color: var(--text-muted);
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 8px;
}

/* Calendar */
.calendar-page {
  max-width: 1200px;
}

.calendar-toolbar {
  margin-bottom: 12px;
}

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

.calendar-month-label {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  min-width: 180px;
  text-align: center;
}

.calendar-legenda {
  position: relative;
  z-index: 30;
  margin-bottom: 12px;
  font-size: 12px;
  color: var(--text);
}

.calendar-legenda-bar,
.calendar-legenda-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fafbfc;
}

.calendar-legenda-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}

.calendar-legenda-swatch {
  display: inline-block;
  width: 22px;
  height: 10px;
  border-radius: 3px;
  background: var(--cal-color, #c5daf5);
  flex-shrink: 0;
}

.calendar-legenda-swatch.cal-span-send {
  background-color: var(--cal-color, #c5daf5);
  background-image: repeating-linear-gradient(
    -45deg,
    transparent 0,
    transparent 2px,
    rgba(255, 255, 255, 0.65) 2px,
    rgba(255, 255, 255, 0.65) 5px
  );
}

.calendar-legenda-swatch.cal-span-recv {
  background: var(--cal-color, #c5daf5);
}

.calendar-legenda-sep {
  width: 1px;
  height: 14px;
  background: var(--border);
  flex-shrink: 0;
}

.calendar-legenda-hint {
  font-size: 10px;
  color: var(--text-muted);
  font-weight: 400;
}

.calendar-legenda-month-btn {
  margin-left: auto;
  padding: 4px 10px;
  border: 1px solid rgba(0, 51, 153, 0.2);
  border-radius: 6px;
  background: #fff;
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  color: var(--erasmus-blue, #003399);
  cursor: pointer;
}

.calendar-legenda-month-btn:hover,
.calendar-legenda-month-btn:focus-visible {
  background: rgba(0, 51, 153, 0.06);
  outline: none;
}

.calendar-legenda-month-btn.is-open {
  background: rgba(0, 51, 153, 0.08);
}

.calendar-legenda-month-caret {
  font-size: 10px;
  opacity: 0.75;
}

.calendar-legenda-month-btn.is-open .calendar-legenda-month-caret {
  display: inline-block;
  transform: rotate(180deg);
}

.calendar-legenda-drawer {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 6px);
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.12);
}

.calendar-legenda-drawer-list {
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 13px;
  line-height: 1.45;
}

.calendar-legenda-drawer-item {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}

.calendar-legenda-drawer-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.calendar-legenda-drawer-item:first-child {
  padding-top: 0;
}

.calendar-legenda-drawer-list a {
  color: var(--erasmus-blue, #003399);
  font-weight: 600;
  text-decoration: none;
  white-space: normal;
  overflow: visible;
  text-overflow: unset;
  max-width: none;
}

.calendar-legenda-drawer-meta {
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 400;
}

.calendar-legenda-drawer-list a:hover {
  text-decoration: underline;
}

@media (max-width: 720px) {
  .calendar-legenda-month-btn {
    margin-left: 0;
    width: 100%;
    justify-content: center;
  }
}

.calendar-wrap {
  padding: 16px;
  overflow-x: auto;
}

.calendar-grid {
  min-width: 640px;
}

.calendar-weekdays {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
  margin-bottom: 6px;
}

.calendar-weekday {
  font-size: 11px;
  font-weight: 600;
  text-align: center;
  color: var(--text-muted);
  padding: 6px 4px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.calendar-days {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
}

.calendar-day {
  min-height: 108px;
  padding: 6px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.calendar-day-pad {
  background: transparent;
  border-color: transparent;
  min-height: 0;
}

.calendar-day-head {
  flex-shrink: 0;
  height: 22px;
  display: flex;
  align-items: center;
}

.calendar-day-num {
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  flex-shrink: 0;
}

.calendar-day-today .calendar-day-num {
  background: var(--erasmus-blue, #003399);
  color: #fff;
  border-radius: 50%;
  font-size: 11px;
}

.calendar-day-has-events {
  background: #fafbfc;
}

.calendar-day-events {
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.calendar-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.cal-span {
  display: block;
  text-decoration: none;
  color: #2a3f5c;
  overflow: hidden;
}

.cal-span:hover {
  text-decoration: none;
  color: #1a3050;
}

.cal-span-inner {
  display: flex;
  align-items: center;
  gap: 4px;
  height: 16px;
  min-height: 16px;
  max-height: 16px;
  padding: 0 6px;
  border-radius: 4px;
  background-color: var(--cal-color, #c5daf5);
  font-size: 10px;
  font-weight: 600;
  line-height: 1;
  overflow: hidden;
  transition: box-shadow 0.12s ease, opacity 0.12s ease;
}

/* Receiving = solid fill */
.cal-span-recv .cal-span-inner {
  background-color: var(--cal-color, #c5daf5);
  background-image: none;
}

/* Sending = striped overlay on activity colour */
.cal-span-send .cal-span-inner {
  background-color: var(--cal-color, #c5daf5);
  background-image: repeating-linear-gradient(
    -45deg,
    transparent 0,
    transparent 3px,
    rgba(255, 255, 255, 0.55) 3px,
    rgba(255, 255, 255, 0.55) 7px
  );
}

.cal-span-emoji {
  flex-shrink: 0;
  font-size: 10px;
  line-height: 1;
}

.cal-span-label {
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cal-span:not(:has(.cal-span-label)) .cal-span-inner {
  justify-content: flex-start;
}

.cal-span:not(:has(.cal-span-label)) .cal-span-emoji {
  margin: 0 auto;
  opacity: 0.9;
}

.calendar-wrap.is-highlighting-mobility .cal-span:not(.is-mobility-highlighted) .cal-span-inner {
  opacity: 0.35;
}

.cal-span.is-mobility-highlighted .cal-span-inner {
  opacity: 1;
  box-shadow: 0 0 0 2px var(--erasmus-blue, #003399), 0 1px 4px rgba(0, 51, 153, 0.2);
}

.calendar-event-more {
  font-size: 10px;
  color: var(--text-muted);
  padding: 2px 0;
}

/* Updates - two-column stream */
.updates-page {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}

.updates-page-lead {
  margin: 0 0 14px;
  font-size: 13px;
  color: var(--text-muted);
  max-width: 52em;
}

.updates-layout-two {
  display: grid;
  grid-template-columns: minmax(240px, 360px) 1fr;
  gap: 0;
  flex: 1;
  min-height: 480px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
  overflow: hidden;
}

.updates-mobility-col,
.updates-stream-col {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.updates-mobility-col {
  border-right: 1px solid var(--border);
}

.updates-stream-col {
  background: #f8f9fb;
}

.updates-col-title {
  margin: 0;
  padding: 10px 12px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.updates-mobility-list {
  flex: 1;
  overflow-y: auto;
}

.updates-stream-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  background: #fff;
  flex-shrink: 0;
}

.updates-stream-head-text {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px 14px;
}

.updates-stream-head h2 {
  margin: 0;
  font-size: 16px;
  line-height: 1.25;
}

.updates-stream-sub {
  margin: 0;
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.25;
}

.updates-open-mobility {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  text-decoration: none;
}

.updates-open-mobility svg {
  flex-shrink: 0;
}

.updates-stream {
  flex: 1;
  overflow-y: auto;
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.updates-stream-empty {
  margin: 0;
  color: var(--text-muted);
  font-size: 14px;
}

.updates-thread-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 100%;
}

.updates-post-byline {
  margin: 0;
  font-size: 11px;
  line-height: 1.3;
  color: var(--text-muted);
}

.updates-thread-item-partner .updates-post-byline {
  text-align: left;
}

.updates-thread-item-mine .updates-post-byline {
  text-align: right;
}

.updates-post-byline-you {
  font-weight: 600;
  color: var(--text);
}

.updates-post {
  position: relative;
  width: 100%;
  padding: 10px 12px;
  padding-right: 118px;
  border-radius: 8px;
  border: 1px solid var(--border);
  box-sizing: border-box;
}

.updates-thread-item-mine .updates-post {
  background: #fff;
}

.updates-thread-item-partner .updates-post {
  background: #f4f5f7;
}

.updates-post-latest {
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.updates-post-time {
  position: absolute;
  top: 10px;
  right: 12px;
  font-size: 11px;
  line-height: 1.3;
  color: var(--text-muted);
  text-align: right;
  max-width: 108px;
}

.updates-post-body {
  margin: 0;
  font-size: 14px;
  line-height: 1.45;
  color: var(--text);
}

.updates-post-latest .updates-post-body {
  font-size: 14px;
}

.updates-post-attach {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 8px 0 0;
  padding: 5px 8px;
  background: rgba(255, 255, 255, 0.65);
  border-radius: 6px;
  font-size: 12px;
  color: var(--text-muted);
}

.updates-thread-item-partner .updates-post-attach {
  background: rgba(255, 255, 255, 0.55);
}

.updates-post-attach .ui-icon {
  flex-shrink: 0;
  opacity: 0.7;
}

.updates-compose-bar {
  flex-shrink: 0;
  padding: 10px 16px 12px;
  border-top: 1px solid var(--border);
  background: #fff;
}

.updates-compose-label {
  display: block;
  margin-bottom: 6px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
}

.updates-compose-input {
  width: 100%;
  margin-bottom: 8px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-family: inherit;
  font-size: 13px;
  line-height: 1.45;
  resize: vertical;
  min-height: 72px;
  box-sizing: border-box;
}

.updates-compose-note {
  margin: 6px 0 0;
  font-size: 11px;
  color: var(--text-muted);
}

.updates-attach-btn {
  cursor: pointer;
  margin: 0;
}

.updates-compose-bar .updates-compose-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.updates-compose-actions-group {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.updates-compose-hint {
  margin: 0 0 8px;
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.4;
}

.updates-compose-actions .btn-with-icon .ui-icon {
  opacity: 0.9;
}

.updates-mobility-item {
  display: block;
  width: 100%;
  padding: 8px 10px;
  border: none;
  border-bottom: 1px solid var(--border);
  background: transparent;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
  color: inherit;
}

.updates-mobility-item-layout {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.updates-mobility-item-layout .mobility-row-thumb-wrap {
  width: 52px;
  height: 52px;
  max-width: 52px;
  flex: 0 0 52px;
}

.updates-mobility-item-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.updates-mobility-item .updates-mobility-head {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 6px;
  row-gap: 4px;
  width: 100%;
}

.updates-mobility-item .mobility-row-role-icon {
  grid-column: 1;
  width: 22px;
  height: 22px;
  justify-self: start;
}

.updates-mobility-item .updates-mobility-head strong {
  grid-column: 2;
  justify-self: start;
  text-align: left;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.updates-mobility-item .updates-mobility-head .hub-owner-badge {
  grid-column: 3;
  justify-self: end;
}

.updates-mobility-item .mobility-row-role-icon .mobility-role-emoji {
  font-size: 14px;
}

.updates-mobility-item:hover {
  background: #f5f6f8;
}

.updates-mobility-item.is-active {
  background: rgba(0, 51, 153, 0.08);
  font-weight: 500;
}

.updates-mobility-item.has-unread strong {
  color: var(--erasmus-blue, #003399);
}

.updates-mobility-head {
  width: 100%;
}

.updates-mobility-meta {
  font-size: 11px;
  color: var(--text-muted);
}

.updates-empty-col {
  margin: 0;
  padding: 20px 14px;
  font-size: 13px;
  color: var(--text-muted);
}

@media (max-width: 800px) {
  .updates-layout-two {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr;
  }

  .updates-mobility-col {
    max-height: 200px;
    border-right: none;
    border-bottom: 1px solid var(--border);
  }
}

@media (max-width: 960px) {
  #app-shell-inner.sidebar-mode-auto:not(.sidebar-collapsed) .sidebar {
    width: 56px;
  }
}

/* Subscribe popup · app pages */
body.subscribe-popup-open {
  overflow: hidden;
}

.subscribe-popup-overlay {
  position: fixed;
  inset: 0;
  z-index: 10200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(23, 23, 23, 0.45);
  backdrop-filter: blur(4px);
}

.subscribe-popup-panel {
  position: relative;
  width: min(480px, calc(100vw - 40px));
  max-height: min(94vh, 900px);
  overflow: auto;
  padding: 28px 24px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 20px 60px rgba(0, 51, 153, 0.18);
}

.subscribe-popup-close {
  position: absolute;
  top: 10px;
  right: 12px;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text-muted);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.subscribe-popup-close:hover {
  background: var(--bg);
  color: var(--text);
}

.subscribe-popup-panel h2 {
  margin: 0 32px 8px 0;
  font-size: 20px;
  color: var(--erasmus-blue);
}

.subscribe-popup-lead {
  margin: 0 0 16px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-muted);
}

.subscribe-popup-panel .logo-plus {
  color: var(--erasmus-yellow);
  font-weight: 800;
}

/* Kit form · modal source (9543834) */
.subscribe-popup-kit-mount {
  margin-top: 4px;
}

.subscribe-popup-panel .formkit-powered-by-convertkit-container {
  display: none !important;
}

.subscribe-popup-panel .formkit-form[data-uid="a58d33c756"] {
  max-width: none;
  margin: 0;
}

.subscribe-popup-panel .formkit-form[data-uid="a58d33c756"] .formkit-fields {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin: 0;
}

.subscribe-popup-panel .formkit-form[data-uid="a58d33c756"] .formkit-field,
.subscribe-popup-panel .formkit-form[data-uid="a58d33c756"] .formkit-submit {
  flex: none;
  width: 100%;
  margin: 0 0 12px;
}

.subscribe-popup-panel .formkit-form[data-uid="a58d33c756"] .formkit-input {
  width: 100%;
  padding: 12px 14px;
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-sizing: border-box;
}

.subscribe-popup-panel .formkit-form[data-uid="a58d33c756"] .formkit-input:focus {
  outline: none;
  border-color: var(--erasmus-blue);
}

.subscribe-popup-panel .formkit-form[data-uid="a58d33c756"] .formkit-submit {
  display: block;
  width: 100%;
  margin-bottom: 0;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: var(--erasmus-blue);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 51, 153, 0.18);
}

.subscribe-popup-panel .formkit-form[data-uid="a58d33c756"] .formkit-submit:hover {
  background: var(--accent-hover);
}

.subscribe-popup-panel .formkit-form[data-uid="a58d33c756"] .formkit-submit > span {
  display: block;
  padding: 12px 24px;
}

.subscribe-popup-panel .formkit-form[data-uid="a58d33c756"] .formkit-alert-success {
  margin: 12px 0 0;
  padding: 12px;
  font-size: 14px;
  text-align: center;
  border-radius: 10px;
}

.subscribe-popup-privacy {
  margin: 12px 0 0;
  font-size: 12px;
  color: var(--text-muted);
  text-align: center;
}

/* Kit form · slide-in source (9543853) */
.subscribe-slidein {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 10100;
  width: min(460px, calc(100vw - 32px));
  max-height: min(92vh, 720px);
  overflow: auto;
  border-radius: 8px;
  box-shadow: 0 8px 32px rgba(0, 51, 153, 0.22);
  transform: translateY(calc(100% + 24px));
  opacity: 0;
  transition: transform 0.28s ease, opacity 0.28s ease;
}

.subscribe-slidein.is-visible {
  transform: translateY(0);
  opacity: 1;
}

.subscribe-slidein.is-leaving {
  transform: translateY(calc(100% + 24px));
  opacity: 0;
}

.subscribe-slidein-close {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 3;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--text-muted);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
}

.subscribe-slidein-close:hover {
  color: var(--text);
  background: #fff;
}

.subscribe-slidein-kit-mount {
  position: relative;
}

.subscribe-slidein .formkit-powered-by-convertkit-container {
  display: none !important;
}

.subscribe-slidein .formkit-form[data-uid="95a9431c47"] {
  max-width: none;
  margin: 0;
  overflow: hidden;
  background: #fff;
  border-radius: 8px;
}

.subscribe-slidein .formkit-form[data-uid="95a9431c47"] [data-style="card"] {
  display: block;
  width: 100%;
}

.subscribe-slidein .formkit-form[data-uid="95a9431c47"] .formkit-column-header {
  position: relative;
  padding: 28px 24px 22px;
  background: var(--erasmus-blue);
  color: #fff;
  overflow: hidden;
}

.subscribe-slidein .formkit-form[data-uid="95a9431c47"] .formkit-background {
  position: absolute;
  inset: 0;
  opacity: 0.2;
  background: linear-gradient(135deg, rgba(255, 204, 0, 0.35), transparent 60%);
  pointer-events: none;
}

.subscribe-slidein .formkit-form[data-uid="95a9431c47"] .formkit-header {
  position: relative;
  z-index: 1;
  margin: 0;
}

.subscribe-slidein .formkit-form[data-uid="95a9431c47"] .formkit-header h2 {
  margin: 0;
  padding-right: 28px;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.3;
  color: #fff;
}

.subscribe-slidein .formkit-form[data-uid="95a9431c47"] .formkit-column-body {
  padding: 22px 24px 24px;
}

.subscribe-slidein .formkit-form[data-uid="95a9431c47"] .formkit-subheader {
  margin: 0 0 16px;
  font-size: 16px;
  line-height: 1.4;
  color: var(--erasmus-blue);
}

.subscribe-slidein .formkit-form[data-uid="95a9431c47"] .formkit-subheader p {
  margin: 0;
}

.subscribe-slidein .formkit-form[data-uid="95a9431c47"] .formkit-field {
  margin: 0 0 12px;
}

.subscribe-slidein .formkit-form[data-uid="95a9431c47"] .formkit-input {
  width: 100%;
  padding: 12px 14px;
  font-size: 14px;
  font-weight: 600;
  color: var(--erasmus-blue);
  background: #fff;
  border: 1px solid #e3e3e3;
  border-radius: 4px;
  box-sizing: border-box;
}

.subscribe-slidein .formkit-form[data-uid="95a9431c47"] .formkit-input:focus {
  outline: none;
  border-color: var(--erasmus-blue);
}

.subscribe-slidein .formkit-form[data-uid="95a9431c47"] .formkit-submit {
  display: block;
  width: 100%;
  margin: 4px 0 0;
  padding: 0;
  border: 0;
  border-radius: 24px;
  background: var(--erasmus-yellow);
  color: var(--erasmus-blue);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.subscribe-slidein .formkit-form[data-uid="95a9431c47"] .formkit-submit > span {
  display: block;
  padding: 12px 24px;
}

.subscribe-slidein .formkit-form[data-uid="95a9431c47"] .formkit-guarantee {
  margin: 16px 0 0;
  font-size: 13px;
  line-height: 1.4;
  text-align: center;
  color: #7d7d7d;
}

.subscribe-slidein .formkit-form[data-uid="95a9431c47"] .formkit-alert-success {
  margin: 12px 0 0;
  padding: 12px;
  font-size: 13px;
  text-align: center;
  border-radius: 8px;
}

@media (max-width: 720px) {
  .subscribe-popup-overlay {
    padding: 12px;
  }

  .subscribe-popup-panel {
    width: 100%;
    max-height: 94vh;
    padding: 24px 18px 18px;
  }

  .subscribe-slidein {
    right: 12px;
    bottom: 12px;
    width: calc(100vw - 24px);
  }
}
