:root {
  --bg: #f7f4ef;
  --surface: #ffffff;
  --ink: #101820;
  --accent: #b94e48;
  --muted: #53626f;
  --status-ok-bg: #e8f1eb;
  --status-ok-ink: #335b45;
  --status-warn-bg: #f3efe3;
  --status-warn-ink: #786748;
  --status-bad-bg: #f4e7e4;
  --status-bad-ink: #7a4b45;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Georgia", "Times New Roman", serif;
  background: radial-gradient(circle at top right, #e8ece8, var(--bg));
  color: var(--ink);
}

.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  background: var(--surface);
  border-bottom: 1px solid #d9dfdd;
}

.logo {
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
  font-size: 1.25rem;
  font-family: inherit;
  letter-spacing: 0.01em;
}

nav a {
  margin-left: 1rem;
  color: var(--muted);
  text-decoration: none;
}

.container {
  max-width: 900px;
  margin: 1.2rem auto 2rem;
  padding: 0 1rem;
}

h1, h2, h3 {
  margin-top: 0;
  line-height: 1.2;
}

h1 {
  font-size: 2rem;
  margin-bottom: 0.9rem;
}

h2 {
  font-size: 1.45rem;
  margin-bottom: 0.75rem;
}

h3 {
  font-size: 1.2rem;
  margin-bottom: 0.65rem;
}

.hero {
  background: var(--surface);
  padding: 2rem;
  border-radius: 12px;
}

.button {
  display: inline-block;
  padding: 0.42rem 0.9rem;
  border-radius: 999px;
  border: 1px solid #b8b2a5;
  background: #fffdf9;
  color: #182430;
  font-family: inherit;
  font-size: 0.93rem;
  font-weight: 600;
  line-height: 1.15;
  text-decoration: none;
  letter-spacing: 0.01em;
  transition: background 120ms ease, border-color 120ms ease, transform 120ms ease;
  cursor: pointer;
}

.button:hover {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  transform: translateY(-1px);
}

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

.actions {
  margin-top: 1rem;
  display: flex;
  gap: 0.75rem;
}

form {
  background: var(--surface);
  padding: 1rem;
  border-radius: 10px;
  border: 1px solid #e9ece6;
}

form.form-flat {
  background: transparent;
  border: 0;
  padding: 0;
  border-radius: 0;
}

input, textarea, select {
  width: 100%;
  padding: 0.45rem;
  margin-top: 0.25rem;
}

textarea {
  resize: vertical;
  max-width: 100%;
  overflow-x: hidden;
}

.rb-panel {
  background: var(--surface);
  border: 1px solid #e5e8e1;
  border-radius: 12px;
  padding: 1rem 1.2rem;
  margin-bottom: 1rem;
}

.rb-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: nowrap;
}

.rb-header h2 {
  margin: 0;
}

.rb-header-title {
  margin: 0;
  font-size: 1.55rem;
}

.rb-switch-form {
  margin-top: 0.75rem;
}

.rb-feedback {
  color: var(--muted);
  min-height: 1.25rem;
  margin: 0.2rem 0 0;
}

.rb-entry-meta-application [data-job-error]:empty {
  display: none;
}

#section-groups {
  display: grid;
  gap: 0.8rem;
}

.rb-help {
  color: var(--muted);
  margin-top: 0;
}

.rb-group {
  background: #fcfbf8;
  border: 1px solid #e5dfd3;
  border-radius: 12px;
  padding: 0.8rem;
}

.rb-group-header {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin-bottom: 0.65rem;
}

.rb-group-header h3 {
  margin: 0;
  font-size: 1.1rem;
}

.rb-drag-handle {
  cursor: grab;
  color: #8f7f6a;
  user-select: none;
}

.rb-group-count {
  margin-left: auto;
  min-width: 1.6rem;
  text-align: center;
  font-size: 0.82rem;
  color: #735f46;
  background: #f3ece0;
  border-radius: 999px;
  padding: 0.1rem 0.4rem;
}

.rb-group.rb-group-dragging {
  opacity: 0.45;
}

.rb-entry-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.55rem;
}

.rb-entry-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.8rem;
  background: #fbfaf7;
  border: 1px solid #ece7dd;
  border-radius: 10px;
  padding: 0.65rem 0.8rem;
}

.rb-entry-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  line-height: 1.35;
}

.rb-entry-meta-application {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.rb-entry-meta-link {
  color: inherit;
  text-decoration: none;
  cursor: pointer;
}

.rb-entry-meta-link:hover .rb-entry-text-truncate {
  text-decoration: underline;
  text-decoration-color: rgba(194, 82, 70, 0.45);
  text-underline-offset: 0.12em;
}

.rb-entry-title-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
}

