@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700&display=swap');

/* Base Layout */
html, body {
  height: 100%;
  margin: 0;
  padding: 0;
}
body {
  margin: 0;
  font-family: -apple-system, system-ui, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu,
    Cantarell, "Helvetica Neue", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
  color: #2b2b2b;
}
h1, h2, h3, h4, h5, h6 {
  font-family: 'Montserrat', -apple-system, system-ui, "Segoe UI", Roboto, Oxygen-Sans,
    Ubuntu, Cantarell, "Helvetica Neue", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
}
.dashboard-container {
  display: flex;
  min-height: 100vh; /* ensures full screen height */
}
#sidebar-placeholder {
  background: #1e3a5f;
}
/* Sidebar */
.sidebar {
  width: 220px;
  background: #1e3a5f;
  color: #fff;
  display: flex;
  flex-direction: column;
  padding: 1em;
  min-height: 100vh; /* sidebar stretches full height */
}

.dashboard-container {
  display: flex;
}
/* Sidebar area */
#sidebar-placeholder {
  position: sticky;
  top: 0;
  align-self: flex-start;
  height: 100vh;
  overflow-y: auto; /* Scroll independently if sidebar content is long */
  flex-shrink: 0;
}
/* Sidebar Navigation */
.sidebar nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
#sidebar-placeholder nav a.active {
  color: white;
  font-weight: bold;
}
/* Parent links */
.sidebar nav > ul > li > a {
  display: block;
  padding: 10px 15px;
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s ease;
}

.sidebar nav > ul > li > a:hover {
  color: #b3d4fc; /* lighter blue on hover */
}

/* Child link container (submenu) */
.sidebar nav ul li ul {
  margin: 5px 0 0 15px;
  padding: 0;
}

/* Child links */
.sidebar nav ul li ul li a {
  display: block;
  padding: 6px 15px;
  font-size: 0.9em;
  color: #d1d1d1;
  text-decoration: none;
  border-radius: 4px;
  transition: background 0.2s ease, color 0.2s ease;
}

/* Hover for child links */
.sidebar nav ul li ul li a:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.1); /* subtle pill */
}

/* Active child link (current page) */
.sidebar nav ul li ul li a.active {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  font-weight: 500;
}
/* Ensure main content takes remaining space */
.main-content {
  flex: 1;
  padding: 20px;
  overflow-x: auto;
}
.sidebar-logo {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 1em;
}

.sidebar-logo img {
  max-width: 140px;
  height: auto;
}

.sidebar h2 {
    margin: 0 0 1.5em;
    font-size: 1.4rem;
    text-align: center;
}

.sidebar nav ul {
  list-style: none;
  padding: 0;
}

/* Main content */
.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  background-color: #f8f9fa; /* your light background */
}

