/* Application-only stylesheet. Never imported by the public landing pages.
   The logo, typeface and palette follow TEK's existing visual identity. */
@font-face {
    font-family: Montserrat;
    src: url('/assets/fonts/Montserrat-Variable.ttf') format('truetype');
    font-weight: 100 900;
    font-display: swap
}

.tek-app {
    --navy: #05242a;
    --teal: #013d49;
    --gold: #ae8f5c;
    --paper: #f6f5f1;
    --line: #e3e6df;
    --muted: #71807e;
    --ink: #183b3e;
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: 'Segoe UI', Arial, sans-serif;
    font-size: 14px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased
}

.tek-app * {
    box-sizing: border-box
}

.tek-app [hidden] {
    display: none !important
}

.tek-app a {
    color: inherit;
    text-decoration: none
}

.tek-app button,
.tek-app input,
.tek-app select,
.tek-app textarea {
    font: inherit
}

.tek-app button {
    cursor: pointer
}

.tek-app button:disabled {
    cursor: not-allowed
}

.tek-app button,
.tek-app a,
.tek-app input,
.tek-app select,
.tek-app textarea {
    outline-offset: 4px
}

.tek-app :focus-visible {
    outline: 2px solid var(--gold)
}

.tek-app h1,
.tek-app h2,
.tek-app h3,
.tek-app h4,
.tek-app p {
    margin: 0
}

.tek-app h1,
.tek-app h2,
.tek-app h3 {
    font-family: Montserrat, 'Segoe UI', sans-serif;
    font-weight: 550;
    letter-spacing: -.045em
}

.tek-app h1 {
    font-size: 32px;
    line-height: 1.2
}

.tek-app h2 {
    font-size: 18px;
    line-height: 1.35
}

.tek-app h3 {
    font-size: 17px
}

.tek-app small {
    font-size: 11px
}

.tek-app svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.5;
    stroke-linecap: round;
    stroke-linejoin: round;
    flex-shrink: 0
}

.tek-app .icon-sprite {
    position: absolute;
    width: 0;
    height: 0;
    overflow: hidden
}

.tek-app .skip-link {
    position: fixed;
    top: 12px;
    left: 12px;
    z-index: 100;
    background: white;
    padding: 10px 16px;
    transform: translateY(-180%)
}

.tek-app .skip-link:focus {
    transform: none
}

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

.navigation {
    width: 214px;
    flex-shrink: 0;
    background: var(--navy);
    color: #e5ebe5;
    min-height: 100vh;
    padding: 32px 18px 20px;
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto
}

.brand {
    display: inline-block
}

.brand img {
    object-fit: contain;
    display: block
}

.navigation .brand {
    margin: 0 14px 32px
}

.workspace-label {
    display: flex;
    gap: 10px;
    align-items: center;
    margin: 0 8px 27px;
    padding: 14px 0;
    border-top: 1px solid #ffffff12;
    border-bottom: 1px solid #ffffff12;
    font-size: 12px
}

.workspace-label small {
    display: block;
    font-size: 10px;
    color: #92aca9;
    margin-top: 3px
}

.workspace-dot {
    width: 7px;
    height: 7px;
    background: var(--gold);
    border-radius: 50%;
    flex-shrink: 0
}

.nav-caption {
    display: block;
    font-size: 9px;
    letter-spacing: .18em;
    color: #789894;
    margin: 14px 14px 9px
}

.navigation nav>a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 13px;
    border-radius: 10px 2px 10px 2px;
    margin: 4px 0;
    font-size: 12px;
    color: #b5c8c4;
    transition: background .15s
}

.navigation nav>a svg {
    width: 18px;
    height: 18px
}

.navigation nav>a:hover {
    background: #ffffff09;
    color: white
}

.navigation nav>a[aria-current] {
    background: #ffffff10;
    color: #eadbc0;
    border-left: 2px solid var(--gold);
    padding-left: 11px
}

.nav-bottom {
    margin-top: auto;
    padding-top: 38px
}

.nav-note {
    padding: 14px
}

.small-line {
    display: block;
    height: 2px;
    width: 29px;
    background: var(--gold);
    margin-bottom: 17px
}

.nav-note p {
    font-size: 10px;
    line-height: 1.8;
    color: #88a4a1;
    letter-spacing: .03em
}

.user-block {
    display: flex;
    align-items: center;
    gap: 10px;
    border-top: 1px solid #ffffff12;
    padding: 20px 6px 10px;
    margin-top: 15px;
    min-width: 0
}

.avatar {
    background: #365049;
    color: #dbc9a8;
    border: 1px solid #8e815140;
    display: grid;
    place-items: center;
    width: 33px;
    height: 33px;
    border-radius: 50%;
    font-family: Montserrat;
    flex-shrink: 0
}

.user-block>div {
    min-width: 0
}

.user-block strong {
    font-size: 12px;
    font-weight: 500;
    display: block;
    overflow: hidden;
    text-overflow: ellipsis
}

.user-block small {
    font-size: 10px;
    color: #95ada9;
    display: block
}

.logout {
    color: #95ada9;
    background: transparent;
    border: 0;
    display: flex;
    align-items: center;
    gap: 9px;
    margin: 4px 0 0 43px;
    padding: 4px;
    font-size: 11px !important
}

