/* BeeHive Monitor - Modern Dark Theme */

:root {
    --bs-primary-rgb: 13, 110, 253; /* Default Bootstrap Blue for accents */
    --bs-link-color: #6ea8fe;
    --bs-link-hover-color: #8bb9ff;
    --sidebar-width: 240px;
    --header-height: 56px;
    --dark-bg: #1a1a1a;
    --dark-card: #2c2c2c;
    --dark-input: #333333;
    --dark-border: #404040;
    --text-light: #e0e0e0;
    --text-lighter: #f5f5f5;
    --text-muted: #a0a0a0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
    background-color: var(--dark-bg);
    color: var(--text-light);
    margin: 0;
    padding: 0;
    line-height: 1.6;
    font-size: .875rem;
}

.container, .container-fluid {
    padding-top: 1.5rem;
    padding-bottom: 1.5rem;
}

h1, h2, h3, h4, h5, h6 {
    color: #f5f5f5; /* Slightly brighter for headings */
    font-weight: 500;
}

hr {
    border-top-color: #404040; /* Medium dark gray */
}

/* Cards */
.card {
    background-color: #2c2c2c; /* Dark gray card background */
    border: 1px solid #404040; /* Medium dark gray border */
    margin-bottom: 1.5rem;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}
.card-header {
    background-color: #333333; /* Slightly different dark for header */
    border-bottom: 1px solid #404040;
    color: #f5f5f5;
    font-weight: 500;
}

/* Forms */
.form-control, .form-select {
    background-color: #333333; /* Dark input background */
    color: #e0e0e0; /* Light input text */
    border: 1px solid #555555; /* Darker border for inputs */
}
.form-control:focus, .form-select:focus {
    background-color: #383838;
    color: #e0e0e0;
    border-color: var(--bs-link-color); /* Accent color for focus */
    box-shadow: 0 0 0 0.2rem rgba(var(--bs-primary-rgb), 0.25);
}
.form-control::placeholder {
  color: #888888;
  opacity: 1;
}
.form-control:-ms-input-placeholder {
  color: #888888;
}
.form-control::-ms-input-placeholder {
  color: #888888;
}
.form-label {
    color: #e0e0e0;
    margin-bottom: 0.5rem;
}
.form-text {
    color: #a0a0a0; /* Medium gray muted text */
}

/* Buttons */
.btn-primary {
    /* Using Bootstrap default blue, ensure it has good contrast or pick a custom color */
    /* color: #fff; */ /* Ensure text is white if background is dark blue */
}
.btn-secondary {
    background-color: #555555;
    border-color: #555555;
    color: #e0e0e0;
}
.btn-secondary:hover {
    background-color: #666666;
    border-color: #666666;
}
.btn-warning {
    color: #1a1a1a; /* Dark text for yellow warning */
}
.btn-warning:hover {
    color: #000;
}
.btn-danger {
    /* color: #fff; */ /* Ensure text is white if background is dark red */
}


/* Navbar */
.navbar.bg-dark {
    background-color: #232323 !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.navbar-brand {
    padding-top: .75rem;
    padding-bottom: .75rem;
    font-size: 1rem;
    background-color: rgba(0, 0, 0, .25);
    box-shadow: inset -1px 0 0 rgba(0, 0, 0, .25);
    width: var(--sidebar-width);
    text-align: center;
}

.navbar-dark .navbar-brand, 
.navbar-dark .navbar-nav .nav-link {
    color: var(--text-light);
}

.navbar-dark .navbar-nav .nav-link:hover,
.navbar-dark .navbar-nav .nav-link:focus {
    color: #ffffff;
}

.navbar-dark .navbar-nav .nav-link.active {
    color: #ffffff;
    font-weight: 500;
}

.navbar-text {
    color: var(--text-muted);
}

.navbar-toggler {
    border-color: #555555;
    position: absolute;
    right: 1rem;
    top: .25rem;
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28224, 224, 224, 0.75%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

.form-control-dark {
    color: #fff;
    background-color: rgba(255, 255, 255, .1);
    border-color: rgba(255, 255, 255, .1);
}

.form-control-dark:focus {
    border-color: transparent;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, .25);
}


