:root {
    --osw-navy: #002147;
    --osw-navy-deep: #07192d;
    --osw-blue: #165dff;
    --osw-gold: #c8a550;
    --osw-bg: #f4f6f9;
    --osw-white: #ffffff;
    --osw-text: #172234;
    --osw-muted: #6f7b8b;
    --osw-border: #e4e8ee;
    --osw-green: #1daf73;
    --osw-shadow: 0 18px 50px rgba(23, 34, 52, 0.07);
}

/* OpenSmart One 3.0 — wielofirmowość, poczta i Asystent kontekstowy */
.osw-workspace-switcher {
    display: grid;
    gap: 6px;
    margin: 14px 20px 6px;
    color: rgba(255, 255, 255, .72);
    font-size: 12px;
}

.osw-workspace-switcher select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: 10px;
    background: rgba(255, 255, 255, .08);
    color: #fff;
}

.osw-workspace-switcher option {
    color: #07192d;
}

.osw-mail-heading-actions,
.osw-mail-status-row,
.osw-mail-tabs,
.osw-mail-config-columns,
.osw-mail-account-cards {
    display: flex;
    gap: 12px;
    align-items: center;
}

.osw-mail-heading-actions select {
    min-width: 210px;
}

.osw-icon-button {
    width: 46px;
    height: 46px;
    border: 1px solid #d8e0ea;
    border-radius: 13px;
    background: #fff;
    color: var(--osw-navy);
    font-size: 20px;
    cursor: pointer;
}

.osw-mail-status-row {
    justify-content: space-between;
    margin: -6px 0 16px;
    color: #718096;
}

.osw-mail-tabs {
    margin-bottom: 12px;
}

.osw-mail-tabs button {
    padding: 11px 18px;
    border: 1px solid #dbe3ec;
    border-radius: 999px;
    background: #fff;
    color: #536174;
    font-weight: 700;
    cursor: pointer;
}

.osw-mail-tabs button.is-active {
    border-color: var(--osw-navy);
    background: var(--osw-navy);
    color: #fff;
}

.osw-mail-item {
    width: 100%;
    text-align: left;
    cursor: pointer;
    background: transparent;
    border-width: 0 0 1px;
}

.osw-mail-item.is-unread {
    background: #f3f8ff;
}

.osw-mail-item .osw-mail-correspondent {
    min-width: 210px;
}

.osw-mail-item .osw-mail-preview {
    flex: 1;
    min-width: 0;
}

.osw-mail-item .osw-mail-preview span {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.osw-mail-settings-card {
    width: min(1050px, calc(100vw - 40px));
}

.osw-mail-config-columns {
    align-items: stretch;
    margin-top: 18px;
}

.osw-mail-config-columns fieldset {
    flex: 1;
    display: grid;
    gap: 12px;
    min-width: 0;
    margin: 0;
    padding: 18px;
    border: 1px solid #dfe6ee;
    border-radius: 16px;
}

.osw-mail-config-columns legend {
    padding: 0 7px;
    color: var(--osw-navy);
    font-size: 15px;
    font-weight: 800;
}

.osw-mail-account-cards {
    align-items: stretch;
    flex-wrap: wrap;
    margin: 18px 0 12px;
}

.osw-mail-account-card {
    display: grid;
    gap: 3px;
    min-width: 210px;
    padding: 13px 15px;
    border: 1px solid #dfe6ee;
    border-radius: 13px;
    background: #f8fafc;
    cursor: pointer;
}

.osw-mail-account-card.is-active {
    border-color: var(--osw-gold);
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--osw-gold) 20%, transparent);
}

.osw-mail-account-card small,
.osw-mail-message-meta {
    color: #768397;
}

.osw-secret-notice {
    margin: 12px 0;
    padding: 11px 13px;
    border-radius: 12px;
    background: #fff8e5;
    color: #735b17;
    font-size: 13px;
    line-height: 1.5;
}

.osw-consent-status {
    padding: 12px 14px;
    border: 1px solid #bde8d3;
    border-radius: 12px;
    background: #effbf5;
    color: #08734a;
}

.osw-mail-message-card {
    width: min(760px, calc(100vw - 40px));
}

.osw-mail-message-body {
    min-height: 180px;
    max-height: 52vh;
    overflow: auto;
    margin-top: 20px;
    padding: 20px;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    background: #fff;
    color: #263548;
    line-height: 1.65;
}

.osw-context-assistant-launcher {
    position: fixed;
    z-index: 90;
    right: 24px;
    bottom: 22px;
    display: flex;
    gap: 9px;
    align-items: center;
    padding: 13px 18px;
    border: 0;
    border-radius: 999px;
    background: var(--osw-navy, #07192d);
    color: #fff;
    box-shadow: 0 16px 38px rgba(7, 25, 45, .24);
    font-weight: 800;
    cursor: pointer;
}

.osw-context-assistant {
    position: fixed;
    z-index: 1100;
    top: 0;
    right: 0;
    display: flex;
    flex-direction: column;
    width: min(420px, 100vw);
    height: 100dvh;
    border-left: 1px solid #dce3eb;
    background: #fff;
    box-shadow: -18px 0 50px rgba(20, 34, 52, .16);
}

.osw-context-assistant[hidden] {
    display: none;
}

.osw-context-assistant header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 22px;
    border-bottom: 1px solid #e5eaf0;
}

.osw-context-assistant header p,
.osw-context-assistant header h2 {
    margin: 0;
}

.osw-context-assistant header button {
    border: 0;
    background: transparent;
    color: #5e6a79;
    font-size: 30px;
    cursor: pointer;
}

.osw-context-assistant-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
    overflow: auto;
    padding: 20px;
    background: #f5f7fa;
}

.osw-context-message {
    max-width: 90%;
    padding: 12px 14px;
    border-radius: 14px;
    line-height: 1.5;
    white-space: pre-wrap;
}

.osw-context-message.is-assistant {
    align-self: flex-start;
    border: 1px solid #dfe6ee;
    background: #fff;
    color: #263548;
}

.osw-context-message.is-user {
    align-self: flex-end;
    background: var(--osw-navy);
    color: #fff;
}

.osw-context-assistant > .osw-secret-notice {
    margin: 0;
    border-radius: 0;
}

.osw-context-assistant form {
    display: grid;
    gap: 10px;
    padding: 16px;
    border-top: 1px solid #e5eaf0;
}

.osw-context-assistant textarea {
    width: 100%;
    min-height: 74px;
    padding: 12px;
    border: 1px solid #d7e0ea;
    border-radius: 13px;
    resize: vertical;
}

.osw-context-assistant form > div {
    display: flex;
    justify-content: space-between;
    gap: 10px;
}

@media (max-width: 760px) {
    .osw-context-assistant-launcher {
        right: 14px;
        bottom: calc(14px + env(safe-area-inset-bottom));
        padding: 12px 14px;
    }

    .osw-context-assistant {
        top: auto;
        bottom: 0;
        width: 100%;
        height: min(86dvh, 760px);
        border: 0;
        border-radius: 24px 24px 0 0;
    }

    .osw-mail-heading-actions,
    .osw-mail-status-row,
    .osw-mail-config-columns {
        align-items: stretch;
        flex-direction: column;
    }

    .osw-mail-heading-actions select {
        width: 100%;
        min-width: 0;
    }

    .osw-mail-heading-actions .osw-icon-button {
        width: 100%;
    }

    .osw-mail-status-row small {
        line-height: 1.5;
    }

    .osw-mail-tabs {
        overflow-x: auto;
    }

    .osw-mail-item {
        display: grid;
        grid-template-columns: 1fr auto;
        gap: 7px;
    }

    .osw-mail-item .osw-mail-preview {
        grid-column: 1 / -1;
    }

    .osw-mail-settings-card,
    .osw-mail-message-card {
        width: calc(100vw - 20px);
    }
}

.osw-inline-invite,
.osw-team-member {
    display: flex;
    gap: 10px;
    align-items: center;
}

.osw-inline-invite {
    margin: 18px 0;
}

.osw-inline-invite input {
    flex: 1;
}

.osw-team-list {
    display: grid;
    gap: 8px;
}

.osw-team-member {
    justify-content: space-between;
    padding: 12px 0;
    border-top: 1px solid #e4e9ef;
}

.osw-team-member div {
    display: grid;
    gap: 2px;
}

.osw-team-member small {
    color: #748195;
}

@media (max-width: 760px) {
    .osw-inline-invite {
        align-items: stretch;
        flex-direction: column;
    }
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    min-height: 100%;
}

body.osw-app-page,
body.osw-login-page {
    color: var(--osw-text);
    background: var(--osw-bg);
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    -webkit-font-smoothing: antialiased;
}

.osw-app {
    display: flex;
    min-height: 100vh;
    background: var(--osw-bg);
}

.osw-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 20;
    display: flex;
    width: 252px;
    flex-direction: column;
    padding: 28px 22px 22px;
    color: #fff;
    background: linear-gradient(175deg, #082846 0%, #061a30 58%, #071425 100%);
}

.osw-logo,
.osw-login-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.osw-logo strong,
.osw-logo span {
    display: block;
}

.osw-logo strong {
    font-size: 17px;
    letter-spacing: -0.3px;
}

.osw-logo span {
    margin-top: 1px;
    color: #cbd5df;
    font-size: 12px;
    letter-spacing: 2.5px;
    text-transform: uppercase;
}

.osw-brand-mark {
    display: grid;
    width: 40px;
    height: 40px;
    place-items: center;
    color: var(--osw-navy-deep);
    border-radius: 12px;
    background: linear-gradient(145deg, #f4e4ae, var(--osw-gold));
    box-shadow: 0 7px 22px rgba(200, 165, 80, 0.25);
    font-weight: 800;
}

.osw-nav {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 7px;
    margin-top: 46px;
}

.osw-nav a {
    display: flex;
    align-items: center;
    gap: 13px;
    padding: 12px 14px;
    color: #aebbc8;
    border-radius: 11px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: 160ms ease;
}

.osw-nav a:hover,
.osw-nav a.is-active {
    color: #fff;
    background: rgba(255, 255, 255, 0.09);
}

.osw-nav a.is-active {
    box-shadow: inset 3px 0 0 var(--osw-gold);
}

.osw-nav span {
    width: 20px;
    font-size: 19px;
    text-align: center;
}

.osw-sidebar-footer {
    display: flex;
    align-items: center;
    gap: 11px;
    padding-top: 19px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.osw-install-app {
    display: flex;
    min-height: 42px;
    align-items: center;
    gap: 10px;
    margin: 0 0 14px;
    padding: 0 13px;
    color: #e7edf4;
    border: 1px solid rgba(200, 165, 80, 0.32);
    border-radius: 11px;
    background: rgba(200, 165, 80, 0.1);
    font: inherit;
    font-size: 11px;
    font-weight: 700;
    text-align: left;
    cursor: pointer;
}

.osw-install-app span {
    display: grid;
    width: 23px;
    height: 23px;
    place-items: center;
    color: var(--osw-navy-deep);
    border-radius: 7px;
    background: var(--osw-gold);
    font-size: 14px;
}

.osw-user-avatar {
    display: grid;
    width: 39px;
    height: 39px;
    place-items: center;
    flex: 0 0 39px;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.13);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.09);
    font-weight: 700;
}

.osw-sidebar-footer strong,
.osw-sidebar-footer a {
    display: block;
}

.osw-sidebar-footer strong {
    max-width: 145px;
    overflow: hidden;
    font-size: 13px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.osw-sidebar-footer a {
    margin-top: 3px;
    color: #9fadb9;
    font-size: 11px;
    text-decoration: none;
}

.osw-main {
    width: calc(100% - 252px);
    min-height: 100vh;
    margin-left: 252px;
    background: var(--osw-bg);
}

.osw-topbar {
    display: flex;
    height: 70px;
    align-items: center;
    justify-content: space-between;
    padding: 0 40px;
    border-bottom: 1px solid var(--osw-border);
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(18px);
}

.osw-date {
    color: var(--osw-muted);
    font-size: 13px;
    text-transform: capitalize;
}

.osw-system-status {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #526071;
    font-size: 12px;
    font-weight: 600;
}

.osw-system-status span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--osw-green);
    box-shadow: 0 0 0 4px rgba(29, 175, 115, 0.11);
}

.osw-menu-toggle {
    display: none;
}

.osw-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 42px 42px 60px;
}

.osw-welcome {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
}

.osw-eyebrow {
    margin: 0 0 8px;
    color: var(--osw-gold);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1.7px;
    text-transform: uppercase;
}

.osw-welcome h1 {
    margin: 0;
    color: var(--osw-navy);
    font-size: clamp(28px, 3vw, 40px);
    letter-spacing: -1.5px;
}

.osw-welcome > div > p:last-child {
    margin: 9px 0 0;
    color: var(--osw-muted);
    font-size: 15px;
}

.osw-primary-button {
    padding: 13px 20px;
    color: #fff;
    border: 0;
    border-radius: 11px;
    background: var(--osw-navy);
    box-shadow: 0 10px 25px rgba(0, 33, 71, 0.16);
    font: inherit;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}

.osw-metrics {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin-top: 34px;
}

.osw-metrics article,
.osw-card {
    border: 1px solid rgba(225, 230, 237, 0.9);
    background: var(--osw-white);
    box-shadow: var(--osw-shadow);
}

.osw-metrics article {
    padding: 20px 21px;
    border-radius: 15px;
}

.osw-metrics span,
.osw-metrics small {
    display: block;
}

.osw-metrics span {
    color: var(--osw-muted);
    font-size: 12px;
    font-weight: 600;
}

.osw-metrics strong {
    display: block;
    margin: 8px 0 6px;
    color: var(--osw-navy);
    font-size: 30px;
    line-height: 1;
}

.osw-metrics small {
    color: #9aa4b1;
    font-size: 10px;
}

