:root {
  --bg-gradient: radial-gradient(
    circle at top,
    #1f2937 0,
    #020617 55%,
    #000 100%
  );
  --card-bg: rgba(15, 23, 42, 0.88);
  --card-border: rgba(148, 163, 184, 0.35);
  --accent: #22d3ee;
  --accent-soft: rgba(34, 211, 238, 0.12);
  --accent-strong: #6366f1;
  --text-main: #e5e7eb;
  --text-muted: #9ca3af;
  --danger: #fb7185;
  --success: #4ade80;
  --shadow-soft: 0 24px 60px rgba(15, 23, 42, 0.9);
  --radius-xl: 18px;
  --radius-2xl: 26px;
  --transition-fast: 180ms ease-out;
  --transition-med: 240ms ease;
  --glass-blur: 18px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text",
    "Segoe UI", sans-serif;
  color: var(--text-main);
  background: #020617;
}

/* ========== GLOBAL LAYOUT ========== */

.app-shell {
  min-height: 100vh;
  display: flex;
  align-items: stretch;
  justify-content: center;
  background: var(--bg-gradient);
  color: var(--text-main);
}

/* lagani “glow” grid iza svega */
.app-shell::before {
  content: "";
  position: fixed;
  inset: 0;
  background: radial-gradient(
      circle at 10% 20%,
      rgba(56, 189, 248, 0.12) 0,
      transparent 50%
    ),
    radial-gradient(
      circle at 90% 80%,
      rgba(129, 140, 248, 0.14) 0,
      transparent 50%
    );
  opacity: 0.9;
  pointer-events: none;
  z-index: -1;
}

/* ========== AUTH LAYOUT (LOGIN) ========== */

.auth-page {
  width: 100%;
  max-width: 1120px;
  margin: auto;
  padding: 32px 16px;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 32px;
}

@media (max-width: 900px) {
  .auth-page {
    grid-template-columns: minmax(0, 1fr);
    max-width: 480px;
  }
}

/* LEFT SIDE – HERO */

.auth-hero {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 18px;
  padding: 24px 16px;
}

.brand-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.3);
  background: linear-gradient(
    to right,
    rgba(15, 23, 42, 0.95),
    rgba(15, 23, 42, 0.7)
  );
  font-size: 12px;
  color: var(--text-muted);
}

.brand-chip-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 10px rgba(34, 211, 238, 0.9);
}

.brand-chip-label {
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

.auth-title {
  font-size: clamp(30px, 3.1vw, 36px);
  font-weight: 650;
  letter-spacing: 0.02em;
}

.auth-title span {
  background: linear-gradient(to right, #22d3ee, #a855f7, #f97316);
  -webkit-background-clip: text;
  color: transparent;
}

.auth-subtitle {
  max-width: 480px;
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-muted);
}

.auth-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.badge-pill {
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border: 1px solid rgba(148, 163, 184, 0.4);
  background: rgba(15, 23, 42, 0.85);
  color: var(--text-muted);
}

/* RIGHT SIDE – CARD */

.auth-card-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-card {
  width: 100%;
  max-width: 420px;
  padding: 26px 24px 22px;
  border-radius: var(--radius-2xl);
  background: radial-gradient(
      circle at top left,
      rgba(56, 189, 248, 0.16),
      transparent 55%
    ),
    radial-gradient(
      circle at bottom right,
      rgba(129, 140, 248, 0.22),
      transparent 60%
    ),
    var(--card-bg);
  border: 1px solid var(--card-border);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(var(--glass-blur));
}

.auth-card-header {
  margin-bottom: 18px;
}

.auth-card-title {
  font-size: 20px;
  font-weight: 600;
}

.auth-card-subtitle {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* FORM */

.form-grid {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* ===== Received Jobs (Aufträge) ===== */
.jobs-group-section {
  margin-bottom: 28px;
}
.jobs-group-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--accent);
  color: var(--accent);
  font-size: 16px;
  font-weight: 600;
}
.jobs-group-header .group-title {
  display: flex;
  align-items: center;
  gap: 8px;
}
.jobs-group-header .group-count {
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 400;
}

.jobs-group-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 16px;
}

