/* ─── HEADER ─────────────────────────────────────────────── */
.app-header {
  height: var(--header-h);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  padding: 0 16px 0 12px;
  gap: 12px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  z-index: 30;
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.header-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0 auto;
}

.nav-btn {
  width: 34px; height: 34px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.15s, border-color 0.15s;
  flex-shrink: 0;
}
.nav-btn:hover { background: var(--surface3); border-color: #484f58; }

.period-label {
  font-size: 17px;
  font-weight: 700;
  min-width: 175px;
  text-align: center;
  color: var(--text);
  letter-spacing: -0.01em;
}

.today-btn {
  padding: 7px 14px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
  margin-left: 4px;
}
.today-btn:hover { background: var(--accent-dim); }

.header-filters {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-shrink: 0;
}

.search-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.search-icon {
  position: absolute;
  left: 10px;
  font-size: 14px;
  color: var(--text-muted);
  pointer-events: none;
  line-height: 1;
}

.search-input {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-size: 13px;
  padding: 6px 30px 6px 30px;
  outline: none;
  width: 210px;
  transition: border-color 0.15s, width 0.2s, box-shadow 0.15s;
}
.search-input::placeholder { color: var(--text-dim); }
.search-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(88,166,255,0.12);
  width: 240px;
}

.search-clear {
  position: absolute;
  right: 7px;
  width: 18px;
  height: 18px;
  background: var(--surface3);
  border: none;
  border-radius: 50%;
  color: var(--text-muted);
  font-size: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, color 0.15s;
}
.search-clear:hover { background: var(--border); color: var(--text); }

.filter-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  white-space: nowrap;
}

.filter-select {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-size: 13px;
  padding: 6px 28px 6px 10px;
  outline: none;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%237d8590' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 9px center;
  transition: border-color 0.15s;
  min-width: 150px;
}
.filter-select:focus  { border-color: var(--accent); }
.filter-select:hover  { border-color: #484f58; }
.filter-select option { background: var(--surface2); color: var(--text); }

.header-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  margin-left: auto;
}

.job-count {
  font-size: 13px;
  color: var(--text-muted);
  white-space: nowrap;
}

.icon-btn {
  width: 32px; height: 32px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 7px;
  color: var(--text-muted);
  font-size: 16px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.15s, color 0.15s;
}
.icon-btn:hover { background: var(--surface2); color: var(--text); }
.logout-btn:hover { color: #f85149; border-color: rgba(248,81,73,0.4); }

/* ─── LOADING OVERLAY ────────────────────────────────────── */
.loading-overlay {
  position: absolute;
  inset: var(--header-h) 0 0 0;
  background: rgba(13,17,23,0.75);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  z-index: 90;
  font-size: 13px;
  color: var(--text-muted);
  backdrop-filter: blur(2px);
}

@keyframes spin { to { transform: rotate(360deg); } }
.spinner {
  width: 34px; height: 34px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.75s linear infinite;
}

/* ─── APP ERROR BANNER ───────────────────────────────────── */
.app-error {
  background: rgba(248,81,73,0.1);
  border-bottom: 1px solid rgba(248,81,73,0.3);
  color: #f85149;
  padding: 10px 20px;
  font-size: 13px;
  flex-shrink: 0;
}

