/* Fieldwork V3 shared application shell — WAC-2V dashboard palette */

:root {
  --v3-bg:        #F0F4F8;
  --v3-primary:   #2563EB;
  --v3-accent:    #0D9488;
  --v3-secondary: #E2E8F0;
  --v3-text:      #1E293B;
  --v3-surface:   #FFFFFF;
  --v3-muted:     #64748B;
  --v3-border:    #E2E8F0;

  --v3-blue:      #2563EB;
  --v3-teal:      #0D9488;
  --v3-green:     #16A34A;
  --v3-orange:    #EA580C;
  --v3-purple:    #7C3AED;
  --v3-red:       #DC2626;
  --v3-amber:     #D97706;

  --v3-font:      'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;

  --v3-space-1:   4px;
  --v3-space-2:   8px;
  --v3-space-3:   12px;
  --v3-space-4:   16px;
  --v3-space-5:   20px;
  --v3-space-6:   24px;
  --v3-space-8:   32px;

  --v3-radius:    12px;
  --v3-radius-sm: 8px;

  --v3-topbar:    52px;
  --v3-sidebar:   220px;
  --v3-sidebar-collapsed: 64px;
  --v3-bottom-nav: 60px;
}

.v3-shell-topbar {
  position: fixed;
  inset: 0 0 auto 0;
  height: var(--v3-topbar);
  background: var(--v3-surface);
  border-bottom: 1px solid var(--v3-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--v3-space-4);
  z-index: 50;
  box-shadow: 0 1px 2px rgba(52,56,58,0.04);
}

.v3-shell-topbar-left,
.v3-shell-topbar-right { display: flex; align-items: center; gap: var(--v3-space-3); }

.v3-shell-brand {
  display: flex;
  align-items: center;
  gap: var(--v3-space-2);
  font-weight: 700;
  color: var(--v3-primary);
  font-size: 1.125rem;
  letter-spacing: -0.01em;
  text-decoration: none;
}

.v3-shell-brand-mark {
  width: 28px; height: 28px;
  background: linear-gradient(135deg, var(--v3-blue), var(--v3-teal));
  border-radius: var(--v3-radius-sm);
  display: grid; place-items: center;
  color: var(--v3-surface);
  font-weight: 700;
  font-size: 0.875rem;
}

.v3-shell-workspace-label {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--v3-muted);
  background: var(--v3-bg);
  padding: var(--v3-space-1) var(--v3-space-3);
  border-radius: 999px;
  border: 1px solid var(--v3-border);
}

.v3-shell-sidenav {
  position: fixed;
  inset: var(--v3-topbar) auto 0 0;
  background: var(--v3-surface);
  border-right: 1px solid var(--v3-border);
  display: flex;
  flex-direction: column;
  padding: var(--v3-space-4);
  z-index: 40;
  width: var(--v3-sidebar);
  transition: width 180ms ease;
}

.v3-shell-nav-section { margin-bottom: var(--v3-space-8); }
.v3-shell-nav-section-title {
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--v3-muted);
  margin-bottom: var(--v3-space-2);
  padding: 0 var(--v3-space-3);
}

.v3-shell-nav-items { display: flex; flex-direction: column; gap: var(--v3-space-1); }

.v3-shell-nav-item {
  display: flex;
  align-items: center;
  gap: var(--v3-space-3);
  padding: var(--v3-space-3);
  border-radius: var(--v3-radius);
  color: var(--v3-text);
  text-decoration: none;
  font-size: 0.9375rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 120ms ease, color 120ms ease;
}

.v3-shell-nav-item:hover { background: var(--v3-bg); }
.v3-shell-nav-item.active { background: var(--v3-blue); color: var(--v3-surface); }
.v3-shell-nav-item.active svg { color: var(--v3-surface); }
.v3-shell-nav-item svg { width: 20px; height: 20px; color: var(--v3-muted); flex-shrink: 0; }

.v3-shell-user-state {
  display: flex;
  align-items: center;
  gap: var(--v3-space-2);
  font-size: 0.8125rem;
  color: var(--v3-muted);
}
.v3-shell-user-avatar {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--v3-teal), var(--v3-green));
  display: grid; place-items: center;
  color: var(--v3-surface);
  font-weight: 700;
  font-size: 0.75rem;
}
.v3-shell-search {
  display: flex;
  align-items: center;
  gap: var(--v3-space-2);
  background: var(--v3-bg);
  border: 1px solid var(--v3-border);
  border-radius: var(--v3-radius-sm);
  padding: 4px var(--v3-space-3);
  font-size: 0.8125rem;
  color: var(--v3-muted);
  min-width: 200px;
}
.v3-shell-search input {
  border: none; background: transparent; outline: none;
  font-size: 0.8125rem; color: var(--v3-text);
  width: 100%;
}

.v3-main {
  margin-left: var(--v3-sidebar);
  padding-top: var(--v3-topbar);
  min-height: 100vh;
  transition: margin-left 180ms ease;
}

.v3-shell-bottomnav {
  display: none;
  position: fixed;
  inset: auto 0 0 0;
  height: var(--v3-bottom-nav);
  background: var(--v3-surface);
  border-top: 1px solid var(--v3-border);
  align-items: center;
  justify-content: space-around;
  z-index: 45;
}

.v3-shell-bottomnav a {
  color: var(--v3-muted);
  text-decoration: none;
  font-size: 0.7rem;
  font-weight: 600;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 8px 5px;
}

.v3-shell-bottomnav a svg { width: 20px; height: 20px; }
.v3-shell-bottomnav a.active { color: var(--v3-blue); }

@media (max-width: 1023px) {
  .v3-shell-sidenav { width: var(--v3-sidebar-collapsed); align-items: center; padding: var(--v3-space-3) var(--v3-space-2); }
  .v3-shell-nav-section-title { display: none; }
  .v3-shell-nav-items { width: 100%; align-items: center; }
  .v3-shell-nav-item { justify-content: center; padding: var(--v3-space-3); }
  .v3-shell-nav-item span { display: none; }
  .v3-main { margin-left: var(--v3-sidebar-collapsed); }
}

@media (max-width: 767px) {
  .v3-shell-sidenav { display: none; }
  .v3-main { margin-left: 0; padding-bottom: var(--v3-bottom-nav); }
  .v3-shell-bottomnav { display: flex; }
  .v3-shell-topbar { padding: 0 var(--v3-space-3); }
  .v3-shell-workspace-label { display: none; }
}