.logout svg {
    width: 14px;
    height: 14px
}

.workspace {
    flex: 1;
    min-width: 0
}

.topbar {
    height: 75px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    background: #fcfcf9;
    border-bottom: 1px solid var(--line);
    padding: 0 32px
}

.breadcrumbs {
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 11px;
    color: var(--muted);
    min-width: 0
}

.breadcrumbs strong {
    font-weight: 500;
    color: #3c5553;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis
}

.breadcrumb-slash {
    color: #b8c3bd
}

.workspace-body {
    display: flex;
    align-items: stretch;
    min-height: calc(100vh - 75px)
}

.main-content {
    padding: 36px 32px 0;
    flex: 1;
    min-width: 0;
    max-width: 1800px
}

.page-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    margin-bottom: 28px
}

.page-heading>div {
    min-width: 0
}

.page-heading h1 {
    overflow-wrap: anywhere
}

.page-heading p:not(.eyebrow) {
    color: var(--muted);
    font-size: 12px;
    margin-top: 10px;
    max-width: 590px
}

.eyebrow {
    font-size: 9px;
    font-weight: 600;
    letter-spacing: .15em;
    color: #87938a;
    margin-bottom: 11px !important;
    line-height: 1.8
}

.gold {
    color: var(--gold)
}

.button {
    border: 1px solid var(--teal);
    background: var(--teal);
    color: #fff !important;
    min-height: 43px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 13px;
    padding: 11px 18px;
    border-radius: 13px 3px 13px 3px;
    font-size: 12px !important;
    font-weight: 500;
    line-height: 1.4;
    white-space: nowrap
}

.button svg {
    width: 16px;
    height: 16px
}

.button:hover {
    background: #0c515a;
    border-color: #0c515a
}

.button.secondary {
    background: transparent;
    border-color: #cbd5cf;
    color: var(--teal) !important
}

.button.secondary:hover {
    background: #edf1ec
}

.button.subtle {
    background: #eff2eb;
    border-color: transparent;
    color: var(--teal) !important
}

.button.compact {
    padding: 8px 11px;
    min-height: 34px;
    font-size: 11px !important
}

.icon-button {
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    background: transparent;
    color: #78908a;
    padding: 5px
}

.mobile-menu {
    display: none
}

.back-link {
    display: inline-block;
    font-size: 11px;
    color: var(--muted) !important;
    margin-bottom: 20px
}

.text-link {
    display: inline-block;
    font-size: 12px;
    color: var(--teal) !important;
    margin-top: 14px
}

.overview-banner {
    position: relative;
    overflow: hidden;
    isolation: isolate;
    background: var(--navy);
    color: #eef0e8;
    padding: 28px 32px;
    border-radius: 26px 4px 26px 4px;
    min-height: 235px;
    margin-bottom: 24px
}

.overview-banner .eyebrow {
    color: #c1ac85;
    font-size: 8px
}

.overview-banner h2 {
    font-size: 30px;
    font-weight: 450;
    line-height: 1.2
}

.overview-banner p:not(.eyebrow) {
    color: #96b1ab;
    font-size: 11px;
    margin-top: 13px
}

.overview-banner a {
    display: inline-flex;
    align-items: center;
    gap: 19px;
    font-size: 11px;
    margin-top: 19px;
    color: #d9c6a2
}

.overview-banner a svg {
    width: 16px;
    height: 16px
}

.route-illustration {
    position: absolute;
    right: -58px;
    top: -32px;
    width: 320px;
    height: 320px;
    border: 1px solid #ffffff0b;
    border-radius: 50%;
    z-index: -1;
    background: radial-gradient(circle at center, #36574735, transparent 65%)
}

.route-illustration:before,
.route-illustration:after {
    content: '';
    position: absolute;
    border: 1px solid #b3a77d27;
    border-radius: 50%;
    inset: 40px
}

.route-illustration:after {
    inset: 80px;
    border-style: dashed
}

.route-orbit {
    position: absolute;
    inset: 45px;
    border: 1px solid #a7926140;
    border-radius: 50%;
    transform: rotate(-30deg) scaleX(.62)
}

.route-dot {
    position: absolute;
    width: 8px;
    height: 8px;
    background: #b4a075;
    border-radius: 50%;
    box-shadow: 0 0 0 8px #b4a07515
}

.route-dot.start {
    left: 46px;
    top: 108px
}

.route-dot.end {
    right: 103px;
    bottom: 69px
}

.route-label {
    position: absolute;
    bottom: 23px;
    left: 73px;
    font-size: 7px;
    letter-spacing: .2em;
    color: #89a29a
}

.stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 28px
}

.stat {
    padding: 18px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 15px 3px 15px 3px
}

.stat>span {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    font-size: 10px;
    color: #627a74
}

.stat svg {
    width: 16px;
    height: 16px;
    color: #ad956e
}

.stat>strong {
    display: block;
    font-size: 34px;
    line-height: 1.2;
    font-family: Montserrat;
    font-weight: 450;
    margin-top: 14px;
    letter-spacing: -.05em
}