/* Tables */
.table {
    color: #e0e0e0;
    border-color: #404040; /* Consistent border color */
}
.table-striped > tbody > tr:nth-of-type(odd) > * {
    background-color: #252525; /* Subtle striping */
    color: #e0e0e0;
}
.table-hover > tbody > tr:hover > * {
    background-color: #2f2f2f; /* Subtle hover */
    color: #e0e0e0;
}
.table th, .table td {
    border-color: #404040;
    padding: 0.75rem; /* Default Bootstrap padding */
}
.table thead th {
    border-bottom: 2px solid #555555; /* Stronger border for header bottom */
    color: #f5f5f5;
    background-color: #333333;
}
.badge { /* General badge styling if needed */
    font-weight: 500;
}
/* Specific badge backgrounds already handled by Bootstrap, e.g., .bg-success */


/* Alerts */
.alert {
    border-width: 1px;
    border-style: solid;
}
.alert-info {
    color: #cce5ff;
    background-color: #1b2c3f;
    border-color: #2c4a6b;
}
.alert-danger {
    color: #f8d7da;
    background-color: #491f22;
    border-color: #722126;
}
.alert-success {
    color: #d1e7dd;
    background-color: #1c3827;
    border-color: #2a573c;
}
.alert-warning {
    color: #fff3cd;
    background-color: #4d3800;
    border-color: #805b00;
}


/* Specific to settings page */
.api-key-display { 
    background-color: var(--dark-input); 
    padding: 0.5rem 0.75rem; 
    border-radius: 0.25rem; 
    font-family: "SFMono-Regular", Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    word-break: break-all;
    color: var(--text-light);
    border: 1px solid #555555;
}

/* General Links */
a {
    color: var(--bs-link-color);
    text-decoration: none; /* Modern themes often remove underlines by default */
}
a:hover {
    color: var(--bs-link-hover-color);
    text-decoration: underline;
}

/* Sidebar */
.sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 100; /* Behind the navbar */
    padding: var(--header-height) 0 0; /* Height of navbar */
    box-shadow: inset -1px 0 0 rgba(0, 0, 0, .1);
    background-color: var(--dark-card);
    width: var(--sidebar-width);
}

@media (max-width: 767.98px) {
    .sidebar {
        top: var(--header-height);
        width: 100%;
    }
}

.sidebar-sticky {
    position: relative;
    top: 0;
    height: calc(100vh - var(--header-height));
    padding-top: .5rem;
    overflow-x: hidden;
    overflow-y: auto; /* Scrollable contents if viewport is shorter than content. */
}

.sidebar .nav-link {
    font-weight: 500;
    color: var(--text-muted);
    padding: .5rem 1rem;
    border-left: 3px solid transparent;
    transition: all 0.2s ease;
}

.sidebar .nav-link .feather {
    margin-right: 4px;
    color: #727272;
}

.sidebar .nav-link.active {
    color: #fff;
    background-color: rgba(13, 110, 253, 0.1);
    border-left: 3px solid #0d6efd;
}

.sidebar .nav-link:hover,
.sidebar .nav-link.active:hover {
    color: #fff;
    background-color: rgba(13, 110, 253, 0.15);
}

.sidebar-heading {
    font-size: .75rem;
    text-transform: uppercase;
    color: var(--text-muted);
}

/* Dashboard main content */
.main-content {
    margin-left: var(--sidebar-width);
    padding-top: var(--header-height); /* Ensure main content starts below sticky header */
}

@media (max-width: 767.98px) {
    .main-content {
        margin-left: 0;
        padding-top: var(--header-height); /* Still need padding for header on mobile */
    }
}

/* Cards with hover effect */
.card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

/* Dashboard stats cards */
.stats-card {
    border-left: 4px solid;
    border-radius: 4px;
}

.stats-card.primary {
    border-left-color: #0d6efd;
}

.stats-card.success {
    border-left-color: #198754;
}

.stats-card.warning {
    border-left-color: #ffc107;
}

.stats-card.danger {
    border-left-color: #dc3545;
}

.stats-card .card-body {
    padding: 1rem;
}

.stats-card .stats-icon {
    font-size: 1.5rem;
    opacity: 0.7;
}

.stats-card .stats-number {
    font-size: 1.5rem;
    font-weight: 600;
}

.stats-card .stats-text {
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* Feather icons (if used) */
.feather {
    width: 16px;
    height: 16px;
    vertical-align: text-bottom;
}

/* Utility for slightly muted text */
.text-muted-light {
    color: #a0a0a0 !important;
}
/* The styles from line 379 to 456 were an older iteration of sidebar styles. */
/* They are being removed to rely on the more detailed sidebar styles defined earlier (lines 246-303 approx). */
/* The media query for main (lines 451-455) is also superseded by .main-content (lines 306-314). */