:root {
  --gj-navy: #1B2A4A;
  --gj-navy2: #142039;
  --gj-accent: #2563EB;
  --gj-accent-d: #1d4ed8;
  --gj-accent-light: #DBEAFE;
  --gj-success: #16A34A;
  --gj-warning: #F59E0B;
  --gj-danger: #DC2626;
  --gj-text: #1E293B;
  --gj-muted: #64748B;
  --gj-border: #E2E8F0;
  --gj-light: #F8FAFC;
  --gj-white: #FFFFFF;
  --gj-radius: 8px;
  --gj-radius-lg: 14px;
  --gj-sidebar-w: 220px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; height: 100%; }
body { font-family: 'Segoe UI', Arial, sans-serif; color: var(--gj-text); font-size: 15px; line-height: 1.6; background: var(--gj-light); height: 100%; }
a { color: var(--gj-accent); text-decoration: none; }
a:hover { color: var(--gj-accent-d); }

/* ── Layout ── */
.gj-app-wrap { display: flex; min-height: 100vh; }
.gj-content-wrap { flex: 1; display: flex; flex-direction: column; min-width: 0; margin-left: var(--gj-sidebar-w); }
.gj-main-content { flex: 1; padding: 1.5rem; width: 100%; }

/* ── Sidebar ── */
.gj-sidebar {
  width: var(--gj-sidebar-w);
  background: var(--gj-navy);
  position: fixed;
  top: 0; left: 0; bottom: 0;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  z-index: 100;
  transition: transform 0.25s ease;
}
.gj-sidebar-header {
  padding: 1.1rem 1rem 0.9rem;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.gj-brand {
  font-size: 1.25rem;
  font-weight: 800;
  color: #fff;
  text-decoration: none;
  display: block;
  letter-spacing: -0.5px;
}
.gj-brand span { color: #60A5FA; }
.gj-brand:hover { color: #fff; text-decoration: none; }
.gj-company-name { font-size: 0.7rem; color: rgba(255,255,255,0.35); margin-top: 2px; }
.gj-nav-section {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: rgba(255,255,255,0.28);
  padding: 1rem 1rem 0.3rem;
}
.gj-nav-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.5rem 1rem;
  color: rgba(255,255,255,0.58);
  font-size: 0.85rem;
  text-decoration: none;
  transition: all 0.15s;
  border-right: 3px solid transparent;
  position: relative;
}
.gj-nav-item:hover { color: #fff; background: rgba(255,255,255,0.06); text-decoration: none; }
.gj-nav-item.active { color: #fff; background: rgba(37,99,235,0.25); border-right-color: #2563EB; }
.gj-nav-item i { font-size: 0.95rem; width: 18px; text-align: center; flex-shrink: 0; }
.gj-nav-badge {
  margin-left: auto;
  background: #DC2626;
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 8px;
  min-width: 18px;
  text-align: center;
}
.gj-sidebar-footer {
  margin-top: auto;
  padding: 0.5rem 0;
  border-top: 1px solid rgba(255,255,255,0.08);
}
.gj-user-block {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.6rem 1rem;
  text-decoration: none;
  transition: background 0.15s;
}
.gj-user-block:hover { background: rgba(255,255,255,0.05); }
.gj-user-name { font-size: 0.82rem; font-weight: 700; color: #fff; }
.gj-user-role { font-size: 0.68rem; color: rgba(255,255,255,0.38); }

/* ── Topbar ── */
.gj-topbar {
  background: #fff;
  border-bottom: 1px solid var(--gj-border);
  padding: 0.6rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.gj-sidebar-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.4rem;
  cursor: pointer;
  color: var(--gj-navy);
  padding: 0.2rem;
  line-height: 1;
}
.gj-topbar-right { display: flex; align-items: center; gap: 0.75rem; }

/* ── Page header ── */
.gj-page-header { margin-bottom: 1.5rem; }
.gj-page-header h1 { font-size: 1.35rem; font-weight: 800; color: var(--gj-navy); margin: 0; }
.gj-breadcrumb {
  font-size: 0.75rem;
  color: var(--gj-muted);
  margin-top: 0.2rem;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}
.gj-breadcrumb a { color: var(--gj-muted); }
.gj-breadcrumb a:hover { color: var(--gj-accent); }

/* ── Cards ── */
.gj-card {
  background: #fff;
  border-radius: var(--gj-radius-lg);
  border: 1px solid var(--gj-border);
  overflow: hidden;
  margin-bottom: 1rem;
}
.gj-card-header {
  padding: 0.8rem 1.25rem;
  border-bottom: 1px solid var(--gj-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #fff;
}
.gj-card-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--gj-navy);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.gj-card-body { padding: 1.25rem; }
.gj-divider { height: 1px; background: var(--gj-border); margin: 1rem 0; }

/* ── Stat cards ── */
.gj-stat-card {
  background: #fff;
  border-radius: var(--gj-radius);
  padding: 1rem 1.1rem;
  border: 1px solid var(--gj-border);
  height: 100%;
}
.gj-stat-val { font-size: 1.7rem; font-weight: 800; color: var(--gj-navy); line-height: 1; }
.gj-stat-lbl { font-size: 0.68rem; color: var(--gj-muted); text-transform: uppercase; letter-spacing: 0.5px; margin-top: 0.25rem; font-weight: 600; }
.gj-stat-sub { font-size: 0.7rem; font-weight: 600; margin-top: 0.3rem; }

/* ── Tables ── */
.gj-table-wrap { overflow-x: auto; }
.gj-table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
.gj-table thead th {
  background: var(--gj-light);
  padding: 0.6rem 1rem;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--gj-muted);
  border-bottom: 1px solid var(--gj-border);
  white-space: nowrap;
}
.gj-table tbody td { padding: 0.75rem 1rem; border-bottom: 1px solid var(--gj-border); vertical-align: middle; }
.gj-table tbody tr:last-child td { border-bottom: none; }
.gj-table tbody tr:hover { background: var(--gj-light); }
.gj-table a { color: var(--gj-text); font-weight: 600; }
.gj-table a:hover { color: var(--gj-accent); }

/* ── Badges ── */
.gj-badge {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  border-radius: 50px;
  font-size: 0.7rem;
  font-weight: 700;
}

/* ── Avatar ── */
.gj-avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--gj-navy);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 0.72rem; font-weight: 700;
  flex-shrink: 0;
}
.gj-avatar.sm { width: 26px; height: 26px; font-size: 0.62rem; }
.gj-avatar.lg { width: 46px; height: 46px; font-size: 1rem; }

/* ── Job list items ── */
.gj-job-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.8rem 1.1rem;
  border-bottom: 1px solid var(--gj-border);
  text-decoration: none;
  color: var(--gj-text);
  transition: background 0.12s;
}
.gj-job-item:hover { background: var(--gj-light); text-decoration: none; color: var(--gj-text); }
.gj-job-item:last-child { border-bottom: none; }
.gj-job-status-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.gj-job-body { flex: 1; min-width: 0; }
.gj-job-ref { font-size: 0.67rem; font-weight: 700; color: var(--gj-muted); text-transform: uppercase; letter-spacing: 0.3px; }
.gj-job-title { font-size: 0.875rem; font-weight: 700; color: var(--gj-navy); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gj-job-meta { font-size: 0.75rem; color: var(--gj-muted); display: flex; align-items: center; gap: 0.3rem; margin-top: 1px; flex-wrap: wrap; }
.gj-job-right { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; flex-shrink: 0; }

/* ── Search & filters ── */
.gj-search-bar { position: relative; }
.gj-search-icon { position: absolute; left: 0.75rem; top: 50%; transform: translateY(-50%); color: var(--gj-muted); font-size: 0.875rem; pointer-events: none; }
.gj-search-bar .form-control { padding-left: 2.25rem; }
.gj-filter-chips { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.gj-chip {
  display: inline-block;
  padding: 0.22rem 0.7rem;
  border-radius: 50px;
  font-size: 0.78rem;
  font-weight: 600;
  border: 1px solid var(--gj-border);
  color: var(--gj-muted);
  background: #fff;
  transition: all 0.12s;
  text-decoration: none;
}
.gj-chip:hover { border-color: var(--gj-accent); color: var(--gj-accent); text-decoration: none; }
.gj-chip.active { background: var(--gj-accent); border-color: var(--gj-accent); color: #fff; }

/* ── Empty state ── */
.gj-empty { text-align: center; padding: 3rem 1rem; }
.gj-empty i { font-size: 2.75rem; color: var(--gj-border); display: block; margin-bottom: 1rem; }
.gj-empty h5 { font-weight: 700; color: var(--gj-navy); margin-bottom: 0.5rem; }
.gj-empty p { color: var(--gj-muted); font-size: 0.875rem; margin-bottom: 1.25rem; }

/* ── FAB ── */
.gj-fab {
  position: fixed;
  bottom: 1.5rem; right: 1.5rem;
  width: 52px; height: 52px;
  border-radius: 50%;
  background: var(--gj-accent);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem;
  box-shadow: 0 4px 16px rgba(37,99,235,0.35);
  z-index: 200;
  text-decoration: none;
  transition: all 0.18s;
}
.gj-fab:hover { background: var(--gj-accent-d); color: #fff; transform: scale(1.05); text-decoration: none; }

/* ── Flash messages ── */
.gj-flash-msg {
  position: fixed;
  top: 1rem; right: 1rem;
  z-index: 9999;
  min-width: 280px; max-width: 420px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.12);
}

/* ── Login page ── */
.gj-login-page {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--gj-navy) 0%, #1a3a6e 100%);
  padding: 1rem;
}
.gj-login-card {
  background: #fff;
  border-radius: var(--gj-radius-lg);
  padding: 2.5rem;
  width: 100%; max-width: 420px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.25);
}
.gj-login-logo { font-size: 1.6rem; font-weight: 800; color: var(--gj-navy); }
.gj-login-logo span { color: var(--gj-accent); }
.gj-login-sub { color: var(--gj-muted); font-size: 0.9rem; }

/* ── Progress bars (Gantt) ── */
.gj-progress { height: 4px; background: var(--gj-border); border-radius: 2px; overflow: hidden; margin-top: 3px; }
.gj-progress-fill { height: 100%; border-radius: 2px; }

/* ── Utility ── */
.fw-600 { font-weight: 600 !important; }
.fw-700 { font-weight: 700 !important; }
.fw-800 { font-weight: 800 !important; }
.text-accent { color: var(--gj-accent) !important; }
.fs-sm { font-size: 0.875rem; }

/* ── Forms ── */
.form-label { font-size: 0.82rem; font-weight: 600; color: var(--gj-text); margin-bottom: 0.3rem; }
.form-control, .form-select { font-size: 0.9rem; }
.form-control:focus, .form-select:focus { border-color: var(--gj-accent); box-shadow: 0 0 0 3px rgba(37,99,235,0.1); }
.input-group-text { font-size: 0.9rem; }

/* ── Buttons ── */
.btn-primary { background: var(--gj-accent); border-color: var(--gj-accent); }
.btn-primary:hover { background: var(--gj-accent-d); border-color: var(--gj-accent-d); }

/* ── Mobile ── */
@media (max-width: 768px) {
  .gj-sidebar { transform: translateX(-100%); box-shadow: none; }
  .gj-sidebar.open { transform: translateX(0); box-shadow: 4px 0 24px rgba(0,0,0,0.25); }
  .gj-content-wrap { margin-left: 0; }
  .gj-sidebar-toggle { display: block; }
  .gj-topbar { padding: 0.6rem 1rem; }
  .gj-main-content { padding: 1rem; }
  .gj-fab { bottom: 5rem; }
}

/* ── Scrollbar ── */
.gj-sidebar::-webkit-scrollbar { width: 4px; }
.gj-sidebar::-webkit-scrollbar-track { background: transparent; }
.gj-sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); border-radius: 2px; }