.stat small {
    display: block;
    color: #98a39c;
    font-size: 9px;
    margin-top: 7px
}

.card {
    background: white;
    border: 1px solid var(--line);
    border-radius: 14px 3px 14px 3px;
    margin-bottom: 24px;
    overflow: hidden
}

.card-heading {
    padding: 20px 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    border-bottom: 1px solid #edf0ea
}

.card-heading h2 {
    font-size: 15px
}

.card-heading>a {
    font-size: 10px;
    color: #73847a
}

.card-heading>a span {
    margin-left: 9px;
    color: var(--gold)
}

.table-wrap {
    overflow-x: auto
}

table {
    border-collapse: collapse;
    width: 100%;
    text-align: left
}

th {
    background: #fafbf8;
    font-size: 9px;
    font-weight: 500;
    color: #94a095;
    padding: 12px 20px;
    white-space: nowrap
}

td {
    padding: 17px 20px;
    border-top: 1px solid #f0f2ec;
    font-size: 11px
}

td small {
    display: block;
    color: #8d9b92;
    font-size: 10px;
    margin-top: 4px
}

tbody tr:hover {
    background: #fbfcf9
}

.table-primary {
    font-weight: 500;
    color: #244b49 !important
}

.row-link {
    font-size: 19px;
    color: var(--gold) !important
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 9px;
    background: #edf0ea;
    color: #77887c;
    border-radius: 5px;
    font-size: 9px;
    white-space: nowrap;
    font-weight: 500
}

.badge:before {
    content: '';
    width: 4px;
    height: 4px;
    background: currentColor;
    border-radius: 50%
}

.badge.requested,
.badge.reviewing,
.badge.review,
.badge.signature,
.badge.documents {
    background: #f5efdf;
    color: #9a8050
}

.badge.responded {
    background: #e9f0f3;
    color: #54768c
}

.badge.accepted,
.badge.converted,
.badge.active {
    background: #eaf2e9;
    color: #587b5c
}

.badge.declined {
    background: #f9ece7;
    color: #a96652
}

.empty {
    text-align: center;
    padding: 44px 24px !important;
    color: #8b9a91
}

.empty h3 {
    font-size: 17px;
    color: #496d63;
    margin-bottom: 9px
}

.empty p {
    font-size: 12px
}

.compact-empty {
    padding: 24px !important;
    font-size: 12px
}

.filter-bar {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    align-items: center
}

.search-field {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    min-width: 0;
    border: 1px solid var(--line);
    background: white;
    padding: 0 13px;
    border-radius: 8px
}

.search-field svg {
    width: 16px;
    color: #9caaa0
}

.search-field input {
    border: 0;
    padding: 12px 0;
    background: transparent;
    min-width: 0;
    width: 100%;
    font-size: 11px
}

.filter-bar select {
    max-width: 210px;
    font-size: 11px
}

.padded {
    padding: 24px
}

.section-title {
    display: flex;
    gap: 15px;
    align-items: center;
    justify-content: space-between
}

.section-title>span {
    font-size: 10px;
    color: var(--muted)
}

.data-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 26px;
    margin: 0
}

.data-grid dt {
    font-size: 10px;
    color: #8c9c93;
    margin-bottom: 7px
}

.data-grid dd {
    margin: 0;
    font-size: 12px;
    overflow-wrap: anywhere
}

.data-grid .value {
    font-family: Montserrat;
    font-size: 20px
}

.route {
    display: flex;
    align-items: center;
    gap: 30px;
    background: #f6f8f3;
    padding: 20px;
    margin: 20px 0 26px;
    border-radius: 12px 2px 12px 2px
}

.route small {
    font-size: 8px;
    letter-spacing: .12em;
    display: block;
    color: #97a38e
}

.route strong {
    font-size: 15px;
    font-family: Montserrat;
    font-weight: 500;
    display: block;
    margin-top: 6px
}

.route svg {
    color: var(--gold);
    margin: 0 auto
}

.route>div {
    flex: 1
}

.journey {
    display: flex;
    margin: 0 0 26px;
    gap: 4px
}

.journey>span {
    flex: 1;
    border-top: 2px solid #dfe5db;
    padding: 10px 4px;
    color: #9ba697;
    font-size: 9px
}

.journey>span.done {
    border-color: #bba16f;
    color: #7c6c49
}

.journey>span.current {
    border-color: var(--teal);
    color: var(--teal);
    font-weight: 600
}

.shipment-status {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 20px
}

.shipment-status>a {
    font-size: 11px;
    color: #7f8d7c
}

.inline-action {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 24px;
    font-size: 12px;
    color: var(--muted)
}

.proposal {
    border-color: #c8d5c8
}

.proposal-value {
    display: flex;
    gap: 10px;
    align-items: baseline;
    margin-bottom: 8px
}

.proposal-value>span {
    font-size: 13px;
    color: var(--muted)
}

.proposal-value>strong {
    font-family: Montserrat;
    font-size: 34px;
    letter-spacing: -.04em;
    font-weight: 500
}

.prose {
    margin: 26px 0;
    white-space: normal;
    font-size: 13px;
    line-height: 1.8;
    overflow-wrap: anywhere
}

.previous-response {
    border-top: 1px solid var(--line)
}

