:root {
    --brand-900: #0f2238;
    --brand-800: #163457;
    --brand-700: #1f4c7e;
    --brand-100: #e8f0fa;
    --accent: #1fb58f;
    --accent-soft: #e5f7f2;
    --surface: #ffffff;
    --surface-muted: #f4f8fc;
    --text-900: #122033;
    --text-600: #4c627f;
    --border-soft: #d8e3f1;
    --sidebar-expanded: 284px;
    --sidebar-collapsed: 86px;
}

* {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body.app-shell {
    min-height: 100vh;
    margin: 0;
    font-family: "Plus Jakarta Sans", "Segoe UI", sans-serif;
    color: var(--text-900);
    background:
        radial-gradient(circle at 0 0, #f5f9ff 0, #f5f9ff 30%, transparent 35%),
        radial-gradient(circle at 100% 0, #edf6ff 0, #edf6ff 26%, transparent 35%),
        #f2f6fb;
    line-height: 1.45;
}

h1, .h1 {
    font-size: clamp(1.38rem, 1.1rem + 0.8vw, 1.9rem);
    letter-spacing: -0.02em;
    font-weight: 700;
}

h2, .h2 {
    font-size: clamp(1.12rem, 0.98rem + 0.45vw, 1.45rem);
    letter-spacing: -0.01em;
    font-weight: 700;
}

h3, .h3 {
    font-size: clamp(1rem, 0.94rem + 0.3vw, 1.2rem);
    font-weight: 700;
}

h4, .h4, h5, .h5, h6, .h6 {
    letter-spacing: -0.01em;
    font-weight: 650;
}

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

.app-sidebar {
    width: var(--sidebar-expanded);
    min-width: var(--sidebar-expanded);
    max-width: var(--sidebar-expanded);
    flex: 0 0 var(--sidebar-expanded);
    background: linear-gradient(180deg, var(--brand-900) 0%, var(--brand-800) 100%);
    color: #d8e8fb;
    flex-direction: column;
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 14px 30px rgba(9, 24, 42, 0.3);
    transition: width 0.18s ease, min-width 0.18s ease, max-width 0.18s ease, flex-basis 0.18s ease;
    overflow-x: hidden;
}

.sidebar-brand {
    padding: 1rem 1.05rem 0.7rem;
    border-bottom: 1px solid rgba(216, 232, 251, 0.12);
}

.sidebar-brand-link {
    text-decoration: none;
    color: #f7fbff;
    font-size: 1.1rem;
    font-weight: 700;
    display: inline-flex;
    gap: 0.55rem;
    align-items: center;
}

.sidebar-brand-mark {
    width: 1.7rem;
    height: 1.7rem;
    border-radius: 0.55rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1fb58f 0%, #2bc9a1 100%);
    color: #073a2d;
    font-weight: 800;
    text-transform: uppercase;
}

.sidebar-brand-name {
    white-space: nowrap;
}

.sidebar-brand-subtitle {
    color: rgba(216, 232, 251, 0.7);
    font-size: 0.72rem;
    margin-top: 0.4rem;
    letter-spacing: 0.03em;
}

.sidebar-company {
    margin: 1rem 0.95rem 0.5rem;
    padding: 0.75rem 0.85rem;
    border-radius: 0.9rem;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.09);
}

.sidebar-company-name {
    color: #f4f8fe;
    font-size: 0.84rem;
    font-weight: 600;
    margin-bottom: 0.2rem;
}

.sidebar-company-meta {
    color: rgba(216, 232, 251, 0.76);
    font-size: 0.76rem;
    display: inline-flex;
    gap: 0.35rem;
    align-items: center;
}

.sidebar-nav {
    flex: 1 1 auto;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-gutter: stable;
    padding: 0 0.75rem 0.95rem;
}

.sidebar-group {
    margin-top: 0.75rem;
}

.sidebar-group-title {
    font-size: 0.69rem;
    text-transform: uppercase;
    letter-spacing: 0.09em;
    color: rgba(216, 232, 251, 0.62);
    font-weight: 700;
    padding: 0 0.55rem 0.45rem;
}

.app-nav-link {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    text-decoration: none;
    color: rgba(235, 245, 255, 0.86);
    font-size: 0.88rem;
    font-weight: 500;
    padding: 0.58rem 0.62rem;
    border-radius: 0.7rem;
    margin-bottom: 0.2rem;
    transition: all 0.16s ease;
}

.app-nav-link i {
    width: 1rem;
    text-align: center;
    opacity: 0.9;
}

.app-nav-link:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.12);
}

