/* ============================================================
   DarkHorse App Shell
   Styles for all pages extending master.html.
   Extracted from the inline <style> block + enterprise
   component library. dark-mode.css handles theme variables
   and dark-theme overrides; this file handles structure.
   ============================================================ */

/* ============================================================
   Fonts — Poppins only for the app shell
   (RadioGrotesk, Charlevoix, StarkSans are marketing-only)
   ============================================================ */
@font-face {
    font-family: 'Poppins-Regular';
    src: url("../fonts/Poppins-Regular.093ee89be9ed.ttf") format('truetype');
    font-weight: 400;
    font-display: swap;
}

@font-face {
    font-family: 'Poppins-SemiBold';
    src: url("../fonts/Poppins-SemiBold.6f1520d10720.ttf") format('truetype');
    font-weight: 600;
    font-display: swap;
}

@font-face {
    font-family: 'Poppins-Bold';
    src: url("../fonts/Poppins-Bold.08c20a487911.ttf") format('truetype');
    font-weight: 700;
    font-display: swap;
}

/* ============================================================
   Layout Tokens (supplement dark-mode.css)
   ============================================================ */
:root {
    /* Spacing scale */
    --space-xs:  4px;
    --space-sm:  8px;
    --space-md:  16px;
    --space-lg:  24px;
    --space-xl:  32px;
    --space-2xl: 48px;

    /* Layout */
    --app-max-width: 1280px;
    --app-nav-height: 56px;

    /* Radius */
    --radius-sm:   4px;
    --radius-md:   6px;
    --radius-lg:   10px;
    --radius-pill: 9999px;

    /* Font sizes (controlled by user preference in master.html) */
    --font-scale: 1.0;
    --fs-xs:   calc(10px * var(--font-scale));
    --fs-sm:   calc(12px * var(--font-scale));
    --fs-md:   calc(13px * var(--font-scale));
    --fs-base: calc(14px * var(--font-scale));
    --fs-lg:   calc(18px * var(--font-scale));
    --fs-xl:   calc(22px * var(--font-scale));
    --fs-2xl:  calc(32px * var(--font-scale));
    --fs-3xl:  calc(42px * var(--font-scale));

    /* Legacy color vars (light mode defaults; dark-mode.css remaps in dark) */
    --primary-color:    #111827;
    --header-color:     #6b7280;
    --header2-color:    #6b7280;
    --secondary-color:  #f9fafb;
    --tiertiary-color:  #41b5ff;
    --mouseover-color1: #bfc1c4;
    --mouseover-color2: #375656;
}

/* ============================================================
   Base Reset
   ============================================================ */
*, *::before, *::after {
    box-sizing: border-box;
}

body {
    font-family: 'Poppins-Regular', sans-serif !important;
    margin: 0;
    padding: 0;
    text-align: left;
    min-height: 100vh;
    color: var(--text-primary, var(--primary-color));
    font-size: var(--fs-base);
    background-color: var(--bg-primary, var(--secondary-color));
}

/* ============================================================
   Typography
   ============================================================ */
h1, h2, h3, h4, h5, h6, b,
div.title, div.ui.header, div.header {
    font-family: 'Poppins-SemiBold', sans-serif !important;
    color: var(--text-primary, var(--primary-color));
}

button, a {
    font-family: 'Poppins-SemiBold', sans-serif !important;
    color: var(--text-primary, var(--primary-color));
}

h1 {
    font-size: var(--fs-3xl);
    color: var(--text-primary, var(--header-color));
}

h2 {
    font-size: var(--fs-2xl);
    color: var(--text-primary, var(--header-color));
}

h3, h4 {
    color: var(--text-primary, var(--header2-color));
}

input, select, span, textarea, p,
.item div.content, div.ui.input {
    font-family: 'Poppins-Regular', sans-serif !important;
    color: var(--text-primary, var(--primary-color));
}

a:hover {
    color: var(--accent, var(--tiertiary-color));
}

/* ============================================================
   Layout Wrappers
   ============================================================ */

/* Replaces the old .container { width: 55% } — now full-width up to max */
.container {
    max-width: var(--app-max-width);
    width: 95%;
    margin: 0 auto;
}

.container-main {
    max-width: var(--app-max-width);
    width: 95%;
    margin: 0 auto;
}

.container-text {
    max-width: 820px;
    width: 95%;
    margin: 0 auto;
}

/* Preferred wrapper for app pages */
.dh-app-main {
    max-width: var(--app-max-width);
    margin: 0 auto;
    padding: 0 var(--space-lg);
    padding-top: var(--space-sm) !important;
    width: 100%;
}

/* Explicit centering utility — use sparingly */
.dh-centered {
    text-align: center;
}

/* ============================================================
   Navigation — Enterprise Top Bar
   ============================================================ */
header.header {
    min-height: var(--app-nav-height);
    padding: 0 var(--space-lg);
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--space-sm);
    border-bottom: 1px solid var(--border-color, #e5e7eb);
    background-color: var(--bg-secondary, var(--secondary-color));
    position: sticky;
    top: 0;
    z-index: 200;
    box-shadow: var(--shadow-sm, 0 1px 2px rgba(0,0,0,.05));
}

/* Logo group */
.dh-nav-logo {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    text-decoration: none !important;
    flex-shrink: 0;
    margin-right: auto;
}

.header-image {
    width: 36px;
    height: 36px;
    object-fit: contain;
}

.dh-nav-brand {
    font-family: 'Poppins-SemiBold', sans-serif !important;
    font-size: var(--fs-lg) !important;
    color: var(--text-primary, var(--primary-color)) !important;
    text-decoration: none;
    line-height: 1;
    display: flex;
    align-items: baseline;
    gap: 4px;
}

#superscriptText {
    font-size: 8px !important;
    color: var(--text-muted, var(--header-color));
    font-family: 'Poppins-Regular', sans-serif !important;
    letter-spacing: 0.03em;
    font-weight: 400;
}

/* Nav menu container */
#masterMenu {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    flex-wrap: wrap;
}

