/* Subtle mouseover for credential list items */
.dashboard-credential-link {
    transition: background 0.15s, box-shadow 0.15s;
}
.dashboard-credential-link:hover, .dashboard-credential-link:focus-within {
    background: #23272f !important;
    box-shadow: 0 0 0 2px #0d6efd33;
    z-index: 1;
}
/* v5: Bootstrap primary theme for dashboard card headers */
.dashboard-card-header-primary {
    background: #0d6efd; /* Bootstrap 5 .bg-primary */
    color: #fff;
    transition: background 0.2s, color 0.2s;
}
.dashboard-card-header-primary:hover,
.dashboard-card-header-primary:focus {
    background: #0b5ed7; /* Bootstrap 5 .bg-primary-darken */
    color: #fff;
}
/* Remove borders from all cards for a cleaner, modern look */
.card {
    border: none !important;
    box-shadow: 0 0.5rem 1.5rem rgba(0,0,0,0.10); /* Keep subtle shadow for depth */
}
/* ========================================================================
   DASHBOARD CARD HEADER & BODY THEMES (EXPERIMENTAL)
   ------------------------------------------------------------------------
   These classes are for testing and iterating on dashboard card header/body
   background and text color combinations. Each change is tracked and can be
   reverted or swapped by toggling the class on the element.
   ======================================================================== */

/* v1: Default (current) theme for reference */
.dashboard-card-header-default {
    background: #e9ecef; /* Bootstrap .bg-primary-subtle */
    color: #212529;      /* Bootstrap .text-dark */
}
.dashboard-card-body-default {
    background: #343a40; /* Bootstrap .bg-secondary */
    color: #fff;
}

/* v2: Experimental dark theme */
.dashboard-card-header-dark {
    background: #232946; /* Deep dark blue */
    color: #80d8ff;      /* Light blue text */
    transition: background 0.2s, color 0.2s;
}
.dashboard-card-header-dark:hover,
.dashboard-card-header-dark:focus {
    background: #31363b; /* Slightly lighter dark on hover */
    color: #fff;
}
.dashboard-card-body-dark {
    /* v5: Even lighter for card body (experimental, reversible) */
    background: #444955; /* Lighter, still neutral and modern */
    color: #e0e0e0;
    /* Previous: #363b44, #2d323a, #23272e, #181b20; -- revert if needed */
}

/* v3: Experimental blue accent theme */
.dashboard-card-header-blue {
    background: #1976d2; /* Blue accent */
    color: #fff;
    transition: background 0.2s, color 0.2s;
}
.dashboard-card-header-blue:hover,
.dashboard-card-header-blue:focus {
    background: #1565c0;
    color: #fff;
}
.dashboard-card-body-blue {
    background: #232946; /* Match main background */
    color: #b3e5fc;
}

/* v4: Experimental slate theme */
.dashboard-card-header-slate {
    background: #374151;
    color: #ffb300; /* Amber text */
    transition: background 0.2s, color 0.2s;
}
.dashboard-card-header-slate:hover,
.dashboard-card-header-slate:focus {
    background: #232946;
    color: #fff;
}
.dashboard-card-body-slate {
    background: #232946;
    color: #fffde7;
}

/* ========================================================================
   GENERAL LAYOUT, TYPOGRAPHY, AND BACKGROUND
   ------------------------------------------------------------------------
   These styles set the overall look and feel of the application, including
   background, font, and spacing for the main body and sections.
   ======================================================================== */

body {
    /* Unified background for both auth and app */
    background: #232946;
    min-height: 100vh;
    color: #eeeeee;
    font-family: 'Quicksand', Arial, sans-serif;
}

/* Section spacing utilities */
.mt-5 { margin-top: 3rem !important; }
.mb-4 { margin-bottom: 1.5rem !important; }

/* ========================================================================
   CARD, SECTION, AND CONTAINER STYLES
   ------------------------------------------------------------------------
   Styles for cards, containers, and section backgrounds.
   ======================================================================== */

.card-slate {
    /* Slate-style card background for dashboard cards */
    background-color: #374151 !important;
    color: #ffffff;
    border: 1px solid #4b5563;
}
.ksqa-secondary-background {
    /* Secondary background for special sections */
    background-color: #1a253f;
}

/* ========================================================================
   HEADINGS
   ------------------------------------------------------------------------
   Custom heading styles for section titles.
   ======================================================================== */

h2, h3 {
    color: #ffffff;
    border-bottom: 1px solid #333;
    padding-bottom: 6px;
    margin-top: 40px;
}

/* ========================================================================
   TABLES & DASHBOARD RESULTS TABLE
   ------------------------------------------------------------------------
   Styles for all tables, with special focus on the dashboard results table.
   ======================================================================== */

/* General dark table style for all .table-dark tables */
.table-dark th,
.table-dark td {
    border-color: #444;
    background-color: #1e1e1e;
    color: #dddddd;
}

/* Dashboard Results Table: structure and cell padding */
.dashboard-results-table {
    /* Custom table for dashboard results panel */
    background: #181818;
    border-collapse: separate;
    border-spacing: 0 0.08rem;
    border-radius: 0.75rem;
    overflow: hidden;
}
.dashboard-results-table th,
.dashboard-results-table td,
.dashboard-results-cell {
    /* Consistent cell padding and background */
    padding: 0.45rem 0.7rem;
    background: #181818;
}

/* Dashboard Results Table Row Hover Effect
   Ensures visible mouseover for all rows, overriding Bootstrap .table-striped */