.app-nav-link.active {
    color: #fff;
    background: linear-gradient(90deg, rgba(31, 181, 143, 0.3), rgba(31, 181, 143, 0.14));
    border: 1px solid rgba(45, 203, 165, 0.5);
    box-shadow: 0 8px 16px rgba(9, 24, 42, 0.22);
}

.app-main {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

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

.app-content {
    padding: 1rem 1.3rem 1.8rem;
    max-width: 1660px;
}

.app-content > * + * {
    margin-top: 0.88rem;
}

.company-chip,
.user-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    border: 1px solid var(--border-soft);
    background: var(--surface);
    color: var(--text-900);
    border-radius: 999px;
    padding: 0.35rem 0.65rem;
    font-size: 0.79rem;
    font-weight: 600;
}

.company-chip.muted {
    color: var(--text-600);
}

.app-sidebar-toggle {
    border-radius: 0.55rem;
    padding: 0.28rem 0.55rem;
}

.app-mobile-header {
    position: sticky;
    top: 0;
    z-index: 30;
    height: 60px;
    background: linear-gradient(105deg, var(--brand-900) 0%, var(--brand-700) 100%);
    padding: 0 0.82rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 8px 24px rgba(15, 34, 56, 0.35);
}

.app-mobile-brand {
    text-decoration: none;
    color: #fff;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.app-icon-btn {
    border: 1px solid rgba(255, 255, 255, 0.25);
    background: rgba(255, 255, 255, 0.14);
    color: #f5f9ff;
    border-radius: 0.62rem;
    width: 2.15rem;
    height: 2.15rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.app-icon-btn:hover {
    background: rgba(255, 255, 255, 0.22);
    color: #fff;
}

.app-sidebar-offcanvas {
    background: linear-gradient(180deg, var(--brand-900) 0%, var(--brand-800) 100%);
    color: #d8e8fb;
    width: 284px;
}

.app-sidebar-offcanvas .offcanvas-header {
    border-color: rgba(216, 232, 251, 0.18) !important;
}

.app-sidebar-offcanvas .offcanvas-title {
    color: #fff;
}

.app-sidebar-offcanvas .btn-close {
    filter: invert(1) brightness(1.6);
}

.app-notification-menu {
    width: min(380px, calc(100vw - 1rem));
    border: 1px solid var(--border-soft);
    box-shadow: 0 12px 28px rgba(17, 32, 51, 0.18);
    border-radius: 0.8rem;
    overflow: hidden;
}

.app-public-nav {
    background: rgba(255, 255, 255, 0.9);
    border-bottom: 1px solid var(--border-soft);
    backdrop-filter: blur(4px);
}

.card-soft {
    border: 1px solid var(--border-soft);
    border-radius: 0.95rem;
    box-shadow: 0 10px 26px rgba(22, 52, 87, 0.08);
    background: var(--surface);
}

.card-soft .card-body {
    padding: 1.05rem 1.1rem;
}

.table td,
.table th {
    vertical-align: middle;
}

.table thead th {
    font-size: 0.76rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #4c5f7a;
    font-weight: 700;
}

.hero-banner {
    background: linear-gradient(125deg, var(--brand-700) 0%, var(--brand-900) 100%);
    color: #fff;
    border-radius: 1rem;
    padding: 1.5rem;
}

.alert {
    border-radius: 0.8rem;
    border-width: 1px;
}

.btn {
    border-radius: 0.62rem;
}

body.sidebar-collapsed .app-sidebar {
    width: var(--sidebar-collapsed);
    min-width: var(--sidebar-collapsed);
    max-width: var(--sidebar-collapsed);
    flex: 0 0 var(--sidebar-collapsed);
}

body.sidebar-collapsed .sidebar-brand-name,
body.sidebar-collapsed .sidebar-brand-subtitle,
body.sidebar-collapsed .sidebar-company,
body.sidebar-collapsed .sidebar-group-title,
body.sidebar-collapsed .app-nav-link span {
    display: none;
}

body.sidebar-collapsed .sidebar-brand {
    padding: 1rem 0.7rem 0.65rem;
    display: flex;
    justify-content: center;
}

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

body.sidebar-collapsed .sidebar-group {
    margin-top: 0.45rem;
}

body.sidebar-collapsed .app-nav-link {
    justify-content: center;
    padding: 0.62rem 0;
    border-radius: 0.72rem;
}

body.sidebar-collapsed .app-nav-link i {
    margin: 0;
    font-size: 1.02rem;
}

@media (min-width: 992px) {
    .app-layout {
        display: flex;
    }
}

@media (max-width: 991.98px) {
.app-content {
        padding: 0.86rem 0.82rem 1.3rem;
    }

    .card-soft {
        border-radius: 0.82rem;
    }

    .card-soft .card-body {
        padding: 0.9rem 0.88rem;
    }
}

.home-hero {
    position: relative;
    overflow: hidden;
    padding: 1.35rem 1.35rem;
    background:
        linear-gradient(142deg, #f8fcff 0%, #eef5ff 58%, #f1fcf8 100%);
}

.home-hero-pattern {
    position: absolute;
    inset: -20% auto auto -8%;
    width: 320px;
    height: 320px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(31, 181, 143, 0.18) 0%, rgba(31, 181, 143, 0) 72%);
}

.home-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #125f4a;
    background: #e6f8f2;
    border: 1px solid #c6efe3;
    border-radius: 999px;
    padding: 0.34rem 0.7rem;
}