.previous-response small {
    display: block;
    color: var(--muted);
    margin: 5px 0 12px
}

.disclosure>summary,
.nested-disclosure>summary {
    padding: 18px 24px;
    font-size: 12px;
    cursor: pointer;
    color: var(--teal)
}

.disclosure[open]>summary {
    border-bottom: 1px solid var(--line)
}

.nested-disclosure {
    border-top: 1px solid var(--line)
}

.task {
    padding: 17px 22px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid #f1f3ed
}

.task-marker {
    font-size: 18px;
    color: var(--gold)
}

.task>div {
    flex: 1
}

.task strong {
    font-size: 12px;
    font-weight: 500
}

.task small {
    display: block;
    font-size: 10px;
    color: var(--muted);
    margin-top: 4px
}

.task.completed strong {
    text-decoration: line-through;
    color: #8e9b90
}

.task .overdue {
    color: #aa6652
}

.document-list>a {
    display: flex;
    align-items: center;
    gap: 13px;
    padding: 16px 24px;
    border-bottom: 1px solid #f1f3ed
}

.document-list>a svg {
    color: #a59675
}

.document-list>a>div {
    flex: 1
}

.document-list strong {
    font-size: 12px;
    font-weight: 500
}

.document-list small {
    display: block;
    color: var(--muted);
    margin-top: 4px
}

.document-list>a>span {
    font-size: 20px;
    color: var(--gold)
}

.activity-list>a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px 22px;
    border-bottom: 1px solid #f0f2ec
}

.activity-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #ae9b76
}

.activity-list strong {
    font-size: 11px;
    font-weight: 500
}

.activity-list small {
    display: block;
    font-size: 10px;
    color: var(--muted);
    margin-top: 3px
}

.activity-list time {
    margin-left: auto;
    color: #929e92;
    font-size: 9px;
    white-space: nowrap
}

.app-footer {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    color: #a0aa9e;
    font-size: 9px;
    padding: 14px 0 24px
}

.muted {
    color: var(--muted);
    font-size: 11px
}

.spaced {
    margin-top: 24px
}

/* Forms are shared only inside the authenticated application and login. */
.field {
    margin-bottom: 21px;
    min-width: 0
}

.field label {
    display: block;
    font-size: 11px;
    font-weight: 500;
    color: #4f6c61;
    margin-bottom: 7px
}

.field label small {
    margin-left: 7px;
    font-size: 9px;
    font-weight: 400;
    color: #9ba497
}

.required {
    margin-left: 4px;
    color: var(--gold)
}

.tek-app input:not([type=checkbox]):not([type=hidden]),
.tek-app select,
.tek-app textarea {
    width: 100%;
    min-width: 0;
    border: 1px solid #d9e0d4;
    border-radius: 8px 2px 8px 2px;
    background: #fff;
    padding: 11px 12px;
    color: var(--ink);
    font-size: 12px
}

.tek-app textarea {
    resize: vertical;
    min-height: 84px
}

.tek-app input::placeholder,
.tek-app textarea::placeholder {
    color: #a0aa9c
}

.tek-app .search-field input {
    border: 0;
    padding: 11px 0
}

.tek-app input[type=checkbox] {
    accent-color: var(--teal);
    width: 16px;
    height: 16px;
    margin: 0;
    flex-shrink: 0
}

.checkbox-field {
    display: flex;
    align-items: center;
    gap: 8px
}

.checkbox-field label {
    margin: 0;
    font-weight: 400
}

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

.form-grid>.field:has(textarea) {
    grid-column: 1/-1
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 12px;
    margin-top: 28px;
    padding-top: 21px;
    border-top: 1px solid var(--line)
}

.form-card {
    padding: 28px
}

.help-text {
    color: #8b9b8e;
    font-size: 10px;
    margin-top: 10px;
    line-height: 1.65
}

.help-text ul {
    padding-left: 18px
}

.notice {
    border: 1px solid #d9e3d4;
    border-radius: 8px;
    background: #f0f5ec;
    padding: 15px 18px;
    color: #5e7c55;
    font-size: 12px;
    margin-bottom: 20px
}

.notice.error {
    background: #fcf0ec;
    border-color: #edd2c7;
    color: #a65847
}

.notice.warning {
    background: #faf4e5;
    color: #9a7e48;
    border-color: #e9dcbb
}

.notice p {
    margin-top: 6px
}

.notice input {
    margin-top: 10px
}

.notice ul {
    padding-left: 20px;
    margin: 0
}

.error-text {
    font-size: 11px;
    color: #aa5949;
    margin-top: 6px !important
}

.field-error input,
.field-error textarea,
.field-error select {
    border-color: #bd8067 !important
}

/* Right-side panel: context history and future assistant share the same space. */
.context-panel {
    width: 304px;
    flex-shrink: 0;
    border-left: 1px solid var(--line);
    background: #fcfcf9;
    padding: 24px 22px;
    position: sticky;
    top: 0;
    max-height: calc(100vh - 1px);
    overflow-y: auto
}

.context-panel.is-collapsed {
    display: none
}

.panel-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px
}

.panel-heading .eyebrow {
    margin-bottom: 0 !important;
    font-size: 8px
}

