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

:root {
  --primary-color: #003049;
  --secondary-color: #333333;
  --accent-color: #c9d2d8;
  --accent-color-light: #ffd166;
  --accent-color-dark: #06d6a0;
  --background-color: #fff;

  --gray-100: #f5f7fa;
  --gray-200: #e0e7ef;
  --gray-300: #cfd8df;
  --gray-900: #1c1c1c;

  --text-color: #333333;
  --success-color: #4caf50;
  --error-color: #f44336;
  --warning-color: #ff9800;

  --font-base: 1rem;
  --font-small: 0.875rem;
  --font-large: 1.25rem;
  --font-h1: 2rem;
  --font-h2: 1.5rem;

  --sidebar-width: 220px;
  --title-font: 'Oswald', Arial, sans-serif;
  --body-font: 'Montserrat', sans-serif;

  --breakpoint-sm: 600px;
  --breakpoint-md: 900px;
  --breakpoint-lg: 1200px;
}

html, body {
  margin: 0;
  padding: 0;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

img, svg {
  max-width: 100%;
  display: block;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

hr{
  border: none;
  border-top: 1px solid #ddd;
  margin: 40px 0;
}

body {
  font-family: var(--body-font);
  line-height: 1.6;
  color: var(--text-color);
  background-color: var(--background-color);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

a {
  color: var(--primary-color);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover, a:focus {
  color: var(--secondary-color);
}

p {
  padding-bottom: 20px;
  color: var(--text-color)
}

.center{
  text-align: center;
}
/* Set font styles for all headings*/
h1, h2, h3, h4, h5, h6 {
  font-family: var(--title-font);
  text-transform: uppercase;
  color: var(--primary-color);
  margin-top:4px;
  margin-bottom: 4px;
}

ul {
  margin-left: 20px;
  margin-bottom: 20px;
}

h1 {
  margin-bottom: 20px;
  color: var(--primary-color);
}

/* Container for main content */
.container {
  width: 80%;
  margin: 0 auto;
  padding: 20px;
}

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

/* =========================
   Header & Navigation Styles
   ========================= */
header {
  background-color: var(--primary-color);
  color: #fff;
  padding: 10px 0;
  min-height: 80px;
  display: flex;
  align-items: center;
}

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  margin: 0 10px;
  min-height: 60px;
  flex-direction: row; /* Ensure horizontal layout */
}

.logo {
  display: flex;
  flex-direction: row; /* Logo and text side by side if needed */
  align-items: center;
  justify-content: flex-start;
}

.logo img {
  width: 150px;
  height: auto;
  margin-right: 10px; /* Add spacing if logo and text */
}

.nav-links {
  display: flex;
  flex-direction: row; /* Ensure horizontal links */
  list-style: none;
  align-items: center;
  margin: 0;
  height: 100%;
  justify-content: flex-end;
  gap: 0; /* Remove any default gap */
}

.nav-links li {
  margin-left: 20px;
  display: flex;
  align-items: center;
  height: 100%;
}

.nav-links a {
  color: #fff;
  text-decoration: none;
  transition: all 0.3s ease;
  padding: 8px 12px;
  display: block;
}

.nav-links a:hover {
  color: #f4f4f4;
}

.profile-img {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 75px;
  height: 75px;
  border-radius: 50%;
  overflow: hidden;
  margin-right: 0;
  padding: 0;
}

.profile-img a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

.profile-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  display: block;
}

/* =========================
   Sidebar Styles
   ========================= */
.sidebar {
  position: sticky;
  top: 0;
  width: var(--sidebar-width);
  background-color: #f4f4f4;
  border-right: 1px solid #ddd;
  padding: 20px 0;
  overflow-y: auto;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  height: 100vh;
  min-height: 100vh;
  max-height: 100vh;
}

@media (max-width: 900px) {
  .sidebar {
    position: static;
    width: 100%;
    border-right: none;
    border-bottom: 1px solid #ddd;
    flex-direction: column;
    padding: 10px 0;
    height: auto;
    min-height: unset;
    max-height: unset;
    overflow-y: visible;
  }
}

/* Sidebar divider style */
hr.sidebar-divider {
  border: none;
  border-top: 1.5px solid #d1d5db;
  margin: 18px 0 12px 0;
  width: 85%;
  align-self: center;
  opacity: 0.7;
}

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

.sidebar li {
  margin-bottom: 2px;
}

.sidebar a {
  color: var(--primary-color);
  text-decoration: none;
  font-family: var(--body-font);
  padding: 8px 24px;
  display: block;
  border-radius: 0;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
  width: var(--sidebar-width); /* Ensure link fills sidebar width */
  max-width: 100%;
  box-sizing: border-box;
}

.sidebar a:hover,
.sidebar a.active {
  background: var(--primary-color);
  color: #fff;
  border-radius: 0;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  /* gap: 2.5rem; */
  align-items: flex-start;
}

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

.sidebar-list li {
  margin-bottom: 2px;
  font-family: var(--body-font);
}

.sidebar-section-title {
  font-family: var(--title-font);
  font-size: 1em;
  text-transform: uppercase;
  color: var(--primary-color);
  letter-spacing: 0.03em;
  margin: 18px 0 6px 16px;
  padding: 0;
  font-weight: 600;
}

.sidebar-bottom {
  margin-top: auto;
  width: var(--sidebar-width);
}

.sidebar-bottom .sidebar-list {
  margin-bottom: 0;
}

/* Sidebar dropdown submenu styles */
.sidebar-dropdown {
  position: relative;
}

.sidebar-submenu {
  display: none;
  padding-left: 12px;
  background: none;
  border-left: 2px solid #e0e0e0;
  margin-top: 2px;
}

.sidebar-dropdown:hover > .sidebar-submenu,
.sidebar-dropdown:focus-within > .sidebar-submenu {
  display: block;
}

.sidebar-submenu li {
  margin-bottom: 2px;
}

.sidebar-submenu .sidebar-link {
  padding-left: 32px;
  font-size: 0.97em;
}

/* =========================
   Main Content Styles
   ========================= */
main {
  flex: 1;
  padding: 20px 0;
}

/* =========================
   Dashboard Styles
    ========================= */
.activities-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 10px;
}
.activity-section {
    background: #f5f7fa;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    margin-bottom: 0;
}
.activity-header {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    color: #555;
}
.activity-header i {
    margin-right: 10px;
    font-size: 18px;
    color: #5c6bc0;
}
.activity-list {
    list-style: none;
    padding: 0;
}
.activity-list li {
    padding: 10px;
    border-bottom: 1px solid #eee;
    background: white;
    border-radius: 6px;
    margin-bottom: 8px;
}
.activity-date {
    display: block;
    font-size: 12px;
    color: #888;
}
.activity-desc {
    display: block;
    font-weight: 500;
    margin: 5px 0;
}
.activity-stat {
    display: block;
    font-size: 12px;
    color: #666;
}
.stats-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}
.stat-card {
    background: white;
    padding: 15px;
    border-radius: 6px;
    position: relative;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}