.dashboard-results-row,
.table-striped > tbody > tr.dashboard-results-row,
.table-dark.table-striped > tbody > tr.dashboard-results-row {
    transition: background 0.15s, box-shadow 0.15s;
}
.dashboard-results-row:hover,
.table-striped > tbody > tr.dashboard-results-row:hover,
.table-dark.table-striped > tbody > tr.dashboard-results-row:hover,
.table-striped > tbody > tr:nth-of-type(odd).dashboard-results-row:hover,
.table-striped > tbody > tr:nth-of-type(even).dashboard-results-row:hover {
    background-color: #31363b !important;
    box-shadow: 0 2px 8px 0 rgba(0,0,0,0.10) !important;
    cursor: pointer !important;
    z-index: 2 !important;
    position: relative !important;
    background-clip: padding-box !important;
}
.dashboard-results-row:hover td,
.table-striped > tbody > tr.dashboard-results-row:hover > td,
.table-dark.table-striped > tbody > tr.dashboard-results-row:hover > td,
.table-striped > tbody > tr:nth-of-type(odd).dashboard-results-row:hover > td,
.table-striped > tbody > tr:nth-of-type(even).dashboard-results-row:hover > td {
    background-color: #31363b !important;
    transition: background 0.15s;
    background-clip: padding-box !important;
}

/* ========================================================================
   LINKS
   ------------------------------------------------------------------------
   Styles for all anchor tags and dashboard-specific links.
   ======================================================================== */

a {
    color: #80d8ff;
    text-decoration: none;
}
a:hover {
    color: #40c4ff;
    text-decoration: underline;
}

/* Dashboard Results Panel header link */
.dashboard-results-link {
    color: #fff;
    text-decoration: none;
    transition: color 0.15s, text-decoration 0.15s;
    font-weight: bold;
}
.dashboard-results-link:hover,
 .dashboard-results-link:focus {
    color: #ffe066; /* Bright yellow for high contrast on hover */
    text-shadow: 0 0 1px #fffbe6;
    text-decoration: underline;
    transition: color 0.15s, text-shadow 0.15s;
    font-weight: inherit;
}

/* ========================================================================
   FORMS, LABELS, AND TOOLTIP TEXT
   ------------------------------------------------------------------------
   Styles for form labels, help text, and info tooltips.
   ======================================================================== */

.form-label {
    color: #fff;
}
.form-text {
    font-size: 0.875em;
    color: #aaa;
}

/* ========================================================================
   IMAGES & RESPONSIVE MEDIA
   ------------------------------------------------------------------------
   Ensures images scale and fit within their containers.
   ======================================================================== */

img {
    max-height: 64px;
    height: auto;
}

/* ========================================================================
   LOGO, BRANDING, AND LOGIN PAGE
   ------------------------------------------------------------------------
   Styles for logo, branding, and login page elements.
   ======================================================================== */

.logo-title {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
}
.logo-title-text {
    font-family: 'Quicksand', Arial, sans-serif;
    font-weight: 700;
    font-size: 2.5rem;
    letter-spacing: 1px;
    line-height: 1;
}
.logo-mci {
    color: #ff7f2a; /* Orange */
}
.logo-bpo {
    color: #1976d2; /* Blue */
}
.logo-app-title {
    font-family: Arial, sans-serif;
    font-weight: 500;
    font-size: 2.2rem;
    letter-spacing: 0.5px;
    line-height: 1;
    color: #ffffff;
    margin-left: 0.5rem;
    margin-top: 0.2rem;
}

/* Login page logo row */
.login-logo-title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
}
.login-logo-title img {
    height: 48px;
    width: auto;
}

/* Login card container and body */
.login-card {
    border-radius: 1.25rem;
    box-shadow: 0 0.5rem 1.5rem rgba(0,0,0,0.15);
    border: 1px solid #fff;      /* White border */
    background: #000;            /* Black background */
}
.login-card .card-body {
    background: #000;            /* Black background */
    color: #fff;
    border-radius: 1.25rem;
}

/* Override Quicksand for login card body text */
.login-card,
.login-card .card-body,
.login-card input,
.login-card label,
.login-card button {
    font-family: Arial, Helvetica, sans-serif !important;
    font-weight: 400;
}

/* ========================================================================
   LOGS, JSON, AND PRE-FORMATTED TEXT
   ------------------------------------------------------------------------
   Styles for log blocks, scrollable JSON, and preformatted text in cards.
   ======================================================================== */

.json-scroll-block {
    max-height: 350px;
    overflow: auto;
    border: 1px solid #444;
    background: #1e1e1e;
    padding: 10px;
}

.text-light.small pre.mb-0 {
    color: #e0e0e0;
    font-size: 0.95em;
    background: none;
    border: none;
    margin-bottom: 0;
}

.app-log-block {
    font-family: monospace;
    font-size: 14px;
    max-height: 400px;
    overflow: auto;
}

/* Fix for rounded bottom corners on collapsed cards in oauthDetailView */
.card .collapse:not(.show) {
    border-bottom-left-radius: 0.75rem !important;
    border-bottom-right-radius: 0.75rem !important;
}
.card .collapse.show {
    border-bottom-left-radius: 0.75rem !important;
    border-bottom-right-radius: 0.75rem !important;
}
.card .card-header {
    border-top-left-radius: 0.75rem !important;
    border-top-right-radius: 0.75rem !important;
}
