/* ===== Design Tokens ===== */
:root {
    /* Primary palette */
    --color-primary: #3c6aa7;
    --color-primary-hover: #26446b;
    --color-primary-light: #edf2f8;

    /* Brand — JAWA's signature burgundy */
    --color-navbar: #6A2F30;
    --color-navbar-dark: #4e2223;

    /* Accent — sandstone/caramel */
    --color-accent: #d7a773;
    --color-accent-light: #aa845a;

    /* Text hierarchy */
    --color-text: #112a46;
    --color-text-secondary: #5a6978;
    --color-text-muted: #5b6776;

    /* Surfaces */
    --color-surface: #faf8f5;
    --color-surface-raised: #f3efe9;
    --color-surface-hover: #e8e2d9;
    --color-border: #ddd6cc;

    /* Code blocks */
    --color-code-bg: #112a46;
    --color-code-text: #e2e8f0;

    /* Typography */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-mono: 'JetBrains Mono', 'SF Mono', 'Fira Code', 'Cascadia Code', monospace;

    /* Spacing scale: 4 / 8 / 12 / 16 / 24 / 32 / 48 */
    --space-1: 4px;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-5: 24px;
    --space-6: 32px;
    --space-7: 48px;
    --gutter: var(--space-4);

    /* Link and page colors (re-pointed in dark mode) */
    --color-link: #3c6aa7;
    --color-link-hover: #26446b;
    --color-input-bg: #fff;
    --color-card-bg: #fff;
    --color-page: #e6bc99;

    /* Shape */
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-pill: 9999px;

    /* Elevation */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
}

/* ===== Base Styles ===== */
body {
    margin: 0;
    padding-top: 56px;
    background-color: var(--color-page);
    font-family: var(--font-sans);
    color: var(--color-text);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
}

a {
    color: var(--color-link);
}

a:visited {
    color: var(--color-link-hover);
}

a:hover {
    color: var(--color-link-hover);
    text-decoration: underline;
}

/* Keep white links inside navbar and footer */
nav a, nav a:visited,
footer a, footer a:visited {
    color: rgba(255, 255, 255, 0.8);
}

nav a:hover, footer a:hover {
    color: #fff;
}


header {
    background-color: var(--color-code-bg);
    height: 35px;
    width: 100%;
    opacity: .9;
    margin-bottom: 10px;
}

header h1.logo {
    margin: 0;
    font-size: 1.7em;
    color: #fff;
    float: left;
}

header h1.logo:hover {
    color: #fff;
    text-decoration: none;
}

/*
 * Centering the body content
 */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding-left: 1rem;
    padding-right: 1rem;
}

div.home, div.webhooks, div.success {
    padding: 10px 0 30px 0;
    background-color: #fff;
    border-radius: 6px;
}

h2 {
    font-size: 3em;
    margin-top: 40px;
    text-align: center;
    letter-spacing: -2px;
}

h3 {
    font-size: 1.7em;
    font-weight: 100;
    margin-top: 30px;
    text-align: center;
    letter-spacing: -1px;
    color: #999;
}

.h1-center {
    text-align: center;
}

* {
    box-sizing: border-box;
}

.menu {
    float: left;
    margin-top: 8px;
}

.menu li {
    display: inline;
}

.menu li + li {
    margin-left: 35px;
}

.menu li a {
    color: #fff;
    text-decoration: none;
}

.button-holder {
    padding-top: 20px;
}

.ajax-button {
    display: flex;
    justify-content: center;
    text-align: center;
}

.submit {
    appearance: none;
    width: 100px;
    height: 40px;
    background-color: #111111;
    border: 2px solid #FFFFFF;
    border-radius: 10px;
    color: #FFFFFF;
    font-size: 17px;
    cursor: pointer !important;
}

.submit:hover {
    background-color: #222222;
}

.loading {
    font-size: 0;
    width: 30px;
    height: 30px;
    margin-top: 5px;
    border-radius: 15px;
    padding: 0;
    border: 3px solid #111111;
    border-bottom: 3px solid rgba(255, 255, 255, 0.0);
    border-left: 3px solid rgba(255, 255, 255, 0.0);
    background-color: transparent !important;
    animation-name: rotateAnimation;
    animation-duration: 1s;
    animation-delay: 0.2s;
    animation-iteration-count: infinite;
}

@keyframes rotateAnimation {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

.fa {
    color: var(--color-primary);
    font-size: 18px !important;
    position: absolute;
    left: 50%;
    top: 50%;
    margin-left: -9px;
    margin-top: -9px;
    transform: scaleX(0) !important;
}

.finish {
    transform: scaleX(1) !important;
}

.hide-loading {
    opacity: 0;
    transform: scale(0) !important;
}

.rules-list {
    margin: 2rem;
}

@keyframes sk-circleFadeDelay {
    0%, 39%, 100% {
        opacity: 0;
    }
    40% {
        opacity: 1;
    }
}

.rule-row {
    border: 1px solid #000;
    margin: 10px 0;
    padding: 10px 30px 5px 30px;
}

#outer {
    width: 100%;
    text-align: center;
}

.inner {
    display: inline-block;
}

/* ===== Tables ===== */
.hippocrates {
    font-family: var(--font-sans);
    border-collapse: collapse;
    width: 100%;
}

.hippocrates td, .hippocrates th {
    border: 1px solid var(--color-border);
    padding: 8px;
}

.hippocrates tr:nth-child(even) {
    background-color: var(--color-surface-raised);
}

.hippocrates tr:hover {
    background-color: var(--color-surface);
}

.hippocrates th {
    padding-top: 12px;
    padding-bottom: 12px;
    text-align: left;
    background-color: var(--color-primary-hover);
    color: white;
    font-weight: 500;
    font-size: 0.85rem;
    border: none;
}