.panel-title {
    font-size: 18px !important
}

.panel-tabs {
    display: flex;
    gap: 20px;
    border-bottom: 1px solid var(--line);
    margin-bottom: 22px
}

.panel-tabs>button {
    font-size: 11px;
    padding: 11px 0;
    border: 0;
    background: transparent;
    color: #94a28d;
    border-bottom: 2px solid transparent
}

.panel-tabs>button[aria-selected=true] {
    color: var(--teal);
    border-color: var(--gold)
}

.context-label {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f0f3eb;
    border-radius: 7px;
    padding: 10px;
    font-size: 10px;
    color: #69816d;
    margin-bottom: 24px
}

.context-label svg {
    width: 14px;
    height: 14px
}

.context-label span {
    margin-left: auto;
    font-size: 9px;
    color: #96a18b
}

.timeline-intro h3 {
    font-size: 14px;
    font-weight: 500
}

.timeline-intro p {
    font-size: 11px;
    color: #92a08e;
    margin-top: 8px;
    line-height: 1.7
}

.timeline {
    list-style: none;
    padding: 0 0 0 13px;
    margin: 25px 0 0
}

.timeline li {
    position: relative;
    border-left: 1px solid #dce3d6;
    padding: 0 0 27px 20px
}

.timeline li:last-child {
    border-left-color: transparent
}

.timeline-dot {
    position: absolute;
    left: -4px;
    top: 3px;
    width: 7px;
    height: 7px;
    background: #c6cfbd;
    border-radius: 50%;
    box-shadow: 0 0 0 4px #fcfcf9
}

.timeline li:first-child .timeline-dot {
    background: var(--gold);
    box-shadow: 0 0 0 4px #f4efdf
}

.timeline time {
    font-size: 9px;
    color: #9caa92
}

.timeline h4 {
    font-size: 11px;
    font-weight: 500;
    margin-top: 8px;
    color: #3c6050
}

.timeline p {
    font-size: 11px;
    color: #879a80;
    line-height: 1.7;
    margin-top: 8px;
    overflow-wrap: anywhere
}

.timeline small {
    display: block;
    font-size: 9px;
    color: #a0ad97;
    margin-top: 9px;
    overflow-wrap: anywhere
}

.internal-tag {
    display: inline-block;
    border: 1px solid #dce4d5;
    padding: 1px 4px;
    border-radius: 3px;
    margin-left: 6px;
    font-size: 8px
}

.assistant-empty {
    text-align: center;
    padding: 46px 4px 30px
}

.assistant-symbol {
    display: grid;
    place-items: center;
    width: 66px;
    height: 66px;
    background: #eef2e8;
    border: 1px solid #e1e7d7;
    border-radius: 22px 3px 22px 3px;
    margin: 0 auto 19px;
    color: var(--gold)
}

.assistant-symbol svg {
    width: 28px;
    height: 28px;
    stroke-width: 1
}

.assistant-empty .badge {
    font-size: 7px;
    letter-spacing: .12em;
    background: transparent;
    border: 1px solid #dce4d4
}

.assistant-empty h3 {
    font-size: 22px;
    line-height: 1.3;
    margin: 18px 0 13px;
    color: #4a6755;
    font-weight: 450
}

.assistant-empty p {
    font-size: 11px;
    line-height: 1.8;
    color: #98a48e;
    max-width: 210px;
    margin: auto
}

.assistant-context {
    padding: 15px;
    background: #f3f5ed;
    border: 1px solid #e7ebdf;
    border-radius: 9px;
    font-size: 10px
}

.assistant-context .eyebrow {
    font-size: 7px;
    margin-bottom: 7px !important
}

.assistant-context p {
    display: flex;
    align-items: center;
    gap: 8px;
    overflow-wrap: anywhere;
    color: #6e846a
}

.assistant-context svg {
    width: 13px;
    height: 13px
}

.assistant-context small {
    display: block;
    font-size: 9px;
    color: #a1ac93;
    margin-top: 10px
}

.assistant-input {
    position: relative;
    border: 1px solid #e2e7d9;
    border-radius: 11px;
    margin-top: 26px;
    padding: 13px;
    background: #fafbf6
}

.assistant-input label {
    display: block;
    color: #95a28a;
    font-size: 10px;
    margin-bottom: 8px
}

.assistant-input textarea {
    border: 0 !important;
    background: transparent !important;
    padding: 0 !important;
    font-size: 10px !important;
    resize: none;
    min-height: 58px
}

.assistant-input .icon-button {
    display: flex;
    margin-left: auto;
    background: #edf1e6;
    color: #afba9e;
    border-radius: 5px;
    width: 26px;
    height: 26px
}

.assistant-footnote {
    text-align: center;
    font-size: 8px;
    color: #a4af96;
    margin-top: 12px !important
}

/* Login is a separate composition, using the application's stylesheet only. */
.auth-page {
    display: flex;
    min-height: 100svh
}

