:root {
    --sidebar: #07155f;
    --sidebar-strong: #030b3d;
    --primary: #1d4ed8;
    --primary-strong: #153ea9;
    --primary-soft: #eff6ff;
    --success: #16a34a;
    --warning: #f59e0b;
    --danger: #dc2626;
    --info: #0ea5e9;
    --bg: #f8fafc;
    --card: #ffffff;
    --border: #e5e7eb;
    --border-strong: #cbd5e1;
    --text: #0f172a;
    --muted: #64748b;
    --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.05);
    --shadow-md: 0 14px 38px rgba(15, 23, 42, 0.09);
    --ring: 0 0 0 0.2rem rgba(29, 78, 216, 0.16);
}

.secure-preview-frame {
    width: 100%;
    min-height: 72vh;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fff;
}

.secure-image-preview {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 24rem;
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: auto;
}

.secure-image-preview img {
    max-width: 100%;
    max-height: 72vh;
    object-fit: contain;
}

.secure-text-preview {
    white-space: pre-wrap;
    max-height: 72vh;
    overflow: auto;
    padding: 1rem;
    background: #0f172a;
    color: #e2e8f0;
    border-radius: 8px;
}

.file-preview-panel {
    position: relative;
    overflow: hidden;
}

.file-preview-watermark {
    position: absolute;
    inset: 30% auto auto 12%;
    transform: rotate(-24deg);
    font-size: 3rem;
    font-weight: 800;
    color: rgba(220, 38, 38, 0.12);
    pointer-events: none;
    z-index: 2;
}

body {
    background: var(--bg);
    color: var(--text);
    font-size: 0.94rem;
    line-height: 1.55;
    text-rendering: optimizeLegibility;
}

a {
    color: var(--primary);
    text-decoration-thickness: 0.08em;
    text-underline-offset: 0.16em;
}

a:hover {
    color: var(--primary-strong);
}

:focus-visible {
    outline: 3px solid rgba(29, 78, 216, 0.26);
    outline-offset: 2px;
}

.app-shell {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 280px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0)),
        var(--sidebar);
    color: #fff;
    padding: 1rem 0.85rem 0;
    position: sticky;
    top: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: inset -1px 0 0 rgba(255, 255, 255, 0.08);
}

.sidebar-brand {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    padding: 0.5rem 0.35rem 1.15rem;
    margin-bottom: 0.4rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.brand-mark {
    width: 42px;
    height: 42px;
    border-radius: 6px;
    background: #fff;
    color: var(--sidebar);
    display: grid;
    place-items: center;
    font-weight: 800;
    letter-spacing: 0;
    flex: 0 0 auto;
}

.brand-logo {
    width: 100px;
    height: 100px;
    max-width: 100px;
    max-height: 100px;
    object-fit: contain;
    border-radius: 8px;
    background: #fff;
    padding: 4px;
    flex: 0 0 auto;
}

.sidebar-brand strong,
.login-brand h1,
.page-header h1,
.panel-header h2 {
    letter-spacing: 0;
}

.sidebar-tools {
    display: grid;
    gap: 0.65rem;
    padding: 0 0.35rem 0.9rem;
    flex: 0 0 auto;
}

.sidebar-nav {
    display: block;
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
    padding: 0 0.35rem 1rem;
    -webkit-overflow-scrolling: touch;
}

.sidebar-nav:focus-visible {
    outline-color: rgba(191, 219, 254, 0.9);
    outline-offset: -3px;
}

.sidebar-nav::-webkit-scrollbar {
    width: 9px;
}

.sidebar-nav::-webkit-scrollbar-thumb {
    border: 2px solid var(--sidebar);
    border-radius: 99px;
    background: rgba(191, 219, 254, 0.58);
}

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

.sidebar-search {
    position: relative;
}

.sidebar-search i {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.72);
}

[dir="rtl"] .sidebar-search i {
    left: auto;
    right: 0.75rem;
}

.sidebar-search .form-control {
    min-height: 38px;
    padding-left: 2.2rem;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.16);
}

[dir="rtl"] .sidebar-search .form-control {
    padding-left: 0.75rem;
    padding-right: 2.2rem;
}

.sidebar-search .form-control::placeholder {
    color: rgba(255, 255, 255, 0.66);
}

.sidebar-tool-actions {
    display: flex;
    gap: 0.5rem;
}

.sidebar-tool-actions .btn {
    flex: 1 1 0;
}

.topbar-profile-link {
    color: #111827;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.topbar-profile-link:hover {
    color: var(--primary);
}

.topbar-profile-copy {
    display: grid;
    gap: 0.02rem;
}

.topbar-profile-copy strong {
    line-height: 1.2;
}

.topbar-profile-copy small {
    color: var(--muted);
    font-size: 0.78rem;
    line-height: 1.1;
}

.profile-avatar-sm {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
}

.profile-avatar-lg {
    width: 96px;
    height: 96px;
    border-radius: 12px;
    object-fit: cover;
    border: 1px solid #e5e7eb;
}

.settings-logo-preview {
    width: auto;
    height: 100px;
    max-width: 260px;
    max-height: 100px;
    object-fit: contain;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 8px;
    background: #fff;
}

.settings-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 0.9rem;
}

.settings-jump-card {
    border: 1px solid #dbe4f0;
    border-radius: 10px;
    background: #fff;
    padding: 0.9rem 1rem;
    display: flex;
    gap: 0.9rem;
    align-items: flex-start;
    text-align: left;
}

.settings-jump-card.active,
.settings-jump-card:hover {
    border-color: #1d4ed8;
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.08);
}

.settings-jump-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    background: #eff6ff;
    color: #1d4ed8;
    flex: 0 0 auto;
}

.settings-jump-card strong,
.settings-jump-card small {
    display: block;
}

.settings-jump-card small {
    color: #64748b;
    margin-top: 0.15rem;
}

.settings-side-panel {
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 1rem;
    background: #f8fafc;
}

.settings-inline-note,
.settings-runtime-note {
    display: flex;
    gap: 0.6rem;
    align-items: center;
    border: 1px solid #dbe4f0;
    border-radius: 10px;
    padding: 0.85rem 1rem;
    background: #f8fafc;
    color: #475569;
}

.settings-inline-note i {
    color: #1d4ed8;
}

.settings-tab-nav {
    gap: 0.4rem;
}

.settings-tab-nav .nav-link {
    border-radius: 999px;
}

.ck-editor__editable {
    min-height: 280px;
}

.signature-verification-panel {
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #f8fafc;
    padding: 0.75rem;
}

.command-center {
    --cc-bg: #f8fafc;
    --cc-panel: #ffffff;
    --cc-text: #0f172a;
    --cc-muted: #64748b;
    --cc-border: #e5e7eb;
    background: var(--cc-bg);
    color: var(--cc-text);
    min-height: calc(100vh - 9rem);
}

.command-center:fullscreen {
    padding: 1.5rem;
    overflow: auto;
}

.command-center-dark {
    --cc-bg: #07111f;
    --cc-panel: #0f1f33;
    --cc-text: #e5f0ff;
    --cc-muted: #9fb2c9;
    --cc-border: rgba(148, 163, 184, 0.28);
}

.command-center-header,
.command-meta {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: flex-start;
    flex-wrap: wrap;
}

.command-center-header h1 {
    font-size: clamp(2rem, 3vw, 3.25rem);
    margin: 0;
}

.command-center-header p,
.command-meta {
    color: var(--cc-muted);
}

.command-center-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.command-filter-panel,
.command-panel,
.command-card {
    background: var(--cc-panel);
    border: 1px solid var(--cc-border);
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
}

.command-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 0.75rem;
}

.command-card {
    padding: 1rem;
    min-height: 112px;
    display: grid;
    align-content: space-between;
}

.command-card span {
    color: var(--cc-muted);
    font-weight: 700;
}