/* Enterprise nav button — replaces all the inline-style buttons */
.dh-nav-btn {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    height: 32px;
    padding: 0 var(--space-sm);
    border: 1px solid var(--border-color, #e5e7eb);
    border-radius: var(--radius-sm);
    background-color: transparent;
    color: var(--text-primary, var(--primary-color)) !important;
    font-family: 'Poppins-Regular', sans-serif !important;
    font-size: var(--fs-sm) !important;
    text-decoration: none !important;
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
    white-space: nowrap;
    line-height: 1;
}

.dh-nav-btn:hover {
    background-color: var(--text-primary, var(--primary-color)) !important;
    color: var(--bg-primary, var(--secondary-color)) !important;
    border-color: var(--text-primary, var(--primary-color)) !important;
}

/* Theme toggle button */
button.theme-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: 1px solid var(--border-color, #e5e7eb);
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--text-primary, var(--primary-color));
    cursor: pointer;
    padding: 0;
    transition: background-color 0.15s ease;
    flex-shrink: 0;
}

button.theme-toggle:hover {
    background-color: var(--bg-tertiary, #f3f4f6);
}

/* ============================================================
   Enterprise Component: Page Header (.dh-page-header)
   ============================================================ */
.dh-page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: var(--space-md) 0 var(--space-sm) 0;
    margin-bottom: var(--space-md);
    gap: var(--space-md);
}

.dh-page-header__left {
    flex: 1;
    min-width: 0;
}

.dh-page-header__title {
    font-family: 'Poppins-SemiBold', sans-serif !important;
    font-size: var(--fs-xl);
    color: var(--text-primary);
    margin: 0 0 var(--space-xs) 0;
    line-height: 1.2;
}

.dh-page-header__subtitle {
    font-size: var(--fs-sm);
    color: var(--text-secondary, var(--header-color));
    margin: 0;
}

.dh-page-header__actions {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    flex-shrink: 0;
    padding-top: 0;
}

/* Auth page shell */
.dh-auth-shell {
    max-width: 860px;
    margin: var(--space-lg) auto;
    padding: 0 var(--space-md);
}

.dh-auth-title {
    margin: 0 0 var(--space-md);
    text-align: center;
    color: var(--text-primary);
}

.dh-auth-form {
    width: fit-content;
    max-width: 100%;
    margin: 0 auto;
    text-align: right;
}


