/*
 * Global styles for the Hustle HQ CRM.
 * A simple dark theme is used throughout to provide a clean,
 * high‑contrast interface for productivity. Feel free to adjust
 * colours and spacing to suit your preferences.
 */

/* Base page styling */
html, body {
  height: 100%;
}
body {
  margin: 0;
  padding: 0;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  /* Default fallback background and wallpaper. The built‑in wallpaper
     (default_wallpaper.png) provides a subtle dark motif that
     complements the Hustle HQ interface. When a user uploads their
     own wallpaper via the Resources page, the JS applyWallpaper()
     function will override this style. */
  background: #0c0c0e url("./default_wallpaper.png") center/cover no-repeat fixed;
  color: #f5f5f5;
}

/* Top navigation bar */
.topnav {
  display: flex;
  align-items: center;
  gap: 20px;
  background: #0d0d10;
  border-bottom: 1px solid #2a2a30;
  padding: 14px 24px;
}
.topnav .logo {
  font-weight: bold;
  margin-right: auto;
}
.topnav a {
  color: #bbb;
  text-decoration: none;
  padding: 6px 8px;
  border-bottom: 2px solid transparent;
  transition: all 0.2s ease;
}
.topnav a:hover {
  color: #fff;
  border-bottom-color: #444;
}
.topnav a.active {
  color: #fff;
  font-weight: 600;
  border-bottom-color: #fff;
}

/* Main content panel */
.panel {
  max-width: 980px;
  margin: 40px auto;
  padding: 24px;
  background: #0f0f12;
  border: 1px solid #1e1e24;
  border-radius: 16px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  min-height: calc(100vh - 120px);
}

/* Stack spacing helper */
.stack > * + * {
  margin-top: 16px;
}

/* Grid layout for KPIs and cards */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

/* Card component */
.card {
  padding: 16px;
  border-radius: 14px;
  background: #14141a;
  border: 1px solid #24242a;
}
.kpi-title {
  opacity: 0.7;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.kpi-value {
  font-size: 26px;
  font-weight: 700;
  margin-top: 8px;
}

/* Buttons */
.btn {
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid #2a2a30;
  background: #1a1a1e;
  color: #f5f5f5;
  cursor: pointer;
  font-size: 14px;
  transition: background 0.2s ease;
}
.btn:hover {
  background: #2a2a30;
}
.btn.small {
  padding: 6px 10px;
  font-size: 12px;
}
.btn.wide {
  width: 100%;
}

/* Row helper */
.row {
  display: flex;
  gap: 8px;
  align-items: center;
}

/* Simple list */
.list {
  display: grid;
  gap: 8px;
  list-style: none;
  padding-left: 0;
}

/* Table component for Removalist jobs */
.table .row {
  display: grid;
  grid-template-columns: 120px 1fr 1.5fr 100px 140px;
  gap: 8px;
  padding: 8px;
  border-bottom: 1px solid #222;
}
.table .row.head {
  font-weight: 600;
  opacity: 0.8;
  background: #1a1a1e;
}

/* KPI cards enhancements */
.kpi {
  position: relative;
  overflow: hidden;
}
.kpi .kpi-value {
  font-size: 30px;
  font-weight: 800;
  margin-top: 6px;
}
.kpi::after {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: 14px;
  pointer-events: none;
  box-shadow: 0 0 60px rgba(255, 255, 255, 0.03) inset;
}

/* Sparkline wrapper */
.spark-wrap {
  height: 36px;
  margin-top: 8px;
  opacity: 0.9;
}

/* Muted text */
.muted {
  opacity: 0.6;
}

/* Centered container helper for forms and login pages */
.centered {
  max-width: 480px;
  margin: 80px auto;
  padding: 24px;
  background: rgba(15, 15, 18, 0.9);
  border-radius: 16px;
  border: 1px solid #1e1e24;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

/* Navigation bar for logged-in pages */
.nav {
  display: flex;
  gap: 24px;
  background: #0d0d10;
  border-bottom: 1px solid #2a2a30;
  padding: 12px 24px;
  position: sticky;
  top: 0;
  z-index: 10;
}
.nav a {
  color: #bbb;
  text-decoration: none;
  padding-bottom: 4px;
  border-bottom: 2px solid transparent;
  transition: all 0.2s ease;
}
.nav a:hover {
  color: #fff;
  border-bottom-color: #555;
}

/* Grid layouts for dashboard */
.grid4 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-top: 24px;
}
.grid2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 16px;
  margin-top: 24px;
}

/* Warnings styling */
.warnings {
  background: #331515;
  border: 1px solid #552222;
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 16px;
}
.warnings h3 {
  margin-top: 0;
  margin-bottom: 8px;
  color: #f88;
}
.warnings ul {
  margin: 0;
  padding-left: 20px;
}
.warnings li {
  margin-bottom: 4px;
}

/* Modal for motivational image */
.modal {
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
}
.modal-content {
  position: relative;
  max-width: 80%;
  max-height: 80%;
}
.modal-content img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}
.close {
  position: absolute;
  top: -12px;
  right: -12px;
  background: #222;
  color: #fff;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 18px;
}

.table {
  border-collapse: collapse;
  width: 100%;
  margin-top: 16px;
}
.table th, .table td {
  padding: 8px;
  text-align: left;
  border-bottom: 1px solid #222;
}
.table th {
  background: #1a1a1e;
}

.form-group {
  margin-bottom: 14px;
}
.error {
  color: #f88;
  margin-bottom: 10px;
}


/* Motivational image displayed at the bottom of the dashboard panel. The
   image spans the full width of its container and maintains its aspect
   ratio. Rounded corners and a subtle shadow help it blend with the
   dark theme while providing a light, inspirational accent. */
.motivational-img {
  width: 100%;
  height: auto;
  border-radius: 12px;
  margin-top: 24px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

/* Form inputs */
input[type="text"], input[type="date"], input[type="number"] {
  padding: 8px 10px;
  border-radius: 6px;
  border: 1px solid #2a2a30;
  background: #1a1a1e;
  color: #f5f5f5;
  width: 100%;
}
input::placeholder {
  color: #888;
}