.osw-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(310px, 0.75fr);
    gap: 18px;
    margin-top: 18px;
}

.osw-card {
    padding: 25px;
    border-radius: 17px;
}

.osw-card-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 15px;
}

.osw-card h2 {
    margin: 0;
    color: var(--osw-navy);
    font-size: 19px;
    letter-spacing: -0.5px;
}

.osw-badge {
    padding: 6px 9px;
    color: #466078;
    border-radius: 20px;
    background: #eff3f7;
    font-size: 10px;
    font-weight: 700;
}

.osw-empty-state {
    display: flex;
    min-height: 230px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    text-align: center;
}

.osw-empty-icon {
    display: grid;
    width: 49px;
    height: 49px;
    place-items: center;
    color: var(--osw-green);
    border-radius: 50%;
    background: rgba(29, 175, 115, 0.1);
    font-size: 20px;
    font-weight: 800;
}

.osw-empty-state h3 {
    margin: 15px 0 7px;
    color: var(--osw-navy);
    font-size: 15px;
}

.osw-empty-state p {
    max-width: 420px;
    margin: 0;
    color: var(--osw-muted);
    font-size: 12px;
    line-height: 1.65;
}

.osw-command-list {
    display: grid;
    gap: 8px;
    margin-top: 22px;
}

.osw-command-list button {
    padding: 11px 13px;
    color: #4f5c6d;
    border: 1px solid var(--osw-border);
    border-radius: 10px;
    background: #fafbfd;
    font: inherit;
    font-size: 12px;
    text-align: left;
    cursor: pointer;
}

.osw-assistant-input {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 18px;
    padding: 8px 8px 8px 14px;
    color: #9aa4b1;
    border: 1px solid var(--osw-border);
    border-radius: 12px;
    font-size: 12px;
}

.osw-assistant-input button {
    width: 32px;
    height: 32px;
    color: #fff;
    border: 0;
    border-radius: 9px;
    background: var(--osw-navy);
    cursor: pointer;
}

.osw-login-page {
    display: grid;
    min-height: 100vh;
    place-items: center;
    padding: 28px;
    background:
        radial-gradient(circle at 15% 12%, rgba(200, 165, 80, 0.14), transparent 30%),
        radial-gradient(circle at 90% 82%, rgba(22, 93, 255, 0.11), transparent 31%),
        #f4f6f9;
}

.osw-login-shell {
    width: min(100%, 430px);
}

.osw-login-brand {
    justify-content: center;
    margin-bottom: 24px;
    color: var(--osw-navy);
    font-size: 17px;
    font-weight: 800;
}

.osw-login-card {
    padding: 36px;
    border: 1px solid rgba(225, 230, 237, 0.9);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 28px 80px rgba(0, 33, 71, 0.1);
}

.osw-login-card h1 {
    margin: 0;
    color: var(--osw-navy);
    font-size: 29px;
    letter-spacing: -1px;
}

.osw-login-intro {
    margin: 10px 0 25px;
    color: var(--osw-muted);
    font-size: 13px;
    line-height: 1.6;
}

.osw-login-card label {
    display: block;
    margin-bottom: 7px;
    color: #425065;
    font-size: 12px;
    font-weight: 700;
}

.osw-login-card .login-username,
.osw-login-card .login-password {
    margin: 0 0 17px;
}

.osw-login-card input[type="text"],
.osw-login-card input[type="password"] {
    width: 100%;
    height: 46px;
    padding: 0 13px;
    border: 1px solid var(--osw-border);
    border-radius: 10px;
    background: #fbfcfd;
    font: inherit;
    outline: none;
}

.osw-login-card input[type="text"]:focus,
.osw-login-card input[type="password"]:focus {
    border-color: #8aa9ce;
    box-shadow: 0 0 0 3px rgba(0, 33, 71, 0.06);
}

.osw-login-card .login-remember {
    margin: 2px 0 18px;
}

.osw-login-card .login-remember label {
    display: flex;
    align-items: center;
    gap: 7px;
    font-weight: 500;
}

.osw-login-card .login-submit {
    margin: 0;
}

.osw-login-card .button-primary {
    width: 100%;
    height: 46px;
    color: #fff;
    border: 0;
    border-radius: 10px;
    background: var(--osw-navy);
    font: inherit;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}

.osw-forgot-link {
    display: block;
    margin-top: 17px;
    color: #5d6b7c;
    font-size: 11px;
    text-align: center;
    text-decoration: none;
}

.osw-login-footer {
    margin: 21px 0 0;
    color: #98a2af;
    font-size: 10px;
    letter-spacing: 1px;
    text-align: center;
    text-transform: uppercase;
}

@media (max-width: 1000px) {
    .osw-metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .osw-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px) {
    .osw-sidebar {
        width: 236px;
        transform: translateX(-100%);
        transition: transform 180ms ease;
    }

    .osw-app.is-menu-open .osw-sidebar {
        transform: translateX(0);
    }

    .osw-main {
        width: 100%;
        margin-left: 0;
    }

    .osw-menu-toggle {
        display: block;
        padding: 0;
        color: var(--osw-navy);
        border: 0;
        background: transparent;
        font-size: 20px;
    }

    .osw-topbar {
        padding: 0 20px;
    }

    .osw-content {
        padding: 28px 20px 45px;
    }

    .osw-welcome {
        align-items: flex-start;
        flex-direction: column;
    }

    .osw-primary-button {
        width: 100%;
    }
}

/* OpenSmart One 2.0 — czytelność, moduły i pełny układ mobilny */

body.osw-app-page {
    overflow-x: hidden;
    font-size: 14px;
}

body.osw-app-page #wpadminbar {
    display: none !important;
}

.osw-mobile-bar,
.osw-mobile-backdrop {
    display: none;
}

.osw-content {
    padding-top: 32px;
}

.osw-nav {
    min-height: 0;
    margin-top: 30px;
    overflow-y: auto;
    scrollbar-width: thin;
}

.osw-nav a {
    flex: 0 0 auto;
    font-size: 13px;
}

.osw-nav a > span[data-osw-assistant-name] {
    width: auto;
    min-width: 0;
    overflow: hidden;
    font-size: inherit;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.osw-welcome {
    align-items: center;
}

.osw-welcome-actions {
    display: flex;
    align-items: flex-end;
    flex-direction: column;
    gap: 12px;
}

.osw-office-meta {
    display: flex;
    align-items: center;
    gap: 18px;
}

.osw-date {
    color: #5f6d7e;
    font-size: 12px;
    text-transform: capitalize;
}

.osw-system-status.is-working span,
.osw-mobile-status.is-working span {
    background: var(--osw-gold);
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--osw-gold) 16%, transparent);
}

.osw-metrics span,
.osw-contact-summary span,
.osw-sales-summary span,
.osw-module-summary span {
    color: #5c6979;
    font-size: 13px;
}

.osw-metrics small,
.osw-contact-summary article small,
.osw-theme-option small,
.osw-switch-row > span small {
    color: #758293;
    font-size: 11px;
}

.osw-companies-table td,
.osw-analysis-block p,
.osw-detail-item dd,
.osw-dossier-message p,
.osw-page-heading > div > p:last-child,
.osw-coming-soon > p {
    color: #4f5d6e;
    font-size: 13px;
}

.osw-company-domain,
.osw-detail-item dt,
.osw-companies-table th,
.osw-status-pill,
.osw-table-action {
    font-size: 11px;
}

.osw-status-pill {
    padding: 6px 10px;
}

.osw-two-column {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    margin-top: 24px;
}

.osw-module-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-top: 26px;
}

.osw-module-summary article {
    padding: 19px 20px;
    border: 1px solid rgba(225, 230, 237, 0.9);
    border-radius: 14px;
    background: var(--osw-white);
    box-shadow: var(--osw-shadow);
}

.osw-module-summary span,
.osw-module-summary strong {
    display: block;
}

.osw-module-summary strong {
    margin-top: 8px;
    color: var(--osw-navy);
    font-size: 26px;
}

.osw-module-summary strong.is-text {
    overflow: hidden;
    font-size: 15px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.osw-integration-strip {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-top: 24px;
}

.osw-integration-strip article {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 15px 16px;
    border: 1px solid var(--osw-border);
    border-radius: 13px;
    background: color-mix(in srgb, var(--osw-white) 92%, transparent);
}

.osw-integration-strip strong,
.osw-integration-strip small {
    display: block;
}

.osw-integration-strip strong {
    color: var(--osw-navy);
    font-size: 12px;
}

.osw-integration-strip small {
    margin-top: 3px;
    color: #6d7988;
    font-size: 10px;
    line-height: 1.45;
}

.osw-integration-dot {
    width: 10px;
    height: 10px;
    flex: 0 0 10px;
    border-radius: 50%;
}

.osw-integration-dot.is-ready {
    background: var(--osw-green);
    box-shadow: 0 0 0 4px rgba(29, 175, 115, 0.11);
}

.osw-integration-dot.is-pending {
    background: var(--osw-gold);
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--osw-gold) 15%, transparent);
}

.osw-marketing-creator,
.osw-calendar-creator {
    margin-top: 18px;
    border-color: color-mix(in srgb, var(--osw-gold) 40%, var(--osw-border));
}

.osw-marketing-creator form,
.osw-calendar-creator form,
.osw-two-column form {
    margin-top: 22px;
}

.osw-plain-button {
    display: grid;
    width: 36px;
    height: 36px;
    place-items: center;
    padding: 0;
    color: #5e6b7c;
    border: 0;
    border-radius: 50%;
    background: #f0f3f6;
    font: inherit;
    font-size: 21px;
    cursor: pointer;
}

.osw-platform-fieldset {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 15px;
    border: 1px solid var(--osw-border);
    border-radius: 11px;
}

.osw-platform-fieldset legend {
    padding: 0 6px;
    color: #4a5869;
    font-size: 12px;
    font-weight: 700;
}

.osw-platform-fieldset label,
.osw-check-row {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #4f5d6e;
    font-size: 12px;
    cursor: pointer;
}

.osw-platform-fieldset input,
.osw-check-row input {
    width: 17px;
    height: 17px;
    accent-color: var(--osw-navy);
}

.osw-inline-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
}

.osw-campaign-list,
.osw-calendar-list {
    display: grid;
    gap: 15px;
    margin-top: 18px;
}

.osw-campaign-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
}

.osw-campaign-heading h2 {
    margin-top: 10px;
}

.osw-campaign-heading small {
    display: block;
    margin-top: 6px;
    color: #667486;
    font-size: 11px;
}

.osw-campaign-content {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-top: 22px;
}

.osw-campaign-block {
    padding: 16px;
    border: 1px solid #e7ebf0;
    border-radius: 12px;
    background: #fafbfd;
}

.osw-campaign-block h3 {
    margin: 0 0 8px;
    color: var(--osw-navy);
    font-size: 12px;
}

.osw-campaign-block p {
    margin: 0;
    color: #526071;
    font-size: 12px;
    line-height: 1.65;
    white-space: pre-line;
}

.osw-campaign-status-ready {
    color: #765604;
    background: #fff3cf;
}

.osw-campaign-status-approved {
    color: #14734d;
    background: #e2f6ed;
}

.osw-legal-note {
    margin: 15px 0 0;
    padding: 11px 13px;
    color: #735a1b;
    border-radius: 10px;
    background: #fff8e6;
    font-size: 11px;
}

.osw-connection-state,
.osw-settings-state {
    display: inline-flex;
    align-items: center;
    padding: 8px 11px;
    color: #6e5a25;
    border-radius: 20px;
    background: #fff4d8;
    font-size: 11px;
    font-weight: 700;
}

.osw-connection-state.is-ready,
.osw-settings-state.is-ready {
    color: #14734d;
    background: #e2f6ed;
}

.osw-compact-form {
    gap: 12px;
}

.osw-module-list-card {
    margin-top: 18px;
}

.osw-mail-list {
    margin-top: 18px;
}

.osw-mail-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 16px;
    padding: 14px 0;
    border-bottom: 1px solid #edf0f4;
}

.osw-mail-item:last-child {
    border-bottom: 0;
}

.osw-mail-item strong,
.osw-mail-item span {
    display: block;
}

.osw-mail-item strong {
    color: var(--osw-navy);
    font-size: 13px;
}

.osw-mail-item div > span,
.osw-mail-item time {
    margin-top: 4px;
    color: #718091;
    font-size: 11px;
}

.osw-mail-status-sent {
    color: #14734d;
    background: #e2f6ed;
}

.osw-mail-status-failed {
    color: #9b3131;
    background: #fde9e9;
}

.osw-module-empty-text {
    margin: 20px 0 0;
    color: #6d7988;
    font-size: 13px;
}

.osw-calendar-event {
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr) auto;
    align-items: center;
    gap: 18px;
    padding: 19px 21px;
}

.osw-calendar-date {
    display: grid;
    min-height: 58px;
    place-items: center;
    align-content: center;
    border-radius: 13px;
    background: color-mix(in srgb, var(--osw-gold) 17%, white);
}

.osw-calendar-date strong,
.osw-calendar-date span {
    display: block;
    color: var(--osw-navy);
    text-align: center;
}

.osw-calendar-date strong {
    font-size: 24px;
    line-height: 1;
}

.osw-calendar-date span {
    margin-top: 4px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
}

.osw-calendar-event h2 {
    font-size: 16px;
}

.osw-calendar-event p {
    margin: 6px 0 0;
    color: #596779;
    font-size: 12px;
}

.osw-calendar-event small {
    display: block;
    margin-top: 7px;
    color: #6b7889;
    font-size: 11px;
}

.osw-calendar-link {
    display: inline-flex;
    margin-top: 9px;
    color: var(--osw-navy);
    font-size: 11px;
    font-weight: 750;
    text-decoration: none;
}