.stat-card:first-child {
    grid-column: span 2;
}
.stat-value {
    display: block;
    font-size: 24px;
    font-weight: bold;
    color: #5c6bc0;
}
.stat-label {
    font-size: 12px;
    color: #777;
}
.trend {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 12px;
    font-weight: bold;
}
.trend.positive {
    color: #4caf50;
}
.trend.negative {
    color: #f44336;
}

/* =========================
   Leaderboard Styles
   ========================= */
.leaderboard-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 15px;
    width:100%;
}

.leaderboard-section {
    flex: 1;
    min-width: 250px;
    background: #f5f7fa;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.leaderboard-header {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    color: #555;
}

.leaderboard-header i {
    margin-right: 10px;
    font-size: 18px;
    color: #5c6bc0;
}

.leaderboard-list {
    padding-left: 20px;
}

.leaderboard-list li {
    margin-bottom: 10px;
    position: relative;
    display: flex;
    flex-wrap: wrap;
}

.bar {
    position: absolute;
    height: 6px;
    background: linear-gradient(to right, #5c6bc0, #26c6da);
    bottom: -5px;
    left: 0;
    border-radius: 3px;
    z-index: 1;
}
.user {
    font-weight: bold;
    flex: 1;
}
.stat {
    color: #666;
}
.metrics-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}
.metric-box {
    background: white;
    padding: 15px;
    border-radius: 6px;
    text-align: center;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}