.job-card {
  border: 1px solid var(--card-border);
  background: var(--card-bg);
  border-radius: var(--radius-xl);
  padding: 18px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 18px;
  align-items: start;
}
.job-title {
  margin: 0 0 8px 0;
  font-size: 15px;
  color: var(--text-main);
  font-weight: 600;
}
.job-subtitle {
  margin: 0 0 10px 0;
  color: var(--text-muted);
  font-size: 12px;
}
.job-meta {
  display: flex;
  gap: 10px;
  font-size: 12px;
  color: var(--text-muted);
}
.job-status {
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
}
.job-status.new {
  background: #1e88e5;
  color: #fff;
}
.job-status.accepted {
  background: #1b9e3d;
  color: #fff;
}
.job-status.scheduled {
  background: #10b981;
  color: #fff;
}
.job-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}
.btn-primary {
  padding: 8px 14px;
  background: #22d3ee;
  color: #001324;
  border: 0;
  border-radius: 10px;
  font-weight: 700;
  cursor: pointer;
}
.btn-ghost {
  padding: 8px 12px;
  background: transparent;
  color: var(--text-muted);
  border: 1px solid rgba(148, 163, 184, 0.3);
  border-radius: 10px;
  cursor: pointer;
}

.job-badge {
  margin-left: 8px;
  padding: 2px 8px;
  background: rgba(34, 211, 238, 0.12);
  color: #aac6ff;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
}

.empty-state {
  color: var(--text-muted);
  text-align: center;
  padding: 40px 0;
}

/* Filter Bar */
.filter-bar {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 24px;
  padding: 16px;
  background: rgba(15, 23, 42, 0.6);
  border-radius: var(--radius-xl);
  border: 1px solid rgba(148, 163, 184, 0.25);
}

.filter-bar .form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 180px;
  flex: 1;
}

.filter-bar .form-group label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.filter-bar .form-group input,
.filter-bar .form-group select {
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: rgba(15, 23, 42, 0.95);
  padding: 9px 12px;
  color: var(--text-main);
  font-size: 13px;
  outline: none;
  transition: border-color var(--transition-fast),
    box-shadow var(--transition-fast);
}

.filter-bar .form-group input::placeholder {
  color: rgba(148, 163, 184, 0.5);
}

.filter-bar .form-group input:focus,
.filter-bar .form-group select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px rgba(34, 211, 238, 0.3);
}

.form-label-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
}

.form-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.09em;
}

.form-label span {
  color: var(--accent);
}

.form-hint {
  font-size: 11px;
  color: var(--text-muted);
}

.form-input {
  border-radius: 11px;
  border: 1px solid rgba(148, 163, 184, 0.4);
  background: rgba(15, 23, 42, 0.9);
  padding: 9px 11px;
  color: var(--text-main);
  font-size: 13px;
  outline: none;
  transition: border-color var(--transition-fast),
    box-shadow var(--transition-fast), background var(--transition-fast),
    transform var(--transition-fast);
}

.form-input::placeholder {
  color: rgba(148, 163, 184, 0.6);
}

.form-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px rgba(34, 211, 238, 0.3);
  transform: translateY(-0.5px);
  background: rgba(15, 23, 42, 0.98);
}

.form-footer-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 4px;
}

.link-ghost {
  font-size: 12px;
  color: var(--accent);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.link-ghost:hover {
  text-decoration: underline;
}

/* BUTTONS */

.btn-primary {
  width: 100%;
  border-radius: 999px;
  border: none;
  padding: 10px 16px;
  margin-top: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  background: linear-gradient(to right, var(--accent), var(--accent-strong));
  color: #0b1120;
  box-shadow: 0 12px 30px rgba(56, 189, 248, 0.4);
  transition: transform var(--transition-fast),
    box-shadow var(--transition-fast), filter var(--transition-fast);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 40px rgba(56, 189, 248, 0.5);
  filter: brightness(1.05);
}

.btn-primary:active {
  transform: translateY(0);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.9);
}

/* ALERT BOX */

.alert {
  margin-bottom: 10px;
  padding: 8px 10px;
  border-radius: 10px;
  font-size: 12px;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  border: 1px solid transparent;
}

