/* ===== BASE & RESET ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

h1, h2, h3, h4, h5, h6 {
    color: var(--color-text);
}

p, span, li, td, th, label, div {
    color: inherit;
}

:root {
    --color-primary: #3b82f6;
    --color-primary-hover: #2563eb;
    --color-primary-soft: rgba(59, 130, 246, 0.15);
    --color-text: #e8e8ed;
    --color-text-secondary: #6e6e80;
    --color-text-tertiary: #4a4a5a;
    --color-bg: #0a0a0b;
    --color-bg-secondary: #111113;
    --color-bg-tertiary: #111113;
    --color-bg-elevated: #1a1a1e;
    --color-border: #1f1f23;
    --color-border-light: #1a1a1e;
    --color-divider: #1f1f23;
    --color-accent: #10b981;
    --color-accent-orange: #f97316;
    --color-accent-red: #ef4444;
    --color-accent-purple: #8b5cf6;
    --color-accent-cyan: #06b6d4;
    --color-success: #10b981;
    --color-warning: #f59e0b;
    --color-danger: #ef4444;
    --color-input-bg: #111113;
    --color-input-border: #1f1f23;
    --color-text-muted: #6e6e80;

    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.5);
    --shadow-md: 0 4px 8px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 16px rgba(0, 0, 0, 0.4);
    --shadow-xl: 0 16px 32px rgba(0, 0, 0, 0.5);
    --shadow-glow: none;

    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;

    --radius-sm: 4px;
    --radius-md: 6px;
    --radius-lg: 8px;
    --radius-xl: 12px;
    --radius-full: 9999px;

    --transition-fast: 120ms ease;
    --transition-base: 180ms ease;
    --transition-slow: 260ms ease;
}

html {
    scroll-behavior: smooth;
}

body,
body.bg-base-200,
body[data-theme="business"],
body[data-theme="corporate"] {
    font-family: -apple-system, BlinkMacSystemFont, 'Inter', 'Segoe UI', sans-serif;
    line-height: 1.5;
    color: var(--color-text);
    background-color: var(--color-bg);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    letter-spacing: -0.011em;
    display: flex;
    flex-direction: column;
}

::selection {
    background-color: rgba(59, 130, 246, 0.25);
    color: var(--color-text);
}

:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

/* ===== LAYOUT ===== */
.main-content {
    max-width: 1400px;
    margin: 1rem auto 2rem;
    padding: 0 1.5rem;
    width: 100%;
    flex: 1 0 auto;
}

.footer {
    text-align: center;
    padding: var(--space-sm) var(--space-lg);
    background-color: var(--color-bg);
    color: var(--color-text-secondary);
    width: 100%;
    font-size: 0.8125rem;
    flex-shrink: 0;
    border-top: 1px solid var(--color-border);
}

/* ===== NAVBAR ===== */
.app-navbar {
    background-color: var(--color-bg);
    color: var(--color-text);
    padding: 0 var(--space-lg);
    position: sticky;
    top: 0;
    z-index: 100;
    width: 100%;
    border-bottom: 1px solid var(--color-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-md);
    height: 48px;
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
    padding: 0 0.5rem;
    width: 100%;
    height: 100%;
    position: relative;
}

.nav-left-absolute, .nav-right-absolute {
    position: absolute;
    display: flex;
    align-items: center;
    z-index: 1;
}

.nav-left-absolute {
    left: 1rem;
    gap: 0.75rem;
}

.nav-right-absolute {
    right: 1rem;
    gap: 0.75rem;
}

.nav-profile, .nav-logout {
    color: var(--color-text-secondary);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.375rem 0.625rem;
    border-radius: var(--radius-md);
    transition: color var(--transition-fast);
    font-size: 0.875rem;
    font-weight: 500;
}

.nav-profile:hover, .nav-logout:hover {
    color: var(--color-text);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 0.25rem;
    margin: 0;
    padding: 0;
    justify-content: center;
    flex-wrap: wrap;
    flex: 1;
}

.nav-menu li {
    position: relative;
}

.nav-menu a {
    color: var(--color-text-secondary);
    text-decoration: none;
    white-space: nowrap;
    padding: 0.3rem 0.625rem;
    border-radius: var(--radius-sm);
    transition: color var(--transition-fast);
    font-weight: 400;
    font-size: 0.875rem;
    position: relative;
}

.nav-menu a:hover {
    color: var(--color-text);
}

.nav-menu a.active {
    color: var(--color-primary);
    font-weight: 500;
}

.nav-menu a.active::after {
    content: '';
    position: absolute;
    bottom: -0.375rem;
    left: 50%;
    transform: translateX(-50%);
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background-color: var(--color-primary);
}

/* Navbar dropdown */
.nav-dropdown { position: relative; }
.nav-dropdown-toggle { display: flex; align-items: center; gap: 0.25rem; cursor: pointer; }
.nav-dropdown-toggle .dropdown-chevron { width: 14px; height: 14px; transition: transform var(--transition-fast); opacity: 0.5; }
.nav-dropdown:hover .dropdown-chevron { transform: rotate(180deg); }

.nav-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    min-width: 160px;
    background: var(--color-bg-elevated);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 0.25rem 0;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-fast);
    z-index: 1000;
    margin-top: 0.375rem;
    list-style: none;
}

.nav-dropdown:hover .nav-dropdown-menu { opacity: 1; visibility: visible; }
.nav-dropdown-menu li { margin: 0; }
.nav-dropdown-menu a { display: block; padding: 0.4375rem 0.875rem; color: var(--color-text-secondary); text-decoration: none; font-size: 0.875rem; transition: color var(--transition-fast); white-space: nowrap; }
.nav-dropdown-menu a:hover { color: var(--color-text); }
.nav-dropdown-menu a.active { color: var(--color-primary); }

.nav-end { display: flex; align-items: center; gap: 0.75rem; flex: 0 0 auto; position: absolute; right: 0.5rem; }
.nav-end a, .nav-auth { color: var(--color-text); text-decoration: none; padding: 0.375rem 0.75rem; border-radius: var(--radius-md); display: inline-flex; align-items: center; gap: 0.5rem; transition: color var(--transition-fast); font-size: 0.875rem; font-weight: 500; }
.nav-end a:hover, .nav-auth:hover { color: var(--color-text); }
.nav-auth { display: inline-flex !important; visibility: visible !important; opacity: 1 !important; z-index: 9999; }
.nav-debug { color: var(--color-text-secondary); font-size: 0.8125rem; padding: 0.2rem 0.4rem; border-radius: 4px; background: var(--color-bg-secondary); }
.nav-email { color: var(--color-text); font-size: 0.875rem; font-weight: 500; display: inline-flex; align-items: center; white-space: nowrap; }
.nav-logout { display: inline-flex; visibility: visible; z-index: 1000; }

/* ===== BUTTONS ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--color-bg-secondary);
    color: var(--color-text);
    text-decoration: none;
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border);
    cursor: pointer;
    font-family: inherit;
    font-size: 0.875rem;
    font-weight: 500;
    line-height: 1;
    transition: border-color var(--transition-fast), background var(--transition-fast), color var(--transition-fast);
    white-space: nowrap;
    position: relative;
    overflow: hidden;
}

.btn:hover {
    border-color: #2d2d35;
    background: var(--color-bg-elevated);
    color: var(--color-text);
}

.btn:active {
    opacity: 0.85;
}

.btn:focus-visible {
    outline: none;
    box-shadow: 0 0 0 2px var(--color-primary-soft);
}

.btn-primary {
    background: var(--color-primary);
    color: #ffffff;
    border-color: var(--color-primary);
}

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

.btn-success {
    background: var(--color-accent);
    color: #ffffff;
    border-color: var(--color-accent);
}

.btn-success:hover {
    background: #059669;
    border-color: #059669;
}

.btn-danger {
    background: var(--color-accent-red);
    color: #ffffff;
    border-color: var(--color-accent-red);
}

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

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

.btn-ghost:hover {
    background: var(--color-bg-elevated);
    border-color: transparent;
    color: var(--color-text);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--color-border);
    color: var(--color-text);
}

.btn-outline:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
    background: transparent;
}

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

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

.btn-small, .btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.8125rem;
    line-height: 1;
    border-radius: var(--radius-sm);
}

.btn-lg {
    padding: 0.625rem 1.5rem;
    font-size: 0.9375rem;
}

.btn-xs {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
}

.btn-icon {
    padding: 0.5rem;
    min-width: 36px;
    min-height: 36px;
}

.btn-icon.btn-small {
    padding: 0.3125rem;
    min-width: 28px;
    min-height: 28px;
}

.btn-icon svg { width: 18px; height: 18px; }

.btn.loading, .btn.btn-loading {
    color: transparent !important;
    pointer-events: none;
}

.btn.loading::after, .btn.btn-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 14px;
    height: 14px;
    margin: -7px 0 0 -7px;
    border: 2px solid rgba(255,255,255,0.4);
    border-right-color: white;
    border-radius: 50%;
    animation: btnSpin 0.65s linear infinite;
}

@keyframes btnSpin { to { transform: rotate(360deg); } }
@keyframes btn-spin { to { transform: rotate(360deg); } }

.btn-primary.loading::after,
.btn-success.loading::after,
.btn-danger.loading::after {
    border-color: rgba(255,255,255,0.3);
    border-right-color: white;
}

/* ===== CARDS ===== */
.card {
    background: var(--color-bg-secondary);
    padding: var(--space-lg);
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border);
    transition: border-color var(--transition-base);
    position: relative;
    overflow: hidden;
    color: var(--color-text);
}

.card:hover {
    border-color: rgba(59, 130, 246, 0.3);
}

.card-elevated { border-color: var(--color-border-light); }
.card-interactive { cursor: pointer; }

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: var(--space-md);
    margin-bottom: var(--space-md);
    border-bottom: 1px solid var(--color-border);
}

.card-title {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--color-text);
    margin: 0;
}

.card-subtitle {
    font-size: 0.8125rem;
    color: var(--color-text-secondary);
    margin-top: 0.25rem;
}

.card-body { padding: 0; }

.card-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.75rem;
    padding-top: var(--space-md);
    margin-top: var(--space-md);
    border-top: 1px solid var(--color-border);
}

/* Card text colors */
.card h2, .card h3, .card h4,
.report-type-card h2, .report-type-card h3, .report-type-card h4,
.management-card h4, .advanced-card h4, .integration-card h4 {
    color: var(--color-text);
}

.card p, .report-type-card p, .management-card p, .advanced-card p, .integration-card p {
    color: var(--color-text-secondary);
}

.card label, .report-type-card label, .management-card label, .advanced-card label, .integration-card label {
    color: var(--color-text);
}

.card,
.feature-card,
.management-card,
.advanced-card,
.integration-card,
.report-type-card,
.quick-access-card,
.compliance-section,
.template-card {
    color: var(--color-text);
}

/* ===== GRIDS ===== */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.25rem;
    margin: 1.5rem 0;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin: 1.5rem 0;
}

.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.25rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.25rem; }

@media (max-width: 1024px) {
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
    .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

/* ===== STAT CARDS ===== */
.stat-card {
    background: var(--color-bg-secondary);
    padding: 1.25rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border);
    transition: border-color var(--transition-base);
    position: relative;
    overflow: hidden;
    text-align: center;
}

.stat-card:hover {
    border-color: rgba(59, 130, 246, 0.3);
}

.stat-card h3,
.stat-card .stat-label {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--color-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 0.375rem;
}

.stat-card .stat-number,
.stat-card .stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--color-text);
    line-height: 1.1;
}

.stat-card .stat-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    margin-bottom: 0.625rem;
    font-size: 1.125rem;
    color: var(--color-primary);
    margin-left: auto;
    margin-right: auto;
}

.stat-card .stat-content { flex: 1; }
.stat-card .stat-detail,
.stat-card p:not(.stat-number):not(.stat-value) {
    font-size: 0.8125rem;
    color: var(--color-text-secondary);
    margin-top: 0.375rem;
}