.osw-calendar-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.osw-color-control input[type="color"] {
    width: 52px;
}

.osw-assistant-view:not([hidden]) {
    display: flex;
    height: 100dvh;
    max-width: none;
    flex-direction: column;
    overflow: hidden;
    padding-top: 24px;
    padding-bottom: 24px;
}

.osw-assistant-view .osw-page-heading {
    flex: 0 0 auto;
}

.osw-assistant-workspace {
    display: flex;
    min-height: 0;
    flex: 1 1 auto;
    flex-direction: column;
}

.osw-assistant-workspace .osw-chat-messages {
    min-height: 0;
    max-height: none;
    flex: 1 1 auto;
    overflow-y: auto;
}

.osw-assistant-workspace .osw-chat-quick-actions,
.osw-assistant-workspace .osw-chat-form,
.osw-assistant-workspace .osw-ai-voice-note,
.osw-assistant-workspace .osw-form-error {
    flex: 0 0 auto;
}

@media (max-width: 1100px) {
    .osw-two-column {
        grid-template-columns: 1fr;
    }

    .osw-integration-strip {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px) {
    html,
    body.osw-app-page {
        width: 100%;
        min-height: 100dvh;
        margin: 0 !important;
        overflow-x: hidden;
    }

    .osw-app {
        width: 100%;
        min-height: 100dvh;
    }

    .osw-main {
        min-width: 0;
        min-height: 100dvh;
    }

    .osw-mobile-bar {
        position: sticky;
        top: 0;
        z-index: 35;
        display: flex;
        min-height: calc(58px + env(safe-area-inset-top));
        align-items: center;
        justify-content: space-between;
        padding: env(safe-area-inset-top) 16px 0;
        border-bottom: 1px solid var(--osw-border);
        background: rgba(255, 255, 255, 0.94);
        backdrop-filter: blur(18px);
    }

    .osw-mobile-bar strong {
        color: var(--osw-navy);
        font-size: 14px;
    }

    .osw-mobile-status {
        display: grid;
        width: 38px;
        height: 38px;
        place-items: center;
    }

    .osw-mobile-status span {
        width: 9px;
        height: 9px;
        border-radius: 50%;
        background: var(--osw-green);
        box-shadow: 0 0 0 4px rgba(29, 175, 115, 0.11);
    }

    .osw-menu-toggle {
        display: grid;
        width: 42px;
        height: 42px;
        place-items: center;
        margin: 0;
        font-size: 22px;
    }

    .osw-sidebar {
        z-index: 60;
        width: min(84vw, 300px);
        padding-right: 18px;
        padding-left: 18px;
    }

    .osw-app.is-menu-open .osw-mobile-backdrop {
        position: fixed;
        inset: 0;
        z-index: 55;
        display: block;
        width: 100%;
        height: 100%;
        padding: 0;
        border: 0;
        background: rgba(2, 15, 29, 0.5);
        backdrop-filter: blur(3px);
    }

    .osw-logo {
        padding: 0 8px;
    }

    .osw-nav {
        gap: 4px;
        margin-top: 25px;
    }

    .osw-nav a {
        min-height: 46px;
        font-size: 14px;
    }

    .osw-content {
        width: 100%;
        max-width: none;
        padding-top: 22px;
        padding-right: max(16px, env(safe-area-inset-right));
        padding-bottom: max(36px, env(safe-area-inset-bottom));
        padding-left: max(16px, env(safe-area-inset-left));
    }

    .osw-welcome {
        align-items: stretch;
    }

    .osw-welcome-actions {
        align-items: stretch;
        width: 100%;
    }

    .osw-office-meta {
        justify-content: space-between;
    }

    .osw-page-heading h1,
    .osw-welcome h1,
    .osw-dossier-heading h1 {
        font-size: 30px;
        letter-spacing: -1px;
    }

    .osw-metrics,
    .osw-module-summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .osw-module-summary article:last-child:nth-child(odd) {
        grid-column: 1 / -1;
    }

    .osw-card {
        border-radius: 15px;
    }

    .osw-table-wrap {
        overflow: visible;
    }

    .osw-companies-table,
    .osw-companies-table tbody,
    .osw-companies-table tr,
    .osw-companies-table td {
        display: block;
        width: 100%;
        min-width: 0;
    }

    .osw-companies-table thead {
        display: none;
    }

    .osw-companies-table tbody {
        display: grid;
        gap: 12px;
        padding: 13px;
        background: var(--osw-bg);
    }

    .osw-companies-table tr {
        padding: 14px;
        border: 1px solid var(--osw-border);
        border-radius: 13px;
        background: var(--osw-white);
        box-shadow: 0 9px 24px rgba(23, 34, 52, 0.05);
    }

    .osw-companies-table td {
        display: grid;
        grid-template-columns: minmax(86px, 0.42fr) minmax(0, 1fr);
        align-items: start;
        gap: 10px;
        padding: 7px 0;
        border: 0;
        font-size: 13px;
    }

    .osw-companies-table td::before {
        color: #7b8795;
        font-size: 10px;
        font-weight: 750;
        letter-spacing: 0.3px;
        text-transform: uppercase;
    }

    .osw-companies-table:not(.osw-sales-table) td:nth-child(1)::before { content: "Firma"; }
    .osw-companies-table:not(.osw-sales-table) td:nth-child(2)::before { content: "Branża"; }
    .osw-companies-table:not(.osw-sales-table) td:nth-child(3)::before { content: "Lokalizacja"; }
    .osw-companies-table:not(.osw-sales-table) td:nth-child(4)::before { content: "Potencjał"; }
    .osw-companies-table:not(.osw-sales-table) td:nth-child(5)::before { content: "Status"; }
    .osw-companies-table:not(.osw-sales-table) td:nth-child(6)::before { content: "Dodano"; }
    .osw-companies-table:not(.osw-sales-table) td:nth-child(7)::before { content: "Działanie"; }

    .osw-sales-table td:nth-child(1)::before { content: "Firma"; }
    .osw-sales-table td:nth-child(2)::before { content: "Etap"; }
    .osw-sales-table td:nth-child(3)::before { content: "Potencjał"; }
    .osw-sales-table td:nth-child(4)::before { content: "Następne działanie"; }
    .osw-sales-table td:nth-child(5)::before { content: "Termin"; }
    .osw-sales-table td:nth-child(6)::before { content: "Działanie"; }

    .osw-action-cell {
        display: grid !important;
    }

    .osw-action-cell .osw-table-action {
        width: 100%;
        min-height: 40px;
    }

    .osw-campaign-heading,
    .osw-mail-item,
    .osw-calendar-event {
        align-items: stretch;
        grid-template-columns: 1fr;
        flex-direction: column;
    }

    .osw-campaign-heading {
        display: flex;
    }

    .osw-campaign-heading .osw-primary-button {
        width: 100%;
    }

    .osw-campaign-content {
        grid-template-columns: 1fr;
    }

    .osw-calendar-event {
        display: grid;
    }

    .osw-calendar-date {
        width: 64px;
    }

    .osw-calendar-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .osw-calendar-actions .osw-secondary-button {
        width: 100%;
    }

    .osw-mail-item {
        display: grid;
        gap: 8px;
    }

    .osw-platform-fieldset {
        align-items: flex-start;
        flex-direction: column;
    }

    .osw-inline-actions {
        align-items: stretch;
        flex-direction: column-reverse;
    }

    .osw-inline-actions .osw-primary-button,
    .osw-inline-actions .osw-secondary-button {
        width: 100%;
        min-height: 46px;
    }

    .osw-assistant-view:not([hidden]) {
        height: calc(100dvh - 58px - env(safe-area-inset-top));
        padding-top: 14px;
        padding-bottom: max(10px, env(safe-area-inset-bottom));
    }

    .osw-assistant-view .osw-page-heading {
        gap: 8px;
    }

    .osw-assistant-view .osw-page-heading > div > p:last-child,
    .osw-assistant-view .osw-eyebrow,
    .osw-assistant-view .osw-assistant-ready,
    .osw-assistant-view .osw-ai-voice-note {
        display: none;
    }

    .osw-assistant-view .osw-page-heading h1 {
        font-size: 25px;
    }

    .osw-assistant-heading-tools {
        position: absolute;
        top: calc(69px + env(safe-area-inset-top));
        right: max(16px, env(safe-area-inset-right));
        width: auto;
    }

    .osw-voice-toggle {
        min-height: 36px;
        padding: 0 11px;
    }

    .osw-voice-toggle span:last-child {
        display: none;
    }

    .osw-assistant-workspace {
        margin-top: 10px;
        padding: 0;
        overflow: hidden;
    }

    .osw-assistant-workspace .osw-chat-messages {
        padding: 15px 12px;
    }

    .osw-chat-quick-actions {
        padding: 9px 11px;
        overflow-x: auto;
        flex-wrap: nowrap;
    }

    .osw-chat-quick-actions button {
        flex: 0 0 auto;
        white-space: nowrap;
    }

    .osw-chat-form {
        gap: 9px;
        padding: 10px;
        border-top: 1px solid var(--osw-border);
        background: var(--osw-white);
    }

    .osw-chat-form textarea {
        min-height: 54px;
        max-height: 110px;
    }

    .osw-chat-actions button {
        min-height: 44px;
    }

    .osw-settings-grid,
    .osw-form-grid {
        grid-template-columns: 1fr;
    }

    .osw-color-control {
        width: 100%;
    }
}

@media (max-width: 420px) {
    .osw-metrics,
    .osw-module-summary {
        grid-template-columns: 1fr;
    }

    .osw-module-summary article:last-child:nth-child(odd) {
        grid-column: auto;
    }

    .osw-metrics article {
        min-height: 108px;
    }
}

@media (max-width: 520px) {
    .osw-metrics {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .osw-metrics article {
        padding: 17px 15px;
    }

    .osw-metrics strong {
        font-size: 25px;
    }

    .osw-card {
        padding: 20px;
    }

    .osw-login-page {
        padding: 16px;
    }

    .osw-login-card {
        padding: 27px 22px;
    }
}

[hidden] {
    display: none !important;
}

.screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.osw-page-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
}

.osw-page-heading h1,
.osw-coming-soon h1 {
    margin: 0;
    color: var(--osw-navy);
    font-size: clamp(30px, 3vw, 40px);
    letter-spacing: -1.4px;
}

.osw-page-heading > div > p:last-child,
.osw-coming-soon > p {
    margin: 9px 0 0;
    color: var(--osw-muted);
    font-size: 14px;
}

.osw-contact-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-top: 30px;
}

.osw-contact-summary article {
    padding: 17px 20px;
    border: 1px solid rgba(225, 230, 237, 0.9);
    border-radius: 14px;
    background: var(--osw-white);
    box-shadow: var(--osw-shadow);
}

.osw-contact-summary span {
    display: block;
    color: var(--osw-muted);
    font-size: 11px;
    font-weight: 650;
}

.osw-contact-summary strong {
    display: block;
    margin-top: 7px;
    color: var(--osw-navy);
    font-size: 24px;
}

.osw-contacts-card {
    margin-top: 16px;
    padding: 0;
    overflow: hidden;
}

.osw-contact-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 18px 20px;
    border-bottom: 1px solid var(--osw-border);
}

.osw-search-field {
    display: flex;
    max-width: 520px;
    min-width: 280px;
    flex: 1;
    align-items: center;
    gap: 10px;
    padding: 0 13px;
    border: 1px solid var(--osw-border);
    border-radius: 10px;
    background: #fafbfd;
}

.osw-search-field > span {
    color: #8995a4;
    font-size: 18px;
}

.osw-search-field input,
.osw-status-filter select,
.osw-form-field input,
.osw-form-field select {
    color: var(--osw-text);
    border: 0;
    background: transparent;
    font: inherit;
    outline: none;
}

.osw-search-field input {
    width: 100%;
    height: 42px;
    font-size: 12px;
}

.osw-status-filter select {
    height: 42px;
    padding: 0 35px 0 13px;
    border: 1px solid var(--osw-border);
    border-radius: 10px;
    background-color: #fafbfd;
    font-size: 12px;
}

.osw-table-wrap {
    width: 100%;
    overflow-x: auto;
}

.osw-companies-table {
    width: 100%;
    min-width: 870px;
    border-collapse: collapse;
}

.osw-companies-table th,
.osw-companies-table td {
    padding: 15px 18px;
    border-bottom: 1px solid #edf0f4;
    text-align: left;
    vertical-align: middle;
}

.osw-companies-table th {
    color: #8c97a5;
    background: #fbfcfd;
    font-size: 10px;
    font-weight: 750;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.osw-companies-table td {
    color: #526071;
    font-size: 12px;
}

.osw-companies-table tbody tr {
    transition: background 140ms ease;
}

.osw-companies-table tbody tr:hover {
    background: #fbfcfe;
}

.osw-company-name {
    display: block;
    color: var(--osw-navy);
    font-size: 13px;
    font-weight: 750;
}

.osw-company-domain {
    display: block;
    margin-top: 3px;
    color: #929dab;
    font-size: 10px;
}

.osw-score {
    display: flex;
    align-items: center;
    gap: 8px;
}

.osw-score-track {
    width: 54px;
    height: 5px;
    overflow: hidden;
    border-radius: 10px;
    background: #edf0f4;
}

.osw-score-track span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--osw-gold), #e0c477);
}

.osw-status-pill {
    display: inline-flex;
    align-items: center;
    padding: 5px 8px;
    border-radius: 20px;
    font-size: 10px;
    font-weight: 700;
    white-space: nowrap;
}

.osw-status-new {
    color: #315b80;
    background: #eaf2f9;
}

.osw-status-analyzing {
    color: #7b5b0a;
    background: #fff5d8;
}

.osw-status-analysis_failed {
    color: #9b3131;
    background: #fde9e9;
}