.command-card strong {
    font-size: 2.2rem;
    line-height: 1;
}

.command-card-danger { border-left: 5px solid var(--danger); }
.command-card-warning { border-left: 5px solid var(--warning); }
.command-card-primary { border-left: 5px solid var(--primary); }
.command-card-info { border-left: 5px solid var(--info); }
.command-card-success { border-left: 5px solid var(--success); }
.command-card-secondary { border-left: 5px solid var(--border-strong); }

.command-panel {
    padding: 1rem;
}

.command-list {
    display: grid;
    gap: 0.65rem;
}

.command-list-item {
    border: 1px solid var(--cc-border);
    border-left-width: 4px;
    border-radius: 8px;
    padding: 0.75rem;
    background: color-mix(in srgb, var(--cc-panel) 92%, var(--primary-soft));
}

.command-list-item strong,
.command-list-item span,
.command-list-item small {
    display: block;
}

.command-list-item span,
.command-list-item small {
    color: var(--cc-muted);
}

.command-list-critical { border-left-color: var(--danger); }
.command-list-warning { border-left-color: var(--warning); }
.command-list-normal { border-left-color: var(--primary); }

.command-health,
.command-kpi-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.55rem 0;
    border-bottom: 1px solid var(--cc-border);
}

.signature-code-row {
    display: grid;
    gap: 0.1rem;
    padding: 0.45rem 0;
    border-bottom: 1px solid #e5e7eb;
}

.signature-code-row:last-child {
    border-bottom: 0;
}

.signature-image-preview {
    display: block;
    max-width: 180px;
    max-height: 86px;
    object-fit: contain;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: #fff;
    margin-top: 0.5rem;
    padding: 0.35rem;
}

.signature-draw-panel {
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #f8fafc;
    padding: 0.75rem;
}

.signature-canvas {
    width: 100%;
    max-width: 720px;
    height: 220px;
    display: block;
    background: #fff;
    border: 1px dashed #cbd5e1;
    border-radius: 8px;
    touch-action: none;
}

.template-preview-header,
.template-preview-footer {
    color: #374151;
    border-color: var(--border);
}

.template-preview-header {
    border-bottom: 1px solid var(--border);
    padding-bottom: 0.75rem;
    margin-bottom: 1rem;
}

.template-preview-footer {
    border-top: 1px solid var(--border);
    padding-top: 0.75rem;
    margin-top: 1.25rem;
}

.template-variable-list {
    display: grid;
    gap: 0.1rem;
}

.qr-panel {
    display: grid;
    grid-template-columns: 128px minmax(0, 1fr);
    gap: 1rem;
    align-items: start;
}

.qr-image {
    width: 128px;
    height: 128px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fff;
    padding: 6px;
}

.dynamic-values {
    grid-template-columns: 180px 1fr;
}

.delegation-check-grid ul,
.clean-check-grid {
    list-style: none;
    padding-left: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem;
}

.delegation-check-grid li,
.delegation-check-grid .form-check,
.clean-check-grid .form-check {
    display: flex;
    gap: 0.45rem;
    align-items: center;
    margin: 0;
    min-height: 38px;
    padding: 0.45rem 0.65rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fff;
}

.delegation-check-grid .form-check-input,
.clean-check-grid .form-check-input {
    flex: 0 0 auto;
    margin: 0;
}

.delegation-check-grid label,
.clean-check-grid label {
    margin: 0;
    line-height: 1.25;
}

.message-list {
    display: grid;
    gap: 0.5rem;
}

.message-list-item {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.85rem 1rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    color: inherit;
    text-decoration: none;
    background: #fff;
}

.message-list-item:hover {
    background: #f8fafc;
}

.message-thread {
    display: grid;
    gap: 0.9rem;
}

.chat-bubble {
    max-width: 82%;
    padding: 0.85rem 1rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fff;
}

.chat-bubble.own {
    margin-left: auto;
    background: #eef6ff;
    border-color: #bfdbfe;
}

.org-chart-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 1rem;
    align-items: start;
}

.org-chart-panel {
    overflow: visible;
}

.org-chart-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    margin-bottom: 0.55rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #e4eaf4;
}

.org-chart-toolbar .btn-group {
    box-shadow: 0 3px 10px rgba(15, 37, 86, 0.06);
}

.org-chart-toolbar > .btn {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
}

.org-chart-toolbar > .btn[data-org-layout] {
    width: auto;
    gap: 0.35rem;
    padding-inline: 0.65rem;
}

.org-chart-status {
    margin-left: auto;
    max-width: 26rem;
    line-height: 1.35;
}

.org-chart-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem 0.85rem;
    align-items: center;
    margin: 0 0 0.75rem;
    color: #637391;
    font-size: 0.76rem;
    font-weight: 600;
}

