
:root {
  --bg: #0c1727;             /* page background: deep navy */
  --card: #14243e;           /* card panels: muted dark blue */
  --ink: #e6eaf3;            /* primary text colour: off‑white */
  --muted: #8ea1bc;          /* secondary text colour */
  --line: #263d63;           /* subtle separators */
  --primary: #2878ff;        /* institutional blue accent */
  --primary-hover: #1e5fca;  /* darker shade for interactions */
  --danger: #e74c3c;         /* red for destructive actions */
  --radius: 12px;            /* base border radius */
  --shadow: 0 8px 24px rgba(0, 0, 0, 0.15); /* deeper card shadows */
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  /* Use Inter for body text for improved readability; fallback to system fonts */
  font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, "Helvetica Neue", Arial;
  line-height: 1.6;
}

a {
  text-decoration: none;
  color: inherit;
}

input,
select,
button {
  font: inherit;
  padding: 10px 14px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: #0f172a;
  color: var(--ink);
  transition: border-color 0.2s;
}

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

.btn {
  display: inline-block;
  padding: 10px 18px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: #0f172a;
  color: var(--muted);
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.btn:hover {
  border-color: var(--primary);
  color: var(--ink);
}

.btn-primary {
  background: var(--primary);
  border: 1px solid var(--primary);
  color: #fff;
}

.btn-primary:hover {
  background: var(--primary-hover);
}

.btn-secondary {
  background: #1e293b;
  border: 1px solid #334155;
  color: var(--muted);
}

.btn-secondary:hover {
  background: #334155;
  color: var(--ink);
}

.btn-danger {
  background: #2f0606;
  color: #fecaca;
  border: 1px solid #7f1d1d;
}

.btn-danger:hover {
  background: #7f1d1d;
  color: #fff;
}

.badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 500;
  background: #1e293b;
  border: 1px solid #334155;
  color: var(--ink);
}

.badge-success {
  background: #0f5132;
  border-color: #155e46;
  color: #34d399;
}

.badge-danger {
  background: #641010;
  border-color: #7c1a1a;
  color: #fecaca;
}

.container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 20px;
}

.card {
  background: var(--card);
  border-radius: calc(var(--radius) * 1.5);
  padding: 24px 28px;
  box-shadow: var(--shadow);
  margin-bottom: 32px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.table {
  width: 100%;
  border-collapse: collapse;
}

.table th,
.table td {
  padding: 14px 16px;
  text-align: left;
  border-bottom: 1px solid var(--line);
}

.table th {
  background: #1a2e50;
  color: var(--ink);
  font-weight: 600;
}

.table tr:hover td {
  background: #112343;
}

/* alinhamento utilitário */
.ta-right {
  text-align: right;
}

/* --- UI improvements --- */
/* Increase vertical spacing for the main container */
.container {
  margin-top: 40px;
  margin-bottom: 60px;
}

/* Refine card appearance with larger padding, rounded corners and subtle border */
/* Note: card rules moved above.  See updated definitions */

/* Adjust table header styling for better contrast */
/* Header styling already defined above */

/* Alternate row colours for tables for better readability */
/* Use subtle shading for alternate rows */
.table tbody tr:nth-child(even) td {
  background: #0e1f3a;
}

/* Headings adjustments */
/* Headings use Poppins to lend weight and elegance */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Poppins', 'Inter', system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, "Helvetica Neue", Arial;
  color: var(--ink);
  margin: 0;
}

h2 {
  font-size: 1.6rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

h3 {
  font-size: 1.3rem;
  font-weight: 500;
  margin-bottom: 0.75rem;
}

/* Form layout improvements */
.form-grid {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.form-grid .field {
  display: flex;
  flex-direction: column;
  width: 100%;
}

.form-grid .field span {
  margin-bottom: 0.25rem;
}

/* Chart layout */
.card-chart {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
}

.card-chart .table-container,
.card-chart .chart-container {
  flex: 1 1 300px;
}

.card-chart .chart-container {
  position: relative;
  min-height: 300px;
}