/* =============================================
   ST3 Backflow Services - DARK THEME
   Black Background + Green Accents
   ============================================= */

:root {
    --st3-green: #6A8E5E;
    --st3-dark: #111111;
    --st3-light: #E5E5E5;
    --st3-gray: #222222;
}

body {
    background-color: var(--st3-dark);
    color: var(--st3-light);
}

.container {
    max-width: 1400px;
}

/* Navbar */
.navbar {
    background-color: #0a0a0a !important;
    border-bottom: 3px solid var(--st3-green);
}

.navbar-brand img {
    max-height: 48px;
    max-width: 200px;
}

/* Headings */
h1, h2, h3, h4 {
    color: white;
}

/* Cards */
.card {
    background-color: var(--st3-gray);
    border: 1px solid #333;
    color: var(--st3-light);
}

.card-header {
    background-color: var(--st3-green);
    color: white;
    font-weight: 600;
}

/* =============================================
   TABLE HEADERS - FORCED GREEN + WHITE TEXT
   (Dark theme fix)
   ============================================= */

.table thead,
.table thead tr,
.table thead th {
    background-color: #6A8E5E !important;
    color: white !important;
    font-weight: 600;
}

.table thead th {
    color: white !important;
    border-bottom: 2px solid #5a7a4f !important;
    vertical-align: middle;
}

.table thead a {
    color: white !important;
    text-decoration: none !important;
}

.table thead a:hover {
    color: #f0f0f0 !important;
    text-decoration: underline !important;
}

/* Extra override for Bootstrap 5 */
.table > thead > tr > th {
    background-color: #6A8E5E !important;
    color: white !important;
}

/* Forms */
.form-control, .form-select {
    background-color: #222222;
    color: var(--st3-light);
    border: 1px solid #444;
}

.form-control:focus, .form-select:focus {
    background-color: #222222;
    border-color: var(--st3-green);
    box-shadow: 0 0 0 0.25rem rgba(106, 142, 94, 0.3);
}

/* Buttons */
.btn-primary, .btn-success {
    background-color: var(--st3-green);
    border-color: var(--st3-green);
}

.btn-primary:hover, .btn-success:hover {
    background-color: #5a7a4f;
    border-color: #5a7a4f;
}

.btn-danger {
    background-color: #c42b2b;
}

.btn-secondary {
    background-color: #444;
    border-color: #444;
}

/* Alerts */
.alert-success { background-color: #1e3a1e; border-color: #6A8E5E; color: #d4f0d4; }
.alert-info    { background-color: #1e2a3a; border-color: #6A8E5E; color: #c8e0f0; }
.alert-warning { background-color: #3a2a1e; border-color: #f0c040; color: #ffe8c8; }

/* Footer / small text */
.text-muted {
    color: #888 !important;
}

/* =============================================
   FORM FIELDS - DARK THEME TEXT VISIBILITY FIX
   ============================================= */

.form-control,
.form-select,
textarea.form-control {
    background-color: #222222 !important;
    color: #E5E5E5 !important;           /* white/light text */
    border: 1px solid #444 !important;
}

.form-control:focus,
.form-select:focus,
textarea.form-control:focus {
    background-color: #222222 !important;
    color: #E5E5E5 !important;
    border-color: #6A8E5E !important;
    box-shadow: 0 0 0 0.25rem rgba(106, 142, 94, 0.3) !important;
}

/* Labels and help text */
.form-label {
    color: #E5E5E5 !important;
}

/* Make sure placeholder text is visible */
.form-control::placeholder {
    color: #888 !important;
    opacity: 1;
}