/* Top bar / header */
.topbar {
  background: #fff;
  padding: 1em;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.controls button {
  margin-left: 0.5em;
}
/* Make the wrapper take full height */
.wrapper {
  display: flex;
  min-height: 100vh;  /* Always fill viewport */
}
.status-tabs {
  display: flex;
  gap: 0.5em;
  background: #fff;
  padding: 0.5em 1em;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.status-tabs .tab {
  padding: 0.5em 1em;
  border: none;
  background: #888;
  cursor: pointer;
  border-radius: 4px;
}

.status-tabs .tab.active {
  background: #1e3a5f;
  color: #fff;
}

/* Tables */
.table-container {
  flex: 1;
  overflow: auto;
  background: #fff;
  margin: 1em;
  padding: 1em;
  border-radius: 6px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

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

th, td {
  padding: 0.75em;
  text-align: left;
  border-bottom: 1px solid #ddd;
  font-size: 0.9em;
}

th {
  background: #f9f9f9;
}

/* Badges */
.badge {
  padding: 0.3em 0.6em;
  border-radius: 9999px;
  font-size: 0.75em;
  font-weight: bold;
  display: inline-block;
}

.badge-green { background: #A7E3A7; color: #065f46; }
.badge-grey { background: #e5e7eb; color: #374151; }
.badge-blue { background: #dbeafe; color: #1e3a8a; }
.badge-orange { background: #ffedd5; color: #9a3412; }
.badge-dark { background: #1f2937; color: #f9fafb; }
.badge-light { background: #f3f4f6; color: #374151; }

/* Login page */
.login-page {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100vh;
  background: #1e3a5f;
}

.login-container {
  background: #fff;
  padding: 2em;
  border-radius: 6px;
  width: 300px;
  text-align: center;
}

.login-container input {
  width: 100%;
  padding: 0.5em;
  margin-bottom: 1em;
}

.login-container button {
  width: 100%;
  padding: 0.5em;
  background: #1e3a5f;
  color: #fff;
  border: none;
  cursor: pointer;
}

.error {
  color: red;
  font-size: 0.9em;
}

/* Summary Cards */
.summary-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 1em;
}

.summary-cards .card {
  background: #fff;
  padding: 1em;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
  text-align: center;
}

.summary-cards .card h3 {
  font-size: 0.85rem;
  color: #fff;
  margin-bottom: 0.5em;
}

.summary-cards .card p {
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
}

/* Charts Section */
.charts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1em;
  margin: 1em;
}

.chart-container {
  background: #fff;
  padding: 1em;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

/* Campaign Header (Detail Page) */
.campaign-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #fff;
  padding: 1em;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.search-bar {
  padding: 0.5em 1em;
  background: #fff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.search-bar input {
  width: 100%;
  padding: 0.5em;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 1em;
}
.controls button {
  background-color: #1e3a5f;     /* Primary sidebar colour */
  color: #fff;                   /* White text */
  border: none;                  /* Remove default border */
  padding: 0.5em 1em;            /* Balanced padding */
  margin-left: 0.5em;            /* Space between buttons */
  border-radius: 4px;            /* Rounded corners */
  cursor: pointer;               /* Pointer on hover */
  font-size: 0.9em;              /* Slightly smaller text */
  transition: background-color 0.3s ease, transform 0.2s ease;
}

.controls button:hover {
  background-color: #2f4d75;     /* Darker on hover */
  transform: translateY(-1px);   /* Subtle lift effect */
}

.controls button:active {
  transform: translateY(0);      /* Reset lift on click */
}
/* General button base */
button {
    cursor: pointer;
    border: none;
    border-radius: 6px;
    font-size: 0.9em;
    padding: 0.4em 0.8em;
    transition: background 0.2s ease, transform 0.1s ease;
    background: #1e3a5f;
    color: white;
    margin: 5px;
}

/* Primary buttons (e.g., Send Invite) */
button[type="submit"],
.btn-primary {
  background: #1e3a5f;
  color: #fff;
}
button[type="submit"]:hover,
.btn-primary:hover {
  background: #2f4d75;
  transform: translateY(-1px);
}

/* Edit button (Change Role) */
.btn-edit {
  background: #007bff;
  color: #fff;
  margin-right: 0.5em;
}
.btn-edit:hover {
  background: #0056b3;
  transform: translateY(-1px);
}

/* Delete button (Danger) */
.btn-delete {
  background: #dc3545;
  color: #fff;
}
.btn-delete:hover {
  background: #a71d2a;
  transform: translateY(-1px);
}

/* Logout button (top-right) */
.btn-logout {
  background: #6c757d;
  color: #fff;
  padding: 0.4em 1em;
}
.btn-logout:hover {
  background: #5a6268;
  transform: translateY(-1px);
}.btn-edit,
.btn-delete {
  padding: 0.3em 0.8em;
  font-size: 0.85em;
  border-radius: 4px;
  border: none;
  cursor: pointer;
  margin: 0 0.2em;
}

.btn-edit {
  background: #007bff;
  color: #fff;
}

.btn-delete {
  background: #dc3545;
  color: #fff;
}

.btn-edit:hover {
  background: #0056b3;
}

.btn-delete:hover {
  background: #a71d2a;
}
.alphabet-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5em;
  margin-bottom: 1em;
}
.alphabet-nav a {
  padding: 0.3em 0.5em;
  background: #eee;
  border-radius: 4px;
  text-decoration: none;
}

.client-grid h2 {
  margin-top: 1.5em;
  border-bottom: 1px solid #ccc;
}

.client-row {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1em;
  margin-top: 0.5em;
}

.client-card {
  display: flex;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 1em;
  cursor: pointer;
  transition: transform 0.2s ease;
}
.client-card:hover {
  transform: translateY(-2px);
}
.client-info h3 {
  margin: 0 0 0.3em;
  font-size: 1.1em;
}
/* Alphabet nav container */
#alphabetNav {
  display: flex;                /* Arrange letters in a row */
  flex-wrap: wrap;              /* Wrap to next line if too long */
  gap: 10px;                    /* Spacing between letters */
  padding: 10px 0 20px 20px;    /* Top/bottom + left padding */
  list-style: none;             /* Remove bullet points */
  margin: 0;
}

/* Alphabet nav links */
#alphabetNav li {
  display: inline-block;
}

#alphabetNav a {
  text-decoration: none;
  color: #0056b3;               /* Match your theme color */
  font-weight: 500;
  padding: 5px 8px;
}

#alphabetNav a:hover {
  background-color: #e6f0ff;    /* Subtle hover effect */
  border-radius: 4px;
}
#clientsGrid {
  padding: 0 20px; /* Adjust as needed */
}
.progress-metrics {
  display: flex;
  gap: 1em;
  padding: 1.5em 1em;
}
.metric-card {
  flex: 1;
  background: #fff;
  border-radius: 8px;
  padding: 1em;
  text-align: center;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}
.metric-card h3 {
  margin-bottom: 0.5em;
  font-size: 1rem;
  color: #1e3a5f;
}
.progress-circle {
  width: 60px;
  height: 60px;
  margin: 0 auto;
  border-radius: 50%;
  border: 6px solid #2f4d75;
  position: relative;
}
.progress-circle[data-percent="65"] {
  /* Later, can use JS or conic-gradient for dynamic fill */
}
.gauge-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  width: 100%;
}
.gauge {
  flex: 0 1 160px; /* Prevents squishing, wraps when needed */
  text-align: center;
}
.campaign-info {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  padding: 1.5em 1em;
  border-bottom: 1px solid #ddd;
}
.campaign-dates p {
  margin: 0.2em 0;
  font-size: 0.9rem;
}
.campaign-header {
  display: flex;
  align-items: center;
  padding: 0.75em 1em;
  background: #f9f9f9;
  border-bottom: 1px solid #ddd;
}
.btn-back {
  background: none;
  border: none;
  color: #1e3a5f;
  font-size: 1rem;
  cursor: pointer;
}
.progress-circle {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background: conic-gradient(#e5e5e5 0%, #e5e5e5 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  color: #1e3a5f;
}
.metric-card {
  background: #fff;
  padding: 1em;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  flex: 1;
  text-align: center;
}
.progress-metrics {
  display: flex;
  gap: 1em;
  margin: 1em;
}
.media-lines {
    gap: 1em;
    margin: 1em;
}

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

.media-lines th, .media-lines td {
  padding: 0.5em;
  border-bottom: 1px solid #ddd;
  text-align: left;
}

.media-lines th {
  background: #f4f4f4;
}
.metrics {
    margin: 1em;	
}
/* Hidden by default */
.daily-metrics.hidden {
  display: none;
}

/* Style for the expandable daily table row */
.daily-metrics td {
  background: #f9f9f9;
  padding: 0;
}

/* Inner metrics table styling */
.inner-metrics {
  width: 100%;
  border-collapse: collapse;
  margin: 10px 0;
}

.inner-metrics th,
.inner-metrics td {
  border: 1px solid #ddd;
  padding: 6px;
  text-align: left;
  font-size: 0.9rem;
}

.inner-metrics th {
  background-color: #e9eef4;
  font-weight: 600;
}
.date-filter {
  margin: 1em;
}
/* Toggle button style */
button.toggle-daily {
  padding: 4px 8px;
  background: #2f4d75;
  color: #fff;
  border: none;
  border-radius: 4px;
  font-size: 0.85rem;
  cursor: pointer;
  transition: background 0.2s ease;
}

button.toggle-daily:hover {
  background: #223653;
}
.view-toggle {
  margin: 10px 0;
  text-align: right;
}

.view-toggle select {
  padding: 4px 6px;
  font-size: 14px;
}
.totals-summary {
  margin: 20px 0;
  padding: 15px;
  border: 1px solid #ddd;
  border-radius: 6px;
  background: #f9f9f9;
}

.totals-summary h3 {
  margin-bottom: 10px;
  font-size: 1.2em;
  color: #333;
}

.totals-summary .totals-row p {
  margin: 5px 0;
  font-size: 0.95em;
}
#campaignTable tr {
  cursor: pointer;
}

#campaignTable tr:hover {
  background-color: #f0f0f0;
}

