/* ==========================================================
   FuelJobberX — GLOBAL LIGHT-THEME UI
   Clean, modern, SaaS-style interface
   ========================================================== */

/* Root brand variables */
:root {
  --fj-primary: #2570EC;
  --fj-primary-hover: #1F5ED0;
  --fj-primary-soft: #E3EFFD;
  --fj-accent: #4DC2C6;
  --fj-navy: #194387;

  --fj-bg: #F5F7FB;
  --fj-surface: #FFFFFF;
  --fj-border: #E2E8F0;

  --fj-text-main: #1F2933;
  --fj-text-muted: #6B7280;
  --fj-danger: #DC2626;
}

/* Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: "Proxima Nova", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--fj-bg);
  color: var(--fj-text-main);
}

/* ==========================================================
   PAGE WRAPPER (lets footer sit below app shell)
   IMPORTANT: your HTML must wrap everything in <div class="fj-page">
   ========================================================== */
.fj-page{
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ----------------------------------------------------------
   APP SHELL LAYOUT (Sidebar + Main)
   IMPORTANT: do NOT force 100vh here (that breaks footer)
---------------------------------------------------------- */
.fj-app-shell {
  flex: 1;
  display: flex;
  width: 100%;
  min-height: 0;
}

/* ----------------------------------------------------------
   SIDEBAR
---------------------------------------------------------- */
.fj-sidebar {
  width: 240px;
  background: var(--fj-surface);
  border-right: 1px solid var(--fj-border);
  padding: 18px 16px;
  display: flex;
  flex-direction: column;
}

.fj-sidebar-header {
  display: flex;
  justify-content: center;
  padding-bottom: 18px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--fj-border);
}

.fj-logo {
  width: 150px;
  height: auto;
  object-fit: contain;
  display: block;
}

/* Nav */
.fj-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.fj-nav-item {
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 14px;
  color: var(--fj-text-main);
  text-decoration: none;
  transition: 0.15s ease;

  display: flex;
  align-items: center;
  gap: 10px;
}

.fj-nav-item:hover {
  background: var(--fj-primary-soft);
  color: var(--fj-primary);
}

.fj-nav-item-active {
  background: var(--fj-primary-soft);
  font-weight: 600;
  color: var(--fj-primary);
}

.fj-nav-icon {
  width: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.fj-nav-item-active .fj-nav-icon svg path {
  stroke: var(--fj-primary) !important;
  fill: var(--fj-primary) !important;
}

.fj-nav-section-label {
  margin-top: 14px;
  margin-bottom: 4px;
  padding-left: 2px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--fj-text-muted);
}

/* ----------------------------------------------------------
   TOPBAR
---------------------------------------------------------- */
.fj-topbar {
  background: var(--fj-surface);
  border-bottom: 1px solid var(--fj-border);
  padding: 16px 24px;

  display: flex;
  justify-content: space-between;
  align-items: center;
}

.fj-page-title {
  font-size: 22px;
  font-weight: 600;
  color: var(--fj-navy);
}

.fj-page-subtitle {
  font-size: 14px;
  color: var(--fj-text-muted);
  margin-top: 2px;
}

/* ----------------------------------------------------------
   MAIN CONTENT AREA
---------------------------------------------------------- */
.fj-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

/* Center content column (does NOT affect footer width) */
.fj-content {
  padding: 24px;
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
}

/* ----------------------------------------------------------
   BUTTONS
---------------------------------------------------------- */
button,
.btn {
  padding: 10px 18px;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  transition: 0.15s ease;
}

.btn-primary-sm {
  background: var(--fj-primary);
  color: white;
}
.btn-primary-sm:hover {
  background: var(--fj-primary-hover);
}

.btn-secondary {
  background: white;
  border: 1px solid var(--fj-border);
  color: var(--fj-text-main);
  text-decoration: none; /* avoid underlines on <a> */
}
.btn-secondary:hover {
  background: var(--fj-primary-soft);
  color: var(--fj-primary);
}

.btn-danger {
  background: var(--fj-danger);
  color: white;
}

/* ----------------------------------------------------------
   CARDS
---------------------------------------------------------- */
.card,
.fj-card {
  background: var(--fj-surface);
  border: 1px solid var(--fj-border);
  border-radius: 12px;
  padding: 16px;
  transition: 0.15s ease;
}

.card:hover,
.fj-card:hover {
  box-shadow: 0 6px 20px rgba(0,0,0,0.06);
}

.card-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  margin-top: 20px;
}

/* ----------------------------------------------------------
   INPUTS
---------------------------------------------------------- */
input,
select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--fj-border);
  border-radius: 8px;
  background: white;
  font-size: 14px;
}