.auth-story {
    width: 49%;
    background: linear-gradient(150deg, #05242ace, #05242a99), url('/assets/images/landing/porto-hero.webp') center/cover;
    color: white;
    padding: 46px 55px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    min-height: 100svh
}

.auth-story .brand {
    align-self: flex-start
}

.auth-story-copy {
    padding: 70px 0
}

.auth-story-copy .eyebrow {
    color: #c9b38a;
    font-size: 10px;
    max-width: 380px
}

.auth-story-copy h1 {
    font-size: clamp(36px, 4.2vw, 65px);
    line-height: 1.12;
    font-weight: 450;
    letter-spacing: -.055em
}

.auth-story-copy .small-line {
    margin: 26px 0
}

.auth-story-copy p:not(.eyebrow) {
    font-size: 15px;
    color: #c6d4c7;
    line-height: 1.8
}

.auth-story>small {
    font-size: 10px;
    color: #9db6a5
}

.auth-main {
    width: 51%;
    padding: 40px 50px 26px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background: #fafaf6;
    min-width: 0
}

.auth-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
    font-size: 10px;
    color: #84917e
}

.auth-top>div {
    display: flex;
    gap: 12px
}

.auth-top [aria-current] {
    color: var(--teal);
    text-decoration: underline;
    text-underline-offset: 5px;
    text-decoration-color: var(--gold)
}

.auth-top>div>span {
    color: #c6ccbd
}

.auth-card {
    width: min(100%, 370px);
    margin: 65px auto
}

.auth-icon {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    background: #eef1e8;
    border: 1px solid #dfe6d6;
    border-radius: 14px 2px 14px 2px;
    margin-bottom: 27px;
    color: #8e9a79
}

.auth-icon svg {
    width: 22px;
    height: 22px
}

.auth-card>.eyebrow {
    font-size: 9px;
    color: #9a936e
}

.auth-card h2 {
    font-size: 29px;
    line-height: 1.3
}

.auth-description {
    font-size: 12px;
    color: #8d9b84;
    margin: 13px 0 31px !important
}

.auth-card .field {
    margin-bottom: 19px
}

.auth-card input:not([type=hidden]) {
    background: #fdfef9 !important;
    min-height: 46px
}

.auth-card label {
    font-size: 11px
}

.forgot-link {
    display: block;
    text-align: right;
    color: #849578 !important;
    font-size: 10px;
    margin-top: -8px;
    margin-bottom: 26px
}

.auth-submit {
    width: 100%;
    justify-content: space-between;
    min-height: 48px
}

.auth-help {
    border-top: 1px solid #e2e7d8;
    margin-top: 33px;
    padding-top: 22px;
    text-align: center;
    font-size: 11px;
    color: #99a58d
}

.auth-help a {
    display: inline-block;
    color: #6e8263;
    margin-top: 6px
}

.auth-footer {
    text-align: center;
    font-size: 9px;
    color: #a1ad94
}

@media(min-width:1600px) {
    .main-content {
        padding: 44px 48px 0
    }

    .context-panel {
        width: 330px;
        padding: 28px
    }

    .navigation {
        width: 235px
    }

    .overview-banner {
        min-height: 250px
    }

    .topbar {
        padding-inline: 48px
    }
}

@media(max-width:1250px) {
    .navigation {
        width: 192px;
        padding-inline: 12px
    }

    .main-content {
        padding: 28px 22px 0
    }

    .topbar {
        padding-inline: 22px
    }

    .context-panel {
        width: 270px;
        padding: 22px 17px
    }

    .page-heading {
        align-items: flex-start;
        flex-wrap: wrap
    }

    .stats {
        gap: 10px
    }

    .stat {
        padding: 14px
    }

    .stat>span {
        font-size: 9px
    }

    .stat small {
        font-size: 8px
    }

    .card-heading,
    .padded {
        padding: 18px
    }

    .card-heading h2 {
        font-size: 14px
    }

    td,
    th {
        padding-inline: 14px
    }

    .auth-story {
        padding: 40px
    }

    .auth-main {
        padding-inline: 35px
    }
}

@media(max-width:1100px) {
    .context-panel {
        position: fixed;
        right: 0;
        top: 75px;
        bottom: 0;
        z-index: 20;
        width: 320px;
        max-height: calc(100vh - 75px);
        box-shadow: -16px 12px 40px #05242a15
    }

    .main-content {
        padding: 30px 32px 0
    }

    .page-heading {
        flex-wrap: nowrap
    }

    .navigation {
        width: 206px
    }

    .stats {
        gap: 16px
    }

    .stat {
        padding: 19px
    }
}