.gauge {
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Outer circle with conic gradient */
.gauge-circle {
  width: 100%;
  max-width: 220px;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  background: conic-gradient(#e5e5e5 0% 100%);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
}

/* Inner cutout for donut effect */
.gauge-circle::after {
  content: '';
  position: absolute;
  width: 180px;   /* Inner circle size */
  height: 180px;
  background: #fff; /* Match page background */
  border-radius: 50%;
  z-index: 1;
}

/* Text container inside donut */
.gauge-inner {
  position: absolute;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* % text styling */
.gauge-text {
  font-size: 1.5rem;
  font-weight: bold;
  color: #2f4d75;
}

/* Actual vs Target numbers */
.gauge-subtext {
  font-size: 0.85rem;
  color: #555;
}

/* Label under donut */
.gauge-label {
  margin-top: 0.5rem;
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.9rem;
}
/* KPI Summary Section */
.kpi-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin: 20px 0;
}

.kpi-card {
  flex: 1 1 calc(25% - 1rem);
  min-width: 150px;
  padding: 1rem;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  text-align: center;
}


.kpi-card h3 {
  font-size: 1rem;
  margin-bottom: 8px;
  color: #2f4d75;
}

.kpi-card p {
  font-size: 1.25rem;
  font-weight: bold;
  margin: 0;
}
/* Grid layout for campaign info */
.campaign-info-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px 20px;
  margin: 20px;
  font-size: 1rem;
}

.campaign-info-grid div {
  display: flex;
  justify-content: flex-start;
  align-items: center;
}

.campaign-info-grid strong {
  color: #2f4d75;
  margin-right: 6px;
}
.campaign-info {
  display: flex;
  justify-content: space-between;  /* Name/Status left, Logo right */
  align-items: center;             /* Vertically center items */
  padding: 1rem 0;
  border-bottom: 1px solid #ddd;
  margin:20px;
}

.campaign-info h1 {
  margin: 0;
  font-size: 2rem;
}

.campaign-info .status {
    margin-top: 0.25rem;
    font-size: 1.5rem;
    font-weight: 900;
}

/* Status colors */
.status.active {
  color: #2e7d32; /* green */
}

.status.paused {
  color: #f9a825; /* amber/yellow */
}

.status.completed {
  color: #616161; /* grey */
}

.status.draft {
  color: #0288d1; /* blue */
}
.campaign-header-left {
  display: flex;
  flex-direction: column;
}

.campaign-header-left h1 {
  margin: 0;
  font-size: 2rem;
  font-weight: 700;
}

.campaign-header-left h3 {
  margin: 0.3rem 0 0;
  font-size: 1.2rem;
  font-weight: 500;
}

.campaign-header-left h3 .status {
  font-weight: 900;
}

.campaign-header-right {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  flex-shrink: 0;
}

.client-logo {
  max-height: 150px;  /* Full height of header */
  max-width: 200px;
  object-fit: contain;
  border-radius: 6px;
  background: #fff;
  border: 1px solid #e2e8f0;
  padding: 4px;
}
.summary-cards-wrapper {
  margin: 20px;
}

.summary-cards-wrapper .summary-heading {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: #2f4d75;
}
.summary-cards .card {
  color: #fff; /* default text color for colored cards */
  border-radius: 8px;
  padding: 1em;
  text-align: center;
}
.summary-cards .card h3 {
  font-size: 0.85rem;
  margin-bottom: 0.5em;
}
/* Make headers look interactive */
th[data-sort] {
  cursor: pointer;
  position: relative;
  padding-right: 16px; /* space for icon */
  color: #1e3a5f;      /* match your theme */
}

/* Hover effect */
th[data-sort]:hover {
  background-color: #f3f4f6; /* light grey hover */
}

/* Default sort icon (faint) */
th[data-sort]::after {
  content: '⇅';
  position: absolute;
  right: 4px;
  font-size: 0.8em;
  color: #9ca3af; /* greyed out */
}

/* Active ascending */
th.sorted-asc::after {
  content: '▲';
  color: #1e3a5f;
}

/* Active descending */
th.sorted-desc::after {
  content: '▼';
  color: #1e3a5f;
}
tr.dragging {
  opacity: 0.5;
  background: #e0e0e0;
}

tr[draggable="true"] {
  cursor: grab;
}
.draggable-row {
  cursor: grab;
}
.draggable-row.dragging {
  opacity: 0.5;
}
thead th {
  user-select: none;     /* Prevent text selection */
  pointer-events: auto;  /* Still clickable if needed */
}

thead th[draggable] {
  pointer-events: none;
}
.btn-detail {
  display: inline-block;
  margin-left: 8px;
  padding: 4px 8px;
  background: #1e3a5f;
  color: #fff;
  border-radius: 4px;
  text-decoration: none;
  font-size: 0.875rem;
}
.btn-detail:hover {
  background: rgb(47, 77, 117);
  }
#chartsContainer {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem; /* space between charts horizontally & vertically */
  justify-content: space-between; /* evenly distribute two per row */
}