.rules-test {
    padding: 0 50px;
    margin: 0 50px;
    color: var(--color-text);
}

.alert-soft {
    padding: 0 25px;
    margin: 0 25px;
}

.btn-padded {
    margin-top: 1rem;
}

.webhooks-list span {
    display: block;
    font-size: 12px;
}

.webhooks-list h6 {
    display: block;
    font-size: 12px;
    word-wrap: normal;
}

.dash-list {
    text-align: center;
    margin-bottom: 2rem;
}


.jawa-bg {
    background-image: linear-gradient(to bottom, #edc9af, #eac2a4, #e6bc99, #e2b58d, #ddaf82, #ddaf82, #ddaf82, #ddaf82, #e2b58d, #e6bc99, #eac2a4, #edc9af);
    background-size: 100% 100%;
    min-height: 100vh;
    width: 100%;
}

.vertical-center {
    margin: 0;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
}

.container-bg {
    background-color: var(--color-surface);
}

/* ===== Cards ===== */
.card {
    padding: 0.5rem;
    margin: 10px;
    max-width: 280px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--color-primary);
}

.dash-list .btn-jawa {
    font-size: .9rem;
}

.modal-footer .btn-jawa {
    font-size: unset;
}

/* ===== Keyboard focus ===== */
:where(.btn, .nav-link, .navbar-brand, .navbar-toggler, .filter-btn, a.card-link, .submit):focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

/* On the burgundy navbar and hero the accent clears 3:1; on light
   surfaces the primary blue does. */
:where(.navbar, .hero-section) :where(.btn, .nav-link, .navbar-brand, .navbar-toggler, a):focus-visible {
    outline-color: var(--color-accent);
}

/* ===== Buttons ===== */
.btn-jawa {
    color: #fff;
    background-color: var(--color-primary);
    border-color: var(--color-primary);
    border-radius: var(--radius-md);
    font-weight: 500;
    transition: background-color 0.15s ease, border-color 0.15s ease;
}

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

.btn-jawa:disabled {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: #fff;
    opacity: 0.5;
}

a.btn-jawa,
a.btn-jawa:visited {
    color: #fff;
    text-decoration: none;
}

.alert-jawa {
    color: #FFFFFF;
    background-color: var(--color-primary);
    border-color: var(--color-primary);
    border-radius: 1rem;
    padding-top: 0.2rem;
    padding-bottom: 0.2rem;
}

.btn-danger {
    background-color: #c0392b;
    border-color: #c0392b;
    border-radius: var(--radius-md);
    color: #fff;
    font-weight: 500;
    transition: background-color 0.15s ease, border-color 0.15s ease;
}

.btn-danger:hover {
    background-color: #a93226;
    border-color: #a93226;
    color: #fff;
}

.btn-secondary {
    background-color: var(--color-surface-hover);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    color: var(--color-text);
    font-weight: 500;
    transition: background-color 0.15s ease, border-color 0.15s ease;
}

.btn-secondary:hover {
    background-color: var(--color-border);
    border-color: var(--color-border);
    color: var(--color-text);
}

a.btn-secondary,
a.btn-secondary:visited {
    color: var(--color-text);
    text-decoration: none;
}

.card-img {
    width: 72px;
    height: 72px;
    margin-top: 0.5rem;
    margin-bottom: 0.25rem;
    opacity: 0.85;
}

.card .btn-jawa {
    text-align: center;
    width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 0.8rem;
}

.border-info {
    border-color: var(--color-accent-light) !important;
}

.alert-warning {
    color: #000000;
    font-weight: bold;
    line-height: 1.2;
    font-size: .9rem;
    text-align: left;
}

.btn-group-sm .btn {
    border-radius: var(--radius-sm);
}

/* ===== Navbar (from nav.css) ===== */
.navbar {
    z-index: 9999;
    border-radius: 0;
    max-width: 100vw;
    background-color: var(--color-navbar) !important;
    box-shadow: var(--shadow-sm);
    padding: 0.5rem 1rem;
    border: none;
    margin-bottom: 0;
}

.nav-item .nav-link {
    color: rgba(255, 255, 255, 0.8) !important;
    font-weight: 500;
    font-size: 0.92rem;
    padding: 0.4rem 0.75rem !important;
    border-radius: var(--radius-sm);
    transition: background-color 0.15s ease, color 0.15s ease;
}

.nav-item .nav-link:hover {
    color: #fff !important;
    background-color: rgba(255, 255, 255, 0.08);
}

.navbar-brand,
.navbar-nav > li > a {
    color: #fff;
    text-align: center;
}

.navbar-brand:hover {
    text-decoration: underline;
}

.navbar-brand img {
    width: 32px;
}

.navbar-toggler {
    border-color: #eee;
    margin-top: 5px;
}

#last_nav_link {
    margin-right: 0;
}

nav {
    padding: 10px;
    font-size: 17px;
    color: white;
    background-color: var(--color-navbar);
}

nav > a {
    color: white;
    margin-right: 10px;
}

.nav-expand-line {
    height: 2px;
    margin: 6px;
    background-color: white;
}

#navbarSupportedContent {
    background-color: var(--color-navbar);
    padding: 10px;
}

/* ===== Footer ===== */
footer {
    padding: 1.25rem;
    text-align: center;
    color: rgba(255, 255, 255, 0.75);
    background-color: var(--color-navbar);
    font-size: 0.8rem;
    margin-top: auto;
    flex-shrink: 0;
}

footer a {
    color: var(--color-accent);
}

/* ===== Site Layout (from site.css) ===== */
.title {
    font-weight: bold;
}

