:root {
  --canvas: #15171C;
  --surface: #1E212A;
  --surface-2: #252934;
  --ink: #EDEEF2;
  --muted: #9BA0AB;
  --line: #2E323D;
  --amber: #F5B43C;
  --amber-dim: #3A3220;
  --teal: #38BDC4;
  --teal-dim: #1E3033;
  --success: #4CC38A;
  --alert: #F2585B;
  --radius: 8px;
  --font-display: 'Syne', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 0.75em;
}

h1 {
  font-size: 2rem;
  font-weight: 800;
}

h2 {
  font-size: 1.5rem;
}

h3 {
  font-size: 1.125rem;
  font-weight: 600;
}

a {
  color: var(--teal);
  text-decoration: none;
  transition: color 0.15s ease;
}

a:hover {
  color: var(--ink);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  min-height: 64px;
  gap: 24px;
  flex-wrap: wrap;
}

.brand {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--ink);
  letter-spacing: -0.02em;
}

.brand-accent {
  color: var(--amber);
  font-weight: 800;
}

.nav {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.nav-link {
  position: relative;
  padding: 10px 14px;
  color: var(--muted);
  font-weight: 500;
  font-size: 0.9375rem;
  transition: color 0.15s ease;
}

.nav-link:hover {
  color: var(--ink);
}

.nav-link.active {
  color: var(--ink);
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 14px;
  right: 14px;
  height: 2px;
  background: var(--amber);
}

.main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 28px 24px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.4), 0 6px 18px rgba(0, 0, 0, 0.25);
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
}

.hire-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.4), 0 6px 18px rgba(0, 0, 0, 0.25);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.date-window {
  display: inline-block;
  background: var(--amber-dim);
  color: var(--amber);
  padding: 6px 12px;
  border-radius: var(--radius);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.875rem;
  letter-spacing: -0.01em;
}

.avail-bar {
  position: relative;
  background: var(--surface-2);
  height: 10px;
  border-radius: var(--radius);
  overflow: hidden;
}

.avail-bar-fill {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  background: var(--amber);
  border-radius: var(--radius);
  transition: width 0.3s ease;
}

.pill {
  display: inline-block;
  padding: 4px 10px;
  border-radius: calc(var(--radius) / 1.5);
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.pill-draft {
  background: var(--surface-2);
  color: var(--muted);
}

.pill-confirmed {
  background: var(--amber-dim);
  color: var(--amber);
}

.pill-out {
  background: var(--teal-dim);
  color: var(--teal);
}

.pill-returned {
  background: rgba(76, 195, 138, 0.15);
  color: var(--success);
}

.pill-invoiced {
  background: var(--surface-2);
  color: var(--teal);
  border: 1px solid var(--line);
}

.pill-paid {
  background: rgba(76, 195, 138, 0.2);
  color: var(--success);
}

.pill-cancelled {
  background: rgba(242, 88, 91, 0.15);
  color: var(--alert);
}

.delivery-flag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  background: var(--teal-dim);
  color: var(--teal);
  border-radius: calc(var(--radius) / 1.5);
  font-size: 0.8125rem;
  font-weight: 600;
}

.delivery-flag::before {
  content: '→';
  font-weight: 700;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

thead {
  background: var(--surface);
}

thead th {
  text-align: left;
  padding: 12px 16px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
}

tbody tr {
  border-bottom: 1px solid var(--line);
  transition: background 0.15s ease;
}

tbody tr:hover {
  background: var(--surface-2);
}

tbody tr:last-child {
  border-bottom: none;
}

tbody td {
  padding: 14px 16px;
  color: var(--ink);
}

input, select, textarea {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  padding: 10px 12px;
  font-family: var(--font-body);
  font-size: 0.9375rem;
  width: 100%;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--amber);
  box-shadow: 0 0 0 3px rgba(245, 180, 60, 0.15);
}

textarea {
  resize: vertical;
  min-height: 100px;
}

button, .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--amber);
  color: var(--canvas);
  border: none;
  border-radius: var(--radius);
  padding: 10px 18px;
  font-family: var(--font-body);
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.1s ease;
}

button:hover, .btn:hover {
  background: #F7C256;
  color: var(--canvas);
}

button:active, .btn:active {
  transform: translateY(1px);
}

.btn-2 {
  background: transparent;
  color: var(--teal);
  border: 1px solid var(--teal);
}

.btn-2:hover {
  background: var(--teal-dim);
  color: var(--teal);
}

.btn-ghost {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--muted);
}

.btn-ghost:hover {
  background: var(--surface-2);
  color: var(--ink);
  border-color: var(--line);
}

.muted {
  color: var(--muted);
}

:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 2px;
}

@media (max-width: 760px) {
  .topbar {
    flex-direction: column;
    align-items: flex-start;
    padding: 16px 20px;
  }

  .nav {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
  }

  .nav-link {
    padding: 12px 8px;
  }

  .nav-link.active::after {
    left: 8px;
    right: 8px;
  }

  .main {
    padding: 20px 16px;
  }

  .grid {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
  }
}