.dh-auth-alert {
    width: min(100%, 640px) !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

.dh-auth-copy {
    margin: 0 auto var(--space-sm);
    max-width: 720px;
}

.dh-auth-error-list {
    margin: 0 auto var(--space-md);
    max-width: 720px;
    text-align: left;
}

/* Full-width toolbar row used on dashboard/list pages */
.dh-toolbar-row {
    display: grid;
    grid-template-columns: auto minmax(260px, 1fr) minmax(170px, 210px) minmax(170px, 190px);
    gap: var(--space-sm);
    align-items: center;
    margin-bottom: var(--space-lg);
}

.dh-toolbar-search {
    width: 100%;
}

.dh-toolbar-select {
    width: 100%;
}

.dh-toolbar-toggle {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    min-height: 32px;
    padding: 0 2px;
    white-space: nowrap;
}

.dh-toolbar-toggle input[type="checkbox"] {
    margin: 0 !important;
}

.dh-toolbar-toggle span {
    font-size: var(--fs-xs);
    color: var(--text-secondary, var(--header-color));
}

.dh-create-dropdown {
    width: 100%;
    display: inline-flex !important;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    background-color: var(--accent, #41b5ff) !important;
    color: #ffffff !important;
    border: 1px solid var(--accent, #41b5ff) !important;
}

.dh-create-dropdown > .dropdown.icon {
    position: static !important;
    margin: 0 !important;
    line-height: 1 !important;
    opacity: 1 !important;
}

.dh-create-dropdown .dropdown.icon {
    color: inherit !important;
    opacity: 1 !important;
}

.dh-create-dropdown:hover {
    background-color: var(--accent-hover, #2196f3) !important;
    border-color: var(--accent-hover, #2196f3) !important;
    filter: none;
}

.dh-create-dropdown .menu {
    min-width: 220px !important;
    max-width: 260px !important;
    background-color: var(--bg-secondary, #ffffff) !important;
    border: 1px solid var(--border-color, #e5e7eb) !important;
    border-radius: var(--radius-md) !important;
    z-index: 1200 !important;
    overflow: hidden;
    box-shadow: 0 12px 28px -16px rgba(2, 8, 23, 0.45) !important;
}

.dh-create-dropdown .menu > .item {
    color: var(--text-primary, var(--primary-color)) !important;
    display: flex;
    align-items: center;
    gap: 8px;
    background-color: var(--bg-secondary, #ffffff) !important;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.dh-create-dropdown .menu > .item > i.icon {
    color: var(--text-secondary, var(--header-color)) !important;
    opacity: 1 !important;
}

.dh-create-dropdown .menu > .item:hover {
    background-color: #eef6ff !important;
    color: var(--accent-hover, #2196f3) !important;
}

.dh-create-dropdown .menu > .item:hover > i.icon {
    color: inherit !important;
}

.dh-global-alert {
    margin-top: var(--space-md) !important;
    margin-bottom: var(--space-lg);
    border-radius: var(--radius-md) !important;
}

.dh-global-alert.ui.nag {
    /* Keep the email-confirmation notice in normal flow under sticky nav */
    position: relative !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    margin-top: var(--space-sm) !important;
}

.dh-main-content {
    padding-top: var(--space-xs);
}

.dh-sidebar-logo-wrap {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: var(--space-sm);
}

.dh-sidebar-logo {
    width: 56px;
    height: 56px;
    object-fit: contain;
}

.dh-sidebar-logo-wrap--engagement {
    padding: var(--space-xs);
    border: 1px solid var(--border-color, #e5e7eb);
    border-radius: var(--radius-sm);
    background: var(--bg-primary, #f8fafc);
    margin-bottom: var(--space-md);
}

.dh-sidebar-logo--engagement {
    width: 100%;
    max-width: 140px;
    height: auto;
    max-height: 84px;
}

/* ============================================================
   Enterprise Component: Card (.dh-card)
   ============================================================ */
.dh-card {
    background: var(--bg-secondary, var(--secondary-color));
    border: 1px solid var(--border-color, #e5e7eb);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm, 0 1px 2px rgba(0,0,0,.05));
    padding: var(--space-md);
    transition: box-shadow 0.15s ease;
}

.dh-card--elevated {
    box-shadow: var(--shadow-md, 0 4px 6px rgba(0,0,0,.08));
}

.dh-card__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-md);
    padding-bottom: var(--space-sm);
    border-bottom: 1px solid var(--border-color, #e5e7eb);
}

.dh-card__title {
    font-family: 'Poppins-SemiBold', sans-serif !important;
    font-size: var(--fs-base);
    color: var(--text-primary);
    margin: 0;
}

/* ============================================================
   Enterprise Component: Status Badges (.dh-badge)
   ============================================================ */
.dh-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px var(--space-sm);
    border-radius: var(--radius-pill);
    font-family: 'Poppins-SemiBold', sans-serif !important;
    font-size: var(--fs-xs);
    font-weight: 600;
    line-height: 1.6;
    white-space: nowrap;
    border: 1px solid transparent;
}

.dh-badge--critical {
    background-color: rgba(248, 113, 113, 0.12);
    color: #dc2626;
    border-color: rgba(220, 38, 38, 0.25);
}

.dh-badge--high {
    background-color: rgba(249, 115, 22, 0.12);
    color: #ea580c;
    border-color: rgba(234, 88, 12, 0.25);
}

.dh-badge--medium {
    background-color: rgba(245, 158, 11, 0.12);
    color: #d97706;
    border-color: rgba(217, 119, 6, 0.25);
}

.dh-badge--low {
    background-color: rgba(16, 185, 129, 0.12);
    color: #059669;
    border-color: rgba(5, 150, 105, 0.25);
}

.dh-badge--info {
    background-color: rgba(59, 130, 246, 0.12);
    color: #2563eb;
    border-color: rgba(37, 99, 235, 0.25);
}

.dh-badge--live,
.dh-badge--active {
    background-color: rgba(16, 185, 129, 0.12);
    color: #059669;
    border-color: rgba(5, 150, 105, 0.25);
}

.dh-badge--pending,
.dh-badge--scheduled {
    background-color: rgba(245, 158, 11, 0.12);
    color: #d97706;
    border-color: rgba(217, 119, 6, 0.25);
}

.dh-badge--neutral,
.dh-badge--closed,
.dh-badge--archived {
    background-color: var(--bg-tertiary, #f3f4f6);
    color: var(--text-muted, #9ca3af);
    border-color: var(--border-color-light, #f3f4f6);
}

/* Dark mode badge adjustments — badges use semitransparent bg, work in both modes */
[data-theme="dark"] .dh-badge--critical { color: #f87171; border-color: rgba(248, 113, 113, 0.35); }
[data-theme="dark"] .dh-badge--high     { color: #fb923c; border-color: rgba(251, 146, 60, 0.35); }
[data-theme="dark"] .dh-badge--medium   { color: #fbbf24; border-color: rgba(251, 191, 36, 0.35); }
[data-theme="dark"] .dh-badge--low      { color: #34d399; border-color: rgba(52, 211, 153, 0.35); }
[data-theme="dark"] .dh-badge--info     { color: #60a5fa; border-color: rgba(96, 165, 250, 0.35); }
[data-theme="dark"] .dh-badge--live,
[data-theme="dark"] .dh-badge--active   { color: #34d399; border-color: rgba(52, 211, 153, 0.35); }
[data-theme="dark"] .dh-badge--pending,
[data-theme="dark"] .dh-badge--scheduled { color: #fbbf24; border-color: rgba(251, 191, 36, 0.35); }
[data-theme="dark"] .dh-badge--neutral,
[data-theme="dark"] .dh-badge--closed,
[data-theme="dark"] .dh-badge--archived { background-color: var(--bg-tertiary); color: var(--text-muted); border-color: var(--border-color-light); }

/* ============================================================
   Enterprise Component: Table (.dh-table)
   ============================================================ */
.dh-table {
    width: 100%;
    border-collapse: collapse;
    font-size: var(--fs-sm);
}

.dh-table thead th {
    background-color: var(--bg-tertiary, #f3f4f6);
    color: var(--text-secondary, var(--header-color));
    font-family: 'Poppins-SemiBold', sans-serif !important;
    font-size: var(--fs-xs);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: var(--space-sm) var(--space-md);
    border-bottom: 1px solid var(--border-color, #e5e7eb);
    text-align: left;
    white-space: nowrap;
}

.dh-table tbody tr {
    border-bottom: 1px solid var(--border-color-light, #f3f4f6);
    transition: background-color 0.1s ease;
}

.dh-table tbody tr:hover {
    background-color: var(--accent-bg, rgba(65, 181, 255, 0.06));
}

.dh-table tbody td {
    padding: var(--space-sm) var(--space-md);
    color: var(--text-primary, var(--primary-color));
    vertical-align: middle;
}

.dh-table tbody tr:last-child {
    border-bottom: none;
}

/* ============================================================
   Enterprise Component: Stat Cards
   ============================================================ */
.dh-stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: var(--space-md);
    margin-bottom: var(--space-lg);
}

.dh-stat-card {
    background: var(--bg-secondary, var(--secondary-color));
    border: 1px solid var(--border-color, #e5e7eb);
    border-radius: var(--radius-md);
    padding: var(--space-md);
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.dh-stat-card__value {
    font-family: 'Poppins-SemiBold', sans-serif !important;
    font-size: var(--fs-2xl);
    color: var(--text-primary);
    line-height: 1;
}

.dh-stat-card__label {
    font-size: var(--fs-xs);
    color: var(--text-secondary, var(--header-color));
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ============================================================
   Enterprise Component: Sidebar Layout (.dh-layout)
   ============================================================ */
.dh-layout {
    display: flex;
    gap: var(--space-lg);
    align-items: flex-start;
    padding: var(--space-md) 0;
}

.dh-layout__sidebar {
    flex: 0 0 240px;
    min-width: 200px;
}

.dh-layout__main {
    flex: 1;
    min-width: 0;
}

.dh-layout__sidebar--wide {
    flex: 0 0 300px;
    min-width: 240px;
}

/* Sticky sidebar */
.dh-sidebar-sticky {
    position: sticky;
    top: calc(var(--app-nav-height) + var(--space-lg));
}

/* ============================================================
   Enterprise Component: Quick Links sidebar nav
   ============================================================ */
.dh-quicklinks {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: var(--space-sm) 0;
}

.dh-quicklinks__title {
    font-family: 'Poppins-SemiBold', sans-serif !important;
    font-size: var(--fs-xs);
    color: var(--text-muted, var(--header-color));
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: var(--space-xs) var(--space-sm);
    margin-bottom: var(--space-xs);
}

.dh-quicklinks a {
    font-size: var(--fs-sm);
    color: var(--text-secondary, var(--header-color)) !important;
    text-decoration: none !important;
    padding: var(--space-xs) var(--space-sm);
    border-radius: var(--radius-sm);
    transition: background-color 0.1s ease, color 0.1s ease;
    display: block;
}

.dh-quicklinks a:hover {
    background-color: var(--accent-bg, rgba(65, 181, 255, 0.08));
    color: var(--accent, var(--tiertiary-color)) !important;
}

/* ============================================================
   Enterprise Component: Wizard Modal (.dh-wizard-modal)
   ============================================================ */
.dh-wizard-modal {
    border-radius: var(--radius-lg) !important;
    overflow: hidden;
}

.dh-wizard-modal .content {
    padding: 0 !important;
}

.dh-wizard-header {
    position: sticky;
    top: 0;
    z-index: 99999;
    background-color: var(--bg-secondary, var(--secondary-color));
    padding: var(--space-md) var(--space-lg);
    border-bottom: 1px solid var(--border-color, #e5e7eb);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.dh-wizard-header__title {
    font-family: 'Poppins-SemiBold', sans-serif !important;
    font-size: var(--fs-base);
    color: var(--text-primary);
    margin: 0;
    flex: 1;
    line-height: 1.3;
}

.dh-wizard-header__actions {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    flex-shrink: 0;
}

.dh-wizard-header__icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.1s ease, color 0.1s ease;
}

.dh-wizard-header__icon-btn:hover {
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
}

.dh-wizard-progress {
    padding: var(--space-sm) var(--space-lg) 0;
    background-color: var(--bg-secondary, var(--secondary-color));
}

.dh-wizard-body {
    padding: var(--space-lg);
}

.dh-wizard-body .step-description {
    font-size: var(--fs-sm);
    color: var(--text-secondary);
    margin-bottom: var(--space-lg);
}

.dh-wizard-actions {
    display: flex;
    justify-content: center;
    gap: var(--space-sm);
    padding: var(--space-md) var(--space-lg);
    border-top: 1px solid var(--border-color, #e5e7eb);
    margin-top: var(--space-md);
    background-color: var(--bg-tertiary, #f9fafb);
}

/* Modal sizing */
.modal,
.dh-wizard-modal {
    left: auto;
    min-width: 560px;
    max-width: 560px;
    margin: auto;
    position: absolute;
    min-height: 580px;
    max-height: 580px;
    top: 10%;
    background-color: var(--bg-secondary, var(--secondary-color));
    border: 1px solid var(--border-color, var(--primary-color));
}

.ui.modal {
    background: var(--bg-secondary, var(--secondary-color));
    border-radius: var(--radius-lg) !important;
}

.ui.modal > .content {
    font-size: var(--fs-md);
    background-color: var(--bg-secondary, var(--secondary-color));
}

.modals.dimmer .ui.scrolling.modal:not(.fullscreen) {
    background-color: var(--bg-secondary, var(--secondary-color));
    border: 1px solid var(--border-color, var(--primary-color));
}

.x {
    left: auto;
    min-width: 260px;
    max-width: 260px;
    margin: auto;
    position: absolute;
    max-height: 260px;
    min-height: 260px;
    top: 15%;
}

/* ============================================================
   Fomantic UI Overrides — enterprise polish
   ============================================================ */

/* Segments */
.ui.segment,
.ui.segments .segment {
    border-radius: var(--radius-md) !important;
    border-color: var(--border-color, #e5e7eb) !important;
    background-color: var(--bg-secondary, var(--secondary-color)) !important;
    font-size: var(--fs-md);
}

.ui.raised.segment {
    box-shadow: var(--shadow-md, 0 4px 6px rgba(0,0,0,.08)) !important;
}

/* Buttons */
.ui.button {
    font-family: 'Poppins-Regular', sans-serif !important;
    font-size: var(--fs-sm) !important;
    border-radius: var(--radius-sm) !important;
}

/* Form inputs */
.ui.form input:not([type]),
.ui.form input[type=color],
.ui.form input[type=date],
.ui.form input[type=datetime-local],
.ui.form input[type=email],
.ui.form input[type=file],
.ui.form input[type=month],
.ui.form input[type=number],
.ui.form input[type=password],
.ui.form input[type=search],
.ui.form input[type=tel],
.ui.form input[type=text],
.ui.form input[type=time],
.ui.form input[type=url],
.ui.form input[type=week] {
    font-size: var(--fs-md);
    border-radius: var(--radius-sm) !important;
}

.ui.form input[type=checkbox],
.ui.form textarea {
    font-size: var(--fs-sm);
}

.ui.comments .reply.form textarea {
    font-size: var(--fs-sm);
}

.ui.input {
    font-size: var(--fs-md);
}

/* Dropdowns */
.ui.dropdown,
.ui.dropdown .menu > .item {
    font-family: 'Poppins-Regular', sans-serif !important;
    font-size: var(--fs-sm) !important;
}

.ui.dropdown .menu {
    min-width: 350px !important;
    max-width: 400px !important;
    border-radius: var(--radius-md) !important;
}

.ui.dropdown .menu .item {
    white-space: normal !important;
    word-wrap: break-word !important;
}

.ui.dropdown .menu .item a,
.ui.dropdown .menu .menu .item a {
    white-space: normal !important;
    word-wrap: break-word !important;
    color: var(--text-primary, var(--primary-color)) !important;
}

.ui.dropdown .menu .item:hover {
    background-color: var(--accent-bg, rgba(65,181,255,.08)) !important;
}

.ui.dropdown .menu .item:hover > a,
.ui.dropdown .menu .item:hover > .menuItem {
    color: var(--accent, var(--tiertiary-color)) !important;
}

.ui.selection.dropdown {
    background-color: var(--bg-secondary, var(--secondary-color));
    border: 1px solid var(--border-color, var(--primary-color));
    border-radius: var(--radius-sm) !important;
}

.ui.selection.dropdown:hover {
    border: 1px solid var(--accent, var(--tiertiary-color));
}

.ui.dropdown > .text {
    color: var(--text-primary, var(--primary-color));
    font-size: var(--fs-md);
}

.ui.fluid.dropdown > .dropdown.icon,
.ui.selection.dropdown > .dropdown.icon,
.ui.selection.visible.dropdown > .text:not(.default) {
    color: var(--text-primary, var(--primary-color));
    font-size: var(--fs-sm);
}

/* Accordions */
.ui.accordion .accordion > .title,
.ui.accordion.menu .item > .title,
.ui.accordion > .title {
    color: var(--text-primary, var(--primary-color));
    font-size: var(--fs-base);
}

.ui.basic.styled.accordion > .title,
.ui.basic.styled.accordion > .title:hover,
.ui.basic.styled.accordion .active.title {
    color: var(--text-primary, var(--primary-color));
}

/* Tooltips */
[data-tooltip][data-variation~=small]::after,
[data-tooltip][data-variation~=small]::before {
    font-size: var(--fs-xs);
}

/* Comments */
.ui.comments .comment a.author { color: var(--text-primary, var(--primary-color)); }
.ui.comments .comment a.author:hover { color: var(--accent, var(--tiertiary-color)); }
.ui.comments .comment .metadata { color: var(--text-secondary, var(--primary-color)); }
.ui.comments .comment .actions a { color: var(--text-primary, var(--primary-color)); font-size: var(--fs-md); }
.ui.comments .comment .actions a:hover { color: var(--accent, var(--tiertiary-color)); }
.ui.comments .comment .text { color: var(--text-primary, var(--primary-color)); font-size: var(--fs-md); }

/* Flyouts */
.pushable > .pusher:not(.overflowing) {
    background-color: var(--bg-primary, var(--secondary-color));
}

.ui.flyout > .header,
.ui.flyout > .content {
    background-color: var(--bg-secondary, var(--secondary-color));
    color: var(--text-primary, var(--primary-color));
}

.ui.visible.overlay.flyout {
    background-color: var(--bg-secondary, var(--secondary-color));
}

i.icon.close::before {
    color: var(--text-primary, var(--primary-color));
}

/* Dividers */
.ui.divider {
    color: var(--text-secondary, var(--primary-color));
}

/* Labels */
.ui.basic.label.detailLabel {
    color: var(--text-primary, var(--primary-color));
    background-color: var(--bg-secondary, var(--secondary-color));
    border: solid 1px var(--border-color, var(--primary-color));
}

.ui.ribbon.label {
    background-color: var(--text-primary, var(--primary-color));
    border-color: var(--text-primary, var(--primary-color));
}

/* Cards */
.ui.card .meta { font-size: var(--fs-sm); }

.ui.card > .content > .header:not(.ui),
.ui.cards > .card > .content > .header:not(.ui) {
    font-size: var(--fs-xl);
}

/* Popup */
.ui.popup .content {
    text-align: left !important;
}

/* ============================================================
   Utility / Legacy Classes
   ============================================================ */

.fillButton {
    background-color: var(--text-primary, var(--primary-color));
    color: var(--bg-primary, var(--secondary-color));
    padding: 7px;
    border-radius: var(--radius-sm);
    cursor: pointer;
}

.menuItem {
    color: var(--text-primary, var(--primary-color));
    font-size: var(--fs-sm);
    font-family: 'Poppins-Regular', sans-serif !important;
}

.tooltip {
    color: var(--bg-primary, var(--secondary-color));
    background-color: var(--text-primary, var(--primary-color));
    font-size: var(--fs-sm);
}

#productButton {
    background-color: var(--bg-secondary, var(--secondary-color));
    border: solid 1px var(--border-color, var(--primary-color));
    color: var(--text-primary, var(--primary-color));
    padding: 6px 14px;
    border-radius: var(--radius-pill);
    text-align: center;
    font-size: var(--fs-base) !important;
}

.left-content {
    text-align: left;
    overflow-wrap: break-word;
    word-wrap: break-word;
    white-space: normal;
    word-break: break-word;
    display: flex;
}

.right-content {
    gap: 10px;
    margin-left: auto;
    float: right;
    min-width: 65px;
}

ul.results-list {
    list-style-type: square;
    color: var(--text-primary, var(--primary-color));
    padding-left: 5px;
    margin-bottom: 10px;
}

ul.results-list li {
    margin-bottom: 7px;
}

.li-list {
    display: flex;
    text-align: left;
    align-items: center;
}

.toggler-container {
    display: flex;
    align-items: center;
}

.collapsibleToggle {
    margin-right: 10px;
}

.collapsibleContent {
    display: none;
    text-align: left;
}

/* Native dialog */
dialog {
    width: 550px;
    padding: var(--space-md);
    border: 1px solid var(--border-color, #ccc);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md, 0 4px 12px rgba(0,0,0,.15));
    background-color: var(--bg-secondary, var(--secondary-color));
    color: var(--text-primary, var(--primary-color));
}

dialog::backdrop {
    background: rgba(0, 0, 0, 0.5);
}

.close-button {
    cursor: pointer;
    float: right;
}

input[type="checkbox"]:disabled {
    opacity: 0.5;
}

.input-title {
    align-items: center;
    display: inline-flex;
    width: 100%;
    margin-bottom: 5px;
    margin-top: 10px;
}

.itemTitle {
    align-items: center;
    display: inline-flex;
    width: 100%;
    margin-bottom: 5px;
    margin-top: 20px;
}

/* Legacy card containers */
.card-container {
    display: flex;
    gap: var(--space-md);
    flex-wrap: wrap;
    width: 100%;
}

.card {
    background: var(--bg-secondary, var(--secondary-color));
    border: 1px solid var(--border-color, #ddd);
    box-shadow: var(--shadow-sm, 0 1px 3px rgba(0,0,0,.06));
    border-radius: var(--radius-md);
    padding: var(--space-md);
    flex: 1;
    min-width: 200px;
    text-align: left;
}

iframe { width: 100%; }

.btn-primary {
    background-color: #090909;
    color: #ffffff;
}

.btn-primary:hover {
    background-color: #353535;
    color: #ffffff;
}

.btn-dark {
    display: inline-block;
    height: 30px;
}

.one-off-padding { padding-right: 100px; }
.one-off-margin  { margin-right: 10px; }

.nav-link { color: rgb(148, 20, 20); }

.text-custom-primary { color: #0ece71 !important; }

.bg-custom-info {
    background-color: #17a2b8 !important;
    color: #fff !important;
}

/* ============================================================
   Footer
   ============================================================ */
.dh-footer {
    padding: var(--space-xl) 0 var(--space-lg) 0;
    margin-top: var(--space-2xl);
    border-top: 1px solid var(--border-color, #e5e7eb);
    text-align: center;
    color: var(--text-secondary);
}

.dh-footer a {
    color: var(--text-secondary);
}

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

/* ============================================================
   Phase 2 Modernization Sweep
   ============================================================ */

/* Shared utility tokens for legacy templates */
.dh-inline-form {
    display: inline;
    margin: 0;
}

.dh-inline-action-link {
    padding: 2px;
    cursor: pointer;
}

.dh-session-warning {
    position: fixed;
    top: 50%;
    left: 30%;
    z-index: 1000;
}

.dh-session-warning-btn {
    padding: 0 12px !important;
    height: 34px !important;
    border-color: #2563eb !important;
    color: #2563eb !important;
}

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

.dh-success-text {
    color: #16a34a !important;
}

.dh-warning-text {
    color: #ea580c !important;
}

.dh-error-text {
    color: #dc2626 !important;
}

.dh-muted-italic {
    color: var(--text-secondary);
    font-style: italic;
}

.dh-break-all {
    word-break: break-all;
}

.dh-visually-hidden {
    display: none !important;
}

/* Master nav and footer refinements */
.dh-nav-dropdown-row {
    display: flex;
    align-items: center;
}

.dh-nav-product-menu {
    min-width: 350px;
    max-width: 400px;
}

.dh-nav-product-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding-left: 20px;
    white-space: normal;
    word-wrap: break-word;
}

.dh-footer-social-link {
    margin: 0 8px;
}

.dh-footer-spacer {
    height: var(--space-sm);
}

.dh-footer-help-icon {
    font-size: 12px;
}

/* Dashboard search results + engagement accordions */
.dh-empty-state-note {
    margin: var(--space-sm) 0;
    color: var(--text-secondary);
}

.dh-engagements-accordion .dh-engagement-row {
    text-align: left;
    display: inline-flex;
    align-items: center;
    width: 100%;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    margin-bottom: 6px;
    padding: 6px 8px;
}

.dh-engagement-row__main {
    width: 70%;
    text-align: left;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.dh-engagement-row__actions {
    margin-left: auto;
    width: 31%;
    display: inline-flex;
    align-items: center;
    gap: 2px;
}

.dh-engagement-row__counts {
    margin-right: 2px;
    margin-left: auto;
}

.dh-engagement-icon-link {
    cursor: pointer;
    padding: 0;
    margin-bottom: 5px;
    margin-right: 5px;
}

.dh-engagement-icon-link i.newspaper.outline.icon {
    color: var(--accent);
}

.dh-star-toggle {
    font-size: 18px;
    transition: transform 0.15s ease, color 0.15s ease;
}

.dh-star-toggle:hover {
    transform: scale(1.08);
}

.dh-engagement-row__content {
    margin-left: 5%;
    text-align: left;
    width: 95%;
}

.dh-hide-checkbox {
    margin-bottom: 5px;
}

.dh-fractional-segment {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
}

.dh-subengagement-actions {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
}

/* My engagements page modernization */
.dh-myeng-toolbar {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 60%;
    margin-left: auto;
    margin-right: auto;
    gap: 8px;
}

.dh-myeng-search-input {
    flex: 1;
    margin-left: 5px;
}

.dh-myeng-toolbar-icon {
    cursor: pointer;
    margin-left: 2px;
    color: var(--text-primary);
    display: inline-flex;
    align-items: center;
}

.dh-myeng-copy-btn {
    border: 0;
    background: transparent;
    padding: 0;
}

.dh-myeng-layout {
    display: flex;
    width: 90%;
    margin-left: auto;
    margin-right: auto;
    gap: var(--space-md);
}

.dh-myeng-filters {
    width: 25%;
    margin-left: 1%;
    margin-top: 5px;
    text-align: center;
    border-radius: var(--radius-md);
}

.dh-myeng-filters__content {
    width: 100%;
    margin-right: 0;
}

.dh-myeng-filters__inner {
    height: auto;
    margin-top: 5px;
}

.dh-myeng-field-group {
    margin-bottom: var(--space-sm);
    text-align: left;
}

.dh-myeng-date-input {
    width: 100%;
    box-sizing: border-box;
    margin-bottom: 4px;
}

.dh-myeng-results {
    text-align: left;
    display: flex;
    width: 65%;
    margin-top: 25px;
    min-height: 550px;
    background-color: var(--bg-secondary);
    border-color: var(--border-color);
}

.dh-myeng-results__accordion {
    width: 100%;
}

.dh-myeng-bid-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
}

.dh-myeng-bid-actions__primary {
    background-color: #198754 !important;
    border-color: #198754 !important;
    color: #fff !important;
}

.dh-myeng-bid-actions__danger {
    background-color: #dc3545 !important;
    border-color: #dc3545 !important;
    color: #fff !important;
}

/* Organization users page */
.dh-org-users {
    margin-left: auto;
    margin-right: auto;
    width: 58%;
    text-align: left;
}

.dh-org-users__intro {
    text-align: center;
    margin-bottom: var(--space-lg);
}

.dh-org-users__intro h3 {
    color: var(--accent);
    margin-bottom: 10px;
    font-weight: 500;
}

.dh-org-users__intro p {
    color: var(--text-secondary);
    font-size: 0.95em;
    margin-bottom: 0;
}

.dh-org-users__empty {
    text-align: center;
}

.dh-org-user-card {
    border-radius: var(--radius-md);
    box-shadow: 0 2px 6px rgba(2, 8, 23, 0.08);
    padding: var(--space-md);
    margin-bottom: var(--space-md);
}

.dh-org-user-card__header {
    display: inline-flex;
    align-items: center;
    width: 100%;
    padding-bottom: var(--space-sm);
    border-bottom: 2px solid var(--border-color);
}

.dh-org-user-label {
    margin-bottom: 0 !important;
}

.dh-org-owner-toggle {
    margin-left: auto;
}

.dh-org-owner-toggle__control {
    display: inline-flex;
    align-items: center;
}

.dh-org-owner-toggle__label {
    font-weight: 500;
    margin-right: 10px;
}

.dh-org-user-card__body {
    margin-top: var(--space-md);
}

.dh-org-user-card__section-title {
    margin-bottom: 15px;
    padding-left: 10px;
    border-left: 3px solid var(--accent);
    color: var(--accent);
    font-size: 0.95em;
}

.dh-org-role-row {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    margin-bottom: 10px;
    background-color: var(--bg-tertiary, #f9f9f9);
    border-radius: 6px;
    border-left: 3px solid var(--border-color, #ddd);
    gap: var(--space-sm);
}

.dh-org-role-row__name {
    flex: 1;
    min-width: 0;
    padding-right: 15px;
}

.dh-org-role-row__selector {
    flex: 0 0 150px;
    padding-right: 15px;
}

.dh-org-role-dropdown {
    width: 100%;
}

.dh-org-role-actions {
    flex: 0 0 auto;
    display: flex;
    gap: 10px;
}

.dh-org-role-actions .dh-nav-btn {
    height: 30px;
    font-size: 12px;
    padding: 0 10px;
}

.dh-org-role-actions__save {
    border-color: #0284c7 !important;
    color: #0284c7 !important;
}

.dh-org-role-actions__remove {
    border-color: #dc2626 !important;
    color: #dc2626 !important;
}

/* Organization page dialogs */
.dh-org-modal {
    left: auto;
    min-width: 550px;
    max-width: 550px;
    margin: auto;
    position: absolute;
    max-height: 550px;
    min-height: 550px;
    top: 15%;
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
}

.dh-org-dialog {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    width: min(620px, 92vw);
    padding: var(--space-md) var(--space-lg);
    border-radius: var(--radius-md);
}

.dh-org-dialog__close-row {
    display: flex;
    justify-content: flex-end;
}

.dh-org-dialog__close-btn {
    border: 0;
    background: transparent;
    cursor: pointer;
    font-size: 20px;
    color: var(--text-secondary);
    line-height: 1;
}

.dh-org-dialog__body {
    text-align: left;
    padding-left: 50px;
    color: var(--text-primary);
}

.dh-org-dialog__divider {
    margin-top: 0 !important;
    margin-bottom: var(--space-sm) !important;
}

.dh-org-dialog__actions {
    display: flex;
    justify-content: center;
}

.dh-org-switch-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.dh-org-switch-row {
    display: inline-flex;
    align-items: center;
    width: 100%;
    gap: var(--space-sm);
}

.dh-org-switch-link {
    margin-left: auto;
}

.dh-org-lowpriv-message {
    margin-bottom: var(--space-md);
}

.dh-org-section {
    margin: var(--space-lg) auto 0;
    width: 58%;
    text-align: left;
}

.dh-org-section__title {
    margin: 0 0 var(--space-sm) 0;
    font-size: var(--fs-md);
    color: var(--text-primary);
}

.dh-org-section__copy {
    margin: 0 0 var(--space-xs) 0;
    color: var(--text-primary);
    line-height: 1.5;
}

.dh-org-section__note {
    margin: 0 0 var(--space-xs) 0;
    color: var(--text-secondary);
    line-height: 1.5;
}

.dh-org-invites__error {
    margin: var(--space-xs) 0 0;
}

.dh-org-invites__label {
    margin-top: var(--space-sm);
}

.dh-org-invites__actions {
    display: flex;
    justify-content: center;
    margin-top: var(--space-sm);
}

.dh-org-pending-invites__title {
    text-align: center;
    margin-bottom: var(--space-sm);
}

.dh-org-pending-invite-row {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    margin-bottom: var(--space-xs);
}

.dh-org-pending-invite-remove {
    margin: 0 20px 0 auto;
    cursor: pointer;
}

.dh-org-pending-invite-expiry {
    margin-bottom: var(--space-sm);
}

/* Billing page */
.dh-billing-quarter-picker {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

.dh-billing-quarter-picker__label {
    font-weight: 600;
}

.dh-billing-quarter-picker__select {
    background-color: var(--bg-secondary) !important;
    border: 1px solid var(--border-color) !important;
    color: var(--text-primary) !important;
    padding: 8px 12px !important;
    border-radius: 4px !important;
}

.dh-billing-table-wrap {
    overflow-x: auto;
}

.dh-billing-table {
    background-color: var(--bg-secondary);
}

.dh-billing-engagement-link {
    color: var(--text-primary);
    font-weight: 600;
}

.dh-billing-view-reports-btn {
    height: 30px;
    font-size: 12px;
}

.dh-billing-totals-row th {
    background-color: var(--bg-secondary) !important;
    color: var(--text-primary) !important;
}

.dh-billing-totals-label {
    text-align: right;
}

.dh-billing-note {
    font-size: 0.9em;
    margin-top: 10px;
}

.dh-billing-pricing-info {
    background-color: var(--bg-secondary) !important;
    border: 1px solid var(--border-color) !important;
}

.dh-billing-pricing-info__line {
    margin-bottom: 8px;
}

.dh-billing-reports-modal {
    left: auto;
    min-width: 700px;
    max-width: 800px;
    margin: auto;
    position: absolute;
    top: 10%;
    background-color: var(--bg-secondary);
}

.dh-billing-reports-modal__content {
    background-color: var(--bg-secondary);
    max-height: 70vh;
    overflow-y: auto;
}

/* Report detail */
.dh-report-main {
    text-align: left;
    width: 100%;
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
}

.dh-report-title-wrap {
    flex: 1;
}

.dh-report-title {
    margin: 0;
}

.dh-report-header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: 10px;
}

.dh-report-header-action {
    cursor: pointer;
}

.dh-report-header-icon {
    font-size: 14px;
}

.dh-report-toolbar-btn {
    height: 30px;
    font-size: 12px;
    padding: 0 10px;
}

.dh-report-toolbar-btn--active {
    border-color: #a21caf !important;
    color: #a21caf !important;
}

.dh-report-toolbar-btn--success {
    border-color: #16a34a !important;
    color: #16a34a !important;
}

.dh-report-toolbar-btn--warn {
    border-color: #ea580c !important;
    color: #ea580c !important;
}

.dh-report-toolbar-btn--jira {
    border-color: #0052cc !important;
    background-color: #0052cc !important;
    color: #ffffff !important;
}

.kanban-dupe-inline {
    display: none;
}

.dh-report-loader-wrap {
    padding: 20px;
    text-align: center;
}

.dh-report-field-stack {
    margin-bottom: 16px;
}

.dh-report-ai-note {
    margin-top: 12px;
    font-size: 12px;
    color: var(--text-secondary);
}

.dh-report-ai-icon {
    margin-right: 6px;
}

.dh-report-ai-hint {
    margin-left: 8px;
    opacity: 0.6;
}

.dh-report-info-icon {
    opacity: 0.5;
    font-size: 11px;
}

.dh-report-custom-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 12px;
}

.dh-report-custom-input {
    width: 100%;
}

.dh-report-custom-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.dh-report-cvss-input {
    width: 180px;
}

.dh-report-jira-status {
    margin-bottom: 12px;
}

.dh-report-jira-status__headline {
    display: flex;
    align-items: center;
    gap: 6px;
}

.dh-report-jira-link {
    font-weight: 600;
    margin-left: 4px;
}

.dh-report-jira-status__meta {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 4px;
    display: block;
}

.dh-report-jira-actions {
    display: flex;
    gap: 8px;
}

.dh-report-jira-empty {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 12px;
    color: var(--text-secondary);
}

.dh-report-flyout {
    width: 70%;
    margin-left: 20%;
    margin-right: 10%;
}

/* Submit report shell */
.dh-submit-report-container {
    width: 90%;
    margin-left: auto;
    margin-right: auto;
    padding-bottom: 10px;
}

.dh-submit-report__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-sm);
}

.dh-submit-report__back {
    border: 0;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 16px;
}

/* Engagement summary layout */
.dh-summary-logo-wrap {
    text-align: center;
    margin-bottom: var(--space-md);
}

.dh-summary-logo {
    width: 80px;
    height: 80px;
    object-fit: contain;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

.dh-summary-sidebar-card {
    margin-bottom: var(--space-md);
}

.dh-summary-main {
    text-align: left;
}

.dh-summary-status-row {
    display: inline-flex;
    align-items: center;
    width: 100%;
    margin: var(--space-sm) 0 var(--space-md);
}

.dh-summary-message-header {
    width: 100%;
}

.dh-summary-message-close {
    float: right;
    cursor: pointer;
}

.dh-summary-submit-container {
    margin-top: 10px;
}

.dh-summary-group-details {
    margin-left: 2%;
}

.dh-summary-assets-segment {
    margin-left: 5% !important;
    background-color: var(--bg-secondary) !important;
    border: 1px solid var(--border-color) !important;
}

/* ============================================================
   Wizard Step Content (partial templates loaded via HTMX)
   These selectors style the content loaded into wizard modals
   ============================================================ */

/* Content areas inside wizard modals */
#dialog-content-bb,
#dialog-content-pt,
#dialog-content-vdp,
#dialog-content-sub {
    padding: var(--space-lg);
    text-align: left;
}

/* Remove nested double-padding on inner content wrappers */
#dialog-content-bb > #dialog-content-bb,
#dialog-content-pt > #dialog-content-pt,
#dialog-content-vdp > #dialog-content-vdp,
#dialog-content-sub > #dialog-content-sub {
    padding: 0;
}

/* Center action button row inside wizard steps */
#dialog-content-bb center,
#dialog-content-pt center,
#dialog-content-vdp center,
#dialog-content-sub center {
    display: flex;
    justify-content: center;
    gap: var(--space-sm);
    margin-top: var(--space-md);
    padding: var(--space-sm) 0 var(--space-xs);
}

/* Wizard step form headings and descriptions */
#dialog-content-bb > #dialog-content-bb > *:first-child,
#dialog-content-pt > #dialog-content-pt > *:first-child,
#dialog-content-vdp > #dialog-content-vdp > *:first-child,
#dialog-content-sub > #dialog-content-sub > *:first-child {
    color: var(--text-secondary);
    font-size: var(--fs-sm);
    margin-bottom: var(--space-md);
}

/* Video embed wrapper inside wizard steps */
.wizard-video-wrapper {
    margin-top: var(--space-lg);
    padding: var(--space-md);
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

.wizard-video-wrapper span {
    display: block;
    margin-bottom: var(--space-sm);
    font-size: var(--fs-sm);
    color: var(--text-secondary);
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 420px) {
    #superscriptText { font-size: 4px !important; }
}

@media (max-width: 750px) {
    header.header {
        padding: var(--space-sm) var(--space-md);
        min-height: auto;
    }

    #masterMenu {
        justify-content: flex-start;
        width: 100%;
        padding-bottom: var(--space-xs);
    }

    .dh-layout {
        flex-direction: column;
    }

    .dh-layout__sidebar,
    .dh-layout__sidebar--wide {
        flex: none;
        width: 100%;
    }

    .dh-page-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .dh-page-header__actions {
        padding-top: 0;
    }

    .dh-auth-shell {
        padding: 0 var(--space-sm);
    }

    .dh-auth-form {
        width: 100%;
    }


    .dh-toolbar-row {
        grid-template-columns: 1fr;
        align-items: stretch;
    }

    .dh-toolbar-toggle,
    .dh-toolbar-search,
    .dh-toolbar-select,
    .dh-create-dropdown {
        width: 100%;
        max-width: none;
    }

    .modal,
    .dh-wizard-modal {
        min-width: 95vw;
        max-width: 95vw;
    }

    .dh-myeng-toolbar {
        width: 95%;
        flex-wrap: wrap;
        justify-content: flex-start;
    }

    .dh-myeng-layout {
        width: 100%;
        flex-direction: column;
    }

    .dh-myeng-filters,
    .dh-myeng-results {
        width: 100%;
        margin-left: 0;
    }

    .dh-org-users {
        width: 100%;
    }

    .dh-org-section {
        width: 100%;
    }

    .dh-org-role-row {
        flex-direction: column;
        align-items: stretch;
    }

    .dh-org-role-row__selector {
        flex: none;
        width: 100%;
        padding-right: 0;
    }

    .dh-report-custom-grid {
        grid-template-columns: 1fr;
    }

    .dh-report-custom-actions {
        flex-direction: column;
        align-items: flex-start;
    }

    .dh-report-flyout {
        width: 94%;
        margin-left: 3%;
        margin-right: 3%;
    }
}

@media (min-width: 751px) {
    #masterMenu {
        justify-content: flex-end;
    }
}

@media screen and (min-width: 1150px) {
    .modal,
    .dh-wizard-modal {
        min-width: 680px;
        max-width: 680px;
        min-height: 640px;
        max-height: 640px;
    }
}