.main_content {
    margin: 0;
    background-color: #fff;
    padding: 0 0 50px;
}

.test-links {
    text-align: center;
    border-bottom: 1px solid #d3d3d3;
    border-top: 1px solid #d3d3d3;
    margin-bottom: 0;
}

.test-links .stat {
    display: inline-block;
    min-width: 30vw;
    padding: 2px;
    font-size: 16px;
    color: #003d61;
}

.test-links .stat a {
    color: var(--color-text-secondary);
}

.test-links .stat a:visited {
    color: var(--color-text-secondary);
}

.project-list .subtitle {
    font-style: italic;
}

.project-list h2 {
    font-size: 24px;
    font-weight: bold;
}

.project-list .project {
    border: 1px solid #d3d3d3;
    padding: 10px;
    background-color: #2c2c2c;
    min-height: 45px;
    margin-top: 15px;
    color: black;
    margin-bottom: 15px;
}

.project-list .project .title {
    font-size: 20px;
}

.project-list .project a {
    color: var(--color-primary);
}

.project-list .project .desc {
    font-weight: normal;
    font-size: 16px;
    font-style: italic;
}

.test-links-bottom {
    background-color: var(--color-surface);
    padding: 10px 0;
    text-align: center;
    border-bottom: 1px solid var(--color-border);
    border-top: 1px solid var(--color-border);
    margin-top: 30px;
}

.confirm-delete-box {
    margin: auto;
    max-width: 2000px;
    text-align: center;
    background-color: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 1rem;
}

.log-view {
    max-width: 100%;
    margin: 0 auto;
    text-align: left;
    background-color: var(--color-code-bg);
    color: var(--color-code-text);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 1rem;
    font-family: var(--font-mono);
    font-size: 0.82rem;
    line-height: 1.6;
}

.log-frame {
    max-height: 60vh;
}

.log-form {
    margin: 0 auto;
    background-color: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 10px;
}

.log-background {
    background-color: var(--color-surface);
    border: 1px solid var(--color-border);
}

.download-button {
    margin: auto;
    text-align: center;
    padding: 15px 0;
}

.sub_links {
    padding-top: 66px;
    background-color: var(--color-surface);
}

.sub_links.affix {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 10;
}

#upload-trigger {
    display: none
}

#upload_link {
    text-decoration: none;
}

.article {
    padding-top: 40px;
}

.nav a {
    color: #422f32;
    text-decoration: underline;
}

.nav a:visited {
    color: #FFFFFF;
    text-decoration: underline;
}

/* ===== Account / Forms (from account.css) ===== */
.form-container {
    max-width: 100vw;
    padding-top: .5rem;
    padding-bottom: 1rem;
}

.log-container {
    padding: 10px;
    max-width: 100vw;
    margin-bottom: 1rem;
}

.login-form-container {
    padding-bottom: 2rem;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

form.table-view > * {
    margin-top: 5px;
    margin-bottom: 5px;
}

form.table-view h1 {
    text-align: center;
}

form.table-view button {
    float: right;
}

form.table-view select {
    padding: 0;
}

form.table-view {
    min-width: 25vw;
    max-width: 425px;
    margin-bottom: 5rem;
    margin-top: 1rem;
    background-color: var(--color-surface);
    color: var(--color-text);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
}

form.files-form {
    margin: auto;
    background-color: var(--color-surface);
    color: var(--color-text);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 1rem;
}

/* The overflow wrapper for .hippocrates: tables scroll sideways on a
   phone instead of forcing the whole page wide. */
.table-scroll {
    overflow-x: auto;
}

/* The resources path is a caption, not code -- the navy+mono block it
   used to sit in reads as output the admin should be looking at. */
.files-directory-caption {
    color: var(--color-text-secondary);
    font-size: 0.88rem;
    margin-bottom: 1rem;
}

.files-directory-path {
    font-family: var(--font-mono);
    word-break: break-all;
}

/* Whole-cell hit target: the radio used to be a bare control the
   filename happened to sit beside. */
.file-row-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
    cursor: pointer;
    word-break: break-all;
}

.error-msg {
    color: #b30000;
    text-align: center;
}

.success-wrap {
    overflow: hidden;
    text-overflow: ellipsis;
}

.success-wrap:hover {
    overflow: visible;
}

.success-form {
    margin: auto;
    text-align: center;
    max-width: 1000px;
    background-color: var(--color-surface);
    color: var(--color-text);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 10px;
}

.success-view {
    margin-top: 1rem;
    margin-bottom: 1rem;
    padding-top: 1rem;
}

.button-align {
    text-align: right;
}

.test-banner {
    background-color: #ececec;
}

.body {
    padding-top: 60px;
}

.table-view {
    margin: auto;
    margin-top: 1rem;
    max-width: 100vw;
    background-color: var(--color-surface);
    color: var(--color-text);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
}

.table-view a {
    color: var(--color-primary);
    text-decoration: underline;
}

/* ===== Forms (modernized) ===== */
.form-control {
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    color: var(--color-text);
    font-size: 0.9rem;
    padding: 0.5rem 0.75rem;
}

.form-control:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(60, 106, 167, 0.15);
    outline: none;
}

