/* static/appbar.css - Unified navigation bar + shared dark theme styles */

/* CSS Variables for dark theme */
:root {
  --bg: #0b0c10;
  --panel: #111318;
  --line: #212432;
  --text: #eef2ff;
  --muted: #8b93a3;
  --accent: #6ee7b7;
  --blue: #3b82f6;
  --purple: #8b5cf6;
  --amber: #f59e0b;
  --emerald: #10b981;
  --green: #22c55e;
  --red: #ef4444;
}

/* Body and global styles for dark theme */
body.theme-dark {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, 'Segoe UI', Roboto, Arial, sans-serif;
}

body.theme-dark * {
  box-sizing: border-box;
}

/* Typography */
body.theme-dark h1 {
  margin: 0 0 8px;
  font-size: 22px;
  font-weight: 600;
}

body.theme-dark h2 {
  margin: 0 0 8px;
  font-size: 18px;
  font-weight: 600;
}

body.theme-dark .muted {
  color: var(--muted);
}

body.theme-dark .small {
  font-size: 12px;
}

/* Layout containers */
body.theme-dark .wrap {
  max-width: 940px;
  margin: 0 auto;
  padding: 16px;
}

body.theme-dark .row {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

body.theme-dark .panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px;
  margin: 10px 0;
}

body.theme-dark .card {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  margin: 10px 0;
  background: #0f121a;
}

body.theme-dark .sheet {
  background: #111318;
  border: 1px solid var(--line);
  border-radius: 14px;
  max-width: 460px;
  width: 100%;
  padding: 14px;
}

/* Buttons */
body.theme-dark .btn {
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #1a2033;
  color: #eef2ff;
  cursor: pointer;
  font-size: 14px;
  font-family: inherit;
}

body.theme-dark .btn:hover {
  background: #222a44;
}

body.theme-dark .btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Form controls */
body.theme-dark input,
body.theme-dark select,
body.theme-dark textarea {
  background: #0f1220;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px;
  font-family: inherit;
  font-size: 14px;
}

body.theme-dark input:focus,
body.theme-dark select:focus,
body.theme-dark textarea:focus {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

body.theme-dark input::placeholder,
body.theme-dark textarea::placeholder {
  color: var(--muted);
  opacity: 0.6;
}

/* Badges */
body.theme-dark .badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 9999px;
  font-size: 12px;
  font-weight: 600;
}

body.theme-dark .badge.scheduled {
  background: #6b7280;
  color: #f3f4f6;
}

body.theme-dark .badge.in_progress {
  background: #2563eb;
  color: #dbeafe;
}

body.theme-dark .badge.complete {
  background: #16a34a;
  color: #bbf7d0;
}

body.theme-dark .badge.wip {
  background: #b45309;
  color: #fde68a;
}

body.theme-dark .badge.en_route {
  background: #1e3a8a;
  color: #dbeafe;
  border: 1px solid #3b82f6;
}

/* Links */
body.theme-dark a {
  color: var(--accent);
  text-decoration: none;
}

body.theme-dark a:hover {
  text-decoration: underline;
}

/* Tables */
body.theme-dark table {
  width: 100%;
  border-collapse: collapse;
}

body.theme-dark th {
  text-align: left;
  padding: 8px 12px;
  border-bottom: 1px solid var(--line);
  font-weight: 600;
  font-size: 14px;
}

body.theme-dark td {
  padding: 8px 12px;
  border-bottom: 1px solid var(--line);
}

body.theme-dark tr:hover {
  background: rgba(255, 255, 255, 0.02);
}

/* Legend dots */
body.theme-dark .legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 8px 10px;
}

body.theme-dark .legend .dot {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  display: inline-block;
  margin-right: 6px;
  vertical-align: middle;
}

body.theme-dark .dot.manu { background: var(--blue); }
body.theme-dark .dot.paint { background: var(--purple); }
body.theme-dark .dot.asm { background: var(--amber); }
body.theme-dark .dot.del { background: var(--emerald); }
body.theme-dark .dot.ins { background: var(--green); }
body.theme-dark .dot.svc { background: var(--red); }

/* Modals */
body.theme-dark .modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  display: grid;
  place-items: center;
  padding: 16px;
  z-index: 9999;
}

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

/* AppBar (sticky header navigation) */
.appbar {
  position: sticky;
  top: 0;
  width: 100%;
  background: #0b0c10;
  color: #eef2ff;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
  z-index: 10000;
  font-family: system-ui,Segoe UI,Roboto;
}
.appbar-wrap {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 18px;
}
.appbar-logo {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 1px;
  color: #3b82f6;
}
.appbar-links {
  display: flex;
  gap: 18px;
}
.appbar-link {
  color: #eef2ff;
  text-decoration: none;
  font-size: 16px;
  padding: 6px 14px;
  border-radius: 8px;
  transition: background 0.18s;
}
.appbar-link:hover {
  background: #1a2033;
}
.appbar-link.active {
  background: #3b82f6;
  color: #fff;
  font-weight: 600;
}
@media (max-width: 700px) {
  .appbar-wrap { flex-direction: column; align-items: flex-start; }
  .appbar-links { flex-wrap: wrap; gap: 10px; }
}