.metric-value {
    display: block;
    font-size: 24px;
    font-weight: bold;
    color: #5c6bc0;
}
.metric-label {
    font-size: 12px;
    color: #777;
}

/* =========================
   Form Styles
   ========================= */
.form-container {
  max-width: 500px;
  margin: 0 auto;
  padding: 30px;
  background-color: #f9f9f9;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.form-title {
  text-align: center;
  margin-bottom: 15px;
  color: var(--primary-color);
  font-size: 1.8rem;
}

.form-subtitle {
  text-align: center;
  margin: 0 auto 20px;
  color: var(--primary-color);
  font-size: 1.2rem;
  max-width: 500px;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: #444;
}

.form-control {
  width: 100%;
  padding: 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 1rem;
  transition: border-color 0.3s;
}

.form-control:focus {
  border-color: var(--primary-color);
  outline: none;
  box-shadow: 0 0 0 3px rgba(0, 48, 73, 0.25);
}

.form-text {
  display: block;
  margin-top: 5px;
  font-size: 0.85rem;
  color: #6c757d;
  text-align: center;
}

/* =========================
   Button Styles
   ========================= */
.btn {
  display: inline-block;
  font-size: 1rem;
  font-weight: bold;
  padding: 12px 18px;
  border-radius: 4px;
  cursor: pointer;
  text-align: center;
  transition: background-color 0.3s, color 0.3s, border-color 0.3s;
  border: none;
  background: none;
  color: inherit;
  /* Remove box-shadow, outline, etc. for a clean base */
}

/* primary buttons */
.btn.btn-primary {
  background-color: var(--primary-color);
  color: #fff;
  border: 2px solid var(--primary-color);
}

.btn.btn-primary:hover,
.btn.btn-primary:focus {
  background-color: var(--accent-color);
  color: var(--primary-color);
  border-color:var(--accent-color);
}

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