.chart-item {
  flex: 0 0 calc(50% - 0.5rem); /* exactly 50% width minus half gap */
  box-sizing: border-box;
  background: #fff;
  padding: 1rem;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Mobile: single column */
@media (max-width: 768px) {
  .chart-item {
    flex: 0 0 100%;
  }
}
#totalsCards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}
.sync-ok {
  color: #1a7f37;
  font-weight: 600;
}
.fa-solid, .fas {
    padding-right: 10px;
}
.sync-delay {
  color: #c62828;
  font-weight: 600;
}

#totalsCards .card {
  background: #ffffff;
  border-radius: 8px;
  padding: 1rem;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
  text-align: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

#totalsCards .card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.12);
}

#totalsCards .card h3 {
  margin: 0 0 0.5rem;
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
}

.sidebar .child-links {
  margin-left: 1rem;
  padding-left: 0.5rem;
  border-left: 2px solid #ccc;
}

.sidebar .child-links .campaign-name {
  color: #fff;
  font-size: 0.95rem;
  margin-bottom: 0.25rem;
}
#totalsCards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0 2rem;
    margin-bottom: 2rem;
    margin-top: 30px;
}

#totalsCards .card {
  background: #ffffff;
  border-radius: 8px;
  padding: 1rem;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
  text-align: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
