/* inavm estaff: shared dashboard UI.
   Goal: provide a coherent, modern baseline across all estaff pages
   (typography, surfaces, cards, tables) similar to Upcoming Jobs. */

:root {
  --inavm-bg-top: #f8fafc;
  --inavm-bg-bottom: #eef2f7;
  --inavm-surface: rgba(255, 255, 255, 0.92);
  --inavm-border: rgba(15, 23, 42, 0.12);
  --inavm-border-strong: rgba(15, 23, 42, 0.18);
  --inavm-shadow: 0 18px 42px rgba(2, 6, 23, 0.10);
  --inavm-shadow-soft: 0 10px 18px rgba(2, 6, 23, 0.08);
  --inavm-text: #0f172a;
  --inavm-muted: rgba(15, 23, 42, 0.72);
  --inavm-primary: #0b3b8f;
  --inavm-danger: #a10000;
  --inavm-radius: 18px;
  --inavm-radius-sm: 14px;
}

body.inavm-dashboard {
  color: var(--inavm-text);
  background:
    radial-gradient(1200px 680px at 18% -10%, rgba(11, 59, 143, 0.12), transparent 60%),
    radial-gradient(900px 560px at 82% -8%, rgba(25, 135, 84, 0.10), transparent 55%),
    linear-gradient(180deg, var(--inavm-bg-top), var(--inavm-bg-bottom));
  background-attachment: fixed;
}

.inavm-shell {
  padding-bottom: 3rem;
}

.inavm-pageHeader {
  margin: 1.1em auto 0.75em;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35em;
  text-align: center;
}

.inavm-pageTitle {
  margin: 0;
  font-weight: 900;
  letter-spacing: 0.01em;
  font-size: clamp(1.75rem, 3.4vw, 2.6rem);
  line-height: 1.05;
}

.inavm-pageSub {
  color: var(--inavm-muted);
  font-weight: 700;
  font-size: 0.95rem;
  max-width: 46rem;
}

.inavm-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.25em 0.7em;
  border-radius: 999px;
  background: var(--inavm-primary);
  color: #ffffff;
  font-weight: 900;
  font-size: 0.95rem;
  box-shadow: 0 10px 18px rgba(11, 59, 143, 0.18);
}

.inavm-pill--danger {
  background: var(--inavm-danger);
  box-shadow: 0 10px 18px rgba(161, 0, 0, 0.18);
}

.inavm-surface {
  background: var(--inavm-surface);
  border: 1px solid var(--inavm-border);
  border-radius: var(--inavm-radius);
  box-shadow: var(--inavm-shadow);
}

.inavm-surfacePad {
  padding: 1em;
}

.inavm-empty {
  padding: 1em;
  text-align: center;
  border-radius: var(--inavm-radius);
  background: rgba(255, 255, 255, 0.70);
  border: 1px dashed rgba(15, 23, 42, 0.20);
  color: rgba(15, 23, 42, 0.60);
  font-weight: 800;
}

/* Shared job card baseline (used by Upcoming Jobs, Refunds, Payouts, etc). */
.divMainJob {
  background: linear-gradient(180deg, rgba(248, 250, 252, 0.96), rgba(238, 242, 247, 0.92));
  border: 1px solid var(--inavm-border);
  border-radius: var(--inavm-radius);
  box-shadow: var(--inavm-shadow);
  overflow: hidden;
  padding: 0;
  margin-bottom: 1.75em;
}

.divMainJob .jobReference {
  cursor: pointer;
  padding: 0.95em 0.95em 0.85em;
}

.divMainJob .jobReference:hover {
  background: rgba(255, 255, 255, 0.38);
}

.divMainJob .jobRefHeader {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.9em;
}

.divMainJob .jobRefLeft {
  flex: 1 1 auto;
  min-width: 0;
}