/* secondary buttons */
.btn.btn-secondary {
  background: #fff;
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.btn.btn-secondary:hover,
.btn.btn-secondary:focus {
  background-color: var(--accent-color);
  color: var(--primary-color);
  border-color:var(--accent-color);
}

.btn.btn-secondary:active {
  background-color: var(--primary-color);
  color: #fff;
  border-color: var(--primary-color);
}

/* Wide button utility */
.btn-wide {
  display: block;
  width: 100%;
}

/* centered button utility */
.btn-center {
  display: block;
  margin-left: auto;
  margin-right: auto;
}

/* =========================
   Flash Message Styles
   ========================= */
.alert {
  max-width: 500px;
  padding: 15px;
  margin: 0 auto 20px;
  border-radius: 4px;
  font-size: 1rem;
  text-align: center;
}

.alert-success {
  background-color: #d4edda;
  color: #155724;
  border-top: 4px solid #28a745;
}

.alert-error {
  background-color: #f8d7da;
  color: #721c24;
  border-top: 4px solid #dc3545;
}

@media (max-width: 768px) {
  .form-container {
    width: 90%;
    padding: 20px;
  }
}

.actions {
  margin-top: 30px;
}

/* =========================
   Footer Styles
   ========================= */
footer {
  background-color: var(--secondary-color);
  color: #fff;
  text-align: center;
  padding: 5px 0;
  margin-top: auto;
}

footer a {
  color: #fff;
  text-decoration: none;
  transition: color 0.3s ease;
}

footer a:hover {
  color: #4da8da;
}

/* =========================
   Agent List/Card Styles (views/agents.ejs)
   ========================= */
.agents-list {
  list-style: none;
  padding: 0;
  margin: 0;
  width: 100%;
  display: grid;
  grid-template-columns: repeat(4, 1fr); /* Changed from 3 to 4 */
  gap: 24px;
}

.agent-list-item {
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  box-shadow: none;
  padding: 24px 18px 18px 18px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  transition: border-color 0.2s;
  position: relative;
  padding-bottom: 48px; /* Add space for bottom panel */
}

.agent-list-item:hover {
  border-color: var(--primary-color);
  box-shadow: none;
  transform: none;
}

.agent-title {
  font-size: 1.1em;
  font-weight: 600;
  color: var(--primary-color);
  background: none;
  padding: 0;
  border-bottom: none;
  width: 100%;
  text-align: left;
  letter-spacing: 0.01em;
  margin-bottom: 10px;
}

.agent-desc {
  font-size: 0.98em;
  color: #444;
  padding: 0;
  margin-bottom: 0;
  text-align: left;
}

.agent-bottom-panel {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  position: absolute;
  left: 0;
  bottom: 0;
  padding: 8px 16px 8px 16px;
  border-top: 1px solid #e0e0e0;
  background: #fafbfc;
  border-radius: 0 0 8px 8px;
  font-size: 0.85em;
  min-height: 32px;
  box-sizing: border-box;
}

.agent-tags {
  float: right;
  font-size: 0.75rem;
  color: #aaa;
  margin-top: 2px;
}

.agent-time-savings {
  color: #888;
  font-weight: 400;
  font-size: 1em;
  opacity: 0.85;
}

.agent-feedback {
  display: flex;
  gap: 10px;
}

.agent-feedback .thumbs-up,
.agent-feedback .thumbs-down {
  cursor: pointer;
  font-size: 1.15em;
  transition: color 0.2s, opacity 0.2s;
  color: #bbb;
  opacity: 0.55;
  user-select: none;
  font-family: "Font Awesome 6 Free", "Font Awesome 6 Pro", "FontAwesome", Arial, sans-serif;
  font-weight: 400;
  line-height: 1;
}

.agent-feedback .thumbs-up:hover {
  color: #388e3c;
  opacity: 1;
}

.agent-feedback .thumbs-down:hover {
  color: #c62828;
  opacity: 1;
}

/* =========================
   Generic Card Styles
   ========================= */
.card {
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 4px 24px rgba(0,48,73,0.08), 0 1.5px 4px rgba(0,48,73,0.04);
  padding: 2.5rem 2rem;
  margin-bottom: 2rem;
  border: 1px solid #e0e7ef;
  transition: box-shadow 0.2s, transform 0.2s;
  width: 340px;
  padding: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* Card grid/flex container for course cards */
.courses-flex {
  display: flex;
  flex-wrap: wrap;
  gap: 32px;
  justify-content: flex-start;
}

/* Card image section */
.card-img {
  width: 100%;
  height: 160px;
  background: #eee;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Card body/content */
.card-body {
  padding: 1.3rem 1.2rem 0.5rem 1.2rem;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
}
.card-body h2 {
  font-size: 1.1em;
  margin-bottom: 8px;
  color: var(--primary-color);
  font-family: var(--title-font);
  text-transform: uppercase;
}
.card-body p {
  color: #444;
  margin-bottom: 12px;
  font-size: 0.98em;
  flex: 1 1 auto;
}
.card-meta {
  color: #888;
  font-size: 0.98em;
  margin-bottom: 12px;
}

/* Card footer for author/creator info */
.card-footer {
  padding: 0.7rem 1.2rem;
  background: #fafbfc;
  border-top: 1px solid #e0e0e0;
  display: flex;
  align-items: center;
  gap: 10px;
}
.card-footer img {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #e0e0e0;
}
.card-footer span {
  font-size: 0.98em;
  color: #333;
}

/* Responsive adjustments */
@media (max-width: 1100px) {
  .courses-flex {
    gap: 20px;
  }
  .card {
    width: 100%;
    max-width: 400px;
  }
}
@media (max-width: 700px) {
  .courses-flex {
    flex-direction: column;
    gap: 16px;
    align-items: center;
  }
  .card {
    width: 100%;
    max-width: 100%;
  }
}

/* =========================
   Progress Bar Styles
   ========================= */
.progress-bar-bg {
  width: 100%;
  background: #e0e0e0;
  border-radius: 6px;
  height: 14px;
  margin: 24px 0 8px 0;
  overflow: hidden;
}

.progress-bar-fill {
  background: var(--primary-color);
  height: 100%;
  border-radius: 6px;
  width: 0%; /* Set dynamically */
  transition: width 0.3s;
}

/* =========================
   Integration Card Grid & Card Styles
   ========================= */
.integration-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin-top: 8px;
}

.integration-card {
  background: #fafbfc;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  padding: 24px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-height: 280px;
  position: relative;
  transition: box-shadow 0.2s, transform 0.2s;
}

.integration-card-header {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 18px;
  min-height: 120px;
  height: 120px;
  overflow: hidden;
  background: #e9ecef;
}

.integration-card-header img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.integration-card h2 {
  
  font-size: 1.15em;
  color: var(--primary-color);
  font-family: var(--title-font);
  text-transform: uppercase;
  letter-spacing: 0.01em;
}

.integration-card p {
  flex: 1 1 auto;
  color: #444;
  font-size: 0.98em;
  margin-bottom: 0;
}

.profile-avatar img,
.company-logo img {
  width: 120px;
  height: 120px;
  object-fit: cover;
  border-radius: 50%;
  border: 3px solid #e0e0e0;
  background: #fafbfc;
  display: block;
}

.profile-container {
  display: flex;
  flex-direction: column;
  gap: 24px;
  max-width: none;
  width: 100%;
  margin: 0 auto;
}

.profile-main-card {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0;
  width: 100%;
  box-sizing: border-box;
}

.profile-main-card > section {
  padding: 2rem 2rem;
  border-bottom: 1px solid #e0e7ef;
}

.profile-main-card > section:last-child {
  border-bottom: none;
}

.profile-card-row {
  display: flex;
  align-items: center;
  gap: 32px;
  padding: 0;
}

.profile-avatar {
  flex-shrink: 0;
}

.profile-info {
  flex: 1;
}

.profile-details-card {
  padding: 0;
}

.profile-details-card .detail-item {
  display: flex;
  gap: 12px;
  margin-bottom: 10px;
}

.profile-details-card .label {
  font-weight: 600;
  min-width: 120px;
  color: var(--primary-color);
}

.profile-details-card .value {
  color: #333;
}

.profile-actions-card {
  padding: 0;
}

.profile-actions-card .profile-actions {
  display: flex;
  gap: 16px;
  justify-content: flex-start;
}

@media (max-width: 600px) {
  .profile-card-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
    padding: 0;
  }
  .profile-main-card > section {
    padding: 1.2rem 1rem;
  }
  .profile-container {
    gap: 16px;
  }
  .profile-actions-card .profile-actions {
    flex-direction: column;
    gap: 10px;
  }
}

@media (max-width: 900px) {
  nav {
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
    min-height: unset;
  }
  .nav-links {
    flex-direction: column;
    width: 100%;
    align-items: flex-start;
  }
  .nav-links li {
    margin-left: 0;
    margin-bottom: 10px;
  }
  .logo {
    margin-bottom: 10px;
  }
}

@media (max-width: 1000px) {
    .agent-page-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    .agent-output-card {
        margin-bottom: 0;
    }
}

@media (max-width: 1100px) {
  .integration-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 700px) {
  .integration-grid {
    grid-template-columns: 1fr;
  }
}

.agent-category-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}

