@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&display=swap');

:root{
  --bg: #f7fbff;
  --panel-bg: #ffffff;
  --border: #cfe3ff;
  --accent: #0d6efd;        /* same as Bootstrap primary */
  --text: #1f2937;
  --muted: #6b7280;
  --radius: 10px;
  --shadow: 0 2px 8px rgba(0,0,0,.06);

  --font: "Inter", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  --fs-base: 14.5px;
  --fs-h1: 22px;
  --fs-h2: 18px;
}

html, body {
  background: var(--bg);
  color: var(--text);
  font: 400 var(--fs-base)/1.5 var(--font);
}

/* Navbar keeps Bootstrap's colors; just tighten spacing */
.navbar { box-shadow: var(--shadow); }

/* Generic section/panel */
.section {
  background: var(--panel-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin: 18px 0;
}

.section-header {
  font-size: var(--fs-h2);
  font-weight: 600;
  padding: 12px 16px 6px;
  color: var(--text);
  border-bottom: 1px solid var(--border);
  background: #f3f8ff;
  border-top-left-radius: var(--radius);
  border-top-right-radius: var(--radius);
}

.section-body {
  padding: 14px 16px 16px;
}

/* Cards (dbc.Card) */
.card {
  border: 1px solid var(--border) !important;
  border-radius: var(--radius) !important;
  box-shadow: var(--shadow);
}

/* Badges / pills for statuses if you use them */
.badge-active   { background: #d1fae5; color:#065f46; }
.badge-inactive { background: #fee2e2; color:#991b1b; }
.badge-offline  { background: #e5e7eb; color:#374151; }

/* Dash DataTable */
.dash-table-container .dash-spreadsheet {
  border: 1px solid var(--border) !important;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.dash-table-container .dash-spreadsheet-container th {
  background: #eaf3ff !important;
  color: var(--text) !important;
  font-weight: 600 !important;
  border-color: var(--border) !important;
}
.dash-table-container .dash-spreadsheet-container td {
  border-color: var(--border) !important;
}
.dash-table-container .previous-next-container input {
  border: 1px solid var(--border);
}
/* Make DataTable use the theme font & size */
.dash-table-container .dash-spreadsheet-container th,
.dash-table-container .dash-spreadsheet-container td {
  font-family: var(--font) !important;
  font-size: var(--fs-base) !important;
  color: var(--text);
}

/* Compact DataTable utility */
.compact-table .dash-spreadsheet-container th,
.compact-table .dash-spreadsheet-container td {
  font-size: 12.5px !important;   /* smaller text */
  padding: 6px 8px !important;     /* tighter cells */
}
.compact-table .dash-spreadsheet-container td div {
  white-space: normal !important;  /* wrap long text instead of forcing width */
}

/* --- Real-time: Plant dropdown formatting --- */
/* Give the dropdown a scoped className="realtime-plant" in Python */
.realtime-plant .Select-value-label {
  white-space: nowrap;        /* single line */
  overflow: hidden;           /* hide overflow */
  text-overflow: ellipsis;    /* … at the end */
  display: block;
}
.realtime-plant .Select-option {
  white-space: nowrap;        /* options list also single line */
}
/* Make the menu as wide as the control */
.realtime-plant .Select-menu-outer {
  width: 100%;
}