.home-title {
    max-width: 20ch;
    font-size: clamp(1.5rem, 1.25rem + 1.2vw, 2.35rem);
    line-height: 1.13;
    letter-spacing: -0.02em;
    margin: 0;
}

.home-subtitle {
    max-width: 62ch;
    color: #475d79;
    font-size: 0.99rem;
}

.home-stat-panel {
    background: #fff;
    border: 1px solid #d9e6f5;
    border-radius: 1rem;
    padding: 0.95rem;
    box-shadow: 0 10px 22px rgba(20, 49, 82, 0.08);
}

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

.home-stat-item {
    border: 1px solid #e2ebf7;
    border-radius: 0.76rem;
    padding: 0.56rem 0.6rem;
    background: #fafdff;
}

.home-stat-value {
    font-size: 0.88rem;
    font-weight: 700;
    color: #12304f;
}

.home-stat-label {
    font-size: 0.74rem;
    color: #607795;
    margin-top: 0.16rem;
    line-height: 1.35;
}

.home-current-company {
    display: inline-flex;
    align-items: center;
    gap: 0.46rem;
    font-size: 0.82rem;
    background: #f4f8fd;
    border: 1px solid #dbe8f7;
    border-radius: 999px;
    padding: 0.36rem 0.65rem;
}

.home-section {
    margin-top: 1rem;
}

.home-section-title {
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.home-section-kicker {
    color: #607795;
    font-size: 0.78rem;
    font-weight: 600;
}

.home-feature-card {
    padding: 0.95rem 0.95rem 0.88rem;
}

.home-feature-icon {
    width: 2.05rem;
    height: 2.05rem;
    border-radius: 0.65rem;
    background: #e8f1ff;
    color: #1f4c7e;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.6rem;
    font-size: 1rem;
}

.home-feature-card h3 {
    font-size: 0.97rem;
    margin: 0 0 0.36rem;
}

.home-feature-card p {
    margin: 0 0 0.66rem;
    color: #556c89;
    font-size: 0.83rem;
    line-height: 1.5;
}

.home-feature-link {
    text-decoration: none;
    font-size: 0.81rem;
    font-weight: 700;
    color: #1f4c7e;
}

.home-feature-link i {
    margin-left: 0.16rem;
}

.home-flow-card,
.home-side-callout {
    padding: 1.03rem 1.05rem;
}

.home-flow-list {
    display: grid;
    gap: 0.62rem;
}

.home-flow-item {
    display: flex;
    gap: 0.7rem;
    align-items: flex-start;
    background: #fbfdff;
    border: 1px solid #e3ecf8;
    border-radius: 0.74rem;
    padding: 0.62rem 0.68rem;
}

.home-flow-step {
    width: 1.65rem;
    height: 1.65rem;
    border-radius: 999px;
    background: #1f4c7e;
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.74rem;
    font-weight: 700;
    flex: 0 0 auto;
}

.home-flow-item h3 {
    font-size: 0.87rem;
    margin: 0 0 0.12rem;
}

.home-flow-item p {
    margin: 0;
    color: #5b728e;
    font-size: 0.8rem;
    line-height: 1.45;
}

.home-bullet-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 0.54rem;
}

.home-bullet-list li {
    display: flex;
    align-items: flex-start;
    gap: 0.44rem;
    font-size: 0.84rem;
    color: #455c79;
}

.home-bullet-list i {
    color: #1fb58f;
    margin-top: 0.08rem;
}

.home-callout-actions {
    margin-top: 0.9rem;
}

@media (max-width: 991.98px) {
    .home-hero {
        padding: 1rem 0.9rem;
    }

    .home-subtitle {
        font-size: 0.93rem;
    }

    .home-stat-panel {
        padding: 0.82rem;
    }

    .home-feature-card,
    .home-flow-card,
    .home-side-callout {
        padding: 0.85rem;
    }
}

@media (max-width: 575.98px) {
    .home-stat-grid {
        grid-template-columns: 1fr;
    }
}