.form-section {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 2rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.content-narrow {
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.btn-action {
    min-width: 120px;
    padding: 0.45rem 1.25rem;
}

/* Button rows on a phone: wrap, and keep Delete on its own line. */
.action-row {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
}

@media (max-width: 575px) {
    .action-row {
        flex-wrap: wrap;
        row-gap: 12px;
    }

    .action-row .btn-action {
        flex: 1 1 auto;
        min-width: 0;
    }

    .action-row .btn-danger {
        flex-basis: 100%;
    }
}

/* ===== Code / Script Previews ===== */
.script-preview pre {
    background: var(--color-code-bg);
    color: var(--color-code-text);
    border-radius: var(--radius-md);
    padding: 1rem;
    font-family: var(--font-mono);
    font-size: 0.82rem;
    line-height: 1.6;
    overflow-x: auto;
}

code {
    font-family: var(--font-mono);
}

/* ===== Page Sub-Navigation (pill-style) ===== */
.page-sub-nav {
    display: flex;
    justify-content: left;
    gap: 0.5rem;
    flex-wrap: wrap;
    padding: 0.75rem 0;
    margin-bottom: 1rem;
}

.page-sub-nav a {
    padding: 0.4rem 1rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-pill);
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--color-text-secondary);
    text-decoration: none;
    transition: all 0.15s ease;
}

.page-sub-nav a:hover,
.page-sub-nav a.active {
    background: var(--color-primary);
    color: #fff;
    border-color: var(--color-primary);
}

.page-sub-nav a:visited {
    color: var(--color-text-secondary);
}

.page-sub-nav a:visited:hover,
.page-sub-nav a:visited.active {
    color: #fff;
}

/* ===== Hero Section ===== */
.hero-section {
    background: linear-gradient(135deg, #3a1517 0%, var(--color-navbar) 50%, #8b4547 100%);
    color: #fff;
    padding: 3rem 0;
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
}

.hero-section .container {
    max-width: 1400px;
}

.hero-section::before {
    content: "";
    position: absolute;
    top: -50%;
    right: -20%;
    width: 60%;
    height: 200%;
    background: radial-gradient(ellipse, rgba(215, 167, 115, 0.12), transparent 70%);
    pointer-events: none;
}

.hero-section h2 {
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: -1px;
    margin: 0 0 0.5rem;
    color: #fff;
    text-align: left;
    position: relative;
}

.hero-section p {
    color: rgba(255, 255, 255, 0.85);
    font-size: 1.05rem;
    margin: 0;
    text-align: left;
    position: relative;
}

.hero-section p a,
.hero-section p a:visited {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: underline;
}

.hero-section p a:hover {
    color: #fff;
}

.hero-cta {
    display: flex;
    justify-content: left;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-top: 1.25rem;
    position: relative;
}

.hero-cta .btn {
    font-weight: 600;
    padding: 0.5rem 1.5rem;
    border-radius: var(--radius-md);
}

.btn-hero-primary {
    background: var(--color-accent);
    color: #112a46;
    border: none;
    text-decoration: none;
}

.btn-hero-primary:hover {
    background: #e8c49a;
    color: #112a46;
    text-decoration: none;
}

.btn-hero-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.6);
    text-decoration: none;
}

.btn-hero-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
}

a.btn-hero-primary,
a.btn-hero-primary:visited,
a.btn-hero-primary:hover,
a.btn-hero-secondary,
a.btn-hero-secondary:visited,
a.btn-hero-secondary:hover {
    color: inherit;
    text-decoration: none;
}

a.btn-hero-primary,
a.btn-hero-primary:visited {
    color: #112a46;
}

a.btn-hero-secondary,
a.btn-hero-secondary:visited {
    color: #fff;
}

/* ===== Section Header ===== */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    border-bottom: 2px solid var(--color-primary);
    padding-bottom: 0.5rem;
    margin-bottom: 1.25rem;
}

.section-header h3 {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--color-text);
    margin: 0;
}

/* ===== Main Content Wrapper ===== */
.main-content {
    min-height: calc(100vh - 136px);
}

.main-content-no-nav {
    margin-top: -56px;
    padding-top: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-form-container,
.login-form-container form,
.login-form-container div:not(.alert):not(.alert *) {
    background: transparent !important;
    border: none;
    box-shadow: none;
}

.login-form-container .form-control {
    background: rgba(255, 255, 255, 0.75);
    border: 1px solid rgba(0, 0, 0, 0.15);
}

.login-form-container .alert-warning {
    background: #fff3cd !important;
    border: 1px solid #ffc107 !important;
    border-radius: var(--radius-md);
    color: #664d03;
    padding: 1rem 1.25rem;
    font-size: 0.9rem;
}

.login-form-container .alert-warning .text-wrap {
    background: transparent !important;
    color: #664d03;
    font-size: 0.85rem;
    margin-top: 0.25rem;
}

/* ===== Workflow Catalog ===== */
.workflow-card {
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    background: var(--color-card-bg);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    width: auto;
    height: 100%;
}

.workflow-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--color-primary);
}

.workflow-card .card-title {
    font-weight: 600;
    font-size: 1.05rem;
    color: var(--color-text);
}

.workflow-card .card-text {
    font-size: 0.88rem;
    color: var(--color-text-secondary);
}

.workflow-card .badge {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.badge-provisioning {
    background-color: var(--color-primary);
    color: #fff;
}

.badge-observability {
    background-color: var(--color-accent-light);
    color: #fff;
}

.badge-extensions {
    background-color: var(--color-navbar);
    color: #fff;
}

/* Template enable form: field labels, helper text and section headings.
   The rest of enable.html still carries inline styles predating the
   tokens-only rule; these classes cover the fields added with the Jamf
   Pro registration work so no new inline styles ship. */
.enable-field-label {
    font-weight: 500;
}

.enable-field-hint {
    color: var(--color-text-muted);
    font-size: 0.82rem;
}

.enable-section-heading {
    font-weight: 600;
    font-size: 0.92rem;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

.workflow-detail-sidebar {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
}

.workflow-detail-sidebar dt {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--color-text-muted);
    margin-top: 1rem;
}

.workflow-detail-sidebar dd {
    font-size: 0.88rem;
    color: var(--color-text);
}

.filter-btn {
    border: 1px solid var(--color-border);
    border-radius: var(--radius-pill);
    padding: 0.3rem 0.9rem;
    font-size: 0.82rem;
    font-weight: 500;
    background: var(--color-card-bg);
    color: var(--color-text-secondary);
    cursor: pointer;
    transition: all 0.15s ease;
    text-decoration: none;
    display: inline-block;
}

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

.filter-btn:visited {
    color: var(--color-text-secondary);
}

.filter-btn:visited:hover,
.filter-btn:visited.active {
    color: #fff;
}

/* ===== Navbar Search ===== */
.search-input {
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-pill);
    color: #fff;
    font-size: 0.85rem;
    padding: 0.3rem 0.75rem;
    width: 220px;
    transition: width 0.3s ease, border-color 0.2s ease, background 0.2s ease;
}

