:root {
    /* Fonts System */
    --font-heading: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

    /* Spacing Scale System */
    --space-xs: 0.25rem;  /* 4px */
    --space-sm: 0.5rem;   /* 8px */
    --space-md: 1rem;     /* 16px */
    --space-lg: 1.5rem;    /* 24px */
    --space-xl: 2.25rem;   /* 36px */
    --space-2xl: 3rem;    /* 48px */

    /* Core Brand & Surface Colors */
    --brand-orange: #d95f28;
    --brand-orange-hover: #b84918;
    --brand-orange-soft: #fff3ed;
    --surface-white: #ffffff;
    --surface-muted: #f8fafc;
    --surface-card: #ffffff;
    --ink-900: #0f172a;
    --ink-700: #334155;
    --ink-500: #64748b;
    --line-soft: #e2e8f0;
    --line-strong: #cbd5e1;
    --surface-panel: rgba(255, 255, 255, 0.92);

    /* Status Color System */
    --status-success-bg: #d1fae5;
    --status-success-text: #065f46;
    --status-warning-bg: #fef3c7;
    --status-warning-text: #92400e;
    --status-danger-bg: #fee2e2;
    --status-danger-text: #991b1b;
    --status-info-bg: #dbeafe;
    --status-info-text: #1e40af;
    --status-secondary-bg: #f1f5f9;
    --status-secondary-text: #475569;

    --shadow-soft: 0 10px 30px rgba(15, 23, 42, 0.04);
    --shadow-card: 0 12px 32px rgba(15, 23, 42, 0.06);
    --shadow-panel: 0 20px 48px rgba(15, 23, 42, 0.08);

    --radius-lg: 0.75rem;
    --radius-md: 0.5rem;
    --radius-sm: 0.375rem;

    --type-page-title: clamp(1.2rem, 1.2vw, 1.4rem);
    --type-module-title: clamp(1rem, 1vw, 1.15rem);
    --type-section-title: 1rem;
    --type-settings-title: clamp(1.25rem, 1.4vw, 1.45rem);
    --type-metric: clamp(1.5rem, 1.6vw, 1.8rem);
    --type-hero: clamp(1.8rem, 2.4vw, 2.3rem);
    
    /* Premium Multi-Color Palette */
    --card-color-1: #3b82f6; /* Blue */
    --card-color-1-soft: rgba(59, 130, 246, 0.12);
    --card-color-2: #10b981; /* Emerald */
    --card-color-2-soft: rgba(16, 185, 129, 0.12);
    --card-color-3: #8b5cf6; /* Violet */
    --card-color-3-soft: rgba(139, 92, 246, 0.12);
    --card-color-4: #f59e0b; /* Amber */
    --card-color-4-soft: rgba(245, 158, 11, 0.12);
    --card-color-5: #6366f1; /* Indigo */
    --card-color-5-soft: rgba(99, 102, 241, 0.12);
    --card-color-6: #ec4899; /* Pink */
    --card-color-6-soft: rgba(236, 72, 153, 0.12);
}

/* Canonical Status Badge Soft Palette Utilities */
.badge.bg-badge-success, .bg-badge-success { background-color: var(--status-success-bg) !important; color: var(--status-success-text) !important; border: 1px solid rgba(6, 95, 70, 0.15); font-weight: 600; padding: 0.35em 0.65em; border-radius: 999px; }
.badge.bg-badge-warning, .bg-badge-warning { background-color: var(--status-warning-bg) !important; color: var(--status-warning-text) !important; border: 1px solid rgba(146, 64, 14, 0.15); font-weight: 600; padding: 0.35em 0.65em; border-radius: 999px; }
.badge.bg-badge-danger, .bg-badge-danger { background-color: var(--status-danger-bg) !important; color: var(--status-danger-text) !important; border: 1px solid rgba(153, 27, 27, 0.15); font-weight: 600; padding: 0.35em 0.65em; border-radius: 999px; }
.badge.bg-badge-info, .bg-badge-info { background-color: var(--status-info-bg) !important; color: var(--status-info-text) !important; border: 1px solid rgba(30, 64, 175, 0.15); font-weight: 600; padding: 0.35em 0.65em; border-radius: 999px; }
.badge.bg-badge-secondary, .bg-badge-secondary { background-color: var(--status-secondary-bg) !important; color: var(--status-secondary-text) !important; border: 1px solid rgba(71, 85, 105, 0.15); font-weight: 600; padding: 0.35em 0.65em; border-radius: 999px; }

/* Sticky Header Table Utility */
.table-sticky-header thead th { position: sticky; top: 0; z-index: 10; background-color: #ffffff; border-bottom: 2px solid var(--line-soft); }

/* Universal Skeleton Loader & Loading Overlay */
.skeleton-loader {
    background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
    background-size: 200% 100%;
    animation: skeleton-wave 1.5s infinite;
    border-radius: var(--radius-sm);
}
@keyframes skeleton-wave {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    font-size: 0.88rem;
    line-height: 1.5;
    background: #f8fafc;
    color: var(--ink-900);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6,
.page-title,
.topbar-title,
.card-title,
.card-header-title,
.modal-title,
.offcanvas-title,
.dashboard-title,
.section-title,
.kpi-card__value,
.stat-value {
    font-family: var(--font-heading);
    letter-spacing: -0.02em;
}

* {
    scrollbar-width: thin;
    scrollbar-color: rgba(20, 20, 20, 0.2) transparent;
}

*::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

*::-webkit-scrollbar-track {
    background: transparent;
}

*::-webkit-scrollbar-thumb {
    background: rgba(20, 20, 20, 0.16);
    border-radius: 999px;
    border: 2px solid transparent;
    background-clip: padding-box;
}

*::-webkit-scrollbar-thumb:hover {
    background: rgba(20, 20, 20, 0.24);
    background-clip: padding-box;
}

.embedded-wrapper {
    min-height: 100vh;
    padding: 1rem;
    background: transparent;
}

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

.app-launcher-overlay {
    position: fixed;
    inset: 0;
    background: rgba(20, 20, 20, 0.32);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
    z-index: 1035;
}

.app-launcher-overlay[hidden],
.app-launcher-panel[hidden] {
    display: none !important;
}

.app-launcher-panel {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: min(960px, calc(100vw - 64px));
    padding: 2rem;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(18px);
    box-shadow: 0 30px 70px rgba(17, 17, 17, 0.18);
    transform: translateX(-108%);
    transition: transform 0.3s ease;
    z-index: 1040;
    overflow-y: auto;
    border-right: 1px solid var(--line-soft);
}

body.launcher-open .app-launcher-overlay {
    opacity: 1;
    pointer-events: auto;
}

body.launcher-open .app-launcher-panel {
    transform: translateX(0);
}

.app-launcher-panel__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.app-launcher-panel__eyebrow,
.sidebar-module__eyebrow {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--ink-500);
}

.app-launcher-panel__title {
    color: var(--ink-900);
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.15;
}

.app-launcher-panel__close {
    border: 0;
    width: 42px;
    height: 42px;
    border-radius: 0.9rem;
    background: #f3f3f3;
    color: var(--ink-900);
    font-size: 1.6rem;
    line-height: 1;
}

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

.app-launcher-panel__section {
    margin-top: 1.5rem;
    padding-top: 1.35rem;
    border-top: 1px solid rgba(20, 20, 20, 0.08);
}

.app-launcher-panel__section-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.7rem;
    margin-top: 0.85rem;
}

.app-launcher-panel__section-link {
    display: inline-flex;
    align-items: center;
    min-height: 2.65rem;
    padding: 0.68rem 0.95rem;
    border-radius: 999px;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--ink-700);
    background: #fff;
    border: 1px solid rgba(20, 20, 20, 0.08);
    transition: color 0.18s ease, border-color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

.app-launcher-panel__section-link:hover,
.app-launcher-panel__section-link.active {
    color: var(--brand-orange);
    background: #fff7f2;
    border-color: rgba(255, 85, 0, 0.2);
    transform: translateY(-1px);
}