.org-legend-item {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.org-legend-item i {
    width: 0.55rem;
    height: 0.55rem;
    border-radius: 999px;
    background: #64748b;
    box-shadow: 0 0 0 3px rgba(100, 116, 139, 0.12);
}

.org-legend-item.root i { background: #173a8a; box-shadow: 0 0 0 3px rgba(23, 58, 138, 0.14); }
.org-legend-item.faculty i { background: #16a6d8; box-shadow: 0 0 0 3px rgba(22, 166, 216, 0.13); }
.org-legend-item.department i { background: #f59e0b; box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.14); }
.org-legend-item.unit i { background: #12b981; box-shadow: 0 0 0 3px rgba(18, 185, 129, 0.14); }
.org-legend-item.person i { background: #7c8ca7; box-shadow: 0 0 0 3px rgba(124, 140, 167, 0.14); }

.org-chart-viewport {
    height: min(72vh, 790px);
    min-height: 560px;
    overflow: hidden;
    position: relative;
    isolation: isolate;
    border: 1px solid #dce6f3;
    border-radius: 14px;
    background:
        linear-gradient(rgba(74, 112, 160, 0.06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(74, 112, 160, 0.06) 1px, transparent 1px),
        radial-gradient(circle at 6% 5%, rgba(43, 194, 225, 0.12), transparent 27rem),
        radial-gradient(circle at 94% 88%, rgba(47, 86, 214, 0.10), transparent 31rem),
        #f9fbff;
    background-size: 28px 28px, 28px 28px, auto, auto, auto;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.75), 0 10px 30px rgba(28, 58, 104, 0.05);
    cursor: grab;
    touch-action: none;
}

.org-chart-viewport.dragging {
    cursor: grabbing;
}

.org-tree {
    min-width: 760px;
    display: grid;
    gap: 1rem;
    transform-origin: 0 0;
    will-change: transform;
    padding: 1rem;
}

.org-chart-canvas {
    transform-origin: 0 0;
    will-change: transform;
}

.org-graph {
    min-width: 1280px;
    min-height: 660px;
    position: relative;
}

.org-graph-lines {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 1;
}

.org-graph-line {
    fill: none;
    stroke: #9ab2d5;
    stroke-width: 2.4;
    stroke-linecap: round;
    filter: drop-shadow(0 1px 0 rgba(255, 255, 255, 0.95));
}

.org-graph-line.reporting {
    stroke: #4c6fff;
    stroke-dasharray: 7 7;
    opacity: 0.82;
}

.org-graph-node {
    position: absolute;
    width: 248px;
    min-height: 96px;
    z-index: 2;
    cursor: grab;
    user-select: none;
    touch-action: none;
}

.org-graph-node.dragging {
    cursor: grabbing;
    z-index: 3;
}

.org-graph .org-graph-node {
    width: 248px;
    min-height: 96px;
    display: block;
    overflow: visible;
    border: 0;
    border-radius: 12px;
    background: transparent;
    box-shadow: none;
    padding: 0;
    color: var(--text);
    text-align: left;
}

.org-graph .org-graph-node:hover,
.org-graph .org-graph-node.active {
    border-color: transparent;
    background: transparent;
    box-shadow: none;
}

.org-graph-node .org-node-card {
    position: relative;
    display: grid;
    grid-template-rows: auto auto auto;
    gap: 0.18rem;
    min-height: 96px;
    overflow: hidden;
    padding: 0.68rem 0.78rem 0.68rem 1rem;
    border: 1px solid #dbe5f3;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 7px 18px rgba(31, 60, 105, 0.10);
    transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.org-graph-node:hover .org-node-card,
.org-graph-node.active .org-node-card {
    transform: translateY(-2px);
    border-color: var(--org-accent, #2563eb);
    box-shadow: 0 12px 26px rgba(31, 60, 105, 0.17), 0 0 0 3px color-mix(in srgb, var(--org-accent, #2563eb) 12%, transparent);
}

.org-graph-node.dragging .org-node-card {
    transform: scale(1.025);
    border-color: var(--org-accent, #2563eb);
    box-shadow: 0 16px 34px rgba(31, 60, 105, 0.22), 0 0 0 4px color-mix(in srgb, var(--org-accent, #2563eb) 15%, transparent);
}

.org-graph-node:focus-visible .org-node-card {
    outline: 3px solid rgba(37, 99, 235, 0.36);
    outline-offset: 3px;
}

.org-graph-node .org-node-accent {
    position: absolute;
    z-index: 1;
    inset: 10px auto 10px 0;
    width: 5px;
    border-radius: 0 8px 8px 0;
    background: var(--org-accent, #2563eb);
}

.org-graph-node .org-node-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    min-width: 0;
}

.org-graph-node .org-node-kind {
    display: inline-flex;
    max-width: calc(100% - 1.35rem);
    overflow: hidden;
    border-radius: 999px;
    padding: 0.12rem 0.42rem;
    background: var(--org-tint, #eef4ff);
    color: var(--org-accent, #2563eb);
    font-size: 0.63rem;
    font-weight: 800;
    letter-spacing: 0.035em;
    line-height: 1.1;
    text-transform: uppercase;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.org-graph-node .org-node-action {
    display: inline-grid;
    flex: 0 0 auto;
    width: 1.15rem;
    height: 1.15rem;
    place-items: center;
    border: 1px solid #c7d6e9;
    border-radius: 999px;
    color: #5d7397;
    font-size: 0.66rem;
}

.org-graph-node .org-node-title {
    display: -webkit-box;
    overflow: hidden;
    color: #14284e;
    font-size: 0.82rem;
    font-weight: 800;
    line-height: 1.18;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.org-graph-node .org-node-meta {
    display: -webkit-box;
    overflow: hidden;
    color: #6c7f9c;
    font-size: 0.67rem;
    line-height: 1.2;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.org-graph-node.org-node-root { --org-accent: #173a8a; --org-tint: #eaf0ff; }
.org-graph-node.org-node-faculty { --org-accent: #16a6d8; --org-tint: #e8f8ff; }
.org-graph-node.org-node-department { --org-accent: #f59e0b; --org-tint: #fff7df; }
.org-graph-node.org-node-unit { --org-accent: #12b981; --org-tint: #e8fbf4; }
.org-graph-node.org-node-person { --org-accent: #7c8ca7; --org-tint: #f1f4f8; }

.org-branch,
.org-unit-block,
.org-child-card {
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fff;
    padding: 0.85rem;
}

.org-branch {
    background: #f8fafc;
}

.org-branch h2 {
    font-size: 0.95rem;
    margin: 0 0 0.75rem;
    color: #334155;
}

.org-node-grid,
.org-child-grid {
    display: grid;
    gap: 0.65rem;
}

.org-node-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.org-node-grid.compact {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 0.65rem;
}

.org-child-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 0.75rem;
}

.org-node {
    width: 100%;
    min-height: 74px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: #fff;
    color: var(--text);
    display: grid;
    gap: 0.25rem;
    text-align: left;
    padding: 0.75rem;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.org-node:hover,
.org-node.active {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(29, 78, 216, 0.12);
}

.org-node-root {
    background: #eef6ff;
    border-color: #bfdbfe;
}

.org-node-faculty {
    background: #f0fdf4;
    border-color: #bbf7d0;
}

.org-node-department {
    background: #fff7ed;
    border-color: #fed7aa;
}

.org-node-unit {
    background: #f5f3ff;
    border-color: #ddd6fe;
}

.org-node-person {
    background: #ffffff;
}

.org-node-title {
    font-weight: 700;
    overflow-wrap: anywhere;
}

.org-node-meta {
    color: #64748b;
    font-size: 0.82rem;
    overflow-wrap: anywhere;
}

.org-detail-panel {
    position: sticky;
    top: 88px;
    border-top: 3px solid #2e69d0;
    box-shadow: 0 10px 28px rgba(31, 60, 105, 0.07);
}

.calendar-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 1rem;
    align-items: start;
}

.calendar-detail-panel {
    position: sticky;
    top: 88px;
}

.calendar-view-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.calendar-loading {
    opacity: 0.65;
}

.fc {
    font-size: 0.9rem;
}

.sidebar-brand span,
.sidebar .nav-section {
    display: block;
    color: rgba(255, 255, 255, 0.68);
    font-size: 0.78rem;
}

.sidebar .nav-section {
    text-transform: uppercase;
    margin: 1.1rem 0 0.35rem;
    padding-inline: 0.75rem;
    letter-spacing: 0.04em;
    font-weight: 700;
}

.sidebar-nav .nav-group:first-child .nav-section {
    margin-top: 0.25rem;
}

.sidebar-nav .nav-link {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    color: rgba(255, 255, 255, 0.86);
    border-radius: 6px;
    padding: 0.68rem 0.75rem;
    margin-bottom: 0.2rem;
    font-weight: 500;
    transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.sidebar-nav .nav-link i {
    width: 1.15rem;
    flex: 0 0 auto;
    text-align: center;
    opacity: 0.95;
}

.sidebar-nav .nav-link span {
    min-width: 0;
    flex: 1;
    overflow-wrap: anywhere;
}

.sidebar-nav .nav-link:hover,
.sidebar-nav .nav-link.active {
    color: #fff;
    background: rgba(255, 255, 255, 0.13);
}

.sidebar-nav .nav-link:hover {
    transform: translateX(2px);
}

[dir="rtl"] .sidebar-nav .nav-link:hover {
    transform: translateX(-2px);
}

.sidebar-nav .nav-link.active {
    box-shadow: inset 3px 0 0 #93c5fd;
}

[dir="rtl"] .sidebar-nav .nav-link.active {
    box-shadow: inset -3px 0 0 #93c5fd;
}

.sidebar-nav .nav-link.module-disabled {
    opacity: 0.78;
}

.sidebar-directory-link {
    margin-top: 0.8rem;
    border: 1px solid rgba(191, 219, 254, 0.34);
    background: rgba(255, 255, 255, 0.08);
}

.sidebar-directory-link:hover {
    background: rgba(255, 255, 255, 0.16);
}

.sidebar-app-count {
    min-width: 1.5rem;
    padding: 0.1rem 0.38rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
    font-size: 0.7rem;
    text-align: center;
}

.sidebar-state-badge {
    flex: 0 0 auto;
    padding: 0.1rem 0.35rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
    color: rgba(255, 255, 255, 0.82);
    font-size: 0.7rem;
}

.app-main {
    flex: 1;
    min-width: 0;
}

.app-breadcrumb {
    padding: 0.45rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fff;
}

.app-breadcrumb .breadcrumb {
    font-size: 0.84rem;
}

.app-breadcrumb .breadcrumb-item + .breadcrumb-item::before {
    color: #94a3b8;
}

.topbar {
    min-height: 72px;
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.5rem;
    position: sticky;
    top: 0;
    z-index: 10;
}

.topbar-branding {
    display: grid;
    gap: 0.18rem;
    min-width: 0;
}

.topbar-search {
    flex: 1 1 420px;
    max-width: 760px;
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.topbar-search > i {
    position: absolute;
    left: 0.85rem;
    color: var(--muted);
    pointer-events: none;
}

[dir="rtl"] .topbar-search > i {
    left: auto;
    right: 0.85rem;
}

.topbar-search .form-control {
    padding-left: 2.3rem;
    min-height: 42px;
}

[dir="rtl"] .topbar-search .form-control {
    padding-left: 0.9rem;
    padding-right: 2.3rem;
}

.topbar-search .btn {
    flex: 0 0 auto;
}

.topbar .small {
    letter-spacing: 0;
}

.mobile-sidebar-toggle {
    display: none;
    margin-bottom: 0.4rem;
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.app-launcher .offcanvas-header {
    border-bottom: 1px solid var(--border);
}

.app-launcher-loading {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    color: var(--muted);
    min-height: 2rem;
}

.application-directory-callout {
    display: flex;
    align-items: center;
    gap: 1rem;
    min-height: 92px;
    padding: 1rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #f8fbff;
}

.application-directory-callout__icon {
    display: grid;
    width: 44px;
    height: 44px;
    place-items: center;
    border-radius: 8px;
    background: var(--primary-soft);
    color: var(--primary);
    font-size: 1.15rem;
    flex: 0 0 auto;
}

.application-directory-callout h3 {
    margin: 0 0 0.2rem;
    font-size: 1rem;
}

.application-directory-callout p {
    margin: 0;
    color: var(--muted);
}

.application-directory-callout .btn {
    margin-inline-start: auto;
    flex: 0 0 auto;
}

.app-launcher-group + .app-launcher-group {
    margin-top: 1.5rem;
}

.app-launcher-group-title {
    font-size: 0.76rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 0.75rem;
    letter-spacing: 0.04em;
}

.app-launcher-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 0.85rem;
}

.app-launcher-card {
    display: flex;
    align-items: flex-start;
    gap: 0.9rem;
    padding: 0.95rem 1rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fff;
    color: var(--text);
    text-decoration: none;
    box-shadow: var(--shadow-sm);
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.app-launcher-card:hover,
.app-launcher-card.active {
    border-color: rgba(29, 78, 216, 0.34);
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
    color: var(--text);
}

.app-launcher-card strong,
.app-launcher-card span {
    display: block;
}

.app-launcher-card span {
    color: var(--muted);
    font-size: 0.8rem;
    margin-top: 0.2rem;
}

.app-launcher-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    background: var(--primary-soft);
    color: var(--primary);
    font-size: 1.1rem;
    flex: 0 0 auto;
}

.mobile-bottom-nav {
    position: fixed;
    inset: auto 0 0 0;
    z-index: 1030;
    display: none;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    align-items: stretch;
    padding: 0.55rem 0.65rem calc(0.55rem + env(safe-area-inset-bottom));
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(18px);
    border-top: 1px solid rgba(148, 163, 184, 0.24);
    box-shadow: 0 -16px 36px rgba(15, 23, 42, 0.08);
}

.mobile-bottom-nav__item {
    border: 0;
    background: transparent;
    color: var(--muted);
    text-decoration: none;
    min-height: 58px;
    border-radius: 14px;
    display: grid;
    justify-items: center;
    align-content: center;
    gap: 0.18rem;
    font-size: 0.71rem;
    font-weight: 600;
    padding: 0.35rem 0.2rem;
}

.mobile-bottom-nav__item i {
    font-size: 1.12rem;
    line-height: 1;
}

.mobile-bottom-nav__item.active,
.mobile-bottom-nav__item:hover {
    background: #eef2ff;
    color: var(--primary);
}

.mobile-bottom-nav__launcher {
    cursor: pointer;
}

.notification-menu {
    min-width: 320px;
}

.notification-menu .dropdown-item,
.notification-menu .dropdown-item-text {
    display: grid;
    gap: 0.15rem;
    white-space: normal;
}

.language-form {
    min-width: 120px;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.4rem;
    padding: 1.15rem 1.25rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background:
        linear-gradient(90deg, rgba(29, 78, 216, 0.09), rgba(14, 165, 233, 0.04) 44%, rgba(255, 255, 255, 0)),
        #fff;
    box-shadow: var(--shadow-sm);
}

.page-header h1 {
    font-size: clamp(1.35rem, 1.2rem + 0.5vw, 1.75rem);
    font-weight: 750;
    margin: 0;
}

.page-header p {
    margin: 0.25rem 0 0;
    color: var(--muted);
    max-width: 72ch;
}

.dashboard-context {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.dashboard-toolbar {
    display: grid;
    gap: 0.75rem;
    width: min(100%, 860px);
}

.dashboard-switcher {
    min-width: min(100%, 320px);
}

.dashboard-builder-panel {
    overflow: hidden;
}

.dashboard-grid {
    min-height: 260px;
}

.dashboard-grid > .grid-stack-item > .grid-stack-item-content {
    inset: 0;
}

.dashboard-widget-card {
    height: 100%;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    padding: 0.95rem;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
}

.dashboard-widget-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    cursor: grab;
}

.dashboard-widget-header:active {
    cursor: grabbing;
}

.dashboard-widget-header h3 {
    margin: 0;
    font-size: 0.98rem;
    font-weight: 750;
}

.dashboard-widget-header p {
    margin: 0.22rem 0 0;
    color: var(--muted);
    font-size: 0.85rem;
    line-height: 1.35;
}

.dashboard-widget-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.4rem;
}

.dashboard-widget-body {
    flex: 1 1 auto;
    min-height: 0;
}

.dashboard-widget-body .table-responsive {
    border: 1px solid #eef2f7;
    border-radius: 8px;
}

.dashboard-section-grid {
    display: grid;
    gap: 0.75rem;
}

.dashboard-inline-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 0.75rem;
}

.dashboard-list {
    display: grid;
    gap: 0.5rem;
}

.dashboard-list-item {
    display: grid;
    gap: 0.18rem;
    padding: 0.72rem 0.8rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fff;
}

.watchlist-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.insight-card {
    display: grid;
    align-content: start;
    gap: 0.45rem;
}

.insight-danger {
    border-left: 4px solid var(--danger);
}

.insight-warning {
    border-left: 4px solid var(--warning);
}

.insight-success {
    border-left: 4px solid var(--success);
}

.insight-info {
    border-left: 4px solid var(--info);
}

.search-result-grid {
    display: grid;
    gap: 0.75rem;
}

.search-result-card {
    display: grid;
    gap: 0.3rem;
    padding: 0.95rem 1rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fff;
    color: inherit;
    text-decoration: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.search-result-card:hover {
    border-color: #bfdbfe;
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

.settings-section-grid {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 1rem;
}

.settings-section-grid > .col-12 {
    grid-column: span 12;
}

.settings-section-grid > .col-md-6 {
    grid-column: span 6;
}

.settings-runtime-note {
    display: grid;
    gap: 0.18rem;
    padding: 0.9rem 1rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #f8fafc;
}

.settings-runtime-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.85rem;
}

.settings-runtime-card {
    display: grid;
    gap: 0.18rem;
    min-height: 92px;
    padding: 0.9rem 1rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fff;
}

.settings-runtime-card strong {
    font-size: 0.86rem;
}

.settings-runtime-card span {
    color: var(--muted);
    overflow-wrap: anywhere;
}

.wizard-step-list {
    display: grid;
    gap: 0.9rem;
}

.wizard-step-card {
    display: grid;
    grid-template-columns: 40px 1fr;
    gap: 0.85rem;
    padding: 0.9rem 1rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fff;
}

.wizard-step-card p {
    margin: 0.28rem 0 0;
    color: var(--muted);
}

.dashboard-list-item strong,
.dashboard-list-item span,
.dashboard-list-item small {
    overflow-wrap: anywhere;
}

.dashboard-list-item span,
.dashboard-list-item small {
    color: var(--muted);
}

.dashboard-link-list {
    display: grid;
    gap: 0.5rem;
}

.dashboard-link-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.5rem 0.65rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    color: inherit;
    text-decoration: none;
    background: #fff;
}

.dashboard-link-chip:hover {
    border-color: var(--primary);
    background: #f8fbff;
}

.dashboard-mini-action-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.7rem;
}

.dashboard-mini-action {
    min-height: 88px;
    display: grid;
    justify-items: start;
    align-content: center;
    gap: 0.35rem;
    padding: 0.85rem;
    color: inherit;
    text-decoration: none;
    background: #f8fbff;
    border: 1px solid #dbeafe;
    border-radius: 8px;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.dashboard-mini-action:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

.dashboard-mini-action i {
    color: var(--primary);
    font-size: 1.15rem;
}

.dashboard-mini-action span {
    font-weight: 650;
}

.dashboard-overview-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.75rem;
}

.dashboard-kpi {
    min-height: 92px;
    display: grid;
    align-content: center;
    gap: 0.25rem;
    padding: 0.9rem;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #fbfdff;
}

.dashboard-kpi span {
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
}

.dashboard-kpi strong {
    font-size: 1.55rem;
    line-height: 1.05;
}

.dashboard-chart-panel {
    min-height: 100%;
}

.builder-library-grid {
    display: grid;
    gap: 0.75rem;
}

.builder-library-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.85rem;
    padding: 0.85rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fff;
}

.builder-library-card form,
.builder-library-card > div {
    flex: 1 1 auto;
}

.builder-library-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-top: 0.35rem;
}

.dashboard-builder-offcanvas .nav-pills {
    gap: 0.45rem;
    flex-wrap: wrap;
}

.dashboard-builder-offcanvas .nav-pills .nav-link {
    border-radius: 999px;
}

.builder-category-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.2rem 0.5rem;
    border-radius: 999px;
    background: #eff6ff;
    color: var(--primary);
    font-size: 0.76rem;
    font-weight: 700;
}

.btn-icon {
    width: 34px;
    height: 34px;
    display: inline-grid;
    place-items: center;
    padding: 0;
}

.app-alert {
    display: flex;
    align-items: flex-start;
    gap: 0.55rem;
    border: 0;
    border-left: 4px solid currentColor;
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
}

.app-alert .btn-close {
    margin-left: auto;
}

[dir="rtl"] .app-alert .btn-close {
    margin-left: 0;
    margin-right: auto;
}

.stat-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.9rem;
}

.stat-card,
.content-panel {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
}

.stat-card {
    position: relative;
    overflow: hidden;
    padding: 1rem 1rem 0.95rem;
    min-height: 116px;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.stat-card::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 4px;
    background: var(--primary);
    opacity: 0.78;
}

.stat-card span {
    color: var(--muted);
    display: block;
    margin-bottom: 0.35rem;
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.035em;
}

.stat-card strong {
    font-size: 1.8rem;
    line-height: 1.05;
    letter-spacing: 0;
}

.stat-link {
    color: inherit;
    text-decoration: none;
}

.stat-link:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

.content-panel {
    padding: 1.05rem;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.9rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #f1f5f9;
}

.panel-header h2 {
    font-size: 1.03rem;
    font-weight: 750;
    margin: 0;
}

.panel-subtitle {
    margin: 0.15rem 0 0;
    color: var(--muted);
    font-size: 0.9rem;
}

.quick-action-grid,
.scenario-grid,
.readiness-grid {
    display: grid;
    gap: 0.75rem;
}

.scenario-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.scenario-card {
    display: grid;
    grid-template-columns: 48px 1fr;
    gap: 0.85rem;
    min-height: 168px;
    padding: 1rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fff;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.scenario-card:hover {
    border-color: #bfdbfe;
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

.scenario-icon {
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    background: var(--primary-soft);
    color: var(--primary);
    font-size: 1.25rem;
}

.scenario-body h3 {
    margin: 0.55rem 0 0.3rem;
    font-size: 1rem;
    font-weight: 750;
}

.scenario-body p {
    margin: 0;
    color: var(--muted);
    line-height: 1.45;
}

.scenario-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin-top: 0.75rem;
}

.quick-action-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.quick-action {
    min-height: 94px;
    display: flex;
    gap: 0.75rem;
    padding: 0.85rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    color: inherit;
    text-decoration: none;
    background: #fff;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.quick-action:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

.quick-action-icon {
    width: 38px;
    height: 38px;
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    border-radius: 8px;
    background: var(--primary-soft);
    color: var(--primary);
}

.quick-action strong,
.quick-action small {
    display: block;
}

.quick-action small {
    margin-top: 0.15rem;
    color: var(--muted);
    line-height: 1.35;
}

.readiness-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.readiness-item {
    min-height: 142px;
    display: grid;
    grid-template-columns: 24px 1fr;
    gap: 0.65rem;
    padding: 0.85rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fff;
}

.readiness-item.ready {
    border-color: #bbf7d0;
    background: #f0fdf4;
}

.readiness-item.needs-work {
    border-color: #fed7aa;
    background: #fff7ed;
}

.readiness-icon {
    color: var(--success);
}

.readiness-item.needs-work .readiness-icon {
    color: var(--warning);
}

.readiness-item strong,
.readiness-item span,
.readiness-item a {
    display: block;
}

.readiness-item span {
    margin-top: 0.2rem;
    color: var(--muted);
    font-size: 0.87rem;
    line-height: 1.35;
}

.readiness-item a {
    margin-top: 0.45rem;
    font-size: 0.85rem;
    font-weight: 600;
}

.empty-state {
    display: grid;
    gap: 0.35rem;
    justify-items: center;
    padding: 1.1rem;
    color: var(--muted);
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
    border-radius: 8px;
    text-align: center;
}

.empty-state i {
    color: #94a3b8;
    font-size: 1.35rem;
}

.empty-state strong {
    color: #334155;
    font-weight: 750;
}

.empty-state-large {
    padding: 1.5rem;
}

.media-asset-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
}

.media-asset-card {
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
    display: flex;
    flex-direction: column;
    min-height: 100%;
}

.media-thumb-link {
    position: relative;
    display: block;
    background: #f8fafc;
}

.media-thumb {
    width: 100%;
    height: 188px;
    object-fit: cover;
    display: block;
    background: #e2e8f0;
}

.media-thumb-placeholder {
    display: grid;
    place-items: center;
    gap: 0.45rem;
    color: #475569;
    border-bottom: 1px solid #e2e8f0;
}

.media-thumb-placeholder i {
    font-size: 2rem;
}

.media-thumb-badge {
    position: absolute;
    bottom: 0.8rem;
    right: 0.8rem;
    background: rgba(15, 23, 42, 0.82);
    color: #fff;
    border-radius: 999px;
    padding: 0.35rem 0.6rem;
    font-size: 0.8rem;
}

.media-card-body {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    flex: 1;
}

.media-card-title {
    margin: 0;
    font-size: 1rem;
}

.media-card-meta,
.media-card-description {
    margin: 0;
    color: #64748b;
}

.media-detail-preview {
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 0.9rem;
    background: #f8fafc;
}

.media-detail-image,
.media-detail-video {
    width: 100%;
    max-height: 420px;
    object-fit: contain;
    border-radius: 8px;
    background: #fff;
}

.media-detail-file-placeholder {
    min-height: 240px;
    border: 1px dashed #cbd5e1;
    border-radius: 8px;
    display: grid;
    place-items: center;
    gap: 0.45rem;
    text-align: center;
    background: #fff;
    color: #475569;
    padding: 1rem;
}

.media-detail-file-placeholder i {
    font-size: 2rem;
    color: #64748b;
}

.media-upload-preview-panel {
    position: sticky;
    top: 1rem;
}

.media-upload-preview-frame {
    min-height: 240px;
}

.live-stats-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(320px, 0.8fr);
    gap: 1rem;
}

.live-stats-graph {
    height: 620px;
    border: 1px solid #dbe4f0;
    border-radius: 12px;
    background: #fff;
}

.graph-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.graph-toolbar .btn {
    min-width: 84px;
}

.node-detail-card {
    position: sticky;
    top: 1rem;
}

.node-status-dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    display: inline-block;
    margin-inline-end: 0.35rem;
}

.node-status-dot.online {
    background: #16a34a;
}

.node-status-dot.offline {
    background: #94a3b8;
}

@media (max-width: 991.98px) {
    .live-stats-grid {
        grid-template-columns: 1fr;
    }

    .live-stats-graph {
        height: 460px;
    }
}

.badge {
    font-weight: 600;
    letter-spacing: 0;
    border-radius: 999px;
    padding: 0.38em 0.62em;
}

.text-bg-light {
    color: #334155 !important;
    background-color: #f1f5f9 !important;
    border: 1px solid #e2e8f0;
}

.text-bg-primary {
    background-color: #1d4ed8 !important;
}

.text-bg-info {
    color: #06364f !important;
    background-color: #bae6fd !important;
}

.text-bg-warning {
    color: #5f3b00 !important;
    background-color: #fde68a !important;
}

.text-bg-success {
    color: #063f22 !important;
    background-color: #bbf7d0 !important;
}

.text-bg-danger {
    background-color: #dc2626 !important;
}

.text-bg-secondary {
    background-color: #475569 !important;
}

.api-rule-box {
    min-height: 118px;
    display: grid;
    align-content: start;
    gap: 0.35rem;
    padding: 0.85rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #f8fafc;
}

.api-rule-box strong {
    color: #111827;
}

.api-rule-box span {
    color: #64748b;
    font-size: 0.9rem;
}

.badge-priority {
    background: #eef2ff;
    color: #1d4ed8;
    border: 1px solid #c7d2fe;
}

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

.letter-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 1rem;
}

.letter-subject {
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

.letter-body {
    line-height: 1.7;
}

.detail-list {
    display: grid;
    grid-template-columns: 110px 1fr;
    gap: 0.45rem 0.75rem;
    margin: 0;
}

.detail-list dt {
    color: var(--muted);
    font-weight: 600;
}

.detail-list dd {
    margin: 0;
}

.small-heading {
    font-size: 0.85rem;
    color: #64748b;
    margin-bottom: 0.4rem;
}

.comment-item,
.attachment-row {
    border-bottom: 1px solid var(--border);
    padding: 0.75rem 0;
}

.comment-item:last-child,
.attachment-row:last-child {
    border-bottom: 0;
}

.attachment-row {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: center;
}

.timeline {
    display: grid;
    gap: 1rem;
}

.timeline-item {
    display: grid;
    grid-template-columns: 18px 1fr;
    gap: 0.75rem;
}

.timeline-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--primary);
    margin-top: 0.45rem;
}

.workflow-steps {
    display: grid;
    gap: 0.75rem;
}

.workflow-step {
    display: grid;
    grid-template-columns: 34px 1fr;
    align-items: center;
    gap: 0.75rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.75rem;
    background: #fff;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.workflow-step.current {
    border-color: var(--primary);
    background: #eff6ff;
    box-shadow: 0 0 0 3px rgba(29, 78, 216, 0.1);
}

.ocr-preview {
    max-height: 520px;
    overflow: auto;
    white-space: pre-wrap;
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1rem;
    color: #0f172a;
    font: 0.92rem/1.65 Consolas, "Courier New", monospace;
}

.route-diagram-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: flex-end;
    margin-bottom: 0.75rem;
}

.route-diagram-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 280px;
    gap: 1rem;
    align-items: stretch;
}

.route-diagram-canvas {
    min-height: 520px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #ffffff;
}

.route-diagram-details {
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #f8fafc;
    padding: 1rem;
    min-height: 180px;
}

.route-diagram-details h3 {
    font-size: 1rem;
    margin-bottom: 0.75rem;
}

.route-detail-list {
    display: grid;
    grid-template-columns: 86px 1fr;
    gap: 0.35rem 0.65rem;
    margin: 0;
}

.route-detail-list dt {
    color: #64748b;
    font-weight: 600;
}

.route-detail-list dd {
    margin: 0;
    overflow-wrap: anywhere;
}

.table {
    --bs-table-color: var(--text);
    --bs-table-border-color: #edf2f7;
    margin-bottom: 0;
    vertical-align: middle;
}

.table thead th {
    color: #475569;
    background: #f8fafc;
    border-bottom: 1px solid var(--border);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.035em;
    text-transform: uppercase;
    white-space: nowrap;
}

.table tbody tr {
    transition: background 0.12s ease;
}

.table tbody tr:hover {
    background: #f8fafc;
}

.table td,
.table th {
    padding: 0.72rem 0.78rem;
}

.table-sm td,
.table-sm th {
    padding: 0.56rem 0.65rem;
}

.table-responsive {
    border-radius: 8px;
}

.form-label {
    color: #334155;
    font-size: 0.87rem;
    font-weight: 700;
    margin-bottom: 0.35rem;
}

.form-control,
.form-select {
    border-color: var(--border-strong);
    border-radius: 8px;
    min-height: 42px;
}

.form-control:focus,
.form-select:focus,
.form-check-input:focus {
    border-color: var(--primary);
    box-shadow: var(--ring);
}

textarea.form-control {
    min-height: 120px;
}

.form-text,
.helptext {
    color: var(--muted);
    font-size: 0.84rem;
}

.form-check-input {
    border-color: var(--border-strong);
}

.form-check-input:checked {
    background-color: var(--primary);
    border-color: var(--primary);
}

.btn {
    border-radius: 8px;
    font-weight: 650;
    letter-spacing: 0;
}

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

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

.btn-light {
    color: #334155;
    background: #f8fafc;
    border-color: #edf2f7;
}

.btn-light:hover {
    background: #eef2f7;
    border-color: #dbe3ef;
}

.btn-outline-secondary {
    color: #475569;
    border-color: #cbd5e1;
}

.btn.is-loading {
    pointer-events: none;
    opacity: 0.78;
}

.btn.is-loading .btn-loading-spinner {
    width: 0.9rem;
    height: 0.9rem;
    margin-inline-end: 0.4rem;
    vertical-align: -0.12em;
}

.modal-content {
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: 0 28px 80px rgba(15, 23, 42, 0.22);
}

.modal-header,
.modal-footer {
    background: #f8fafc;
    border-color: var(--border);
}

.modal-title {
    font-weight: 750;
}

.dropdown-menu {
    border-color: var(--border);
    border-radius: 8px;
    box-shadow: var(--shadow-md);
}

.dropdown-item {
    border-radius: 6px;
}

.dropdown-item:active {
    background: var(--primary);
}

.step-number {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--sidebar);
    color: #fff;
    font-weight: 700;
}

.preference-card {
    min-height: 72px;
    display: flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.85rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fff;
}

.sidebar-pref-grid {
    display: grid;
    gap: 1rem;
}

.sidebar-pref-group {
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fff;
    overflow: hidden;
}

.sidebar-pref-title {
    padding: 0.8rem 0.95rem;
    font-weight: 750;
    background: #f8fafc;
    border-bottom: 1px solid var(--border);
}

body.sidebar-compact-preview .sidebar,
.sidebar.sidebar-compact {
    width: 104px;
}

body.sidebar-compact-preview .sidebar-brand strong,
body.sidebar-compact-preview .sidebar-brand span,
body.sidebar-compact-preview .sidebar-search,
body.sidebar-compact-preview .nav-section,
body.sidebar-compact-preview .nav-link span,
.sidebar.sidebar-compact .sidebar-brand strong,
.sidebar.sidebar-compact .sidebar-brand span,
.sidebar.sidebar-compact .sidebar-search,
.sidebar.sidebar-compact .nav-section,
.sidebar.sidebar-compact .nav-link span {
    display: none;
}

body.sidebar-compact-preview .sidebar-tool-actions,
.sidebar.sidebar-compact .sidebar-tool-actions {
    grid-template-columns: 1fr;
}

body.sidebar-compact-preview .sidebar-tool-actions .btn,
.sidebar.sidebar-compact .sidebar-tool-actions .btn {
    width: 100%;
}

body.sidebar-compact-preview .sidebar-brand,
.sidebar.sidebar-compact .sidebar-brand {
    justify-content: center;
}

body.sidebar-compact-preview .sidebar-nav .nav-link,
.sidebar.sidebar-compact .sidebar-nav .nav-link {
    justify-content: center;
    padding-inline: 0.55rem;
}

body.sidebar-compact-preview .sidebar-state-badge,
.sidebar.sidebar-compact .sidebar-state-badge {
    display: none;
}

.login-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    background:
        linear-gradient(180deg, #eef2ff 0%, #f8fafc 55%, #ffffff 100%);
    padding: 1rem;
}

.login-panel {
    width: min(760px, 100%);
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 2rem;
    box-shadow: 0 24px 70px rgba(15, 23, 42, 0.12);
}

.login-brand {
    display: flex;
    gap: 0.9rem;
    align-items: center;
    margin-bottom: 1.5rem;
}

.login-brand .brand-mark {
    background: var(--sidebar);
    color: #fff;
}

.login-brand h1 {
    font-size: 1.15rem;
    margin: 0;
}

.login-brand p {
    margin: 0.25rem 0 0;
    color: #64748b;
}

.demo-login {
    border-top: 1px solid var(--border);
    padding-top: 1rem;
}

.login-language-switcher {
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    padding: 0.85rem 0;
}

.demo-login-header {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.demo-login-header span {
    color: #64748b;
    font-size: 0.88rem;
}

.demo-login-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.55rem;
}

.demo-account-card {
    display: grid;
    gap: 0.15rem;
    min-height: 82px;
    padding: 0.7rem 0.8rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #f8fafc;
    text-align: left;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.demo-account-card:hover {
    border-color: var(--primary);
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}

.demo-account-card span,
.demo-account-card small {
    color: #64748b;
}

.demo-account-card strong {
    color: #0f172a;
    line-height: 1.25;
}

.skeleton-line {
    display: block;
    height: 0.8rem;
    border-radius: 999px;
    background: linear-gradient(90deg, #e2e8f0, #f8fafc, #e2e8f0);
    background-size: 220% 100%;
    animation: app-loading-shimmer 1.25s linear infinite;
}

@keyframes app-loading-shimmer {
    from {
        background-position: 220% 0;
    }
    to {
        background-position: -220% 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
}

[dir="rtl"] .sidebar-nav .nav-link {
    text-align: right;
}

.nav-group {
    display: grid;
}

.nav-section {
    width: 100%;
    border: 0;
    background: transparent;
    color: inherit;
    display: flex;
    align-items: center;
    justify-content: space-between;
    text-align: start;
}

.nav-section .bi {
    font-size: 0.7rem;
    transition: transform 0.18s ease;
}

.nav-group.is-collapsed .nav-section .bi {
    transform: rotate(-90deg);
}

[dir="rtl"] .nav-group.is-collapsed .nav-section .bi {
    transform: rotate(90deg);
}

.nav-group-items {
    display: grid;
}

.work-summary-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.85rem;
}

.work-summary-card {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    min-height: 88px;
    padding: 1rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fff;
    color: inherit;
    text-decoration: none;
    transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.work-summary-card:hover {
    border-color: #94a3b8;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}

.work-summary-icon {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 8px;
    background: #f1f5f9;
    font-size: 1.2rem;
}

.work-summary-card span:last-child {
    display: grid;
}

.work-summary-card strong {
    font-size: 1.45rem;
    line-height: 1;
}

.work-summary-card small {
    margin-top: 0.3rem;
    color: #64748b;
}

.work-filter-bar {
    display: grid;
    grid-template-columns: minmax(220px, 2fr) minmax(150px, 1fr) minmax(150px, 1fr) auto;
    align-items: end;
    gap: 0.75rem;
}

.work-filter-bar label {
    display: block;
    margin-bottom: 0.35rem;
    font-size: 0.82rem;
    font-weight: 700;
    color: #475569;
}

.work-center-list,
.work-widget-list {
    display: grid;
}

.work-center-row {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) auto 18px;
    align-items: center;
    gap: 0.85rem;
    min-height: 82px;
    padding: 0.9rem 0.4rem;
    border-top: 1px solid var(--border);
    color: inherit;
    text-decoration: none;
}

.work-center-row:first-child {
    border-top: 0;
}

.work-center-row:hover {
    background: #f8fafc;
}

.work-center-row.is-overdue {
    border-inline-start: 3px solid #dc2626;
    padding-inline-start: 0.75rem;
}

.work-center-row.is-unread:not(.is-overdue) {
    border-inline-start: 3px solid #0ea5e9;
    padding-inline-start: 0.75rem;
}

.work-center-icon,
.work-item-icon {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: #eef2ff;
    color: #1d4ed8;
}

.work-center-main,
.work-item-copy {
    display: grid;
    min-width: 0;
}

.work-center-main strong,
.work-item-copy strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.work-center-main small,
.work-item-copy small,
.work-center-meta time {
    color: #64748b;
}

.work-center-kicker {
    color: #475569;
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
}

.work-center-meta {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.4rem;
}

.work-center-meta time {
    min-width: 116px;
    font-size: 0.78rem;
    text-align: end;
}

.work-center-open {
    color: #94a3b8;
}

.work-widget-summary {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.8rem;
    margin-bottom: 0.65rem;
    color: #64748b;
    font-size: 0.85rem;
}

.work-widget-item {
    display: grid;
    grid-template-columns: 36px minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.65rem;
    min-height: 54px;
    padding: 0.45rem 0;
    border-top: 1px solid var(--border);
    color: inherit;
    text-decoration: none;
}

.work-widget-item .work-item-icon {
    width: 34px;
    height: 34px;
}

@media (max-width: 992px) {
    .app-shell {
        display: block;
    }
    body {
        padding-bottom: calc(74px + env(safe-area-inset-bottom));
    }
    .sidebar {
        width: min(86vw, 320px);
        height: 100vh;
        position: fixed;
        left: 0;
        top: 0;
        z-index: 100;
        transform: translateX(-100%);
        transition: transform 0.2s ease;
    }
    [dir="rtl"] .sidebar {
        left: auto;
        right: 0;
        transform: translateX(100%);
    }
    body.sidebar-open .sidebar {
        transform: translateX(0);
    }
    .sidebar-nav {
        display: block;
    }
    .mobile-sidebar-toggle {
        display: inline-flex;
    }
    .stat-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .topbar {
        gap: 0.9rem;
    }
    .topbar-search {
        order: 3;
        width: 100%;
        max-width: none;
    }
    .mobile-bottom-nav {
        display: grid;
    }
    .watchlist-grid {
        grid-template-columns: 1fr;
    }
    .settings-runtime-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .quick-action-grid,
    .scenario-grid,
    .readiness-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .route-diagram-layout {
        grid-template-columns: 1fr;
    }
    .org-chart-layout {
        grid-template-columns: 1fr;
    }
    .calendar-layout {
        grid-template-columns: 1fr;
    }
    .org-chart-viewport {
        height: 560px;
    }
    .org-detail-panel {
        position: static;
    }
    .calendar-detail-panel {
        position: static;
    }
    .qr-panel {
        grid-template-columns: 1fr;
    }
    .route-diagram-canvas {
        min-height: 420px;
    }
    .dashboard-overview-grid,
    .dashboard-mini-action-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .work-summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .work-filter-bar {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .topbar,
    .page-header {
        align-items: stretch;
        flex-direction: column;
        height: auto;
    }

    .topbar {
        gap: 0.75rem;
        padding: 0.85rem 1rem;
    }

    .topbar-branding {
        grid-template-columns: 42px minmax(0, 1fr);
        column-gap: 0.65rem;
        align-items: center;
    }

    .mobile-sidebar-toggle {
        grid-row: 1 / span 2;
        margin: 0;
        width: 42px;
        height: 42px;
        justify-content: center;
    }

    .topbar-branding > .small,
    .topbar-branding > .topbar-profile-link {
        grid-column: 2;
    }

    .topbar-actions {
        display: flex;
        align-items: center;
        flex-direction: row;
        flex-wrap: nowrap;
        gap: 0.4rem;
        width: 100%;
    }

    .topbar-actions > * {
        width: auto;
        flex: 0 0 auto;
    }

    .topbar-actions .btn {
        display: inline-grid;
        width: 42px;
        height: 42px;
        padding: 0;
        place-items: center;
    }

    .topbar-actions .language-form {
        flex: 1 1 auto;
        min-width: 0;
    }

    .topbar-actions .language-form .form-select {
        width: 100%;
        min-width: 0;
        height: 42px;
    }

    .topbar-actions form:last-child .btn {
        width: 42px;
    }

    .topbar-actions form:last-child .btn span {
        display: none;
    }

    .topbar-help-link {
        display: none !important;
    }

    .topbar-search {
        flex: 1 1 auto;
    }
    .topbar-search .btn {
        min-width: 52px;
    }
    .letter-actions {
        justify-content: stretch;
    }
    .letter-actions .btn,
    .letter-actions form {
        width: 100%;
    }
    .table-responsive {
        border: 1px solid var(--border);
        border-radius: 8px;
    }
    .panel-header {
        align-items: stretch;
        flex-direction: column;
    }
    .panel-header .btn,
    .page-header .btn {
        width: 100%;
    }
    .sidebar-nav,
    .stat-grid,
    .quick-action-grid,
    .scenario-grid,
    .readiness-grid,
    .demo-login-grid,
    .org-node-grid,
    .org-node-grid.compact,
    .org-child-grid {
        grid-template-columns: 1fr;
    }
    .demo-login-header {
        display: block;
    }
    .scenario-card {
        grid-template-columns: 1fr;
    }
    .delegation-check-grid ul,
    .clean-check-grid {
        grid-template-columns: 1fr;
    }
    .org-tree {
        min-width: 0;
    }
    .dashboard-overview-grid,
    .dashboard-mini-action-grid,
    .settings-runtime-grid,
    .work-summary-grid,
    .work-filter-bar {
        grid-template-columns: 1fr;
    }
    .work-center-row {
        grid-template-columns: 40px minmax(0, 1fr) 16px;
    }
    .work-center-meta {
        grid-column: 2 / -1;
        justify-content: flex-start;
        flex-wrap: wrap;
    }
    .settings-section-grid > .col-md-6 {
        grid-column: span 12;
    }
    .dashboard-widget-header,
    .builder-library-card {
        flex-direction: column;
        align-items: stretch;
    }
    .dashboard-widget-actions {
        justify-content: flex-start;
    }
    .app-launcher-grid {
        grid-template-columns: 1fr;
    }
}
.report-builder-dataset-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.report-builder-dataset {
    display: grid;
    grid-template-columns: 42px 1fr;
    gap: .25rem .85rem;
    align-items: center;
    padding: 1rem;
    border: 1px solid var(--bs-border-color);
    border-radius: 8px;
    color: inherit;
    text-decoration: none;
    background: var(--bs-body-bg);
    transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}

.report-builder-dataset:hover {
    border-color: var(--bs-primary);
    box-shadow: 0 10px 24px rgba(15, 23, 42, .08);
    transform: translateY(-2px);
}

.report-builder-dataset > span:last-child {
    grid-column: 2;
    color: var(--bs-secondary-color);
    font-size: .875rem;
}

.report-builder-icon {
    grid-row: 1 / span 2;
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 8px;
    color: var(--bs-primary);
    background: rgba(var(--bs-primary-rgb), .1);
}

.report-column-options ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: .6rem;
}

.report-column-options label {
    display: flex;
    align-items: center;
    gap: .55rem;
    padding: .55rem .7rem;
    border: 1px solid var(--bs-border-color);
    border-radius: 6px;
    background: var(--bs-body-bg);
}
.guide-step-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
    gap: 1rem;
}

.guide-step-card {
    display: grid;
    grid-template-columns: 42px 1fr;
    gap: .9rem;
    padding: 1rem;
    border: 1px solid var(--bs-border-color);
    border-radius: 8px;
    background: var(--bs-body-bg);
}

.guide-step-card.is-complete {
    border-color: rgba(25, 135, 84, .4);
    background: rgba(25, 135, 84, .04);
}

.guide-step-card h3 {
    margin: 0;
    font-size: 1rem;
}

.guide-step-card p {
    margin: .4rem 0 .75rem;
    color: var(--bs-secondary-color);
    font-size: .9rem;
}

.guide-step-icon {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 8px;
    color: var(--bs-primary);
    background: rgba(var(--bs-primary-rgb), .1);
}

.app-directory-search {
    width: min(360px, 100%);
}

.guide-directory {
    display: grid;
    gap: 1.5rem;
}

.guide-directory-group h3 {
    margin-bottom: .75rem;
    font-size: .95rem;
    color: var(--bs-secondary-color);
}

.guide-directory-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: .75rem;
}

.guide-directory-item {
    display: grid;
    grid-template-columns: 32px 1fr;
    gap: .1rem .7rem;
    align-items: center;
    padding: .75rem;
    border: 1px solid var(--bs-border-color);
    border-radius: 7px;
    color: inherit;
    text-decoration: none;
}

.guide-directory-item:hover {
    border-color: var(--bs-primary);
    background: rgba(var(--bs-primary-rgb), .035);
}

.guide-directory-item > span {
    grid-row: 1 / span 2;
    color: var(--bs-primary);
    font-size: 1.15rem;
}

.guide-directory-item small {
    color: var(--bs-secondary-color);
}

.security-check-list {
    display: grid;
    gap: .75rem;
}

.security-check {
    display: grid;
    grid-template-columns: 34px 1fr auto;
    gap: .75rem;
    align-items: center;
    padding: .85rem;
    border: 1px solid var(--bs-border-color);
    border-left-width: 4px;
    border-radius: 7px;
}

.security-check p {
    margin: .2rem 0 0;
    color: var(--bs-secondary-color);
    font-size: .875rem;
}

.security-check-pass {
    border-left-color: var(--bs-success);
}

.security-check-pass .security-check-icon {
    color: var(--bs-success);
}

.security-check-warn {
    border-left-color: var(--bs-warning);
}

.security-check-warn .security-check-icon {
    color: var(--bs-warning);
}

.security-check-fail {
    border-left-color: var(--bs-danger);
}

.security-check-fail .security-check-icon {
    color: var(--bs-danger);
}

@media (max-width: 767.98px) {
    .application-directory-callout {
        align-items: flex-start;
        flex-wrap: wrap;
    }

    .application-directory-callout .btn {
        width: 100%;
        margin-inline-start: 0;
    }

    .security-check {
        grid-template-columns: 28px 1fr;
    }

    .security-check .btn {
        grid-column: 2;
        justify-self: start;
    }
}