.alert-error {
  border-color: rgba(248, 113, 113, 0.6);
  background: rgba(127, 29, 29, 0.9);
  color: #fee2e2;
}

/* ========== DASHBOARD LAYOUT ========== */

.dashboard-root {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  background: radial-gradient(circle at top, #020617 0, #000 60%);
}

@media (max-width: 900px) {
  .dashboard-root {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* SIDEBAR */

.sidebar {
  position: relative;
  padding: 18px 16px;
  border-right: 1px solid rgba(31, 41, 55, 0.9);
  background: radial-gradient(
      circle at top left,
      rgba(56, 189, 248, 0.16),
      transparent 60%
    ),
    #020617;
  display: flex;
  flex-direction: column;
  height: 100%;
}

/* Sakrij sidebar na auth stranicama */
.app-shell:has(.auth-page) .sidebar {
  display: none !important;
}

/* Fallback za browsere bez :has */
body.auth-page-active .sidebar {
  display: none !important;
}

@media (max-width: 900px) {
  .sidebar {
    border-right: none;
    border-bottom: 1px solid rgba(31, 41, 55, 0.9);
  }
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
}

.sidebar-logo-icon {
  width: 26px;
  height: 26px;
  border-radius: 11px;
  background: radial-gradient(circle at 30% 0%, #22d3ee, #6366f1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #0b1120;
  font-weight: 700;
  font-size: 15px;
  box-shadow: 0 10px 20px rgba(15, 23, 42, 0.8);
}

.sidebar-logo-text-main {
  font-size: 16px;
  font-weight: 600;
}

.sidebar-logo-text-sub {
  font-size: 11px;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.16em;
}

.sidebar-nav {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nav-group-label {
  font-size: 11px;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.12em;
  margin: 8px 4px 4px;
}

/* Nav Section Styles */
.nav-section {
  margin-bottom: 6px;
}

.nav-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  margin: 0 4px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
  background: rgba(15, 23, 42, 0.6);
  border-radius: 10px;
  cursor: pointer;
  transition: all var(--transition-fast);
  border: 1px solid rgba(148, 163, 184, 0.1);
}

.nav-section-header:hover {
  background: rgba(34, 211, 238, 0.12);
  border-color: rgba(34, 211, 238, 0.3);
  transform: translateX(2px);
}

.nav-toggle {
  font-size: 10px;
  transition: transform 0.3s ease;
  color: var(--accent);
  transform: rotate(-90deg);
}

.nav-section-header.collapsed .nav-toggle {
  transform: rotate(-90deg);
}

.nav-section-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-out, opacity 0.3s ease-out,
    margin 0.3s ease-out;
  opacity: 0;
  margin-top: 0;
}

.nav-section-content.active {
  max-height: 1000px;
  opacity: 1;
  margin-top: 4px;
  padding-left: 8px;
}

.nav-section-content.active ~ .nav-section-header .nav-toggle,
.nav-section-header:not(.collapsed) .nav-toggle {
  transform: rotate(0deg);
}

/* Subsection styles */
.nav-subsection {
  margin: 4px 0 4px 12px;
  border-left: 2px solid rgba(34, 211, 238, 0.3);
  padding-left: 8px;
}

.nav-subsection-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  background: rgba(15, 23, 42, 0.4);
  border-radius: 8px;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.nav-subsection-header:hover {
  background: rgba(34, 211, 238, 0.08);
  color: var(--text-main);
}

.nav-subsection-header.collapsed .nav-toggle {
  transform: rotate(-90deg);
}

.nav-subsection .nav-section-content {
  padding-left: 12px;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 9px;
  border-radius: 10px;
  font-size: 13px;
  color: var(--text-muted);
  text-decoration: none;
  transition: background var(--transition-fast), color var(--transition-fast),
    transform var(--transition-fast);
}

.nav-link:hover {
  background: rgba(15, 23, 42, 0.9);
  color: var(--text-main);
  transform: translateX(1px);
}

.nav-link.active {
  background: linear-gradient(
    to right,
    rgba(34, 211, 238, 0.14),
    rgba(79, 70, 229, 0.22)
  );
  color: var(--accent);
}

/* Logout - Independent from sections */
.sidebar-logout {
  padding: 12px 8px;
  border-top: 1px solid rgba(148, 163, 184, 0.1);
  margin-top: auto;
}

.logout-link {
  width: 100%;
  justify-content: center;
  background: rgba(239, 68, 68, 0.1);
  color: var(--text-muted);
  border: 1px solid rgba(239, 68, 68, 0.2);
  font-weight: 500;
}

.logout-link:hover {
  background: rgba(239, 68, 68, 0.2);
  color: #ef4444;
  border-color: rgba(239, 68, 68, 0.4);
}

/* MAIN DASH */

.main-area {
  padding: 18px 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.main-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.main-title-block {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.main-title {
  font-size: 20px;
  font-weight: 600;
}

.main-subtitle {
  font-size: 13px;
  color: var(--text-muted);
}

.main-header-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.btn-ghost {
  border-radius: 999px;
  padding: 7px 12px;
  border: 1px solid rgba(148, 163, 184, 0.45);
  background: rgba(15, 23, 42, 0.9);
  color: var(--text-muted);
  font-size: 12px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background var(--transition-fast),
    border-color var(--transition-fast), color var(--transition-fast),
    transform var(--transition-fast);
}

.btn-ghost:hover {
  background: rgba(15, 23, 42, 1);
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-0.5px);
}

.btn-danger {
  border-color: rgba(239, 68, 68, 0.45);
  color: rgb(239, 68, 68);
}

.btn-danger:hover {
  background: rgba(239, 68, 68, 0.1);
  border-color: rgb(239, 68, 68);
  color: rgb(239, 68, 68);
}

/* CARDS */

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

@media (max-width: 1100px) {
  .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .stats-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

.stat-card {
  border-radius: 16px;
  padding: 12px 13px;
  background: radial-gradient(
      circle at top left,
      rgba(34, 211, 238, 0.13),
      transparent 60%
    ),
    rgba(15, 23, 42, 0.92);
  border: 1px solid rgba(30, 64, 175, 0.65);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.85);
}

.stat-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
}

.stat-value {
  font-size: 20px;
  font-weight: 600;
  margin-top: 4px;
}

.stat-sub {
  font-size: 11px;
  margin-top: 2px;
  color: var(--text-muted);
}

.stat-tag {
  display: inline-flex;
  margin-top: 6px;
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 10px;
  border: 1px solid rgba(148, 163, 184, 0.5);
  color: var(--text-muted);
}

/* LOWER GRID */

.lower-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 14px;
  margin-top: 6px;
}

@media (max-width: 1000px) {
  .lower-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

.card-panel {
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.96);
  border: 1px solid rgba(31, 41, 55, 0.9);
  padding: 13px 14px;
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.9);
}

.card-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.card-panel-title {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-muted);
}