margin: 0.5rem;
}


#totalsCards .card p {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 700;
  color: #fff; /* Accent color */
}
.summary-table td.text-right {
  text-align: right;
}

.btn-view {
  padding: 6px 12px;
  background-color: #2f4d75;
  color: white;
  border: none;
  border-radius: 4px;
  font-size: 0.875rem;
  cursor: pointer;
  transition: background 0.3s;
}

.btn-view:hover {
  background-color: #1e375c;
}
#mediaLineDropdown {
  padding: 0.5rem 1rem;
  font-size: 1rem;
  border-radius: 8px;
  border: 1px solid #ccc;
  background-color: #fff;
  color: #333;
  margin-bottom: 1rem;
  width: 100%;
  max-width: 300px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='14' height='10' viewBox='0 0 14 10' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1l6 6 6-6' stroke='%23666' stroke-width='2' fill='none' fill-rule='evenodd'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  background-size: 12px;
    width: auto;
  min-width: 200px;
  max-width: 100%;
}

#mediaLineDropdown:focus {
  border-color: #2f4d75;
  outline: none;
  box-shadow: 0 0 0 3px rgba(47, 77, 117, 0.2);
}
/* Filter Toolbar */
.filter-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin: 1rem 0;
  align-items: flex-end;
  justify-content: space-between;
  background: #f8f9fa;
  padding: 1rem;
  border-radius: 6px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.filter-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.filter-group label {
  font-weight: bold;
  margin-right: 0.3rem;
}

