:root {
    --brand-orange: #ff5500;
    --surface-white: #ffffff;
    --surface-muted: #f5f5f5;
    --ink-900: #141414;
    --ink-700: #4f4f4f;
    --ink-500: #8b8b8b;
    --line-soft: #e7e7e7;
    --line-strong: #d7d7d7;
    --brand-orange-soft: #fff1eb;
    --surface-panel: rgba(255, 255, 255, 0.86);
    --shadow-soft: 0 18px 42px rgba(17, 17, 17, 0.08);
    --shadow-card: 0 18px 48px rgba(15, 23, 42, 0.06);
    --shadow-panel: 0 24px 60px rgba(15, 23, 42, 0.08);
    --radius-lg: 1.4rem;
    --radius-md: 1rem;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Red Hat Display', sans-serif;
    background:
        radial-gradient(circle at top left, rgba(255, 85, 0, 0.05), transparent 24%),
        radial-gradient(circle at top right, rgba(17, 17, 17, 0.03), transparent 20%),
        linear-gradient(180deg, #fbfbfb 0%, #f5f5f5 100%);
    color: var(--ink-900);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

* {
    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,
.sidebar-module__title {
    color: var(--ink-900);
    font-size: 1.7rem;
    font-weight: 900;
    letter-spacing: -0.04em;
    line-height: 1.05;
}

.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-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: 288px;
    min-height: 100vh;
    height: 100vh;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(18px);
    color: var(--ink-900);
    padding: 1.5rem 1.25rem 1.25rem;
    position: fixed;
    top: 0;
    left: 0;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    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 {
    padding-right: 0.5rem;
}

.sidebar-module {
    margin-top: 0.5rem;
    padding: 1rem 1rem 0.95rem;
    background: linear-gradient(180deg, #fafafa 0%, #f5f5f5 100%);
    border: 1px solid rgba(20, 20, 20, 0.06);
    border-radius: 1.15rem;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.sidebar-nav .nav {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: stretch;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
}

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

.brand-link--logo {
    display: block;
}

.brand-logo {
    width: 168px;
    max-width: 100%;
    height: auto;
    display: block;
}

.brand-subtitle {
    font-size: 0.85rem;
    color: var(--ink-700);
    margin-top: 0.55rem;
}

.sidebar-module__title {
    margin-top: 0.32rem;
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -0.05em;
    line-height: 1;
}

.sidebar-nav .nav-link {
    display: block;
    width: 100%;
    flex: 0 0 auto;
    color: var(--ink-700);
    border-radius: 1rem;
    padding: 0.95rem 1rem;
    font-weight: 600;
    white-space: normal;
    position: relative;
    transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

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

.sidebar-nav .nav-link.active {
    font-weight: 700;
}

.sidebar-nav .nav-link.active::before {
    content: "";
    position: absolute;
    left: 0.55rem;
    top: 50%;
    transform: translateY(-50%);
    width: 0.3rem;
    height: 1.5rem;
    border-radius: 999px;
    background: var(--brand-orange);
}

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

.topbar {
    position: sticky;
    top: 0;
    z-index: 1020;
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(16px);
    color: var(--ink-900);
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    border-bottom: 1px solid rgba(20, 20, 20, 0.07);
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.03);
}

.page-title {
    font-size: 1.55rem;
    font-weight: 700;
    letter-spacing: -0.03em;
}

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

.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;
    fill: currentColor;
}

.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: 220px;
    border: 1px solid rgba(20, 20, 20, 0.08);
    border-radius: 1rem;
    padding: 0.5rem;
    box-shadow: var(--shadow-panel);
}

.topbar-profile-menu__name {
    font-weight: 800;
    color: var(--ink-900);
    padding: 0.5rem 0.6rem 0.35rem;
}

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

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

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

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

.topbar-dropdown__list {
    max-height: 360px;
    overflow-y: auto;
    padding: 0.5rem 0.75rem 0.75rem;
}

.topbar-dropdown__empty {
    padding: 1.2rem 0.5rem;
    text-align: center;
    color: var(--ink-500);
    font-size: 0.9rem;
}

.topbar-dropdown__item {
    background: #fff;
    border: 1px solid rgba(20, 20, 20, 0.08);
    border-radius: 0.9rem;
    padding: 0.75rem 0.85rem;
    margin-bottom: 0.6rem;
}

.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.95rem;
}

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

.topbar-dropdown__item-message {
    font-size: 0.85rem;
    color: var(--ink-700);
}

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

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

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

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

.offcanvas.form-drawer {
    --bs-offcanvas-width: min(1600px, calc(100vw - 64px));
    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);
}

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

.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.75rem 2rem !important;
}

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

.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%;
}

.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: 3.15rem;
}

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

.auth-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 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;
}

.login-screen {
    width: min(1180px, 100%);
    margin: 0 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: 2rem;
    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: clamp(1.95rem, 3vw, 2.65rem);
    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: 1.25rem;
    box-shadow: var(--shadow-panel);
}

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

.stat-card::after {
    content: "";
    position: absolute;
    inset: 0 auto auto 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--brand-orange) 0%, rgba(255, 85, 0, 0.18) 100%);
}

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

.stat-value {
    font-size: clamp(1.65rem, 1.85vw, 2.05rem);
    font-weight: 700;
    line-height: 1;
    letter-spacing: -0.04em;
}

.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: clamp(1.68rem, 1.9vw, 2.08rem);
    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: 1.35rem;
    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: 1.7rem;
    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-weight: 600;
    letter-spacing: -0.015em;
}

.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: 1rem;
}

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

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

.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: 1rem;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
}

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

.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;
}

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

.btn-sm {
    border-radius: 0.8rem;
    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;
    padding-top: 1.1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    border-top: 1px solid var(--line-soft);
}

.sidebar-user {
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    line-height: 1.35;
    color: var(--ink-700);
    font-weight: 700;
}

.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: 0.8rem !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: 0.75rem;
    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 {
        padding: 0.9rem 1rem;
        align-items: flex-start;
        flex-wrap: wrap;
    }

    .topbar-actions {
        width: 100%;
        justify-content: flex-end;
        gap: 0.55rem;
    }

    .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));
    }

    .sidebar-nav {
        position: static;
        width: 100%;
        min-height: auto;
        height: auto;
        padding-bottom: 1.5rem;
    }

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

    .app-launcher-toggle {
        position: fixed;
        left: 1rem;
        bottom: 1rem;
        z-index: 1030;
    }

    .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.32rem;
    }

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

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

    .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;
    }
}