.card-panel-body {
  font-size: 13px;
  color: var(--text-muted);
}

/* Simple list */

.simple-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.simple-list-item {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  font-size: 13px;
  border-bottom: 1px solid rgba(31, 41, 55, 0.9);
}

.simple-list-item:last-child {
  border-bottom: none;
}

/* Modal Overlay */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.modal-dialog {
  background: rgba(15, 23, 42, 0.98);
  border: 1px solid rgba(148, 163, 184, 0.3);
  border-radius: 18px;
  padding: 24px;
  min-width: 400px;
  max-width: 500px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.9);
  animation: slideUp 0.3s ease;
}

@keyframes slideUp {
  from {
    transform: translateY(20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.modal-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--accent);
}

.modal-close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 24px;
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  transition: background 0.2s, color 0.2s;
}

.modal-close:hover {
  background: rgba(148, 163, 184, 0.1);
  color: #fff;
}

.modal-body {
  margin-bottom: 20px;
}

.modal-info {
  padding: 12px;
  background: rgba(34, 211, 238, 0.08);
  border-radius: 8px;
  margin-bottom: 16px;
  font-size: 13px;
  color: var(--text-muted);
}

.modal-info-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 6px;
}

.modal-info-row:last-child {
  margin-bottom: 0;
}

.modal-info-label {
  color: var(--text-muted);
}