.filter-group select,
.filter-group input[type="date"] {
  padding: 0.4rem 0.6rem;
  font-size: 0.95rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  min-width: 160px;
  max-width: 100%;
}

/* Make dropdowns adapt to contents */
.filter-group select option {
  white-space: nowrap;
}

#applyFilters {
  padding: 0.5rem 1rem;
  background-color: #2f4d75;
  color: #fff;
  border: none;
  border-radius: 4px;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

#applyFilters:hover {
  background-color: #1f3552;
}

/* Totals Cards */
.totals-container {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1rem;
}

.kpi-card {
  flex: 1 1 180px;
  min-width: 180px;
  max-width: 200px;
  padding: 1rem;
  border-radius: 8px;
  box-shadow: 0 0 4px rgba(0, 0, 0, 0.1);
}

.kpi-card h3 {
  margin-top: 0;
  font-size: 1.1rem;
}

.kpi-card p {
  margin: 0;
  font-size: 1.5rem;
  font-weight: bold;
}

/* Charts Grid */
.charts-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  margin-top: 2rem;
  justify-content: flex-start;
}

.chart-item {
  flex: 1 1 calc(50% - 2rem);
  min-width: 320px;
  max-width: 100%;
}
.filter-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}

.filter-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.filter-toolbar input,
.filter-toolbar select {
  padding: 6px 10px;
  border-radius: 6px;
  border: 1px solid #ccc;
  font-size: 0.95rem;
  min-width: 140px;
}

#applyFilters {
  background-color: #4B6A9B;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 0.95rem;
  cursor: pointer;
}
.totals-container.faded-cards .kpi-card {
  opacity: 0.5;
  transition: opacity 0.3s ease;
  cursor: pointer;
}

.kpi-card.active {
  opacity: 1 !important;
}

.chart-wrapper-full {
  width: 100%;
  margin-top: 2rem;
}
.faded-cards .card {
  opacity: 0.5;
  transition: opacity 0.3s ease;
  cursor: pointer;
}
.faded-cards .card:not(.faded) {
  opacity: 1;
}
.sortable-ghost {
  opacity: 0.5;
  background-color: #ddd;
}
.kpi-summary-wrapper {
  display: block;
  margin-bottom: 30px;
}

.logo-container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px; /* space between logos and table */
}

.kpi-summary-table {
  width: 33%;
  min-width: 300px;
  border-collapse: collapse;
  background-color: #fff;
  border: 1px solid #ccc;
  font-size: 14px;
}

.kpi-summary-table th,
.kpi-summary-table td {
  padding: 8px 12px;
  text-align: left;
  border: 1px solid #ddd;
}

.kpi-summary-table thead {
  background-color: #f8f8f8;
  font-weight: bold;
}
.kpi-summary-table th {
  background-color: #1e3a5f;
  color: white;
}

.logo-container {
  flex-grow: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}
.report-table {
  border-collapse: collapse;
  background-color: #fff;
  border: 1px solid #ccc;
  font-size: 14px;
}

.report-table th,
.report-table td {
  padding: 8px 12px;
  text-align: left;
  border: 1px solid #ddd;
}
.report-table th {
  background-color: #1e3a5f;
  color: white;
}
.report-table thead {
  background-color: #f8f8f8;
  font-weight: bold;
}