.app-launcher-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
    text-decoration: none;
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    background: linear-gradient(180deg, #ffffff 0%, #fbfbfb 100%);
    border: 1px solid rgba(20, 20, 20, 0.08);
    color: var(--ink-900);
    box-shadow: 0 10px 28px rgba(20, 20, 20, 0.04);
    transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.app-launcher-card:hover,
.app-launcher-card.active {
    color: var(--ink-900);
    background: linear-gradient(180deg, #fff7f3 0%, #ffffff 100%);
    border-color: rgba(255, 85, 0, 0.24);
    box-shadow: 0 20px 40px rgba(255, 85, 0, 0.08);
    transform: translateY(-2px);
}

.app-launcher-card__icon {
    width: 3rem;
    height: 3rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 1rem;
    background: linear-gradient(180deg, #fff 0%, #fff8f4 100%);
    color: var(--brand-orange);
    box-shadow: inset 0 0 0 1px rgba(255, 85, 0, 0.12);
}

.app-launcher-card__icon svg {
    width: 1.3rem;
    height: 1.3rem;
    fill: currentColor;
}

.app-launcher-card__title {
    display: block;
    font-weight: 700;
    font-size: 1.05rem;
}

.app-launcher-card__arrow {
    position: absolute;
    right: 1rem;
    bottom: 0.95rem;
    width: 1.9rem;
    height: 1.9rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: var(--ink-500);
    background: rgba(255, 255, 255, 0.78);
    box-shadow: inset 0 0 0 1px rgba(255, 85, 0, 0.08);
    transition: transform 0.18s ease, color 0.18s ease, background 0.18s ease;
}

.app-launcher-card__arrow svg {
    width: 0.95rem;
    height: 0.95rem;
    fill: currentColor;
}

.app-launcher-card:hover .app-launcher-card__arrow,
.app-launcher-card.active .app-launcher-card__arrow {
    color: var(--brand-orange);
    background: #ffffff;
    transform: translateX(2px);
}

.sidebar-nav {
    width: 108px;
    min-height: 100vh;
    height: 100vh;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(18px);
    color: var(--ink-900);
    padding: 1rem 0.8rem 1.1rem;
    position: fixed;
    top: 0;
    left: 0;
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
    align-items: center;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-gutter: stable;
    border-right: 1px solid rgba(20, 20, 20, 0.08);
    box-shadow: 12px 0 40px rgba(15, 23, 42, 0.04);
}

.sidebar-nav__top {
    width: 100%;
    text-align: center;
}

.brand-link {
    color: var(--ink-900);
    text-decoration: none;
    font-weight: 800;
}

.brand-link--mark {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 0.45rem;
}

.brand-mark {
    width: 52px;
    height: 52px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 1.1rem;
    background: linear-gradient(180deg, #fff7f2 0%, #ffffff 100%);
    border: 1px solid rgba(255, 85, 0, 0.14);
    box-shadow: 0 10px 24px rgba(255, 85, 0, 0.08);
}

.brand-mark__image {
    width: 28px;
    height: 28px;
    object-fit: contain;
    display: block;
}

.brand-mark__text {
    font-size: 0.78rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.brand-subtitle {
    font-size: 0.68rem;
    color: var(--ink-700);
    margin-top: 0.45rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.sidebar-rail {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    gap: 0.55rem;
    width: 100%;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 0.15rem 0.1rem;
}

.sidebar-rail__link {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.45rem;
    padding: 0.7rem 0.45rem;
    border-radius: 1.05rem;
    text-decoration: none;
    text-align: center;
    color: var(--ink-700);
    transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.sidebar-rail__icon {
    width: 2.75rem;
    height: 2.75rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 1rem;
    background: linear-gradient(180deg, #ffffff 0%, #f8f8f8 100%);
    color: var(--ink-700);
    border: 1px solid rgba(20, 20, 20, 0.06);
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.05);
}

.sidebar-rail__icon svg {
    width: 1.2rem;
    height: 1.2rem;
    fill: currentColor;
}

.sidebar-rail__label {
    font-size: 0.68rem;
    line-height: 1.25;
    font-weight: 700;
}

.sidebar-rail__link:hover,
.sidebar-rail__link.active {
    color: var(--brand-orange);
    background: linear-gradient(180deg, #fff7f2 0%, #fff2ea 100%);
    box-shadow: inset 0 0 0 1px rgba(255, 85, 0, 0.08);
}

.sidebar-rail__link.active .sidebar-rail__icon,
.sidebar-rail__link:hover .sidebar-rail__icon {
    color: var(--brand-orange);
    border-color: rgba(255, 85, 0, 0.16);
    background: linear-gradient(180deg, #fffaf7 0%, #ffffff 100%);
}

.main-panel {
    margin-left: 108px;
    min-height: 100vh;
}

.topbar-shell {
    position: sticky;
    top: 0;
    z-index: 1020;
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(20, 20, 20, 0.07);
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.03);
}

.topbar {
    color: var(--ink-900);
    padding: 0.9rem 1.5rem 0.75rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.topbar-heading {
    display: flex;
    flex: 1 1 auto;
    align-items: center;
    gap: 0.85rem;
    min-width: 0;
}

.topbar-title-wrap {
    min-width: 0;
}

.topbar-kicker {
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--ink-500);
    margin-bottom: 0.22rem;
}

.page-title {
    font-size: var(--type-page-title);
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.2;
}

.topbar-actions {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.topbar-subnav {
    display: flex;
    gap: 0.6rem;
    overflow-x: auto;
    padding: 0 1.5rem 1rem;
    scrollbar-width: none;
}

.topbar-subnav::-webkit-scrollbar {
    display: none;
}

.topbar-subnav__link {
    display: inline-flex;
    align-items: center;
    min-height: 2.5rem;
    padding: 0.62rem 0.92rem;
    border-radius: 999px;
    text-decoration: none;
    white-space: nowrap;
    color: var(--ink-700);
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid rgba(20, 20, 20, 0.08);
    font-size: 0.9rem;
    font-weight: 600;
    transition: color 0.18s ease, background 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.topbar-subnav__link:hover,
.topbar-subnav__link.active {
    color: var(--brand-orange);
    background: #fff7f2;
    border-color: rgba(255, 85, 0, 0.18);
    transform: translateY(-1px);
}

.topbar-module-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    border: 1px solid rgba(20, 20, 20, 0.08);
    border-radius: 0.5rem;
    background: rgba(255, 255, 255, 0.95);
    color: var(--ink-900);
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.05);
}

.topbar-module-toggle svg {
    width: 1.15rem;
    height: 1.15rem;
    fill: currentColor;
}

.topbar-module-toggle:hover,
.topbar-module-toggle:focus-visible {
    color: var(--brand-orange);
    border-color: rgba(255, 85, 0, 0.24);
}

.topbar-icon-link {
    position: relative;
    width: 46px;
    height: 46px;
    border: 1px solid rgba(20, 20, 20, 0.08);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.95);
    color: var(--ink-900);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.06);
    transition: transform 0.18s ease, color 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.topbar-icon-link svg {
    width: 1.2rem;
    height: 1.2rem;
    stroke: currentColor;
    fill: none;
}

.topbar-icon-link:hover,
.topbar-icon-link:focus-visible {
    color: var(--brand-orange);
    border-color: rgba(255, 85, 0, 0.24);
    transform: translateY(-1px);
    box-shadow: 0 14px 28px rgba(255, 85, 0, 0.1);
}

.topbar-icon-link--logout {
    margin-left: 0.15rem;
}

.topbar-badge {
    position: absolute;
    top: -0.1rem;
    right: -0.15rem;
    min-width: 1.2rem;
    height: 1.2rem;
    padding: 0 0.25rem;
    border-radius: 999px;
    background: var(--brand-orange);
    color: #fff;
    font-size: 0.68rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.topbar-profile-menu {
    min-width: 250px;
    border: 1px solid rgba(20, 20, 20, 0.08) !important;
    border-radius: 0.75rem !important;
    padding: 0;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.08), 0 8px 10px -6px rgba(0, 0, 0, 0.04) !important;
}

.topbar-profile-menu .dropdown-item {
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--ink-800, #2c3038);
    transition: background-color 0.15s ease, color 0.15s ease;
}

.topbar-profile-menu .dropdown-item:hover,
.topbar-profile-menu .dropdown-item:focus {
    background-color: rgba(217, 95, 40, 0.06);
    color: var(--brand-orange);
}

.topbar-dropdown-menu {
    min-width: 220px;
    max-width: 248px;
    padding: 0;
    border-radius: 0.8rem;
    border: 1px solid rgba(20, 20, 20, 0.08);
    box-shadow: var(--shadow-panel);
    overflow: hidden;
}

.topbar-dropdown__header {
    padding: 0.55rem 0.7rem;
    border-bottom: 1px solid rgba(20, 20, 20, 0.06);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.65rem;
}

.topbar-dropdown__title {
    font-weight: 700;
    font-size: 0.82rem;
}

.topbar-dropdown__subtitle {
    font-size: 0.68rem;
    color: var(--ink-500);
}

.topbar-dropdown__list {
    max-height: 220px;
    overflow-y: auto;
    padding: 0.35rem 0.45rem 0.45rem;
}

.topbar-dropdown__empty {
    padding: 0.8rem 0.4rem;
    text-align: center;
    color: var(--ink-500);
    font-size: 0.74rem;
}

.topbar-dropdown__item {
    background: #fff;
    border: 1px solid rgba(20, 20, 20, 0.08);
    border-radius: 0.7rem;
    padding: 0.45rem 0.55rem;
    margin-bottom: 0.35rem;
}

.topbar-dropdown__item.is-unread {
    border-color: rgba(255, 85, 0, 0.24);
    background: rgba(255, 85, 0, 0.05);
}

.topbar-dropdown__item-title {
    font-weight: 600;
    font-size: 0.76rem;
}

.topbar-dropdown__item-meta {
    font-size: 0.64rem;
    color: var(--ink-500);
    margin-bottom: 0.18rem;
}

.topbar-dropdown__item-message {
    font-size: 0.7rem;
    color: var(--ink-700);
    line-height: 1.35;
}

.topbar-dropdown__item-action {
    display: inline-block;
    margin-top: 0.24rem;
    font-size: 0.66rem;
    color: var(--brand-orange);
    text-decoration: none;
}

.topbar-dropdown__item-action:hover {
    text-decoration: underline;
}

.content-wrapper {
    padding: 1.25rem 1.5rem 1.5rem;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.2) 0%, transparent 100%),
        var(--surface-muted);
}

.form-drawer {
    --bs-offcanvas-width: min(1180px, calc(100vw - 320px));
    width: var(--bs-offcanvas-width) !important;
    max-width: var(--bs-offcanvas-width);
}

.offcanvas.form-drawer {
    --bs-offcanvas-width: min(1180px, calc(100vw - 320px));
    border-left: 1px solid rgba(20, 20, 20, 0.08);
    box-shadow: -24px 0 60px rgba(15, 23, 42, 0.12);
    width: var(--bs-offcanvas-width) !important;
    max-width: var(--bs-offcanvas-width);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(252, 252, 252, 0.96) 100%);
}

/* Enterprise Input Engine Extensions */
.enterprise-drawer-tabs .nav-link {
    border: none;
    border-bottom: 2px solid transparent;
    border-radius: 0;
    color: var(--ink-700);
    transition: all 0.15s ease-in-out;
}

.enterprise-drawer-tabs .nav-link:hover {
    color: var(--brand-orange);
    border-bottom-color: rgba(217, 95, 40, 0.3);
}

.enterprise-drawer-tabs .nav-link.active {
    color: var(--brand-orange) !important;
    font-weight: 700;
    border-bottom-color: var(--brand-orange) !important;
    background: transparent;
}

.enterprise-diagnostics-bar {
    font-family: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-size: 0.72rem;
    letter-spacing: -0.01em;
}

[data-condition-field].is-hidden {
    display: none !important;
}

.offcanvas-header {
    background: rgba(255, 255, 255, 0.96);
    border-bottom: 1px solid rgba(20, 20, 20, 0.06);
}

.offcanvas.form-drawer > .offcanvas-header {
    position: sticky;
    top: 0;
    z-index: 3;
    padding: 1.15rem 1.4rem 1rem;
}

.offcanvas.form-drawer > .offcanvas-body {
    padding: 1.15rem 1.4rem 1.45rem;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.78) 0%, rgba(248, 248, 248, 0.92) 100%);
}

.batch-task-form {
    display: flex;
    flex-direction: column;
    min-height: calc(100vh - 112px);
}

.batch-task-form__meta {
    flex: 0 0 auto;
}

.batch-task-list {
    flex: 1 1 auto;
    margin: 1.1rem -0.35rem 0;
    padding: 0.1rem 0.35rem 1rem;
    overflow-y: auto;
    scroll-behavior: smooth;
    scrollbar-gutter: stable;
    max-height: calc(100vh - 310px);
    border-top: 1px solid rgba(20, 20, 20, 0.06);
    border-bottom: 1px solid rgba(20, 20, 20, 0.06);
    background:
        linear-gradient(#fff 30%, rgba(255, 255, 255, 0)) top / 100% 22px no-repeat,
        linear-gradient(rgba(255, 255, 255, 0), #fff 70%) bottom / 100% 22px no-repeat;
}

.batch-task-item {
    padding: 1rem 0;
}

.batch-task-item + .batch-task-item {
    border-top: 1px solid rgba(20, 20, 20, 0.08);
}

.batch-task-item__header,
.batch-task-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.batch-task-item__header {
    margin-bottom: 0.8rem;
}

.batch-task-item__header h3 {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--ink-900);
}

.batch-task-actions {
    flex: 0 0 auto;
    position: sticky;
    bottom: 0;
    z-index: 2;
    margin: 0 -1.4rem -1.45rem;
    padding: 1rem 1.4rem 1.2rem;
    border-top: 1px solid rgba(20, 20, 20, 0.07);
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(10px);
}

.form-drawer__iframe {
    width: 100%;
    height: calc(100vh - 84px);
    border: 0;
    background: var(--surface-muted);
    display: block;
}

.embedded-wrapper {
    padding: 0;
    background: #fff;
}

.embedded-form-page .content-card {
    border: 0;
    border-radius: 0;
    box-shadow: none;
    background: #fff;
}

.embedded-form-page .content-card.p-4,
.embedded-form-page .content-card.p-lg-4,
.embedded-form-page .content-card.p-5 {
    padding: 1.35rem 1.5rem 1.45rem !important;
}

.embedded-form-page .row.g-3 {
    --bs-gutter-x: 1rem;
    --bs-gutter-y: 0.95rem;
}

.embedded-form-page .form-section-title {
    margin-bottom: 0.35rem;
}

.embedded-form-page .offcanvas-header,
.embedded-form-page .content-card > form,
.embedded-form-page .content-card > .row {
    max-width: 1200px;
}

.embedded-form-page .content-card > form {
    width: 100%;
}

.offcanvas.form-drawer .offcanvas-body > form .row.g-3,
.embedded-form-page .content-card > form .row.g-3,
.embedded-form-page form .row.g-3 {
    --bs-gutter-x: 1rem;
    --bs-gutter-y: 0.95rem;
    align-items: start;
}

.offcanvas.form-drawer .offcanvas-body > form,
.embedded-form-page .content-card > form,
.embedded-form-page form {
    width: 100%;
}

.offcanvas.form-drawer .offcanvas-body > form .form-label,
.embedded-form-page .form-label {
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: var(--ink-700);
    margin-bottom: 0.38rem;
}

.embedded-form-page .col-md-6,
.embedded-form-page .col-lg-6,
.embedded-form-page .col-xl-6,
.embedded-form-page .col-md-5,
.embedded-form-page .col-lg-5,
.embedded-form-page .col-md-4,
.embedded-form-page .col-lg-4,
.embedded-form-page .col-md-3,
.embedded-form-page .col-lg-3,
.embedded-form-page .col-md-2,
.embedded-form-page .col-lg-2 {
    min-width: 0;
}

.embedded-form-page .form-control,
.embedded-form-page .form-select {
    min-height: 2.75rem;
    font-size: 0.95rem;
}

.embedded-form-page textarea.form-control {
    min-height: 96px;
}

@media (min-width: 1200px) {
    .offcanvas.form-drawer .offcanvas-body > form .row.g-3 > .col-md-6,
    .offcanvas.form-drawer .offcanvas-body > form .row.g-3 > .col-lg-6,
    .offcanvas.form-drawer .offcanvas-body > form .row.g-3 > .col-xl-6,
    .embedded-form-page form .row.g-3 > .col-md-6,
    .embedded-form-page form .row.g-3 > .col-lg-6,
    .embedded-form-page form .row.g-3 > .col-xl-6 {
        flex: 0 0 auto;
        width: 33.333333%;
    }

    .offcanvas.form-drawer .offcanvas-body > form .row.g-3 > .col-md-4,
    .offcanvas.form-drawer .offcanvas-body > form .row.g-3 > .col-lg-4,
    .offcanvas.form-drawer .offcanvas-body > form .row.g-3 > .col-xl-4,
    .embedded-form-page form .row.g-3 > .col-md-4,
    .embedded-form-page form .row.g-3 > .col-lg-4,
    .embedded-form-page form .row.g-3 > .col-xl-4 {
        flex: 0 0 auto;
        width: 33.333333%;
    }
}

.auth-wrapper {
    min-height: 100vh;
    display: flex;
    padding: 2rem 1.5rem;
    background:
        radial-gradient(circle at top left, rgba(15, 127, 135, 0.18), transparent 28%),
        radial-gradient(circle at bottom right, rgba(27, 86, 134, 0.18), transparent 30%),
        #f4f7fb;
    overflow-y: auto;
}

.login-screen {
    width: min(1180px, 100%);
    margin: auto;
}

.login-screen__panel {
    min-height: 720px;
    display: grid;
    grid-template-columns: minmax(420px, 1fr) 1.1fr;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(20, 20, 20, 0.08);
    border-radius: 5px;
    overflow: hidden;
    box-shadow: 0 35px 80px rgba(15, 23, 42, 0.14);
}

.login-screen__panel--compact {
    min-height: auto;
    grid-template-columns: 1fr;
    max-width: 620px;
}

.login-screen__form-side {
    padding: 3.75rem 3.5rem 2.75rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 2rem;
    background:
        radial-gradient(circle at top left, rgba(255, 85, 0, 0.08), transparent 26%),
        linear-gradient(180deg, rgba(255,255,255,0.98) 0%, #ffffff 100%);
}

.login-screen__form-side--full {
    min-height: 680px;
}

.login-screen__brand {
    display: flex;
    align-items: center;
    min-height: 72px;
}

.login-screen__brand-logo {
    display: block;
    width: auto;
    max-width: 240px;
    max-height: 64px;
    height: auto;
    object-fit: contain;
}

.login-screen__intro {
    max-width: 420px;
}

.login-screen__intro h1 {
    font-size: var(--type-hero);
    font-weight: 700;
    letter-spacing: -0.03em;
    margin-bottom: 0.75rem;
    color: var(--ink-900);
}

.login-screen__intro p {
    margin: 0;
    font-size: 0.94rem;
    line-height: 1.6;
    color: var(--ink-500);
}

.login-form {
    max-width: 430px;
}

.login-form .form-label {
    color: var(--ink-700);
    font-size: 0.88rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.login-form .form-control {
    min-height: 3.6rem;
    border-radius: 1rem;
    border: 1px solid rgba(20, 20, 20, 0.1);
    background: rgba(245, 245, 245, 0.5);
    padding-inline: 1rem;
    box-shadow: none;
}

.login-form .form-control:focus {
    border-color: rgba(255, 85, 0, 0.55);
    box-shadow: 0 0 0 0.25rem rgba(255, 85, 0, 0.12);
    background: #fff;
}

.login-form__link {
    font-size: 0.88rem;
    font-weight: 500;
    text-decoration: none;
    color: var(--brand-orange);
}

.login-form__link:hover {
    color: #cf4500;
}

.login-form__submit {
    min-height: 3.6rem;
    border-radius: 999px;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.login-form__alerts {
    max-width: 430px;
}

.login-screen__utility {
    max-width: 430px;
}

.login-screen__footer-links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    margin-top: auto;
    font-size: 0.82rem;
    color: var(--ink-500);
}

.login-screen__footer-links--left {
    justify-content: flex-start;
}

.login-screen__footer-links a {
    color: var(--ink-500);
    text-decoration: none;
}

.login-screen__footer-links a:hover {
    color: var(--brand-orange);
}

.login-screen__visual-side {
    position: relative;
    min-height: 720px;
    background: #efefef;
}

.login-screen__visual-image {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(0,0,0,0.12), rgba(0,0,0,0.04)),
        url('/assets/img/loginbg.jpg') center center / cover no-repeat;
}

.login-screen__visual-image::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 82% 16%, rgba(255,255,255,0.22), transparent 18%),
        linear-gradient(135deg, rgba(255,255,255,0.04), transparent 55%);
    pointer-events: none;
}

.auth-card,
.card-soft {
    border: 0;
    border-radius: 5px;
    box-shadow: var(--shadow-panel);
}

.stat-card {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(20, 20, 20, 0.05);
    border-left: 3px solid var(--card-theme-color, var(--brand-orange));
    border-radius: 5px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, #ffffff 100%);
    box-shadow: var(--shadow-card);
}

.stat-card::after {
    display: none;
}

.dashboard-kpi-card {
    display: block;
    color: var(--ink-900);
    text-decoration: none;
    transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

a.dashboard-kpi-card:hover,
a.dashboard-kpi-card:focus-visible {
    color: var(--ink-900);
    transform: translateY(-1px);
    border-color: var(--card-theme-color, var(--brand-orange));
    box-shadow: 0 16px 30px var(--card-theme-color-soft, rgba(255, 85, 0, 0.09));
}

/* Card multi-color theme classes */
.card-theme-blue { --card-theme-color: var(--card-color-1); --card-theme-color-soft: var(--card-color-1-soft); }
.card-theme-emerald { --card-theme-color: var(--card-color-2); --card-theme-color-soft: var(--card-color-2-soft); }
.card-theme-violet { --card-theme-color: var(--card-color-3); --card-theme-color-soft: var(--card-color-3-soft); }
.card-theme-amber { --card-theme-color: var(--card-color-4); --card-theme-color-soft: var(--card-color-4-soft); }
.card-theme-indigo { --card-theme-color: var(--card-color-5); --card-theme-color-soft: var(--card-color-5-soft); }
.card-theme-pink { --card-theme-color: var(--card-color-6); --card-theme-color-soft: var(--card-color-6-soft); }

/* Automatic card color rotation inside rows/grids */
.row > div:nth-child(6n+1) .stat-card { --card-theme-color: var(--card-color-1); --card-theme-color-soft: var(--card-color-1-soft); }
.row > div:nth-child(6n+2) .stat-card { --card-theme-color: var(--card-color-2); --card-theme-color-soft: var(--card-color-2-soft); }
.row > div:nth-child(6n+3) .stat-card { --card-theme-color: var(--card-color-3); --card-theme-color-soft: var(--card-color-3-soft); }
.row > div:nth-child(6n+4) .stat-card { --card-theme-color: var(--card-color-4); --card-theme-color-soft: var(--card-color-4-soft); }
.row > div:nth-child(6n+5) .stat-card { --card-theme-color: var(--card-color-5); --card-theme-color-soft: var(--card-color-5-soft); }
.row > div:nth-child(6n+6) .stat-card { --card-theme-color: var(--card-color-6); --card-theme-color-soft: var(--card-color-6-soft); }

/* Automatic card color rotation for direct siblings */
.stat-card:nth-of-type(6n+1) { --card-theme-color: var(--card-color-1); --card-theme-color-soft: var(--card-color-1-soft); }
.stat-card:nth-of-type(6n+2) { --card-theme-color: var(--card-color-2); --card-theme-color-soft: var(--card-color-2-soft); }
.stat-card:nth-of-type(6n+3) { --card-theme-color: var(--card-color-3); --card-theme-color-soft: var(--card-color-3-soft); }
.stat-card:nth-of-type(6n+4) { --card-theme-color: var(--card-color-4); --card-theme-color-soft: var(--card-color-4-soft); }
.stat-card:nth-of-type(6n+5) { --card-theme-color: var(--card-color-5); --card-theme-color-soft: var(--card-color-5-soft); }
.stat-card:nth-of-type(6n+6) { --card-theme-color: var(--card-color-6); --card-theme-color-soft: var(--card-color-6-soft); }

.stat-label {
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--ink-500);
    font-weight: 700;
}

.stat-value {
    font-size: var(--type-metric);
    font-weight: 700;
    line-height: 1;
    letter-spacing: -0.04em;
}

.stat-meta {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
    margin-top: 0.9rem;
    font-size: 0.86rem;
    color: var(--ink-500);
}

.trend-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 0.7rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.trend-chip--up {
    color: #11643a;
    background: #edf9f1;
}

.trend-chip--down {
    color: #b42318;
    background: #fff1ef;
}

.trend-chip--flat {
    color: #5f6b7a;
    background: #eef2f6;
}

.report-subtle {
    color: var(--ink-500);
    font-size: 0.9rem;
}

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

.report-list {
    display: grid;
    gap: 0.75rem;
}

.report-list__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid rgba(20, 20, 20, 0.08);
}

.report-list__row:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.report-list__value {
    font-weight: 700;
    color: var(--ink-900);
}

.chart-card canvas {
    width: 100% !important;
}

@media (max-width: 991.98px) {
    .report-split {
        grid-template-columns: minmax(0, 1fr);
    }
}

.dashboard-hero {
    position: relative;
    overflow: hidden;
    padding: 1.5rem;
    background:
        radial-gradient(circle at top right, rgba(255, 85, 0, 0.08), transparent 30%),
        linear-gradient(135deg, #ffffff 0%, #fffbf8 100%);
    border: 1px solid rgba(217, 95, 40, 0.08);
}

.dashboard-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 14% 12%, rgba(20, 20, 20, 0.03), transparent 18%);
    pointer-events: none;
}