.agent-category-buttons button {
  background: #fff;
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
  border-radius: 6px;
  padding: 7px 18px;
  font-family: var(--body-font);
  font-size: 1em;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.18s, color 0.18s, border-color 0.18s;
  outline: none;
}

.agent-category-buttons button:hover,
.agent-category-buttons button:focus {
  background: var(--primary-color);
  color: #fff;
  border-color: var(--primary-color);
}

.agent-category-buttons button.active {
  background: var(--primary-color);
  color: #fff;
  border-color: var(--primary-color);
}

/* =========================
   Agent Detailed View Styles
   ========================= */
.agent-card {
    background: #fff;
    max-width: 700px;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    padding: 32px 40px;
}
.agent-header {
    border-bottom: 1px solid #eee;
    margin-bottom: 4px;
    padding-bottom: 16px;
}
.agent-header h1 {
    margin: 0 0 8px 0;
    font-size: 2rem;
}
.agent-header p {
    color: #666;
    margin: 0;
}
.agent-section {
    margin-bottom: 14px; /* Reduced from 28px */
}
.agent-section label {
    margin-bottom: 3px; /* Reduced from 6px */
}
.agent-section textarea,
.agent-section input,
.agent-section select {
    margin-bottom: 4px; /* Reduced from 8px */
    padding: 6px 8px;   /* Slightly tighter padding */
    font-size: 0.97rem; /* Slightly smaller font */
}
.agent-section textarea {
    min-height: 48px; /* Reduced from 60px */
}

