/* === DARK MODERN THEME FOR CORDOBA AI PIPELINE === */

/* Global colors */
:root {
  --bg-main: #0d0f14;
  --bg-card: #151821;
  --bg-accent: #1e2230;
  --text-primary: #e6e9ef;
  --text-secondary: #8b92a1;
  --accent: #00aaff;
  --accent-gradient: linear-gradient(90deg, #00aaff, #006aff);
  --border-color: #232733;
  --success-color: #00d97e;
  --warning-color: #ffc107;
}

/* Base */
body {
  background-color: var(--bg-main);
  color: var(--text-primary);
  font-family: 'Poppins', 'Inter', sans-serif;
  line-height: 1.6;
}

/* Navbar */
.navbar {
  background: var(--bg-accent) !important;
  border-bottom: 1px solid var(--border-color);
}
.navbar-brand {
  font-weight: 600;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.navbar-nav .nav-link {
  color: var(--text-secondary);
  transition: color 0.2s, transform 0.15s;
}
.navbar-nav .nav-link:hover {
  color: var(--accent);
  transform: translateY(-1px);
}
.navbar-text {
  color: var(--text-secondary);
}

/* Cards */
.card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
  transition: transform 0.2s ease, box-shadow 0.3s ease;
}
.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 0 20px rgba(0, 170, 255, 0.15);
}
.card-header {
  background: var(--bg-accent);
  color: var(--accent);
  font-weight: 500;
  border-bottom: 1px solid var(--border-color);
}

/* Tables */
.table {
  color: var(--text-primary);
  border-color: var(--border-color);
}
.table-striped > tbody > tr:nth-of-type(odd) {
  background-color: rgba(255, 255, 255, 0.02);
}
.table-hover tbody tr:hover {
  background-color: rgba(0, 170, 255, 0.1);
}
.table th {
  color: var(--accent);
  border-bottom: 2px solid var(--border-color);
}

/* Badges */
.badge.bg-success {
  background-color: var(--success-color) !important;
  color: #fff;
}
.badge.bg-warning {
  background-color: var(--warning-color) !important;
  color: #000;
}

/* Form controls */
.form-select,
.form-control {
  background-color: var(--bg-accent);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}
.form-select:focus,
.form-control:focus {
  background-color: var(--bg-accent);
  border-color: var(--accent);
  box-shadow: 0 0 6px rgba(0, 170, 255, 0.4);
  color: var(--text-primary);
}

/* Buttons */
.btn-primary {
  background: var(--accent-gradient);
  border: none;
  color: #fff;
  font-weight: 500;
  border-radius: 6px;
  transition: background 0.3s, transform 0.15s;
}
.btn-primary:hover {
  background: linear-gradient(90deg, #0095e0, #005fa3);
  transform: translateY(-1px);
}

/* Alerts */
.alert {
  border-radius: 6px;
  border: 1px solid var(--border-color);
  background-color: var(--bg-accent);
  color: var(--text-primary);
}
.alert-danger {
  border-color: #f05454;
  background-color: #1c0f0f;
}

/* Tablescroll + selection highlight (optional aesthetic) */
.table tbody tr {
  transition: background 0.2s;
}
.table tbody tr:active {
  background-color: rgba(0, 170, 255, 0.15);
}

/* Headings */
h1, h2, h3, h4, h5 {
  color: var(--text-primary);
  font-weight: 600;
}
h2.mb-4 {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Scrollbars (modern dark) */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-main);
}
::-webkit-scrollbar-thumb {
  background: var(--accent);
  border-radius: 4px;
}

/* Links */
a {
  color: var(--accent);
  text-decoration: none;
}
a:hover {
  color: #66ccff;
  text-decoration: underline;
}

/* Footer (if any) */
footer {
  background-color: var(--bg-accent);
  color: var(--text-secondary);
  border-top: 1px solid var(--border-color);
  text-align: center;
  padding: 1rem 0;
  font-size: 0.9rem;
}

/* === Improved contrast for dark mode cards and tables === */

/* Make card text bright and readable */
.card-body {
  color: #f5f7fa !important; /* almost pure white */
}

/* Ensure card headers and text flow seamlessly */
.card-header {
  color: var(--accent);
  border-bottom: 1px solid var(--border-color);
  background-color: var(--bg-accent);
}





/* Base table */
.custom-dark-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background-color: rgba(0, 0, 0, 0.3);  /* base dark background */
    color: rgba(255, 255, 255, 0.87); /* slightly transparent text */
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

/* Header */
.custom-dark-table thead {
    background-color: rgba(0, 0, 0, 0.763); /* darker header with transparency */
    color: rgba(255, 255, 255, 0.9);
    text-align: left;
    font-weight: 600;
    font-size: 0.95rem;
}

/* Header cells */
.custom-dark-table th {
    padding: 14px 16px;
    word-break: break-word; /* text wrapping */
}

/* Body rows */
.custom-dark-table tbody tr {
    background-color: transparent;
    /*transition: background 0.2s ease;*/
    vertical-align: middle;
    line-height: 1.6rem;
}

/* Alternate row shading using subtle transparency */
.custom-dark-table tbody tr:nth-child(even) {
    background-color: rgba(0, 0, 0, 0.6); /* very subtle overlay */
}

/* Row hover effect with soft gradient */
.custom-dark-table tbody tr:hover {
    background: rgba(85, 99, 124, 0.457);
}

/* Body cells */
.custom-dark-table td {
    padding: 12px 16px;
    word-break: break-word;
}

/* Optional: badges style for dark background */
.custom-dark-table .badge {
    font-weight: 500;
}

/* Optional: responsive */
.custom-dark-table {
    overflow-x: auto;
    display: block;
}

/* Header cells: prevent wrapping */
.custom-dark-table thead th {
    white-space: nowrap; /* prevent wrapping for short titles */
    text-overflow: ellipsis; /* optional: add ellipsis if text is too long */
    overflow: hidden;
}

/* Header text smaller */
.custom-dark-table thead th {
    font-size: 0.85rem; /* smaller header text */
}

/* Body row text smaller */
.custom-dark-table tbody td {
    font-size: 0.85rem; /* slightly smaller than header */
}