input:focus,
select:focus {
  border-color: var(--fj-primary);
  outline: none;
}

/* ----------------------------------------------------------
   STATUS
---------------------------------------------------------- */
.status-message {
  font-size: 14px;
  margin-top: 10px;
  min-height: 18px;
}

.status-message.ok { color: #16A34A; }
.status-message.error { color: var(--fj-danger); }

/* ----------------------------------------------------------
   DASHBOARD METRICS
---------------------------------------------------------- */
.fj-metrics-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.fj-metric-card {
  background: var(--fj-surface);
  border-radius: 12px;
  border: 1px solid var(--fj-border);
  padding: 16px;

  display: flex;
  flex-direction: column;
  gap: 6px;

  position: relative;
  overflow: hidden;
}

.fj-metric-card::after {
  content: "";
  position: absolute;
  bottom: 0;
  right: 0;
  width: 50px;
  height: 50px;
  background: var(--fj-primary-soft);
  border-top-left-radius: 100px;
  opacity: 0.25;
}

.fj-metric-icon svg {
  width: 26px;
  height: 26px;
  display: block;
}

.fj-metric-label {
  font-size: 15px;
  font-weight: 500;
  margin-top: 2px;
}

.fj-metric-value {
  font-size: 26px;
  font-weight: 700;
  color: var(--fj-navy);
  margin-top: 2px;
}

.fj-metric-sub {
  font-size: 13px;
  color: var(--fj-text-muted);
}

/* ----------------------------------------------------------
   DASHBOARD QUICK ACTIONS
---------------------------------------------------------- */
.fj-shortcuts-card { margin-top: 22px; }

.fj-shortcuts-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.fj-shortcut-card {
  background: white;
  border: 1px solid var(--fj-border);
  border-radius: 10px;
  padding: 14px;
  text-decoration: none;

  display: flex;
  gap: 12px;
  align-items: flex-start;

  transition: 0.15s ease;
}

.fj-shortcut-card:hover {
  background: var(--fj-primary-soft);
  border-color: var(--fj-primary);
  transform: translateY(-2px);
}

.fj-shortcut-icon svg {
  width: 24px;
  height: 24px;
  display: block;
}

.fj-shortcut-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--fj-primary);
}

.fj-shortcut-text {
  font-size: 13px;
  color: var(--fj-text-muted);
}

/* ----------------------------------------------------------
   MODAL
---------------------------------------------------------- */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.25);
  display: none;
  align-items: center;
  justify-content: center;
}
.modal-backdrop.show { display: flex; }

.modal {
  background: white;
  padding: 22px;
  border-radius: 12px;
  border: 1px solid var(--fj-border);
  width: 100%;
  max-width: 520px;
}

/* ----------------------------------------------------------
   RESPONSIVE
---------------------------------------------------------- */
@media (max-width: 768px) {
  .fj-page-title { font-size: 18px; }
  .fj-shortcuts-grid { grid-template-columns: 1fr; }
}

/* ----------------------------------------------------------
   LOGIN/HELPER
---------------------------------------------------------- */
.security-banner {
  background: #FFF8E6;
  border: 1px solid #F2C97D;
  color: #8A6D3B;
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 13px;
  line-height: 1.45;
  margin-bottom: 22px;
  text-align: center;
}
.security-banner strong { font-weight: 700; }

.login-logo-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 12px;
}

.login-logo img {
  width: auto;
  max-width: 180px;
  max-height: 60px;
  object-fit: contain;
}

.terminal-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 6px 0;
}

.terminal-list label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
}

.hidden{ display:none !important; }

/* ----------------------------------------------------------
   TOPBAR ACTIONS
---------------------------------------------------------- */
.fj-topbar-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.fj-topbar-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}

.fj-topbar-btn svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
}

/* Optional: make Logout a little “danger aware” without being red */
#topbar-logout.btn-secondary:hover {
  background: #fff1f2;
  border-color: #fecdd3;
  color: #be123c;
}

/* ----------------------------------------------------------
   FOOTER (FULL WIDTH — sits under the entire page)
---------------------------------------------------------- */
.fj-footer {
  width: 100%;
  background: var(--fj-surface);
  border-top: 1px solid var(--fj-border);
}

.fj-footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 18px 24px;

  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;

  font-size: 13px;
  color: #64748b;
}

.fj-footer-right a {
  color: #64748b;
  text-decoration: none;
}
.fj-footer-right a:hover { text-decoration: underline; }

.fj-footer-dot {
  margin: 0 8px;
  opacity: 0.6;
}
/* ----------------------------------------------------------
   LEGAL DOCUMENT TYPOGRAPHY (Terms / Privacy)
---------------------------------------------------------- */