.stat-card.stat-healthy, .stat-card.stat-success { border-left: 2px solid #22c55e; }
.stat-card.stat-warning { border-left: 2px solid #f59e0b; }
.stat-card.stat-critical, .stat-card.stat-danger { border-left: 2px solid #ef4444; }
.stat-card.stat-offline, .stat-card.stat-neutral { border-left: 2px solid #3f3f46; }
.stat-card.success { border-color: var(--color-success) !important; }
.stat-card.success .stat-value { color: var(--color-success) !important; }
.stat-card.success .stat-icon { background: rgba(16, 185, 129, 0.12); color: var(--color-success); }
.stat-card.warning { border-color: var(--color-warning) !important; }
.stat-card.warning .stat-value { color: var(--color-warning) !important; }
.stat-card.warning .stat-icon { background: rgba(245, 158, 11, 0.12); color: var(--color-warning); }
.stat-card.danger { border-color: var(--color-danger) !important; }
.stat-card.danger .stat-value { color: var(--color-danger) !important; }
.stat-card.danger .stat-icon { background: rgba(239, 68, 68, 0.12); color: var(--color-danger); }

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: 0.25rem;
    line-height: 1.2;
}

.stat-card h3 { color: var(--color-text-secondary); font-size: 0.8125rem; font-weight: 500; margin: 0; }

.stat-icon.bg-blue { background: rgba(59, 130, 246, 0.12); color: #3b82f6; }
.stat-icon.bg-red { background: rgba(239, 68, 68, 0.12); color: #ef4444; }
.stat-icon.bg-orange { background: rgba(251, 146, 60, 0.12); color: #fb923c; }
.stat-icon.bg-green { background: rgba(16, 185, 129, 0.12); color: #10b981; }
.stat-icon.bg-purple { background: rgba(139, 92, 246, 0.12); color: #8b5cf6; }
.stat-icon.bg-cyan { background: rgba(6, 182, 212, 0.12); color: #06b6d4; }

/* DaisyUI stat overrides */
.stats {
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--color-bg-secondary);
    border: 1px solid var(--color-border);
}

.stat {
    padding: 1.25rem;
    border-color: var(--color-border) !important;
    background: transparent !important;
}

.stat-figure { color: var(--color-primary); }
.stat-figure svg, .stat-figure i { width: 28px; height: 28px; stroke-width: 1.5; }
.stat-title { font-size: 0.75rem; font-weight: 500; text-transform: uppercase; letter-spacing: 0.04em; color: var(--color-text-secondary) !important; opacity: 1; }
.stat-value { font-size: 1.75rem; font-weight: 600; color: var(--color-text) !important; letter-spacing: -0.02em; }
.stat-desc { font-size: 0.8125rem; color: var(--color-text-tertiary) !important; }

/* ===== PAGE HEADER ===== */
.page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--space-lg);
    margin: 1.5rem 0 1.5rem;
    flex-wrap: wrap;
}

.page-header > div:first-child { flex: 1; }
.page-header .btn-group, .page-header > a.btn, .page-header > button.btn, .page-header > div:last-child:not(:first-child) { flex-shrink: 0; }

.page-header h1 {
    font-size: 1.5rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    color: var(--color-text);
    margin: 0;
}

.page-header p {
    color: var(--color-text-secondary);
    margin-top: 0.2rem;
    font-size: 0.875rem;
}

.page-title { font-size: 1.5rem; font-weight: 600; letter-spacing: -0.02em; color: var(--color-text); margin: 0 0 var(--space-lg); }
.page-subtitle { color: var(--color-text-secondary); font-size: 0.875rem; margin-top: 0.2rem; }
.subtitle { color: var(--color-text-secondary); font-size: 0.9375rem; margin-top: 0.25rem; }

/* ===== TYPOGRAPHY ===== */
h1 { font-size: 1.875rem; font-weight: 600; letter-spacing: -0.02em; color: var(--color-text); margin-bottom: 0.5rem; }
h2 { font-size: 1.375rem; font-weight: 600; letter-spacing: -0.02em; color: var(--color-text); margin-bottom: 0.75rem; }
h3 { font-size: 1.125rem; font-weight: 600; color: var(--color-text); }
h4 { font-size: 1rem; font-weight: 600; color: var(--color-text); }
h1, h2, h3, h4, h5, h6 { font-weight: 600; letter-spacing: -0.02em; color: var(--color-text); }

.muted, .text-muted { color: var(--color-text-secondary); }
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-sm { font-size: 0.875rem; }
.text-xs { font-size: 0.75rem; }
.font-bold { font-weight: 700; }
.font-medium { font-weight: 500; }

a { color: var(--color-primary); text-decoration: none; transition: color var(--transition-fast); }
a:hover { color: var(--color-primary-hover); }
.data-table a, .config-table a, .table a { font-weight: 500; }

hr { border: none; border-top: 1px solid var(--color-border); margin: var(--space-lg) 0; }
ul, ol { padding-left: var(--space-lg); }
section { margin-bottom: var(--space-xl); }
section:last-child { margin-bottom: 0; }
.content-narrow { max-width: 720px; margin: 0 auto; }
.content-wide { max-width: 1200px; margin: 0 auto; }

pre {
    background: var(--color-bg-secondary);
    padding: 1rem;
    border-radius: var(--radius-md);
    overflow-x: auto;
    font-family: 'SF Mono', 'Menlo', 'Monaco', 'Courier New', monospace;
    font-size: 0.8125rem;
    line-height: 1.5;
    border: 1px solid var(--color-border);
}

code {
    background: var(--color-bg-secondary);
    padding: 0.1rem 0.35rem;
    border-radius: 3px;
    font-family: 'SF Mono', 'Menlo', 'Monaco', 'Courier New', monospace;
    font-size: 0.8125em;
    color: var(--color-primary);
    border: 1px solid var(--color-border);
}

.table code { background: transparent; padding: 0; border: none; }

/* ===== FORMS ===== */
.form-group {
    margin-bottom: 1.125rem;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.form-group label {
    font-weight: 500;
    font-size: 0.8125rem;
    color: var(--color-text);
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

.form-group label .required { color: #ef4444; font-size: 0.75rem; }
.form-group .form-hint { font-size: 0.75rem; color: var(--color-text-secondary); }

.form-control {
    width: 100%;
    padding: 0.5625rem 0.875rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    background: var(--color-bg-secondary);
    background-color: var(--color-bg-secondary);
    font-family: inherit;
    font-size: 0.875rem;
    color: var(--color-text);
    transition: border-color var(--transition-fast);
}

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

.form-control:hover { border-color: #2f2f35; }

.form-control:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.12);
}

.form-control:disabled {
    background: var(--color-bg);
    color: var(--color-text-tertiary);
    cursor: not-allowed;
}

.form-control.is-invalid { border-color: var(--color-accent-red); box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.12); }
.form-control.is-valid { border-color: var(--color-accent); box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.12); }

textarea.form-control { min-height: 100px; resize: vertical; line-height: 1.6; }

select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    padding-right: 2.5rem;
    cursor: pointer;
    background-color: var(--color-bg-secondary);
}

option { background-color: var(--color-bg-secondary); color: var(--color-text); }

input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    border: 1px solid var(--color-border);
    border-radius: 4px;
    background: var(--color-bg-secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
    position: relative;
    flex-shrink: 0;
}

input[type="checkbox"]:hover { border-color: var(--color-primary); }

input[type="checkbox"]:checked {
    background: var(--color-primary);
    border-color: var(--color-primary);
}

input[type="checkbox"]:checked::after {
    content: '';
    position: absolute;
    left: 4px;
    top: 1.5px;
    width: 5px;
    height: 8px;
    border: solid white;
    border-width: 0 1.5px 1.5px 0;
    transform: rotate(45deg);
}

input[type="checkbox"]:focus-visible { outline: none; box-shadow: 0 0 0 2px var(--color-primary-soft); }

input[type="radio"] {
    appearance: none;
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    border: 1px solid var(--color-border);
    border-radius: 50%;
    background: var(--color-bg);
    cursor: pointer;
    transition: all var(--transition-fast);
    position: relative;
    flex-shrink: 0;
}

input[type="radio"]:hover { border-color: var(--color-primary); }
input[type="radio"]:checked { border-color: var(--color-primary); border-width: 4px; }
input[type="radio"]:focus-visible { outline: none; box-shadow: 0 0 0 2px var(--color-primary-soft); }

.input-group { display: flex; align-items: stretch; }
.input-group .form-control { border-radius: 0; flex: 1; }
.input-group .form-control:first-child { border-radius: var(--radius-md) 0 0 var(--radius-md); }
.input-group .form-control:last-child { border-radius: 0 var(--radius-md) var(--radius-md) 0; }
.input-group .btn { border-radius: 0; margin-left: -1px; }
.input-group .btn:last-child { border-radius: 0 var(--radius-md) var(--radius-md) 0; }

.input-group-text {
    display: flex;
    align-items: center;
    padding: 0.5625rem 0.875rem;
    background: var(--color-bg-secondary);
    border: 1px solid var(--color-border);
    color: var(--color-text-secondary);
    font-size: 0.875rem;
}

.input-group-text:first-child { border-radius: var(--radius-md) 0 0 var(--radius-md); border-right: none; }

.switch { position: relative; display: inline-flex; align-items: center; gap: 0.75rem; cursor: pointer; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch-track { width: 36px; height: 20px; background: var(--color-border); border-radius: 10px; transition: all var(--transition-fast); position: relative; }
.switch-track::after { content: ''; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; background: #6e6e80; border-radius: 50%; transition: all var(--transition-fast); }
.switch input:checked + .switch-track { background: var(--color-primary); }
.switch input:checked + .switch-track::after { transform: translateX(16px); background: #fff; }
.switch input:focus-visible + .switch-track { box-shadow: 0 0 0 2px var(--color-primary-soft); }
.switch-label { font-size: 0.875rem; color: var(--color-text); }

.form-floating { position: relative; }
.form-floating .form-control { padding-top: 1.5rem; padding-bottom: 0.5rem; }
.form-floating label { position: absolute; top: 0; left: 0; padding: 0.5625rem 0.875rem; pointer-events: none; transition: all var(--transition-fast); color: var(--color-text-tertiary); font-size: 0.875rem; }
.form-floating .form-control:focus ~ label, .form-floating .form-control:not(:placeholder-shown) ~ label { transform: translateY(-0.5rem) scale(0.8); color: var(--color-primary); }

.search-input { background-color: var(--color-bg-secondary); border: 1px solid var(--color-border); border-radius: var(--radius-md); padding: 0.5rem 1rem 0.5rem 2.25rem; font-size: 0.875rem; color: var(--color-text); }
.search-input:focus { border-color: var(--color-primary); box-shadow: 0 0 0 2px var(--color-primary-soft); outline: none; }

.code-block {
    background: var(--color-bg-secondary);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 1rem;
    min-height: 120px;
    white-space: pre-wrap;
    font-family: 'SF Mono', ui-monospace, monospace;
    font-size: 0.8125rem;
    line-height: 1.6;
    overflow-x: auto;
    color: var(--color-text);
}

.field-row {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding: 0.6rem 0;
    border-bottom: 1px solid var(--color-border);
    background: none;
    margin-bottom: 0;
}
.field-row:last-child { border-bottom: none; }
/* Boolean field-rows sit inline (checkbox left, text right) */
.field-row[data-type="boolean"] {
    flex-direction: row;
    align-items: flex-start;
    gap: 0.625rem;
}
/* Two-column grid for boolean-dense sections */
.cis-section-body.bool-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 1.25rem;
}
.cis-section-body.bool-grid .field-row {
    border-bottom: 1px solid var(--color-border);
}
/* Inline action feedback (configurations-new, etc.) */
#action-feedback { font-size: 0.85rem; padding: 0.5rem 0.75rem; border-radius: var(--radius-sm); border: 1px solid transparent; }
#action-feedback.error { background: rgba(239,68,68,0.1); border-color: rgba(239,68,68,0.3); color: #f87171; }
#action-feedback.success { background: rgba(16,185,129,0.1); border-color: rgba(16,185,129,0.3); color: #34d399; }


/* ===== TABLES ===== */
.data-table,
.table,
table:not(.table-zebra) {
    margin-top: 0;
    margin-bottom: 1.75rem;
    width: 100%;
    background: var(--color-bg-secondary);
    border-collapse: separate;
    border-spacing: 0;
    margin: var(--space-md) 0;
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--color-border);
}

.data-table th,
.data-table td,
.table th,
.table td,
table:not(.table-zebra) th,
table:not(.table-zebra) td {
    padding: 0.625rem 0.875rem;
    text-align: left;
    border-bottom: 1px solid var(--color-border);
    font-size: 0.875rem;
    color: var(--color-text);
    vertical-align: middle;
}

.data-table th,
.table th,
table:not(.table-zebra) th {
    background: var(--color-bg-secondary);
    font-weight: 500;
    color: var(--color-text-secondary);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    position: sticky;
    top: 0;
    z-index: 1;
}

.data-table tbody tr,
.table tbody tr,
table:not(.table-zebra) tbody tr {
    transition: background var(--transition-fast);
}

.data-table tbody tr:hover,
.table tbody tr:hover,
table:not(.table-zebra) tbody tr:hover {
    background: rgba(255, 255, 255, 0.025);
}

.data-table tbody tr:last-child td,
.table tbody tr:last-child td,
table:not(.table-zebra) tbody tr:last-child td {
    border-bottom: none;
}

.data-table tbody tr.clickable,
.table tbody tr.clickable,
table:not(.table-zebra) tbody tr.clickable { cursor: pointer; }

.data-table .actions { display: flex; gap: 0.5rem; justify-content: flex-end; }
.data-table .actions .btn { padding: 0.3rem 0.5rem; font-size: 0.75rem; }

.data-table-container {
    overflow-x: auto;
    margin: var(--space-md) 0;
    border-radius: var(--radius-lg);
    scrollbar-width: thin;
    scrollbar-color: var(--color-border) transparent;
}

.data-table-container::-webkit-scrollbar { height: 5px; }
.data-table-container::-webkit-scrollbar-track { background: transparent; }
.data-table-container::-webkit-scrollbar-thumb { background: var(--color-border); border-radius: 3px; }

.config-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: var(--color-bg-secondary);
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--color-border);
}

.config-table thead { background: var(--color-bg-secondary); }
.config-table th, .config-table td { padding: 0.625rem 0.875rem; text-align: left; border-bottom: 1px solid var(--color-border); color: var(--color-text); font-size: 0.875rem; }
.config-table th { font-weight: 500; font-size: 0.6875rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--color-text-secondary); }
.config-table tbody tr { transition: background var(--transition-fast); }
.config-table tbody tr:hover { background: rgba(255, 255, 255, 0.025); }

/* DaisyUI table overrides */
.table { font-size: 0.875rem; background-color: var(--color-bg-secondary) !important; }
.table th { font-size: 0.75rem; font-weight: 500; text-transform: uppercase; letter-spacing: 0.04em; color: var(--color-text-secondary); background: var(--color-bg-secondary); }
.table td { padding: 0.625rem 0.875rem; border-bottom: 1px solid var(--color-border); }
.table :where(thead, tbody, tfoot) { background-color: transparent !important; }
.table :where(th, td) { background-color: transparent !important; color: var(--color-text) !important; }
.table :where(thead tr, tbody tr, tfoot tr) { background-color: var(--color-bg-secondary) !important; border-color: var(--color-border) !important; }
.table-zebra tbody tr:nth-child(even) { background-color: rgba(255,255,255,0.02) !important; }
.table-zebra tbody tr:nth-child(odd) { background: rgba(255,255,255,0.01); }
.table-zebra tbody tr:hover { background-color: rgba(255,255,255,0.03) !important; }

/* ===== BADGES ===== */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.6875rem;
    font-weight: 500;
    border: 1px solid transparent;
    transition: all var(--transition-fast);
    text-transform: none;
    letter-spacing: 0;
}

.badge-dot { width: 5px; height: 5px; border-radius: 50%; background: currentColor; }

.badge-low, .badge-success, .badge-approved, .badge-active, .badge-deployed, .badge-compliant {
    background: rgba(16, 185, 129, 0.12);
    color: #10b981;
    border-color: rgba(16, 185, 129, 0.2);
}

.badge-medium, .badge-warning, .badge-draft, .badge-pending {
    background: rgba(245, 158, 11, 0.12);
    color: #f59e0b;
    border-color: rgba(245, 158, 11, 0.2);
}

.badge-high {
    background: rgba(249, 115, 22, 0.12);
    color: #f97316;
    border-color: rgba(249, 115, 22, 0.2);
}

.badge-critical, .badge-danger, .badge-rejected, .badge-non-compliant {
    background: rgba(239, 68, 68, 0.12);
    color: #ef4444;
    border-color: rgba(239, 68, 68, 0.2);
}

.badge-info, .badge-pending-alt {
    background: rgba(59, 130, 246, 0.12);
    color: #3b82f6;
    border-color: rgba(59, 130, 246, 0.2);
}

.badge-neutral {
    background: rgba(100, 116, 139, 0.12);
    color: var(--color-text-secondary);
    border-color: rgba(100, 116, 139, 0.2);
}

.badge-sm { padding: 0.15rem 0.4rem; font-size: 0.625rem; }
.badge-lg { padding: 0.3125rem 0.75rem; font-size: 0.75rem; }

/* DaisyUI badge overrides */
.badge-primary { background: rgba(59, 130, 246, 0.12) !important; color: #3b82f6 !important; border: 1px solid rgba(59,130,246,0.2) !important; }
.badge-secondary { background: rgba(139, 92, 246, 0.12) !important; color: #8b5cf6 !important; border: 1px solid rgba(139,92,246,0.2) !important; }
.badge-success { background: rgba(16, 185, 129, 0.12) !important; color: #10b981 !important; border: 1px solid rgba(16,185,129,0.2) !important; }
.badge-warning { background: rgba(245, 158, 11, 0.12) !important; color: #f59e0b !important; border: 1px solid rgba(245,158,11,0.2) !important; }
.badge-error { background: rgba(239, 68, 68, 0.12) !important; color: #ef4444 !important; border: 1px solid rgba(239,68,68,0.2) !important; }
.badge-info { background: rgba(59, 130, 246, 0.12) !important; color: #3b82f6 !important; border: 1px solid rgba(59,130,246,0.2) !important; }

/* ===== SIDEBAR ===== */
.app-layout {
    display: flex;
    gap: 1.5rem;
    width: 100%;
    max-width: 100%;
    margin: 0;
    align-items: flex-start;
}

.content-area { width: 100%; }

.sidebar {
    width: 220px;
    background: transparent;
    border-right: 1px solid var(--color-border);
    border-radius: 0;
    box-shadow: none;
    border: none;
    border-right: 1px solid var(--color-border);
    padding: var(--space-md) 0;
    position: sticky;
    top: 56px;
    height: fit-content;
    max-height: calc(100vh - 64px);
    overflow-y: auto;
    flex-shrink: 0;
    scrollbar-width: thin;
    scrollbar-color: var(--color-border) transparent;
}

.sidebar::-webkit-scrollbar { width: 4px; }
.sidebar::-webkit-scrollbar-thumb { background: var(--color-border); border-radius: 2px; }

.sidebar.collapsed { width: 48px; padding: var(--space-sm) 0; }

.sidebar .sidebar-header {
    display: flex;
    align-items: center;
    margin-bottom: var(--space-md);
    padding: 0 0.75rem var(--space-sm);
    border-bottom: 1px solid var(--color-border);
}

.sidebar .sidebar-brand {
    font-weight: 600;
    color: var(--color-text);
    font-size: 0.9375rem;
    text-decoration: none;
    letter-spacing: -0.02em;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sidebar .sidebar-brand:hover { color: var(--color-primary); }

.sidebar .menu {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    padding: 0 0.5rem;
}

.sidebar .menu .section { margin: 0; }

.sidebar .menu .section-title {
    font-size: 0.625rem;
    font-weight: 600;
    color: var(--color-text-tertiary);
    margin-bottom: 0.3rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding-left: 0.625rem;
}

.sidebar .menu ul { list-style: none; padding-left: 0; margin: 0; }
.sidebar .menu li { margin-bottom: 1px; }

.sidebar .menu li.sidebar-divider {
    margin: 0.625rem 0 0.375rem;
    padding: 0 0.625rem;
    border-top: 1px solid var(--color-border);
    padding-top: 0.625rem;
}

.sidebar .menu li.sidebar-divider span {
    font-size: 0.6rem;
    font-weight: 600;
    color: var(--color-text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.sidebar .menu a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4375rem 0.625rem;
    color: var(--color-text-secondary);
    text-decoration: none;
    border-radius: var(--radius-sm);
    transition: color var(--transition-fast);
    font-size: 0.875rem;
    font-weight: 400;
    border-left: 2px solid transparent;
}

.sidebar .menu a .nav-icon {
    width: 16px;
    height: 16px;
    opacity: 0.5;
    flex-shrink: 0;
}

.sidebar .menu a:hover {
    color: var(--color-text);
}

.sidebar .menu a:hover .nav-icon { opacity: 0.8; }

.sidebar .menu a.active {
    color: var(--color-text);
    font-weight: 500;
    border-left-color: var(--color-primary);
    background: transparent;
}

.sidebar .menu a.active .nav-icon { opacity: 1; }

.sidebar .menu .section-nav { margin-top: auto; padding-top: var(--space-md); border-top: 1px solid var(--color-border); }
.sidebar .menu .nav-quick a { font-size: 0.8125rem; padding: 0.3rem 0.625rem; color: var(--color-text-tertiary); }
.sidebar .menu .nav-quick a:hover { color: var(--color-primary); background: transparent; }

.sidebar.collapsed .menu .label { display: none; }
.sidebar.collapsed .menu .section-title { display: none; }

.sidebar-footer {
    margin-top: var(--space-md);
    padding: var(--space-sm) 0.75rem 0;
    border-top: 1px solid var(--color-border);
    color: var(--color-text-tertiary);
    font-size: 0.6875rem;
}

/* Collapsible sidebar */
.sidebar .menu .section.collapsible .section-title { display: flex; align-items: center; justify-content: space-between; cursor: pointer; padding: 0.4375rem 0.625rem; border-radius: var(--radius-sm); margin-bottom: 0; transition: color var(--transition-fast); user-select: none; }
.sidebar .menu .section.collapsible .section-title:hover { color: var(--color-text); }
.sidebar .menu .section.collapsible .section-title-content { display: flex; align-items: center; gap: 0.5rem; font-size: 0.8125rem; font-weight: 500; color: var(--color-text-secondary); text-transform: none; letter-spacing: 0; }
.sidebar .menu .section.collapsible .section-title-content .nav-icon { width: 16px; height: 16px; opacity: 0.6; }
.sidebar .menu .section.collapsible .section-chevron { width: 14px; height: 14px; opacity: 0.4; transition: transform var(--transition-fast); }
.sidebar .menu .section.collapsible.expanded .section-chevron { transform: rotate(180deg); }
.sidebar .menu .section.collapsible .section-items { max-height: 0; overflow: hidden; transition: max-height 0.2s ease-out; padding-left: 0.375rem; }
.sidebar .menu .section.collapsible.expanded .section-items { max-height: 1200px; transition: max-height 0.3s ease-in; }
.sidebar .menu .section.collapsible .section-items li { margin-bottom: 1px; }
.sidebar .menu .section.collapsible .section-items a { padding: 0.375rem 0.625rem; font-size: 0.8125rem; }
.sidebar .menu .section-subgroup-label { font-size: 0.6875rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--color-text-secondary); opacity: 0.5; padding: 0.625rem 0.625rem 0.25rem; margin-top: 0.25rem; }

.sidebar .menu .section .section-link { display: flex; align-items: center; gap: 0.5rem; padding: 0.4375rem 0.625rem; color: var(--color-text-secondary); text-decoration: none; border-radius: var(--radius-sm); transition: color var(--transition-fast); font-size: 0.8125rem; font-weight: 500; border-left: 2px solid transparent; }
.sidebar .menu .section .section-link .nav-icon { width: 16px; height: 16px; opacity: 0.6; }
.sidebar .menu .section .section-link:hover { color: var(--color-text); }
.sidebar .menu .section .section-link.active { color: var(--color-text); border-left-color: var(--color-primary); background: transparent; }
.sidebar .menu .section .section-link.active .nav-icon { opacity: 1; }

.sidebar .menu .section.collapsible.expanded .section-title-content { color: var(--color-text); }
.sidebar .menu .section.collapsible.expanded .section-title-content .nav-icon { opacity: 1; }

.content-region { flex: 1 1 auto; min-width: 0; width: 100%; }
.content-region > section { margin-bottom: 2rem; }
body[data-theme] .main-content { margin-top: 0; padding-top: 1.25rem; }

/* ===== ACTION BAR ===== */
.action-bar { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; margin-bottom: 1.25rem; flex-wrap: wrap; }
.action-bar-left { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.action-bar-right { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.action-buttons { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }

/* ===== FILTER BAR ===== */
.filter-bar { display: flex; align-items: center; gap: 0.5rem; margin-top: 0.25rem; margin-bottom: 1.5rem; flex-wrap: wrap; }
.filter-group { display: flex; align-items: center; gap: 0.375rem; }
.filter-label { font-size: 0.8125rem; color: var(--color-text-secondary); white-space: nowrap; }
.search-input-wrapper { position: relative; display: flex; align-items: center; }
.search-input-wrapper .search-icon { position: absolute; left: 0.625rem; width: 14px; height: 14px; color: var(--color-text-secondary); pointer-events: none; }
.search-input-wrapper input { padding-left: 2rem; }

/* ===== TABS ===== */
.tabs { display: block; margin-bottom: 1.25rem; }
/* When tabs are direct children (no tab-list wrapper) */
.tabs > .tab { display: inline-block; }
.tabs:not(:has(.tab-list)) { display: flex; flex-wrap: nowrap; border-bottom: 1px solid var(--color-border); margin-bottom: 1.25rem; }
.tab-list { display: flex; gap: 0; border-bottom: 1px solid var(--color-border); list-style: none; margin: 0 0 1.5rem 0; padding: 0; overflow-x: auto; scrollbar-width: none; }
.tab-list::-webkit-scrollbar { display: none; }
.tab { padding: 1.125rem 1.5rem; font-size: 0.875rem; font-weight: 500; color: var(--color-text-secondary); cursor: pointer; box-shadow: inset 0 -2px 0 transparent; background: transparent; border: none; text-decoration: none; transition: color 0.15s, box-shadow 0.15s; list-style: none; white-space: nowrap; }
.tab:hover { color: var(--color-text); }
.tab.active { color: var(--color-primary); box-shadow: inset 0 -2px 0 var(--color-primary); }
.tab-content { display: none; }
.tab-content.active { display: block; }
.tab-pane { display: none; }
.tab-pane.active { display: block; }

/* ===== DEVICE / ENDPOINT CARDS ===== */
.device-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1rem; }
.device-card { background: var(--color-bg-secondary); border: 1px solid var(--color-border); border-radius: var(--radius-lg); padding: 1.125rem; transition: border-color 0.15s; }
.device-card:hover { border-color: #2d2d35; }
.device-card-header { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 0.75rem; }
.device-card-title { font-size: 0.9375rem; font-weight: 600; color: var(--color-text); margin-bottom: 0.125rem; }
.device-card-subtitle { font-size: 0.8125rem; color: var(--color-text-secondary); }
.device-card-meta { display: flex; flex-direction: column; gap: 0.3rem; }
.device-card-row { display: flex; align-items: center; gap: 0.375rem; font-size: 0.8125rem; color: var(--color-text-secondary); }
.device-card-footer { margin-top: 0.875rem; padding-top: 0.75rem; border-top: 1px solid var(--color-border); display: flex; align-items: center; justify-content: space-between; }

/* ===== PROGRESS ===== */
.progress-bar { width: 100%; height: 4px; background: var(--color-border); border-radius: 2px; overflow: hidden; }
.progress-bar-fill { height: 100%; background: var(--color-primary); border-radius: 2px; transition: width 0.3s ease; }
.progress-bar-fill.success { background: var(--color-success); }
.progress-bar-fill.warning { background: var(--color-warning); }
.progress-bar-fill.danger { background: var(--color-danger); }
.progress-label { display: flex; justify-content: space-between; font-size: 0.75rem; color: var(--color-text-secondary); margin-bottom: 0.3rem; }
progress { -webkit-appearance: none; appearance: none; width: 100%; height: 4px; border-radius: 2px; border: none; }
progress::-webkit-progress-bar { background: var(--color-border); border-radius: 2px; }
progress::-webkit-progress-value { background: var(--color-primary); border-radius: 2px; }
progress::-moz-progress-bar { background: var(--color-primary); border-radius: 2px; }

/* ===== ALERTS / BANNERS ===== */
.alert { display: flex; align-items: flex-start; gap: 0.75rem; padding: 0.75rem 1rem; border-radius: var(--radius-md); border: 1px solid var(--color-border); font-size: 0.875rem; margin-bottom: 1rem; }
.alert-icon { flex-shrink: 0; width: 16px; height: 16px; margin-top: 1px; }
.alert-title { font-weight: 600; margin-bottom: 0.125rem; }
.alert-body { flex: 1; min-width: 0; }
.alert-info { background: rgba(59,130,246,0.06); border-color: rgba(59,130,246,0.2); color: #93c5fd; }
.alert-success { background: rgba(16,185,129,0.06); border-color: rgba(16,185,129,0.2); color: #6ee7b7; }
.alert-warning { background: rgba(245,158,11,0.06); border-color: rgba(245,158,11,0.2); color: #fcd34d; }
.alert-danger, .alert-error { background: rgba(239,68,68,0.06); border-color: rgba(239,68,68,0.2); color: #fca5a5; }
.alert-muted { background: var(--color-bg-secondary); border-color: var(--color-border); color: var(--color-text-secondary); }

/* ===== MODALS ===== */
.modal { display: none; position: fixed; inset: 0; z-index: 1000; align-items: center; justify-content: center; }
.modal.open { display: flex; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,0.7); }
.modal-container { position: relative; background: var(--color-bg-secondary); border: 1px solid var(--color-border); border-radius: var(--radius-lg); padding: 1.5rem; width: 500px; max-width: 94vw; max-height: 90vh; overflow-y: auto; z-index: 1; }
.modal-container-lg { width: 700px; }
.modal-container-sm { width: 380px; }
.modal-title { font-size: 1rem; font-weight: 600; margin-bottom: 1rem; }
.modal-close { position: absolute; top: 1rem; right: 1rem; background: transparent; border: none; cursor: pointer; color: var(--color-text-secondary); padding: 0.25rem; border-radius: var(--radius-sm); }
.modal-close:hover { color: var(--color-text); }
.modal-actions { display: flex; justify-content: flex-end; gap: 0.5rem; margin-top: 1.25rem; padding-top: 1rem; border-top: 1px solid var(--color-border); }

/* ===== DROPDOWN MENU ===== */
.dropdown { position: relative; display: inline-flex; }
.dropdown-menu { display: none; position: absolute; top: calc(100% + 4px); right: 0; background: var(--color-bg-secondary); border: 1px solid var(--color-border); border-radius: var(--radius-md); min-width: 160px; z-index: 500; overflow: hidden; }
.dropdown-menu.open { display: block; }
.dropdown-menu.left { right: auto; left: 0; }
.dropdown-item { display: flex; align-items: center; gap: 0.5rem; padding: 0.5rem 0.875rem; font-size: 0.875rem; color: var(--color-text-secondary); text-decoration: none; cursor: pointer; background: transparent; border: none; width: 100%; text-align: left; transition: background 0.1s, color 0.1s; }
.dropdown-item:hover { background: var(--color-bg-elevated); color: var(--color-text); }
.dropdown-item.danger { color: var(--color-danger); }
.dropdown-item.danger:hover { background: rgba(239,68,68,0.08); color: var(--color-danger); }
.dropdown-divider { height: 1px; background: var(--color-border); margin: 0.25rem 0; }
.dropdown-header { padding: 0.375rem 0.875rem; font-size: 0.75rem; font-weight: 600; color: var(--color-text-secondary); text-transform: uppercase; letter-spacing: 0.05em; }

/* ===== COMMAND PALETTE ===== */
.command-palette { position: fixed; inset: 0; z-index: 9000; display: none; align-items: flex-start; justify-content: center; padding-top: 15vh; }
.command-palette.open { display: flex; }
.command-palette-overlay { position: absolute; inset: 0; background: rgba(0,0,0,0.6); }
.command-palette-container { position: relative; width: 560px; max-width: 94vw; background: var(--color-bg-secondary); border: 1px solid var(--color-border); border-radius: var(--radius-lg); overflow: hidden; z-index: 1; }
.command-palette-header { padding: 0; border-bottom: 1px solid var(--color-border); }
.command-palette-input { width: 100%; padding: 0.875rem 1rem; background: transparent; border: none; outline: none; font-size: 0.9375rem; color: var(--color-text); font-family: inherit; }
.command-palette-input::placeholder { color: var(--color-text-secondary); }
.command-palette-list { max-height: 360px; overflow-y: auto; padding: 0.25rem; }
.command-palette-item { display: flex; align-items: center; gap: 0.75rem; padding: 0.625rem 0.75rem; border-radius: var(--radius-sm); cursor: pointer; transition: background 0.1s; }
.command-palette-item:hover, .command-palette-item.selected { background: var(--color-bg-elevated); }
.command-palette-item-icon { width: 16px; height: 16px; color: var(--color-text-secondary); flex-shrink: 0; }
.command-palette-item-label { font-size: 0.875rem; color: var(--color-text); }
.command-palette-item-section { font-size: 0.75rem; color: var(--color-text-secondary); margin-left: auto; }
.command-palette-empty { padding: 2rem; text-align: center; font-size: 0.875rem; color: var(--color-text-secondary); }
.btn-command-palette { display: flex; align-items: center; gap: 0.5rem; padding: 0.375rem 0.75rem; background: var(--color-bg-secondary); border: 1px solid var(--color-border); border-radius: var(--radius-md); color: var(--color-text-secondary); font-size: 0.8125rem; cursor: pointer; transition: border-color 0.15s; }
.btn-command-palette:hover { border-color: #2d2d35; color: var(--color-text); }
.kbd-shortcut { font-size: 0.6875rem; font-family: monospace; background: var(--color-bg-elevated); border: 1px solid var(--color-border); padding: 1px 4px; border-radius: 3px; color: var(--color-text-secondary); }

/* ===== NAV USER MENU ===== */
.nav-user-menu { position: relative; }
.nav-avatar { width: 28px; height: 28px; border-radius: 50%; background: var(--color-primary); color: #fff; font-size: 0.75rem; font-weight: 600; display: flex; align-items: center; justify-content: center; cursor: pointer; border: none; flex-shrink: 0; }
.nav-user-dropdown { display: none; position: absolute; top: calc(100% + 8px); right: 0; background: var(--color-bg-secondary); border: 1px solid var(--color-border); border-radius: var(--radius-md); min-width: 180px; z-index: 600; overflow: hidden; }
.nav-user-dropdown.open { display: block; }
.nav-user-email { padding: 0.625rem 0.875rem; font-size: 0.8125rem; color: var(--color-text-secondary); border-bottom: 1px solid var(--color-border); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-dropdown-item { display: block; padding: 0.5rem 0.875rem; font-size: 0.875rem; color: var(--color-text-secondary); text-decoration: none; transition: background 0.1s, color 0.1s; }
.nav-dropdown-item:hover { background: var(--color-bg-elevated); color: var(--color-text); }
.nav-dropdown-logout { color: var(--color-danger); }
.nav-dropdown-logout:hover { background: rgba(239,68,68,0.08); color: var(--color-danger); }
.nav-right-absolute { display: flex; align-items: center; gap: 0.5rem; margin-left: auto; }
.nav-badge { display: inline-flex; align-items: center; justify-content: center; vertical-align: middle; background: var(--color-danger); color: #fff; font-size: 0.6875rem; font-weight: 700; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; margin-left: 4px; line-height: 1; }
.nav-auth { font-size: 0.875rem; }

/* ===== TOASTS ===== */
.toast-container { position: fixed; bottom: 1.25rem; right: 1.25rem; display: flex; flex-direction: column; gap: 0.5rem; z-index: 9999; pointer-events: none; }
.toast { display: flex; align-items: center; gap: 0.75rem; padding: 0.75rem 1rem; background: var(--color-bg-secondary); border: 1px solid var(--color-border); border-radius: var(--radius-md); min-width: 280px; max-width: 400px; pointer-events: all; font-size: 0.875rem; color: var(--color-text); }
.toast.success { border-color: rgba(16,185,129,0.3); }
.toast.error { border-color: rgba(239,68,68,0.3); }
.toast.warning { border-color: rgba(245,158,11,0.3); }
.toast-icon { width: 16px; height: 16px; flex-shrink: 0; }
.toast.success .toast-icon { color: var(--color-success); }
.toast.error .toast-icon { color: var(--color-danger); }
.toast.warning .toast-icon { color: var(--color-warning); }
.toast-message { flex: 1; min-width: 0; }
.toast-close { background: none; border: none; cursor: pointer; color: var(--color-text-secondary); padding: 0.125rem; border-radius: var(--radius-sm); flex-shrink: 0; }
.toast-close:hover { color: var(--color-text); }

/* Flash messages */
.flash-message { display: flex; align-items: center; gap: 0.75rem; padding: 0.75rem 1rem; border-radius: var(--radius-md); border: 1px solid var(--color-border); font-size: 0.875rem; margin-bottom: 1rem; }
.flash-success { background: rgba(16,185,129,0.06); border-color: rgba(16,185,129,0.2); color: #6ee7b7; }
.flash-error { background: rgba(239,68,68,0.06); border-color: rgba(239,68,68,0.2); color: #fca5a5; }
.flash-warning { background: rgba(245,158,11,0.06); border-color: rgba(245,158,11,0.2); color: #fcd34d; }
.flash-info { background: rgba(59,130,246,0.06); border-color: rgba(59,130,246,0.2); color: #93c5fd; }

/* ===== CONFIRMATION DIALOG ===== */
.confirm-dialog { position: fixed; inset: 0; z-index: 9500; display: none; align-items: center; justify-content: center; }
.confirm-dialog.open { display: flex; }
.confirm-dialog-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,0.7); }
.confirm-dialog-box { position: relative; background: var(--color-bg-secondary); border: 1px solid var(--color-border); border-radius: var(--radius-lg); padding: 1.5rem; width: 400px; max-width: 94vw; z-index: 1; }
.confirm-dialog-icon { width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center; margin-bottom: 1rem; }
.confirm-dialog-icon.danger { background: rgba(239,68,68,0.12); color: var(--color-danger); }
.confirm-dialog-icon.warning { background: rgba(245,158,11,0.12); color: var(--color-warning); }
.confirm-dialog-title { font-size: 1rem; font-weight: 600; margin-bottom: 0.375rem; }
.confirm-dialog-message { font-size: 0.875rem; color: var(--color-text-secondary); margin-bottom: 1.25rem; line-height: 1.5; }
.confirm-dialog-actions { display: flex; justify-content: flex-end; gap: 0.5rem; }

/* ===== PAGINATION ===== */
.pagination { display: flex; align-items: center; gap: 0.25rem; margin-top: 1.25rem; }
.pagination-btn { display: flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: var(--radius-sm); border: 1px solid var(--color-border); background: transparent; color: var(--color-text-secondary); font-size: 0.875rem; cursor: pointer; text-decoration: none; transition: background 0.1s, color 0.1s, border-color 0.1s; }
.pagination-btn:hover { background: var(--color-bg-secondary); color: var(--color-text); }
.pagination-btn.active { background: var(--color-primary); border-color: var(--color-primary); color: #fff; }
.pagination-btn:disabled { opacity: 0.35; cursor: not-allowed; pointer-events: none; }
.pagination-ellipsis { display: flex; align-items: center; justify-content: center; width: 32px; height: 32px; color: var(--color-text-secondary); font-size: 0.875rem; }

/* ===== BREADCRUMB ===== */
.breadcrumb { display: flex; align-items: center; gap: 0.375rem; font-size: 0.8125rem; color: var(--color-text-secondary); margin-bottom: 1rem; flex-wrap: wrap; }
.breadcrumb-item { color: var(--color-text-secondary); text-decoration: none; }
.breadcrumb-item:hover { color: var(--color-text); }
.breadcrumb-item.active { color: var(--color-text); }
.breadcrumb-sep { color: var(--color-text-tertiary); }

/* ===== PROFILE PAGE ===== */
.profile-header { display: flex; align-items: center; gap: 1.25rem; padding: 1.5rem; background: var(--color-bg-secondary); border: 1px solid var(--color-border); border-radius: var(--radius-lg); margin-bottom: 1.25rem; }
.profile-avatar { width: 56px; height: 56px; border-radius: 50%; background: var(--color-primary); color: #fff; font-size: 1.375rem; font-weight: 600; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.profile-name { font-size: 1.125rem; font-weight: 600; margin-bottom: 0.125rem; }
.profile-email { font-size: 0.875rem; color: var(--color-text-secondary); }
.profile-section { margin-bottom: 1.5rem; }
.profile-section-title { font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: var(--color-text-secondary); margin-bottom: 0.75rem; }

/* ===== AVATARS ===== */
.avatar { display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; font-weight: 600; flex-shrink: 0; background: var(--color-bg-elevated); color: var(--color-text); }
.avatar-sm { width: 24px; height: 24px; font-size: 0.6875rem; }
.avatar-md { width: 32px; height: 32px; font-size: 0.8125rem; }
.avatar-lg { width: 48px; height: 48px; font-size: 1.125rem; }
.avatar-xl { width: 64px; height: 64px; font-size: 1.375rem; }
.avatar-stack { display: flex; }
.avatar-stack .avatar { border: 2px solid var(--color-bg); margin-left: -8px; }
.avatar-stack .avatar:first-child { margin-left: 0; }

/* ===== TAGS ===== */
.tag { display: inline-flex; align-items: center; gap: 0.25rem; padding: 0.125rem 0.5rem; font-size: 0.75rem; border-radius: var(--radius-sm); background: var(--color-bg-elevated); border: 1px solid var(--color-border); color: var(--color-text-secondary); }
.tag-blue { background: rgba(59,130,246,0.08); border-color: rgba(59,130,246,0.2); color: #93c5fd; }
.tag-green { background: rgba(16,185,129,0.08); border-color: rgba(16,185,129,0.2); color: #6ee7b7; }
.tag-red { background: rgba(239,68,68,0.08); border-color: rgba(239,68,68,0.2); color: #fca5a5; }
.tag-yellow { background: rgba(245,158,11,0.08); border-color: rgba(245,158,11,0.2); color: #fcd34d; }
.tag-purple { background: rgba(139,92,246,0.08); border-color: rgba(139,92,246,0.2); color: #c4b5fd; }

/* ===== DIVIDERS ===== */
.divider { height: 1px; background: var(--color-border); margin: 1rem 0; border: none; }
.divider-sm { margin: 0.5rem 0; }
.divider-lg { margin: 1.5rem 0; }
.divider-label { display: flex; align-items: center; gap: 0.75rem; color: var(--color-text-secondary); font-size: 0.75rem; margin: 1rem 0; }
.divider-label::before, .divider-label::after { content: ''; flex: 1; height: 1px; background: var(--color-border); }

/* ===== SKELETON LOADERS ===== */
.skeleton { background: var(--color-border); border-radius: var(--radius-sm); animation: skeleton-pulse 1.5s ease-in-out infinite; }
.skeleton-text { height: 0.875rem; width: 100%; margin-bottom: 0.5rem; }
.skeleton-text.w-75 { width: 75%; }
.skeleton-text.w-50 { width: 50%; }
.skeleton-text.w-25 { width: 25%; }
.skeleton-circle { border-radius: 50%; }
.skeleton-card { height: 120px; border-radius: var(--radius-lg); }
@keyframes skeleton-pulse { 0%, 100% { opacity: 0.5; } 50% { opacity: 1; } }

/* ===== EMPTY STATES ===== */
.empty-state { padding: 3rem 1.5rem; text-align: center; color: var(--color-text-secondary); }
.empty-state svg, .empty-state i { width: 36px; height: 36px; opacity: 0.3; margin-bottom: 0.875rem; display: block; margin-left: auto; margin-right: auto; }
.empty-state p { font-size: 0.9375rem; color: var(--color-text-secondary); margin-bottom: 0.5rem; }
.empty-state-sub { font-size: 0.8125rem; color: var(--color-text-tertiary); margin-bottom: 1.25rem; }
td.empty-state { padding: 3rem 1.5rem; }

/* ===== SCORE BOXES / COMPLIANCE ===== */
.score-box { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 1.25rem; background: var(--color-bg-secondary); border: 1px solid var(--color-border); border-radius: var(--radius-lg); text-align: center; }
.score-number { font-size: 2.5rem; font-weight: 700; color: var(--color-text); line-height: 1; }
.score-label { font-size: 0.8125rem; color: var(--color-text-secondary); margin-top: 0.375rem; }
.score-number.success { color: var(--color-success); }
.score-number.warning { color: var(--color-warning); }
.score-number.danger { color: var(--color-danger); }
.compliance-score { font-size: 3rem; font-weight: 700; line-height: 1; }
.compliance-score.high { color: var(--color-success); }
.compliance-score.medium { color: var(--color-warning); }
.compliance-score.low { color: var(--color-danger); }

/* ===== INFO ROWS ===== */
.info-row { display: flex; align-items: flex-start; gap: 0.5rem; padding: 0.5rem 0; border-bottom: 1px solid var(--color-border); font-size: 0.875rem; }
.info-row:last-child { border-bottom: none; }
.info-row-label { min-width: 140px; color: var(--color-text-secondary); flex-shrink: 0; }
.info-row-value { color: var(--color-text); flex: 1; word-break: break-all; }

/* ===== TIMELINE ===== */
.timeline { display: flex; flex-direction: column; gap: 0; }
.timeline-item { display: flex; gap: 1rem; position: relative; padding-bottom: 1.25rem; }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-line { display: flex; flex-direction: column; align-items: center; }
.timeline-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--color-primary); flex-shrink: 0; margin-top: 4px; }
.timeline-dot.success { background: var(--color-success); }
.timeline-dot.warning { background: var(--color-warning); }
.timeline-dot.danger { background: var(--color-danger); }
.timeline-dot.muted { background: var(--color-text-tertiary); }
.timeline-connector { flex: 1; width: 1px; background: var(--color-border); margin-top: 4px; }
.timeline-content { flex: 1; min-width: 0; }
.timeline-title { font-size: 0.875rem; font-weight: 500; color: var(--color-text); }
.timeline-time { font-size: 0.75rem; color: var(--color-text-secondary); }
.timeline-body { font-size: 0.8125rem; color: var(--color-text-secondary); margin-top: 0.25rem; }

/* ===== HEALTH / WORKFLOW ===== */
.health-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1rem; }
.health-card { background: var(--color-bg-secondary); border: 1px solid var(--color-border); border-radius: var(--radius-lg); padding: 1.125rem; }
.health-card-title { font-size: 0.875rem; font-weight: 500; color: var(--color-text); margin-bottom: 0.5rem; }
.health-card-value { font-size: 1.75rem; font-weight: 700; color: var(--color-text); line-height: 1; margin-bottom: 0.25rem; }
.health-card-meta { font-size: 0.75rem; color: var(--color-text-secondary); }
.health-status { display: inline-flex; align-items: center; gap: 0.375rem; font-size: 0.8125rem; }
.health-dot { width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; }
.health-dot.online { background: var(--color-success); }
.health-dot.offline { background: var(--color-danger); }
.health-dot.warning { background: var(--color-warning); }

/* ===== WORKFLOW STEPS ===== */
.workflow-steps { display: flex; align-items: flex-start; gap: 0; margin-bottom: 1.5rem; overflow-x: auto; }
.workflow-step { display: flex; align-items: center; flex-shrink: 0; }
.workflow-step-body { display: flex; flex-direction: column; align-items: center; gap: 0.375rem; padding: 0 0.75rem; text-align: center; }
.workflow-step-icon { width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--color-border); background: var(--color-bg-secondary); display: flex; align-items: center; justify-content: center; color: var(--color-text-secondary); font-size: 0.75rem; font-weight: 600; }
.workflow-step.active .workflow-step-icon { background: var(--color-primary); border-color: var(--color-primary); color: #fff; }
.workflow-step.done .workflow-step-icon { background: var(--color-success); border-color: var(--color-success); color: #fff; }
.workflow-step-label { font-size: 0.75rem; color: var(--color-text-secondary); white-space: nowrap; }
.workflow-step.active .workflow-step-label { color: var(--color-text); }
.workflow-connector { flex: 1; height: 1px; background: var(--color-border); min-width: 32px; }
.workflow-connector.done { background: var(--color-success); }

/* ===== PROPOSALS / CHANGE WORKFLOW ===== */
.proposal-card { background: var(--color-bg-secondary); border: 1px solid var(--color-border); border-radius: var(--radius-lg); padding: 1.125rem; margin-bottom: 0.75rem; transition: border-color 0.15s; }
.proposal-card:hover { border-color: #2d2d35; }
.proposal-card-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 0.75rem; margin-bottom: 0.625rem; }
.proposal-card-title { font-size: 0.9375rem; font-weight: 600; color: var(--color-text); }
.proposal-card-meta { font-size: 0.8125rem; color: var(--color-text-secondary); margin-bottom: 0.375rem; }
.proposal-card-footer { display: flex; align-items: center; justify-content: space-between; margin-top: 0.875rem; padding-top: 0.75rem; border-top: 1px solid var(--color-border); }

/* ===== CONFIG NAME CELL ===== */
.config-name-cell { display: flex; flex-direction: column; gap: 2px; }
.config-name { font-weight: 500; color: var(--color-text); }
.config-desc { font-size: 0.8125rem; color: var(--color-text-secondary); }
.config-type-icon { width: 28px; height: 28px; border-radius: var(--radius-sm); background: var(--color-bg-elevated); border: 1px solid var(--color-border); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }

/* ===== DIFF VIEWER ===== */
.diff-block { font-family: monospace; font-size: 0.8125rem; line-height: 1.6; border-radius: var(--radius-md); overflow: hidden; border: 1px solid var(--color-border); }
.diff-line { padding: 0.0625rem 0.875rem; display: flex; gap: 0.5rem; }
.diff-line.added { background: rgba(16,185,129,0.07); color: #6ee7b7; }
.diff-line.removed { background: rgba(239,68,68,0.07); color: #fca5a5; }
.diff-line.context { color: var(--color-text-secondary); }
.diff-prefix { opacity: 0.6; user-select: none; }

/* ===== CODE BLOCKS ===== */
pre, .code-block { background: var(--color-bg-secondary); border: 1px solid var(--color-border); border-radius: var(--radius-md); padding: 1rem; overflow-x: auto; }
pre code, .code-block code { font-family: monospace; font-size: 0.8125rem; line-height: 1.6; color: var(--color-text); background: transparent; border: none; padding: 0; }
code { font-family: monospace; font-size: 0.8125rem; background: var(--color-bg-elevated); border: 1px solid var(--color-border); padding: 0.125rem 0.375rem; border-radius: 3px; color: var(--color-text); }

/* ===== RISK LEVELS ===== */
.risk-critical { color: #ef4444; }
.risk-high { color: #f97316; }
.risk-medium { color: var(--color-warning); }
.risk-low { color: var(--color-success); }
.risk-badge-critical { background: rgba(239,68,68,0.12); color: #ef4444; border-color: rgba(239,68,68,0.25); }
.risk-badge-high { background: rgba(249,115,22,0.12); color: #f97316; border-color: rgba(249,115,22,0.25); }
.risk-badge-medium { background: rgba(245,158,11,0.1); color: var(--color-warning); border-color: rgba(245,158,11,0.25); }
.risk-badge-low { background: rgba(16,185,129,0.1); color: var(--color-success); border-color: rgba(16,185,129,0.25); }

/* ===== UTILITY CLASSES ===== */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-left { text-align: left; }
.text-primary { color: var(--color-primary); }
.text-success { color: var(--color-success); }
.text-warning { color: var(--color-warning); }
.text-danger { color: var(--color-danger); }
.text-muted { color: var(--color-text-secondary); }
.text-secondary { color: var(--color-text-secondary); }
.font-mono { font-family: monospace; }
.font-bold { font-weight: 700; }
.font-semibold { font-weight: 600; }
.font-medium { font-weight: 500; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.flex { display: flex; }
.flex-col { display: flex; flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-end { justify-content: flex-end; }
.gap-1 { gap: 0.25rem; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 0.75rem; }
.mt-4 { margin-top: 1rem; }
.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }
.p-0 { padding: 0; }
.w-full { width: 100%; }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.pointer { cursor: pointer; }
.no-wrap { white-space: nowrap; }
.opacity-50 { opacity: 0.5; }
.opacity-70 { opacity: 0.7; }

/* ===== ANIMATIONS ===== */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@keyframes slideDown { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: translateY(0); } }
@keyframes spin { to { transform: rotate(360deg); } }
.animate-fade-in { animation: fadeIn 0.2s ease; }
.animate-slide-up { animation: slideUp 0.2s ease; }
.animate-spin { animation: spin 0.8s linear infinite; }

/* ===== TOOLTIP ===== */
[data-tooltip] { position: relative; }
[data-tooltip]::after { content: attr(data-tooltip); position: absolute; bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%); background: var(--color-bg-elevated); color: var(--color-text); font-size: 0.75rem; padding: 0.3rem 0.625rem; border-radius: var(--radius-sm); border: 1px solid var(--color-border); white-space: nowrap; pointer-events: none; opacity: 0; transition: opacity 0.15s; z-index: 1000; }
[data-tooltip]:hover::after { opacity: 1; }

/* ===== STATUS DOTS ===== */
.status-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex-shrink: 0; }
.status-dot.active, .status-dot.online { background: var(--color-success); }
.status-dot.inactive, .status-dot.offline { background: var(--color-text-tertiary); }
.status-dot.warning { background: var(--color-warning); }
.status-dot.error { background: var(--color-danger); }
.status-dot.pending { background: var(--color-primary); }

/* ===== VERSION HISTORY ===== */
.version-list { display: flex; flex-direction: column; gap: 0.5rem; }
.version-item { display: flex; align-items: center; gap: 0.75rem; padding: 0.625rem 0.875rem; background: var(--color-bg-secondary); border: 1px solid var(--color-border); border-radius: var(--radius-md); font-size: 0.875rem; }
.version-item.current { border-color: var(--color-primary); }
.version-number { font-family: monospace; font-weight: 600; color: var(--color-text); }
.version-meta { color: var(--color-text-secondary); font-size: 0.8125rem; }
.version-actions { margin-left: auto; display: flex; gap: 0.375rem; }

/* ===== CIS BENCHMARK ===== */
.cis-control { padding: 0.75rem 1rem; border: 1px solid var(--color-border); border-radius: var(--radius-md); margin-bottom: 0.5rem; }
.cis-control-header { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 0.375rem; }
.cis-control-id { font-family: monospace; font-size: 0.8125rem; font-weight: 600; color: var(--color-primary); }
.cis-control-title { font-size: 0.875rem; font-weight: 500; }
.cis-control-desc { font-size: 0.8125rem; color: var(--color-text-secondary); }

/* ===== MEDIA QUERIES ===== */
@media (max-width: 1024px) {
    .app-layout { grid-template-columns: 1fr; }
    .sidebar { display: none; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
    .nav-menu { display: none; }
    .page-header { flex-direction: column; align-items: flex-start; gap: 0.75rem; }
    .stats-grid { grid-template-columns: 1fr 1fr; }
    .card-body { padding: 1rem; }
    .data-table th, .data-table td { padding: 0.5rem 0.75rem; }
}
@media (max-width: 480px) {
    .stats-grid { grid-template-columns: 1fr; }
}

/* ===== DAISY UI OVERRIDES — force dark theme on all components ===== */
/* These use !important to override DaisyUI's data-theme="business" defaults */

/* Base */
[data-theme="business"], [data-theme="business"] * {
    --b1: #0a0a0b;
    --b2: #111113;
    --b3: #1a1a1e;
    --bc: #e8e8ed;
    --p: #3b82f6;
    --pc: #ffffff;
    --s: #10b981;
    --sc: #ffffff;
    --a: #f59e0b;
    --ac: #000000;
    --n: #1f1f23;
    --nc: #e8e8ed;
    --er: #ef4444;
    --erc: #ffffff;
    --su: #10b981;
    --suc: #ffffff;
    --wa: #f59e0b;
    --wac: #000000;
    --in: #3b82f6;
    --inc: #ffffff;
}

body[data-theme="business"] {
    background-color: #0a0a0b !important;
    color: #e8e8ed !important;
}

/* DaisyUI button overrides */
.btn {
    border-radius: var(--radius-md) !important;
    font-size: 0.875rem !important;
    font-weight: 500 !important;
    letter-spacing: 0 !important;
    text-transform: none !important;
    height: auto !important;
    min-height: auto !important;
    padding: 0.4375rem 0.875rem !important;
    transition: background-color 0.15s, border-color 0.15s, opacity 0.15s !important;
    animation: none !important;
    box-shadow: none !important;
    background-color: #111113 !important;
    border-color: #1f1f23 !important;
    color: #e8e8ed !important;
}
.btn:hover { background-color: #1a1a1e !important; border-color: #2d2d35 !important; color: #e8e8ed !important; }
.btn:active:hover, .btn:active:focus { transform: none !important; animation: none !important; }
.btn-primary {
    background-color: #3b82f6 !important;
    border-color: #3b82f6 !important;
    color: #fff !important;
}
.btn-primary:hover {
    background-color: #2563eb !important;
    border-color: #2563eb !important;
    color: #fff !important;
}
.btn-ghost {
    background-color: transparent !important;
    border-color: var(--color-border) !important;
    color: var(--color-text-secondary) !important;
}
.btn-ghost:hover {
    background-color: var(--color-bg-secondary) !important;
    border-color: #2d2d35 !important;
    color: var(--color-text) !important;
}
.btn-outline {
    background-color: transparent !important;
    border-color: var(--color-border) !important;
    color: var(--color-text-secondary) !important;
}
.btn-outline:hover {
    background-color: var(--color-bg-secondary) !important;
    border-color: #2d2d35 !important;
    color: var(--color-text) !important;
}
.btn-error {
    background-color: rgba(239,68,68,0.12) !important;
    border-color: rgba(239,68,68,0.3) !important;
    color: #ef4444 !important;
}
.btn-error:hover {
    background-color: rgba(239,68,68,0.2) !important;
    border-color: rgba(239,68,68,0.5) !important;
    color: #ef4444 !important;
}
.btn-success {
    background-color: #10b981 !important;
    border-color: #10b981 !important;
    color: #fff !important;
}
.btn-success:hover {
    background-color: #059669 !important;
    border-color: #059669 !important;
    color: #fff !important;
}
.btn-warning {
    background-color: rgba(245,158,11,0.12) !important;
    border-color: rgba(245,158,11,0.3) !important;
    color: #f59e0b !important;
}
.btn-sm {
    padding: 0.3125rem 0.6875rem !important;
    font-size: 0.8125rem !important;
}
.btn-xs {
    padding: 0.1875rem 0.5rem !important;
    font-size: 0.75rem !important;
}
.btn-lg {
    padding: 0.625rem 1.25rem !important;
    font-size: 1rem !important;
}
.btn-circle {
    padding: 0 !important;
    width: 32px !important;
    height: 32px !important;
    border-radius: 50% !important;
}
.btn-square {
    padding: 0 !important;
    width: 32px !important;
    height: 32px !important;
}

/* DaisyUI input overrides */
.input, .textarea, .select {
    background-color: #111113 !important;
    border-color: #1f1f23 !important;
    color: #e8e8ed !important;
    border-radius: var(--radius-md) !important;
    box-shadow: none !important;
    outline: none !important;
    min-height: auto !important;
    height: auto !important;
    font-size: 0.875rem !important;
    transition: border-color 0.15s !important;
}
.input:focus, .textarea:focus, .select:focus {
    border-color: #3b82f6 !important;
    outline: none !important;
    box-shadow: none !important;
}
.input::placeholder, .textarea::placeholder { color: #6e6e80 !important; }
.label { padding: 0 0 0.3rem 0 !important; }
.label-text { font-size: 0.875rem !important; color: #e8e8ed !important; font-weight: 500 !important; }
.form-control { gap: 0 !important; }

/* DaisyUI card overrides */
.card {
    background-color: #111113 !important;
    border: 1px solid #1f1f23 !important;
    border-radius: var(--radius-lg) !important;
    box-shadow: none !important;
}
.card:hover { box-shadow: none !important; }
.card-body { padding: 1.25rem !important; }
.card-title { font-size: 1rem !important; font-weight: 600 !important; color: #e8e8ed !important; }

/* DaisyUI modal overrides */
.modal-box {
    background-color: #111113 !important;
    border: 1px solid #1f1f23 !important;
    border-radius: var(--radius-lg) !important;
    box-shadow: none !important;
    padding: 1.5rem !important;
}
.modal-backdrop { background: rgba(0,0,0,0.7) !important; }

/* DaisyUI badge overrides */
.badge {
    font-size: 0.75rem !important;
    border-radius: 4px !important;
    font-weight: 500 !important;
    text-transform: none !important;
    letter-spacing: 0 !important;
    padding: 0.125rem 0.5rem !important;
    height: auto !important;
}
.badge-primary { background-color: rgba(59,130,246,0.15) !important; border-color: rgba(59,130,246,0.25) !important; color: #93c5fd !important; }
.badge-success { background-color: rgba(16,185,129,0.12) !important; border-color: rgba(16,185,129,0.2) !important; color: #6ee7b7 !important; }
.badge-error { background-color: rgba(239,68,68,0.12) !important; border-color: rgba(239,68,68,0.2) !important; color: #fca5a5 !important; }
.badge-warning { background-color: rgba(245,158,11,0.1) !important; border-color: rgba(245,158,11,0.2) !important; color: #fcd34d !important; }
.badge-ghost { background-color: var(--color-bg-elevated) !important; border-color: var(--color-border) !important; color: var(--color-text-secondary) !important; }
.badge-neutral { background-color: var(--color-bg-elevated) !important; border-color: var(--color-border) !important; color: var(--color-text-secondary) !important; }
.badge-outline { background-color: transparent !important; }

/* DaisyUI table overrides */
.table { border-collapse: collapse !important; }
.table th { background-color: transparent !important; color: #6e6e80 !important; font-size: 0.75rem !important; font-weight: 600 !important; text-transform: uppercase !important; letter-spacing: 0.05em !important; padding: 0.625rem 0.875rem !important; border-bottom: 1px solid #1f1f23 !important; }
.table td { padding: 0.625rem 0.875rem !important; border-bottom: 1px solid #1f1f23 !important; color: #e8e8ed !important; font-size: 0.875rem !important; }
.table tr:hover td { background-color: rgba(255,255,255,0.02) !important; }
.table tr:last-child td { border-bottom: none !important; }

/* DaisyUI dropdown/menu overrides */
.menu { padding: 0 !important; }
.menu li a, .menu li button { border-radius: var(--radius-sm) !important; padding: 0.375rem 0.625rem !important; font-size: 0.875rem !important; color: #6e6e80 !important; transition: background-color 0.1s, color 0.1s !important; }
.menu li a:hover, .menu li button:hover { background-color: #1a1a1e !important; color: #e8e8ed !important; }
.menu li a.active, .menu li button.active { background-color: transparent !important; color: #e8e8ed !important; }

/* DaisyUI alert overrides */
.alert { border-radius: var(--radius-md) !important; padding: 0.75rem 1rem !important; box-shadow: none !important; }
.alert-info { background-color: rgba(59,130,246,0.08) !important; border-color: rgba(59,130,246,0.2) !important; color: #93c5fd !important; }
.alert-success { background-color: rgba(16,185,129,0.08) !important; border-color: rgba(16,185,129,0.2) !important; color: #6ee7b7 !important; }
.alert-warning { background-color: rgba(245,158,11,0.08) !important; border-color: rgba(245,158,11,0.2) !important; color: #fcd34d !important; }
.alert-error { background-color: rgba(239,68,68,0.08) !important; border-color: rgba(239,68,68,0.2) !important; color: #fca5a5 !important; }

/* DaisyUI divider overrides */
.divider { color: #1f1f23 !important; }
.divider::before, .divider::after { background-color: #1f1f23 !important; }

/* DaisyUI stat overrides */
.stat { background-color: #111113 !important; border: 1px solid #1f1f23 !important; padding: 1.125rem !important; }
.stat-title { color: #6e6e80 !important; font-size: 0.8125rem !important; }
.stat-value { color: #e8e8ed !important; font-size: 2rem !important; font-weight: 700 !important; }
.stat-desc { color: #6e6e80 !important; font-size: 0.75rem !important; }

/* DaisyUI toggle/checkbox/radio overrides */
.toggle { --tglbg: #1f1f23 !important; border-color: #1f1f23 !important; }
.toggle:checked { --tglbg: #3b82f6 !important; border-color: #3b82f6 !important; }
.checkbox { border-color: #1f1f23 !important; border-radius: 3px !important; background-color: #111113 !important; }
.checkbox:checked { background-color: #3b82f6 !important; border-color: #3b82f6 !important; }
.radio { border-color: #1f1f23 !important; background-color: #111113 !important; }
.radio:checked { background-color: #3b82f6 !important; border-color: #3b82f6 !important; }
.range { accent-color: #3b82f6; }

/* DaisyUI tooltip overrides */
.tooltip::before { background-color: #1a1a1e !important; color: #e8e8ed !important; border: 1px solid #1f1f23 !important; font-size: 0.75rem !important; border-radius: var(--radius-sm) !important; }
.tooltip::after { border-color: #1a1a1e transparent transparent transparent !important; }

/* DaisyUI progress overrides */
.progress { height: 4px !important; border-radius: 2px !important; background-color: #1f1f23 !important; }
.progress::-webkit-progress-bar { background-color: #1f1f23 !important; }
.progress::-webkit-progress-value { background-color: #3b82f6 !important; border-radius: 2px !important; }
.progress-primary::-webkit-progress-value { background-color: #3b82f6 !important; }
.progress-success::-webkit-progress-value { background-color: #10b981 !important; }
.progress-warning::-webkit-progress-value { background-color: #f59e0b !important; }
.progress-error::-webkit-progress-value { background-color: #ef4444 !important; }

/* DaisyUI steps overrides */
.steps .step-primary::before { background-color: #3b82f6 !important; }
.steps .step-primary::after { background-color: #3b82f6 !important; color: #fff !important; }
.step::before { background-color: #1f1f23 !important; }

/* DaisyUI drawer overrides */
.drawer-side { background-color: #0a0a0b !important; }
.drawer-overlay { background-color: rgba(0,0,0,0.6) !important; }

/* DaisyUI navbar overrides */
.navbar { background-color: transparent !important; padding: 0 !important; min-height: auto !important; }

/* DaisyUI collapse overrides */
.collapse { background-color: #111113 !important; border: 1px solid #1f1f23 !important; border-radius: var(--radius-md) !important; }
.collapse-title { font-size: 0.9375rem !important; font-weight: 500 !important; padding: 0.875rem 1rem !important; color: #e8e8ed !important; }
.collapse-content { padding: 0 1rem 1rem !important; color: #6e6e80 !important; font-size: 0.875rem !important; }

/* DaisyUI kbd override */
.kbd { background-color: #1a1a1e !important; border-color: #1f1f23 !important; color: #e8e8ed !important; font-size: 0.75rem !important; border-radius: 3px !important; padding: 0.125rem 0.375rem !important; box-shadow: none !important; }

/* DaisyUI loading overrides */
.loading { color: #3b82f6 !important; }

/* ===== BUTTON PADDING FIX (override DaisyUI specificity) ===== */
button.btn, a.btn, input[type="button"].btn, input[type="submit"].btn {
    display: inline-flex !important;
    align-items: center !important;
    gap: 0.375rem !important;
}
.btn i, .btn svg { width: 14px !important; height: 14px !important; flex-shrink: 0; }
.btn-sm i, .btn-sm svg { width: 13px !important; height: 13px !important; }
.btn-lg i, .btn-lg svg { width: 16px !important; height: 16px !important; }

/* ===== COMPLIANCE DASHBOARD ===== */
.compliance-sections {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}
.compliance-section {
    background: var(--color-bg-secondary);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    transition: border-color 0.15s;
}
.compliance-section:hover { border-color: #2d2d35; }
.compliance-section h3 {
    font-size: 0.9375rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.375rem;
}
.compliance-section p {
    font-size: 0.875rem;
    color: var(--color-text-secondary);
    margin-bottom: 0.875rem;
    line-height: 1.5;
}
.compliance-features { margin-top: 1.5rem; }
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
}
.feature-card {
    background: var(--color-bg-secondary);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    transition: border-color 0.15s;
}
.feature-card:hover { border-color: #2d2d35; }
.feature-card h4 {
    font-size: 0.9375rem;
    font-weight: 600;
    margin-bottom: 0.375rem;
}
.feature-card p {
    font-size: 0.875rem;
    color: var(--color-text-secondary);
    margin-bottom: 0.875rem;
    line-height: 1.5;
}
.compliance-summary-box { padding: 0.25rem 0; }
.compliance-summary-box h4 { font-size: 0.9375rem; font-weight: 600; margin-bottom: 0.875rem; }
.compliance-progress-bar {
    width: 100%;
    height: 6px;
    background: var(--color-border);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 1rem;
}
.compliance-progress-fill {
    height: 100%;
    background: var(--color-primary);
    border-radius: 3px;
    transition: width 0.4s ease;
}
.compliance-stat-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.375rem 0;
    border-bottom: 1px solid var(--color-border);
    font-size: 0.875rem;
}
.compliance-stat-row:last-child { border-bottom: none; }
.compliance-stat-label { color: var(--color-text-secondary); }
.compliance-stat-value { font-weight: 500; }
.compliance-loading-text { color: var(--color-text-secondary); font-size: 0.875rem; }
.compliance-error-text { color: var(--color-danger); font-size: 0.875rem; }

/* ===== LANDING PAGE (lp-*) ===== */
.landing-page {
    min-height: 100vh;
    background: #000;
    color: #e8e8ed;
    overflow-x: hidden;
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0;
}
/* Override main layout for landing page */
.landing-page ~ * { display: none; }
body:has(.landing-page) .app-layout { display: block; padding: 0; gap: 0; }
body:has(.landing-page) .app-layout .sidebar { display: none; }
body:has(.landing-page) .content-region { padding: 0; min-width: 0; width: 100%; }
body:has(.landing-page) .main-content { padding: 0 !important; margin: 0 !important; max-width: 100% !important; width: 100%; }
body:has(.landing-page) .app-navbar { background: rgba(0,0,0,0.8); backdrop-filter: blur(8px); border-bottom: 1px solid rgba(255,255,255,0.06); }
body:has(.landing-page) .nav-login {
    background: rgba(0,212,255,0.08);
    border: 1px solid rgba(0,212,255,0.30);
    color: #00d4ff;
    border-radius: 6px;
    padding: 0.375rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    transition: background 0.2s, border-color 0.2s, color 0.2s;
}
body:has(.landing-page) .nav-login:hover {
    background: rgba(0,212,255,0.16);
    border-color: rgba(0,212,255,0.55);
    color: #00d4ff;
}

/* Hero */
.lp-hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: #000;
    overflow: hidden;
}
/* Canvas network animation */
#lp-net-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    opacity: 0;
    animation: lp-canvas-fadein 1.2s ease 300ms forwards;
}
@keyframes lp-canvas-fadein {
    to { opacity: 1; }
}
/* Static scanline removed — canvas draws the sweep dynamically */
/* Radial vignette so text stays readable */
.lp-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 70% 60% at 50% 50%, transparent 30%, rgba(0,0,0,0.72) 100%);
    pointer-events: none;
    z-index: 1;
}
.lp-hero-inner { position: relative; z-index: 2; padding: 2rem 1.5rem; max-width: 760px; margin: 0 auto; }
.lp-hero-content {}
.lp-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(3.5rem, 12vw, 7rem);
    font-weight: 700;
    letter-spacing: 0.1em;
    color: #fff;
    line-height: 1;
    margin-bottom: 1rem;
    text-shadow: 0 0 80px rgba(0,212,255,0.25);
}
.lp-tagline {
    font-size: clamp(0.875rem, 2vw, 1.0625rem);
    font-weight: 500;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: rgba(0,212,255,0.8);
    margin-bottom: 1.25rem;
}
.lp-subtitle {
    font-size: clamp(1rem, 2.5vw, 1.125rem);
    color: rgba(255,255,255,0.72);
    line-height: 1.6;
    max-width: 520px;
    margin: 0 auto 2.5rem;
}
.lp-hero-buttons { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }
.lp-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    font-size: 0.9375rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s;
    cursor: pointer;
    border: 1px solid transparent;
}
.lp-btn-primary {
    background: rgba(0,212,255,0.12);
    border-color: rgba(0,212,255,0.35);
    color: #00d4ff;
}
.lp-btn-primary:hover {
    background: rgba(0,212,255,0.2);
    border-color: rgba(0,212,255,0.6);
    color: #00d4ff;
}
.lp-btn-ghost {
    background: transparent;
    border-color: rgba(255,255,255,0.15);
    color: rgba(255,255,255,0.6);
}
.lp-btn-ghost:hover {
    border-color: rgba(255,255,255,0.3);
    color: rgba(255,255,255,0.9);
    background: rgba(255,255,255,0.05);
}

/* Sections */
.lp-section { padding: 5rem 1.5rem; }
.lp-section-dark { background: #000; }
.lp-section-darker { background: #050505; }
.lp-container { max-width: 1080px; margin: 0 auto; }
.lp-section-header { text-align: center; margin-bottom: 3.5rem; }
.lp-eyebrow {
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(0,212,255,0.7);
    margin-bottom: 0.75rem;
}
.lp-section-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.02em;
    color: #fff;
    margin-bottom: 1rem;
}
.lp-accent { color: #00d4ff; }

/* Problem stats */
.lp-problem-content { max-width: 800px; margin: 0 auto; }
.lp-problem-text { font-size: 1.0625rem; color: rgba(255,255,255,0.65); line-height: 1.7; margin-bottom: 2.5rem; }
.lp-problem-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; margin-bottom: 2.5rem; }
@media (max-width: 600px) { .lp-problem-stats { grid-template-columns: 1fr; } }
.lp-stat { text-align: center; }
.lp-stat-number { font-size: 2.5rem; font-weight: 800; line-height: 1; margin-bottom: 0.5rem; }
.stat-red { color: #ef4444; }
.stat-orange { color: #f97316; }
.stat-yellow { color: #f59e0b; }
.lp-stat-label { font-size: 0.9375rem; color: rgba(255,255,255,0.55); margin-bottom: 0.25rem; }
.lp-stat-source { font-size: 0.75rem; color: rgba(255,255,255,0.3); }
.lp-stat-source a { color: inherit; text-decoration: underline; }
.lp-problem-highlight {
    padding: 1.25rem 1.5rem;
    background: rgba(0,212,255,0.05);
    border: 1px solid rgba(0,212,255,0.15);
    border-radius: 8px;
    font-size: 1.0625rem;
    color: rgba(255,255,255,0.75);
    line-height: 1.6;
}

/* Steps */
.lp-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
@media (max-width: 768px) { .lp-steps { grid-template-columns: 1fr; } }
.lp-step {
    padding: 2rem 1.5rem;
    background: rgba(255,255,255,0.025);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 12px;
    position: relative;
}
.lp-step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.125rem;
    margin-bottom: 1.25rem;
    background: rgba(0,212,255,0.12);
    color: #00d4ff;
    border: 1px solid rgba(0,212,255,0.25);
}
.lp-step-cyan .lp-step-number { background: rgba(0,212,255,0.12); color: #00d4ff; border-color: rgba(0,212,255,0.25); }
.lp-step-purple .lp-step-number { background: rgba(139,92,246,0.12); color: #a78bfa; border-color: rgba(139,92,246,0.25); }
.lp-step-green .lp-step-number { background: rgba(16,185,129,0.12); color: #34d399; border-color: rgba(16,185,129,0.25); }
.lp-step-title { font-size: 1.0625rem; font-weight: 600; color: #fff; margin-bottom: 0.625rem; }
.lp-step-desc { font-size: 0.9375rem; color: rgba(255,255,255,0.55); line-height: 1.6; }

/* Dashboard mockup */
.lp-dashboard-mockup {
    position: relative;
    margin: 0 auto 4rem;
    max-width: 700px;
}
.lp-mockup-pill {
    position: absolute;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(0,0,0,0.6);
    border: 1px solid rgba(255,255,255,0.12);
    backdrop-filter: blur(8px);
    border-radius: 999px;
    font-size: 0.8125rem;
    color: rgba(255,255,255,0.8);
    z-index: 2;
    white-space: nowrap;
}
.lp-mockup-pill svg { width: 14px; height: 14px; color: #00d4ff; flex-shrink: 0; }
.pill-left { left: -40px; top: 40%; }
.pill-right-top { right: -40px; top: 20%; }
.pill-right-bottom { right: -20px; bottom: 20%; }
@media (max-width: 768px) {
    .pill-left, .pill-right-top, .pill-right-bottom { display: none; }
}
.lp-mockup-window {
    background: #0d0d0f;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 32px 80px rgba(0,0,0,0.6);
}
.lp-mockup-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: #111113;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}
.lp-mockup-dots { display: flex; gap: 6px; }
.lp-mockup-dots span { width: 10px; height: 10px; border-radius: 50%; background: rgba(255,255,255,0.15); }
.lp-mockup-dots span:nth-child(1) { background: #ff5f56; }
.lp-mockup-dots span:nth-child(2) { background: #ffbd2e; }
.lp-mockup-dots span:nth-child(3) { background: #27c93f; }
.lp-mockup-title { font-size: 0.8125rem; color: rgba(255,255,255,0.4); flex: 1; text-align: center; }
.lp-mockup-badge {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.75rem;
    color: #34d399;
    background: rgba(16,185,129,0.1);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    border: 1px solid rgba(16,185,129,0.2);
}
.lp-mockup-badge svg { width: 11px; height: 11px; }
.lp-mockup-body {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.875rem;
    min-height: 200px;
}
.lp-mockup-sidebar { display: flex; gap: 0.5rem; }
.lp-mockup-sidebar-item { height: 8px; width: 60px; background: rgba(255,255,255,0.08); border-radius: 4px; }
.lp-mockup-sidebar-item.active { background: rgba(0,212,255,0.3); }
.lp-mockup-cards { display: flex; gap: 0.75rem; }
.lp-mockup-card { flex: 1; height: 50px; background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.06); border-radius: 8px; }
.lp-mockup-card:first-child { border-color: rgba(0,212,255,0.15); }
.lp-mockup-line { height: 1px; background: rgba(255,255,255,0.06); }
.lp-mockup-rows { display: flex; flex-direction: column; gap: 0.5rem; }
.lp-mockup-row { height: 10px; background: rgba(255,255,255,0.05); border-radius: 4px; }
.lp-mockup-row:nth-child(2) { width: 85%; }
.lp-mockup-row:nth-child(3) { width: 65%; }

/* Features grid */
.lp-features { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.25rem; }
.lp-feature {
    display: flex;
    gap: 1rem;
    padding: 1.5rem;
    background: rgba(255,255,255,0.025);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 12px;
    transition: border-color 0.2s;
}
.lp-feature:hover { border-color: rgba(255,255,255,0.12); }
.lp-feature-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.lp-feature-icon svg { width: 18px; height: 18px; }
.icon-cyan { background: rgba(0,212,255,0.1); color: #00d4ff; }
.icon-purple { background: rgba(139,92,246,0.1); color: #a78bfa; }
.icon-green { background: rgba(16,185,129,0.1); color: #34d399; }
.icon-orange { background: rgba(249,115,22,0.1); color: #fb923c; }
.icon-pink { background: rgba(236,72,153,0.1); color: #f472b6; }
.icon-blue { background: rgba(59,130,246,0.1); color: #60a5fa; }
.lp-feature-content {}
.lp-feature-title { font-size: 0.9375rem; font-weight: 600; color: #fff; margin-bottom: 0.375rem; }
.lp-feature-desc { font-size: 0.875rem; color: rgba(255,255,255,0.5); line-height: 1.6; }

/* Industries */
.lp-industries { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
@media (max-width: 768px) { .lp-industries { grid-template-columns: 1fr; } }
.lp-industry {
    padding: 2rem 1.5rem;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 12px;
    background: rgba(255,255,255,0.02);
    transition: border-color 0.2s;
}
.lp-industry:hover { border-color: rgba(255,255,255,0.14); }
.lp-industry-cyan { border-top: 2px solid rgba(0,212,255,0.4); }
.lp-industry-purple { border-top: 2px solid rgba(139,92,246,0.4); }
.lp-industry-orange { border-top: 2px solid rgba(249,115,22,0.4); }
.lp-industry-title { font-size: 1.125rem; font-weight: 700; color: #fff; margin-bottom: 0.75rem; }
.lp-industry-desc { font-size: 0.9375rem; color: rgba(255,255,255,0.55); line-height: 1.6; margin-bottom: 1.25rem; }
.lp-industry-tags { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.lp-tag {
    padding: 0.25rem 0.625rem;
    font-size: 0.75rem;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 4px;
    color: rgba(255,255,255,0.55);
}

/* CTA */
.lp-cta {
    padding: 6rem 1.5rem;
    text-align: center;
    background: linear-gradient(180deg, #050505 0%, #000 100%);
    border-top: 1px solid rgba(255,255,255,0.06);
}
.lp-cta-content { max-width: 680px; margin: 0 auto; }
.lp-cta-content .lp-section-title { margin-bottom: 1rem; }
.lp-cta-content .lp-subtitle { color: rgba(255,255,255,0.5); max-width: 500px; }
.lp-cta-buttons { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; margin: 2rem 0 1.5rem; }
.lp-cta-note { font-size: 0.8125rem; color: rgba(255,255,255,0.3); }

/* ── Hero text entrance animations ─────────────────────────────────────── */
@keyframes lp-text-in {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}
.lp-title    { animation: lp-text-in 0.7s ease 0.8s both; }
.lp-tagline  { animation: lp-text-in 0.7s ease 1.0s both; }
.lp-subtitle { animation: lp-text-in 0.7s ease 1.2s both; }
.lp-hero-buttons { animation: lp-text-in 0.7s ease 1.4s both; }
@media (prefers-reduced-motion: reduce) {
    .lp-title, .lp-tagline, .lp-subtitle, .lp-hero-buttons { animation: none; }
}

/* ── Scroll cue chevron ─────────────────────────────────────────────────── */
.lp-scroll-cue {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    color: rgba(255,255,255,0.3);
    animation: lp-bounce 2s ease-in-out infinite;
}
@keyframes lp-bounce {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50%       { transform: translateX(-50%) translateY(6px); }
}
@media (prefers-reduced-motion: reduce) {
    .lp-scroll-cue { animation: none; }
}

/* ── Contact modal ──────────────────────────────────────────────────────── */
.lp-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 9000;
    background: rgba(0,0,0,0.75);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
}
.lp-modal-backdrop.is-open {
    opacity: 1;
    pointer-events: auto;
}
.lp-modal {
    position: relative;
    background: #0d0d0f;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 14px;
    padding: 2rem;
    width: 100%;
    max-width: 520px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 32px 80px rgba(0,0,0,0.7);
    transform: translateY(12px);
    transition: transform 0.2s;
}
.lp-modal-backdrop.is-open .lp-modal { transform: translateY(0); }
.lp-modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    color: rgba(255,255,255,0.4);
    cursor: pointer;
    padding: 0.25rem;
    line-height: 0;
    transition: color 0.15s;
}
.lp-modal-close:hover { color: rgba(255,255,255,0.9); }
.lp-modal-header { margin-bottom: 1.5rem; }
.lp-modal-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.375rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 0.25rem;
}
.lp-modal-desc { font-size: 0.875rem; color: rgba(255,255,255,0.5); }
.lp-modal-form { display: flex; flex-direction: column; gap: 1rem; }
.lp-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 480px) { .lp-form-row { grid-template-columns: 1fr; } }
.lp-form-group { display: flex; flex-direction: column; gap: 0.375rem; }
.lp-form-label { font-size: 0.8125rem; font-weight: 500; color: rgba(255,255,255,0.7); }
.lp-form-required { color: #ef4444; }
.lp-form-input {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 7px;
    padding: 0.625rem 0.875rem;
    font-size: 0.9375rem;
    color: #fff;
    outline: none;
    transition: border-color 0.15s, background 0.15s;
    font-family: inherit;
    width: 100%;
    box-sizing: border-box;
}
.lp-form-input::placeholder { color: rgba(255,255,255,0.25); }
.lp-form-input:focus {
    border-color: rgba(0,212,255,0.5);
    background: rgba(0,212,255,0.04);
}
.lp-form-textarea { min-height: 90px; resize: vertical; }
.lp-form-error {
    font-size: 0.875rem;
    color: #f87171;
    background: rgba(239,68,68,0.08);
    border: 1px solid rgba(239,68,68,0.2);
    border-radius: 6px;
    padding: 0.625rem 0.875rem;
}
.lp-btn-full { width: 100%; justify-content: center; }
.lp-modal-success {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 1rem 0;
    gap: 0.75rem;
}
.lp-success-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: rgba(16,185,129,0.12);
    border: 1px solid rgba(16,185,129,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #34d399;
}
.lp-success-title { font-family: 'Space Grotesk', sans-serif; font-size: 1.25rem; font-weight: 700; color: #fff; }
.lp-success-desc { font-size: 0.9375rem; color: rgba(255,255,255,0.6); line-height: 1.6; max-width: 340px; }

/* ── Stat source links contrast fix ────────────────────────────────────── */
.lp-stat-source { font-size: 0.75rem; color: rgba(255,255,255,0.5); }
.lp-stat-source a { color: inherit; text-decoration: underline; }


/* ===== LAYOUT: SIDEBAR + MAIN ===== */
.layout-sidebar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 1.25rem;
    align-items: start;
}
@media (max-width: 900px) { .layout-sidebar { grid-template-columns: 1fr; } }

.card-mb { margin-bottom: 1.25rem; }

/* ===== TYPOGRAPHY HELPERS ===== */
.section-subtitle {
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 0.875rem;
    color: var(--color-text);
}
.text-meta { font-size: 0.85rem; color: var(--color-text-secondary); }
.text-micro { font-size: 0.75rem; color: var(--color-text-secondary); }

/* ===== DETAIL GRID (label/value pairs) ===== */
.detail-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.875rem;
    margin-bottom: 0.875rem;
}
.detail-item, .detail-grid > div {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}
.detail-label, .detail-cell-label {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--color-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.detail-value, .detail-cell-value {
    font-size: 0.9rem;
    color: var(--color-text);
}

/* ===== HIGHLIGHT BOXES ===== */
.highlight-box {
    background: var(--color-bg-secondary);
    border: 1px solid var(--color-border);
    border-left: 3px solid var(--color-primary);
    border-radius: var(--radius-md);
    padding: 0.75rem 1rem;
    margin-top: 0.75rem;
}
.highlight-box-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--color-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 0.375rem;
}
.highlight-box-danger {
    background: color-mix(in srgb, var(--color-danger) 8%, transparent);
    border: 1px solid color-mix(in srgb, var(--color-danger) 30%, transparent);
    border-left: 3px solid var(--color-danger);
    border-radius: var(--radius-md);
    padding: 0.75rem 1rem;
    margin-top: 0.75rem;
}
.highlight-box-muted {
    background: var(--color-bg-secondary);
    border: 1px solid var(--color-border);
    border-left: 3px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 0.75rem 1rem;
    margin-top: 0.75rem;
}

/* ===== IMPACT GRID ===== */
.impact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 0.625rem;
}
.impact-item {
    background: var(--color-bg-secondary);
    border: 1px solid var(--color-border);
    border-left: 3px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 0.625rem 0.75rem;
}

/* ===== APPROVAL STEPS ===== */
.approval-steps { display: flex; flex-direction: column; gap: 0.625rem; }
.approval-step {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.625rem 0.75rem;
    background: var(--color-bg-secondary);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
}
.approval-step-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--color-bg-tertiary);
    border: 1px solid var(--color-border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 600;
    flex-shrink: 0;
    color: var(--color-text-secondary);
}
.approval-step-avatar.approved { background: color-mix(in srgb, var(--color-success) 15%, transparent); border-color: var(--color-success); color: var(--color-success); }
.approval-step-avatar.rejected { background: color-mix(in srgb, var(--color-danger) 15%, transparent); border-color: var(--color-danger); color: var(--color-danger); }
.approval-step-body { flex: 1; min-width: 0; }
.approval-step-name { font-size: 0.875rem; font-weight: 500; }
.approval-step-date { font-size: 0.75rem; color: var(--color-text-secondary); margin-top: 0.125rem; }
.approval-step-comment { font-size: 0.8rem; color: var(--color-text-secondary); font-style: italic; margin-top: 0.25rem; }

/* ===== SIDE TIMELINE ===== */
.side-timeline { display: flex; flex-direction: column; gap: 0; }
.side-timeline-item {
    display: flex;
    align-items: flex-start;
    gap: 0.625rem;
    position: relative;
    padding-bottom: 1rem;
}
.side-timeline-item:last-child { padding-bottom: 0; }
.side-timeline-item:not(:last-child)::before {
    content: '';
    position: absolute;
    left: 6px;
    top: 14px;
    bottom: 0;
    width: 1px;
    background: var(--color-border);
}
.side-timeline-dot {
    width: 13px;
    height: 13px;
    border-radius: 50%;
    background: var(--color-border);
    border: 2px solid var(--color-bg);
    flex-shrink: 0;
    margin-top: 2px;
}
.side-timeline-dot.primary { background: var(--color-primary); }
.side-timeline-dot.warning { background: var(--color-warning); }
.side-timeline-dot.success { background: var(--color-success); }
.side-timeline-dot.danger { background: var(--color-danger); }
.side-timeline-label { font-size: 0.85rem; font-weight: 500; }
.side-timeline-date { font-size: 0.75rem; color: var(--color-text-secondary); margin-top: 0.1rem; }

/* ===== INFO ACTION BOX ===== */
.info-action-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-top: 0.75rem;
    padding: 0.625rem 0.875rem;
    background: var(--color-bg-secondary);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    font-size: 0.85rem;
}
.info-action-box p { margin: 0; color: var(--color-text-secondary); }

/* ===== CONFIG DETAIL HEADER ===== */
.config-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}
.config-header-info { min-width: 0; }
.config-breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.8rem;
    color: var(--color-text-secondary);
    margin-bottom: 0.375rem;
}
.config-breadcrumb a { color: var(--color-text-secondary); text-decoration: none; }
.config-breadcrumb a:hover { color: var(--color-text); }
.config-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 0.375rem;
    flex-wrap: wrap;
}
.meta-item {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.8rem;
    color: var(--color-text-secondary);
}
.meta-item svg, .meta-item i { width: 13px; height: 13px; opacity: 0.6; }
.config-header-actions { display: flex; align-items: center; gap: 0.5rem; flex-shrink: 0; flex-wrap: wrap; }
.status-deployed { color: var(--color-success); font-weight: 500; }
.status-draft { color: var(--color-text-secondary); }

/* ===== WORKFLOW STATUS BAR ===== */
.workflow-status-bar {
    background: var(--color-bg-secondary);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.5rem;
}
.workflow-steps { display: flex; align-items: flex-start; gap: 0; margin-bottom: 0; overflow-x: auto; }
.workflow-step { display: flex; flex-direction: column; align-items: center; flex-shrink: 0; gap: 0.375rem; }
.step-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid var(--color-border);
    background: var(--color-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--color-text-secondary);
}
.step-label { font-size: 0.72rem; color: var(--color-text-secondary); white-space: nowrap; text-align: center; }
.workflow-step.active .step-icon { background: var(--color-primary); border-color: var(--color-primary); color: #fff; }
.workflow-step.active .step-label { color: var(--color-text); font-weight: 600; }
.workflow-step.completed .step-icon { background: var(--color-success); border-color: var(--color-success); color: #fff; }
.workflow-step.completed .step-label { color: var(--color-text-secondary); }
.workflow-connector { flex: 1; height: 2px; background: var(--color-border); min-width: 40px; margin-top: 15px; }
.workflow-connector.completed { background: var(--color-success); }
.workflow-action-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 1rem;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border);
    background: var(--color-bg);
    flex-wrap: wrap;
}
.workflow-action-card.pending { border-color: color-mix(in srgb, var(--color-warning) 40%, transparent); background: color-mix(in srgb, var(--color-warning) 5%, transparent); }
.workflow-action-card.approved { border-color: color-mix(in srgb, var(--color-success) 40%, transparent); background: color-mix(in srgb, var(--color-success) 5%, transparent); }
.workflow-action-card.draft { border-color: var(--color-border); }
.action-card-header { display: flex; align-items: center; gap: 0.4rem; font-size: 0.85rem; font-weight: 600; flex-shrink: 0; }
.action-card-header svg, .action-card-header i { width: 14px; height: 14px; }
.action-card-body { flex: 1; min-width: 0; font-size: 0.85rem; }
.action-card-body p { margin: 0 0 0.2rem; }
.action-card-actions { display: flex; gap: 0.5rem; flex-shrink: 0; flex-wrap: wrap; }

/* ===== OVERVIEW GRID (config detail tabs) ===== */
.overview-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-top: 1rem;
}
.overview-card {
    background: var(--color-bg-secondary);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 1rem 1.25rem;
}
.overview-card h3 {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 1rem;
}
.overview-card h3 svg, .overview-card h3 i { width: 14px; height: 14px; opacity: 0.7; }
.overview-card.span-2 { grid-column: span 2; }
@media (max-width: 700px) { .overview-grid { grid-template-columns: 1fr; } .overview-card.span-2 { grid-column: span 1; } }

/* Compliance score */
.compliance-score-large { display: flex; justify-content: center; margin-bottom: 1rem; }
.score-circle {
    width: 72px; height: 72px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.1rem; font-weight: 700;
    border: 3px solid var(--color-border);
}
.score-circle.good { border-color: var(--color-success); color: var(--color-success); }
.score-circle.medium { border-color: var(--color-warning); color: var(--color-warning); }
.score-circle.poor { border-color: var(--color-danger); color: var(--color-danger); }
.compliance-stats { display: flex; gap: 0.75rem; justify-content: center; }
.stat-item { text-align: center; }
.stat-item .stat-value { font-size: 1.1rem; font-weight: 700; display: block; }
.stat-item .stat-label { font-size: 0.72rem; color: var(--color-text-secondary); }
.stat-item.success .stat-value { color: var(--color-success); }
.stat-item.danger .stat-value { color: var(--color-danger); }
.stat-item.warning .stat-value { color: var(--color-warning); }

/* Activity list */
.activity-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 0.625rem; }
.activity-list li { display: flex; align-items: flex-start; gap: 0.625rem; font-size: 0.85rem; }
.activity-icon { font-size: 0.9rem; flex-shrink: 0; }
.activity-content { display: flex; flex-direction: column; gap: 0.1rem; }
.activity-text { color: var(--color-text); }
.activity-time { font-size: 0.75rem; color: var(--color-text-secondary); }
.no-activity { color: var(--color-text-secondary); font-size: 0.85rem; }

/* Quick actions */
.quick-actions-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.625rem; }
.quick-action {
    display: flex; flex-direction: column; align-items: center; gap: 0.4rem;
    padding: 0.75rem 0.5rem;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    font-size: 0.8rem;
    color: var(--color-text);
    text-decoration: none;
    text-align: center;
    transition: border-color 0.15s, background 0.15s;
}
.quick-action:hover { border-color: var(--color-primary); background: color-mix(in srgb, var(--color-primary) 6%, transparent); }
.quick-action svg, .quick-action i { width: 16px; height: 16px; opacity: 0.7; }

/* Settings tab header */
.settings-header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; flex-wrap: wrap; }
.settings-header h3 { font-size: 0.9rem; font-weight: 600; margin: 0; }
.settings-actions { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.form-control-sm {
    height: 30px; padding: 0 0.625rem; font-size: 0.8rem;
    border: 1px solid var(--color-border); border-radius: var(--radius-sm);
    background: var(--color-bg-secondary); color: var(--color-text);
}
.form-control-sm:focus { outline: none; border-color: var(--color-primary); }


/* ===== ACTION BUTTONS ROW (used in 15+ list pages) ===== */
.action-buttons-row {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    flex-wrap: nowrap;
}
.action-buttons-row .btn.btn-sm {
    padding: 0.3rem 0.45rem;
    min-width: 28px;
    min-height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* ===== TWO-COLUMN LAYOUT + SIDE COLUMN (drift/geofences, enrollment policies) ===== */
.two-column-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 1.25rem;
    align-items: start;
}
@media (max-width: 900px) { .two-column-layout { grid-template-columns: 1fr; } }
.side-column { display: flex; flex-direction: column; gap: 1.25rem; }

/* ===== VERSION TIMELINE (configurations/detail + versions pages) ===== */
.version-timeline { display: flex; flex-direction: column; gap: 0; }
.version-entry, .version-item {
    display: flex;
    gap: 1rem;
    padding-bottom: 1.25rem;
    position: relative;
}
.version-marker {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex-shrink: 0;
    width: 20px;
    margin-top: 4px;
}
.marker-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--color-border);
    border: 2px solid var(--color-bg-secondary);
    flex-shrink: 0;
    z-index: 1;
}
.version-entry.current .marker-dot,
.version-item.current .marker-dot { background: var(--color-primary); }
.marker-line {
    width: 2px;
    flex: 1;
    background: var(--color-border);
    margin-top: 2px;
    min-height: 24px;
}
.version-card, .version-content {
    flex: 1;
    min-width: 0;
    background: var(--color-bg-secondary);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 0.75rem 1rem;
}
.version-entry.current .version-card,
.version-item.current .version-content {
    border-color: color-mix(in srgb, var(--color-primary) 40%, transparent);
}
.version-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.375rem;
}
.version-info { display: flex; align-items: center; gap: 0.4rem; flex-wrap: wrap; }
.version-number { font-size: 0.875rem; font-weight: 600; }
.version-date { font-size: 0.75rem; color: var(--color-text-secondary); white-space: nowrap; }
.version-body, .version-message {
    font-size: 0.85rem;
    color: var(--color-text-secondary);
    margin-bottom: 0.375rem;
}
.version-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.78rem;
    color: var(--color-text-secondary);
    margin-bottom: 0.5rem;
}
.version-author { display: flex; align-items: center; gap: 0.25rem; }
.version-actions { display: flex; gap: 0.4rem; flex-wrap: wrap; margin-top: 0.5rem; }
.version-changes { display: flex; gap: 0.3rem; font-size: 0.78rem; font-weight: 600; }
.additions { color: var(--color-success); }
.deletions { color: var(--color-danger); }

/* Version stats row (versions.ejs standalone page) */
.version-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}
@media (max-width: 700px) { .version-stats { grid-template-columns: repeat(2, 1fr); } }

/* Versions/proposals tab headers */
.versions-header, .proposals-header, .deployments-header, .assignments-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}
.versions-header h3, .proposals-header h3, .deployments-header h3, .assignments-header h3 {
    font-size: 0.9rem;
    font-weight: 600;
    margin: 0;
}
.versions-actions { display: flex; gap: 0.4rem; }

/* ===== SETTINGS CATEGORIES (configurations/detail settings tab) ===== */
.settings-categories { display: flex; flex-direction: column; gap: 0.625rem; }
.settings-category {
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    overflow: hidden;
}
.category-header {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.625rem 0.875rem;
    background: var(--color-bg-secondary);
    cursor: pointer;
    user-select: none;
    font-size: 0.875rem;
    font-weight: 500;
}
.category-header:hover { background: var(--color-bg-tertiary, var(--color-bg-secondary)); }
.category-icon { font-size: 1rem; flex-shrink: 0; }
.category-name { flex: 1; }
.category-count {
    font-size: 0.72rem;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: 10px;
    padding: 1px 7px;
    color: var(--color-text-secondary);
}
.category-toggle { width: 14px; height: 14px; transition: transform 0.15s; opacity: 0.5; }
.settings-category.collapsed .category-toggle { transform: rotate(-90deg); }
.settings-category.collapsed .category-content { display: none; }
.category-content { padding: 0; }
.settings-table { width: 100%; border-collapse: collapse; }
.settings-table tr { border-bottom: 1px solid var(--color-border); }
.settings-table tr:last-child { border-bottom: none; }
.setting-row:hover { background: color-mix(in srgb, var(--color-primary) 4%, transparent); }
.setting-name {
    padding: 0.5rem 0.875rem;
    width: 55%;
    vertical-align: top;
}
.setting-name .name { display: block; font-size: 0.85rem; font-weight: 500; font-family: 'SF Mono', ui-monospace, monospace; }
.setting-name .description { display: block; font-size: 0.75rem; color: var(--color-text-secondary); margin-top: 2px; }
.setting-value { padding: 0.5rem 0.875rem; vertical-align: top; }
.setting-text { font-size: 0.85rem; font-family: 'SF Mono', ui-monospace, monospace; }
.setting-json {
    font-size: 0.75rem;
    font-family: 'SF Mono', ui-monospace, monospace;
    white-space: pre-wrap;
    margin: 0;
    max-height: 120px;
    overflow-y: auto;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    padding: 0.375rem;
}
.raw-json-section {
    margin-top: 1rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    overflow: hidden;
}
.raw-json-section summary {
    padding: 0.625rem 0.875rem;
    background: var(--color-bg-secondary);
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    user-select: none;
}
.raw-json-section summary:hover { background: var(--color-bg-tertiary, var(--color-bg-secondary)); }

/* ===== RISK DASHBOARD (configurations/detail security tab) ===== */
.security-overview h3, .security-overview h4 { font-size: 0.9rem; font-weight: 600; margin-bottom: 1rem; }
.security-overview h4 { margin-top: 1.25rem; }
.risk-dashboard {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.875rem;
    margin-bottom: 1.25rem;
}
@media (max-width: 800px) { .risk-dashboard { grid-template-columns: repeat(2, 1fr); } }
.risk-card {
    background: var(--color-bg-secondary);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 1rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.375rem;
}
.risk-label { font-size: 0.75rem; color: var(--color-text-secondary); font-weight: 500; text-transform: uppercase; letter-spacing: 0.03em; }
.risk-score {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--color-text);
    line-height: 1;
}
.risk-score.low { color: var(--color-success); }
.risk-score.medium { color: var(--color-warning); }
.risk-score.high { color: var(--color-danger); }
.risk-score.good { color: var(--color-success); }
.risk-score.text { font-size: 0.95rem; }
.risk-level { font-size: 0.8rem; }

/* Security controls checklist */
.security-controls {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
    margin-bottom: 1.25rem;
}
@media (max-width: 700px) { .security-controls { grid-template-columns: repeat(2, 1fr); } }
.control-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: var(--color-bg-secondary);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    font-size: 0.85rem;
}
.control-status {
    width: 8px; height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
    background: var(--color-border);
}
.control-item.enabled .control-status { background: var(--color-success); }
.control-item.disabled .control-status { background: var(--color-danger); }
.control-item.disabled { opacity: 0.6; }

/* Risk factors progress bars */
.risk-factors { display: flex; flex-direction: column; gap: 0.625rem; }
.risk-factor { display: flex; flex-direction: column; gap: 0.3rem; }
.factor-header { display: flex; justify-content: space-between; font-size: 0.82rem; }
.factor-name { font-weight: 500; }
.factor-score { color: var(--color-text-secondary); }
.factor-bar {
    height: 6px;
    background: var(--color-border);
    border-radius: 3px;
    overflow: hidden;
}
.factor-fill {
    height: 100%;
    background: var(--color-primary);
    border-radius: 3px;
    transition: width 0.3s ease;
}

/* ===== APPROVAL CARDS (approvals/list) ===== */
.approval-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
    margin-top: 0.75rem;
}
.approval-card {
    background: var(--color-bg-secondary);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 1rem 1.125rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.approval-card.risk-high, .approval-card.risk-critical {
    border-left: 3px solid var(--color-danger);
}
.approval-card.risk-medium { border-left: 3px solid var(--color-warning); }
.approval-card-header { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; }
.approval-card-title { font-size: 0.9rem; font-weight: 600; margin: 0; }
.approval-card-meta { font-size: 0.82rem; color: var(--color-text-secondary); margin: 0; }
.approval-card-footer { display: flex; gap: 0.4rem; flex-wrap: wrap; margin-top: 0.25rem; }

/* ===== PROPOSAL CARDS (inside config detail proposals tab) ===== */
.proposals-section { margin-bottom: 1.5rem; }
.section-title { font-size: 0.82rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; color: var(--color-text-secondary); margin-bottom: 0.625rem; }
.proposal-cards { display: flex; flex-direction: column; gap: 0.625rem; }
.proposal-card {
    background: var(--color-bg-secondary);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 0.75rem 1rem;
}
.proposal-card.pending { border-left: 3px solid var(--color-warning); }
.proposal-card-header { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; margin-bottom: 0.375rem; }
.proposal-title { font-size: 0.875rem; font-weight: 500; }
.proposal-title a { color: var(--color-text); text-decoration: none; }
.proposal-title a:hover { color: var(--color-primary); }

/* ===== ASSIGNMENTS (config detail assignments tab) ===== */
.assignments-section { margin-top: 0.5rem; }
.assignments-summary { font-size: 0.85rem; color: var(--color-text-secondary); margin-bottom: 1rem; }
.assignment-list { display: flex; flex-direction: column; gap: 0.5rem; }
.assignment-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem 0.875rem;
    background: var(--color-bg-secondary);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
}
.assignment-icon {
    width: 30px; height: 30px;
    border-radius: var(--radius-sm);
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    font-size: 0.8rem;
}
.assignment-info { flex: 1; min-width: 0; }
.assignment-name { font-size: 0.875rem; font-weight: 500; }
.assignment-type { font-size: 0.75rem; color: var(--color-text-secondary); }

/* ===== SECTION HEADING (approvals/list) ===== */
.section-heading { margin-bottom: 0.875rem; margin-top: 1.5rem; }
.section-heading h2 { font-size: 1rem; font-weight: 600; margin: 0; }

/* ===== COMPARE MODAL CONTENT ===== */
.compare-header {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--color-border);
    flex-wrap: wrap;
}
.compare-version { flex: 1; min-width: 140px; }
.compare-stats { display: flex; gap: 0.5rem; margin-top: 0.375rem; flex-wrap: wrap; }
.compare-stat { font-size: 0.78rem; padding: 2px 8px; border-radius: 10px; background: var(--color-bg-secondary); border: 1px solid var(--color-border); }
.compare-content { font-size: 0.85rem; }
.compare-arrow { display: flex; align-items: center; justify-content: center; color: var(--color-text-secondary); font-size: 1.25rem; }

/* ===== INTEGRATION CARDS (admin/integrations) ===== */
.integration-header { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; margin-bottom: 0.75rem; flex-wrap: wrap; }
.integration-info { flex: 1; min-width: 0; }
.integration-type { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--color-text-secondary); font-weight: 500; }
.integration-status { display: flex; align-items: center; gap: 0.3rem; font-size: 0.8rem; }
.integration-body { font-size: 0.85rem; color: var(--color-text-secondary); margin-bottom: 0.75rem; }
.integration-actions { display: flex; gap: 0.4rem; flex-wrap: wrap; }
.last-tested { font-size: 0.75rem; color: var(--color-text-secondary); margin-top: 0.25rem; }

/* ===== RESULT BOX (admin/naming-conventions) ===== */
.result-box {
    background: var(--color-bg-secondary);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 0.75rem 1rem;
    font-family: 'SF Mono', ui-monospace, monospace;
    font-size: 0.85rem;
    margin-top: 0.5rem;
    word-break: break-all;
}

/* ===== ENDPOINT LIST ITEMS (admin/scheduled-deployments) ===== */
.endpoint-list { display: flex; flex-direction: column; gap: 0.4rem; max-height: 200px; overflow-y: auto; }
.endpoint-item { display: flex; align-items: center; justify-content: space-between; font-size: 0.82rem; padding: 0.3rem 0; border-bottom: 1px solid var(--color-border); }
.endpoint-item:last-child { border-bottom: none; }
.endpoint-search { margin-bottom: 0.5rem; }
.detail-row { display: flex; justify-content: space-between; font-size: 0.85rem; padding: 0.375rem 0; border-bottom: 1px solid var(--color-border); }
.detail-row:last-child { border-bottom: none; }
.detail-list { display: flex; flex-direction: column; }

/* ===== SUMMARY GRID (version detail) ===== */
.summary-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
    margin-bottom: 1rem;
}
.summary-item { display: flex; flex-direction: column; gap: 0.2rem; }
.summary-label { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--color-text-secondary); font-weight: 500; }
.summary-value { font-size: 0.9rem; font-weight: 500; }

/* ===== ORDER LIST (admin/configuration-dependencies) ===== */
.order-list { display: flex; flex-direction: column; gap: 0.375rem; padding: 0; list-style: none; }
.order-list li {
    display: flex; align-items: center; gap: 0.625rem;
    padding: 0.5rem 0.75rem;
    background: var(--color-bg-secondary);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    font-size: 0.875rem;
}

/* ===== CHART CARD (alerts/analytics) ===== */
.charts-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 1.25rem; margin-bottom: 1.25rem; }
.chart-card { background: var(--color-bg-secondary); border: 1px solid var(--color-border); border-radius: var(--radius-lg); padding: 1rem 1.25rem; }
.chart-container { position: relative; width: 100%; }

/* ===== EVENT FEED (compliance/monitoring) ===== */
.event-feed { display: flex; flex-direction: column; gap: 0.5rem; }
.event-item { display: flex; align-items: flex-start; gap: 0.75rem; padding: 0.625rem 0.75rem; background: var(--color-bg-secondary); border: 1px solid var(--color-border); border-radius: var(--radius-md); }
.event-message { flex: 1; font-size: 0.85rem; }
.event-time { font-size: 0.72rem; color: var(--color-text-secondary); white-space: nowrap; flex-shrink: 0; }

/* ===== CONFIG LIST (configurations/list) ===== */
.config-list { display: flex; flex-direction: column; gap: 0.5rem; }
.config-link { color: var(--color-text); text-decoration: none; font-weight: 500; }
.config-link:hover { color: var(--color-primary); }

/* ===== RADIAL PROGRESS (reports) ===== */
.radial-progress {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 60px; height: 60px;
    border-radius: 50%;
    border: 4px solid var(--color-border);
    font-size: 0.85rem;
    font-weight: 600;
    position: relative;
}

/* ===== ROLE SELECTION (profile/role-request) ===== */
.role-options { display: flex; flex-direction: column; gap: 0.625rem; margin-bottom: 1rem; }
.role-option {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    padding: 0.875rem 1rem;
    background: var(--color-bg-secondary);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: border-color 0.15s;
}
.role-option:hover, .role-option input:checked + .role-option-content { border-color: var(--color-primary); }
.role-option input[type="radio"] { flex-shrink: 0; }
.role-option-icon { width: 32px; height: 32px; border-radius: var(--radius-sm); background: var(--color-bg); border: 1px solid var(--color-border); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.role-option-content { flex: 1; min-width: 0; }
.current-role-badge { display: inline-block; }

/* ===== INVITE PAGE ===== */
.invite-container { max-width: 480px; margin: 4rem auto; padding: 0 1rem; }
.invite-card { background: var(--color-bg-secondary); border: 1px solid var(--color-border); border-radius: var(--radius-xl, var(--radius-lg)); padding: 2rem; text-align: center; }
.invite-icon { font-size: 2.5rem; margin-bottom: 1rem; display: block; }
.invite-details { text-align: left; margin: 1.25rem 0; }
.invite-detail { display: flex; justify-content: space-between; font-size: 0.875rem; padding: 0.5rem 0; border-bottom: 1px solid var(--color-border); }
.invite-detail:last-child { border-bottom: none; }
.invite-expires { font-size: 0.82rem; color: var(--color-text-secondary); margin-top: 0.75rem; }
.invite-message { font-size: 0.9rem; color: var(--color-text-secondary); margin-bottom: 1.25rem; }
.logged-in-as, .signin-note { font-size: 0.82rem; color: var(--color-text-secondary); margin-top: 0.75rem; }

/* ===== ONBOARDING ===== */
.onboarding-container { max-width: 560px; margin: 3rem auto; padding: 0 1rem; }
.onboarding-card { background: var(--color-bg-secondary); border: 1px solid var(--color-border); border-radius: var(--radius-lg); padding: 2rem; }
.onboarding-header { text-align: center; margin-bottom: 1.5rem; }
.onboarding-icon { font-size: 2rem; display: block; margin-bottom: 0.75rem; }
.onboarding-form { display: flex; flex-direction: column; gap: 1rem; }
.step-indicator { display: flex; justify-content: center; gap: 0.5rem; position: absolute; left: 50%; transform: translateX(-50%); }
.step-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--color-border); transition: background 0.2s; }
.step-dot.active { background: var(--color-primary); }
.next-btn, .submit-btn { align-self: flex-end; }
.tip-card { background: var(--color-bg); border: 1px solid var(--color-border); border-radius: var(--radius-md); padding: 0.875rem 1rem; display: flex; gap: 0.75rem; }
.tip-icon { font-size: 1.25rem; flex-shrink: 0; }
.tip-content { font-size: 0.875rem; color: var(--color-text-secondary); }
.getting-started-tips { display: flex; flex-direction: column; gap: 0.5rem; margin-top: 1rem; }
.role-notice { font-size: 0.82rem; color: var(--color-text-secondary); margin-top: 0.75rem; padding: 0.5rem 0.75rem; background: var(--color-bg); border-radius: var(--radius-sm); border: 1px solid var(--color-border); }


/* ===== NEW CONFIGURATION WIZARD ===== */
.config-wizard-step { margin-bottom: 1.5rem; }
.wizard-step-label { font-size: 0.78rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--color-text-secondary); margin-bottom: 0.875rem; }
@media (max-width: 860px) { .config-wizard-layout { grid-template-columns: 1fr !important; } }

/* Platform grid */
.platform-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 0.75rem; max-width: 760px; }
.platform-tile { display: flex; flex-direction: column; align-items: center; gap: 0.625rem; padding: 1.25rem 0.75rem; background: var(--color-bg-secondary); border: 1.5px solid var(--color-border); border-radius: var(--radius-lg); cursor: pointer; transition: border-color 0.15s, background 0.15s, box-shadow 0.15s; color: var(--color-text); font-family: inherit; }
.platform-tile:hover { border-color: var(--color-primary); background: rgba(0,212,255,0.04); }
.platform-tile.selected { border-color: var(--color-primary); background: rgba(0,212,255,0.08); box-shadow: 0 0 0 3px rgba(0,212,255,0.12); }
.platform-icon { width: 28px; height: 28px; flex-shrink: 0; color: var(--color-text-secondary); transition: color 0.15s; }
.platform-tile:hover .platform-icon, .platform-tile.selected .platform-icon { color: var(--color-primary); }
.platform-name { font-size: 0.82rem; font-weight: 500; text-align: center; }

/* Profile type grid */
.profile-type-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 0.75rem; max-width: 760px; }
.profile-type-tile { display: flex; flex-direction: column; align-items: flex-start; gap: 0.375rem; padding: 1rem; background: var(--color-bg-secondary); border: 1.5px solid var(--color-border); border-radius: var(--radius-lg); cursor: pointer; transition: border-color 0.15s, background 0.15s, box-shadow 0.15s; color: var(--color-text); font-family: inherit; text-align: left; }
.profile-type-tile:hover { border-color: var(--color-primary); background: rgba(0,212,255,0.04); }
.profile-type-tile.selected { border-color: var(--color-primary); background: rgba(0,212,255,0.08); box-shadow: 0 0 0 3px rgba(0,212,255,0.12); }
.profile-type-icon { width: 20px; height: 20px; color: var(--color-text-secondary); margin-bottom: 0.125rem; transition: color 0.15s; }
.profile-type-tile:hover .profile-type-icon, .profile-type-tile.selected .profile-type-icon { color: var(--color-primary); }
.profile-type-name { font-size: 0.875rem; font-weight: 600; }
.profile-type-desc { font-size: 0.78rem; color: var(--color-text-secondary); line-height: 1.4; }

/* Compliance redirect tile */
.profile-type-redirect { border-style: dashed; opacity: 0.75; }
.profile-type-redirect:hover { opacity: 1; border-style: solid; }
.profile-type-redirect-label { font-size: 0.72rem; font-weight: 600; color: var(--color-primary); margin-top: 0.25rem; display: flex; align-items: center; gap: 0.25rem; }

/* Selection summary badges */
.wizard-badge { display: inline-flex; align-items: center; font-size: 0.78rem; font-weight: 500; padding: 0.25rem 0.625rem; border-radius: 99px; background: rgba(0,212,255,0.1); color: var(--color-primary); border: 1px solid rgba(0,212,255,0.2); }
.wizard-badge-type { background: rgba(139,92,246,0.1); color: #a78bfa; border-color: rgba(139,92,246,0.2); }

@media (max-width: 700px) {
  .platform-grid { grid-template-columns: repeat(3, 1fr); }
  .profile-type-grid { grid-template-columns: 1fr 1fr; }
}

.cis-section-accordion { border-top: 1px solid var(--color-border); }
.cis-section-accordion:first-child { border-top: none; }
.cis-section-header { font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--color-text-secondary); }
.cis-section-toggle { display: flex; justify-content: space-between; align-items: center; cursor: pointer; user-select: none; padding: 0.7rem 0.5rem; margin: 0 -0.5rem; border-radius: 4px; }
.cis-section-toggle:hover { background: rgba(255,255,255,0.04); }
.cis-section-meta { display: flex; align-items: center; gap: 0.5rem; font-size: 0.72rem; opacity: 0.5; font-weight: 400; text-transform: none; letter-spacing: 0; }
.cis-chevron { width: 14px; height: 14px; transition: transform 0.2s; }
.cis-section-toggle.open .cis-chevron { transform: rotate(180deg); }
.cis-section-body { padding: 0.25rem 0 0.875rem; }

/* ===== LEAFLET MAP CONTAINER ===== */
.map-card-body { padding: 0 !important; }

/* =====================================================================
   FIXES — classes used in views/JS that were missing from the stylesheets
   ===================================================================== */

/* ----- badge-default (neutral/muted badge used throughout) ----- */
.badge-default {
    background: rgba(100,116,139,0.1);
    color: var(--color-text-secondary);
    border-color: rgba(100,116,139,0.15);
}

/* ----- badge-type (config type label in configurations/list) ----- */
.badge-type {
    background: rgba(59,130,246,0.08);
    color: #93c5fd;
    border-color: rgba(59,130,246,0.15);
    text-transform: capitalize;
    font-size: 0.75rem;
}

/* ----- workflow-status inline badges (configurations/list) ----- */
.workflow-status {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.78rem;
    font-weight: 500;
    padding: 0.2rem 0.5rem;
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
}
.workflow-status i, .workflow-status svg { width: 12px; height: 12px; }
.workflow-status.deployed  { background: rgba(16,185,129,0.1);  color: #10b981; border-color: rgba(16,185,129,0.2); }
.workflow-status.pending   { background: rgba(245,158,11,0.1);  color: #f59e0b; border-color: rgba(245,158,11,0.2); }
.workflow-status.draft     { background: rgba(100,116,139,0.08); color: var(--color-text-secondary); border-color: rgba(100,116,139,0.15); }

/* ----- workflow-status-cell column (no inline style needed) ----- */
.workflow-status-cell { white-space: nowrap; }

/* =====================================================================
   FIX: Toast system
   JS generates: class="toast toast-success" (not "toast success")
   Also missing: #toast-container positioning, .toast-body, .toast-title, .toast-exit
   ===================================================================== */
#toast-container {
    position: fixed;
    bottom: 1.25rem;
    right: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    z-index: 9999;
    pointer-events: none;
}

.toast-success  { border-color: rgba(16,185,129,0.35) !important; }
.toast-success  .toast-icon { color: var(--color-success); }
.toast-error    { border-color: rgba(239,68,68,0.35)   !important; }
.toast-error    .toast-icon { color: var(--color-danger); }
.toast-warning  { border-color: rgba(245,158,11,0.35)  !important; }
.toast-warning  .toast-icon { color: var(--color-warning); }
.toast-info     { border-color: rgba(59,130,246,0.35)  !important; }
.toast-info     .toast-icon { color: var(--color-primary); }

.toast-body  { flex: 1; min-width: 0; }
.toast-title { font-size: 0.8125rem; font-weight: 600; margin-bottom: 0.125rem; color: var(--color-text); }

@keyframes toastFadeOut {
    from { opacity: 1; transform: translateX(0); }
    to   { opacity: 0; transform: translateX(16px); }
}
.toast-exit { animation: toastFadeOut 0.25s ease forwards; pointer-events: none; }

/* =====================================================================
   FIX: Confirm dialog
   JS creates #confirm-overlay (no CSS), #confirm-dialog (no CSS),
   and inner elements .confirm-icon.danger, #confirm-title,
   #confirm-message, .confirm-actions — none of which had CSS.
   ===================================================================== */
#confirm-overlay {
    position: fixed;
    inset: 0;
    z-index: 9500;
    background: rgba(0,0,0,0.72);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}
#confirm-overlay.hidden { display: none !important; }

#confirm-dialog {
    position: relative;
    background: var(--color-bg-secondary);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 1.75rem 1.5rem 1.5rem;
    width: 380px;
    max-width: 94vw;
    text-align: center;
    box-shadow: var(--shadow-xl);
}

.confirm-icon {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
}
.confirm-icon.danger  { background: rgba(239,68,68,0.12); color: var(--color-danger);  }
.confirm-icon.warning { background: rgba(245,158,11,0.12); color: var(--color-warning); }
.confirm-icon svg, .confirm-icon i { width: 22px; height: 22px; }

#confirm-title {
    font-size: 1rem;
    font-weight: 600;
    margin: 0 0 0.4rem;
    color: var(--color-text);
}

#confirm-message {
    font-size: 0.875rem;
    color: var(--color-text-secondary);
    margin: 0 0 1.375rem;
    line-height: 1.55;
}

.confirm-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
}

/* =====================================================================
   FIX: Modal parts — modal-box-lg, modal-header, modal-body, modal-footer
   Used in drift/list.ejs, approvals/list.ejs but never defined.
   ===================================================================== */
.modal-box-lg {
    background: var(--color-bg-secondary);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    width: 700px;
    max-width: 94vw;
    max-height: 88vh;
    overflow-y: auto;
    position: relative;
    z-index: 1;
    box-shadow: var(--shadow-xl);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--color-border);
}
.modal-header h3 { margin: 0; font-size: 1rem; font-weight: 600; }

.modal-body {
    font-size: 0.875rem;
    overflow-x: auto;
    line-height: 1.55;
}

.modal-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.5rem;
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 1px solid var(--color-border);
}

/* ----- actions-col (table column alignment) ----- */
.actions-col { text-align: right; white-space: nowrap; }
#detailMap, #newGeofenceMap { height: 340px; width: 100%; display: block; }

/* =====================================================================
   FIXES WAVE 2 — more missing classes found across admin/settings/config views
   ===================================================================== */

/* ----- .modal-content — inner panel for the old .modal overlay pattern ----- */
/* Used in: admin/webhooks, admin/integrations, admin/maintenance-windows,
   admin/naming-conventions, admin/scheduled-deployments, configurations/versions,
   configurations/detail, configurations/oma-uri, configurations/import,
   endpoints/remote-actions, endpoints/import, organization/*, settings/notifications */
.modal-content {
    background: var(--color-bg-secondary);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    width: 90%;
    max-width: 580px;
    max-height: 88vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-xl);
    position: relative;
    z-index: 1;
}
.modal-content .modal-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--color-border);
    flex-shrink: 0;
}
.modal-content .modal-body,
.modal-content > form,
.modal-content > .form-group,
.modal-content > div:not(.modal-header):not(.modal-footer):not(.form-actions) {
    padding: 1.25rem 1.5rem;
    overflow-y: auto;
    flex: 1;
}
.modal-content > form { padding: 1.25rem 1.5rem; }
.modal-content .form-actions,
.modal-content .modal-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--color-border);
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    flex-shrink: 0;
}
/* size variants */
.modal-content.modal-lg  { max-width: 800px; }
.modal-content.modal-xl  { max-width: 1080px; }
.modal-content.modal-large { max-width: 760px; }

/* ----- .close-btn — ×  button inside modal headers ----- */
.close-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--color-text-secondary);
    font-size: 1.4rem;
    line-height: 1;
    padding: 0.25rem 0.375rem;
    border-radius: var(--radius-sm);
    transition: color var(--transition-fast), background var(--transition-fast);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}
.close-btn:hover { color: var(--color-text); background: rgba(255,255,255,0.07); }

/* ----- .tab-btn — tab navigation buttons (settings/backup, admin/alert-rules) ----- */
.tab-btn {
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--color-text-secondary);
    cursor: pointer;
    transition: color var(--transition-fast), border-color var(--transition-fast);
    white-space: nowrap;
}
.tab-btn:hover { color: var(--color-text); }
.tab-btn.active {
    color: var(--color-primary);
    border-bottom-color: var(--color-primary);
}
/* tabs wrapper for tab-btn rows — scoped to avoid clobbering .tab-list variants */
.tabs:has(.tab-btn) { display: flex; gap: 0; border-bottom: 1px solid var(--color-border); overflow-x: auto; }

/* ----- config-timeline + timeline-event-* (configurations/timeline.ejs) ----- */
.config-timeline {
    display: flex;
    flex-direction: column;
    gap: 0;
    position: relative;
}
.config-timeline::before {
    content: '';
    position: absolute;
    left: 1.25rem;
    top: 0.5rem;
    bottom: 0.5rem;
    width: 2px;
    background: var(--color-border);
    z-index: 0;
}
.timeline-event {
    position: relative;
    padding: 1rem 1rem 1rem 3rem;
    border-bottom: 1px solid var(--color-border);
}
.timeline-event:last-child { border-bottom: none; }
.timeline-event::before {
    content: '';
    position: absolute;
    left: 0.875rem;
    top: 1.25rem;
    width: 0.75rem;
    height: 0.75rem;
    border-radius: 50%;
    background: var(--color-border);
    border: 2px solid var(--color-bg-secondary);
    z-index: 1;
}
.timeline-event.version_created::before  { background: var(--color-primary); }
.timeline-event.deployed::before         { background: var(--color-success); }
.timeline-event.reverted::before         { background: var(--color-warning); }
.timeline-event.proposal_created::before { background: var(--color-text-secondary); }

.timeline-event-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.25rem;
    flex-wrap: wrap;
}
.timeline-event-title {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--color-text);
}
.timeline-event-time {
    font-size: 0.78rem;
    color: var(--color-text-secondary);
    opacity: 0.7;
    white-space: nowrap;
}
.timeline-event-performer {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.8rem;
    color: var(--color-text-secondary);
    margin-bottom: 0.35rem;
}
.timeline-event-description {
    font-size: 0.85rem;
    color: var(--color-text-secondary);
    line-height: 1.5;
    margin-bottom: 0.5rem;
}
.timeline-event-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-top: 0.5rem;
}

/* ----- scan-container layout (compliance/scan.ejs) ----- */
.scan-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto;
    gap: 1.5rem;
    align-items: start;
}
.scan-options  { grid-column: 1; }
.scan-progress { grid-column: 2; }
.recent-scans  { grid-column: 1 / -1; }
@media (max-width: 768px) {
    .scan-container { grid-template-columns: 1fr; }
    .recent-scans   { grid-column: 1; }
}

/* ----- checkbox-grid (admin/webhooks event checkboxes) ----- */
.checkbox-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 0.5rem;
}
.checkbox-grid label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    cursor: pointer;
    padding: 0.375rem 0.5rem;
    border-radius: var(--radius-sm);
    transition: background var(--transition-fast);
}
.checkbox-grid label:hover { background: rgba(255,255,255,0.04); }

/* ----- url-cell (admin/webhooks table column) ----- */
.url-cell {
    font-family: var(--font-mono, monospace);
    font-size: 0.78rem;
    color: var(--color-text-secondary);
    max-width: 240px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ----- icon-placeholder (admin/integrations — letter avatar fallback) ----- */
.icon-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-text-secondary);
    background: rgba(255,255,255,0.06);
    border-radius: 6px;
}

/* ----- content-grid (admin/integrations card grid) ----- */
.content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 1.25rem;
    align-items: start;
}

/* ----- .stat-card modifier states (audit/list danger/warning/success) ----- */
.stat-card.danger  { border-color: color-mix(in srgb, var(--color-danger) 40%, transparent); }
.stat-card.warning { border-color: color-mix(in srgb, var(--color-warning) 40%, transparent); }
.stat-card.success { border-color: color-mix(in srgb, var(--color-success) 40%, transparent); }
.stat-card.danger .stat-icon  { color: var(--color-danger); }
.stat-card.warning .stat-icon { color: var(--color-warning); }
.stat-card.success .stat-icon { color: var(--color-success); }

/* ----- .page-container (used in delete.ejs and other simple-layout pages) ----- */
.page-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* ----- progress-fill (compliance/scan progress bar inner fill) ----- */
.progress-fill {
    height: 100%;
    background: var(--color-primary);
    border-radius: inherit;
    transition: width 0.4s ease;
}

/* =====================================================================
   FIXES WAVE 3 — configuration type badges + orphaned status badges
   ===================================================================== */

/* Configuration type badges — generated from ConfigurationType enum values
   (device_configuration, compliance_policy, app_protection, etc.)
   These produce class names like badge-device_configuration which never
   matched any CSS rule. Map each type to a meaningful colour. */
.badge-device_configuration  { background: color-mix(in srgb, #3b82f6 15%, transparent); color: #93c5fd; border-color: color-mix(in srgb, #3b82f6 30%, transparent); }
.badge-compliance_policy     { background: color-mix(in srgb, #10b981 15%, transparent); color: #6ee7b7; border-color: color-mix(in srgb, #10b981 30%, transparent); }
.badge-app_protection        { background: color-mix(in srgb, #8b5cf6 15%, transparent); color: #c4b5fd; border-color: color-mix(in srgb, #8b5cf6 30%, transparent); }
.badge-app_configuration     { background: color-mix(in srgb, #6366f1 15%, transparent); color: #a5b4fc; border-color: color-mix(in srgb, #6366f1 30%, transparent); }
.badge-device_enrollment     { background: color-mix(in srgb, #0ea5e9 15%, transparent); color: #7dd3fc; border-color: color-mix(in srgb, #0ea5e9 30%, transparent); }
.badge-conditional_access    { background: color-mix(in srgb, #f59e0b 15%, transparent); color: #fcd34d; border-color: color-mix(in srgb, #f59e0b 30%, transparent); }
.badge-oma_uri               { background: color-mix(in srgb, #64748b 15%, transparent); color: #94a3b8; border-color: color-mix(in srgb, #64748b 30%, transparent); }
.badge-endpoint_protection   { background: color-mix(in srgb, #ef4444 15%, transparent); color: #fca5a5; border-color: color-mix(in srgb, #ef4444 30%, transparent); }

/* Deployment status badges */
.badge-in_progress  { background: color-mix(in srgb, var(--color-primary) 15%, transparent); color: #93c5fd; }
.badge-completed    { background: color-mix(in srgb, var(--color-success) 15%, transparent); color: #6ee7b7; }
.badge-failed       { background: color-mix(in srgb, var(--color-danger)  15%, transparent); color: #fca5a5; }
.badge-withdrawn    { background: rgba(100,116,139,0.1); color: var(--color-text-secondary); }
.badge-imported     { background: color-mix(in srgb, #06b6d4 15%, transparent); color: #67e8f9; }
.badge-preset       { background: color-mix(in srgb, #d946ef 15%, transparent); color: #f0abfc; }
.badge-inactive     { background: rgba(100,116,139,0.1); color: var(--color-text-secondary); opacity: 0.75; }
.badge-template     { background: color-mix(in srgb, #64748b 15%, transparent); color: #94a3b8; }

/* Risk-level aliases used directly as badge values (high/medium/low/critical
   already have badge-high / badge-medium / badge-low / badge-critical defined —
   these aliases ensure both forms work) */
.badge-critical { /* already defined — kept for reference */ }

/* btn-loading spinner state (ButtonLoading helper in main.js) */
.btn-loading {
    position: relative;
    pointer-events: none;
    opacity: 0.75;
}
.btn-loading::after {
    content: '';
    position: absolute;
    right: 0.625rem;
    top: 50%;
    transform: translateY(-50%);
    width: 0.875rem;
    height: 0.875rem;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

/* ----- .page-actions (compliance/scan and some report pages) ----- */
.page-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
}

/* ----- .section-heading flex row (extend the existing margin-only rule) ----- */
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