.search-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.search-input:focus {
    width: 300px;
    outline: none;
    border-color: var(--color-accent);
    background: rgba(255, 255, 255, 0.18);
    box-shadow: 0 0 0 2px rgba(215, 167, 115, 0.3);
}

.search-dropdown {
    position: fixed;
    top: 56px;
    right: 1rem;
    width: 380px;
    max-height: 400px;
    overflow-y: auto;
    background: var(--color-card-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    z-index: 10000;
    display: none;
}

.search-result-item,
.search-result-item:visited {
    display: block;
    padding: 0.5rem 0.75rem;
    font-size: 0.85rem;
    color: var(--color-text);
    text-decoration: none;
    border-bottom: 1px solid var(--color-surface-raised);
    transition: background 0.1s ease;
}

.search-result-item:hover {
    background: var(--color-surface);
    color: var(--color-text);
}

.search-result-title {
    padding: 0.4rem 0.75rem;
    font-weight: 600;
    font-size: 0.88rem;
    border-bottom: 1px solid var(--color-border);
}

/* ===== Navbar Extras Dropdown ===== */
.navbar .dropdown-menu {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    padding: 0.25rem 0;
    min-width: 180px;
}

.navbar .dropdown-menu .dropdown-item {
    color: var(--color-text);
    font-size: 0.88rem;
    padding: 0.4rem 1rem;
}

.navbar .dropdown-menu .dropdown-item:hover {
    background: var(--color-surface-hover);
    color: var(--color-text);
}

.navbar .dropdown-menu .dropdown-divider {
    border-color: var(--color-border);
}

/* ===== Session Timeout Warning ===== */
.session-countdown-seconds {
    display: inline-block;
    font-size: 2.5rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    color: var(--color-navbar);
    line-height: 1;
}

#sessionTimeoutModal .modal-content {
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-lg);
}

/* ===== Webhook Reference ===== */
.event-sidebar {
    position: sticky;
    top: 70px;
    max-height: calc(100vh - 90px);
    overflow-y: auto;
    padding: 0.75rem 1rem 2rem 0.5rem;
    background-color: var(--color-surface);
    border-right: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    scrollbar-width: thin;
    scrollbar-color: var(--color-border) transparent;
}

.event-sidebar::-webkit-scrollbar {
    width: 4px;
}

.event-sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.event-sidebar::-webkit-scrollbar-thumb {
    background: var(--color-border);
    border-radius: var(--radius-sm);
}

.event-sidebar h6 {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--color-text-secondary);
    margin: 1.25rem 0 0.5rem;
    padding-left: 12px;
}

.event-sidebar h6:first-child {
    margin-top: 0;
}

.event-link,
.event-link:visited {
    display: block;
    padding: 6px 12px;
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: var(--color-text-secondary);
    text-decoration: none;
    border-left: 3px solid transparent;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.event-link:hover {
    color: var(--color-primary);
    background: var(--color-surface-hover);
    text-decoration: none;
}

.event-link.active {
    color: var(--color-primary);
    font-weight: 600;
    border-left-color: var(--color-primary);
    background: var(--color-primary-light);
}

.schema-section {
    margin-bottom: 2rem;
}

.schema-caption {
    font-size: 0.85rem;
    color: var(--color-text-secondary);
    margin-bottom: 0.75rem;
}

.event-description {
    color: var(--color-text-secondary);
    font-style: italic;
    margin-bottom: 1.5rem;
}

.code-wrapper {
    position: relative;
}

.copy-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    padding: 3px 12px;
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.6);
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-sm);
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.2s ease, background-color 0.15s ease;
}

.code-wrapper:hover .copy-btn {
    opacity: 1;
}

.copy-btn:hover {
    color: rgba(255, 255, 255, 0.9);
    background: rgba(255, 255, 255, 0.15);
}

.copy-btn.copied {
    color: var(--color-accent);
    border-color: var(--color-accent);
}

/* Keyboard focus both reveals the button (it is opacity 0 until the
   wrapper is hovered) and rings it. */
.copy-btn:focus-visible {
    opacity: 1;
    outline: none;
    box-shadow: 0 0 0 3px rgba(60, 106, 167, 0.35);
}

/* ===== Empty States ===== */
.empty-state {
    max-width: 800px;
    margin: 1rem auto;
    padding: 2rem;
    text-align: center;
    background: var(--color-surface);
    border: 1px dashed var(--color-border);
    border-radius: var(--radius-lg);
}

.empty-state-icon {
    display: block;
    margin: 0 auto 0.75rem;
    color: var(--color-text-secondary);
}

.empty-state-message {
    margin: 0 0 1rem;
    font-size: 0.95rem;
    color: var(--color-text-secondary);
}

.start-here {
    max-width: 800px;
    margin: 1rem auto;
    padding: 2rem;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
}

.start-here h3 {
    margin: 0 0 0.5rem;
}