.osw-status-ready_for_sales {
    color: #14734d;
    background: #e2f6ed;
}

.osw-status-rejected {
    color: #8a4350;
    background: #f9e9ec;
}

.osw-status-handed_to_sales {
    color: #594b91;
    background: #eeeafc;
}

.osw-contacts-empty {
    padding: 74px 25px;
    text-align: center;
}

.osw-contacts-empty .osw-empty-icon {
    margin: 0 auto;
}

.osw-contacts-empty h3 {
    margin: 15px 0 7px;
    color: var(--osw-navy);
    font-size: 17px;
}

.osw-contacts-empty p {
    margin: 0 0 20px;
    color: var(--osw-muted);
    font-size: 12px;
}

.osw-contacts-loading {
    display: flex;
    min-height: 200px;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: var(--osw-muted);
    font-size: 12px;
}

.osw-contacts-loading span {
    width: 15px;
    height: 15px;
    border: 2px solid #dfe5ec;
    border-top-color: var(--osw-navy);
    border-radius: 50%;
    animation: osw-spin 700ms linear infinite;
}

@keyframes osw-spin {
    to {
        transform: rotate(360deg);
    }
}

.osw-pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    color: var(--osw-muted);
    border-top: 1px solid var(--osw-border);
    font-size: 11px;
}

.osw-pagination button {
    padding: 7px 10px;
    color: #4f5d6f;
    border: 1px solid var(--osw-border);
    border-radius: 8px;
    background: #fff;
    font: inherit;
    font-weight: 650;
    cursor: pointer;
}

.osw-pagination button:disabled {
    opacity: 0.45;
    cursor: default;
}

.osw-secondary-button {
    display: inline-flex;
    min-height: 40px;
    align-items: center;
    justify-content: center;
    padding: 0 16px;
    color: var(--osw-navy);
    border: 1px solid #d9e0e8;
    border-radius: 10px;
    background: #fff;
    font: inherit;
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
}

.osw-primary-button:disabled,
.osw-secondary-button:disabled {
    opacity: 0.55;
    cursor: wait;
}

.osw-coming-soon {
    min-height: 430px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    text-align: center;
}

.osw-coming-soon .osw-secondary-button {
    margin-top: 22px;
}

.osw-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: grid;
    place-items: center;
    padding: 20px;
}

.osw-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(3, 18, 34, 0.58);
    backdrop-filter: blur(5px);
}

.osw-modal-card {
    position: relative;
    z-index: 1;
    width: min(100%, 650px);
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    padding: 30px;
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 35px 100px rgba(0, 20, 45, 0.28);
}

.osw-modal-card h2 {
    margin: 0;
    color: var(--osw-navy);
    font-size: 25px;
    letter-spacing: -0.7px;
}

.osw-modal-intro {
    margin: 8px 0 23px;
    color: var(--osw-muted);
    font-size: 12px;
}

.osw-modal-close {
    position: absolute;
    top: 16px;
    right: 18px;
    width: 34px;
    height: 34px;
    color: #6f7b8b;
    border: 0;
    border-radius: 50%;
    background: #f1f4f7;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
}

.osw-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.osw-form-field {
    display: block;
}

.osw-form-field-wide {
    grid-column: 1 / -1;
}

.osw-form-field > span {
    display: block;
    margin-bottom: 7px;
    color: #4a5869;
    font-size: 11px;
    font-weight: 700;
}

.osw-form-field input,
.osw-form-field select {
    width: 100%;
    height: 44px;
    padding: 0 12px;
    border: 1px solid var(--osw-border);
    border-radius: 10px;
    background: #fafbfd;
    font-size: 12px;
}

.osw-form-field input:focus,
.osw-form-field select:focus {
    border-color: #91a9c2;
    box-shadow: 0 0 0 3px rgba(0, 33, 71, 0.06);
}

.osw-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 24px;
}

.osw-form-error {
    margin: 15px 0 0;
    padding: 10px 12px;
    color: #8d3340;
    border-radius: 9px;
    background: #fae9ec;
    font-size: 11px;
}

.osw-toast {
    position: fixed;
    right: 25px;
    bottom: 25px;
    z-index: 1200;
    max-width: 360px;
    padding: 13px 17px;
    color: #fff;
    border-radius: 11px;
    background: #123a2b;
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.19);
    font-size: 12px;
    font-weight: 650;
}

body.osw-modal-open {
    overflow: hidden;
}

@media (max-width: 760px) {
    .osw-page-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .osw-page-heading .osw-primary-button {
        width: 100%;
    }

    .osw-contact-summary {
        grid-template-columns: 1fr;
    }

    .osw-contact-toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .osw-search-field {
        max-width: none;
        min-width: 0;
    }

    .osw-status-filter select {
        width: 100%;
    }

    .osw-form-grid {
        grid-template-columns: 1fr;
    }

    .osw-form-field-wide {
        grid-column: auto;
    }
}

@media (max-width: 520px) {
    .osw-modal {
        padding: 10px;
    }

    .osw-modal-card {
        max-height: calc(100vh - 20px);
        padding: 25px 18px 20px;
        border-radius: 16px;
    }

    .osw-modal-actions {
        flex-direction: column-reverse;
    }

    .osw-modal-actions button {
        width: 100%;
    }
}

.osw-table-action {
    padding: 7px 10px;
    color: var(--osw-navy);
    border: 1px solid #dbe2ea;
    border-radius: 8px;
    background: #fff;
    font: inherit;
    font-size: 10px;
    font-weight: 750;
    cursor: pointer;
}

.osw-table-action:hover {
    border-color: #aebdcd;
    background: #f6f8fb;
}

.osw-action-cell {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.osw-table-action.is-retry {
    color: #8a5d00;
    border-color: #efdca8;
    background: #fff9e9;
}

.osw-back-link {
    display: inline-flex;
    margin-bottom: 25px;
    color: #647284;
    font-size: 12px;
    font-weight: 650;
    text-decoration: none;
}

.osw-dossier-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 25px;
}

.osw-dossier-heading h1 {
    margin: 0;
    color: var(--osw-navy);
    font-size: clamp(30px, 3vw, 40px);
    letter-spacing: -1.4px;
}

.osw-dossier-heading > div > p:last-child {
    margin: 8px 0 0;
    color: var(--osw-muted);
    font-size: 13px;
}

.osw-dossier-status {
    display: block;
    min-width: 220px;
}

.osw-dossier-status > span {
    display: block;
    margin-bottom: 6px;
    color: #778395;
    font-size: 10px;
    font-weight: 750;
    letter-spacing: 0.4px;
    text-transform: uppercase;
}

.osw-dossier-status select {
    width: 100%;
    height: 43px;
    padding: 0 35px 0 12px;
    color: var(--osw-navy);
    border: 1px solid #d9e0e8;
    border-radius: 10px;
    background: #fff;
    font: inherit;
    font-size: 12px;
    font-weight: 700;
    outline: none;
}

.osw-dossier-status select:focus {
    border-color: #91a9c2;
    box-shadow: 0 0 0 3px rgba(0, 33, 71, 0.06);
}

.osw-dossier-status select:disabled {
    opacity: 0.6;
}

.osw-dossier-loading {
    display: flex;
    min-height: 330px;
    align-items: center;
    justify-content: center;
    gap: 11px;
    color: var(--osw-muted);
    font-size: 12px;
}

.osw-dossier-loading span {
    width: 17px;
    height: 17px;
    border: 2px solid #dfe5ec;
    border-top-color: var(--osw-navy);
    border-radius: 50%;
    animation: osw-spin 700ms linear infinite;
}

.osw-dossier {
    margin-top: 28px;
}

.osw-dossier-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 16px;
    padding: 5px;
    overflow-x: auto;
    border: 1px solid var(--osw-border);
    border-radius: 13px;
    background: rgba(255, 255, 255, 0.75);
}

.osw-dossier-tabs button {
    min-height: 38px;
    padding: 0 14px;
    color: #6a7788;
    border: 0;
    border-radius: 9px;
    background: transparent;
    font: inherit;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
    cursor: pointer;
}

.osw-dossier-tabs button:hover {
    color: var(--osw-navy);
}

.osw-dossier-tabs button.is-active {
    color: #fff;
    background: var(--osw-navy);
    box-shadow: 0 8px 20px rgba(0, 33, 71, 0.14);
}

.osw-dossier-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(285px, 0.55fr);
    gap: 16px;
}

.osw-detail-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0;
    margin: 23px 0 0;
    border-top: 1px solid #edf0f4;
}

.osw-detail-item {
    min-width: 0;
    padding: 15px 12px 15px 0;
    border-bottom: 1px solid #edf0f4;
}

.osw-detail-item:nth-child(even) {
    padding-left: 14px;
}

.osw-detail-item dt {
    margin: 0 0 5px;
    color: #8b96a4;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
}

.osw-detail-item dd {
    min-width: 0;
    margin: 0;
    overflow: hidden;
    color: #3f4d60;
    font-size: 12px;
    font-weight: 600;
    text-overflow: ellipsis;
}

.osw-detail-item a {
    color: var(--osw-navy);
    text-decoration: none;
}

.osw-potential-card {
    display: flex;
    min-height: 250px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    text-align: center;
}

.osw-potential-card > strong {
    margin-top: 12px;
    color: var(--osw-navy);
    font-size: 46px;
    letter-spacing: -2px;
}

.osw-potential-track {
    width: min(100%, 220px);
    height: 7px;
    margin: 13px 0 15px;
    overflow: hidden;
    border-radius: 20px;
    background: #edf0f4;
}

.osw-potential-track span {
    display: block;
    width: 0;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--osw-gold), #e0c477);
    transition: width 260ms ease;
}

.osw-potential-card > p:last-child {
    max-width: 290px;
    margin: 0;
    color: var(--osw-muted);
    font-size: 11px;
    line-height: 1.6;
}

.osw-dossier-empty {
    display: flex;
    min-height: 255px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    text-align: center;
}

.osw-dossier-empty .osw-empty-icon {
    margin: 0 auto;
}

.osw-dossier-empty h3 {
    margin: 15px 0 7px;
    color: var(--osw-navy);
    font-size: 16px;
}

.osw-dossier-empty p {
    max-width: 470px;
    margin: 0;
    color: var(--osw-muted);
    font-size: 12px;
    line-height: 1.65;
}

.osw-analysis-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 15px;
}

.osw-analysis-summary {
    margin: 22px 0 0;
    color: #49576a;
    font-size: 13px;
    line-height: 1.75;
    white-space: pre-line;
}

.osw-analysis-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-top: 22px;
}

.osw-analysis-block {
    padding: 17px;
    border: 1px solid #e8ecf1;
    border-radius: 12px;
    background: #fafbfd;
}

.osw-analysis-block h3 {
    margin: 0 0 8px;
    color: var(--osw-navy);
    font-size: 12px;
}

.osw-analysis-block p {
    margin: 0;
    color: #667385;
    font-size: 11px;
    line-height: 1.65;
    white-space: pre-line;
}

.osw-people-list {
    display: grid;
    gap: 10px;
    margin-top: 20px;
}

.osw-person-card,
.osw-document-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 13px 14px;
    border: 1px solid #e8ecf1;
    border-radius: 11px;
    background: #fafbfd;
}

.osw-person-card strong,
.osw-person-card span,
.osw-document-item strong,
.osw-document-item span {
    display: block;
}

.osw-person-card strong,
.osw-document-item strong {
    color: var(--osw-navy);
    font-size: 12px;
}

.osw-person-card span,
.osw-document-item span {
    margin-top: 3px;
    color: #8995a4;
    font-size: 10px;
}

.osw-person-details {
    flex: 0 0 auto;
    text-align: right;
}

.osw-sales-details {
    margin-top: 22px;
}

.osw-timeline {
    margin-top: 23px;
}

.osw-timeline-item {
    position: relative;
    display: grid;
    grid-template-columns: 18px minmax(0, 1fr);
    gap: 11px;
    padding-bottom: 21px;
}

.osw-timeline-item:not(:last-child)::before {
    position: absolute;
    top: 13px;
    bottom: 0;
    left: 5px;
    width: 1px;
    background: #dfe5eb;
    content: "";
}

.osw-timeline-marker {
    position: relative;
    z-index: 1;
    width: 11px;
    height: 11px;
    margin-top: 3px;
    border: 3px solid #e8d9ad;
    border-radius: 50%;
    background: var(--osw-gold);
}

.osw-timeline-item p {
    margin: 0;
    color: #445266;
    font-size: 12px;
    line-height: 1.55;
}

.osw-timeline-item time {
    display: block;
    margin-top: 4px;
    color: #98a2af;
    font-size: 10px;
}

.osw-document-list {
    display: grid;
    gap: 10px;
    margin-top: 22px;
}

.osw-document-item .osw-secondary-button {
    min-height: 34px;
    flex: 0 0 auto;
}

.osw-dossier-error {
    min-height: 340px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    margin-top: 28px;
    text-align: center;
}

.osw-dossier-error:not([hidden]) {
    display: flex;
}

.osw-dossier-error h2 {
    margin-top: 15px;
}

.osw-dossier-error p {
    margin: 8px 0 20px;
    color: var(--osw-muted);
    font-size: 12px;
}

@media (max-width: 900px) {
    .osw-dossier-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px) {
    .osw-dossier-heading {
        align-items: stretch;
        flex-direction: column;
    }

    .osw-dossier-status {
        min-width: 0;
    }

    .osw-analysis-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 520px) {
    .osw-detail-list {
        grid-template-columns: 1fr;
    }

    .osw-detail-item:nth-child(even) {
        padding-left: 0;
    }

    .osw-person-card,
    .osw-document-item {
        align-items: flex-start;
        flex-direction: column;
    }

    .osw-person-details {
        text-align: left;
    }
}