.modal-info-value {
  color: #fff;
  font-weight: 600;
}

.modal-footer {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
}

.modal-btn {
  padding: 10px 20px;
  border-radius: 8px;
  border: none;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.modal-btn-cancel {
  background: rgba(148, 163, 184, 0.1);
  color: var(--text-muted);
}

.modal-btn-cancel:hover {
  background: rgba(148, 163, 184, 0.2);
  color: #fff;
}

.modal-btn-primary {
  background: var(--accent);
  color: #0f172a;
}

.modal-btn-primary:hover {
  background: #2dd4bf;
  transform: translateY(-1px);
}

@keyframes slideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes slideOut {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(100%);
    opacity: 0;
  }
}

/* Inline edit button for slot capacity */
.edit-capacity-btn {
  background: transparent;
  border: none;
  color: inherit;
  font: inherit;
  padding: 0.15rem 0.35rem;
  cursor: pointer;
  text-decoration: underline dotted;
}
.edit-capacity-btn:focus {
  outline: 2px solid rgba(34, 211, 238, 0.25);
  outline-offset: 2px;
}

/* Inline capacity editor */
.inline-capacity-input {
  border-radius: 8px;
  border: 1px solid rgba(148, 163, 184, 0.25);
  padding: 4px 6px;
  background: rgba(15, 23, 42, 0.95);
  color: var(--text-main);
}
.inline-capacity-actions {
  display: inline-flex;
  gap: 6px;
  align-items: center;
}

/* Toast notifications */
#toastContainer {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 99999;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.toast {
  background: rgba(15, 23, 42, 0.95);
  color: var(--text-main);
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.08);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.6);
  transition: opacity 0.3s ease;
}
.toast-success {
  border-left: 4px solid var(--success);
}
.toast-error {
  border-left: 4px solid var(--danger);
}

/* ========== DATA TABLE ========== */
.data-table {
  width: 100%;
  border-collapse: collapse;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.15);
}

.data-table thead {
  background: rgba(99, 102, 241, 0.08);
  border-bottom: 1px solid rgba(148, 163, 184, 0.2);
}

.data-table th {
  padding: 12px 16px;
  text-align: left;
  font-weight: 600;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--accent);
  white-space: nowrap;
}

.data-table td {
  padding: 12px 16px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.08);
  font-size: 13px;
  color: var(--text-main);
}

.data-table tbody tr {
  transition: background-color 0.15s ease;
}

.data-table tbody tr:hover {
  background: rgba(99, 102, 241, 0.05);
}

.data-table tbody tr:last-child td {
  border-bottom: none;
}

.data-table .action-btn {
  padding: 4px 10px;
  margin-right: 4px;
  font-size: 12px;
  border-radius: 6px;
  border: 1px solid rgba(148, 163, 184, 0.3);
  background: rgba(99, 102, 241, 0.12);
  color: var(--accent);
  cursor: pointer;
  transition: all 0.15s ease;
}

.data-table .action-btn:hover {
  background: rgba(99, 102, 241, 0.25);
  border-color: var(--accent);
}

/* Responsive table wrapper (used for Termine) */
.table-responsive {
  width: 100%;
  overflow-x: auto;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: linear-gradient(
    180deg,
    rgba(15, 23, 42, 0.92),
    rgba(15, 23, 42, 0.8)
  );
  box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.06);
  padding: 6px;
}

.table-responsive::-webkit-scrollbar {
  height: 8px;
}

.table-responsive::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.4);
  border-radius: 10px;
}

.appointments-table-wrap .data-table {
  min-width: 1200px;
  margin: 0;
  background: transparent;
  border: 0;
}

.appointments-table-wrap .data-table thead {
  position: sticky;
  top: 0;
  z-index: 1;
  background: rgba(15, 23, 42, 0.94);
  backdrop-filter: blur(4px);
}