@media(max-width:760px) {
    .navigation {
        position: fixed;
        left: 0;
        top: 65px;
        bottom: 0;
        height: calc(100dvh - 65px);
        min-height: 0;
        z-index: 30;
        width: 220px;
        box-shadow: 10px 0 40px #05242a30
    }

    .navigation.is-collapsed {
        display: none
    }

    .mobile-menu {
        display: inline-flex
    }

    .navigation .brand {
        display: none
    }

    .workspace-label {
        margin-bottom: 10px
    }

    .topbar {
        height: 65px;
        padding: 0 15px;
        position: sticky;
        top: 0;
        z-index: 40
    }

    .breadcrumbs {
        gap: 8px;
        font-size: 10px
    }

    .breadcrumbs>span:first-of-type,
    .breadcrumb-slash {
        display: none
    }

    .topbar>.button {
        font-size: 10px !important
    }

    .main-content {
        padding: 26px 18px 0
    }

    .workspace-body {
        min-height: calc(100vh - 65px)
    }

    .page-heading {
        flex-wrap: wrap;
        gap: 16px;
        margin-bottom: 22px
    }

    .tek-app h1 {
        font-size: 27px
    }

    .page-heading p:not(.eyebrow) {
        font-size: 11px
    }

    .overview-banner {
        padding: 26px;
        min-height: 236px
    }

    .overview-banner h2 {
        font-size: 28px
    }

    .overview-banner .eyebrow {
        max-width: 200px;
        font-size: 7px
    }

    .route-illustration {
        right: -154px
    }

    .stats {
        gap: 8px
    }

    .stat {
        padding: 13px 10px
    }

    .stat>span {
        font-size: 8px;
        min-height: 28px
    }

    .stat>span svg {
        display: none
    }

    .stat>strong {
        font-size: 29px
    }

    .stat small {
        font-size: 8px;
        min-height: 24px
    }

    .context-panel {
        top: 65px;
        max-height: calc(100dvh - 65px);
        width: min(340px, 100%)
    }

    .filter-bar {
        flex-wrap: wrap;
        gap: 8px
    }

    .filter-bar .search-field {
        flex-basis: 100%
    }

    .filter-bar select {
        flex: 1;
        max-width: none
    }

    .filter-bar .button {
        flex-shrink: 0
    }

    .form-grid,
    .data-grid {
        grid-template-columns: 1fr
    }

    .form-card {
        padding: 20px
    }

    .journey {
        flex-wrap: wrap;
        gap: 8px
    }

    .journey>span {
        flex-basis: 28%;
        font-size: 8px
    }

    .card-heading .muted {
        display: none
    }

    .app-footer {
        font-size: 8px
    }

    .app-footer span {
        display: none
    }

    .inline-action {
        align-items: flex-start;
        flex-direction: column
    }

    .form-actions {
        flex-wrap: wrap
    }

    .route {
        padding: 16px;
        gap: 16px
    }

    .route strong {
        font-size: 13px
    }

    .activity-list time {
        font-size: 8px
    }

    .auth-story {
        display: none
    }

    .auth-main {
        width: 100%;
        min-height: 100svh;
        padding: 30px 25px 22px
    }

    .auth-card {
        margin: 55px auto
    }

    .auth-card h2 {
        font-size: 28px
    }

    .auth-main:before {
        content: '';
        display: block;
        width: 95px;
        height: 44px;
        background: url('/assets/brand/tek-logo.svg') center/contain no-repeat;
        margin: 0 auto 25px
    }

    .auth-top {
        font-size: 10px
    }

    .auth-card .auth-icon {
        margin-bottom: 22px
    }
}

.record-tabs {
    display: flex;
    gap: 24px;
    overflow-x: auto;
    border-bottom: 1px solid var(--line);
    margin: -8px 0 24px;
    padding: 0 4px
}

.record-tabs a {
    color: #6f8179;
    flex: 0 0 auto;
    font-size: 11px;
    padding: 12px 0;
    border-bottom: 2px solid transparent
}

.record-tabs a.active {
    color: var(--teal);
    border-color: var(--gold);
    font-weight: 600
}

.shipment-journey {
    overflow-x: auto
}

.shipment-journey>span {
    min-width: 104px
}

.summary-grid {
    display: grid;
    grid-template-columns: 1.45fr 1fr;
    gap: 16px
}

.summary-grid .wide {
    grid-row: span 2
}

.summary-card h2,
.form-section h2 {
    margin-bottom: 22px
}

.compact-data {
    gap: 22px
}

.stacked-data {
    display: grid;
    gap: 0;
    margin: 0
}

.stacked-data>div {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 20px;
    padding: 10px 0;
    border-bottom: 1px solid #edf0ea
}

.stacked-data dt {
    color: #84938a;
    font-size: 10px
}

.stacked-data dd {
    font-size: 11px;
    font-weight: 500;
    margin: 0;
    text-align: right
}

.stacked-data .total-row {
    color: var(--teal);
    font-weight: 700;
    border-bottom: 0
}

.form-section {
    overflow: visible
}

.form-columns,
.finance-columns,
.finance-summary-grid,
.dashboard-charts {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px
}

.form-grid.single-column {
    grid-template-columns: 1fr
}

.sticky-actions {
    background: #f7f8f4;
    border: 1px solid var(--line);
    margin-bottom: 24px;
    padding: 16px;
    border-radius: 12px 2px 12px 2px
}

.metric-grid {
    display: grid;
    gap: 12px;
    margin-bottom: 24px
}

.metric-grid.four {
    grid-template-columns: repeat(4, minmax(0, 1fr))
}

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

.metric-card {
    background: #fff;
    border: 1px solid var(--line);
    border-top: 3px solid #d7dfd9;
    padding: 18px;
    border-radius: 13px 3px 13px 3px;
    min-width: 0
}

.metric-card>span,
.metric-card>small {
    color: #829188;
    display: block;
    font-size: 9px
}