.divMainJob .jobRefId {
  font-size: 1.25rem;
  font-weight: 900;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.divMainJob .jobRefSub {
  margin-top: 0.35em;
  font-weight: 800;
  color: rgba(15, 23, 42, 0.70);
  font-size: 0.92rem;
  overflow-wrap: anywhere;
}

.divMainJob .jobRefMeta {
  flex: 0 0 auto;
  text-align: right;
  font-size: 0.82rem;
  line-height: 1.2;
  color: rgba(15, 23, 42, 0.72);
}

.divMainJob .jobRefMeta strong {
  font-weight: 900;
  color: rgba(15, 23, 42, 0.88);
}

.divMainJob .jobDetails {
  padding: 1em;
  border-top: 1px solid rgba(15, 23, 42, 0.10);
  background: rgba(255, 255, 255, 0.72);
}

.inavm-actionsRow {
  margin-top: 1.25em;
  display: flex;
  justify-content: flex-end;
  gap: 0.75em;
  flex-wrap: wrap;
}

.inavm-actionsRow .btn {
  border-radius: 999px;
  font-weight: 900;
  letter-spacing: 0.01em;
}

.inavm-actionsRow--center {
  justify-content: center;
}

/* Search input (Job Manager style). */
.inavm-search {
  margin: 0 auto 1.5em;
  max-width: 38rem;
}

.inavm-searchHint {
  padding: 0 0 0.55em;
  font-weight: 700;
  color: rgba(15, 23, 42, 0.70);
  text-align: center;
}

.inavm-searchStatus {
  margin-top: 0.55em;
  font-size: 0.92rem;
  color: rgba(15, 23, 42, 0.72);
}
.inavm-searchStatus:empty { display: none; }

.inavm-searchGroup {
  border: 1px solid rgba(15, 23, 42, 0.18);
  border-radius: 16px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 10px 18px rgba(2, 6, 23, 0.06);
}

.inavm-searchGroup:focus-within {
  border-color: rgba(11, 59, 143, 0.55);
  box-shadow: 0 0 0 4px rgba(11, 59, 143, 0.14), 0 10px 18px rgba(2, 6, 23, 0.06);
}

.inavm-searchGroup .input-group-text,
.inavm-searchGroup .form-control,
.inavm-searchGroup .btn {
  border: 0;
  border-radius: 0;
}

.inavm-searchIcon {
  background: rgba(11, 59, 143, 0.06);
  color: rgba(11, 59, 143, 0.90);
  justify-content: center;
  min-width: 46px;
}

.inavm-searchInput {
  background: transparent;
  padding-left: 0.85rem;
}

.inavm-searchInput::placeholder {
  color: rgba(15, 23, 42, 0.45);
}

/* Pills / flags. */
.inavm-flag {
  display: inline-flex;
  align-items: center;
  gap: 0.45em;
  padding: 0.22em 0.55em;
  border-radius: 999px;
  font-weight: 900;
  font-size: 0.72rem;
  letter-spacing: 0.01em;
  border: 1px solid rgba(15, 23, 42, 0.12);
  background: rgba(15, 23, 42, 0.05);
  color: rgba(15, 23, 42, 0.82);
}

.inavm-flag--warn {
  border-color: rgba(255, 120, 0, 0.22);
  background: rgba(255, 120, 0, 0.10);
  color: #9a3f00;
}

.inavm-flag--danger {
  border-color: rgba(161, 0, 0, 0.20);
  background: rgba(161, 0, 0, 0.08);
  color: var(--inavm-danger);
}

.inavm-flag--ok {
  border-color: rgba(25, 135, 84, 0.24);
  background: rgba(25, 135, 84, 0.10);
  color: #0f5132;
}

.inavm-flag--info {
  border-color: rgba(11, 59, 143, 0.20);
  background: rgba(11, 59, 143, 0.08);
  color: var(--inavm-primary);
}

/* Tables: soften bootstrap defaults slightly without breaking layouts. */
body.inavm-dashboard .table {
  background: transparent;
}

body.inavm-dashboard .table thead th {
  color: rgba(15, 23, 42, 0.68);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.10em;
  font-size: 0.72rem;
  border-bottom-color: rgba(15, 23, 42, 0.12);
}

body.inavm-dashboard .table td,
body.inavm-dashboard .table th {
  border-top-color: rgba(15, 23, 42, 0.08);
}

/* List group: make old pages feel less "default bootstrap". */
body.inavm-dashboard .list-group-item {
  border-color: rgba(15, 23, 42, 0.12);
}

/* Metric cards (Statistics, Financials, etc). */
.inavm-section {
  margin: 1.1em auto 1.4em;
}

.inavm-sectionHeader {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8em;
  flex-wrap: wrap;
  margin-bottom: 0.85em;
}

.inavm-sectionTitle {
  font-weight: 900;
  text-transform: uppercase;
  font-size: 0.76rem;
  letter-spacing: 0.12em;
  color: rgba(15, 23, 42, 0.55);
  display: inline-flex;
  align-items: center;
  gap: 0.55em;
}

.inavm-divider {
  margin: 1.15em 0;
  border: 0;
  border-top: 1px solid rgba(15, 23, 42, 0.10);
  opacity: 1;
}

.inavm-metricGrid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 0.85em;
}

.inavm-metricCard {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(15, 23, 42, 0.10);
  border-radius: var(--inavm-radius);
  box-shadow: var(--inavm-shadow-soft);
  padding: 0.85em 0.95em;
  min-width: 0;
}

.inavm-metricLabel {
  font-weight: 900;
  text-transform: uppercase;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  color: rgba(15, 23, 42, 0.55);
}

.inavm-metricValue {
  margin-top: 0.35em;
  font-weight: 900;
  font-size: 1.28rem;
  color: rgba(15, 23, 42, 0.92);
  overflow-wrap: anywhere;
}

.inavm-metricHint {
  margin-top: 0.35em;
  color: rgba(15, 23, 42, 0.62);
  font-weight: 700;
  font-size: 0.9rem;
}

/* Form panels on older admin pages. */
.inavm-formCard {
  padding: 0.85em;
  margin-bottom: 1em;
  border-radius: var(--inavm-radius);
}

.inavm-formCard .form-control,
.inavm-formCard .form-select,
.inavm-formCard .btn {
  border-radius: 14px;
}

/* Inventory list rows (shared across job detail cards). */
.inavm-inventoryList {
  display: grid;
  gap: 0.45em;
}

.inavm-inventoryRow {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.75em;
  align-items: center;
  padding: 0.45em 0.55em;
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.03);
  border: 1px solid rgba(15, 23, 42, 0.07);
}

.inavm-inventoryName { overflow-wrap: anywhere; }

.inavm-inventoryCount {
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

.inavm-countPill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.2em;
  height: 2.2em;
  padding: 0 0.6em;
  border-radius: 999px;
  font-weight: 900;
  color: rgba(15, 23, 42, 0.82);
  background: rgba(15, 23, 42, 0.06);
  border: 1px solid rgba(15, 23, 42, 0.12);
}

/* Responsive map container for the Google Maps pages. */
.inavm-map {
  width: 100%;
  height: min(72vh, 760px);
  min-height: 420px;
  border-radius: var(--inavm-radius);
  border: 1px solid rgba(15, 23, 42, 0.12);
  overflow: hidden;
  background: rgba(15, 23, 42, 0.02);
}