.agent-page-grid {
    display: grid;
    grid-template-columns: 30% 70%;
    gap: 32px;
    align-items: stretch;
    /* Remove min/max-widths from .agent-card if present elsewhere */
}

.agent-page-grid-fullheight {
    height: 100%;
    min-height: 70vh;
}

.agent-card,
.agent-output-card {
    height: 100%;
    min-height: 100%;
    display: flex;
    flex-direction: column;
    margin-bottom: 0;
    /* Remove max-width from .agent-card if present */
}

.agent-card-fullheight {
    flex: 1 1 0;
}

.agent-output-card.agent-card-fullheight {
    flex: 1 1 0;
}

.agent-output-markdown {
    flex: 1 1 auto;
}

/* =========================
   General Textarea Styles
   ========================= */
textarea {
  width: 100%;
  min-height: 110px;
  padding: 16px 14px;
  border: 1.5px solid var(--primary-color);
  border-radius: 8px;
  font-family: var(--body-font);
  font-size: 1.08rem;
  color: var(--text-color);
  transition: border-color 0.25s, box-shadow 0.25s;
  resize: vertical;
  box-sizing: border-box;
  outline: none;
  box-shadow: 0 1px 4px rgba(0,48,73,0.04);
}

textarea:focus {
  border-color: var(--accent-color);
  box-shadow: 0 0 0 3px rgba(247, 127, 0, 0.13);
  background: #fff;
}

textarea::placeholder {
  color: #b0b8c1;
  opacity: 1;
  font-style: italic;
}

/* =========================
   General Select (Dropdown) Styles
   ========================= */
select {
  width: 100%;
  padding: 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-family: var(--body-font);
  font-size: 1rem;
  color: var(--text-color);
  background: #fff;
  transition: border-color 0.3s, box-shadow 0.3s;
  box-sizing: border-box;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
}

select:focus {
  border-color: var(--primary-color);
  outline: none;
  box-shadow: 0 0 0 3px rgba(0, 48, 73, 0.15);
}

/* Style for dropdown options list */
select option {
  background: #fff;
  color: var(--text-color);
  font-family: var(--body-font);
  font-size: 1rem;
  padding: 10px;
}

select option:checked,
select option:focus {
  background: #e0e7ef;
  color: var(--primary-color);
}

/* =========================
   Table Styles
   ========================= */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 1rem;
  font-family: var(--body-font);
  color: var(--text-color);
}

thead {
  background-color: var(--primary-color);
  text-align: left;
  color: #fff;
}

thead th {
  padding: 12px;
  font-weight: 600;
  border-bottom: 2px solid var(--gray-300);
}

tbody tr {
  border-bottom: 1px solid var(--gray-200);
}

tbody tr:nth-child(even) {
  background-color: #fafafa;
}

td {
  padding: 12px;
  vertical-align: top;
}

th {
  padding: 12px;
  vertical-align: bottom;
}

table caption {
  caption-side: top;
  text-align: left;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--primary-color);
}