.metric-card>strong {
    display: block;
    font-family: Montserrat;
    font-size: clamp(16px, 1.5vw, 23px);
    font-weight: 550;
    letter-spacing: -.04em;
    margin: 8px 0;
    overflow-wrap: anywhere
}

.metric-card.success {
    border-top-color: #75ad7c
}

.metric-card.warning {
    border-top-color: #cbaa68
}

.metric-card.danger {
    border-top-color: #c66f58
}

.metric-card.tek-fees {
    border-top-color: var(--gold);
    background: #fcfaf4
}

.badge.request,
.badge.quotation,
.badge.pre_shipment,
.badge.pending,
.badge.partial {
    background: #f5efdf;
    color: #927748
}

.badge.shipped,
.badge.transit,
.badge.customs,
.badge.delivery {
    background: #e9f0f3;
    color: #4f7483
}

.badge.closed,
.badge.paid,
.badge.approved {
    background: #eaf2e9;
    color: #4f7b57
}

.badge.overdue,
.badge.canceled,
.badge.rejected {
    background: #f9e9e5;
    color: #a25648
}

.table-actions {
    min-width: 92px
}

.table-actions .text-link {
    display: block;
    margin: 4px 0
}

.danger-link {
    color: #a25648 !important
}

.finance-columns {
    grid-template-columns: 1fr 1fr
}

.finance-summary-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr))
}

.note-list article {
    padding: 15px 20px;
    border-bottom: 1px solid #edf0ea
}

.note-list article strong,
.note-list article time {
    font-size: 10px
}

.note-list article time {
    color: var(--muted);
    float: right
}

.note-list article p {
    clear: both;
    color: #687b73;
    font-size: 11px;
    line-height: 1.6;
    margin-top: 7px
}

.period-filter,
.finance-filter {
    display: flex;
    align-items: end;
    gap: 9px;
    flex-wrap: wrap
}

.period-filter label {
    color: var(--muted);
    font-size: 9px
}

.period-filter input,
.finance-filter input,
.finance-filter select {
    min-height: 38px;
    font-size: 10px
}

.finance-filter {
    align-items: center;
    margin-bottom: 20px
}

.finance-filter .search-field {
    min-width: 210px
}

.dashboard-charts {
    grid-template-columns: 1.5fr 1fr
}

.bar-chart {
    height: 220px;
    display: flex;
    align-items: end;
    gap: 14px;
    margin-top: 22px;
    padding: 12px 8px 0;
    border-bottom: 1px solid var(--line);
    background: repeating-linear-gradient(to bottom, #edf0ea 0 1px, transparent 1px 54px)
}

.bar-group {
    flex: 1;
    height: 100%;
    min-width: 26px;
    display: flex;
    flex-direction: column;
    justify-content: end;
    text-align: center
}

.bars {
    display: flex;
    gap: 3px;
    align-items: end;
    justify-content: center;
    flex: 1
}

.bar {
    display: block;
    width: min(16px, 42%);
    min-height: 2px;
    border-radius: 3px 3px 0 0
}

.bar.filled,
.bar.billed,
.legend-dot.billed {
    background: var(--teal)
}

.bar.received,
.legend-dot.received {
    background: #9ab7a7
}

.bar-group>strong {
    font-size: 9px;
    padding: 8px 0
}

.chart-legend {
    display: flex;
    gap: 18px;
    justify-content: flex-end;
    margin-top: 13px
}

.chart-legend span {
    font-size: 9px;
    color: var(--muted)
}

.legend-dot {
    display: inline-block;
    width: 7px;
    height: 7px;
    border-radius: 2px;
    margin-right: 5px
}

.status-summary {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-top: 24px
}

.status-summary>div {
    background: #f6f8f3;
    border-radius: 10px 2px 10px 2px;
    padding: 18px
}

.status-summary strong {
    display: block;
    font-family: Montserrat;
    font-size: 28px
}

.status-summary span {
    color: var(--muted);
    font-size: 9px
}

@media(max-width:1350px) {
    .metric-grid.five {
        grid-template-columns: repeat(3, minmax(0, 1fr))
    }

    .finance-summary-grid {
        grid-template-columns: 1fr 1fr
    }

    .finance-summary-grid>:last-child {
        grid-column: 1 / -1
    }
}

@media(max-width:900px) {
    .metric-grid.four,
    .metric-grid.five {
        grid-template-columns: repeat(2, minmax(0, 1fr))
    }

    .summary-grid,
    .form-columns,
    .finance-columns,
    .finance-summary-grid,
    .dashboard-charts {
        grid-template-columns: 1fr
    }

    .summary-grid .wide,
    .finance-summary-grid>:last-child {
        grid-column: auto;
        grid-row: auto
    }
}

@media(max-width:520px) {
    .metric-grid.four,
    .metric-grid.five {
        grid-template-columns: 1fr
    }

    .period-filter {
        align-items: stretch;
        width: 100%
    }

    .period-filter label,
    .period-filter input,
    .period-filter button {
        width: 100%
    }

    .bar-chart {
        overflow-x: auto
    }
}

@media(prefers-reduced-motion:reduce) {
    .tek-app * {
        scroll-behavior: auto !important;
        transition: none !important
    }
}
