*,
*::before,
*::after {
    box-sizing: border-box;
}
.contact-detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
}

.contact-detail-companies .company-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 4px;
}

/* Tabs style on organization detail page: align with cost calculation tabs */
.org-detail-page .entity-tabs {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.org-detail-page .entity-tabs-controls {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 0;
    margin-bottom: 0;
    border-bottom: 1px solid #cfd4dc;
    overflow: visible;
    padding-bottom: 0;
}

.org-detail-page .tab-control {
    border: 1px solid transparent;
    border-bottom: none;
    border-radius: 10px 10px 0 0;
    background-color: transparent;
    color: #1f2937;
    padding: 11px 20px;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;
    cursor: pointer;
    margin-bottom: -1px;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.org-detail-page .tab-control + .tab-control {
    margin-left: 2px;
}

.org-detail-page .tab-control:hover {
    background-color: #eceff3;
}

.org-detail-page .tab-control.is-active {
    border-color: #cfd4dc;
    border-bottom-color: #eceff3;
    background-color: #eceff3;
    color: #1f2937;
}

.org-detail-page .tab-control:focus-visible {
    outline: 2px solid #60a5fa;
    outline-offset: -2px;
}

@media (max-width: 768px) {
    .org-detail-page .entity-tabs-controls {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        align-items: stretch;
        gap: 6px;
        border-bottom: none;
        overflow: visible;
        padding-bottom: 0;
    }

    .org-detail-page .tab-control {
        width: 100%;
        min-height: 44px;
        padding: 10px 12px;
        font-size: 13px;
        line-height: 1.25;
        white-space: normal;
        text-align: center;
        border: 1px solid #d1d5db;
        border-radius: 10px;
        margin-bottom: 0;
        background: #f8fafc;
    }

    .org-detail-page .tab-control + .tab-control {
        margin-left: 0;
    }

    .org-detail-page .tab-control.is-active {
        border-color: #93c5fd;
        background: #eff6ff;
        color: #1e3a8a;
    }
}

@media (max-width: 420px) {
    .org-detail-page .entity-tabs-controls {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .directory-page--clients .data-table tbody tr {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px 12px;
        align-items: start;
    }

    .directory-page--clients .data-table tbody td:not(:last-child) {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        justify-content: flex-start;
        gap: 4px;
        padding: 6px 0;
        border-bottom: none;
        min-width: 0;
    }

    .directory-page--clients .data-table tbody td:not(:last-child)::before {
        margin-right: 0;
        min-width: 0;
        font-size: 12px;
        line-height: 1.2;
    }

    .directory-page--clients .data-table tbody td:not(:last-child) > * {
        text-align: left;
        min-width: 0;
        word-break: break-word;
    }

    .directory-page--clients .data-table tbody td:nth-child(1),
    .directory-page--clients .data-table tbody td:last-child {
        grid-column: 1 / -1;
    }

    .directory-page--clients .data-table tbody td:nth-child(3) .badge {
        width: 100%;
    }

    .directory-page--clients .data-table tbody td:last-child {
        margin-top: 2px;
        padding-top: 10px;
        border-top: 1px solid #e5e7eb;
    }
}

@media (max-width: 360px) {
    .directory-page--clients .data-table tbody tr {
        grid-template-columns: 1fr;
    }

    .directory-page--clients .data-table tbody td:last-child {
        grid-column: auto;
    }
}

.contact-detail-page .page-header h1 {
    margin: 0 0 6px;
    line-height: 1.2;
}

.contact-detail-page .page-header {
    margin-bottom: 10px;
}

.contact-detail-page .page-actions .button {
    min-height: 36px;
    padding: 0 12px;
}

.contact-detail-page .entity-tabs {
    margin-top: 10px;
}

.contact-detail-page .entity-tabs-controls {
    margin-bottom: 10px;
}

.contact-detail-page .contact-detail-grid > div {
    min-width: 0;
}

.contact-detail-page .contact-detail-grid .value {
    word-break: break-word;
}

.order-history {
    margin-top: 24px;
}

.order-history-body {
    padding: 0;
}

.order-history-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.order-card {
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    padding: 16px;
    background: #ffffff;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.order-card-header {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: baseline;
}

.order-card-summary {
    width: 100%;
    border: none;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px;
    border-radius: 12px;
    cursor: pointer;
    font-size: 14px;
}

.order-card-summary .label {
    font-weight: 600;
}

.order-card-header strong {
    font-size: 18px;
    color: #1e3a8a;
}

.order-card-positions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.order-position {
    border: 1px solid #e4e4e7;
    border-radius: 10px;
    padding: 12px;
    background: #f8fafc;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.order-position-head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    font-weight: 600;
}

.order-position-roll {
    color: #4f46e5;
}

.order-position-meta {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    font-size: 13px;
    color: #4b5563;
}

.order-position-costs {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 13px;
    color: #1f2937;
}

.order-position-works {
    font-size: 13px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.order-position-works ul {
    margin: 0;
    padding-left: 18px;
}

.order-position-works li {
    list-style: disc;
}

.order-position-separator {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    color: #475569;
    letter-spacing: 0.04em;
    margin: 6px 0;
}

.order-history-empty {
    margin: 0;
    font-size: 14px;
}

.order-history--note .order-history-body {
    padding: 16px;
}

.order-card-details {
    display: none;
    margin-top: 8px;
}

.order-card.open .order-card-details {
    display: block;
}

.entity-tabs {
    margin-top: 24px;
}

.entity-tabs-controls {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.tab-control {
    border: 1px solid #d1d5db;
    border-radius: 999px;
    background: #ffffff;
    padding: 6px 18px;
    font-size: 14px;
    font-weight: 600;
    color: #1f2937;
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.tab-control.is-active {
    border-color: #4f46e5;
    background: #eef2ff;
    color: #312e81;
}

.tab-panel {
    display: none;
}

.tab-panel.is-active {
    display: block;
}
body {
    margin: 0;
    padding: 0;
    font-family:
        -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu,
        Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
    background-color: #f5f5f7;
    color: #1d1d1f;
    line-height: 1.6;
}

:root {
    --button-height: 32px;
    --page-side-padding: clamp(16px, 2vw, 28px);
    --topbar-sticky-offset: 66px;
}

a {
    color: #0071e3;
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: #005bb5;
    text-decoration: underline;
}

input[type="date"] {
    font-family: inherit;
    font-size: inherit;
    font-weight: inherit;
    line-height: inherit;
    color: inherit;
}

input[type="date"]::-webkit-date-and-time-value,
input[type="date"]::-webkit-datetime-edit,
input[type="date"]::-webkit-datetime-edit-day-field,
input[type="date"]::-webkit-datetime-edit-month-field,
input[type="date"]::-webkit-datetime-edit-year-field {
    font-family: inherit;
    font-size: inherit;
    font-weight: inherit;
    line-height: inherit;
    color: inherit;
}

header + main {
    margin-top: 10px;
}

.container {
    width: 100%;
    max-width: none;
    margin: 0 auto;
    padding-inline: var(--page-side-padding);
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 1200;
    background-color: rgba(245, 245, 247, 0.8);
    border-bottom: 1px solid #d2d2d7;
    backdrop-filter: saturate(180%) blur(20px);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.topbar-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-block: 14px;
    gap: 24px;
    flex-wrap: nowrap;
}

.topbar-brand {
    color: #1d1d1f;
    font-weight: 600;
    font-size: 18px;
    margin-top: -10px;
    display: flex;
    align-items: center;
}

.topbar-brand .crm-logo {
    height: 24px;
    width: auto;
    color: #1d1d1f;
}

.topbar-brand--image {
    margin-top: -10px;
    display: flex;
    align-items: center;
    padding: 0;
}

.topbar-logo-image {
    height: 40px;
    width: auto;
    max-width: 200px;
    object-fit: contain;
}


.topbar-nav {
    display: flex;
    gap: 16px;
    flex: 1;
}

.topbar-link {
    color: #1d1d1f;
    font-weight: 500;
    padding-bottom: 8px;
    border-bottom: 2px solid transparent;
}

.topbar-link.is-active {
    color: #0071e3;
    border-color: #0071e3;
}

.topbar-user {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #6e6e73;
    font-size: 14px;
}

.topbar-user-menu {
    position: relative;
}

.topbar-user-trigger {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: var(--button-height);
    height: var(--button-height);
    padding: 0 10px;
    box-sizing: border-box;
    border: 1px solid transparent;
    border-radius: 999px;
    background: transparent;
    color: inherit;
    cursor: pointer;
    font: inherit;
    transition:
        border-color 0.2s ease,
        background-color 0.2s ease,
        color 0.2s ease;
}

.topbar-user-trigger:hover,
.topbar-user-trigger:focus-visible {
    border-color: #d2d2d7;
    background-color: #ffffff;
    color: #1d1d1f;
    outline: none;
}

.topbar-user-caret {
    font-size: 12px;
    color: #9c9c9f;
}

.topbar-user-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 180px;
    background: #ffffff;
    border: 1px solid #d2d2d7;
    border-radius: 12px;
    padding: 8px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-4px);
    transition:
        opacity 0.2s ease,
        transform 0.2s ease,
        visibility 0.2s ease;
    z-index: 10;
}

.topbar-user-menu:focus-within .topbar-user-dropdown,
.topbar-user-menu:hover .topbar-user-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.topbar-user-dropdown form {
    margin: 0;
}

.topbar-user-action {
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    width: 100%;
    min-height: var(--button-height);
    height: var(--button-height);
    border: none;
    background: transparent;
    color: #1d1d1f;
    padding: 0 12px;
    border-radius: 8px;
    text-align: left;
    cursor: pointer;
    font: inherit;
    line-height: 1;
    transition:
        background-color 0.2s ease,
        color 0.2s ease;
}

.topbar-user-action.is-active {
    background-color: rgba(0, 113, 227, 0.08);
    color: #005bb5;
}

.topbar-user-action:hover,
.topbar-user-action:focus-visible {
    background-color: rgba(0, 113, 227, 0.08);
    color: #005bb5;
    outline: none;
}

.topbar-user-action--danger {
    color: #dc3545;
}

.topbar-user-action--danger:hover,
.topbar-user-action--danger:focus-visible {
    background-color: rgba(220, 53, 69, 0.1);
    color: #c82333;
    outline: none;
}

.topbar-user-dot {
    color: #0071e3;
}

.main-layout {
    padding-block: 3px 6px;
}

.page-section {
    margin: 0 0 4px;
}

.page-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
}

.page-header-inline {
    display: flex;
    align-items: baseline;
    gap: 16px;
    flex-wrap: wrap;
}

.page-header .page-header-count {
    font-size: 0.95rem;
    color: #6b7280;
    margin: 0;
}

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

.page-actions form {
    margin: 0;
}

.muted {
    color: #6e6e73;
    margin: 4px 0 0;
}

.filters {
    background: #f5f5f7;
    border: 1px solid #d2d2d7;
    border-radius: 12px;
    padding: 16px;
    display: grid;
    gap: 12px;
    margin-bottom: 16px;
}

.search-field {
    display: flex;
    gap: 12px;
}

.search-field input {
    flex: 1;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid #d2d2d7;
    background: #fff;
}

.filter-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.select {
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid #d2d2d7;
    background: #fff;
    min-width: 240px;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    border: none;
    min-height: var(--button-height);
    height: var(--button-height);
    padding: 0 16px;
    box-sizing: border-box;
    font-family: inherit;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    line-height: 1;
    transition:
        background-color 0.3s ease,
        box-shadow 0.3s ease,
        color 0.3s ease;
    background: linear-gradient(180deg, #42a1ff, #0077ed);
    color: #fff;
}

.button:disabled,
.button[aria-disabled="true"] {
    cursor: not-allowed;
    opacity: 0.6;
}

.button-primary {
    background: linear-gradient(180deg, #42a1ff, #0077ed);
    color: #fff;
}

.button-primary:hover {
    background: linear-gradient(180deg, #51adff, #0a84ff);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.button-secondary {
    background: linear-gradient(180deg, #f5f5f7, #e5e5ea);
    color: #1d1d1f;
}

.button-secondary:hover {
    background: linear-gradient(180deg, #ffffff, #f5f5f7);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.button-danger {
    background: linear-gradient(180deg, #ff6b6b, #dc3545);
    color: #fff;
}

.button-danger:hover {
    background: linear-gradient(180deg, #ff8080, #c82333);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.button-ghost {
    background: linear-gradient(180deg, #f8fafc, #f1f5f9);
    border: 1px solid #cbd5e1;
    color: #1f2937;
    padding: 8px 12px;
    border-radius: 10px;
    height: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    line-height: 1.2;
    white-space: nowrap;
    transition: background 0.3s ease, box-shadow 0.3s ease;
}

.button-ghost:hover {
    background: linear-gradient(180deg, #ffffff, #f8fafc);
    border-color: #4f46e5;
    color: #4f46e5;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}

.file-input {
    display: inline-flex;
    align-items: center;
    min-height: var(--button-height);
    height: var(--button-height);
    padding: 0 12px;
    border-radius: 12px;
    border: 1px solid #d2d2d7;
    background: #fff;
    font-size: 14px;
    color: #1d1d1f;
    cursor: pointer;
}

.file-input::file-selector-button {
    border: none;
    border-radius: 12px;
    min-height: var(--button-height);
    height: var(--button-height);
    padding: 0 16px;
    margin-right: 12px;
    background: linear-gradient(180deg, #f5f5f7, #e5e5ea);
    color: #1d1d1f;
    cursor: pointer;
    transition:
        background-color 0.3s ease,
        box-shadow 0.3s ease;
}

.file-input::-webkit-file-upload-button {
    border: none;
    border-radius: 12px;
    min-height: var(--button-height);
    height: var(--button-height);
    padding: 0 16px;
    margin-right: 12px;
    background: linear-gradient(180deg, #f5f5f7, #e5e5ea);
    color: #1d1d1f;
    cursor: pointer;
    transition:
        background-color 0.3s ease,
        box-shadow 0.3s ease;
}

.file-input:hover::file-selector-button {
    background: linear-gradient(180deg, #ffffff, #f5f5f7);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.file-input:hover::-webkit-file-upload-button {
    background: linear-gradient(180deg, #ffffff, #f5f5f7);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.file-upload-button {
    position: relative;
    overflow: hidden;
}

.file-upload-input {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

.file-upload-name {
    font-size: 14px;
}

.table-wrapper {
    overflow-x: auto;
    background: #fff;
    border-radius: 12px;
    border: 1px solid #d2d2d7;
}

.data-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 14px;
}

.data-table th,
.data-table td {
    padding: 12px 16px;
    border-bottom: 1px solid #d2d2d7;
    text-align: left;
}

.data-table th {
    background: #f5f5f7;
    color: #1d1d1f;
    font-weight: 600;
}

.data-table tbody tr:last-child td {
    border-bottom: none;
}

.data-table tbody tr:nth-of-type(odd) {
    background-color: #fbfbfd;
}

.data-table tbody tr:hover {
    background-color: #f5f5f7;
    outline: 2px solid #0d6efd;
}

.link-strong {
    color: #0071e3;
    font-weight: 600;
    text-decoration: none;
}

.company-link {
    color: inherit;
    text-decoration: none;
}

.company-link:hover {
    color: #0071e3;
    text-decoration: underline;
}

.row-actions {
    display: flex;
    gap: 8px;
}

.contacts-actions .icon-button {
    width: 132px;
    min-width: 132px;
}

.row-actions-form {
    margin: 0;
}

.icon-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 88px;
    height: var(--button-height);
    min-height: var(--button-height);
    line-height: 1;
    padding: 0 12px;
    box-sizing: border-box;
    font-family: inherit;
    border-radius: 12px;
    border: 1px solid #d2d2d7;
    background: linear-gradient(180deg, #f5f5f7, #e5e5ea);
    font-size: 12px;
    color: #1d1d1f;
    text-decoration: none;
    transition: background 0.3s ease, box-shadow 0.3s ease;
}

.icon-button:hover {
    background: linear-gradient(180deg, #ffffff, #f5f5f7);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.icon-button-danger {
    border-color: #ffb3b3;
    color: #c82333;
}

.icon-button-danger:hover {
    background: linear-gradient(180deg, #fee2e2, #fecaca);
    box-shadow: 0 2px 4px rgba(220, 53, 69, 0.15);
}

.messages {
    display: grid;
    gap: 10px;
    margin: 0 0 16px;
}

.message {
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid #dbe4ff;
    background: #f8fbff;
    color: #1e3a8a;
    font-size: 14px;
}

.message--success {
    border-color: #b7ebc6;
    background: #f0fff4;
    color: #166534;
}

.message--error {
    border-color: #fecaca;
    background: #fff1f2;
    color: #b91c1c;
}

.message--warning {
    border-color: #fde68a;
    background: #fffbeb;
    color: #92400e;
}

.empty-state {
    padding: 24px;
    background: #fff;
    border-radius: 12px;
    border: 1px solid #d2d2d7;
}

.breadcrumbs {
    display: flex;
    gap: 8px;
    color: #6e6e73;
    font-size: 13px;
    margin-bottom: 8px;
}

.breadcrumbs a {
    color: #0071e3;
    text-decoration: none;
}

.org-detail-page .breadcrumbs {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    min-width: 0;
}

.org-detail-page .breadcrumbs a {
    flex: 0 0 auto;
    white-space: nowrap;
}

.org-detail-page .breadcrumbs-separator {
    flex: 0 0 auto;
    color: #9ca3af;
}

.org-detail-page .breadcrumbs-current {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.label {
    display: block;
    color: #6e6e73;
    font-size: 12px;
    margin-bottom: 4px;
}

.value {
    font-weight: 500;
    color: #1d1d1f;
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
}

.info-card {
    background: #fff;
    padding: 20px;
    border-radius: 12px;
    border: 1px solid #d2d2d7;
}

.info-card h3 {
    margin-top: 0;
}

.info-list {
    display: grid;
    gap: 12px;
}

.info-list .label {
    display: block;
    color: #6e6e73;
    font-size: 12px;
    margin-bottom: 4px;
}

.org-card {
    background: #fff;
    border-radius: 14px;
    border: 2px solid #0d6efd;
    box-shadow: 0 6px 18px rgba(13, 110, 253, 0.12);
    padding: 12px 16px;
    margin-bottom: 16px;
}

.org-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e5e5ea;
    flex-wrap: wrap;
}

.org-title {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #0d6efd;
}

.org-title h2 {
    margin: 0;
    font-size: 20px;
    color: inherit;
}

.org-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: #e6f0ff;
    font-size: 16px;
}

.org-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.org-actions form {
    margin: 0;
}

.button-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 120px;
    height: var(--button-height);
    min-height: var(--button-height);
    line-height: 1;
    padding: 0 14px;
    box-sizing: border-box;
    border-radius: 10px;
    border: 1px solid #0d6efd;
    background: #fff;
    color: #0d6efd;
    font-weight: 500;
    cursor: pointer;
    transition:
        background-color 0.2s ease,
        color 0.2s ease,
        box-shadow 0.2s ease;
}

.button-outline:hover {
    background: #0d6efd;
    color: #fff;
    box-shadow: 0 4px 10px rgba(13, 110, 253, 0.2);
}

.button-outline:disabled {
    cursor: not-allowed;
    opacity: 0.6;
    box-shadow: none;
}

.button-outline-danger {
    border-color: #dc3545;
    color: #dc3545;
}

.button-outline-danger:hover {
    background: #dc3545;
    color: #fff;
}

.org-card-body {
    padding-top: 16px;
    display: grid;
    gap: 16px;
}

.org-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
}

.org-summary-item--wide {
    grid-column: 1 / -1;
}

.org-divider {
    height: 1px;
    background: #e5e5ea;
}

.org-footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    align-items: center;
}

.org-footer-actions {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

.input-field {
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid #d2d2d7;
    background: #fff;
    min-width: 180px;
}

.badge {
    display: inline-flex;
    align-items: center;
    min-height: var(--button-height);
    height: var(--button-height);
    padding: 0 12px;
    border-radius: 999px;
    background: #0d6efd;
    color: #fff;
    font-size: 12px;
    font-weight: 600;
}

.section-card {
    background: #fff;
    border-radius: 12px;
    border: 1px solid #d2d2d7;
    margin-bottom: 16px;
    overflow: hidden;
}

.section-card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border-bottom: 1px solid #e5e5ea;
    background: #f5f5f7;
}

.section-card-header h3 {
    margin: 0;
    font-size: 16px;
}

.section-card-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 6px;
    background: #e5e5ea;
    font-size: 13px;
}

.section-card-body {
    padding: 16px;
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

.contact-block {
    display: grid;
    gap: 12px;
    padding: 12px;
    border: 1px solid #e5e5ea;
    border-radius: 10px;
    background: #fff;
}

.contact-block-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.contact-block + .contact-block {
    margin-top: 12px;
}

.contact-block-header h4 {
    margin: 0;
    font-size: 14px;
    color: #1d1d1f;
}

.directory-contacts-list {
    display: grid;
    gap: 10px;
}

.directory-contact-item {
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 10px;
    background: #fafafa;
}

.inline-deal-form {
    margin: 0;
    padding: 0;
    display: inline-flex;
}

.inline-deal-form .button {
    padding: 4px 10px;
    font-size: 12px;
    min-height: 28px;
    height: 28px;
}

.deal-description-inline {
    margin-left: 8px;
    font-size: 13px;
    font-weight: 400;
    color: #6b7280;
    line-height: 1.4;
}

.directory-contact-item-title {
    margin-bottom: 8px;
    font-size: 12px;
    font-weight: 600;
    color: #4b5563;
}

.contact-primary-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.comments-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 16px;
    align-items: start;
}

.comment-feed {
    font-size: 14px;
}

.comment-list {
    display: grid;
    gap: 12px;
    max-height: calc(2 * 80px + 12px);
    overflow-y: auto;
    padding-right: 4px;
}

.comment-item {
    border: 1px solid #e5e5ea;
    border-radius: 10px;
    padding: 12px 12px 0;
    background: #fff;
    display: grid;
    gap: 4px;
    min-height: 80px;
}

.comment-item--pinned {
    border-color: #0d6efd;
    box-shadow: 0 0 0 1px rgba(13, 110, 253, 0.2);
}

.comment-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.comment-author {
    font-weight: 600;
    color: #1d1d1f;
    margin-right: 8px;
}

.comment-date {
    margin: 0 0 4px;
    color: #6e6e73;
    font-size: 12px;
}

.comment-text {
    margin: 0;
    font-size: 14px;
}

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

.comment-empty {
    margin: 0;
    color: #6e6e73;
    font-size: 14px;
}

.badge--pinned {
    background: #f7b731;
    color: #1d1d1f;
}

.comment-form {
    display: grid;
    gap: 12px;
}

.comment-form textarea {
    width: 100%;
    border-radius: 8px;
    border: 1px solid #d2d2d7;
    padding: 10px 12px;
    resize: vertical;
    min-height: 120px;
}

.history-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 16px;
    align-items: start;
}

.history-feed {
    font-size: 14px;
    max-height: calc(3 * 80px + 2 * 12px);
    overflow-y: auto;
    padding-right: 4px;
}

.history-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.detail-columns {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
}

.system-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
}

.history-item {
    border: 1px solid #e5e5ea;
    border-radius: 10px;
    padding: 12px;
    background: #fff;
    display: grid;
    gap: 4px;
    min-height: 80px;
}

.history-meta {
    display: grid;
    gap: 6px;
}

.history-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.history-author {
    font-weight: 600;
    color: #1d1d1f;
}

.history-date {
    color: #6e6e73;
    font-size: 12px;
}

.history-text {
    margin: 0;
    font-size: 14px;
}

.history-empty {
    margin: 0;
    color: #6e6e73;
    font-size: 14px;
}

.form-card {
    background: #fff;
    width: 100%;
    margin: 0;
    padding: 0;
    border-radius: 12px;
    border: 1px solid #d2d2d7;
    overflow: hidden;
}

.login-card {
    max-width: 1100px;
    margin: 0 auto;
}

.form-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 24px;
    border-bottom: 1px solid #e5e5ea;
    background: #f5f5f7;
    border-radius: 12px 12px 0 0;
}

.login-card .form-card-header {
    background: #f7f7f8;
}

.form-card-title {
    display: flex;
    align-items: center;
    gap: 10px;
}

.form-card-title h2 {
    margin: 0;
    font-size: 18px;
}

.login-card .form-card-title h2 {
    font-size: 28px;
    font-weight: 700;
}

.form-card-icon {
    display: inline-flex;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    align-items: center;
    justify-content: center;
    background: #e5e5ea;
    font-size: 14px;
}

.form-card-body {
    padding: 24px;
}

.login-form-grid {
    gap: 18px;
}

.input-with-icon {
    position: relative;
    display: flex;
    align-items: center;
}

.input-with-icon input {
    padding-right: 44px;
}

.input-with-icon__symbol {
    position: absolute;
    right: 14px;
    color: #111;
    font-size: 18px;
    pointer-events: none;
}

.login-actions {
    margin-top: 16px;
}

.login-footer {
    margin-top: 24px;
    display: flex;
    justify-content: center;
    gap: 6px;
    font-size: 16px;
}

.login-footer-link {
    color: #0a84ff;
    text-decoration: none;
    font-weight: 500;
}

.login-footer-link:hover {
    text-decoration: underline;
}

.form-section {
    display: grid;
    gap: 16px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e5e5ea;
    margin-bottom: 20px;
}

.form-section:last-child {
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: 0;
}

.form-section-header h3 {
    margin: 0;
}

.form-section-header {
    display: flex;
    align-items: center;
    gap: 10px;
}

.form-section-icon {
    display: inline-flex;
    width: 24px;
    height: 24px;
    border-radius: 6px;
    align-items: center;
    justify-content: center;
    background: #f0f0f2;
    font-size: 13px;
}

.form-subsection {
    display: grid;
    gap: 12px;
}

.form-subsection h4 {
    margin: 0;
    color: #1d1d1f;
    font-size: 15px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
}

.form-grid--wide {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.form-grid--contacts {
    grid-template-columns: repeat(5, minmax(170px, 1fr));
    column-gap: 16px;
    row-gap: 12px;
}

.contact-formset {
    display: grid;
    gap: 12px;
}

.contact-card {
    background: #f9f9fb;
    border: 1px solid #e5e5ea;
    border-radius: 14px;
    padding: 12px;
    display: grid;
    gap: 10px;
}

.contact-card.is-hidden {
    display: none;
}

.contact-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.contact-card-header h4 {
    margin: 0;
    font-size: 14px;
}

.contact-card-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.contact-primary-toggle {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 6px 10px;
    background: #fff;
    border: 1px solid #e5e5ea;
    border-radius: 10px;
}

.contact-primary-toggle .form-label {
    margin: 0;
    font-size: 0.9rem;
}

.contact-primary-toggle .form-hint {
    margin-left: 4px;
    font-size: 0.8rem;
    color: #6b7280;
}

.contact-primary-toggle input[type="checkbox"] {
    display: none;
}

.contact-primary-toggle .switch {
    width: 40px;
    height: 22px;
}

.contact-primary-toggle .switch-slider {
    background-color: #d1d5db;
}

.contact-primary-toggle .switch-slider:before {
    height: 16px;
    width: 16px;
    left: 3px;
    bottom: 3px;
}

.contact-primary-toggle input[type="checkbox"]:checked + .switch-slider {
    background-color: #0071e3;
}

.contact-primary-toggle input[type="checkbox"]:checked + .switch-slider:before {
    transform: translateX(18px);
}

.contact-remove {
    padding: 6px 10px;
}

.contact-add {
    margin-top: 10px;
    justify-self: start;
}

.contact-card input[type="checkbox"][name$="-DELETE"] {
    display: none;
}

.form-field-inline {
    display: flex;
    align-items: center;
    gap: 10px;
}

.form-inline-button {
    display: inline-flex;
    align-items: center;
    min-height: var(--button-height);
    height: var(--button-height);
    white-space: nowrap;
    padding: 0 14px;
    border-radius: 10px;
    line-height: 1;
}

.form-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.form-label {
    font-size: 14px;
    font-weight: 600;
    color: #1d1d1f;
}

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

.form-field input,
.form-field textarea,
.form-field select {
    width: 100%;
    padding: 8px 10px;
    border-radius: 8px;
    border: 1px solid #d2d2d7;
    background: #fff;
}

.form-field-checkbox {
    display: flex;
    align-items: center;
    min-height: 38px;
}

.form-field-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
}

.form-actions {
    display: flex;
    gap: 12px;
    margin-top: 20px;
}

.form-error {
    color: #c82333;
    font-size: 12px;
}

.form-hint {
    color: #6e6e73;
    font-size: 11px;
}

@media (min-width: 1200px) {
    .form-grid--contacts {
        grid-template-columns: repeat(5, minmax(180px, 1fr));
    }
}

.filter-reset {
    cursor: pointer;
    font-size: 0.8rem;
    color: #dc3545;
}

.filter-checkbox-group {
    max-height: 150px;
    overflow-y: auto;
    border: 1px solid #d2d2d7;
    padding: 0.5rem;
    border-radius: 4px;
}

/* Switch toggle checkbox */
.switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.switch-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #d1d5db;
    transition: 0.3s;
    border-radius: 24px;
}

.switch-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.switch input:checked + .switch-slider {
    background-color: #0071e3;
}

.switch input:checked + .switch-slider:before {
    transform: translateX(20px);
}

.switch input:focus + .switch-slider {
    box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.25);
}

.switch-label {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    font-size: 0.9rem;
    user-select: none;
}

#filterToggle {
    color: inherit;
    border: none;
    padding: 0;
    cursor: pointer;
}

#filterToggle:focus {
    box-shadow: none;
}

.dropdown-checkbox {
    position: relative;
}

.dropdown-checkbox .dropdown-menu {
    width: 100%;
    max-height: 200px;
    overflow-y: auto;
    z-index: 2000;
}

.dropdown-checkbox .dropdown-toggle {
    width: 100%;
    text-align: left;
}

.loading-spinner {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 300px;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Стили для множественного выбора в формах */
.form-field select[multiple] {
    min-height: 120px;
    padding: 12px;
    font-size: 14px;
    line-height: 1.4;
    background: #fff;
    border: 2px solid #d2d2d7;
    border-radius: 12px;
    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}

.form-field select[multiple]:focus {
    outline: none;
    border-color: #007aff;
    box-shadow: 0 0 0 4px rgba(0, 122, 255, 0.1);
}

.form-field select[multiple] option {
    padding: 10px 12px;
    border-radius: 6px;
    margin: 4px 0;
    background: #fbfbfd;
    border: 1px solid transparent;
    color: #1d1d1f;
    font-weight: 400;
    transition: all 0.15s ease;
}

.form-field select[multiple] option:selected {
    background: linear-gradient(135deg, #007aff, #0051d5);
    color: #fff;
    font-weight: 500;
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 2px 8px rgba(0, 122, 255, 0.25);
}

.form-field select[multiple] option:hover:not(:selected) {
    background: #f0f0f2;
    border-color: #d2d2d7;
}

.form-field select[multiple] option:selected:hover {
    background: linear-gradient(135deg, #1a8cff, #0066ff);
    box-shadow: 0 4px 12px rgba(0, 122, 255, 0.35);
}

/* Улучшения для textarea в формах контактов */
.form-field textarea {
    min-height: 100px;
    resize: vertical;
    font-family: inherit;
    line-height: 1.5;
    border: 2px solid #d2d2d7;
    border-radius: 12px;
    padding: 12px 16px;
    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}

.form-field textarea:focus {
    outline: none;
    border-color: #007aff;
    box-shadow: 0 0 0 4px rgba(0, 122, 255, 0.1);
}

/* Улучшения для полей ввода в формах контактов */
.form-field input:not([type="checkbox"]):not([type="radio"]) {
    border: 2px solid #d2d2d7;
    border-radius: 12px;
    padding: 12px 16px;
    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease;
    font-size: 14px;
}

.form-field input:not([type="checkbox"]):not([type="radio"]):focus {
    outline: none;
    border-color: #007aff;
    box-shadow: 0 0 0 4px rgba(0, 122, 255, 0.1);
}

.form-field input::placeholder,
.form-field textarea::placeholder {
    color: #8e8e93;
    opacity: 1;
    font-style: italic;
}

/* Улучшения для обычных select в формах */
.form-field select:not([multiple]) {
    border: 2px solid #d2d2d7;
    border-radius: 12px;
    padding: 12px 16px;
    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease;
    font-size: 14px;
    background-color: #fff;
    background-image: url("data:image/svg+xml;charset=utf-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px 12px;
    padding-right: 44px;
    appearance: none;
}

.form-field select:not([multiple]):focus {
    outline: none;
    border-color: #007aff;
    box-shadow: 0 0 0 4px rgba(0, 122, 255, 0.1);
}

/* Анимация для form-sections */
.form-section {
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Улучшения для form-actions */
.form-actions {
    padding-top: 24px;
    border-top: 1px solid #e5e5ea;
    background: linear-gradient(
        to bottom,
        rgba(245, 245, 247, 0),
        rgba(245, 245, 247, 0.5)
    );
}

/* Стили для валидации форм */
.form-field.has-error input:not([type="checkbox"]):not([type="radio"]),
.form-field.has-error textarea,
.form-field.has-error select {
    border-color: #ff3b30;
    box-shadow: 0 0 0 4px rgba(255, 59, 48, 0.1);
}

.form-field.has-success input:not([type="checkbox"]):not([type="radio"]),
.form-field.has-success textarea,
.form-field.has-success select {
    border-color: #34c759;
    box-shadow: 0 0 0 4px rgba(52, 199, 89, 0.1);
}

/* Hover эффекты для полей форм */
.form-field input:not([type="checkbox"]):not([type="radio"]):hover:not(:focus),
.form-field textarea:hover:not(:focus),
.form-field select:hover:not(:focus) {
    border-color: #a1a1a6;
}

/* Стили для кнопок с явной загрузкой */
.button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.button[data-loading="true"] {
    position: relative;
}

.button[data-loading="true"]::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 16px;
    height: 16px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Стили для счетчика выбранных элементов */
.selection-count {
    font-size: 12px;
    color: #007aff !important;
    font-weight: 400 !important;
    margin-left: 8px;
    padding: 2px 6px;
    background: rgba(0, 122, 255, 0.1);
    border-radius: 8px;
    display: inline-block;
}

/* Улучшенные стили для обязательных полей */
.form-label span[style*="color: #ff3b30"] {
    color: #ff3b30 !important;
    font-weight: bold;
    margin-left: 2px;
}

/* Плавные переходы для полей форм */
.form-field {
    transition: all 0.2s ease;
}

.form-field:focus-within {
    transform: translateY(-1px);
}

/* Улучшенные стили для подсказок */
.form-hint {
    font-size: 12px;
    color: #6e6e73;
    margin-top: 4px;
    line-height: 1.4;
    display: block;
}

/* Анимация появления ошибок */
.form-error {
    animation: slideDown 0.2s ease-out;
    transform-origin: top;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: scaleY(0);
    }
    to {
        opacity: 1;
        transform: scaleY(1);
    }
}

/* Стили для успешной валидации */
.form-field.has-success .form-label::after {
    content: "✓";
    color: #34c759;
    margin-left: 8px;
    font-weight: bold;
}

/* Стили для ошибок валидации */
.form-field.has-error .form-label::after {
    content: "⚠";
    color: #ff3b30;
    margin-left: 8px;
    font-weight: bold;
}

/* Улучшенная типография для заголовков секций */
.form-section-header h3 {
    font-weight: 600;
    color: #1d1d1f;
    font-size: 16px;
    margin: 0;
}

/* Стили для контейнера формы с улучшенными отступами */
.form-card-body {
    padding: 32px;
}

@media (max-width: 768px) {
    .form-card-body {
        padding: 20px;
    }

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

    .form-actions {
        flex-direction: column;
        gap: 12px;
    }

    .form-actions .button {
        width: 100%;
        justify-content: center;
    }
}

/* ===================================
   MOBILE RESPONSIVE STYLES
   =================================== */

/* Mobile Menu Toggle Button */
.topbar-menu-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: none;
    background: transparent;
    cursor: pointer;
    border-radius: 8px;
    transition: background-color 0.2s ease;
}

.topbar-menu-toggle:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.topbar-menu-toggle-bar {
    position: relative;
    display: block;
    width: 24px;
    height: 2px;
    background-color: #1d1d1f;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.topbar-menu-toggle-bar::before,
.topbar-menu-toggle-bar::after {
    content: '';
    position: absolute;
    left: 0;
    width: 24px;
    height: 2px;
    background-color: #1d1d1f;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.topbar-menu-toggle-bar::before {
    top: -7px;
}

.topbar-menu-toggle-bar::after {
    bottom: -7px;
}

/* Hamburger animation when open */
.topbar-menu-toggle[aria-expanded="true"] .topbar-menu-toggle-bar {
    background-color: transparent;
}

.topbar-menu-toggle[aria-expanded="true"] .topbar-menu-toggle-bar::before {
    top: 0;
    transform: rotate(45deg);
}

.topbar-menu-toggle[aria-expanded="true"] .topbar-menu-toggle-bar::after {
    bottom: 0;
    transform: rotate(-45deg);
}

/* Overlay */
.topbar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1099;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.topbar-overlay.is-visible {
    display: block;
    opacity: 1;
    pointer-events: auto;
}

/* Mobile Navigation */
@media (max-width: 768px) {
    /* Show hamburger menu */
    .topbar-menu-toggle {
        display: flex;
        order: -1;
        z-index: 1101;
    }

    /* Hide navigation by default */
    .topbar-nav {
        position: fixed !important;
        top: 60px !important;
        left: 0 !important;
        width: 100vw !important;
        height: calc(100vh - 60px) !important;
        z-index: 1150 !important;
        display: none !important;
        flex-direction: column !important;
        gap: 0 !important;
        padding: 0 !important;
        margin: 0 !important;
        background-color: #ffffff !important;
        overflow-y: auto !important;
        overflow-x: hidden !important;
    }

    .topbar-nav.is-open {
        display: flex !important;
    }

    /* Navigation links styling */
    .topbar-link {
        display: flex !important;
        align-items: center !important;
        padding: 20px 24px !important;
        margin: 0 !important;
        border-bottom: 2px solid #e5e5ea !important;
        border-radius: 0 !important;
        font-size: 18px !important;
        font-weight: 600 !important;
        line-height: 1.5 !important;
        transition: background-color 0.2s ease;
        color: #1d1d1f !important;
        text-decoration: none !important;
        width: 100% !important;
        justify-content: flex-start !important;
        background-color: #ffffff !important;
        min-height: 60px !important;
    }

    .topbar-link:hover {
        background-color: #f0f0f2 !important;
        text-decoration: none !important;
    }

    .topbar-link.is-active {
        background-color: #e6f0ff !important;
        color: #0071e3 !important;
        border-left: 5px solid #0071e3 !important;
        padding-left: 19px !important;
    }

    /* User dropdown adjustments */
    .topbar-user-dropdown {
        position: fixed;
        top: auto;
        right: 16px;
        left: 16px;
        min-width: auto;
        z-index: 1200;
    }
}

/* Small phones */
@media (max-width: 480px) {
    .topbar-content {
        gap: 12px;
        padding-block: 10px;
    }

    .topbar-brand .crm-logo {
        height: 20px;
    }

    .topbar-user-name {
        max-width: 120px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
}

/* ===================================
   TOUCH-FRIENDLY INTERFACE (44px minimum)
   =================================== */

@media (max-width: 768px) {
    /* Increase button height for touch interfaces */
    :root {
        --button-height: 44px;
    }

    /* Main buttons */
    .button {
        min-height: 44px;
        height: auto;
        padding: 12px 20px;
        font-size: 15px;
    }

    /* Icon buttons */
    .icon-button {
        min-height: 44px;
        height: auto;
        padding: 12px 16px;
        font-size: 13px;
    }

    /* Outline buttons */
    .button-outline {
        min-height: 44px;
        height: auto;
        padding: 12px 18px;
    }

    /* Ghost buttons */
    .button-ghost {
        min-height: 44px;
        height: auto;
        padding: 12px 16px;
    }

    /* Topbar user menu buttons */
    .topbar-user-action {
        min-height: 44px;
        height: auto;
        padding: 12px 16px;
        font-size: 15px;
    }

    .topbar-user-trigger {
        min-height: 44px;
        height: auto;
        padding: 0 14px;
    }

    /* Badges - make them easier to tap */
    .badge {
        min-height: 36px;
        height: auto;
        padding: 0 14px;
        font-size: 13px;
    }

    /* Form inputs - increase touch target */
    .form-field input:not([type="checkbox"]):not([type="radio"]),
    .form-field textarea,
    .form-field select:not([multiple]) {
        padding: 14px 16px;
        font-size: 16px; /* Prevents iOS zoom on focus */
    }

    /* Table cells - more padding for easier tapping */
    .data-table td {
        padding: 14px 16px;
    }

    /* Action links in tables */
    .row-actions {
        gap: 12px;
    }

    /* Filter and search inputs */
    .search-field input {
        padding: 14px 16px;
        font-size: 16px;
    }

    .select {
        padding: 14px 16px;
        font-size: 16px;
        min-width: 200px;
    }

    /* Card actions */
    .org-actions .button,
    .org-actions .button-outline {
        min-height: 44px;
        padding: 12px 18px;
    }
}

/* ===================================
   MOBILE CARD VIEW FOR TABLES
   =================================== */

@media (max-width: 768px) {
    /* Hide table header on mobile */
    .data-table thead {
        display: none;
    }

    /* Make table body display as flexbox column */
    .data-table tbody {
        display: flex;
        flex-direction: column;
        gap: 12px;
    }

    /* Each row becomes a card */
    .data-table tbody tr {
        display: flex;
        flex-direction: column;
        background: #ffffff;
        border: 2px solid #e5e5ea;
        border-radius: 12px;
        padding: 16px;
        gap: 12px;
        transition: border-color 0.2s ease, box-shadow 0.2s ease;
    }

    .data-table tbody tr:hover {
        border-color: #0d6efd;
        box-shadow: 0 4px 12px rgba(13, 110, 253, 0.1);
        background: #ffffff;
        outline: none;
    }

    /* Each cell becomes a label-value pair */
    .data-table tbody td {
        display: flex;
        align-items: flex-start;
        justify-content: space-between;
        padding: 8px 0;
        border-bottom: 1px solid #f0f0f2;
        background: transparent;
        font-size: 14px;
    }

    .data-table tbody td:last-child {
        border-bottom: none;
    }

    /* Label before value */
    .data-table tbody td::before {
        content: attr(data-label);
        font-weight: 600;
        color: #6e6e73;
        margin-right: 16px;
        flex-shrink: 0;
        min-width: 100px;
    }

    /* Value takes remaining space */
    .data-table tbody td > * {
        flex: 1;
        text-align: right;
    }

    /* Special styling for action buttons */
    .data-table tbody td[data-label="Действия"] {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
        padding-top: 12px;
        border-top: 2px solid #e5e5ea;
        border-bottom: none;
        margin-top: 4px;
    }

    .data-table tbody td[data-label="Действия"]::before {
        margin-bottom: 4px;
    }

    .data-table tbody td[data-label="Действия"] .row-actions {
        display: flex;
        flex-direction: column;
        gap: 8px;
        width: 100%;
    }

    .data-table tbody td[data-label="Действия"] .icon-button,
    .data-table tbody td[data-label="Действия"] .row-actions-form {
        width: 100%;
    }

    /* Склад: две кнопки в одной ячейке */
    .data-table tbody td[data-label="Действия"] .warehouse-actions-cell {
        display: flex;
        flex-direction: column;
        gap: 8px;
        width: 100%;
        align-items: stretch;
    }

    .data-table tbody td[data-label="Действия"] .warehouse-actions-cell .icon-button,
    .data-table tbody td[data-label="Действия"] .warehouse-actions-cell .warehouse-inline-form {
        width: 100%;
    }

    .data-table tbody td[data-label="Действия"] .warehouse-actions-cell .warehouse-inline-form .icon-button {
        width: 100%;
    }

    .data-table tbody td[data-label="Действия"] .icon-button {
        display: flex;
        justify-content: center;
    }

    /* Improve link styling in cards */
    .data-table tbody td[data-label="Название"] .link-strong {
        font-size: 16px;
        color: #0d6efd;
    }

    /* Badge full width in card */
    .data-table tbody td[data-label="Статус"] .badge {
        width: auto;
        justify-content: center;
    }
}

/* ===================================
   MOBILE FILTERS & SEARCH
   =================================== */

@media (max-width: 768px) {
    /* Filters container - vertical layout */
    .filters {
        padding: 12px;
        gap: 12px;
    }

    /* Search field - full width */
    .search-field {
        flex-direction: column;
        gap: 10px;
    }

    .search-field input {
        width: 100%;
        min-width: auto;
    }

    /* Selects - full width */
    .select {
        width: 100%;
        min-width: auto;
    }

    /* Filter actions - vertical stack */
    .filter-actions {
        flex-direction: column;
        gap: 10px;
    }

    .filter-actions .button {
        width: 100%;
        justify-content: center;
    }

    /* Page header - stack on mobile */
    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .page-actions {
        width: 100%;
    }

    .page-actions .button {
        width: 100%;
        justify-content: center;
    }

    /* Кнопка в шапке без обёртки .page-actions (списки контактов и др.) */
    .page-header > .button,
    .page-header > a.button {
        width: 100%;
        box-sizing: border-box;
        justify-content: center;
    }
}

/* ===================================
   MOBILE DETAIL PAGE ADAPTATIONS
   =================================== */

@media (max-width: 560px) {
    /* Org card header stacks */
    .org-card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .org-actions {
        width: 100%;
        flex-direction: column;
    }

    .org-actions .button,
    .org-actions .button-outline {
        width: 100%;
        justify-content: center;
    }

    /* Contact grid single column */
    .contact-grid {
        grid-template-columns: 1fr;
    }

    /* Comments and history single column */
    .comments-grid,
    .history-grid {
        grid-template-columns: 1fr;
    }

    /* Detail columns stack */
    .detail-columns {
        grid-template-columns: 1fr;
    }

    /* Tab controls scrollable */
    .entity-tabs-controls {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        flex-wrap: nowrap;
        gap: 8px;
        padding-bottom: 8px;
    }

    .tab-control {
        flex-shrink: 0;
        white-space: nowrap;
    }

    .contact-detail-page .entity-tabs-controls {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 6px;
        overflow: visible;
        padding-bottom: 0;
        padding: 2px;
        border: 1px solid #dbe3f5;
        border-radius: 999px;
        background: #eef2ff;
    }

    .contact-detail-page .tab-control {
        width: 100%;
        padding: 6px 8px;
        text-align: center;
        font-size: 12px;
        line-height: 1.25;
        white-space: normal;
        border: none;
        background: transparent;
        min-height: 32px;
    }

    .contact-detail-page .tab-control.is-active {
        background: #ffffff;
        color: #1d4ed8;
        box-shadow: 0 1px 2px rgba(15, 23, 42, 0.14);
    }

    .contact-detail-page .section-card {
        border-radius: 12px;
        margin-bottom: 10px;
        border-color: #dde3ec;
    }

    .contact-detail-page .section-card-header {
        padding: 8px 10px;
        gap: 6px;
        background: #f8fafc;
        border-bottom: 1px solid #e8edf3;
    }

    .contact-detail-page .section-card-header h3 {
        font-size: 14px;
    }

    .contact-detail-page .section-card-icon {
        width: 20px;
        height: 20px;
        font-size: 11px;
    }

    .contact-detail-page .section-card-body {
        padding: 8px 10px;
    }

    .contact-detail-page .contact-detail-grid {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .contact-detail-page .contact-detail-grid > div {
        display: flex;
        flex-direction: column;
        gap: 2px;
        padding: 6px 0;
        border: none;
        border-radius: 0;
        background: transparent;
        border-bottom: 1px solid #eef2f7;
    }

    .contact-detail-page .contact-detail-grid > div:last-child {
        border-bottom: none;
    }

    .contact-detail-page .contact-detail-grid .label {
        font-size: 10px;
        color: #6b7280;
        text-transform: none;
        letter-spacing: normal;
    }

    .contact-detail-page .contact-detail-grid .value {
        font-size: 14px;
        line-height: 1.28;
        color: #111827;
        font-weight: 400;
    }

    .contact-detail-page .contact-detail-companies .company-badges {
        gap: 5px;
    }

    .contact-detail-page .contact-detail-companies .badge {
        width: auto;
        min-height: 24px;
        padding: 0 8px;
        border-radius: 999px;
        font-size: 11px;
    }

    /* Comment form */
    .comment-form {
        gap: 10px;
    }

    .comment-form textarea {
        min-height: 100px;
    }

    .comment-form .button {
        width: 100%;
        justify-content: center;
    }
}

/* ===================================
   MOBILE CONTACT FORM GRID
   =================================== */

@media (max-width: 850px) {
    .form-grid--contacts {
        grid-template-columns: repeat(2, 1fr);
        row-gap: 16px;
    }
}

@media (max-width: 560px) {
    .form-grid--contacts {
        grid-template-columns: 1fr;
    }

    .contact-card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .contact-card-actions {
        width: 100%;
        justify-content: flex-end;
    }
}

/* ===================================
   MOBILE BADGES & ICONS
   =================================== */

@media (max-width: 768px) {
    /* Communication badges in cards (минимум 44×44 по гайдлайнам тач-интерфейсов) */
    .communication-badge {
        width: 44px;
        height: 44px;
        border-radius: 12px;
    }

    .communication-badge__icon {
        width: 22px;
        height: 22px;
    }

    /* Status badges in client list */
    .data-table tbody td[data-label="Статус"] .badge {
        width: 100%;
        justify-content: center;
        min-height: 36px;
        padding: 0 14px;
        font-size: 13px;
    }

    /* Archive badge */
    .archived-badge {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        padding: 8px 12px;
        border-radius: 8px;
        background: #f3f4f6;
        color: #6b7280;
        font-size: 13px;
        font-weight: 600;
        white-space: nowrap;
        min-height: 36px;
    }

    /* General badge in cards */
    .badge {
        min-height: 32px;
        padding: 6px 12px;
        font-size: 13px;
    }
}

/* ===================================
   MOBILE TYPOGRAPHY & SPACING
   =================================== */

@media (max-width: 768px) {
    /* Page side padding - responsive */
    :root {
        --page-side-padding: 12px;
    }

    /* Typography - readable sizes */
    body {
        font-size: 15px;
        line-height: 1.6;
    }

    h1 {
        font-size: clamp(22px, 5vw, 32px);
        line-height: 1.2;
        margin-bottom: 12px;
    }

    h2 {
        font-size: clamp(18px, 4vw, 26px);
        line-height: 1.3;
        margin-bottom: 10px;
    }

    h3 {
        font-size: clamp(16px, 3.5vw, 20px);
        line-height: 1.4;
        margin-bottom: 8px;
    }

    h4 {
        font-size: clamp(14px, 3vw, 18px);
        line-height: 1.4;
    }

    p, li, td, span, input, select, textarea, button {
        font-size: 15px;
    }

    .muted {
        font-size: 13px;
    }

    .label {
        font-size: 12px;
    }

    .form-hint {
        font-size: 12px;
    }

    /* Card padding - tighter on mobile */
    .org-card {
        padding: 12px;
        margin-bottom: 12px;
    }

    .org-card-body {
        padding-top: 12px;
        gap: 12px;
    }

    .section-card {
        margin-bottom: 12px;
    }

    .section-card-body {
        padding: 12px;
    }

    .form-card-body {
        padding: 16px;
    }

    /* Spacing between sections */
    .page-section {
        margin-bottom: 16px;
    }

    .page-header {
        gap: 10px;
        margin-bottom: 12px;
    }

    /* Filters - tighter padding */
    .filters {
        padding: 12px;
        gap: 10px;
        margin-bottom: 12px;
    }

    /* Table wrapper - no horizontal margin */
    .table-wrapper {
        margin: 0;
        border-radius: 10px;
    }

    /* Message/alert spacing */
    .messages {
        margin-bottom: 12px;
        gap: 8px;
    }

    .message {
        padding: 10px 12px;
        font-size: 14px;
        border-radius: 8px;
    }

    /* Breadcrumbs - smaller */
    .breadcrumbs {
        font-size: 12px;
        margin-bottom: 6px;
        flex-wrap: wrap;
    }

    /* Link sizes */
    .link-strong {
        font-size: 15px;
    }

    /* Value and label differentiation */
    .value {
        font-size: 15px;
    }

    /* Empty state */
    .empty-state {
        padding: 20px 16px;
        font-size: 15px;
        text-align: center;
    }
}

@media (max-width: 480px) {
    /* Very small phones - even tighter */
    :root {
        --page-side-padding: 10px;
    }

    body {
        font-size: 14px;
    }

    h1 {
        font-size: 20px;
    }

    h2 {
        font-size: 18px;
    }

    h3 {
        font-size: 16px;
    }

    h4 {
        font-size: 15px;
    }

    /* Cards - minimal padding */
    .org-card {
        padding: 10px;
    }

    .section-card-body {
        padding: 10px;
    }

    .form-card-body {
        padding: 12px;
    }

    /* Filters - tightest */
    .filters {
        padding: 10px;
        gap: 8px;
    }

    /* Messages */
    .message {
        padding: 8px 10px;
        font-size: 13px;
    }
}

@media (max-width: 768px) {
    .org-detail-page .breadcrumbs {
        gap: 6px;
        font-size: 13px;
        margin-bottom: 10px;
    }

    .org-detail-page .breadcrumbs a {
        max-width: 40%;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .org-detail-page .org-actions {
        width: 100%;
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .org-detail-page .org-actions .button,
    .org-detail-page .org-actions .button-outline,
    .org-detail-page .org-actions .button-outline-danger {
        min-height: 36px;
        height: 36px;
        padding: 0 12px;
        font-size: 14px;
        width: 100%;
        justify-content: center;
    }

    .org-detail-page .org-actions > a,
    .org-detail-page .org-actions > form {
        min-width: 0;
        width: 100%;
        margin: 0;
    }

    .org-detail-page .org-actions > :only-child {
        grid-column: 1 / -1;
    }

    .org-detail-page .org-summary-grid {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .org-detail-page .org-summary-item {
        display: grid;
        grid-template-columns: minmax(104px, 38%) minmax(0, 1fr);
        align-items: start;
        column-gap: 10px;
        padding: 7px 0;
        border-bottom: 1px solid #eef2f7;
    }

    .org-detail-page .org-summary-item:last-child {
        border-bottom: none;
    }

    .org-detail-page .org-summary-item .label {
        margin: 0;
        font-size: 10px;
        line-height: 1.3;
        text-transform: none;
        letter-spacing: normal;
    }

    .org-detail-page .org-summary-item .value {
        display: block;
        min-width: 0;
        font-size: 14px;
        line-height: 1.3;
        font-weight: 400;
        word-break: break-word;
    }

    .org-detail-page .contact-block {
        gap: 8px;
        padding: 10px;
    }

    .org-detail-page .contact-block-header {
        gap: 8px;
    }

    .org-detail-page .contact-grid {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .org-detail-page .contact-grid > div {
        display: grid;
        grid-template-columns: minmax(104px, 38%) minmax(0, 1fr);
        align-items: start;
        column-gap: 10px;
        padding: 7px 0;
        border-bottom: 1px solid #eef2f7;
    }

    .org-detail-page .contact-grid > div:last-child {
        border-bottom: none;
    }

    .org-detail-page .contact-grid .label {
        margin: 0;
        font-size: 10px;
        line-height: 1.3;
        text-transform: none;
        letter-spacing: normal;
    }

    .org-detail-page .contact-grid .value {
        display: block;
        min-width: 0;
        font-size: 14px;
        line-height: 1.3;
        font-weight: 400;
        word-break: break-word;
    }

    .org-detail-page .directory-contacts-list {
        gap: 8px;
    }

    .org-detail-page .directory-contact-item {
        padding: 8px 10px;
        border-radius: 8px;
    }

    .org-detail-page .deal-description-inline {
        display: block;
        margin-left: 0;
        margin-top: 4px;
        font-size: 11px;
    }

    .org-detail-page .directory-contact-item-title {
        margin-bottom: 6px;
        font-size: 11px;
    }

    .org-detail-page .comments-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .org-detail-page .comment-list {
        max-height: none;
        overflow: visible;
        padding-right: 0;
        gap: 8px;
    }

    .org-detail-page .comment-item {
        min-height: 0;
        padding: 10px;
        border-radius: 12px;
        gap: 6px;
    }

    .org-detail-page .comment-meta {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: start;
        gap: 8px;
    }

    .org-detail-page .comment-date {
        display: block;
        margin: 2px 0 0;
        font-size: 11px;
    }

    .org-detail-page .comment-actions {
        justify-content: flex-end;
    }

    .org-detail-page .comment-actions form {
        margin: 0;
    }

    .org-detail-page .comment-actions .button,
    .org-detail-page .comment-actions .button-secondary {
        min-height: 30px;
        padding: 0 10px;
        font-size: 12px;
    }

    .org-detail-page .badge--pinned {
        min-height: 30px;
        padding: 0 10px;
        font-size: 12px;
    }

    .org-detail-page .comment-text {
        font-size: 14px;
        line-height: 1.35;
        margin: 2px 0 0;
    }

    .org-detail-page .comment-form {
        gap: 8px;
    }

    .org-detail-page .comment-form textarea {
        min-height: 84px;
        padding: 9px 10px;
    }

    .org-detail-page .comment-form .button {
        min-height: 38px;
    }

    .org-detail-page .system-grid {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .org-detail-page .system-grid > div {
        display: grid;
        grid-template-columns: minmax(104px, 38%) minmax(0, 1fr);
        align-items: start;
        column-gap: 10px;
        padding: 7px 0;
        border-bottom: 1px solid #eef2f7;
    }

    .org-detail-page .system-grid > div:last-child {
        border-bottom: none;
    }

    .org-detail-page .system-grid .label {
        margin: 0;
        font-size: 10px;
        line-height: 1.3;
        text-transform: none;
        letter-spacing: normal;
    }

    .org-detail-page .system-grid .value {
        display: block;
        min-width: 0;
        font-size: 14px;
        line-height: 1.3;
        font-weight: 400;
        word-break: break-word;
    }

    .page-section.contact-detail-page {
        margin-bottom: 10px;
    }

    .contact-detail-page .section-card {
        margin-bottom: 8px;
    }

    .contact-detail-page .section-card-body {
        padding: 8px 10px;
    }

    .contact-detail-page .contact-detail-grid {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .contact-detail-page .contact-detail-grid > div {
        display: grid;
        grid-template-columns: minmax(96px, 38%) minmax(0, 1fr);
        align-items: start;
        column-gap: 10px;
        padding: 7px 0;
        border: none;
        border-bottom: 1px solid #eef2f7;
        border-radius: 0;
        background: transparent;
        gap: 0;
    }

    .contact-detail-page .contact-detail-grid > div:last-child {
        border-bottom: none;
    }

    .contact-detail-page .contact-detail-grid .label {
        margin: 0;
        font-size: 10px;
        line-height: 1.3;
        text-transform: none;
        letter-spacing: normal;
    }

    .contact-detail-page .contact-detail-grid .value {
        display: block;
        min-width: 0;
        font-size: 14px;
        line-height: 1.3;
        font-weight: 400;
        word-break: break-word;
    }

    .contact-detail-page .contact-detail-companies .company-badges {
        margin-top: 0;
    }
}

/* Tabs style on contact detail page: align with cost calculation tabs */
.contact-detail-page .entity-tabs {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.contact-detail-page .entity-tabs-controls {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 0;
    margin-bottom: 0;
    border-bottom: 1px solid #cfd4dc;
    overflow: visible;
    padding-bottom: 0;
}

.contact-detail-page .tab-control {
    border: 1px solid transparent;
    border-bottom: none;
    border-radius: 10px 10px 0 0;
    background-color: transparent;
    color: #1f2937;
    padding: 11px 20px;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;
    cursor: pointer;
    margin-bottom: -1px;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.contact-detail-page .tab-control + .tab-control {
    margin-left: 2px;
}

.contact-detail-page .tab-control:hover {
    background-color: #eceff3;
}

.contact-detail-page .tab-control.is-active {
    border-color: #cfd4dc;
    border-bottom-color: #eceff3;
    background-color: #eceff3;
    color: #1f2937;
    box-shadow: none;
}

.contact-detail-page .tab-control:focus-visible {
    outline: 2px solid #60a5fa;
    outline-offset: -2px;
}

@media (max-width: 768px) {
    .contact-detail-page .entity-tabs-controls {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        align-items: stretch;
        gap: 6px;
        border-bottom: none;
        overflow: visible;
        padding-bottom: 0;
        padding: 0;
        border-radius: 0;
        background: transparent;
        border-left: none;
        border-right: none;
        border-top: none;
    }

    .contact-detail-page .tab-control {
        width: 100%;
        min-height: 44px;
        padding: 10px 12px;
        font-size: 13px;
        line-height: 1.25;
        white-space: normal;
        text-align: center;
        border: 1px solid #d1d5db;
        border-radius: 10px;
        margin-bottom: 0;
        background: #f8fafc;
    }

    .contact-detail-page .tab-control + .tab-control {
        margin-left: 0;
    }

    .contact-detail-page .tab-control.is-active {
        border-color: #93c5fd;
        background: #eff6ff;
        color: #1e3a8a;
    }
}

@media (max-width: 420px) {
    .contact-detail-page .entity-tabs-controls {
        grid-template-columns: 1fr;
    }
}