.rb-entry-section {
  font-weight: 700;
  flex-shrink: 0;
}

.rb-entry-text-truncate {
  min-width: 0;
  flex: 1 1 auto;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rb-entry-actions {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-shrink: 0;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.rb-entry-actions form {
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
}

.rb-entry-actions .button,
.rb-header .button {
  padding: 0.35rem 0.78rem;
}

.rb-entry-empty {
  color: var(--muted);
  font-style: italic;
}

.rb-error {
  color: var(--accent);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  font-weight: 700;
  border-radius: 999px;
  padding: 0.24rem 0.72rem;
  font-size: 0.84rem;
  line-height: 1.2;
  border: 1px solid transparent;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.32);
}

.status-pill-ok {
  background: var(--status-ok-bg);
  color: var(--status-ok-ink);
  border-color: #d2e4d8;
}

.status-pill-warn {
  background: var(--status-warn-bg);
  color: var(--status-warn-ink);
  border-color: #e6dcc5;
}

.status-pill-bad {
  background: var(--status-bad-bg);
  color: var(--status-bad-ink);
  border-color: #e7cfca;
}

form.action-inline {
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  display: inline-flex;
}

.rb-job-catalog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.rb-loading-indicator {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.rb-loading-indicator-inline {
  min-width: 1rem;
  justify-content: flex-end;
}

.rb-spinner {
  width: 1rem;
  height: 1rem;
  border-radius: 50%;
  border: 2px solid #d6d0c4;
  border-top-color: var(--accent);
  animation: rb-spin 0.85s linear infinite;
}

.rb-spinner-large {
  width: 2.2rem;
  height: 2.2rem;
  border-width: 3px;
}

.rb-jobs-layout {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
}

.rb-jobs-page-shell {
  width: min(1180px, calc(100vw - 2rem));
  margin-left: 50%;
  transform: translateX(-50%);
}

.rb-jobs-sidebar {
  position: sticky;
  top: 1rem;
}

.rb-jobs-sidebar-panel {
  margin-bottom: 0;
}

.rb-jobs-results {
  min-width: 0;
}

.rb-jobs-results .rb-entry-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: start;
}

.rb-job-card-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.rb-job-card-company {
  font-weight: 700;
  line-height: 1.2;
}

.rb-job-card-title {
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  max-height: 2.7em;
}

.rb-job-card-meta,
.rb-job-card-date {
  color: var(--muted);
  line-height: 1.35;
}

.rb-job-card-meta {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rb-job-card-date {
  margin-top: 0.05rem;
}

.rb-jobs-results .rb-entry-actions {
  align-self: start;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.rb-job-quick-apply {
  position: relative;
}

.rb-job-quick-apply-menu {
  position: absolute;
  top: calc(100% + 0.45rem);
  right: 0;
  z-index: 4;
  width: 220px;
  padding: 0.75rem;
  border: 1px solid #ece7dd;
  border-radius: 10px;
  background: #fbfaf7;
  box-shadow: 0 10px 24px rgba(43, 38, 30, 0.12);
}

.rb-job-quick-apply-label {
  display: block;
  font-weight: 700;
  margin-bottom: 0.35rem;
}

.rb-job-quick-apply-menu select {
  width: 100%;
}

.rb-job-quick-apply-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.45rem;
  margin-top: 0.65rem;
}

.rb-button-disabled,
.rb-button-disabled:hover {
  background: #e4ded4;
  color: #756b5b;
  border-color: #d4cab8;
  cursor: default;
}

.rb-jobs-loading-shell {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 12rem;
}

.rb-jobs-page-loader {
  justify-content: center;
  margin: 0.75rem 0 0.25rem;
}

.rb-jobs-loading-shell[hidden],
.rb-jobs-page-loader[hidden] {
  display: none !important;
}

[data-scroll-sentinel] {
  height: 1px;
}

@keyframes rb-spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 920px) {
  .rb-jobs-page-shell {
    width: 100%;
    margin-left: 0;
    transform: none;
  }

  .rb-jobs-layout {
    grid-template-columns: 1fr;
  }

  .rb-jobs-sidebar {
    position: static;
  }

  .rb-jobs-results .rb-entry-item {
    grid-template-columns: 1fr;
  }

  .rb-jobs-results .rb-entry-actions {
    justify-content: flex-start;
  }

  .rb-job-quick-apply-menu {
    left: 0;
    right: auto;
  }
}