.legal-doc {
  font-size: 15.5px;
  line-height: 1.65;
  color: #1f2933;
}

.legal-doc p {
  margin-bottom: 16px;
}

.legal-doc h1 {
  font-size: 26px;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--fj-navy);
}

.legal-doc h2 {
  font-size: 18px;
  font-weight: 600;
  margin-top: 28px;
  margin-bottom: 8px;
  color: #111827;
}

.legal-doc .legal-updated {
  font-size: 13px;
  color: var(--fj-text-muted);
  margin-bottom: 18px;
}

.legal-doc a {
  color: var(--fj-primary);
  text-decoration: underline;
}
/* ----------------------------------------------------------
   HELP PAGE
---------------------------------------------------------- */
.fj-help-grid{
  display:grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap:16px;
  margin-top: 14px;
}

.fj-help-panel{
  border: 1px solid var(--fj-border);
  border-radius: 12px;
  padding: 14px;
  background: #fff;
}

.fj-help-panel-title{
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .02em;
  color: var(--fj-text-muted);
  text-transform: uppercase;
  margin-bottom: 10px;
}

.fj-help-item{
  display:flex;
  gap:10px;
  padding:10px;
  border-radius: 10px;
  border: 1px solid transparent;
}

.fj-help-item + .fj-help-item{ margin-top: 6px; }

.fj-help-item:hover{
  background: var(--fj-primary-soft);
  border-color: var(--fj-border);
}

.fj-help-icon{
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display:flex;
  align-items:center;
  justify-content:center;
  background: #f8fafc;
  border: 1px solid var(--fj-border);
  font-size: 16px;
}

.fj-help-item-title{
  font-size: 14px;
  font-weight: 700;
  color: var(--fj-text-main);
  margin-bottom: 2px;
}

.fj-help-item-text{
  font-size: 13px;
  color: var(--fj-text-muted);
  line-height: 1.5;
}

.fj-help-callout{
  border: 1px dashed var(--fj-border);
  border-radius: 12px;
  padding: 12px;
  background: #fbfdff;
}

.fj-help-callout-label{
  font-size: 12px;
  color: var(--fj-text-muted);
  margin-bottom: 6px;
}

.fj-help-email{
  display:inline-block;
  font-size: 16px;
  font-weight: 800;
  color: var(--fj-primary);
  text-decoration: none;
}

.fj-help-email:hover{ text-decoration: underline; }

.fj-help-callout-sub{
  margin-top: 6px;
  font-size: 12px;
  color: var(--fj-text-muted);
}

.fj-help-list{
  display:flex;
  flex-direction: column;
  gap: 8px;
}

.fj-help-list-row{
  font-size: 13px;
  color: var(--fj-text-main);
  padding: 10px 12px;
  background: #f8fafc;
  border: 1px solid var(--fj-border);
  border-radius: 10px;
}

.fj-help-status{
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--fj-border);
}

.fj-help-status-title{
  font-size: 13px;
  font-weight: 800;
  color: var(--fj-text-main);
  margin-bottom: 6px;
}

.fj-help-status-text{
  font-size: 13px;
  color: var(--fj-text-muted);
  line-height: 1.55;
}

@media (max-width: 900px){
  .fj-help-grid{ grid-template-columns: 1fr; }
}
/* ----------------------------------------------------------
   LEGAL DOCUMENT PAGES (Terms, Privacy, Policies)
---------------------------------------------------------- */
.legal-doc{
  max-width: 980px;
}

.legal-doc h1{
  font-size: 26px;
  font-weight: 700;
  color: var(--fj-navy);
  margin-bottom: 6px;
}

.legal-doc .legal-subtitle{
  font-size: 14px;
  color: var(--fj-text-muted);
  margin-bottom: 18px;
}

.legal-doc .legal-updated{
  font-size: 13px;
  color: var(--fj-text-muted);
  margin-bottom: 20px;
}

.legal-doc p{
  font-size: 14.5px;
  line-height: 1.75;
  color: var(--fj-text-main);
  margin-bottom: 16px;
}

.legal-doc h2{
  font-size: 17px;
  font-weight: 700;
  color: var(--fj-text-main);
  margin: 28px 0 10px;
}

.legal-doc ul{
  margin: 0 0 16px 18px;
  padding: 0;
}

.legal-doc li{
  font-size: 14.5px;
  line-height: 1.7;
  color: var(--fj-text-main);
  margin-bottom: 8px;
}

.legal-doc a{
  color: var(--fj-primary);
  text-decoration: none;
  font-weight: 600;
}