.dashboard-hero__row,
.dashboard-grid {
    position: relative;
    z-index: 1;
}

.dashboard-hero__eyebrow {
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--ink-500);
    margin-bottom: 0.25rem;
}

.dashboard-hero__title {
    font-size: clamp(1.35rem, 1.8vw, 1.8rem);
    font-weight: 800;
    letter-spacing: -0.04em;
    margin-bottom: 0.35rem;
}

.dashboard-hero__subtitle {
    max-width: 56ch;
    font-size: 0.9rem;
    color: var(--ink-700);
    margin-bottom: 0;
}

.dashboard-chip-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.dashboard-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.45rem 0.8rem;
    border-radius: 5px;
    background: var(--brand-orange-soft);
    border: 1px solid rgba(217, 95, 40, 0.12);
    box-shadow: none;
}

.dashboard-chip__label {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--brand-orange);
}

.dashboard-chip__value {
    font-size: 0.96rem;
    font-weight: 800;
    color: var(--ink-900);
}

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

.dashboard-link-card {
    position: relative;
    display: block;
    padding: 0.98rem 3rem 1rem 1rem;
    border: 1px solid rgba(20, 20, 20, 0.08);
    border-radius: 5px;
    text-decoration: none;
    color: var(--ink-900);
    background: linear-gradient(180deg, #ffffff 0%, #fcfcfc 100%);
    transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.dashboard-link-card::after {
    content: "\2192";
    position: absolute;
    top: 50%;
    right: 1.15rem;
    transform: translateY(-50%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    color: rgba(255, 85, 0, 0.85);
    font-size: 1.2rem;
    line-height: 1;
    transition: transform 0.18s ease, color 0.18s ease;
}

.dashboard-link-card:hover,
.dashboard-link-card:focus-visible {
    transform: translateY(-1px);
    border-color: rgba(255, 85, 0, 0.22);
    box-shadow: 0 14px 28px rgba(255, 85, 0, 0.08);
    color: var(--ink-900);
}

.dashboard-link-card:hover::after,
.dashboard-link-card:focus-visible::after {
    transform: translate(4px, -50%);
    color: var(--brand-orange);
}

.dashboard-link-card__label {
    display: block;
    font-weight: 800;
    margin-bottom: 0.18rem;
}

.dashboard-link-card__meta {
    color: var(--ink-700);
    font-size: 0.84rem;
    line-height: 1.45;
}

.dashboard-stack {
    display: grid;
    gap: 1rem;
}

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

.dashboard-feed__item {
    padding: 0.75rem 0.9rem;
    border-radius: 5px;
    border: 1px solid rgba(20, 20, 20, 0.06);
    background: #ffffff;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.dashboard-feed__item:hover {
    border-color: rgba(255, 85, 0, 0.15);
    box-shadow: 0 4px 12px rgba(255, 85, 0, 0.03);
}

.dashboard-feed__title {
    font-weight: 700;
    margin-bottom: 0.14rem;
    font-size: 0.76rem;
}

.dashboard-feed__meta {
    font-size: 0.68rem;
    color: var(--ink-500);
    margin-bottom: 0.28rem;
}

.dashboard-feed__body {
    color: var(--ink-700);
    font-size: 0.7rem;
    line-height: 1.35;
}

.dashboard-table-card .table-responsive {
    margin: 0 -0.2rem;
}

.dashboard-table-card .table > :not(caption) > * > * {
    padding-inline: 0.75rem;
}

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

.dashboard-tile {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 205px;
    padding: 1.3rem 1.35rem 1.5rem;
    text-decoration: none;
    color: var(--ink-900);
    background:
        radial-gradient(circle at top right, rgba(255, 85, 0, 0.08), transparent 24%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, #ffffff 100%);
    border: 1px solid rgba(20, 20, 20, 0.08);
    border-radius: 5px;
    box-shadow: var(--shadow-card);
    overflow: hidden;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.dashboard-tile::before {
    content: "";
    position: absolute;
    inset: 0 auto auto 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, rgba(255, 85, 0, 0.98) 0%, rgba(255, 85, 0, 0.14) 100%);
}

.dashboard-tile::after {
    content: "\2197";
    position: absolute;
    right: 1.2rem;
    bottom: 1.15rem;
    width: 2.1rem;
    height: 2.1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: rgba(255, 85, 0, 0.08);
    color: rgba(255, 85, 0, 0.82);
    font-size: 1rem;
    line-height: 1;
    box-shadow: inset 0 0 0 1px rgba(255, 85, 0, 0.12);
    transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.dashboard-tile:hover,
.dashboard-tile:focus-visible {
    color: var(--ink-900);
    transform: translateY(-3px);
    border-color: rgba(255, 85, 0, 0.24);
    box-shadow: 0 18px 34px rgba(255, 85, 0, 0.08);
    background:
        radial-gradient(circle at top right, rgba(255, 85, 0, 0.12), transparent 24%),
        linear-gradient(180deg, #fffaf7 0%, #ffffff 100%);
}

.dashboard-tile:hover::after,
.dashboard-tile:focus-visible::after {
    transform: translate(2px, -2px);
    background: rgba(255, 85, 0, 0.13);
    color: var(--brand-orange);
}

.dashboard-tile__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-bottom: 0.62rem;
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--ink-500);
}

.dashboard-tile__title {
    font-size: 1.08rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.18;
    margin-bottom: 0.55rem;
}

.dashboard-tile__description {
    margin: 0;
    max-width: 30ch;
    color: var(--ink-700);
    font-size: 0.88rem;
    line-height: 1.65;
}

.dashboard-tile__footer {
    display: none;
}

.dashboard-tile__footer::after {
    display: none;
}

@media (max-width: 991.98px) {
    .dashboard-kpi-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

@media (max-width: 575.98px) {
    .dashboard-kpi-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .dashboard-tile-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

.stat-money {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.2rem;
    margin-top: 0.15rem;
}

.stat-money__currency {
    font-size: 0.78rem;
    font-weight: 500;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--ink-500);
}

.stat-money__amount {
    font-size: var(--type-metric);
    font-weight: 700;
    line-height: 1;
    letter-spacing: -0.04em;
    color: var(--ink-900);
}

.table thead th {
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--ink-500);
    font-weight: 800;
    border-bottom-color: rgba(20, 20, 20, 0.08);
}

.content-card {
    background: linear-gradient(180deg, rgba(255,255,255,0.97) 0%, #ffffff 100%);
    border-radius: 5px;
    box-shadow: var(--shadow-card);
    border: 1px solid rgba(20, 20, 20, 0.06);
}

.communication-stack {
    min-height: 100%;
}

.communication-channel-list,
.communication-user-list,
.communication-member-list {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.communication-channel,
.communication-message-card,
.communication-member,
.communication-user-option {
    border: 1px solid rgba(20, 20, 20, 0.08);
    border-radius: 1rem;
    background: #fff;
    padding: 0.95rem 1rem;
    text-decoration: none;
    color: var(--ink-900);
    transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.communication-channel:hover,
.communication-message-card:hover,
.communication-channel:focus-visible,
.communication-message-card:focus-visible,
.communication-user-option:hover,
.communication-user-option:focus-visible {
    border-color: rgba(255, 85, 0, 0.18);
    box-shadow: 0 12px 26px rgba(15, 23, 42, 0.06);
    transform: translateY(-1px);
    color: var(--ink-900);
}

.communication-channel.active {
    border-color: rgba(255, 85, 0, 0.24);
    background: linear-gradient(180deg, #fff8f4 0%, #ffffff 100%);
    box-shadow: 0 14px 28px rgba(255, 85, 0, 0.08);
}

.communication-user-option.active {
    border-color: rgba(255, 85, 0, 0.24);
    background: linear-gradient(180deg, #fff8f4 0%, #ffffff 100%);
}

.communication-channel,
.communication-member {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.communication-user-option {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
    cursor: pointer;
}

.communication-user-option--selectable {
    align-items: center;
}

.communication-user-option__check {
    margin-top: 0.2rem;
    flex: 0 0 auto;
}

.communication-user-option__content {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    min-width: 0;
}

.communication-user-option__name {
    font-size: 0.98rem;
    font-weight: 700;
    color: var(--ink-900);
}

.communication-user-option__meta {
    font-size: 0.84rem;
    color: var(--ink-500);
}

.communication-search .form-control {
    min-height: 3rem;
}

.communication-user-list--picker {
    max-height: 360px;
    overflow-y: auto;
    padding-right: 0.25rem;
}

.communication-channel__meta,
.communication-channel__counts {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.communication-channel__meta strong {
    font-size: 0.98rem;
    font-weight: 700;
}

.communication-channel__meta span,
.communication-channel__counts small {
    font-size: 0.84rem;
    color: var(--ink-500);
}

.communication-thread-card {
    min-height: 100%;
}

.communication-thread {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    max-height: 520px;
    overflow-y: auto;
    padding-right: 0.25rem;
}

.communication-thread--full {
    max-height: 66vh;
}

.communication-bubble {
    max-width: 84%;
    padding: 0.9rem 1rem;
    border-radius: 1.1rem 1.1rem 1.1rem 0.35rem;
    background: #f7f8fa;
    border: 1px solid rgba(20, 20, 20, 0.06);
}

.communication-bubble.is-own {
    align-self: flex-end;
    border-radius: 1.1rem 1.1rem 0.35rem 1.1rem;
    background: #fff3ea;
    border-color: rgba(255, 85, 0, 0.12);
}

.communication-bubble__author {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--ink-700);
    margin-bottom: 0.35rem;
}

.communication-bubble__body {
    color: var(--ink-900);
    line-height: 1.6;
}

.communication-bubble__subject {
    font-size: 0.86rem;
    font-weight: 700;
    color: var(--ink-800);
    margin-bottom: 0.35rem;
}

.communication-bubble__meta {
    margin-top: 0.45rem;
    font-size: 0.76rem;
    color: var(--ink-500);
}

.communication-empty {
    border: 1px dashed rgba(20, 20, 20, 0.12);
    border-radius: 1rem;
    padding: 1.25rem;
    color: var(--ink-500);
    text-align: center;
    background: rgba(245, 245, 245, 0.55);
}

.communication-composer textarea.form-control {
    min-height: 132px;
}

.communication-message-card.unread {
    border-color: rgba(255, 85, 0, 0.16);
    background: linear-gradient(180deg, #fff8f4 0%, #ffffff 100%);
}

@media (max-width: 991.98px) {
    .login-screen__panel {
        grid-template-columns: 1fr;
        min-height: auto;
    }

    .login-screen__visual-side {
        min-height: 280px;
        order: -1;
    }

    .login-screen__form-side {
        padding: 2rem 1.5rem 1.5rem;
    }
}

.settings-hero {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.settings-kicker {
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    color: var(--ink-500);
}

.settings-page-title {
    font-size: var(--type-settings-title);
    font-weight: 700;
    letter-spacing: -0.03em;
    color: var(--ink-900);
}

.settings-group {
    margin-top: 2rem;
}

.settings-group__title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--ink-700);
    margin-bottom: 1rem;
}

.content-card h2.h5,
.content-card .h5,
.content-card h2.h6,
.content-card .h6 {
    font-size: var(--type-section-title);
    font-weight: 600;
    letter-spacing: -0.015em;
    line-height: 1.35;
}

.content-card h2.h4,
.content-card .h4 {
    font-size: 1.12rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    line-height: 1.3;
}

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

.settings-card {
    min-height: 146px;
    border-radius: 1rem;
    border: 1px solid var(--line-soft);
    background: #fff;
    padding: 1rem;
    text-decoration: none;
    color: var(--ink-900);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    box-shadow: 0 10px 24px rgba(17, 17, 17, 0.04);
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.settings-card:hover,
.settings-card:focus-visible {
    transform: translateY(-2px);
    box-shadow: 0 18px 36px rgba(17, 17, 17, 0.08);
    border-color: rgba(59, 130, 246, 0.18);
    color: var(--ink-900);
}

.settings-card__icon {
    width: 3rem;
    height: 3rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 1rem;
    color: #3b82f6;
    background: #f8fbff;
    box-shadow: inset 0 0 0 1px rgba(59, 130, 246, 0.12);
}

.settings-card__icon--large {
    width: 3.5rem;
    height: 3.5rem;
    flex: 0 0 auto;
}

.settings-card__icon svg {
    width: 1.25rem;
    height: 1.25rem;
    fill: currentColor;
}

.settings-card__title {
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.2;
}

.settings-card__description {
    font-size: 0.92rem;
    color: var(--ink-500);
    line-height: 1.45;
}

.settings-section-heading {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.settings-field-card {
    padding: 1rem;
    border-radius: 1rem;
    background: var(--surface-muted);
    border: 1px solid var(--line-soft);
    min-height: 100%;
}

.investor-avatar-card {
    padding: 1rem;
    border-radius: 1.15rem;
    background: linear-gradient(180deg, #fff7f2 0%, #ffffff 100%);
    border: 1px solid rgba(255, 85, 0, 0.1);
    height: 100%;
}

.investor-avatar {
    width: 84px;
    height: 84px;
    border-radius: 999px;
    background: linear-gradient(135deg, #ff5500 0%, #ff8c52 100%);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -0.04em;
    box-shadow: 0 16px 32px rgba(255, 85, 0, 0.18);
}

.investor-detail-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem 1.25rem;
}

.investor-detail-grid--compact {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.investor-detail-item {
    min-width: 0;
    padding-top: 0.15rem;
}

.investor-detail-item__label {
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ink-500);
    margin-bottom: 0.25rem;
}

.investor-detail-item__value {
    font-size: 0.98rem;
    font-weight: 600;
    color: var(--ink-900);
    line-height: 1.45;
    white-space: pre-wrap;
}

.form-section-title {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.badge-soft {
    background: #fff4ef;
    color: var(--brand-orange);
}

.badge {
    border-radius: 999px;
    font-weight: 700;
    letter-spacing: 0.01em;
    padding: 0.45rem 0.68rem;
}

.badge.bg-success {
    background: #eaf8f0 !important;
    color: #157347 !important;
}

.badge.bg-warning {
    background: #fff6df !important;
    color: #9a6700 !important;
}

.badge.bg-danger {
    background: #feeeee !important;
    color: #c33333 !important;
}

.badge.bg-primary {
    background: #fff1eb !important;
    color: var(--brand-orange) !important;
}

.badge.bg-secondary,
.badge.text-bg-light {
    background: #f4f5f6 !important;
    color: #4f4f4f !important;
}

.badge.bg-info {
    background: #eef6ff !important;
    color: #2663c7 !important;
}

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

.table {
    --bs-table-bg: transparent;
    --bs-table-border-color: rgba(20, 20, 20, 0.08);
    margin-bottom: 0;
}

.table > :not(caption) > * > * {
    padding: 0.65rem 0.8rem;
    vertical-align: middle;
    background: transparent;
}

.stat-card.p-3 {
    padding: 1.25rem 1.5rem !important;
}

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

.table tbody tr:hover {
    background: rgba(255, 85, 0, 0.03);
}

.table tbody td {
    color: #2a2a2a;
}

.table a {
    color: #1f3a8a;
    font-weight: 700;
    text-decoration: none;
}

.table a:hover {
    color: var(--brand-orange);
}

.alert {
    border: 0;
    border-radius: 5px;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
}

.form-control,
.form-select {
    min-height: 46px;
    border-radius: 5px;
    border-color: rgba(20, 20, 20, 0.12);
    background: rgba(255, 255, 255, 0.98);
    box-shadow: none;
    padding-inline: 0.95rem;
}

.form-select {
    padding-right: 2.85rem;
    color: var(--ink-900);
    font-weight: 600;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 18 18' fill='none'%3E%3Cpath d='M4 7l5 5 5-5' stroke='%23141414' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-position: right 0.95rem center;
    background-size: 1rem 1rem;
    background-repeat: no-repeat;
}

.form-control::placeholder,
.form-select:invalid {
    color: rgba(79, 79, 79, 0.72);
}

.form-control:focus,
.form-select:focus {
    border-color: rgba(255, 85, 0, 0.34);
    box-shadow: 0 0 0 0.22rem rgba(255, 85, 0, 0.12);
}

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

.form-control[type="file"] {
    min-height: 3.15rem;
    padding: 0.45rem 0.52rem 0.45rem 0.7rem;
    border-style: dashed;
    border-width: 1.5px;
    border-color: rgba(255, 85, 0, 0.22);
    background: linear-gradient(180deg, #fffaf7 0%, #ffffff 100%);
}

.form-control[type="file"]::file-selector-button {
    margin-right: 0.85rem;
    border: 0;
    border-radius: 0.75rem;
    background: linear-gradient(180deg, #ff6a1f 0%, #ff5500 100%);
    color: #fff;
    font-weight: 700;
    padding: 0.62rem 0.92rem;
    cursor: pointer;
}

.form-control[type="file"]:focus::file-selector-button,
.form-control[type="file"]:hover::file-selector-button {
    background: linear-gradient(180deg, #ff7a36 0%, #ff5d10 100%);
}

.form-control[type="file"].has-file-selection {
    border-color: rgba(17, 100, 58, 0.26);
    background: linear-gradient(180deg, #f4fcf7 0%, #ffffff 100%);
}

.btn {
    border-radius: 5px;
    font-weight: 700;
    letter-spacing: -0.01em;
    padding: 0.65rem 1rem;
    box-shadow: none;
}

.btn-sm {
    border-radius: 5px;
    padding: 0.5rem 0.8rem;
    font-weight: 700;
}

.btn-outline-secondary {
    border-color: rgba(20, 20, 20, 0.12);
    color: var(--ink-700);
    background: rgba(255, 255, 255, 0.9);
}

.btn-outline-secondary:hover,
.btn-outline-secondary:focus-visible {
    background: #fff;
    color: var(--ink-900);
    border-color: rgba(20, 20, 20, 0.22);
}

.app-launcher-toggle {
    width: 52px;
    height: 52px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 85, 0, 0.16);
    border-radius: 1.15rem;
    background: #fff4ef;
    box-shadow: 0 12px 28px rgba(255, 85, 0, 0.12);
    color: #fff;
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
    overflow: hidden;
}

.app-launcher-icon {
    width: 22px;
    height: 22px;
    display: block;
    fill: var(--brand-orange);
    pointer-events: none;
}

.sidebar-footer {
    margin-top: auto;
    width: 100%;
    padding: 0.75rem 0.5rem 0.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
}

.sidebar-workspace-footer {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.35rem 0.4rem;
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    color: #ffffff;
}

.sidebar-workspace-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 0;
    flex: 1;
}

.sidebar-workspace-icon {
    color: #ffffff;
    flex-shrink: 0;
}

.sidebar-workspace-name {
    font-size: 0.78rem;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sidebar-logout-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 0.375rem;
    color: rgba(255, 255, 255, 0.85);
    transition: all 0.18s ease;
    text-decoration: none;
    flex-shrink: 0;
}

.sidebar-logout-link:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.22);
}

.chart-wrapper-container {
    position: relative;
    width: 100%;
}

.chart-empty-overlay {
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.72);
    backdrop-filter: blur(1.5px);
    z-index: 5;
    pointer-events: none;
    border-radius: 0.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.space-y-1\.5 > * + * {
    margin-top: 0.375rem;
}

.sidebar-user {
    width: 100%;
    min-width: 0;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    line-height: 1.35;
    color: var(--ink-700);
    font-size: 0.72rem;
    font-weight: 600;
    text-align: left;
    word-break: break-word;
}

.sidebar-user__label {
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ink-500);
    margin-bottom: 0.2rem;
}

.app-launcher-toggle:hover {
    transform: translateY(-1px);
    box-shadow: 0 18px 32px rgba(255, 85, 0, 0.18);
}

.app-launcher-toggle:focus-visible {
    outline: 2px solid rgba(255, 85, 0, 0.35);
    outline-offset: 3px;
}

.btn-primary {
    background: var(--brand-orange);
    border-color: var(--brand-orange);
    box-shadow: 0 12px 24px rgba(255, 85, 0, 0.14);
}

.btn-primary:hover,
.btn-primary:focus-visible {
    background: #e84d00;
    border-color: #e84d00;
    box-shadow: 0 16px 28px rgba(255, 85, 0, 0.18);
}

.btn-outline-primary {
    color: var(--brand-orange);
    border-color: rgba(255, 85, 0, 0.3);
    background: rgba(255, 255, 255, 0.94);
}

.btn-outline-primary:hover,
.btn-outline-primary:focus-visible {
    background: #fff4ef;
    color: var(--brand-orange);
    border-color: rgba(255, 85, 0, 0.45);
}

.pagination {
    gap: 0.35rem;
}

.page-link {
    border: 1px solid rgba(20, 20, 20, 0.08);
    color: var(--ink-700);
    border-radius: 5px !important;
    min-width: 2.25rem;
    text-align: center;
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.04);
}

.page-item.active .page-link {
    background: var(--brand-orange);
    border-color: var(--brand-orange);
    color: #fff;
}

.dropdown-item {
    border-radius: 5px;
    font-weight: 600;
    padding: 0.6rem 0.75rem;
}

.dropdown-item:hover,
.dropdown-item:focus {
    background: #fff4ef;
    color: var(--brand-orange);
}

@media (max-width: 991.98px) {
    .app-launcher-panel {
        width: min(100vw, 100vw);
        padding: 1.25rem;
    }

    .topbar-shell {
        position: sticky;
    }

    .topbar {
        padding: 0.9rem 1rem;
        align-items: center;
        flex-wrap: wrap;
    }

    .topbar-module-toggle {
        display: inline-flex;
    }

    .topbar-actions {
        gap: 0.55rem;
    }

    .topbar-subnav {
        padding: 0 1rem 0.95rem;
    }

    .content-wrapper {
        padding: 1rem;
    }

    .topbar-icon-link {
        width: 42px;
        height: 42px;
    }

    .form-drawer {
        --bs-offcanvas-width: 100vw;
        width: 100vw;
        max-width: 100vw;
    }

    .form-drawer__iframe {
        height: calc(100vh - 76px);
    }

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

    .app-launcher-toggle {
        width: 46px;
        height: 46px;
    }

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

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

    .communication-thread {
        max-height: none;
    }
}

@media (max-width: 575.98px) {
    .page-title {
        font-size: 1.18rem;
    }

    .login-screen__brand-logo {
        max-width: 180px;
        max-height: 52px;
    }

    .app-launcher-grid {
        grid-template-columns: 1fr;
    }

    .app-launcher-panel__section-links {
        flex-direction: column;
    }

    .app-launcher-panel__section-link {
        width: 100%;
        justify-content: center;
    }

    .topbar {
        align-items: flex-start;
    }

    .topbar-heading,
    .topbar-actions {
        width: 100%;
    }

    .topbar-actions {
        justify-content: flex-end;
    }

    .settings-card-grid {
        grid-template-columns: 1fr;
    }

    .investor-detail-grid,
    .investor-detail-grid--compact {
        grid-template-columns: 1fr;
    }

    .communication-bubble {
        max-width: 100%;
    }

    .communication-channel,
    .communication-member {
        flex-direction: column;
        align-items: stretch;
    }
}

/* Refined workspace shell */
body {
    --sidebar-width: 260px; /* more compact */
}

body.sidebar-collapsed {
    --sidebar-width: 80px; /* standard collapsed width */
}

.sidebar-nav {
    width: var(--sidebar-width);
    padding: 1.25rem 0.75rem;
    align-items: stretch;
    gap: 1rem;
    transition: width 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    background: linear-gradient(180deg, #d95f28 0%, #b84918 100%);
    border-right: 1px solid rgba(0, 0, 0, 0.12);
    box-shadow: 4px 0 24px rgba(15, 23, 42, 0.08);
    color: #ffffff;
}

body.sidebar-collapsed .sidebar-nav {
    padding-inline: 0.5rem;
}

.sidebar-nav__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    min-height: 2.75rem;
    margin-bottom: 0.5rem;
}

body.sidebar-collapsed .sidebar-nav__top {
    justify-content: center;
}

.brand-link--mark {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.6rem;
    text-decoration: none;
    color: #ffffff;
}

.brand-mark {
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    border-radius: 0.5rem;
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.brand-mark__image {
    width: 20px;
    height: 20px;
}

.brand-mark__copy {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 0;
}

.brand-mark__text {
    font-size: 0.95rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    text-transform: none;
    line-height: 1.1;
    color: #ffffff;
}

.brand-subtitle {
    margin-top: 0;
    font-size: 0.65rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.85);
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.sidebar-collapse-toggle {
    width: 28px;
    height: 28px;
    flex: 0 0 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 0.375rem;
    background: rgba(255, 255, 255, 0.15);
    color: #ffffff;
    cursor: pointer;
    transition: all 0.18s ease;
}

.sidebar-collapse-toggle svg {
    width: 1rem;
    height: 1rem;
    fill: currentColor;
    transition: transform 0.2s ease;
}

body.sidebar-collapsed .sidebar-collapse-toggle {
    display: inline-flex;
    width: 28px;
    height: 28px;
}

.sidebar-collapse-toggle:hover {
    color: #ffffff;
    border-color: #ffffff;
    background: rgba(255, 255, 255, 0.3);
}

.sidebar-menu-list {
    display: flex;
    flex: 1 1 auto;
    min-height: 0;
    flex-direction: column;
    gap: 0.2rem;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 0.25rem 0;
}

.sidebar-menu-group {
    display: grid;
    gap: 0.15rem;
}

.sidebar-menu-group + .sidebar-menu-group {
    margin-top: 1rem;
    padding-top: 0.85rem;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
}

.sidebar-menu-group__label {
    padding: 0 0.75rem 0.25rem;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.75);
}

body.sidebar-collapsed .sidebar-menu-list {
    align-items: center;
    gap: 0.5rem;
    padding-inline: 0;
}

body.sidebar-collapsed .sidebar-menu-group {
    width: 100%;
    justify-items: center;
}

body.sidebar-collapsed .sidebar-menu-group__label {
    display: none;
}

body.sidebar-collapsed .sidebar-menu-group + .sidebar-menu-group {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
}

.sidebar-menu,
.sidebar-utility-link {
    border-radius: 0.5rem;
    width: 100%;
}

.sidebar-menu {
    color: rgba(255, 255, 255, 0.92);
}

body.sidebar-collapsed .sidebar-menu,
body.sidebar-collapsed .sidebar-menu__direct,
body.sidebar-collapsed .sidebar-utility-link {
    width: 40px;
}

.sidebar-menu[open],
.sidebar-menu.active,
.sidebar-menu__direct.active {
    background: transparent;
    box-shadow: none;
}

.sidebar-menu__summary,
.sidebar-menu__direct,
.sidebar-utility-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-height: 2.5rem;
    padding: 0.5rem 0.75rem;
    text-decoration: none;
    color: rgba(255, 255, 255, 0.92);
    font-weight: 600;
    line-height: 1.2;
    cursor: pointer;
    border-radius: 0.5rem;
    border: 1px solid transparent;
    transition: all 0.18s ease;
}

body.sidebar-collapsed .sidebar-menu__summary,
body.sidebar-collapsed .sidebar-menu__direct,
body.sidebar-collapsed .sidebar-utility-link {
    min-height: 40px;
    padding: 0;
    gap: 0;
    justify-content: center;
}

.sidebar-menu__summary {
    list-style: none;
}

.sidebar-menu__summary::-webkit-details-marker {
    display: none;
}

.sidebar-menu__direct {
    border-radius: 0.5rem;
}

.sidebar-menu__icon {
    width: 1.5rem;
    height: 1.5rem;
    flex: 0 0 1.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
}

body.sidebar-collapsed .sidebar-menu__icon {
    width: 40px;
    height: 40px;
    flex-basis: 40px;
}

.sidebar-menu__icon svg {
    width: 1.1rem;
    height: 1.1rem;
    fill: #ffffff;
}

.sidebar-menu__label {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.88rem;
}

.sidebar-menu__chevron {
    width: 1.25rem;
    height: 1.25rem;
    flex: 0 0 1.25rem;
    color: rgba(255, 255, 255, 0.75);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.25rem;
    transition: all 0.15s ease;
}

.sidebar-menu__chevron svg {
    display: none;
}

.sidebar-menu__chevron::before {
    content: "+";
    font-size: 1.1rem;
    line-height: 1;
    font-weight: 600;
}

.sidebar-menu[open] .sidebar-menu__chevron::before {
    content: "−";
}

.sidebar-menu:hover > .sidebar-menu__summary,
.sidebar-menu__direct:hover,
.sidebar-utility-link:hover {
    color: #ffffff;
    background-color: rgba(255, 255, 255, 0.14);
    transform: translateX(2px);
}

.sidebar-menu.active > .sidebar-menu__summary,
.sidebar-menu__direct.active,
.sidebar-utility-link.active {
    color: #ffffff;
    background-color: rgba(255, 255, 255, 0.24);
    font-weight: 700;
    border-left: 3.5px solid #ffffff;
    border-radius: 0 0.5rem 0.5rem 0;
}

.sidebar-menu:hover .sidebar-menu__icon,
.sidebar-menu.active .sidebar-menu__icon,
.sidebar-menu__direct:hover .sidebar-menu__icon,
.sidebar-menu__direct.active .sidebar-menu__icon,
.sidebar-utility-link:hover .sidebar-menu__icon,
.sidebar-utility-link.active .sidebar-menu__icon {
    color: #ffffff;
}

.sidebar-submenu {
    position: relative;
    display: grid;
    gap: 0.15rem;
    margin: 0.1rem 0 0.4rem 0;
    padding: 0.2rem 0.2rem 0.2rem 2.25rem;
}

.sidebar-task-group__label {
    font-size: 0.64rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: rgba(255, 255, 255, 0.6);
    padding: 0.45rem 0.5rem 0.15rem;
    margin-top: 0.3rem;
    border-top: 1px dashed rgba(255, 255, 255, 0.15);
}

.sidebar-task-group__label:first-child {
    margin-top: 0;
    border-top: none;
}

.sidebar-menu__chevron-icon {
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1;
    display: inline-block;
    width: 1rem;
    text-align: center;
    color: rgba(255, 255, 255, 0.8);
}

details[open] .sidebar-menu__chevron-icon--minus {
    display: inline-block;
}
details[open] .sidebar-menu__chevron-icon--plus {
    display: none;
}

details:not([open]) .sidebar-menu__chevron-icon--minus {
    display: none;
}
details:not([open]) .sidebar-menu__chevron-icon--plus {
    display: inline-block;
}

.sidebar-submenu::before {
    content: "";
    position: absolute;
    left: 1.25rem;
    top: 0.2rem;
    bottom: 0.3rem;
    border-left: 1.5px solid rgba(255, 255, 255, 0.25);
}

.sidebar-submenu__link {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.4rem 0.75rem;
    border-radius: 0.375rem;
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    font-size: 0.82rem;
    font-weight: 500;
    line-height: 1.35;
    transition: all 0.15s ease;
    width: 100%;
}

.sidebar-submenu__link:hover,
.sidebar-submenu__link.active {
    color: #ffffff;
    background-color: rgba(255, 255, 255, 0.16);
}

.sidebar-submenu__link.active {
    font-weight: 700;
}

.submenu-icon {
    width: 14px;
    height: 14px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    flex-shrink: 0;
    opacity: 0.85;
    transition: opacity 0.15s ease;
}

.sidebar-submenu__link:hover .submenu-icon,
.sidebar-submenu__link.active .submenu-icon {
    opacity: 1;
}

.sidebar-footer {
    margin-top: auto;
    padding-top: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    width: 100%;
}

.sidebar-utility-list {
    display: grid;
    gap: 0.2rem;
    width: 100%;
}

body.sidebar-collapsed .sidebar-utility-list {
    justify-items: center;
}

.sidebar-user {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    padding: 0.6rem 0.8rem;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 5px;
    background: rgba(255, 255, 255, 0.14);
    text-align: center;
}

.sidebar-user__role {
    font-size: 0.76rem;
    font-weight: 700;
    color: #ffffff;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
}

.sidebar-user__logout {
    width: 28px;
    height: 28px;
    flex: 0 0 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(20, 20, 20, 0.08);
    border-radius: 0.375rem;
    background: transparent;
    color: var(--ink-500);
    text-decoration: none;
    transition: all 0.18s ease;
}

.sidebar-user__logout svg {
    width: 0.9rem;
    height: 0.9rem;
    fill: currentColor;
}

.sidebar-user__logout:hover {
    background: rgba(217, 95, 40, 0.06);
    border-color: rgba(217, 95, 40, 0.2);
    color: var(--brand-orange);
}

.main-panel {
    margin-left: var(--sidebar-width);
    transition: margin-left 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

body.sidebar-collapsed .brand-mark__copy,
body.sidebar-collapsed .sidebar-menu__label,
body.sidebar-collapsed .sidebar-menu__chevron,
body.sidebar-collapsed .sidebar-submenu,
body.sidebar-collapsed .sidebar-user__role {
    display: none;
}

body.sidebar-collapsed .sidebar-nav__top {
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    min-height: auto;
}

body.sidebar-collapsed .brand-link--mark,
body.sidebar-collapsed .sidebar-menu__summary,
body.sidebar-collapsed .sidebar-menu__direct,
body.sidebar-collapsed .sidebar-utility-link {
    justify-content: center;
}

body.sidebar-collapsed .sidebar-collapse-toggle svg {
    transform: rotate(180deg);
}

body.sidebar-collapsed .sidebar-user {
    width: 40px;
    justify-content: center;
    padding: 0.4rem 0;
}

.topbar {
    min-height: 76px;
    padding: 0.85rem 1.5rem;
}

.topbar-actions {
    gap: 0.55rem;
    flex-wrap: nowrap;
}

.topbar-create__button {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    min-height: 42px;
    border-radius: 5px;
    padding: 0.58rem 0.95rem;
    white-space: nowrap;
}

.topbar-create__button svg {
    width: 1.05rem;
    height: 1.05rem;
    fill: currentColor;
}

.topbar-create__menu {
    min-width: 230px;
    border-radius: 0.55rem;
    border: 1px solid rgba(20, 20, 20, 0.08);
    box-shadow: var(--shadow-panel);
    padding: 0.45rem;
}

.topbar-icon-link {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 1px solid rgba(20, 20, 20, 0.06);
    background: #ffffff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.topbar-profile-button {
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    border: 1px solid rgba(20, 20, 20, 0.06);
    border-radius: 999px;
    background: #ffffff;
    padding: 0.2rem 0.6rem 0.2rem 0.2rem;
    color: var(--ink-900);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.topbar-profile-button__avatar {
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--brand-orange-soft);
    color: var(--brand-orange);
    font-weight: 700;
    font-size: 0.8rem;
}

.topbar-profile-button__copy {
    display: flex;
    min-width: 0;
    flex-direction: column;
    align-items: flex-start;
    line-height: 1.1;
    font-size: 0.82rem;
    font-weight: 800;
    max-width: 150px;
}

.topbar-profile-button__copy span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
}

.topbar-profile-button__copy small {
    color: var(--ink-500);
    font-size: 0.68rem;
    font-weight: 700;
}

.topbar-profile-button:hover,
.topbar-profile-button:focus-visible {
    color: var(--brand-orange);
    border-color: rgba(255, 85, 0, 0.24);
}

.content-wrapper {
    min-height: calc(100vh - 64px);
    padding: 1.5rem 2rem 2rem;
    background: #f8fafc;
}

.content-card,
.auth-card,
.card-soft,
.alert {
    border-radius: 5px;
    border: 1px solid rgba(20, 20, 20, 0.06);
    background: #ffffff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.stat-card {
    border-radius: 5px;
    border: 1px solid rgba(20, 20, 20, 0.06);
    border-left: 3px solid var(--brand-orange);
    background: #ffffff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    position: relative;
    overflow: hidden;
}

.stat-card::after {
    display: none;
}

.form-control,
.form-select,
.btn {
    border-radius: 0.375rem;
    font-size: 0.88rem;
}

.btn {
    padding: 0.5rem 1rem;
    font-weight: 600;
    transition: all 0.15s ease;
}

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

.btn-primary:hover {
    background: #c65220;
    border-color: #c65220;
}

.form-control,
.form-select {
    min-height: 38px;
    border: 1.5px solid rgba(20, 20, 20, 0.08);
    transition: all 0.15s ease;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--brand-orange);
    box-shadow: 0 0 0 3px rgba(217, 95, 40, 0.12);
}

.btn-sm,
.dropdown-item,
.page-link,
.topbar-dropdown__item,
.topbar-profile-menu,
.topbar-dropdown-menu {
    border-radius: 0.375rem;
}

/* Compact ERP reporting workspace */
.report-workspace,
body.report-page .content-wrapper {
    --report-border: rgba(20, 20, 20, 0.075);
    --report-muted: #73777f;
    --report-warm: rgba(217, 95, 40, 0.045);
    --report-warm-border: rgba(217, 95, 40, 0.14);
}

.report-workspace .row.g-3,
body.report-page .content-wrapper .row.g-3 {
    --bs-gutter-x: 0.85rem;
    --bs-gutter-y: 0.85rem;
}

.report-workspace .content-card,
body.report-page .content-wrapper .content-card {
    border-radius: 0.72rem;
    border: 1px solid rgba(217, 95, 40, 0.105);
    background:
        linear-gradient(180deg, var(--report-warm) 0%, rgba(255, 255, 255, 0) 34%),
        #fff;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.035);
}

.report-workspace .content-card.p-4,
body.report-page .content-wrapper .content-card.p-4 {
    padding: 1rem !important;
}

.report-workspace .stat-card,
body.report-page .content-wrapper .stat-card {
    min-height: 106px;
    border-radius: 0.68rem;
    border: 1px solid rgba(217, 95, 40, 0.11);
    background:
        linear-gradient(180deg, var(--report-warm) 0%, rgba(255, 255, 255, 0) 45%),
        #fff;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.035);
}

.report-workspace .stat-card::after,
body.report-page .content-wrapper .stat-card::after,
.report-workspace .dashboard-tile::before {
    display: none;
}

.report-workspace .stat-card.p-3,
body.report-page .content-wrapper .stat-card.p-3 {
    padding: 0.92rem 1rem !important;
}

.report-workspace .stat-label,
body.report-page .content-wrapper .stat-label {
    margin-bottom: 0.35rem;
    font-size: 0.68rem;
    letter-spacing: 0.09em;
    color: #85888d;
    font-weight: 760;
}

.report-workspace .stat-value,
body.report-page .content-wrapper .stat-value {
    font-size: clamp(1.12rem, 1.22vw, 1.35rem);
    letter-spacing: -0.035em;
    font-weight: 720;
}

.report-workspace .stat-meta,
body.report-page .content-wrapper .stat-meta {
    margin-top: 0.55rem;
    gap: 0.45rem;
    font-size: 0.76rem;
}

.report-workspace .small,
body.report-page .content-wrapper .small,
.report-workspace .text-muted,
body.report-page .content-wrapper .text-muted,
.report-workspace .report-subtle,
body.report-page .content-wrapper .report-subtle {
    color: var(--report-muted) !important;
}

.report-workspace .table-responsive,
body.report-page .content-wrapper .table-responsive {
    border-radius: 0;
}

.report-workspace .table,
body.report-page .content-wrapper .table {
    border-color: rgba(20, 20, 20, 0.07);
    --bs-table-striped-bg: rgba(217, 95, 40, 0.025);
}

.report-workspace .table thead th,
body.report-page .content-wrapper .table thead th {
    padding-top: 0.65rem;
    padding-bottom: 0.65rem;
    font-size: 0.68rem;
    letter-spacing: 0.08em;
    color: #85888d;
    font-weight: 760;
    border-bottom: 1px solid rgba(20, 20, 20, 0.08);
    background: rgba(217, 95, 40, 0.04);
}

.report-workspace .table > :not(caption) > * > *,
body.report-page .content-wrapper .table > :not(caption) > * > * {
    padding: 0.62rem 0.7rem;
}

.report-workspace .table tbody td,
body.report-page .content-wrapper .table tbody td {
    font-size: 0.82rem;
    color: #34373b;
}

.report-workspace .table tbody tr:hover,
body.report-page .content-wrapper .table tbody tr:hover {
    background: rgba(217, 95, 40, 0.035);
}

.report-workspace .form-label,
body.report-page .content-wrapper .form-label {
    color: #686c73;
    font-size: 0.72rem;
    font-weight: 720;
}

.report-workspace .form-control,
.report-workspace .form-select,
body.report-page .content-wrapper .form-control,
body.report-page .content-wrapper .form-select {
    min-height: 38px;
    border-radius: 0.48rem;
    border-color: rgba(20, 20, 20, 0.11);
    box-shadow: none;
}

.report-workspace .btn,
body.report-page .content-wrapper .btn {
    min-height: 38px;
    border-radius: 0.48rem;
    padding: 0.48rem 0.72rem;
    font-weight: 650;
}

.report-workspace .chart-card canvas,
body.report-page .content-wrapper .chart-card canvas {
    max-height: 260px;
}

.report-workspace .report-list,
body.report-page .content-wrapper .report-list {
    gap: 0;
}

.report-workspace .report-list__row,
body.report-page .content-wrapper .report-list__row {
    padding: 0.58rem 0;
    border-bottom-color: rgba(20, 20, 20, 0.07);
}

.report-workspace .report-list__value,
body.report-page .content-wrapper .report-list__value {
    font-weight: 680;
}

.report-workspace .dashboard-tile-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.85rem;
}

.report-workspace .dashboard-tile {
    min-height: 126px;
    padding: 1rem;
    border-radius: 0.7rem;
    background:
        linear-gradient(180deg, var(--report-warm) 0%, rgba(255, 255, 255, 0) 45%),
        #fff;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.035);
}

.report-workspace .dashboard-tile:hover,
.report-workspace .dashboard-tile:focus-visible {
    transform: translateY(-1px);
    border-color: rgba(20, 20, 20, 0.12);
    background: #fff;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.055);
}

.report-workspace .dashboard-tile::after {
    width: 1.75rem;
    height: 1.75rem;
    right: 0.85rem;
    bottom: 0.85rem;
    background: #f4f4f5;
    color: #6d7178;
    box-shadow: none;
}

.report-workspace .dashboard-tile__eyebrow {
    margin-bottom: 0.35rem;
    font-size: 0.65rem;
    letter-spacing: 0.08em;
}

.report-workspace .dashboard-tile__title {
    font-size: 0.96rem;
    font-weight: 720;
    margin-bottom: 0.38rem;
}

.report-workspace .dashboard-tile__description {
    font-size: 0.78rem;
    line-height: 1.38;
}

.report-workspace .dashboard-tile__footer {
    display: none;
}

@media (max-width: 1199.98px) {
    .report-workspace .dashboard-tile-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 991.98px) {
    .report-workspace .dashboard-tile-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 575.98px) {
    .report-workspace .dashboard-tile-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 1199.98px) {
    body {
        --sidebar-width: 264px;
    }

    body.sidebar-collapsed {
        --sidebar-width: 108px;
    }

    .topbar-profile-button__copy {
        display: none;
    }

    .topbar-profile-button {
        padding-right: 0.25rem;
    }
}

@media (max-width: 991.98px) {
    body,
    body.sidebar-collapsed {
        --sidebar-width: 0px;
    }

    .sidebar-nav {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        z-index: 1040;
        display: flex;
        width: min(86vw, 320px);
        max-width: 320px;
        transform: translateX(-105%);
        transition: transform 0.24s ease;
    }

    body.sidebar-collapsed .sidebar-nav {
        padding: 1rem 0.82rem;
    }

    .sidebar-collapse-toggle {
        display: none;
    }

    body.sidebar-collapsed .brand-mark__copy {
        display: flex;
    }

    body.sidebar-collapsed .sidebar-menu__label,
    body.sidebar-collapsed .sidebar-menu__chevron {
        display: inline-flex;
    }

    body.sidebar-collapsed .sidebar-submenu {
        display: grid;
    }

    body.sidebar-collapsed .sidebar-user__meta {
        display: block;
    }

    body.sidebar-collapsed .sidebar-user__logout {
        display: inline-flex;
    }

    body.sidebar-collapsed .sidebar-menu,
    body.sidebar-collapsed .sidebar-menu__direct,
    body.sidebar-collapsed .sidebar-utility-link,
    body.sidebar-collapsed .sidebar-user {
        width: 100%;
    }

    body.sidebar-collapsed .sidebar-nav__top,
    body.sidebar-collapsed .brand-link--mark,
    body.sidebar-collapsed .sidebar-menu__summary,
    body.sidebar-collapsed .sidebar-menu__direct,
    body.sidebar-collapsed .sidebar-utility-link {
        justify-content: flex-start;
    }

    body.sidebar-collapsed .sidebar-menu__summary,
    body.sidebar-collapsed .sidebar-menu__direct,
    body.sidebar-collapsed .sidebar-utility-link {
        min-height: 2.72rem;
        padding: 0.52rem 0.62rem;
        gap: 0.68rem;
    }

    body.sidebar-collapsed .sidebar-menu__icon {
        width: 1.9rem;
        height: 1.9rem;
        flex: 0 0 1.9rem;
    }

    body.sidebar-collapsed .sidebar-user {
        justify-content: flex-start;
        padding: 0.65rem 0.55rem 0.65rem 0.65rem;
    }

    body.mobile-sidebar-open .sidebar-nav {
        transform: translateX(0);
    }

    .mobile-sidebar-backdrop {
        position: fixed;
        inset: 0;
        z-index: 1035;
        display: block;
        border: 0;
        background: rgba(20, 20, 20, 0.38);
        padding: 0;
    }

    .mobile-sidebar-backdrop[hidden] {
        display: none;
    }

    .main-panel {
        margin-left: 0;
    }

    .topbar-actions {
        flex-wrap: wrap;
    }
}

@media (max-width: 575.98px) {
    .topbar-create__button span {
        display: none;
    }

    .topbar-create__button {
        width: 42px;
        justify-content: center;
        padding-inline: 0;
    }
}

/* Reference-style Clean Minimal Authentication Experience */
.auth-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        radial-gradient(circle at 15% 15%, rgba(217, 95, 40, 0.12), transparent 45%),
        radial-gradient(circle at 85% 85%, rgba(99, 102, 241, 0.12), transparent 45%),
        linear-gradient(135deg, #eef2ff 0%, #f8fafc 50%, #e2e8f0 100%);
    padding: 1.5rem;
}

.ref-login-wrapper {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.ref-login-header {
    margin-bottom: 1.25rem;
    text-align: center;
}

.ref-login-logo {
    max-height: 42px;
    object-fit: contain;
}

.ref-login-card {
    width: 100%;
    max-width: 400px;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 16px 40px -8px rgba(15, 23, 42, 0.08);
    border: 1px solid rgba(226, 232, 240, 0.9);
    padding: 1.85rem 1.75rem;
    margin: 0 auto;
}

.ref-login-title {
    font-size: 1.5rem;
    font-weight: 750;
    color: #0f172a;
    margin-bottom: 0.25rem;
    text-align: center;
    letter-spacing: -0.02em;
}

.ref-login-subtitle {
    font-size: 0.83rem;
    color: #64748b;
    margin-bottom: 1.25rem;
    text-align: center;
    line-height: 1.4;
}

.ref-label {
    display: block;
    font-size: 0.82rem;
    font-weight: 650;
    color: #1e293b;
    margin-bottom: 0.35rem;
}

.ref-input {
    width: 100%;
    min-height: 42px;
    padding: 0.55rem 0.85rem;
    background: #ffffff;
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.88rem;
    color: #0f172a;
    transition: all 0.2s ease;
}

.ref-input::placeholder {
    color: #94a3b8;
}

.ref-input:focus {
    outline: none;
    border-color: var(--brand-orange);
    box-shadow: 0 0 0 3px rgba(217, 95, 40, 0.12);
}

.ref-password-wrapper {
    position: relative;
}

.ref-password-wrapper .ref-input {
    padding-right: 2.5rem;
}

.ref-password-toggle {
    position: absolute;
    right: 0.65rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    padding: 0.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
}

.ref-password-toggle:hover {
    color: var(--brand-orange);
}

.ref-checkbox {
    width: 1rem;
    height: 1rem;
    border-radius: 4px;
    border: 1.5px solid #cbd5e1;
    cursor: pointer;
}

.ref-checkbox:checked {
    background-color: var(--brand-orange);
    border-color: var(--brand-orange);
}

.ref-checkbox-label {
    font-size: 0.8rem;
    color: #64748b;
    cursor: pointer;
    margin-left: 0.25rem;
}

.ref-forgot-link {
    font-size: 0.8rem;
    font-weight: 650;
    color: var(--brand-orange);
    text-decoration: none;
}

.ref-forgot-link:hover {
    text-decoration: underline;
    color: #c65220;
}

.ref-submit-btn {
    width: 100%;
    min-height: 44px;
    background: linear-gradient(180deg, #ff6a1f 0%, #d95f28 100%);
    border: none;
    border-radius: 10px;
    color: #ffffff;
    font-weight: 650;
    font-size: 0.92rem;
    box-shadow: 0 5px 15px rgba(217, 95, 40, 0.22);
    cursor: pointer;
    transition: all 0.2s ease;
}

.ref-submit-btn:hover {
    background: linear-gradient(180deg, #e6561b 0%, #c4501b 100%);
    box-shadow: 0 8px 22px rgba(217, 95, 40, 0.35);
    transform: translateY(-1px);
    color: #ffffff;
}

.ref-submit-btn:active {
    transform: translateY(0);
}

.login-screen {
    width: min(920px, 94vw);
    max-width: 920px;
    margin: auto;
}

.login-screen__panel {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(320px, 400px);
    height: auto;
    border-radius: 12px;
    background: #ffffff;
    border: 1px solid rgba(226, 232, 240, 0.9);
    box-shadow: 
        0 20px 50px -10px rgba(15, 23, 42, 0.09),
        0 8px 20px -6px rgba(15, 23, 42, 0.04);
    overflow: hidden;
}

.login-screen__panel--compact {
    height: auto;
    min-height: auto;
    max-width: 440px;
    margin: 0 auto;
    grid-template-columns: 1fr;
    border-radius: 12px;
    box-shadow: 0 20px 50px -10px rgba(15, 23, 42, 0.09);
}

.login-screen__form-side {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: clamp(1.25rem, 2.5vh, 1.75rem) clamp(1.25rem, 2.5vw, 2rem);
    background: #ffffff;
}

.login-screen__form-side--full {
    min-height: auto;
}

.login-screen__form-shell {
    width: 100%;
    max-width: 340px;
    margin: 0 auto;
}

.login-screen__brand {
    margin-bottom: 0.6rem;
}

.login-screen__brand-logo {
    max-width: 135px;
    max-height: 34px;
    object-fit: contain;
}

.login-screen__intro {
    margin-bottom: 0.85rem;
}

.login-screen__eyebrow {
    display: inline-flex;
    align-items: center;
    margin-bottom: 0.25rem;
    font-size: 0.65rem;
    font-weight: 750;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--brand-orange);
}

.login-screen__intro h1 {
    font-size: clamp(1.35rem, 1.6vw, 1.55rem);
    font-weight: 750;
    line-height: 1.2;
    letter-spacing: -0.025em;
    color: #0f172a;
    margin-bottom: 0.25rem;
}

.login-screen__intro p {
    font-size: 0.8rem;
    line-height: 1.4;
    color: #64748b;
    margin-bottom: 0;
}

.login-form .mb-3 {
    margin-bottom: 0.65rem !important;
}

.login-form .form-label {
    margin-bottom: 0.25rem;
    font-size: 0.76rem;
    font-weight: 650;
    color: #334155;
}

.login-form .form-control {
    min-height: 38px;
    border-radius: 6px;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    padding-inline: 0.75rem;
    font-size: 0.86rem;
    color: #0f172a;
    transition: all 0.18s ease;
}

.login-form .form-control:-webkit-autofill,
.login-form .form-control:-webkit-autofill:hover, 
.login-form .form-control:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0px 1000px #ffffff inset !important;
    -webkit-text-fill-color: #0f172a !important;
}

.login-form .form-control:focus {
    border-color: var(--brand-orange);
    box-shadow: 0 0 0 3px rgba(217, 95, 40, 0.14);
    outline: none;
    background: #ffffff;
}

.login-form__link {
    font-size: 0.76rem;
    font-weight: 650;
    color: var(--brand-orange);
    text-decoration: none;
}

.login-form__link:hover {
    color: #b84c1b;
    text-decoration: underline;
}

.form-check-input {
    width: 0.95rem;
    height: 0.95rem;
    margin-top: 0.1rem;
    border-color: #cbd5e1;
    border-radius: 4px;
}

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

.form-check-input:focus {
    border-color: var(--brand-orange);
    box-shadow: 0 0 0 3px rgba(217, 95, 40, 0.14);
}

.login-form__submit {
    min-height: 40px;
    margin-top: 0.4rem;
    border-radius: 6px;
    background: linear-gradient(180deg, #e6561b 0%, #d95f28 100%);
    border: none;
    color: #ffffff;
    font-weight: 700;
    font-size: 0.88rem;
    box-shadow: 0 4px 14px rgba(217, 95, 40, 0.22);
    transition: all 0.18s ease;
}

.login-form__submit:hover {
    background: linear-gradient(180deg, #d34b12 0%, #c4501b 100%);
    box-shadow: 0 6px 18px rgba(217, 95, 40, 0.32);
    transform: translateY(-1px);
    color: #ffffff;
}

.login-form__submit:active {
    transform: translateY(0);
}

.login-form__submit:focus-visible {
    outline: 2px solid var(--brand-orange);
    outline-offset: 2px;
}

.login-screen__footer-links {
    margin-top: 0.85rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    font-size: 0.72rem;
    color: #64748b;
}

.security-indicator {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-weight: 650;
    font-size: 0.7rem;
    color: #059669;
    background: rgba(16, 185, 129, 0.08);
    padding: 0.15rem 0.45rem;
    border-radius: 4px;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.login-screen__footer-links a {
    color: #64748b;
    text-decoration: none;
    font-weight: 500;
}

.login-screen__footer-links a:hover {
    color: var(--brand-orange);
    text-decoration: underline;
}

.login-screen__visual-side {
    position: relative;
    height: 100%;
    padding: 0.75rem;
    background: #f1f5f9;
}

.login-screen__visual-image {
    position: relative;
    height: 100%;
    min-height: 400px;
    border-radius: 10px;
    background:
        linear-gradient(180deg, rgba(15, 23, 42, 0.15), rgba(15, 23, 42, 0.65)),
        url('/assets/img/loginbg.jpg') center/cover no-repeat;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 1.5rem;
}

.login-screen__visual-image::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.12), transparent 30%),
        linear-gradient(180deg, transparent 35%, rgba(15, 23, 42, 0.85) 100%);
    pointer-events: none;
}

.login-screen__visual-badge {
    align-self: flex-start;
    display: inline-flex;
    align-items: center;
    padding: 0.4rem 0.8rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #ffffff;
    font-size: 0.72rem;
    font-weight: 750;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.login-screen__visual-copy {
    max-width: 92%;
    color: #ffffff;
    z-index: 1;
}

.login-screen__visual-kicker {
    margin-bottom: 0.35rem;
    font-size: 0.68rem;
    font-weight: 750;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.85);
}

.login-screen__visual-copy h2 {
    margin: 0;
    font-size: clamp(1.35rem, 1.8vw, 1.65rem);
    line-height: 1.25;
    font-weight: 750;
    letter-spacing: -0.01em;
    text-shadow: 0 2px 10px rgba(15, 23, 42, 0.4);
}

@media (max-width: 991.98px) {
    .login-screen {
        width: min(440px, 100%);
    }

    .login-screen__panel {
        height: auto;
        min-height: auto;
        grid-template-columns: 1fr;
        border-radius: 12px;
    }

    .login-screen__visual-side {
        display: none;
    }

    .login-screen__form-side {
        padding: 2.25rem 1.75rem;
    }

    .login-screen__form-shell {
        max-width: 100%;
    }
}

@media (max-height: 680px) and (min-width: 992px) {
    .login-screen__panel {
        height: auto;
        min-height: auto;
    }

    .login-screen__form-side {
        gap: 0.6rem;
        padding-block: 1.25rem;
    }

    .login-screen__brand-logo {
        max-height: 34px;
    }

    .login-screen__intro h1 {
        font-size: 1.5rem;
    }

    .login-screen__footer-links {
        display: none;
    }

    .login-screen__visual-copy h2 {
        font-size: 1.72rem;
    }
}

/* Compact inner-page typography */
.content-wrapper {
    font-size: 0.9rem;
}

.content-wrapper .content-card,
.content-wrapper .card,
.content-wrapper .alert,
.content-wrapper .table,
.content-wrapper .form-control,
.content-wrapper .form-select,
.content-wrapper .btn,
.content-wrapper .dropdown-item,
.content-wrapper .pagination {
    font-size: 0.88rem;
}

.content-wrapper .content-card h1,
.content-wrapper .content-card .h1,
.content-wrapper .settings-page-title {
    font-size: clamp(1.08rem, 1.2vw, 1.28rem);
}

.content-wrapper .content-card h2,
.content-wrapper .content-card .h2,
.content-wrapper .content-card h2.h4,
.content-wrapper .content-card .h4 {
    font-size: 1rem;
}

.content-wrapper .content-card h3,
.content-wrapper .content-card .h3,
.content-wrapper .content-card h2.h5,
.content-wrapper .content-card .h5,
.content-wrapper .content-card h2.h6,
.content-wrapper .content-card .h6,
.content-wrapper .form-section-title,
.content-wrapper .settings-group__title,
.content-wrapper .settings-card__title {
    font-size: 0.92rem;
}

.content-wrapper .text-muted,
.content-wrapper .small,
.content-wrapper small,
.content-wrapper .report-subtle,
.content-wrapper .settings-card__description,
.content-wrapper .investor-detail-item__label,
.content-wrapper .topbar-dropdown__item-meta {
    font-size: 0.78rem;
}

.content-wrapper .stat-label,
.content-wrapper .stat-money__currency {
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--ink-500);
}

.content-wrapper .table thead th {
    font-size: 0.74rem;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: var(--ink-700);
    border-bottom: 2px solid rgba(20, 20, 20, 0.05);
    background-color: #fafbfc;
}

.content-wrapper .stat-value,
.content-wrapper .stat-money__amount {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--ink-900);
    letter-spacing: -0.02em;
}

.content-wrapper .table > :not(caption) > * > * {
    padding: 0.65rem 0.8rem;
}

.content-wrapper .table tbody td {
    font-size: 0.84rem;
    color: var(--ink-900);
    border-bottom: 1px solid rgba(20, 20, 20, 0.04);
}

.content-wrapper .table tbody tr {
    transition: background-color 0.15s ease;
}

.content-wrapper .table tbody tr:hover {
    background-color: rgba(217, 95, 40, 0.015);
}

.content-wrapper .form-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--ink-700);
    margin-bottom: 0.35rem;
}

.content-wrapper .form-control,
.content-wrapper .form-select {
    min-height: 38px;
    padding-inline: 0.75rem;
    border: 1px solid rgba(20, 20, 20, 0.12);
    border-radius: 5px;
    transition: all 0.15s ease;
}

.content-wrapper .form-control:focus,
.content-wrapper .form-select:focus {
    border-color: var(--brand-orange);
    box-shadow: 0 0 0 3px rgba(217, 95, 40, 0.12);
}

.content-wrapper textarea.form-control {
    min-height: 104px;
}

.content-wrapper .btn {
    padding: 0.45rem 0.9rem;
    font-weight: 700;
    border-radius: 5px;
}

.content-wrapper .btn-sm {
    font-size: 0.78rem;
    padding: 0.35rem 0.65rem;
    font-weight: 700;
    border-radius: 5px;
}

.content-wrapper .badge {
    font-size: 0.74rem;
    padding: 0.3rem 0.5rem;
    font-weight: 700;
    border-radius: 5px;
    letter-spacing: 0.02em;
}

.content-wrapper .content-card.p-4,
.content-wrapper .content-card.p-lg-4 {
    padding: 1rem !important;
}

.content-wrapper .content-card.p-5 {
    padding: 1.25rem !important;
}

.engineering-gantt {
    display: grid;
    gap: 0.75rem;
}

.engineering-gantt__row {
    display: grid;
    grid-template-columns: minmax(180px, 0.9fr) minmax(260px, 1.7fr) minmax(96px, auto);
    gap: 0.75rem;
    align-items: center;
}

.engineering-gantt__label {
    display: grid;
    gap: 0.2rem;
    min-width: 0;
}

.engineering-gantt__label strong {
    overflow-wrap: anywhere;
}

.engineering-gantt__label span {
    color: var(--text-muted);
    font-size: 0.78rem;
}

.engineering-gantt__track {
    position: relative;
    min-height: 34px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: repeating-linear-gradient(90deg, rgba(15, 23, 42, 0.05) 0 1px, transparent 1px 12.5%);
}

.engineering-gantt__bar {
    position: absolute;
    top: 6px;
    bottom: 6px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    min-width: 44px;
    border-radius: 6px;
    padding-inline: 0.5rem;
    background: #2563eb;
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
}

.engineering-gantt__bar.is-planned {
    background: #64748b;
}

.engineering-gantt__bar.is-in_progress {
    background: #2563eb;
}

.engineering-gantt__bar.is-delayed {
    background: #b45309;
}

.engineering-gantt__bar.is-completed {
    background: #047857;
}

.engineering-gantt__status {
    text-align: right;
}

@media (max-width: 900px) {
    .engineering-gantt__row {
        grid-template-columns: 1fr;
        gap: 0.45rem;
    }

    .engineering-gantt__status {
        text-align: left;
    }
}

/* Whole-app mobile hardening for operational modules. */
img,
svg,
video,
canvas {
    max-width: 100%;
}

.content-wrapper,
.content-card,
.stat-card,
.dashboard-tile,
.report-workspace,
.settings-card,
.offcanvas-body,
.modal-body {
    min-width: 0;
}

.content-wrapper .row,
.content-wrapper [class*="col-"],
.offcanvas-body .row,
.offcanvas-body [class*="col-"] {
    min-width: 0;
}

.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.table-responsive > .table {
    min-width: 720px;
}

.table-responsive > .table th,
.table-responsive > .table td {
    white-space: nowrap;
}

.table-responsive > .table td .small,
.table-responsive > .table td .text-muted {
    white-space: normal;
}

.table-action-icons {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.45rem;
    white-space: nowrap;
}

.table-action-cell {
    white-space: nowrap !important;
}

.table-action-cell,
.table-action-cell > .d-flex {
    align-items: center;
    justify-content: flex-end;
    gap: 0.45rem;
}

.table-action-cell > form,
.table-action-cell > a,
.table-action-cell > button,
.table-action-cell > .d-flex,
.table-action-cell > .table-action-icons {
    display: inline-flex;
    vertical-align: middle;
    margin-left: 0.35rem;
}

.table-action-cell > form:first-child,
.table-action-cell > a:first-child,
.table-action-cell > button:first-child,
.table-action-cell > .d-flex:first-child,
.table-action-cell > .table-action-icons:first-child {
    margin-left: 0;
}

.table-action-cell .btn,
.table-action-cell .form-control,
.table-action-cell .form-select {
    white-space: nowrap;
}

.table-icon-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    border: 1px solid rgba(20, 20, 20, 0.12);
    border-radius: 10px;
    background: #fff;
    color: #2f2f2f;
    padding: 0;
    line-height: 1;
}

.table-icon-button:hover,
.table-icon-button:focus {
    border-color: rgba(221, 86, 35, 0.45);
    color: #dd5623;
    background: #fff8f5;
}

.table-icon-button svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

.multi-select-picker__native {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
    padding: 0 !important;
    margin: -1px !important;
}

.multi-select-picker {
    position: relative;
    width: 100%;
}

.multi-select-picker__button {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    min-height: 56px;
    gap: 0.75rem;
    border: 1px solid rgba(20, 20, 20, 0.12);
    border-radius: 10px;
    background: #fff;
    color: #202020;
    padding: 0.55rem 0.8rem;
    text-align: left;
}

.multi-select-picker__button:focus,
.multi-select-picker.is-open .multi-select-picker__button {
    border-color: rgba(221, 86, 35, 0.55);
    box-shadow: 0 0 0 0.22rem rgba(221, 86, 35, 0.12);
    outline: none;
}

.multi-select-picker__value {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
    min-width: 0;
}

.multi-select-picker__placeholder {
    color: var(--text-muted);
}

.multi-select-picker__chip,
.multi-select-picker__more {
    display: inline-flex;
    align-items: center;
    max-width: 180px;
    min-height: 28px;
    border-radius: 999px;
    background: #fff1eb;
    color: #b9471e;
    padding: 0.25rem 0.6rem;
    font-size: 0.82rem;
    font-weight: 700;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.multi-select-picker__more {
    background: #f3f4f6;
    color: #4b5563;
}

.multi-select-picker__chevron {
    display: inline-flex;
    width: 22px;
    height: 22px;
    flex: 0 0 22px;
    color: #303030;
}

.multi-select-picker__chevron svg {
    width: 100%;
    height: 100%;
    fill: currentColor;
}

.multi-select-picker__panel {
    position: absolute;
    z-index: 1055;
    top: calc(100% + 0.35rem);
    left: 0;
    right: 0;
    display: none;
    border: 1px solid rgba(20, 20, 20, 0.12);
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.16);
    padding: 0.7rem;
}

.multi-select-picker.is-open .multi-select-picker__panel {
    display: block;
}

.multi-select-picker__search {
    width: 100%;
    min-height: 40px;
    border: 1px solid rgba(20, 20, 20, 0.1);
    border-radius: 8px;
    padding: 0.45rem 0.7rem;
    margin-bottom: 0.55rem;
}

.multi-select-picker__actions {
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.45rem;
}

.multi-select-picker__actions button {
    border: 0;
    background: transparent;
    color: #dd5623;
    font-size: 0.8rem;
    font-weight: 800;
    padding: 0.25rem 0;
}

.multi-select-picker__options {
    display: grid;
    gap: 0.15rem;
    max-height: 240px;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
}

.multi-select-picker__option {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    min-height: 38px;
    border-radius: 8px;
    padding: 0.4rem 0.45rem;
    cursor: pointer;
}

.multi-select-picker__option:hover {
    background: #f8fafc;
}

.multi-select-picker__option input {
    width: 16px;
    height: 16px;
    accent-color: #dd5623;
}

.multi-select-picker__option span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.content-wrapper .btn,
.offcanvas-body .btn,
.modal-body .btn {
    white-space: normal;
}

.content-wrapper .d-flex,
.offcanvas-body .d-flex,
.modal-body .d-flex {
    min-width: 0;
}

.content-wrapper .text-end,
.offcanvas-body .text-end {
    min-width: 0;
}

.content-wrapper input,
.content-wrapper select,
.content-wrapper textarea,
.offcanvas-body input,
.offcanvas-body select,
.offcanvas-body textarea {
    max-width: 100%;
}

@media (max-width: 767.98px) {
    .content-wrapper {
        padding: 0.85rem;
    }

    .content-card,
    .stat-card,
    .dashboard-tile,
    .settings-card {
        border-radius: 0.65rem;
    }

    .content-card.p-4,
    .content-card.p-5,
    .stat-card.p-3,
    .dashboard-tile {
        padding: 0.9rem !important;
    }

    .content-wrapper .d-flex.justify-content-between,
    .content-wrapper .d-flex.align-items-center,
    .offcanvas-body .d-flex.justify-content-between,
    .offcanvas-body .d-flex.align-items-center {
        flex-wrap: wrap;
        gap: 0.65rem;
    }

    .content-wrapper .text-end,
    .offcanvas-body .text-end {
        text-align: left !important;
    }

    .content-wrapper .btn,
    .offcanvas-body .btn,
    .modal-body .btn {
        min-height: 40px;
    }

    .content-wrapper form .btn,
    .offcanvas-body form .btn {
        width: 100%;
    }

    .content-wrapper form.d-inline .btn,
    .content-wrapper .table .btn,
    .offcanvas-body .table .btn,
    .content-wrapper .table-icon-button,
    .offcanvas-body .table-icon-button,
    .content-wrapper .table-action-cell form .btn,
    .offcanvas-body .table-action-cell form .btn {
        width: auto;
    }

    .content-wrapper .form-control,
    .content-wrapper .form-select,
    .offcanvas-body .form-control,
    .offcanvas-body .form-select {
        font-size: 16px;
    }

    .offcanvas.form-drawer,
    .form-drawer {
        --bs-offcanvas-width: 100vw;
        width: 100vw !important;
        max-width: 100vw;
    }

    .offcanvas.form-drawer > .offcanvas-body {
        padding: 1rem;
    }

    .multi-select-picker__panel {
        position: fixed;
        top: auto;
        left: 0.75rem;
        right: 0.75rem;
        bottom: 0.75rem;
        max-height: min(70vh, 520px);
        overflow: auto;
    }

    .topbar {
        gap: 0.7rem;
    }

    .topbar-actions {
        width: 100%;
        justify-content: flex-start;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .topbar-profile-button__copy {
        display: none;
    }
}

@media (max-width: 575.98px) {
    .table-responsive > .table {
        min-width: 640px;
    }

    .page-title {
        overflow-wrap: anywhere;
    }

    .content-wrapper .pagination {
        flex-wrap: wrap;
    }
}

/* ==========================================================================
   Phase 4: Enterprise Design System Component Standardization
   ========================================================================== */

/* Universal Status Badge Palette */
.badge-success, .badge-approved, .badge-active, .badge-completed, .badge-paid {
    background-color: var(--status-success-bg) !important;
    color: var(--status-success-text) !important;
    font-weight: 600;
    font-size: 0.72rem;
    padding: 0.35em 0.7em;
    border-radius: 999px;
    letter-spacing: 0.02em;
}

.badge-warning, .badge-pending, .badge-in-progress, .badge-open, .badge-partial {
    background-color: var(--status-warning-bg) !important;
    color: var(--status-warning-text) !important;
    font-weight: 600;
    font-size: 0.72rem;
    padding: 0.35em 0.7em;
    border-radius: 999px;
    letter-spacing: 0.02em;
}

.badge-danger, .badge-rejected, .badge-inactive, .badge-overdue, .badge-cancelled, .badge-unpaid {
    background-color: var(--status-danger-bg) !important;
    color: var(--status-danger-text) !important;
    font-weight: 600;
    font-size: 0.72rem;
    padding: 0.35em 0.7em;
    border-radius: 999px;
    letter-spacing: 0.02em;
}

.badge-info, .badge-draft, .badge-new, .badge-review, .badge-submitted {
    background-color: var(--status-info-bg) !important;
    color: var(--status-info-text) !important;
    font-weight: 600;
    font-size: 0.72rem;
    padding: 0.35em 0.7em;
    border-radius: 999px;
    letter-spacing: 0.02em;
}

.badge-secondary, .badge-neutral, .badge-archived {
    background-color: var(--status-secondary-bg) !important;
    color: var(--status-secondary-text) !important;
    font-weight: 600;
    font-size: 0.72rem;
    padding: 0.35em 0.7em;
    border-radius: 999px;
    letter-spacing: 0.02em;
}

/* Reusable Empty State Card Component */
.empty-state-card {
    padding: 3.5rem 1.5rem;
    text-align: center;
    background: #ffffff;
    border: 1px dashed #cbd5e1;
    border-radius: var(--radius-lg);
    margin: 1.5rem 0;
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.02);
}

.empty-state-card__icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 1.25rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--brand-orange-soft);
    color: var(--brand-orange);
    font-size: 1.75rem;
}

.empty-state-card__title {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.15rem;
    color: var(--ink-900);
    margin-bottom: 0.5rem;
}

.empty-state-card__description {
    font-family: var(--font-body);
    font-size: 0.88rem;
    color: var(--ink-500);
    max-width: 480px;
    margin: 0 auto 1.25rem;
    line-height: 1.45;
}

/* Card Component Refinement */
.card, .content-card, .stat-card {
    border-radius: var(--radius-lg);
    border: 1px solid rgba(226, 232, 240, 0.8);
    box-shadow: var(--shadow-soft);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.card:hover, .content-card:hover {
    box-shadow: var(--shadow-card);
}

.card-header {
    background: #ffffff;
    border-bottom: 1px solid var(--line-soft);
    padding: 1rem 1.25rem;
    font-family: var(--font-heading);
    font-weight: 700;
}

/* Standardized Form Labels & Field Control Focus */
.form-label {
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.82rem;
    color: var(--ink-700);
    margin-bottom: 0.35rem;
}

.form-control, .form-select {
    font-family: var(--font-body);
    font-size: 0.88rem;
    border-radius: var(--radius-md);
    border: 1px solid #cbd5e1;
}

.form-control:focus, .form-select:focus {
    border-color: var(--brand-orange);
    box-shadow: 0 0 0 3px rgba(217, 95, 40, 0.15);
}

/* Enterprise Data Tables */
.table {
    font-family: var(--font-body);
    font-size: 0.85rem;
}

.table th {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.74rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--ink-500);
    background-color: #f8fafc;
    border-bottom: 1.5px solid var(--line-strong);
}

.table tbody tr:hover {
    background-color: #f1f5f9;
}

/* Enterprise Input Engine Predefined Drawer Sizes by Intent */
.offcanvas.form-drawer {
    width: 650px;
    max-width: 95vw;
}

.offcanvas.form-drawer-sm {
    width: 500px !important;
    max-width: 95vw;
}

.offcanvas.form-drawer-md {
    width: 650px !important;
    max-width: 95vw;
}

.offcanvas.form-drawer-lg {
    width: 800px !important;
    max-width: 95vw;
}

.offcanvas.form-drawer-xl {
    width: 1000px !important;
    max-width: 98vw;
}

/* Enterprise Drawer Tabs & Single Horizontal Stepper Row */
.enterprise-drawer-tabs,
.workflow-stepper-tabs {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
    scrollbar-width: none;
    -ms-overflow-style: none;
    border-bottom: 1px solid var(--line-soft, #e2e8f0) !important;
    background: #ffffff !important;
    padding: 0.5rem 1rem 0 1rem !important;
}

.enterprise-drawer-tabs::-webkit-scrollbar,
.workflow-stepper-tabs::-webkit-scrollbar {
    display: none;
}

.enterprise-drawer-tabs .nav-item,
.workflow-stepper-tabs .nav-item {
    flex: 0 0 auto !important;
    flex-shrink: 0 !important;
    white-space: nowrap !important;
}

.enterprise-drawer-tabs .nav-link,
.workflow-stepper-tabs .nav-link {
    display: inline-flex !important;
    align-items: center !important;
    gap: 0.45rem !important;
    padding: 0.6rem 0.85rem !important;
    white-space: nowrap !important;
    border: none !important;
    border-bottom: 2px solid transparent !important;
    color: var(--ink-700, #334155) !important;
    font-size: 0.82rem !important;
    font-weight: 600 !important;
    transition: all 0.2s ease !important;
}

.enterprise-drawer-tabs .nav-link.active,
.workflow-stepper-tabs .nav-link.active {
    border-bottom-color: var(--brand-orange, #d95f28) !important;
    color: var(--brand-orange, #d95f28) !important;
    font-weight: 700 !important;
    background: transparent !important;
}

.enterprise-drawer-tabs .nav-link:focus-visible,
.workflow-stepper-tabs .nav-link:focus-visible {
    outline: 2px solid var(--brand-orange, #d95f28);
    outline-offset: -2px;
}

/* Offcanvas Input Controls Grid & Uniform 38px Height Alignment */
.offcanvas .form-control,
.offcanvas .form-select,
.offcanvas .input-group-sm > .form-control,
.offcanvas .input-group-sm > .input-group-text {
    height: 38px !important;
    min-height: 38px !important;
    font-size: 0.85rem !important;
    line-height: 1.5 !important;
    padding: 0.45rem 0.75rem !important;
    border-radius: var(--radius-md, 6px) !important;
}

.offcanvas textarea.form-control {
    height: auto !important;
    min-height: 76px !important;
}

.offcanvas .form-label {
    display: block !important;
    font-weight: 600 !important;
    font-size: 0.82rem !important;
    color: var(--ink-700, #334155) !important;
    margin-bottom: 0.35rem !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

/* ==========================================================================
   UNIVERSAL ENTERPRISE OFFCANVAS DRAWER & FORM FOOTER LAYOUT ENGINE
   ========================================================================== */

.offcanvas,
.offcanvas.form-drawer {
    display: flex !important;
    flex-direction: column !important;
    height: 100vh !important;
    max-height: 100vh !important;
    overflow: hidden !important;
}

.offcanvas-header,
.enterprise-drawer-tabs,
.workflow-stepper-tabs,
.enterprise-diagnostics-bar {
    flex-shrink: 0 !important;
}

.offcanvas > form,
.offcanvas form.d-flex.flex-column,
.offcanvas-header + form,
.offcanvas-header + .enterprise-drawer-tabs + form,
.offcanvas-header + .workflow-stepper-tabs + form,
.offcanvas-header + .enterprise-diagnostics-bar + form,
.offcanvas-header + .enterprise-diagnostics-bar + .enterprise-drawer-tabs + form {
    display: flex !important;
    flex-direction: column !important;
    flex: 1 1 auto !important;
    min-height: 0 !important;
    height: auto !important;
    max-height: 100% !important;
    overflow: hidden !important;
}

.offcanvas-body,
.offcanvas form > .offcanvas-body,
.offcanvas form > .tab-content,
.tab-content.enterprise-drawer-content {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 1.5rem !important;
}

.offcanvas .tab-content > .tab-pane {
    min-height: 100%;
}

.offcanvas-footer,
.offcanvas form > .offcanvas-footer {
    flex-shrink: 0 !important;
    margin-top: auto !important;
    position: sticky !important;
    bottom: 0 !important;
    z-index: 1050 !important;
    background-color: #ffffff !important;
    border-top: 1px solid var(--line-soft, #e2e8f0) !important;
    box-shadow: 0 -4px 12px rgba(15, 23, 42, 0.08) !important;
    padding: 0.85rem 1.25rem !important;
}