.osw-system-status.is-working span {
    background: var(--osw-gold);
    box-shadow: 0 0 0 4px rgba(200, 165, 80, 0.14);
    animation: osw-pulse 1.6s ease-in-out infinite;
}

@keyframes osw-pulse {
    50% {
        opacity: 0.45;
        transform: scale(0.8);
    }
}

.osw-heading-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.osw-contact-summary,
.osw-sales-summary {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.osw-assistant-input input {
    width: 100%;
    min-width: 0;
    color: var(--osw-text);
    border: 0;
    background: transparent;
    font: inherit;
    font-size: 12px;
    outline: none;
}

.osw-report-loading {
    display: flex;
    min-height: 225px;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: var(--osw-muted);
    font-size: 12px;
}

.osw-report-loading span,
.osw-chat-loading span {
    width: 15px;
    height: 15px;
    border: 2px solid #dfe5ec;
    border-top-color: var(--osw-navy);
    border-radius: 50%;
    animation: osw-spin 700ms linear infinite;
}

.osw-report-summary {
    margin: 20px 0 15px;
    color: #5d6b7c;
    font-size: 12px;
    line-height: 1.6;
}

.osw-report-metrics {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 7px;
    margin-bottom: 16px;
}

.osw-report-metric {
    padding: 9px;
    border: 1px solid #e8ecf1;
    border-radius: 9px;
    background: #fafbfd;
}

.osw-report-metric strong,
.osw-report-metric span {
    display: block;
}

.osw-report-metric strong {
    color: var(--osw-navy);
    font-size: 16px;
}

.osw-report-metric span {
    margin-top: 3px;
    color: #8995a4;
    font-size: 8px;
}

.osw-recommendation-list {
    display: grid;
    gap: 8px;
}

.osw-recommendation {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 12px 13px;
    color: #4f5d70;
    border: 1px solid #e6eaf0;
    border-radius: 10px;
    background: #fafbfd;
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.osw-recommendation.osw-priority-high {
    box-shadow: inset 3px 0 0 var(--osw-gold);
}

.osw-recommendation strong,
.osw-recommendation small {
    display: block;
}

.osw-recommendation strong {
    color: var(--osw-navy);
    font-size: 11px;
}

.osw-recommendation small {
    margin-top: 3px;
    color: #8995a4;
    font-size: 10px;
}

.osw-recommendation-arrow {
    color: var(--osw-gold);
    font-size: 17px;
}

.osw-assistant-ready {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #39725a;
    font-size: 11px;
    font-weight: 700;
}

.osw-assistant-ready > span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--osw-green);
}

.osw-assistant-ready.is-not-ready {
    color: #876714;
}

.osw-assistant-ready.is-not-ready > span {
    background: var(--osw-gold);
}

.osw-assistant-heading-tools {
    display: flex;
    align-items: center;
    gap: 14px;
}

.osw-voice-toggle {
    display: inline-flex;
    min-height: 34px;
    align-items: center;
    gap: 7px;
    padding: 0 11px;
    color: #6b7787;
    border: 1px solid var(--osw-border);
    border-radius: 20px;
    background: #fff;
    font: inherit;
    font-size: 10px;
    font-weight: 700;
    cursor: pointer;
}

.osw-voice-toggle.is-active {
    color: #14734d;
    border-color: #bfe8d6;
    background: #eaf8f1;
}

.osw-assistant-workspace {
    display: flex;
    min-height: calc(100vh - 215px);
    flex-direction: column;
    margin-top: 28px;
    padding: 0;
    overflow: hidden;
}

.osw-chat-messages {
    display: flex;
    min-height: 430px;
    max-height: calc(100vh - 370px);
    flex: 1;
    flex-direction: column;
    gap: 16px;
    padding: 28px;
    overflow-y: auto;
    background:
        radial-gradient(circle at 90% 8%, rgba(200, 165, 80, 0.07), transparent 26%),
        #fff;
}

.osw-chat-loading {
    display: flex;
    flex: 1;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: var(--osw-muted);
    font-size: 12px;
}

.osw-chat-message {
    display: flex;
    max-width: 82%;
    align-items: flex-start;
    gap: 10px;
}

.osw-chat-message.is-user {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.osw-chat-avatar {
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    flex: 0 0 34px;
    color: var(--osw-navy);
    border-radius: 11px;
    background: linear-gradient(145deg, #f4e4ae, var(--osw-gold));
    font-size: 9px;
    font-weight: 850;
}

.osw-chat-message.is-user .osw-chat-avatar {
    color: #fff;
    background: var(--osw-navy);
}

.osw-chat-bubble {
    padding: 13px 15px;
    border: 1px solid #e7ebf0;
    border-radius: 4px 14px 14px;
    background: #f8fafc;
}

.osw-chat-message.is-user .osw-chat-bubble {
    color: #fff;
    border-color: var(--osw-navy);
    border-radius: 14px 4px 14px 14px;
    background: var(--osw-navy);
}

.osw-chat-bubble p {
    margin: 0;
    font-size: 12px;
    line-height: 1.7;
    white-space: pre-line;
}

.osw-chat-bubble time {
    display: block;
    margin-top: 6px;
    color: #98a2af;
    font-size: 9px;
}

.osw-chat-message.is-user time {
    color: rgba(255, 255, 255, 0.58);
}

.osw-listen-button {
    margin-top: 8px;
    padding: 0;
    color: #607086;
    border: 0;
    background: transparent;
    font: inherit;
    font-size: 9px;
    font-weight: 750;
    cursor: pointer;
}

.osw-listen-button:hover {
    color: var(--osw-navy);
}

.osw-chat-message.is-typing .osw-chat-bubble {
    color: var(--osw-muted);
    font-size: 11px;
}

.osw-chat-quick-actions {
    display: flex;
    gap: 7px;
    padding: 13px 20px;
    overflow-x: auto;
    border-top: 1px solid var(--osw-border);
    background: #fbfcfd;
}

.osw-chat-quick-actions button {
    padding: 8px 11px;
    color: #566477;
    border: 1px solid #dfe5eb;
    border-radius: 20px;
    background: #fff;
    font: inherit;
    font-size: 10px;
    font-weight: 650;
    white-space: nowrap;
    cursor: pointer;
}

.osw-chat-form {
    display: flex;
    align-items: flex-end;
    gap: 11px;
    padding: 16px 20px 20px;
    border-top: 1px solid var(--osw-border);
}

.osw-chat-form textarea {
    width: 100%;
    min-height: 48px;
    max-height: 140px;
    resize: vertical;
    padding: 13px 14px;
    color: var(--osw-text);
    border: 1px solid var(--osw-border);
    border-radius: 12px;
    background: #fafbfd;
    font: inherit;
    font-size: 12px;
    line-height: 1.5;
    outline: none;
}

.osw-chat-form textarea:focus {
    border-color: #91a9c2;
    box-shadow: 0 0 0 3px rgba(0, 33, 71, 0.06);
}

.osw-chat-form .osw-primary-button {
    flex: 0 0 auto;
}

.osw-chat-actions {
    display: flex;
    flex: 0 0 auto;
    align-items: stretch;
    gap: 8px;
}

.osw-chat-mic {
    display: inline-flex;
    min-width: 78px;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 0 13px;
    color: var(--osw-navy);
    border: 1px solid #cfd9e4;
    border-radius: 11px;
    background: #fff;
    font: inherit;
    font-size: 10px;
    font-weight: 800;
    cursor: pointer;
    transition: 160ms ease;
}

.osw-chat-mic svg {
    width: 17px;
    height: 17px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.osw-chat-mic:hover {
    border-color: #91a9c2;
    background: #f5f8fb;
}

.osw-chat-mic.is-recording {
    color: #fff;
    border-color: #b93434;
    background: #b93434;
    box-shadow: 0 0 0 4px rgba(185, 52, 52, 0.12);
    animation: osw-pulse 1.2s ease-in-out infinite;
}

.osw-chat-mic:disabled {
    opacity: 0.55;
    cursor: wait;
}

.osw-ai-voice-note {
    margin: -12px 20px 14px;
    color: #8995a5;
    font-size: 9px;
    text-align: right;
}

.osw-assistant-workspace > .osw-form-error {
    margin: 0 20px 18px;
}

.osw-sales-summary {
    display: grid;
    gap: 14px;
    margin-top: 30px;
}

.osw-sales-summary article {
    padding: 17px 20px;
    border: 1px solid rgba(225, 230, 237, 0.9);
    border-radius: 14px;
    background: var(--osw-white);
    box-shadow: var(--osw-shadow);
}

.osw-sales-summary span {
    display: block;
    color: var(--osw-muted);
    font-size: 11px;
    font-weight: 650;
}

.osw-sales-summary strong {
    display: block;
    margin-top: 7px;
    color: var(--osw-navy);
    font-size: 24px;
}

.osw-sales-card {
    margin-top: 16px;
    padding: 0;
    overflow: hidden;
}

.osw-sales-table {
    min-width: 900px;
}

.osw-sales-status {
    min-width: 135px;
    height: 34px;
    padding: 0 8px;
    color: #4c5a6d;
    border: 1px solid #dfe5eb;
    border-radius: 8px;
    background: #fff;
    font: inherit;
    font-size: 10px;
    font-weight: 700;
}

.osw-sales-next-action {
    max-width: 260px;
    line-height: 1.5;
}

.osw-client-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin-top: 30px;
}

.osw-client-card {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr) auto;
    align-items: center;
    gap: 15px;
}

.osw-client-mark {
    display: grid;
    width: 48px;
    height: 48px;
    place-items: center;
    color: var(--osw-navy);
    border-radius: 14px;
    background: linear-gradient(145deg, #f4e4ae, var(--osw-gold));
    font-size: 18px;
    font-weight: 850;
}

.osw-client-card h2 {
    margin: 0;
    font-size: 15px;
}

.osw-client-card p {
    margin: 4px 0 7px;
    color: var(--osw-muted);
    font-size: 10px;
}

.osw-client-value {
    color: #39725a;
    font-size: 11px;
    font-weight: 750;
}

.osw-clients-empty {
    display: flex;
    min-height: 380px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    margin-top: 30px;
    text-align: center;
}

.osw-clients-empty h2 {
    margin: 15px 0 7px;
}

.osw-clients-empty p {
    max-width: 470px;
    margin: 0;
    color: var(--osw-muted);
    font-size: 12px;
    line-height: 1.65;
}

.osw-settings-form {
    display: grid;
    gap: 16px;
    margin-top: 30px;
}

.osw-settings-form .osw-card h2 {
    margin-bottom: 22px;
}

.osw-settings-grid {
    gap: 18px;
}

.osw-form-field textarea {
    width: 100%;
    min-height: 88px;
    resize: vertical;
    padding: 12px;
    color: var(--osw-text);
    border: 1px solid var(--osw-border);
    border-radius: 10px;
    background: #fafbfd;
    font: inherit;
    font-size: 12px;
    line-height: 1.6;
    outline: none;
}

.osw-form-field textarea:focus {
    border-color: #91a9c2;
    box-shadow: 0 0 0 3px rgba(0, 33, 71, 0.06);
}

.osw-settings-note {
    margin: -12px 0 20px;
    color: var(--osw-muted);
    font-size: 11px;
}

.osw-onboarding-assistant {
    position: relative;
    overflow: hidden;
    color: #e8eef5;
    border-color: rgba(200, 165, 80, 0.2);
    background:
        radial-gradient(circle at 100% 0, rgba(200, 165, 80, 0.2), transparent 34%),
        linear-gradient(145deg, #0a3152 0%, #07192d 62%, #061425 100%);
    box-shadow: 0 22px 60px rgba(2, 23, 43, 0.18);
}

.osw-onboarding-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
}

.osw-settings-form .osw-onboarding-heading h2 {
    margin: 0 0 8px;
    color: #fff;
    font-size: 23px;
}

.osw-onboarding-heading p:not(.osw-eyebrow) {
    max-width: 720px;
    margin: 0;
    color: #aebdcb;
    font-size: 11px;
    line-height: 1.65;
}

.osw-onboarding-reset {
    flex: 0 0 auto;
    padding: 8px 11px;
    color: #cbd6df;
    border: 1px solid rgba(255, 255, 255, 0.13);
    border-radius: 9px;
    background: rgba(255, 255, 255, 0.06);
    font: inherit;
    font-size: 9px;
    font-weight: 700;
    cursor: pointer;
}

.osw-onboarding-reset:disabled {
    opacity: 0.5;
    cursor: wait;
}

.osw-onboarding-messages {
    min-height: 220px;
    max-height: 390px;
    margin-top: 22px;
    overflow-y: auto;
    padding: 19px;
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 15px;
    background: rgba(2, 16, 29, 0.35);
    scrollbar-color: rgba(200, 165, 80, 0.45) transparent;
}

.osw-onboarding-message {
    display: flex;
    align-items: flex-end;
    gap: 9px;
    margin-top: 12px;
}

.osw-onboarding-message:first-child {
    margin-top: 0;
}

.osw-onboarding-message.is-user {
    justify-content: flex-end;
}

.osw-onboarding-avatar {
    display: grid;
    width: 29px;
    height: 29px;
    place-items: center;
    flex: 0 0 29px;
    color: #07192d;
    border-radius: 9px;
    background: linear-gradient(145deg, #f4e4ae, var(--osw-gold));
    font-size: 9px;
    font-weight: 850;
}

.osw-onboarding-message.is-user .osw-onboarding-avatar {
    color: #d9e3ec;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.08);
}

.osw-onboarding-message p {
    max-width: min(78%, 720px);
    margin: 0;
    padding: 12px 14px;
    color: #dce6ef;
    border-radius: 13px 13px 13px 4px;
    background: rgba(255, 255, 255, 0.08);
    font-size: 11px;
    line-height: 1.65;
    white-space: pre-wrap;
}

.osw-onboarding-message.is-user p {
    color: #07192d;
    border-radius: 13px 13px 4px;
    background: #fff;
}

.osw-onboarding-loading {
    display: flex;
    min-height: 180px;
    align-items: center;
    justify-content: center;
    gap: 9px;
    color: #9fb0bf;
    font-size: 10px;
}

.osw-onboarding-loading span {
    width: 17px;
    height: 17px;
    border: 2px solid rgba(255, 255, 255, 0.16);
    border-top-color: var(--osw-gold);
    border-radius: 50%;
    animation: osw-spin 0.8s linear infinite;
}

.osw-onboarding-compose {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 11px;
    margin-top: 12px;
}

.osw-onboarding-compose textarea {
    width: 100%;
    min-height: 78px;
    resize: vertical;
    padding: 13px 14px;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 13px;
    background: rgba(255, 255, 255, 0.07);
    font: inherit;
    font-size: 12px;
    line-height: 1.55;
    outline: none;
}

.osw-onboarding-compose textarea::placeholder {
    color: #8fa2b4;
}

.osw-onboarding-compose textarea:focus {
    border-color: rgba(200, 165, 80, 0.75);
    box-shadow: 0 0 0 3px rgba(200, 165, 80, 0.1);
}

.osw-onboarding-compose textarea:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.osw-onboarding-actions {
    display: grid;
    width: 112px;
    gap: 8px;
}

.osw-voice-button,
.osw-onboarding-send {
    display: flex;
    min-height: 35px;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 0 12px;
    border: 0;
    border-radius: 10px;
    font: inherit;
    font-size: 10px;
    font-weight: 800;
    cursor: pointer;
}

.osw-voice-button {
    color: #e4edf4;
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: rgba(255, 255, 255, 0.08);
}

.osw-onboarding-send {
    color: #07192d;
    background: linear-gradient(145deg, #f2dea0, var(--osw-gold));
}

.osw-voice-button:disabled,
.osw-onboarding-send:disabled {
    opacity: 0.48;
    cursor: wait;
}

.osw-mic-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--osw-gold);
    box-shadow: 0 0 0 4px rgba(200, 165, 80, 0.1);
}

.osw-voice-button.is-recording {
    color: #fff;
    border-color: rgba(255, 111, 111, 0.4);
    background: rgba(175, 38, 38, 0.42);
}

.osw-voice-button.is-recording .osw-mic-dot {
    background: #ff6f6f;
    box-shadow: 0 0 0 5px rgba(255, 111, 111, 0.12);
    animation: osw-pulse 1.2s ease-in-out infinite;
}

.osw-onboarding-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-top: 10px;
    color: #9eafbe;
    font-size: 9px;
}

.osw-onboarding-footer > span {
    color: #e2c778;
    font-weight: 750;
}

.osw-onboarding-footer > span.is-complete {
    color: #65d3a1;
}

.osw-onboarding-footer small {
    font-size: 9px;
    text-align: right;
}

.osw-onboarding-error {
    margin: 12px 0 0;
    padding: 10px 12px;
    color: #ffe5e5;
    border: 1px solid rgba(255, 120, 120, 0.26);
    border-radius: 9px;
    background: rgba(151, 32, 32, 0.34);
    font-size: 10px;
}

.osw-company-lookup {
    position: relative;
    z-index: 4;
    overflow: visible;
    border-color: rgba(200, 165, 80, 0.38);
    background:
        radial-gradient(circle at 100% 0, rgba(200, 165, 80, 0.13), transparent 34%),
        #fff;
}

.osw-company-search {
    position: relative;
    display: flex;
    align-items: center;
    max-width: 760px;
}

.osw-company-search > span {
    position: absolute;
    left: 17px;
    z-index: 1;
    color: var(--osw-gold);
    font-size: 22px;
    pointer-events: none;
}

.osw-company-search input {
    width: 100%;
    min-height: 54px;
    padding: 0 18px 0 49px;
    color: var(--osw-text);
    border: 1px solid #d8dee7;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 10px 30px rgba(0, 33, 71, 0.07);
    font: inherit;
    font-size: 14px;
    outline: none;
}

.osw-company-search input:focus {
    border-color: var(--osw-gold);
    box-shadow: 0 0 0 4px rgba(200, 165, 80, 0.12), 0 12px 32px rgba(0, 33, 71, 0.08);
}

.osw-company-search input:disabled {
    color: #9ba6b4;
    background: #f5f7f9;
    cursor: not-allowed;
}

.osw-company-suggestions {
    position: relative;
    z-index: 20;
    width: min(760px, 100%);
    margin-top: 6px;
    overflow: hidden;
    border: 1px solid #e0e5eb;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 22px 55px rgba(0, 33, 71, 0.16);
}

.osw-company-suggestion {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 14px 16px;
    color: var(--osw-text);
    border: 0;
    border-bottom: 1px solid #edf0f3;
    background: #fff;
    text-align: left;
    cursor: pointer;
}

.osw-company-suggestion:last-child {
    border-bottom: 0;
}

.osw-company-suggestion:hover,
.osw-company-suggestion:focus-visible {
    background: #f7f9fc;
    outline: none;
}

.osw-company-suggestion > span:first-child {
    display: grid;
    gap: 4px;
}

.osw-company-suggestion strong {
    color: var(--osw-navy);
    font-size: 12px;
}

.osw-company-suggestion small {
    color: var(--osw-muted);
    font-size: 10px;
}

.osw-company-suggestion-arrow {
    margin-left: 14px;
    color: var(--osw-gold);
    font-size: 17px;
}

.osw-company-suggestion-empty {
    padding: 17px;
    color: var(--osw-muted);
    font-size: 11px;
    line-height: 1.55;
}

.osw-google-attribution {
    display: flex;
    justify-content: flex-end;
    min-height: 28px;
    padding: 7px 12px;
    background: #fff;
}

.osw-google-attribution img {
    display: block;
    width: 120px;
    height: 14px;
    object-fit: contain;
}

.osw-company-progress {
    display: flex;
    align-items: center;
    gap: 13px;
    max-width: 760px;
    margin-top: 14px;
    padding: 14px 16px;
    border: 1px solid #e2e8ee;
    border-radius: 13px;
    background: #f8fafc;
}

.osw-company-progress[hidden] {
    display: none;
}

.osw-company-progress-spinner {
    width: 25px;
    height: 25px;
    flex: 0 0 25px;
    border: 3px solid #e5eaf0;
    border-top-color: var(--osw-gold);
    border-radius: 50%;
    animation: osw-spin 0.8s linear infinite;
}

.osw-company-progress div {
    display: grid;
    gap: 3px;
}

.osw-company-progress strong {
    color: var(--osw-navy);
    font-size: 11px;
}

.osw-company-progress small {
    color: var(--osw-muted);
    font-size: 10px;
}

.osw-company-lookup-status {
    min-height: 16px;
    margin: 11px 0 0;
    color: var(--osw-muted);
    font-size: 10px;
    line-height: 1.55;
}

.osw-company-lookup-status.is-success {
    color: #14734d;
}

.osw-company-lookup-status.is-error {
    color: #a83232;
}

.osw-company-manual-note {
    margin: 4px 0 0;
    color: #9aa3af;
    font-size: 9px;
}

@keyframes osw-spin {
    to {
        transform: rotate(360deg);
    }
}

.osw-settings-state,
.osw-api-state {
    display: inline-flex;
    align-items: center;
    padding: 7px 10px;
    color: #876714;
    border-radius: 20px;
    background: #fff5d8;
    font-size: 10px;
    font-weight: 700;
}

.osw-settings-state.is-ready,
.osw-api-state.is-ready {
    color: #14734d;
    background: #e2f6ed;
}

.osw-api-state {
    margin-top: 18px;
}

.osw-settings-actions {
    display: flex;
    justify-content: flex-end;
}

.osw-personalization-card {
    overflow: visible;
}

.osw-color-control {
    display: flex;
    min-height: 43px;
    align-items: center;
    gap: 11px;
    padding: 6px 10px;
    border: 1px solid #dfe4eb;
    border-radius: 10px;
    background: #fafbfd;
}

.osw-color-control input {
    width: 38px;
    height: 30px;
    padding: 0;
    border: 0;
    border-radius: 7px;
    background: transparent;
    cursor: pointer;
}

.osw-color-control span {
    color: var(--osw-muted);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
}

.osw-theme-fieldset {
    margin: 24px 0 0;
    padding: 0;
    border: 0;
}

.osw-theme-fieldset legend {
    margin-bottom: 11px;
    color: var(--osw-navy);
    font-size: 11px;
    font-weight: 750;
}

.osw-theme-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 11px;
}