/* Appointments filter bar */
.appointments-actions {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.appointments-filter-select,
.appointments-filter-date {
  padding: 10px 12px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 10px;
  background: linear-gradient(
    180deg,
    rgba(15, 23, 42, 0.95),
    rgba(15, 23, 42, 0.82)
  );
  color: #f8fafc;
  font-size: 14px;
  min-width: 180px;
  outline: none;
  transition: border-color var(--transition-fast),
    box-shadow var(--transition-fast), background var(--transition-fast);
}

.appointments-filter-select:hover,
.appointments-filter-date:hover,
.appointments-filter-select:focus,
.appointments-filter-date:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px rgba(34, 211, 238, 0.35);
}

@media (max-width: 1100px) {
  .appointments-table-wrap .data-table th,
  .appointments-table-wrap .data-table td {
    white-space: nowrap;
  }
}

@media (max-width: 720px) {
  .appointments-actions {
    width: 100%;
    justify-content: flex-start;
  }
  .appointments-filter-select,
  .appointments-filter-date {
    flex: 1;
    min-width: 140px;
  }
  .card-panel-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
}

/* ========== RECEIVED JOBS REGION SELECT ========== */
.recv-region-select {
  min-width: 140px;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: linear-gradient(
    180deg,
    rgba(15, 23, 42, 0.95),
    rgba(15, 23, 42, 0.82)
  );
  color: var(--text-main);
  font-size: 13px;
  outline: none;
  transition: border-color var(--transition-fast),
    box-shadow var(--transition-fast), background var(--transition-fast);
  appearance: none;
  background-image: linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.12),
      rgba(255, 255, 255, 0)
    ),
    radial-gradient(circle at 95% 50%, #22d3ee 0, #22d3ee 45%, transparent 55%);
  background-position: 0 0, right 12px center;
  background-repeat: no-repeat;
  background-size: 100% 100%, 8px 8px;
}

.recv-region-select option {
  background: #0f172a;
  color: #e5e7eb;
}

.recv-region-select:hover {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px rgba(34, 211, 238, 0.25);
}

.recv-region-select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(34, 211, 238, 0.35);
}

/* ========== RECEIVED JOBS GROUP SELECT ========== */
.recv-group-select {
  min-width: 140px;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: linear-gradient(
    180deg,
    rgba(15, 23, 42, 0.95),
    rgba(15, 23, 42, 0.82)
  );
  color: var(--text-main);
  font-size: 13px;
  outline: none;
  transition: border-color var(--transition-fast),
    box-shadow var(--transition-fast), background var(--transition-fast);
  appearance: none;
  background-image: linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.12),
      rgba(255, 255, 255, 0)
    ),
    radial-gradient(circle at 95% 50%, #10b981 0, #10b981 45%, transparent 55%);
  background-position: 0 0, right 12px center;
  background-repeat: no-repeat;
  background-size: 100% 100%, 8px 8px;
}

.recv-group-select option {
  background: #0f172a;
  color: #e5e7eb;
}

.recv-group-select:hover {
  border-color: #10b981;
  box-shadow: 0 0 0 1px rgba(16, 185, 129, 0.25);
}

.recv-group-select:focus {
  border-color: #10b981;
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.35);
}

/* ========== APPOINTMENTS: REGION & TECHNICIAN SELECTS ========== */
.appt-region-select,
.appt-tech-select {
  min-width: 160px;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: linear-gradient(
    180deg,
    rgba(15, 23, 42, 0.95),
    rgba(15, 23, 42, 0.82)
  );
  color: var(--text-main);
  font-size: 13px;
  outline: none;
  transition: border-color var(--transition-fast),
    box-shadow var(--transition-fast), background var(--transition-fast);
  appearance: none;
  background-image: linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.12),
      rgba(255, 255, 255, 0)
    ),
    radial-gradient(circle at 95% 50%, #22d3ee 0, #22d3ee 45%, transparent 55%);
  background-position: 0 0, right 12px center;
  background-repeat: no-repeat;
  background-size: 100% 100%, 8px 8px;
}

.appt-tech-select {
  min-width: 200px;
}

.appt-region-select:hover,
.appt-tech-select:hover {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px rgba(34, 211, 238, 0.25);
}

.appt-region-select:focus,
.appt-tech-select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(34, 211, 238, 0.35);
}

.appt-region-select option,
.appt-tech-select option {
  background: #0f172a;
  color: #e5e7eb;
}

.appt-tech-select:disabled,
.appt-region-select:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
