/* ── Variables ──────────────────────────────────────────────────────────────── */

:root {
  --accent: #ff7024;
}

[data-theme='dark'] {
  --bg: #111214;
  --surface: #1d2125;
  --surface2: #22272b;
  --border: #282e33;
  --border2: #3b4148;
  --text: #b6c2cf;
  --text-strong: #c7d1db;
  --text-head: #dee4ea;
  --muted: #738496;
  --row-hover: #1a2130;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.4), 0 4px 12px rgba(0, 0, 0, 0.3);
}

[data-theme='light'] {
  --bg: #f0f2f5;
  --surface: #ffffff;
  --surface2: #f4f6f8;
  --border: #dde0e5;
  --border2: #c4cdd6;
  --text: #44546f;
  --text-strong: #172b4d;
  --text-head: #172b4d;
  --muted: #8590a2;
  --row-hover: #e8f0fe;
  --shadow: 0 1px 2px rgba(9, 30, 66, 0.08), 0 4px 12px rgba(9, 30, 66, 0.06);
  --accent: #e56319;
}

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

body {
  margin: 0;
  padding: 0;
  display: block !important;
  align-items: initial !important;
  justify-content: initial !important;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Inter', system-ui, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* ── Page ─────────────────────────────────────────────────────────────────── */

.sb-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ── Header ───────────────────────────────────────────────────────────────── */

.sb-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 0 20px;
  height: 52px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: var(--shadow);
  flex-shrink: 0;
}

.sb-back {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 4px;
  color: var(--muted);
  text-decoration: none;
  transition:
    background 0.15s,
    color 0.15s;
  flex-shrink: 0;
}

.sb-back:hover {
  background: var(--surface2);
  color: var(--accent);
}

.sb-header-id {
  flex: 1;
  min-width: 0;
}

.sb-header-name {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-head);
  line-height: 1.1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sb-header-role {
  font-size: 0.72rem;
  color: var(--accent);
  font-weight: 500;
  margin-top: 1px;
}

.sb-header-role span {
  color: var(--muted);
}

.sb-header-links {
  display: flex;
  gap: 16px;
  font-size: 0.73rem;
  flex-shrink: 0;
}

.sb-header-links a {
  color: var(--muted);
  text-decoration: none;
  transition: color 0.15s;
  white-space: nowrap;
}

.sb-header-links a:hover {
  color: var(--accent);
}

.sb-header-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-shrink: 0;
}

.sb-icon-btn {
  background: none;
  border: 1px solid var(--border);
  color: var(--muted);
  width: 30px;
  height: 30px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.82rem;
  transition: all 0.15s;
}

.sb-icon-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.sb-header-actions #theme-toggle {
  font-size: 0.82rem;
  border: 1px solid var(--border);
  width: 30px;
  height: 30px;
  border-radius: 4px;
  padding: 0;
  line-height: 1;
}

.sb-btn {
  height: 30px;
  padding: 0 12px;
  border-radius: 4px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid transparent;
  white-space: nowrap;
  transition: all 0.15s;
}

.sb-btn-hire {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.sb-btn-hire:hover {
  filter: brightness(1.1);
}
.sb-btn-book {
  background: var(--surface2);
  color: var(--text);
  border-color: var(--border);
}
.sb-btn-book:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ── Contacts popup (mobile) ──────────────────────────────────────────────── */

.sb-contacts-wrap {
  position: relative;
  display: none;
}

.sb-contacts-popup {
  display: none;
  flex-direction: column;
  gap: 10px;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: 6px;
  padding: 14px 16px;
  box-shadow: var(--shadow);
  z-index: 200;
  min-width: 220px;
}

.sb-contacts-popup.open {
  display: flex;
}

.sb-contacts-popup-heading {
  font-size: 0.67rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin-bottom: 2px;
}

.sb-contacts-popup a {
  color: var(--text);
  text-decoration: none;
  font-size: 0.84rem;
  transition: color 0.15s;
}

.sb-contacts-popup a:hover {
  color: var(--accent);
}

@media (max-width: 1200px) {
  .sb-header-links {
    display: none;
  }
  .sb-contacts-wrap {
    display: block;
  }
}

@media (max-width: 720px) {
  .sb-scrum-view {
    display: none;
  }
}

@media (max-width: 600px) {
  .sb-btn-label {
    display: none;
  }
}

@media (max-width: 500px) {
  .sb-header-role {
    display: none;
  }
  .sb-header-name {
    white-space: normal;
  }
}

@media (max-width: 400px) {
  .sb-header-name {
    display: none;
  }
}

/* ── Board ────────────────────────────────────────────────────────────────── */

.sb-board {
  display: flex;
  gap: 16px;
  padding: 20px;
  flex: 1;
  overflow-x: auto;
  align-items: flex-start;
}

/* ── Column ───────────────────────────────────────────────────────────────── */

.sb-column {
  flex: 0 0 300px;
  display: flex;
  flex-direction: column;
}

.sb-col-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-bottom: 2px solid var(--border2);
  border-radius: 6px 6px 0 0;
  user-select: none;
}