.osw-theme-option {
    position: relative;
    display: block;
    padding: 10px;
    border: 1px solid #e0e5eb;
    border-radius: 13px;
    background: #fff;
    cursor: pointer;
    transition: 160ms ease;
}

.osw-theme-option:hover,
.osw-theme-option:has(input:checked) {
    border-color: var(--osw-gold);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--osw-gold) 14%, transparent);
}

.osw-theme-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.osw-theme-option strong,
.osw-theme-option small {
    display: block;
}

.osw-theme-option strong {
    margin-top: 9px;
    color: var(--osw-navy);
    font-size: 10px;
}

.osw-theme-option small {
    margin-top: 3px;
    color: var(--osw-muted);
    font-size: 9px;
}

.osw-theme-preview {
    position: relative;
    display: block;
    height: 74px;
    overflow: hidden;
    border-radius: 9px;
    background: #f2f4f7;
}

.osw-theme-preview i {
    position: absolute;
    inset: 0 auto 0 0;
    width: 29%;
    background: #07192d;
}

.osw-theme-preview b,
.osw-theme-preview em {
    position: absolute;
    right: 8%;
    left: 37%;
    border-radius: 5px;
    background: #fff;
    box-shadow: 0 4px 12px rgba(20, 33, 51, 0.08);
}

.osw-theme-preview b {
    top: 17%;
    height: 24%;
}

.osw-theme-preview em {
    top: 50%;
    height: 34%;
}

.osw-theme-preview::after {
    position: absolute;
    top: 13%;
    left: 9%;
    width: 10%;
    aspect-ratio: 1;
    border-radius: 4px;
    background: var(--osw-gold);
    content: "";
}

.osw-theme-option.is-executive .osw-theme-preview {
    background: #f7f8fa;
}

.osw-theme-option.is-executive .osw-theme-preview i {
    background: #fff;
    box-shadow: inset -1px 0 #dfe4ea;
}

.osw-theme-option.is-executive .osw-theme-preview::after {
    background: #415d78;
}

.osw-theme-option.is-modern .osw-theme-preview {
    background: #111a2b;
}

.osw-theme-option.is-modern .osw-theme-preview i {
    background: #080d18;
}

.osw-theme-option.is-modern .osw-theme-preview b,
.osw-theme-option.is-modern .osw-theme-preview em {
    background: #1d2b43;
}

.osw-theme-option.is-modern .osw-theme-preview::after {
    background: #4b8dff;
}

.osw-theme-option.is-warm .osw-theme-preview {
    background: #f5efe7;
}

.osw-theme-option.is-warm .osw-theme-preview i {
    background: #45362e;
}

.osw-theme-option.is-warm .osw-theme-preview b,
.osw-theme-option.is-warm .osw-theme-preview em {
    background: #fffdf9;
}

.osw-theme-option.is-warm .osw-theme-preview::after {
    background: #b88b5b;
}

.osw-switch-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-top: 20px;
    padding: 14px 15px;
    border: 1px solid #e2e7ed;
    border-radius: 12px;
    background: #fafbfd;
    cursor: pointer;
}

.osw-switch-row > span strong,
.osw-switch-row > span small {
    display: block;
}

.osw-switch-row > span strong {
    color: var(--osw-navy);
    font-size: 11px;
}

.osw-switch-row > span small {
    margin-top: 4px;
    color: var(--osw-muted);
    font-size: 9px;
}

.osw-switch-row input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.osw-switch-row i {
    position: relative;
    width: 42px;
    height: 24px;
    flex: 0 0 42px;
    border-radius: 30px;
    background: #cbd3dc;
    transition: 160ms ease;
}

.osw-switch-row i::after {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 2px 7px rgba(20, 33, 51, 0.2);
    content: "";
    transition: 160ms ease;
}

.osw-switch-row input[type="checkbox"]:checked + i {
    background: var(--osw-gold);
}

.osw-switch-row input[type="checkbox"]:checked + i::after {
    transform: translateX(18px);
}

.osw-contact-summary article small {
    display: block;
    margin-top: 5px;
    color: var(--osw-muted);
    font-size: 9px;
}

.osw-app[data-osw-theme="executive_light"] {
    --osw-navy: #1f3851;
    --osw-navy-deep: #172a3d;
    --osw-bg: #f5f7fa;
    --osw-text: #253444;
}

.osw-app[data-osw-theme="executive_light"] .osw-sidebar {
    color: #20364b;
    border-right: 1px solid #dfe5eb;
    background: #fff;
}

.osw-app[data-osw-theme="executive_light"] .osw-logo span,
.osw-app[data-osw-theme="executive_light"] .osw-nav a,
.osw-app[data-osw-theme="executive_light"] .osw-sidebar-footer a {
    color: #6f7f8e;
}

.osw-app[data-osw-theme="executive_light"] .osw-nav a:hover,
.osw-app[data-osw-theme="executive_light"] .osw-nav a.is-active {
    color: #172a3d;
    background: #eef2f6;
}

.osw-app[data-osw-theme="executive_light"] .osw-sidebar-footer {
    border-top-color: #e2e7ec;
}

.osw-app[data-osw-theme="executive_light"] .osw-user-avatar {
    color: #20364b;
    border-color: #d9e0e7;
    background: #eef2f6;
}