.legal-doc a:hover{
  text-decoration: underline;
}
/* FOOTER (sticky when content is short) */
.fj-main {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.fj-content {
  flex: 1; /* KEY: pushes footer to bottom */
}

.fj-footer {
  width: 100%;
  background: var(--fj-surface);
  border-top: 1px solid var(--fj-border);
}

.fj-footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 18px 24px;

  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;

  font-size: 13px;
  color: #64748b;
}

.fj-footer-right a {
  color: #64748b;
  text-decoration: none;
}

.fj-footer-right a:hover {
  text-decoration: underline;
}

.fj-footer-dot {
  margin: 0 8px;
  opacity: 0.6;
}
/* ==========================================================
   AUTH PAGES (Forgot Password, etc.)
   ========================================================== */
.fj-auth-page {
  background: var(--fj-bg);
}

.fj-auth-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 24px;
  gap: 18px;
}

.fj-auth-card {
  width: 100%;
  max-width: 520px;
  padding: 22px;
}

.fj-auth-brand {
  text-align: center;
  margin-bottom: 14px;
}

.fj-auth-logo {
  max-width: 190px;
  max-height: 64px;
  width: auto;
  height: auto;
  object-fit: contain;
  margin-bottom: 8px;
}

.fj-auth-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--fj-navy);
  margin-bottom: 6px;
}

.fj-auth-subtitle {
  color: var(--fj-text-muted);
  font-size: 14px;
  line-height: 1.5;
}

.fj-auth-form .input-group label {
  display: block;
  font-size: 13px;
  color: var(--fj-text-main);
  margin-bottom: 6px;
  font-weight: 600;
}

.fj-auth-btn {
  width: 100%;
  margin-top: 12px;
}

.fj-auth-links {
  margin-top: 12px;
  text-align: center;
  font-size: 13px;
}

.fj-auth-links a {
  color: var(--fj-primary);
  text-decoration: none;
  font-weight: 600;
}

.fj-auth-links a:hover {
  text-decoration: underline;
}

.fj-auth-footer {
  font-size: 13px;
  color: #64748b;
}

.fj-auth-footer a {
  color: #64748b;
  text-decoration: none;
}

.fj-auth-footer a:hover {
  text-decoration: underline;
}
/* Make anchor buttons look like real buttons */
a.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  height: 36px;
  padding: 0 14px;

  font-size: 14px;
  font-weight: 500;
  line-height: 1;

  text-decoration: none;
  white-space: nowrap;

  border-radius: 9999px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--ink);

  cursor: pointer;
}

a.btn-secondary:hover {
  background: #f8fafc;
}/* Align Back button visually with Save */
#back-btn {
  height: 40px;               /* match btn-primary-sm */
  display: inline-flex;
  align-items: center;
  padding: 0 16px;
  font-weight: 600;
}
/* ---------- FIX: make Back match Save button (customer_edit) ---------- */
#back-btn.btn-secondary,
a#back-btn.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  height: 40px;              /* close to your Save size */
  padding: 0 18px;
  border-radius: 999px;

  font-size: 14px;
  font-weight: 600;
  line-height: 1;

  border: 1px solid var(--fj-border);
  background: #fff;
  color: var(--fj-text-main);

  text-decoration: none;
  white-space: nowrap;
}

#back-btn.btn-secondary:hover,
a#back-btn.btn-secondary:hover {
  background: var(--fj-primary-soft);
  color: var(--fj-primary);
  border-color: var(--fj-border);
}
/* Tighten sidebar spacing */
.fj-nav { gap: 2px; }

.fj-nav-item{
  padding: 8px 12px;     /* was 10px */
  line-height: 1.15;
}

.fj-nav-section-label{
  margin-top: 10px;      /* was 14px */
  margin-bottom: 2px;    /* was 4px */
}
/* FORCE compact sidebar spacing (override any later rules) */
.fj-nav { gap: 0 !important; }

.fj-nav-item{
  margin: 0 !important;
  padding: 6px 12px !important;     /* tighter */
  min-height: 34px !important;      /* keeps it compact */
  line-height: 1.1 !important;
}

.fj-nav-icon{
  width: 18px !important;
}

.fj-nav-icon svg{
  width: 18px !important;
  height: 18px !important;
  display: block !important;
}

.fj-nav-section-label{
  margin: 10px 0 4px !important;    /* tighter than before */
}
/* Make <a> buttons look like real buttons */
.fj-btn-link{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  height:40px;            /* matches your button height */
  padding:0 18px;
  border-radius:999px;
  font-weight:600;
  text-decoration:none;   /* removes underline */
}

a.btn-primary-sm{
  text-decoration:none;   /* safety */
}