.start-here ul {
    margin: 0 0 1.25rem;
    padding-left: 1.25rem;
}

.start-here li {
    margin-bottom: 0.4rem;
}

/* Field group whose value comes from the selected saved credential set.
   Toggled by workflows/enable.html; the input is also disabled so the
   browser omits it from the submission. */
.is-hidden {
    display: none;
}

/* Template Configuration param label. Replaces a per-field inline style. */
.enable-param-label {
    font-weight: 500;
    font-size: 0.88rem;
}

/* ===== Copyable values ===== */
.detail-field {
    margin-bottom: 0.4rem;
}

.copy-field {
    margin-bottom: 0.6rem;
}

.copy-field-box {
    margin-top: 0.25rem;
    background: var(--color-surface-raised);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 0.5rem 5rem 0.5rem 0.75rem;
}

.copy-field-box code {
    display: block;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--color-text);
    white-space: pre-wrap;
    word-break: break-all;
}

.copy-field-box .copy-btn {
    color: var(--color-text);
    background: var(--color-surface);
    border-color: var(--color-border);
    font-size: 0.8rem;
    min-height: 28px;
}

.copy-field-box .copy-btn:hover {
    background: var(--color-surface-hover);
    color: var(--color-text);
}

.copy-field-box .copy-btn.copied {
    color: var(--color-primary);
    border-color: var(--color-primary);
}

/* No hover on touch screens, so the button is always visible there. */
@media (hover: none) {
    .copy-btn {
        opacity: 1;
    }
}

/* ===== Automation list rows ===== */
.automation-list {
    list-style: none;
    margin: 0 0 2rem;
    padding: 0;
}

.automation-row {
    margin-bottom: 0.5rem;
}

.automation-link {
    display: grid;
    grid-template-columns: 8.5rem minmax(0, 2fr) minmax(0, 1.5fr) auto;
    align-items: center;
    gap: 0.25rem 0.75rem;
    min-height: 44px;
    padding: 0.5rem 0.75rem;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    color: var(--color-text);
    text-decoration: none;
}

.automation-link:hover,
.automation-link:focus-visible {
    background: var(--color-surface-hover);
    color: var(--color-text);
    text-decoration: none;
}

.automation-type {
    justify-self: start;
}

.automation-main {
    display: flex;
    flex-direction: column;
    min-width: 0;
    text-align: left;
}

.automation-name {
    font-weight: 600;
    overflow-wrap: anywhere;
}

.automation-desc {
    color: var(--color-text-secondary);
    font-size: 0.85rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.automation-trigger {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--color-text-secondary);
    overflow-wrap: anywhere;
    text-align: left;
}

.automation-flags {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    font-size: 0.8rem;
    font-weight: 600;
}

@media (max-width: 767px) {
    .automation-link {
        grid-template-columns: minmax(0, 1fr);
        row-gap: var(--space-1);
        padding: var(--space-3);
    }

    .automation-flags {
        align-items: flex-start;
    }
}

/* ===== Automation detail ===== */
.script-details summary {
    cursor: pointer;
    font-weight: 600;
    padding: 0.4rem 0;
}

.script-details .script-preview pre {
    max-height: 60vh;
    overflow: auto;
    padding-right: 5rem;
}

/* Send sample event: the device the sample names, then the payload. */
.sample-device {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
    gap: 0.5rem 1rem;
    max-width: 48rem;
    margin: 0 0 0.5rem;
}

.sample-device legend {
    grid-column: 1 / -1;
    margin-bottom: 0;
}

.sample-device-udid {
    grid-column: 1 / -1;
}

.sample-device-jssID input,
.sample-device-serialNumber input,
.sample-device-udid input {
    font-family: var(--font-mono);
    font-size: 0.9rem;
}

.sample-device .form-label {
    font-size: 0.88rem;
    font-weight: 500;
    margin-bottom: 0.15rem;
}

.sample-payload {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    max-width: 48rem;
}

.script-note {
    color: var(--color-text-secondary);
    font-size: 0.85rem;
}

.run-table {
    width: 100%;
    font-size: 0.9rem;
}

.run-table th,
.run-table td {
    padding: 0.3rem 0.5rem;
    border-bottom: 1px solid var(--color-border);
    vertical-align: top;
    text-align: left;
}

.run-output {
    margin: 0;
    white-space: pre-wrap;
    word-break: break-word;
    font-family: var(--font-mono);
    font-size: 0.8rem;
}

.status-text {
    font-weight: 600;
    overflow-wrap: anywhere;
}

/* ===== Design pass: spacing, forms, dark mode ===== */

/* One gutter and one bottom margin for every page. */
.container,
.container-fluid {
    padding-left: var(--gutter);
    padding-right: var(--gutter);
}

.main-content {
    padding-bottom: var(--space-7);
}

.main-content-no-nav {
    padding-bottom: 0;
}

.hero-section {
    margin-bottom: var(--space-6);
}

.section-header {
    margin-top: var(--space-6);
    margin-bottom: var(--space-4);
}

.section-header:first-child {
    margin-top: 0;
}

.files-upload {
    margin-bottom: var(--space-5);
}

.files-upload .form-section {
    max-width: none;
}

.files-form,
form.files-form {
    margin-bottom: 0;
}

.log-container {
    padding: 0;
    margin-bottom: var(--space-4);
}

.page-sub-nav,
.container > .text-center.mb-4:not(.form-section) {
    row-gap: var(--space-2);
}

