:root {
    --czat-primary: #3157d5;
    --czat-primary-dark: #2545ae;
    --czat-sidebar: #172034;
    --czat-surface: #ffffff;
    --czat-border: #e3e8f0;
    --bs-primary: #3157d5;
    --bs-primary-rgb: 49, 87, 213;
}

body {
    color: #263247;
    background: #f4f7fb;
}

.app-main {
    color: #263247;
    background: #f4f7fb;
}

.app-header {
    color: #263247;
    background: #fff !important;
    border-bottom: 1px solid var(--czat-border);
}

.app-header .nav-link {
    color: #334155;
}

.app-footer {
    color: #526175;
    background: #fff;
    border-top-color: var(--czat-border);
}

.app-sidebar {
    background: var(--czat-sidebar) !important;
}

.sidebar-brand {
    border-bottom-color: rgba(255, 255, 255, .1) !important;
}

.brand-link {
    align-items: center;
    display: flex;
    gap: .75rem;
}

.brand-mark {
    align-items: center;
    background: linear-gradient(135deg, #5878ee, #3157d5);
    border-radius: .7rem;
    color: #fff;
    display: inline-flex;
    height: 2rem;
    justify-content: center;
    width: 2rem;
}

.brand-mark-lg {
    font-size: 1.25rem;
    height: 2.75rem;
    width: 2.75rem;
}

.sidebar-menu .nav-link {
    border-radius: .55rem;
    color: #dce5f3;
    margin-inline: .6rem;
}

.sidebar-menu .nav-link:hover,
.sidebar-menu .nav-link:focus-visible {
    color: #fff;
    background: #2d3b56;
}

.sidebar-menu .nav-link.active {
    background: #3157d5;
    color: #fff;
    box-shadow: 0 .25rem .75rem rgba(23, 32, 52, .24);
}

.sidebar-menu .nav-header {
    color: #b4c2dc;
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .08em;
    padding: 1.25rem 1.25rem .45rem;
}

.app-content-header h1 {
    color: #1a2c46;
    font-size: clamp(1.45rem, 2vw, 1.8rem);
    font-weight: 700;
    letter-spacing: -.025em;
}

.card,
.info-box {
    border: 1px solid var(--czat-border);
    border-radius: .8rem;
    color: #263247;
    background: #fff;
}

.card-header,
.card-footer {
    background: var(--czat-surface);
    border-color: var(--czat-border);
    padding: 1rem 1.25rem;
}

.card-title {
    font-size: 1rem;
    font-weight: 700;
}

.btn-primary {
    background-color: var(--czat-primary);
    border-color: var(--czat-primary);
}

.btn-primary:hover,
.btn-primary:focus {
    background-color: var(--czat-primary-dark);
    border-color: var(--czat-primary-dark);
}

.user-avatar {
    align-items: center;
    background: #e9edfb;
    border-radius: 50%;
    color: var(--czat-primary);
    display: inline-flex;
    height: 2rem;
    justify-content: center;
    width: 2rem;
}

.info-box {
    margin-bottom: 0;
    min-height: 106px;
}

.info-box-icon {
    border-radius: .65rem !important;
    font-size: 1.45rem;
    margin: .75rem;
    width: 64px;
}

.info-box-number {
    font-size: 1.35rem;
}

.info-box-date {
    font-size: 1rem;
}

.empty-state {
    align-items: center;
    display: flex;
    flex-direction: column;
    padding: 4rem 1.5rem;
    text-align: center;
}

.empty-state > i {
    color: #a3aec2;
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.empty-state h2,
.empty-state h3 {
    font-size: 1.1rem;
    font-weight: 700;
}

.empty-state p {
    color: #6b7588;
    margin-bottom: 1.25rem;
    max-width: 34rem;
}

.table > :not(caption) > * > * {
    border-bottom-color: #edf0f5;
    padding: .85rem 1.25rem;
}

.table thead th {
    background: #f8f9fc;
    color: #475569;
    font-size: .75rem;
    letter-spacing: .03em;
    text-transform: uppercase;
}

.btn-outline-secondary {
    color: #41516a;
    border-color: #9aa9bd;
}

.btn-outline-secondary:hover,
.btn-outline-secondary:focus-visible {
    color: #fff;
    background: #41516a;
    border-color: #41516a;
}

.user-shop-badge {
    margin: .15rem .2rem .15rem 0;
    border: 1px solid #c8d5f6;
    color: #24439e;
    background: #edf2ff;
    font-weight: 600;
}

.user-shop-picker .form-check {
    padding-block: .2rem;
}

.connection-state {
    align-items: center;
    background: #f2f4f8;
    border: 1px solid var(--czat-border);
    border-radius: .7rem;
    display: flex;
    gap: 1rem;
    padding: 1rem;
}

.connection-state.is-saved {
    background: #edfaf3;
    border-color: #bce6ce;
}

.connection-state-icon {
    align-items: center;
    background: #fff;
    border-radius: 50%;
    color: #68758a;
    display: inline-flex;
    flex: 0 0 auto;
    font-size: 1.25rem;
    height: 2.75rem;
    justify-content: center;
    width: 2.75rem;
}

.connection-state.is-saved .connection-state-icon {
    color: #16824d;
}

.connection-state p {
    color: #657086;
    font-size: .875rem;
}

.credential-fields {
    border: 1px solid var(--czat-border);
    border-radius: .7rem;
    margin-top: .75rem;
    padding: 1rem;
}

.credential-fields[hidden] {
    display: none !important;
}

.credential-hint {
    align-items: flex-start;
    background: #f8f9fc;
    border-radius: .55rem;
    display: flex;
    gap: .75rem;
    margin-bottom: 1rem;
    padding: .85rem;
}

.credential-hint > i {
    color: var(--czat-primary);
    font-size: 1.15rem;
    margin-top: .1rem;
}

.credential-hint p {
    color: #657086;
    font-size: .85rem;
}

.scope-list {
    list-style: none;
    padding: 0;
}

.scope-list li {
    align-items: center;
    display: flex;
    gap: .65rem;
    padding: .4rem 0;
}

.import-progress {
    background: #f8f9fc;
    border: 1px solid var(--czat-border);
    border-radius: .7rem;
    margin-bottom: 1rem;
    padding: 1rem;
}

.import-progress .progress {
    height: .65rem;
}

.import-progress.is-error {
    background: #fff5f5;
    border-color: #f1c2c2;
}

.import-progress.is-stopped {
    background: #fffaf0;
    border-color: #eed39c;
}

.product-thumb {
    align-items: center;
    background: #f1f3f7;
    border: 1px solid #e5e9f0;
    border-radius: .55rem;
    color: #9ba5b7;
    display: flex;
    flex: 0 0 auto;
    height: 48px;
    justify-content: center;
    overflow: hidden;
    width: 48px;
}

.product-thumb img {
    height: 100%;
    object-fit: cover;
    width: 100%;
}

.product-image-lg {
    align-items: center;
    aspect-ratio: 1;
    background: #f5f6f9;
    border-radius: .65rem;
    color: #9ba5b7;
    display: flex;
    flex-direction: column;
    gap: .5rem;
    justify-content: center;
    overflow: hidden;
}

.product-image-lg i {
    font-size: 2.5rem;
}

.product-image-lg img {
    height: 100%;
    object-fit: contain;
    width: 100%;
}

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

.product-details > div {
    border-bottom: 1px solid #edf0f5;
    padding: .85rem 0;
}

.product-details dt {
    color: #6d7789;
    font-size: .78rem;
    font-weight: 600;
    margin-bottom: .2rem;
    text-transform: uppercase;
}

.product-details dd {
    font-weight: 600;
    margin: 0;
}

.product-description {
    line-height: 1.7;
}

.login-page {
    min-height: 100vh;
    padding: 1.5rem;
}

.login-box {
    width: min(100%, 420px);
}

.login-logo {
    align-items: center;
    display: flex;
    font-size: 1.6rem;
    gap: .75rem;
    justify-content: center;
}

@media (max-width: 767.98px) {
    .page-actions,
    .page-actions .btn {
        width: 100%;
    }

    .catalog-table {
        min-width: 860px;
    }

    .product-details {
        grid-template-columns: 1fr;
    }
}