.sb-col-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.sb-col-title {
  flex: 1;
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-head);
}

.sb-col-count {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--muted);
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0 7px;
  min-width: 20px;
  text-align: center;
}

.sb-col-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-top: none;
  border-radius: 0 0 6px 6px;
  min-height: 80px;
  transition:
    background 0.15s,
    outline 0.1s;
}

.sb-col-body.drag-over {
  background: var(--row-hover);
  outline: 2px dashed var(--accent);
  outline-offset: -3px;
}

/* ── Card ─────────────────────────────────────────────────────────────────── */

.sb-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  display: flex;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.07);
  cursor: grab;
  transition:
    box-shadow 0.15s,
    transform 0.15s,
    opacity 0.15s;
  user-select: none;
}

.sb-card:hover {
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.13);
  transform: translateY(-2px);
}

.sb-card:active {
  cursor: grabbing;
}

.sb-card.dragging {
  opacity: 0.35;
  cursor: grabbing;
}

.sb-card-accent {
  width: 4px;
  flex-shrink: 0;
}

.sb-card-body {
  flex: 1;
  padding: 12px 14px;
  min-width: 0;
}

.sb-card-head {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-bottom: 9px;
}

.sb-card-logo {
  width: 34px;
  height: 34px;
  border-radius: 6px;
  border: 1px solid var(--border);
  object-fit: contain;
  padding: 3px;
  background: var(--surface2);
  flex-shrink: 0;
}

.sb-card-initials {
  width: 34px;
  height: 34px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  font-weight: 800;
  flex-shrink: 0;
  border: 1px solid transparent;
}

.sb-card-id {
  flex: 1;
  min-width: 0;
}

.sb-card-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-strong);
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sb-card-company {
  font-size: 0.72rem;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}

.sb-card-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.sb-period {
  font-size: 0.67rem;
  color: var(--muted);
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 1px 6px;
  white-space: nowrap;
}

.sb-live-badge {
  font-size: 0.63rem;
  font-weight: 700;
  color: #fff;
  background: var(--accent);
  border-radius: 3px;
  padding: 1px 6px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  animation: sb-blink 1.8s ease-in-out infinite;
}

@keyframes sb-blink {
  0%,
  100% {
    opacity: 0.7;
  }
  50% {
    opacity: 1;
  }
}

.sb-card-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.sb-chip {
  font-size: 0.65rem;
  padding: 2px 6px;
  border-radius: 3px;
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text);
}

/* ── Skeleton card ────────────────────────────────────────────────────────── */

@keyframes shimmer {
  0% {
    background-position: -300% 0;
  }
  100% {
    background-position: 300% 0;
  }
}

@keyframes shimmer-v {
  0% {
    background-position: 0 -300%;
  }
  100% {
    background-position: 0 300%;
  }
}

.sk-block {
  border-radius: 4px;
  background: linear-gradient(90deg, var(--surface2) 25%, var(--border2) 50%, var(--surface2) 75%);
  background-size: 300% 100%;
  animation: shimmer 1.8s ease-in-out infinite;
}

.sk-avatar {
  width: 34px;
  height: 34px;
  border-radius: 6px;
  flex-shrink: 0;
}
.sk-title {
  height: 13px;
  width: 72%;
  margin-bottom: 7px;
}
.sk-subtitle {
  height: 10px;
  width: 52%;
}
.sk-badge {
  height: 18px;
  width: 44%;
}
.sk-chip {
  height: 18px;
  width: 48px;
  display: inline-block;
}

.sb-card.is-skeleton .sb-card-accent {
  background: linear-gradient(180deg, var(--surface2) 25%, var(--border2) 50%, var(--surface2) 75%);
  background-size: 100% 300%;
  animation: shimmer-v 1.8s ease-in-out infinite;
}

.sb-skeleton-hint {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.63rem;
  color: var(--muted);
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px dashed var(--border);
  opacity: 0.75;
}

/* ── Card complete / arrive animations ───────────────────────────────────── */

@keyframes sb-card-complete {
  0% {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
  20% {
    transform: translateX(-6px) scale(1.02);
    box-shadow: 0 0 0 2px #22c55e55;
  }
  100% {
    opacity: 0;
    transform: translateX(80px) scale(0.96);
  }
}

@keyframes sb-card-arrive {
  from {
    opacity: 0;
    transform: translateX(-30px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

.sb-card--completing {
  animation: sb-card-complete 0.42s cubic-bezier(0.4, 0, 0.8, 1) forwards;
  pointer-events: none;
}

.sb-card--arriving {
  animation: sb-card-arrive 0.28s ease-out forwards;
}

/* ── New-position modal ───────────────────────────────────────────────────── */

.sb-job-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 500;
  padding: 16px;
}

.sb-job-modal {
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: 10px;
  padding: 24px 26px;
  width: 100%;
  max-width: 360px;
  box-shadow: var(--shadow);
}

.sb-job-modal-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-head);
  margin-bottom: 18px;
}

.sb-job-label {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 14px;
}

.sb-job-input {
  width: 100%;
  padding: 7px 10px;
  border: 1px solid var(--border2);
  border-radius: 5px;
  background: var(--surface2);
  color: var(--text-strong);
  font-size: 0.84rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s;
  box-sizing: border-box;
}

textarea.sb-job-input {
  resize: vertical;
  min-height: 60px;
}

.sb-job-input:focus {
  border-color: var(--accent);
}
.sb-job-input.is-error {
  border-color: #f85149;
}

.sb-job-err {
  font-size: 0.68rem;
  color: #f85149;
  min-height: 14px;
}

.sb-job-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 6px;
}