.osw-app[data-osw-theme="modern_tech"] {
    --osw-navy: #0d2d5b;
    --osw-navy-deep: #071322;
    --osw-blue: #337cff;
    --osw-bg: #edf3fb;
    --osw-text: #13253b;
}

.osw-app[data-osw-theme="modern_tech"] .osw-sidebar {
    background: linear-gradient(165deg, #07101f, #0a1b34 58%, #0d274a);
}

.osw-app[data-osw-theme="modern_tech"] .osw-topbar {
    border-bottom-color: #d8e4f2;
    background: rgba(246, 250, 255, 0.9);
}

.osw-app[data-osw-theme="modern_tech"] .osw-card {
    box-shadow: 0 18px 50px rgba(15, 55, 103, 0.09);
}

.osw-app[data-osw-theme="warm_premium"] {
    --osw-navy: #4b382d;
    --osw-navy-deep: #33251f;
    --osw-bg: #f5efe7;
    --osw-text: #3f352f;
    --osw-muted: #81736a;
    --osw-border: #e7ddd2;
}

.osw-app[data-osw-theme="warm_premium"] .osw-sidebar {
    background: linear-gradient(170deg, #4a392f, #352820 65%, #2b211c);
}

.osw-app[data-osw-theme="warm_premium"] .osw-topbar {
    border-bottom-color: #e8ddd2;
    background: rgba(255, 252, 247, 0.9);
}

.osw-app[data-osw-theme="warm_premium"] .osw-card {
    border-color: #eadfd4;
    background: #fffdf9;
}

.osw-find-modal-card {
    width: min(100%, 560px);
}

.osw-dossier-messages {
    margin-top: 27px;
    padding-top: 22px;
    border-top: 1px solid #edf0f4;
}

.osw-dossier-messages > h3 {
    margin: 0 0 12px;
    color: var(--osw-navy);
    font-size: 14px;
}

.osw-dossier-message {
    margin-top: 10px;
    padding: 17px;
    border: 1px solid #e7ebf0;
    border-radius: 12px;
    background: #fafbfd;
}

.osw-message-type {
    display: block;
    margin: 0;
    color: var(--osw-gold);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.7px;
    text-transform: uppercase;
}

.osw-message-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 7px;
}

.osw-message-header .osw-table-action {
    padding: 5px 8px;
    font-size: 9px;
}

.osw-dossier-message strong {
    display: block;
    color: var(--osw-navy);
    font-size: 12px;
}

.osw-dossier-message p {
    margin: 10px 0 0;
    color: #5d6b7c;
    font-size: 11px;
    line-height: 1.7;
    white-space: pre-line;
}

@media (max-width: 1000px) {
    .osw-contact-summary,
    .osw-sales-summary,
    .osw-client-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

@media (max-width: 760px) {
    .osw-heading-actions {
        width: 100%;
        align-items: stretch;
        flex-direction: column-reverse;
    }

    .osw-heading-actions .osw-secondary-button,
    .osw-heading-actions .osw-primary-button {
        width: 100%;
    }

    .osw-assistant-ready,
    .osw-settings-state {
        align-self: flex-start;
    }

    .osw-assistant-heading-tools {
        width: 100%;
        align-items: flex-start;
        flex-direction: column-reverse;
    }

    .osw-chat-messages {
        min-height: 390px;
        max-height: none;
        padding: 20px 16px;
    }

    .osw-chat-message {
        max-width: 94%;
    }

    .osw-chat-form {
        align-items: stretch;
        flex-direction: column;
    }

    .osw-chat-form .osw-primary-button {
        flex: 1;
    }

    .osw-chat-actions {
        width: 100%;
    }

    .osw-chat-mic {
        flex: 1;
    }

    .osw-ai-voice-note {
        margin-top: -10px;
        text-align: left;
    }

    .osw-onboarding-heading {
        flex-direction: column;
        gap: 14px;
    }

    .osw-onboarding-reset {
        min-height: 38px;
    }

    .osw-onboarding-messages {
        min-height: 260px;
        max-height: 52vh;
        padding: 15px;
    }

    .osw-onboarding-message p {
        max-width: 88%;
    }

    .osw-onboarding-footer {
        align-items: flex-start;
        flex-direction: column;
        gap: 5px;
    }

    .osw-onboarding-footer small {
        text-align: left;
    }

    .osw-client-card {
        grid-template-columns: 48px minmax(0, 1fr);
    }

    .osw-client-card .osw-secondary-button {
        grid-column: 1 / -1;
    }
}

@media (max-width: 520px) {
    .osw-contact-summary,
    .osw-sales-summary,
    .osw-client-grid {
        grid-template-columns: 1fr;
    }

    .osw-theme-grid {
        grid-template-columns: 1fr;
    }

    .osw-chat-avatar {
        width: 30px;
        height: 30px;
        flex-basis: 30px;
    }

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

    .osw-onboarding-compose {
        grid-template-columns: 1fr;
    }

    .osw-onboarding-actions {
        display: flex;
        width: 100%;
    }

    .osw-voice-button,
    .osw-onboarding-send {
        min-height: 44px;
        flex: 1;
    }

    .osw-onboarding-message p {
        max-width: calc(100% - 38px);
    }
}

@media (max-width: 760px) {
    html,
    body.osw-app-page {
        min-height: 100dvh;
        overscroll-behavior-y: none;
    }

    .osw-sidebar {
        height: 100dvh;
        padding-top: max(24px, env(safe-area-inset-top));
        padding-bottom: max(18px, env(safe-area-inset-bottom));
        box-shadow: 18px 0 60px rgba(2, 15, 29, 0.32);
    }

    .osw-topbar {
        position: sticky;
        top: 0;
        z-index: 12;
        height: 62px;
        padding-top: env(safe-area-inset-top);
    }

    .osw-menu-toggle {
        width: 44px;
        height: 44px;
        margin-left: -11px;
    }

    .osw-system-status {
        font-size: 10px;
    }

    .osw-content {
        padding-right: max(18px, env(safe-area-inset-right));
        padding-bottom: max(45px, env(safe-area-inset-bottom));
        padding-left: max(18px, env(safe-area-inset-left));
    }

    .osw-settings-actions .osw-primary-button {
        min-height: 48px;
    }

    .osw-toast {
        right: max(14px, env(safe-area-inset-right));
        bottom: max(14px, env(safe-area-inset-bottom));
        left: max(14px, env(safe-area-inset-left));
        max-width: none;
        text-align: center;
    }
}

/* Końcowe reguły układu aplikacji — muszą pozostać na końcu pliku. */
.osw-assistant-view:not([hidden]) {
    display: flex;
    height: 100dvh;
    max-width: none;
    flex-direction: column;
    overflow: hidden;
    padding-top: 24px;
    padding-bottom: 24px;
}

.osw-assistant-view .osw-assistant-workspace {
    display: flex;
    min-height: 0;
    flex: 1 1 auto;
    flex-direction: column;
    margin-top: 18px;
}

.osw-assistant-view .osw-chat-messages {
    min-height: 0;
    max-height: none;
    flex: 1 1 auto;
}

.osw-companies-table td,
.osw-analysis-block p,
.osw-detail-item dd,
.osw-dossier-message p {
    color: #4f5d6e;
    font-size: 13px;
}

.osw-companies-table th,
.osw-company-domain,
.osw-status-pill,
.osw-table-action {
    font-size: 11px;
}

@media (max-width: 760px) {
    .osw-content {
        padding-top: 22px;
        padding-right: max(16px, env(safe-area-inset-right));
        padding-bottom: max(36px, env(safe-area-inset-bottom));
        padding-left: max(16px, env(safe-area-inset-left));
    }

    .osw-assistant-view:not([hidden]) {
        height: calc(100dvh - 58px - env(safe-area-inset-top));
        padding-top: 14px;
        padding-bottom: max(10px, env(safe-area-inset-bottom));
    }

    .osw-assistant-view .osw-assistant-heading-tools {
        position: absolute;
        top: calc(69px + env(safe-area-inset-top));
        right: max(16px, env(safe-area-inset-right));
        width: auto;
        align-items: center;
        flex-direction: row;
    }

    .osw-assistant-view .osw-chat-messages {
        min-height: 0;
        max-height: none;
        padding: 15px 12px;
    }

    .osw-assistant-view .osw-chat-form {
        align-items: stretch;
        flex-direction: column;
        gap: 9px;
        padding: 10px;
    }

    .osw-assistant-view .osw-ai-voice-note {
        display: none;
    }
}

/* Ostateczna warstwa responsywna. Trzymamy ją na końcu, aby motyw i starsze reguły
   nie mogły ponownie wymusić desktopowych szerokości na telefonie. */
@media (max-width: 760px) {
    html,
    body.osw-app-page {
        width: 100%;
        min-width: 0;
        min-height: 100dvh;
        margin: 0 !important;
        overflow-x: hidden;
        background: var(--osw-bg);
    }

    body.osw-app-page > .wp-site-blocks,
    body.osw-app-page > header,
    body.osw-app-page > footer {
        display: none !important;
    }

    .osw-app,
    .osw-main {
        width: 100%;
        min-width: 0;
        min-height: 100dvh;
        margin: 0;
    }

    .osw-mobile-bar {
        position: sticky;
        top: 0;
        z-index: 35;
        display: flex;
        min-height: calc(58px + env(safe-area-inset-top));
        align-items: center;
        justify-content: space-between;
        padding: env(safe-area-inset-top) 16px 0;
        border-bottom: 1px solid var(--osw-border);
        background: rgba(255, 255, 255, 0.96);
        backdrop-filter: blur(18px);
    }

    .osw-sidebar {
        position: fixed;
        top: 0;
        bottom: 0;
        left: 0;
        z-index: 60;
        width: min(84vw, 300px);
        height: 100dvh;
        margin: 0;
        transform: translateX(-105%);
    }

    .osw-app.is-menu-open .osw-sidebar {
        transform: translateX(0);
    }

    .osw-app.is-menu-open .osw-mobile-backdrop {
        position: fixed;
        inset: 0;
        z-index: 55;
        display: block;
        width: 100%;
        height: 100%;
        padding: 0;
        border: 0;
        background: rgba(2, 15, 29, 0.5);
        backdrop-filter: blur(3px);
    }

    .osw-content {
        width: 100%;
        max-width: none;
        min-width: 0;
        padding: 22px max(16px, env(safe-area-inset-right))
            max(36px, env(safe-area-inset-bottom))
            max(16px, env(safe-area-inset-left));
    }

    .osw-welcome,
    .osw-page-heading,
    .osw-contact-toolbar,
    .osw-heading-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .osw-welcome-actions,
    .osw-search-field,
    .osw-status-filter,
    .osw-status-filter select {
        width: 100%;
        max-width: none;
        min-width: 0;
    }

    .osw-metrics,
    .osw-contact-summary,
    .osw-sales-summary,
    .osw-module-summary,
    .osw-client-grid,
    .osw-two-column,
    .osw-integration-strip,
    .osw-campaign-content,
    .osw-form-grid,
    .osw-settings-grid {
        grid-template-columns: 1fr;
    }

    .osw-table-wrap {
        overflow: visible;
    }

    .osw-companies-table,
    .osw-companies-table tbody,
    .osw-companies-table tr,
    .osw-companies-table td {
        display: block;
        width: 100%;
        min-width: 0;
    }

    .osw-companies-table thead {
        display: none;
    }

    .osw-companies-table tbody {
        display: grid;
        gap: 12px;
        padding: 13px;
        background: var(--osw-bg);
    }

    .osw-companies-table tr {
        padding: 14px;
        border: 1px solid var(--osw-border);
        border-radius: 13px;
        background: var(--osw-white);
        box-shadow: 0 9px 24px rgba(23, 34, 52, 0.05);
    }

    .osw-companies-table td {
        display: grid;
        grid-template-columns: minmax(84px, 0.42fr) minmax(0, 1fr);
        gap: 10px;
        padding: 7px 0;
        border: 0;
        font-size: 13px;
    }

    .osw-action-cell .osw-table-action,
    .osw-inline-actions .osw-primary-button,
    .osw-inline-actions .osw-secondary-button,
    .osw-calendar-actions .osw-secondary-button,
    .osw-heading-actions .osw-secondary-button,
    .osw-heading-actions .osw-primary-button {
        width: 100%;
        min-height: 44px;
    }

    .osw-campaign-heading,
    .osw-calendar-event,
    .osw-mail-item {
        align-items: stretch;
        grid-template-columns: 1fr;
    }

    .osw-campaign-heading,
    .osw-inline-actions,
    .osw-calendar-actions {
        flex-direction: column;
    }

    .osw-assistant-view:not([hidden]) {
        height: calc(100dvh - 58px - env(safe-area-inset-top));
        min-height: 0;
        overflow: hidden;
        padding-top: 14px;
        padding-bottom: max(10px, env(safe-area-inset-bottom));
    }

    .osw-assistant-view .osw-assistant-workspace {
        min-height: 0;
        margin-top: 10px;
        padding: 0;
        overflow: hidden;
    }

    .osw-assistant-view .osw-chat-messages {
        min-height: 0;
        max-height: none;
        flex: 1 1 auto;
        overflow-y: auto;
    }

    .osw-assistant-view .osw-chat-form {
        flex: 0 0 auto;
        padding: 10px;
    }
}

@media (min-width: 421px) and (max-width: 760px) {
    .osw-metrics,
    .osw-contact-summary,
    .osw-sales-summary,
    .osw-module-summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* OpenSmart One 3.1 — czytelność, poczta, kalendarz i marka klienta */
.osw-context-assistant-launcher[hidden],
.osw-mail-connection-toast[hidden] {
    display: none !important;
}

.osw-app {
    font-size: 14px;
}

.osw-analysis-block p,
.osw-analysis-summary,
.osw-company-domain,
.osw-detail-list dd,
.osw-companies-table td,
.osw-form-field input,
.osw-form-field select,
.osw-form-field textarea {
    font-size: 13px;
}

.osw-analysis-block p,
.osw-company-domain,
.osw-detail-list dd,
.osw-page-heading > div > p,
.osw-settings-note {
    color: #59687b;
}

.osw-client-brand {
    display: flex;
    align-items: center;
    gap: 11px;
    margin-bottom: 14px;
}

.osw-client-brand > strong {
    color: var(--osw-navy);
    font-size: 14px;
    font-weight: 800;
}

.osw-client-logo {
    display: grid;
    width: 48px;
    height: 48px;
    place-items: center;
    overflow: hidden;
    border: 1px solid #e1e7ee;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(16, 35, 58, .08);
    color: var(--osw-navy);
    font-weight: 850;
}

.osw-client-logo img,
.osw-user-avatar img,
.osw-brand-preview img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.osw-user-avatar {
    overflow: hidden;
}

.osw-user-avatar img {
    object-fit: cover;
}

.osw-brand-assets {
    display: grid;
    grid-template-columns: minmax(220px, .8fr) repeat(2, minmax(230px, 1fr));
    gap: 16px;
    align-items: stretch;
    margin-top: 25px;
    padding-top: 23px;
    border-top: 1px solid #e4e9ef;
}

.osw-brand-assets h3,
.osw-brand-assets p {
    margin: 0 0 7px;
}

.osw-brand-upload {
    position: relative;
    display: flex;
    gap: 13px;
    align-items: center;
    min-height: 92px;
    padding: 14px;
    overflow: hidden;
    border: 1px solid #dfe6ed;
    border-radius: 15px;
    background: #f9fbfd;
    cursor: pointer;
    transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

.osw-brand-upload:hover {
    transform: translateY(-1px);
    border-color: var(--osw-gold);
    box-shadow: 0 10px 28px rgba(20, 36, 56, .08);
}

.osw-brand-upload > span:last-of-type {
    display: grid;
    gap: 4px;
}

.osw-brand-upload small {
    color: #6f7c8d;
    line-height: 1.4;
}

.osw-brand-upload input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
}

.osw-brand-preview {
    display: grid;
    flex: 0 0 auto;
    width: 60px;
    height: 60px;
    place-items: center;
    overflow: hidden;
    border: 1px solid #dce4ec;
    border-radius: 14px;
    background: #fff;
    color: #68778a;
    font-size: 11px;
    font-weight: 800;
}

.osw-brand-preview.is-icon {
    border-radius: 50%;
}

.osw-onboarding-messages {
    border-color: rgba(7, 25, 45, .12);
    background: #eef3f8;
}

.osw-onboarding-message.is-assistant p {
    border-color: #dce4ec;
    background: #fff;
    color: #263548;
}

.osw-onboarding-message.is-user p {
    background: var(--osw-navy);
    color: #fff;
}

.osw-onboarding-messages .osw-onboarding-loading {
    color: #657487;
}

.osw-onboarding-compose textarea {
    border-color: rgba(255, 255, 255, .24);
    background: rgba(255, 255, 255, .11);
}

.osw-personalization-card {
    border-color: #dfe6ed;
    background: #fff;
}

.osw-mail-heading-right {
    position: relative;
    display: grid;
    justify-items: end;
    gap: 10px;
    min-width: min(100%, 600px);
}

.osw-mail-heading-actions {
    justify-content: flex-end;
    flex-wrap: wrap;
}

.osw-mail-account-identity {
    min-width: 230px;
}

.osw-mail-account-identity > span:not([hidden]) {
    display: grid;
    gap: 2px;
    min-height: 46px;
    padding: 8px 14px;
    border: 1px solid #dce4ec;
    border-radius: 13px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(19, 35, 54, .05);
}

.osw-mail-account-identity strong {
    color: var(--osw-navy);
    font-size: 12px;
}

.osw-mail-account-identity span span {
    color: #667589;
    font-size: 12px;
}

.osw-mail-account-identity select {
    width: 100%;
    min-width: 250px;
    min-height: 46px;
    padding: 0 42px 0 14px;
    border: 1px solid #dce4ec;
    border-radius: 13px;
    background-color: #fff;
    color: var(--osw-navy);
    font: inherit;
    font-weight: 750;
    box-shadow: 0 8px 24px rgba(19, 35, 54, .05);
}

.osw-mail-connection-toast {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    padding: 7px 12px;
    border: 1px solid #f0d899;
    border-radius: 999px;
    background: #fff8e5;
    color: #755a13;
    font-size: 12px;
    font-weight: 750;
    animation: osw-mail-state-in .25s ease both;
}

.osw-mail-connection-toast.is-ready {
    border-color: #bde7d3;
    background: #edf9f4;
    color: #08734a;
}

.osw-mail-connection-toast.is-ready::before {
    width: 7px;
    height: 7px;
    margin-right: 7px;
    border-radius: 50%;
    background: #1daf73;
    content: "";
}

@keyframes osw-mail-state-in {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}

.osw-module-list-card {
    padding: 0;
    overflow: hidden;
}

.osw-mail-list {
    display: grid;
    gap: 0;
}

.osw-mail-item {
    display: grid;
    grid-template-columns: 46px minmax(160px, .55fr) minmax(260px, 1.35fr) minmax(125px, auto);
    gap: 14px;
    align-items: center;
    min-height: 84px;
    padding: 15px 20px;
    border: 0;
    border-bottom: 1px solid #e7ebf0;
    background: #fff;
    color: #233246;
    transition: background .15s ease;
}

.osw-mail-item:last-child {
    border-bottom: 0;
}

.osw-mail-item:hover {
    background: #f8fafc;
}

.osw-mail-item.is-unread {
    border-left: 3px solid var(--osw-gold);
    background: #f5f8fc;
}

.osw-mail-avatar {
    display: grid !important;
    width: 42px;
    height: 42px;
    place-items: center;
    border-radius: 13px;
    background: #eaf0f6;
    color: var(--osw-navy) !important;
    font-size: 12px !important;
    font-weight: 850;
}

.osw-mail-correspondent,
.osw-mail-preview,
.osw-mail-meta {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.osw-mail-correspondent strong,
.osw-mail-preview strong {
    overflow: hidden;
    color: var(--osw-navy);
    font-size: 13px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.osw-mail-correspondent span,
.osw-mail-preview span,
.osw-mail-meta time {
    overflow: hidden;
    color: #6b788a;
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.osw-mail-preview span {
    max-width: 100%;
}

.osw-mail-meta {
    justify-items: end;
}

.osw-mail-attachment {
    padding: 3px 7px;
    border-radius: 999px;
    background: #eef2f6;
    color: #526175 !important;
    font-size: 10px !important;
    font-weight: 750;
}

.osw-calendar-board {
    margin-bottom: 18px;
}

.osw-calendar-board-heading {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    align-items: center;
    margin-bottom: 20px;
}

.osw-calendar-board-heading h2,
.osw-calendar-month h3 {
    margin: 0;
    color: var(--osw-navy);
}

.osw-calendar-navigation {
    display: flex;
    gap: 8px;
}

.osw-calendar-navigation button {
    min-height: 38px;
    padding: 0 13px;
    border: 1px solid #dae2eb;
    border-radius: 10px;
    background: #fff;
    color: var(--osw-navy);
    font-weight: 750;
    cursor: pointer;
}

.osw-calendar-months {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.osw-calendar-month {
    min-width: 0;
    padding: 15px;
    border: 1px solid #e1e7ee;
    border-radius: 15px;
    background: #fbfcfe;
}

.osw-calendar-month.is-current {
    border-color: color-mix(in srgb, var(--osw-gold) 55%, #e1e7ee);
    background: #fff;
    box-shadow: 0 10px 30px rgba(27, 43, 62, .06);
}

.osw-calendar-month h3 {
    margin-bottom: 12px;
    text-align: center;
    font-size: 14px;
    text-transform: capitalize;
}

.osw-calendar-weekdays,
.osw-calendar-days {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 4px;
}

.osw-calendar-weekdays {
    margin-bottom: 5px;
}

.osw-calendar-weekdays span {
    padding: 4px 0;
    color: #7a8797;
    font-size: 10px;
    font-weight: 800;
    text-align: center;
}

.osw-calendar-day {
    position: relative;
    display: grid;
    min-width: 0;
    min-height: 44px;
    place-items: center;
    padding: 4px 2px;
    border: 1px solid transparent;
    border-radius: 9px;
    background: transparent;
    color: #2d3c4e;
    cursor: pointer;
}

.osw-calendar-day:hover {
    border-color: #dbe3ec;
    background: #f0f4f8;
}

.osw-calendar-day.is-today {
    border-color: var(--osw-gold);
    color: var(--osw-navy);
    font-weight: 850;
}

.osw-calendar-day.has-events {
    background: #edf4fb;
}

.osw-calendar-event-markers {
    display: flex;
    gap: 2px;
    align-items: center;
    min-height: 5px;
}

.osw-calendar-event-markers i {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--osw-navy);
}

.osw-calendar-event-markers small {
    color: #526175;
    font-size: 8px;
}

.osw-company-google-picker {
    position: relative;
    margin-bottom: 18px;
    padding: 15px;
    border: 1px solid #dfe6ed;
    border-radius: 14px;
    background: #f8fafc;
}

.osw-company-google-picker > p {
    min-height: 18px;
    margin: 7px 0 0;
    color: #697789;
    font-size: 12px;
}

.osw-company-google-picker > p.is-success {
    color: #08734a;
}

.osw-company-google-picker > p.is-error {
    color: #a63845;
}

.osw-company-google-picker .osw-company-suggestions {
    top: calc(100% - 15px);
    right: 15px;
    left: 15px;
}

.osw-sales-message-status {
    padding: 5px 9px;
    border-radius: 999px;
    background: #eef2f6;
    color: #5d6a7a;
    font-size: 10px;
    font-weight: 800;
}

.osw-sales-message-status.is-sent {
    background: #e6f7ef;
    color: #08734a;
}

.osw-sales-message-status.is-rejected {
    background: #f7e9eb;
    color: #9b3140;
}

.osw-sales-message-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin-top: 15px;
}

.osw-sales-message-actions button {
    min-height: 38px;
    padding: 0 14px;
}

.osw-plain-button.is-danger {
    color: #a63845;
}

.osw-context-assistant {
    border-left: 1px solid #dce4ec;
    background: #fff;
}

.osw-context-assistant header {
    background: linear-gradient(145deg, #fff, #f7f9fc);
}

.osw-context-assistant-body {
    background: #f2f5f8;
}

.osw-context-assistant form {
    padding: 14px;
    background: #fff;
}

.osw-context-compose {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) 46px auto;
    gap: 8px;
    align-items: end;
    padding: 7px;
    border: 1px solid #d9e2eb;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(20, 37, 56, .05);
}

.osw-context-assistant .osw-context-compose textarea {
    min-height: 48px;
    max-height: 130px;
    padding: 11px 8px;
    border: 0;
    outline: 0;
    resize: none;
}

.osw-context-mic,
.osw-context-send {
    display: grid;
    min-width: 46px;
    height: 46px;
    place-items: center;
    border: 0;
    border-radius: 12px;
    cursor: pointer;
}

.osw-context-mic {
    border: 1px solid #d8e1ea;
    background: #f5f8fb;
    color: var(--osw-navy);
}

.osw-context-mic svg {
    width: 21px;
    height: 21px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
}

.osw-context-mic.is-recording {
    border-color: #ef9aa5;
    background: #fff0f2;
    color: #b72d40;
    animation: osw-recording-pulse 1.2s ease infinite;
}

.osw-context-send {
    padding: 0 15px;
    background: var(--osw-navy);
    color: #fff;
    font-weight: 800;
}

@keyframes osw-recording-pulse {
    50% { box-shadow: 0 0 0 6px rgba(183, 45, 64, .1); }
}

@media (max-width: 1050px) {
    .osw-brand-assets {
        grid-template-columns: 1fr 1fr;
    }

    .osw-brand-assets > div:first-child {
        grid-column: 1 / -1;
    }

    .osw-mail-item {
        grid-template-columns: 42px minmax(150px, .6fr) minmax(220px, 1.2fr);
    }

    .osw-mail-meta {
        grid-column: 2 / -1;
        grid-template-columns: 1fr auto;
        justify-items: start;
    }
}

@media (max-width: 760px) {
    .osw-brand-assets {
        grid-template-columns: 1fr;
    }

    .osw-brand-assets > div:first-child {
        grid-column: auto;
    }

    .osw-mail-heading-right,
    .osw-mail-heading-actions,
    .osw-mail-account-identity,
    .osw-mail-account-identity select {
        width: 100%;
        min-width: 0;
    }

    .osw-mail-heading-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .osw-mail-account-identity {
        grid-column: 1 / -1;
    }

    .osw-mail-heading-actions .osw-icon-button {
        width: 100%;
    }

    .osw-mail-connection-toast {
        justify-self: stretch;
    }

    .osw-mail-item {
        grid-template-columns: 42px minmax(0, 1fr);
        gap: 10px;
        padding: 14px;
    }

    .osw-mail-correspondent,
    .osw-mail-preview,
    .osw-mail-meta {
        grid-column: 2;
    }

    .osw-mail-meta {
        display: flex;
        justify-content: space-between;
    }

    .osw-calendar-board-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .osw-calendar-navigation {
        width: 100%;
        justify-content: space-between;
    }

    .osw-calendar-months {
        grid-template-columns: 1fr;
    }

    .osw-calendar-month.is-previous,
    .osw-calendar-month.is-next {
        display: none;
    }

    .osw-calendar-day {
        min-height: 48px;
    }

    .osw-context-compose {
        grid-template-columns: minmax(0, 1fr) 46px;
    }

    .osw-context-send {
        grid-column: 1 / -1;
        width: 100%;
    }
}