.container > .text-center.mb-4:not(.form-section) {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

/* Create / edit forms: left-aligned fields and labels. */
.form-card .text-center,
.form-card .d-flex.justify-content-center:not(.form-actions) {
    text-align: left !important;
    justify-content: flex-start !important;
}

.form-page-container .form-card h1 {
    text-align: left;
}

.form-page-container .form-card .form-control {
    margin-bottom: var(--space-4);
}

.form-card .form-control::placeholder {
    text-align: left;
}

.form-card select.form-control {
    padding-left: var(--space-3);
}

.form-card .form-actions {
    justify-content: flex-end;
}

.custom-file {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
    margin-bottom: var(--space-2);
}

.custom-file-label {
    order: -1;
    font-weight: 600;
    font-size: 0.9rem;
}

.custom-file-input {
    margin-bottom: 0 !important;
}

.field-hint {
    color: var(--color-text-secondary);
    font-size: 0.85rem;
}

.field-hint p {
    margin: 0 0 var(--space-4);
}

.auth-row {
    display: flex;
    margin-bottom: var(--space-2);
}

.auth-row label {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    margin: 0;
    cursor: pointer;
}

.auth-row input[type="checkbox"],
.auth-row input[type="radio"] {
    flex: none;
    margin: 0;
}

.auth-fields {
    width: 100%;
    margin: 0 0 var(--space-3) var(--space-5);
}

.auth-fields > div {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
}

.auth-fields input {
    flex: 1 1 200px;
    min-width: 0;
    width: 100%;
    padding: 0.4rem 0.75rem !important;
    background: var(--color-input-bg);
    color: var(--color-text);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
}

.auth-fields.is-hidden,
.auth-fields.is-hidden * {
    display: none;
}

.form-card .auth-row ~ .auth-row {
    margin-top: var(--space-1);
}

.form-card .alert-danger {
    margin-bottom: var(--space-4);
}

/* Bare form controls and detail rows. */
.form-section {
    padding: var(--space-5);
}

.detail-field {
    margin-bottom: var(--space-2);
    overflow-wrap: anywhere;
}

.form-section .action-row,
.form-section .text-center.mt-3 {
    margin-top: var(--space-5) !important;
}

@media (max-width: 575px) {
    .hero-section {
        padding: var(--space-6) 0;
    }

    .form-card {
        padding: var(--space-5) !important;
    }

    .form-section {
        padding: var(--space-4);
    }

    .hero-cta .btn {
        padding-left: var(--space-4);
        padding-right: var(--space-4);
    }

    /* Reference tables: stack each row instead of clipping the text. */
    .schema-section .hippocrates thead {
        display: none;
    }

    .schema-section .hippocrates,
    .schema-section .hippocrates tbody,
    .schema-section .hippocrates tr,
    .schema-section .hippocrates td {
        display: block;
        width: 100%;
    }

    .schema-section .hippocrates tr {
        padding: var(--space-3) 0;
        border-bottom: 1px solid var(--color-border);
    }

    .schema-section .hippocrates td {
        border: none;
        padding: var(--space-1) var(--space-3);
    }
}

.btn-form-cancel,
a.btn-form-cancel:visited {
    color: var(--color-text);
}

@media (max-width: 575px) {
    .form-card .form-actions > * {
        flex: 1 1 auto;
        text-align: center;
    }
}

.btn + .script-note {
    margin-left: var(--space-2);
}

.log-container {
    max-width: calc(1400px - 2 * var(--gutter));
    margin-left: auto;
    margin-right: auto;
}

.section-link {
    font-size: 0.85rem;
}

/* Page title and back link on pages without a hero banner. */
.page-title {
    text-align: left;
    font-size: 1.8rem;
    font-weight: 700;
    letter-spacing: -1px;
    margin: var(--space-2) 0 var(--space-2);
}

.back-link {
    display: inline-block;
    font-size: 0.88rem;
    margin-bottom: var(--space-2);
}

/* ===== Dark mode ===== */
/* ===== Page layout (J41) ===== */
/* Hero band: title and subtitle on the left, buttons on the right. Every
   page uses this compact band (J41); the older 3rem hero rules above are
   overridden here. */
/* The fixed nav is ~72px tall but body padding reserves 56px, so the
   top padding carries the extra 16px. */
.hero-section {
    padding: var(--space-6) 0 var(--space-4);
    margin-bottom: var(--space-5);
}

.hero-section .container {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: "title cta" "sub cta";
    column-gap: var(--space-5);
    align-items: center;
}

.hero-section h2 {
    grid-area: title;
    font-size: 1.5rem;
    letter-spacing: -0.5px;
    margin: 0;
}

.hero-section p {
    grid-area: sub;
    font-size: 0.95rem;
}

.hero-section .hero-cta {
    grid-area: cta;
    margin-top: 0;
}

.hero-section .hero-cta .btn {
    padding: 0.4rem 1.1rem;
}

@media (max-width: 767px) {
    .hero-section {
        padding: var(--space-5) 0 var(--space-4);
    }

    .hero-section .container {
        grid-template-columns: minmax(0, 1fr);
        grid-template-areas: "title" "sub" "cta";
    }

    .hero-section h2 {
        font-size: 1.35rem;
    }

    .hero-section .hero-cta {
        margin-top: var(--space-3);
        gap: var(--space-2);
    }

    .hero-section .hero-cta .btn {
        padding: 0.35rem 0.9rem;
        font-size: 0.9rem;
    }
}

/* A tool page (the log) is exactly the window height: the nav, hero and
   footer stay put and only its panel scrolls. */
body.page-fill {
    height: 100vh;
    height: 100dvh;
    min-height: 0;
    overflow: hidden;
}

.page-fill .main-content {
    min-height: 0;
    padding-bottom: var(--space-4);
    display: flex;
    flex-direction: column;
}

.page-fill .log-page,
.page-fill .log-container,
.page-fill .log-view {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

.page-fill .log-page {
    width: 100%;
}

.page-fill .main-content > .hero-section {
    flex-shrink: 0;
}

.page-fill .log-container {
    margin-bottom: 0;
}

.page-fill .log-frame {
    flex: 1 1 auto;
    min-height: 0;
    max-height: none;
}

/* Sign-in: the icon shrinks with the window height so the form, any
   error message and the footer fit on one screen. */
.login-icon {
    max-height: min(310px, 27vh);
    width: auto;
}

@media (prefers-color-scheme: dark) {
    :root {
        --color-text: #f3e8dc;
        --color-text-secondary: #cdb9a5;
        --color-text-muted: #a8937e;
        --color-surface: #2b211d;
        --color-surface-raised: #33281f;
        --color-surface-hover: #3b2e26;
        --color-border: #4a3a30;
        --color-primary-light: #3a2c22;
        --color-link: #e6bd8f;
        --color-link-hover: #f3d3ae;
        --color-input-bg: #1f1814;
        --color-card-bg: #2b211d;
        --color-page: #1d1512;
        --color-code-bg: #140e0b;
        --color-code-text: #f0e4d6;
        --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
        --shadow-md: 0 6px 18px rgba(0, 0, 0, 0.35);
    }

    .jawa-bg {
        /* Desert night: the light mode's sand bands after sunset. */
        background-image: linear-gradient(to bottom, #2a1d18, #251a15, #211713, #1d1512, #1b1310, #1b1310, #1d1512, #211713, #251a15);
    }

    .hippocrates th {
        background-color: #5a2a2b;
    }

    .hippocrates tr:hover {
        background-color: var(--color-surface-hover);
    }

    .form-control,
    .form-select,
    .login-form-container .form-control {
        background-color: var(--color-input-bg);
        color: var(--color-text);
        border-color: var(--color-border);
    }

    .form-control:focus,
    .form-select:focus {
        background-color: var(--color-input-bg);
        color: var(--color-text);
    }

    .form-control::placeholder {
        color: var(--color-text-muted);
    }

    .form-control:disabled,
    .form-control[readonly] {
        background-color: var(--color-surface-raised);
    }

    .form-control::file-selector-button {
        background-color: var(--color-surface-hover);
        color: var(--color-text);
    }

    .form-check-input {
        background-color: var(--color-input-bg);
        border-color: var(--color-text-muted);
    }

    .form-check-input:checked {
        background-color: #4a78b5;
        border-color: #4a78b5;
    }

    .text-muted,
    .form-text {
        color: var(--color-text-secondary) !important;
    }

    .btn-jawa,
    .btn-form-primary {
        background-color: #3f6ba6;
        border-color: #3f6ba6;
    }

    .btn-jawa:hover {
        background-color: #4a78b5;
        border-color: #4a78b5;
    }

    .btn-jawa:disabled {
        background-color: #3f6ba6;
        border-color: #3f6ba6;
    }

    .form-card,
    .form-section,
    .card,
    .modal-content,
    .copy-field-box {
        color: var(--color-text);
    }

    .card,
    .modal-content {
        background-color: var(--color-card-bg);
    }

    .form-page-container .form-card h1,
    .section-header h3,
    .workflow-card .card-title,
    .session-countdown-seconds {
        color: var(--color-text);
    }

    .session-countdown-seconds {
        color: var(--color-accent);
    }

    .alert-warning {
        background-color: #3a2c18;
        border-color: #7a5a2e;
        color: #f5e2bf;
    }

    /* The sign-in warning forces a pale fill in light mode; give it a dark
       fill here so its heading and message stay readable. */
    .login-form-container .alert-warning {
        background: #3a2c18 !important;
        border-color: #7a5a2e !important;
        color: #f5e2bf;
    }

    .login-form-container .alert-warning .text-wrap {
        color: #f5e2bf;
    }

    .alert-danger {
        background-color: #3a1f22;
        border-color: #6b3338;
        color: #ffd9d4;
    }

    .alert-info {
        background-color: #27313b;
        border-color: #435468;
        color: #dce6f0;
    }

    .error-msg {
        color: #ffb4aa;
    }

    code,
    .lead code {
        color: #f0b48a;
    }

    .copy-field-box code {
        color: var(--color-text);
    }

    .badge-observability {
        background-color: #8a6a43;
    }

    .alert-secondary,
    .pre-scrollable {
        background-color: var(--color-surface-raised);
        color: var(--color-text);
        border-color: var(--color-border);
    }

    .dropdown-menu .dropdown-item {
        color: var(--color-text);
    }

    .event-link.active {
        color: var(--color-link);
    }

    .event-link:hover {
        color: var(--color-link);
    }

    .page-sub-nav a:hover,
    .page-sub-nav a.active,
    .filter-btn:hover,
    .filter-btn.active {
        background: #3f6ba6;
        border-color: #3f6ba6;
    }

    hr {
        border-color: var(--color-border);
        opacity: 1;
    }

    .modal-content .btn-close {
        filter: invert(1);
    }

    /* Desert night accents: sand-gold rules and focus rings; blue stays
       the action colour on buttons. */
    .section-header {
        border-bottom-color: var(--color-accent);
    }

    .form-control:focus,
    .form-select:focus {
        border-color: var(--color-accent);
        box-shadow: 0 0 0 3px rgba(215, 167, 115, 0.2);
    }

    .card,
    .modal-content {
        box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03), var(--shadow-md);
    }

    .list-group-item {
        background-color: var(--color-card-bg);
        color: var(--color-text);
    }

    .list-group-item-action:hover,
    .list-group-item-action:focus {
        background-color: var(--color-surface-hover);
        color: var(--color-text);
    }
}