.sb-job-cancel-btn {
  height: 30px;
  padding: 0 12px;
  border-radius: 4px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid var(--border);
  background: var(--surface2);
  color: var(--text);
  transition: all 0.15s;
}

.sb-job-cancel-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ── Toaster középre (override cv-index.css) ──────────────────────────────── */

#cv-toaster-container {
  position: fixed;
  top: 66px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  pointer-events: none;
}

#cv-toaster-container .cv-toast {
  pointer-events: auto;
}

/* ── cv-index.css leftovers ───────────────────────────────────────────────── */

.sb-page .card {
  display: none;
}
.sb-page .btn {
  display: none;
}
#index-booking-btn {
  display: none !important;
}
#hire-index-btn {
  display: none !important;
}
#music-toggle {
  display: none !important;
}

/* ── Mobile ───────────────────────────────────────────────────────────────── */

/* ── Lang dropdown in header ──────────────────────────────────────────────── */

.sb-header .ld-select {
  flex-shrink: 0;
}

/* ── Mobile ───────────────────────────────────────────────────────────────── */

/* ── Theme square icon ───────────────────────────────────────────────────── */

.theme-sq-icon {
  display: block;
  width: 13px;
  height: 13px;
  border-radius: 2px;
  border: 1.5px solid currentColor;
  position: relative;
  overflow: hidden;
}

.theme-sq-icon::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  width: 50%;
  height: 100%;
  background: currentColor;
}

/* ── Detail panel ────────────────────────────────────────────────────────── */

.sb-detail-panel {
  position: fixed;
  top: 52px;
  right: 0;
  width: 360px;
  height: calc(100vh - 52px);
  background: var(--surface);
  border-left: 1px solid var(--border2);
  box-shadow: -4px 0 20px rgba(0, 0, 0, 0.12);
  transform: translateX(100%);
  transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 95;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--border2) transparent;
}

.sb-detail-panel.open {
  transform: translateX(0);
}

.sb-detail-inner {
  padding: 22px 20px 32px;
}

.sb-detail-accent {
  height: 4px;
  border-radius: 2px;
  margin-bottom: 16px;
}

.sb-detail-title {
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: 4px;
}

.sb-detail-company {
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 10px;
}

.sb-detail-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.sb-detail-desc {
  font-size: 0.82rem;
  line-height: 1.65;
  color: var(--text);
  margin-bottom: 12px;
}

.sb-detail-bullets {
  list-style: none;
  padding: 0;
  margin: 0 0 14px;
}

.sb-detail-bullets li {
  font-size: 0.8rem;
  line-height: 1.55;
  color: var(--text);
  padding: 3px 0 3px 14px;
  position: relative;
}

.sb-detail-bullets li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 10px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
}

.sb-detail-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 16px;
}

.sb-detail-close-btn {
  background: none;
  border: 1px solid var(--border);
  color: var(--muted);
  border-radius: 4px;
  padding: 5px 14px;
  font-size: 0.75rem;
  cursor: pointer;
  transition: all 0.15s;
  margin-top: 6px;
}

.sb-detail-close-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.sb-detail-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 94;
}

.sb-detail-panel.open ~ .sb-detail-overlay {
  display: block;
}

@media (max-width: 720px) {
  .sb-detail-panel {
    top: auto;
    bottom: 0;
    right: 0;
    width: 100%;
    height: 72vh;
    border-left: none;
    border-top: 2px solid var(--border2);
    border-radius: 14px 14px 0 0;
    transform: translateY(100%);
  }
  .sb-detail-panel.open {
    transform: translateY(0);
  }
}

@media (max-width: 860px) {
  .sb-column {
    flex: 0 0 270px;
  }
}

@media (max-width: 600px) {
  .sb-column {
    flex: 0 0 248px;
  }
  .sb-board {
    padding: 12px;
    gap: 10px;
  }
  .sb-header {
    gap: 10px;
    padding: 0 12px;
  }
}

@media (max-width: 480px) {
  .sb-btn {
    font-size: 0;
    gap: 0;
    padding: 0;
    width: 30px;
  }
  .sb-btn i {
    font-size: 0.82rem;
  }
  .sb-board {
    padding: 10px 8px;
    gap: 8px;
  }
  .sb-column {
    flex: 0 0 230px;
  }
  .sb-header-role span {
    display: none;
  }
}

@media (max-width: 360px) {
  .sb-column {
    flex: 0 0 210px;
  }
}
