html {
    height: 100%;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

html, body.bc-body {
    margin: 0;
    min-height: 100%;
    background: #f3f3f3;
    color: #333;
    font-family: "Segoe UI", Tahoma, Arial, sans-serif;
    font-size: 13px;
    line-height: 1.4;
    -webkit-font-smoothing: antialiased;
}

.bc-body,
.bc-body *,
.bc-body *::before,
.bc-body *::after {
    box-sizing: border-box;
}

.bc-body {
    min-height: 100vh;
    min-height: 100dvh;
    -webkit-tap-highlight-color: transparent;
}

.bc-body:not(.bc-auth-page) {
    height: 100%;
    height: 100dvh;
    overflow: hidden;
}

.bc-app {
    min-height: 100vh;
    min-height: 100dvh;
    height: 100%;
    height: 100dvh;
    display: grid;
    grid-template-columns: 56px 1fr;
    overflow: hidden;
}

/* —— Dark icon sidebar —— */
.bc-sidebar {
    display: flex;
    flex-direction: column;
    background: #2b2b2b;
    color: #cfcfcf;
    z-index: 40;
}

.bc-sidebar-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 48px;
    flex-shrink: 0;
    border-bottom: 1px solid #3a3a3a;
    text-decoration: none;
    color: #fff;
}

.bc-sidebar-logo img,
.bc-sidebar-logo span {
    width: 28px;
    height: 28px;
    border-radius: 4px;
    object-fit: cover;
    background: #444;
}

.bc-sidebar-logo span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    color: #fff;
}

.bc-nav {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 8px 6px;
    flex: 1;
}

.bc-nav a,
.bc-sidebar-foot a {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0;
    min-height: 42px;
    padding: 8px 4px;
    border-radius: 4px;
    color: #c8c8c8;
    text-decoration: none;
}

.bc-nav a span,
.bc-sidebar-foot a span {
    position: absolute;
    left: calc(100% + 8px);
    top: 50%;
    transform: translateY(-50%);
    white-space: nowrap;
    background: #1f1f1f;
    color: #fff;
    font-size: 12px;
    padding: 5px 8px;
    border-radius: 3px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.28);
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    z-index: 80;
}

.bc-nav a:hover span,
.bc-sidebar-foot a:hover span {
    opacity: 1;
    visibility: visible;
}

.bc-nav a i,
.bc-sidebar-foot a i {
    font-size: 16px;
    width: 18px;
    text-align: center;
}

.bc-nav a:hover,
.bc-sidebar-foot a:hover {
    background: #3a3a3a;
    color: #fff;
}

.bc-nav a.is-on {
    background: #3d3d3d;
    color: #ffb347;
}

.bc-nav a.is-on::before {
    content: "";
    position: absolute;
    left: -6px;
    top: 8px;
    bottom: 8px;
    width: 3px;
    border-radius: 0 2px 2px 0;
    background: #f5a623;
}

.bc-sidebar-foot {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 8px 6px 12px;
    border-top: 1px solid #3a3a3a;
}

/* —— Workspace —— */
.bc-workspace {
    min-width: 0;
    min-height: 0;
    display: flex;
    flex-direction: column;
    background: #f3f3f3;
}

.bc-pathbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 40px;
    padding: 0 12px 0 10px;
    background: #fff;
    border-bottom: 1px solid #e4e4e4;
    flex-shrink: 0;
}

.bc-path {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    overflow-x: auto;
    font-size: 13px;
    color: #555;
    scrollbar-width: none;
}

.bc-path-title {
    display: none;
    font-size: 16px;
    font-weight: 700;
    color: #222;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bc-path-trail {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
}

.bc-path::-webkit-scrollbar {
    display: none;
}

.bc-path-trail > i,
.bc-path > i {
    color: #8a8a8a;
    font-size: 13px;
    flex-shrink: 0;
}

.bc-path a,
.bc-path-trail a {
    color: #2a6cb8;
    text-decoration: none;
    white-space: nowrap;
}

.bc-path a:hover {
    text-decoration: underline;
}

.bc-path-sep {
    color: #bbb;
    flex-shrink: 0;
}

.bc-path-now {
    color: #333;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bc-menu {
    position: relative;
    flex-shrink: 0;
}

.bc-user {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    max-width: 240px;
    min-height: 32px;
    padding: 2px 8px 2px 4px;
    border: 0;
    border-radius: 4px;
    background: transparent;
    color: #333;
    cursor: pointer;
    font-family: inherit;
}

.bc-user:hover,
.bc-user[aria-expanded="true"] {
    background: #f0f0f0;
}

.bc-user img {
    width: 22px;
    height: 22px;
    border-radius: 3px;
    object-fit: cover;
    background: #ddd;
}

.bc-user-letter {
    width: 22px;
    height: 22px;
    border-radius: 3px;
    background: #e8e8e8;
    color: #333;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    flex-shrink: 0;
}

.bc-user-text {
    min-width: 0;
    text-align: left;
}

.bc-user strong {
    display: block;
    font-size: 12px;
    font-weight: 650;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bc-user small {
    display: block;
    font-size: 10px;
    color: #888;
    letter-spacing: 0.2px;
}

.bc-user > i {
    color: #888;
    font-size: 11px;
}

.bc-menu-drop {
    position: absolute;
    top: calc(100% + 4px);
    right: 0;
    min-width: 180px;
    background: #fff;
    color: #333;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    overflow: hidden;
    z-index: 50;
}

.bc-menu-drop[hidden] {
    display: none !important;
}

.bc-menu-drop a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 12px;
    color: #333;
    text-decoration: none;
    font-size: 13px;
}

.bc-menu-drop a i {
    width: 14px;
    color: #777;
}

.bc-menu-drop a:hover {
    background: #f5f5f5;
}

.bc-menu-drop a + a {
    border-top: 1px solid #f0f0f0;
}

/* —— Toolbar —— */
.bc-toolbar {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 42px;
    padding: 6px 12px;
    background: #fafafa;
    border-bottom: 1px solid #e4e4e4;
    overflow-x: auto;
    flex-shrink: 0;
}

.bc-tool-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 32px;
    padding: 6px 12px;
    border: 1px solid #d0d0d0;
    border-radius: 3px;
    background: #fff;
    color: #333;
    cursor: pointer;
    text-decoration: none;
    flex-shrink: 0;
    font: inherit;
    font-size: 13px;
    font-weight: 650;
}

.bc-tool-btn:hover {
    background: #f6f6f6;
    border-color: #c4c4c4;
}

.bc-tool-btn.is-save {
    background: #2e9e4f;
    border-color: #278a44;
    color: #fff;
}

.bc-tool-btn.is-save:hover {
    background: #278a44;
}

.bc-sheet {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    background: #fff;
    border: 1px solid #e4e4e4;
    padding: 24px 28px 28px;
}

.bc-page-profile .bc-toolbar {
    justify-content: center;
    padding-left: 16px;
    padding-right: 16px;
}

.bc-page-profile .bc-main > .bc-flash {
    width: 100%;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.bc-page-profile .bc-form {
    max-width: none;
    width: 100%;
    margin: 0;
    background: transparent;
    border: 0;
    padding: 0;
}

.bc-main {
    padding: 12px 14px 24px;
    overflow: auto;
    min-width: 0;
    min-height: 0;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
}

.bc-flash {
    padding: 9px 12px;
    border-radius: 3px;
    margin: 0 0 12px;
    font-size: 13px;
    line-height: 1.45;
    background: #f4f4f4;
    border: 1px solid #e6e6e6;
}

.bc-flash.is-ok {
    background: #eef8f0;
    color: #146c2e;
    border-color: #cfe8d4;
}

.bc-flash.is-warn {
    background: #fff8e8;
    color: #8a6400;
    border-color: #f0e0b0;
}

.bc-flash.is-err {
    background: #fff1f1;
    color: #c00;
    border-color: #f0c8c8;
}

.bc-notes {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 0 0 16px;
}

.bc-note {
    background: #fff;
    border: 1px solid #e4e4e4;
    border-radius: 3px;
    padding: 10px 12px;
}

.bc-note.is-new {
    border-color: #c5d8f0;
    background: #f7fbff;
}

.bc-note strong {
    display: block;
    font-size: 13px;
    margin-bottom: 3px;
}

.bc-note p {
    margin: 0;
    font-size: 13px;
    line-height: 1.45;
    color: #555;
}

.bc-note time {
    display: block;
    margin-top: 6px;
    font-size: 11px;
    color: #999;
}

.bc-note-brand_rejected,
.bc-note-product_rejected,
.bc-note-brand_blocked {
    border-color: #f0c8c8;
    background: #fff8f8;
}

.bc-note-brand_approved,
.bc-note-product_approved {
    border-color: #c8e6d0;
    background: #f6fbf7;
}

.bc-title {
    margin: 0 0 6px;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 0;
    color: #222;
}

.bc-lead {
    margin: 0 0 12px;
    color: #777;
    font-size: 13px;
    line-height: 1.45;
}

.bc-money {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    margin: 0 0 12px;
}

.bc-money-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-width: 420px;
}

.bc-card {
    background: #fff;
    border: 1px solid #e4e4e4;
    border-radius: 3px;
    padding: 12px 14px 11px;
}

.bc-card span {
    display: block;
    font-size: 11px;
    font-weight: 650;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    color: #888;
    margin-bottom: 6px;
}

.bc-card strong {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 0;
    color: #222;
}

.bc-card.is-main {
    background: #2b2b2b;
    color: #fff;
    border-color: #2b2b2b;
}

.bc-card.is-main span {
    color: #aaa;
}

.bc-card.is-main strong {
    color: #fff;
}

.bc-hint {
    margin: 0 0 14px;
    color: #888;
    font-size: 12px;
    line-height: 1.55;
    max-width: 760px;
}

.bc-head-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 6px;
}

.bc-head-row .bc-title {
    margin: 0;
    min-width: 0;
}

.bc-btn,
.bc-nav a,
.bc-user,
.bc-tool-btn,
.bc-link-btn {
    touch-action: manipulation;
}

.bc-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: #3d7ec9;
    color: #fff;
    border: 1px solid #2f6db3;
    border-radius: 3px;
    padding: 7px 12px;
    min-height: 32px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0;
    text-transform: none;
    text-decoration: none;
    cursor: pointer;
    font-family: inherit;
}

.bc-btn:hover {
    background: #326db3;
}

.bc-btn-ghost {
    background: #fff;
    color: #333;
    border: 1px solid #d0d0d0;
}

.bc-btn-ghost:hover {
    background: #f6f6f6;
}

.bc-btn-danger {
    background: #fff;
    color: #c0392b;
    border: 1px solid #e0b4b0;
}

.bc-btn-danger:hover {
    background: #fff5f4;
}

/* —— File manager table —— */
.bc-fm,
.bc-table-wrap {
    overflow-x: auto;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 0;
}

.bc-fm-table,
.bc-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.bc-fm-table th,
.bc-table th {
    text-align: left;
    font-size: 12px;
    font-weight: 650;
    letter-spacing: 0;
    text-transform: none;
    color: #666;
    padding: 8px 10px;
    border-bottom: 1px solid #e0e0e0;
    background: #fafafa;
    white-space: nowrap;
}

.bc-fm-table td,
.bc-table td {
    padding: 6px 10px;
    border-bottom: 1px solid #ececec;
    vertical-align: middle;
    color: #333;
}

.bc-fm-table tbody tr:last-child td,
.bc-table tbody tr:last-child td {
    border-bottom: none;
}

.bc-fm-table tbody tr:hover,
.bc-table tbody tr:hover {
    background: #eef5ff;
}

.bc-fm-table td:has(.bc-fm-actions) {
    width: 72px;
    text-align: right;
    white-space: nowrap;
}

.bc-fm-table,
.bc-fm-table input,
.bc-fm-name {
    -webkit-user-select: text;
    user-select: text;
}

.bc-fm-check {
    width: 28px;
    text-align: center;
}

.bc-fm-check input,
.bc-fm-table input[type="checkbox"] {
    width: 14px;
    height: 14px;
    margin: 0;
    accent-color: #3d7ec9;
    cursor: pointer;
}

.bc-fm-name {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    color: #2a6cb8;
    text-decoration: none;
    font-weight: 600;
}

.bc-fm-name:hover {
    text-decoration: underline;
}

span.bc-fm-name {
    color: #333;
    cursor: default;
}

span.bc-fm-name:hover {
    text-decoration: none;
}

.bc-fm-ico {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #5b9bd5;
}

.bc-fm-ico.is-dir {
    color: #f0c14a;
}

.bc-fm-ico img {
    width: 20px;
    height: 20px;
    object-fit: cover;
    border-radius: 2px;
    background: #eee;
}

.bc-fm-sub {
    display: block;
    margin-top: 1px;
    font-size: 11px;
    font-weight: 400;
    color: #999;
}

.bc-fm-perm {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 12px;
    color: #666;
    letter-spacing: 0.4px;
}

.bc-fm-date,
.bc-fm-size {
    white-space: nowrap;
    color: #555;
}

.bc-fm-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 4px;
    margin: 0;
}

.bc-fm-actions form {
    margin: 0;
}

.bc-fm-ico-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border: 1px solid transparent;
    border-radius: 3px;
    background: transparent;
    color: #777;
    text-decoration: none;
    cursor: pointer;
}

.bc-fm-ico-btn:hover {
    background: #fff;
    border-color: #ddd;
    color: #333;
}

.bc-fm-ico-btn.is-danger {
    color: #c0392b;
}

.bc-table .sum {
    color: #111;
    font-weight: 700;
    white-space: nowrap;
}

.bc-table a,
.bc-fm-table a {
    color: #2a6cb8;
    font-weight: 650;
    text-decoration: none;
}

.bc-table a:hover,
.bc-fm-table a:hover {
    text-decoration: underline;
}

.bc-item-name {
    font-size: 12px;
    color: #888;
    margin-top: 2px;
}

.bc-empty {
    color: #888;
    padding: 28px 12px;
    text-align: center;
    background: #fff;
    border: 1px solid #e0e0e0;
}

.bc-status {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.2px;
    text-transform: uppercase;
}

.bc-status-pending { color: #b8860b; }
.bc-status-completed, .bc-status-approved { color: #146c2e; }
.bc-status-cancelled, .bc-status-rejected { color: #c00; }

.bc-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 6px;
    border-radius: 2px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.2px;
    text-transform: uppercase;
}

.bc-badge-pending { background: #fff6e0; color: #8a6400; }
.bc-badge-approved { background: #e8f6ec; color: #146c2e; }
.bc-badge-rejected { background: #fff1f1; color: #c00; }

.bc-products {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 10px;
}

.bc-product {
    background: #fff;
    border: 1px solid #e4e4e4;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.bc-product img,
.bc-product-ph {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    background: #eee;
    display: block;
}

.bc-product-ph {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #bbb;
    font-size: 28px;
}

.bc-product-body {
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
}

.bc-product-body h3 {
    margin: 0;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.25;
}

.bc-product-body p {
    margin: 0;
    color: #888;
    font-size: 12px;
    line-height: 1.35;
}

.bc-product-note {
    font-size: 12px;
    color: #c00;
    line-height: 1.4;
}

.bc-product-note.is-empty {
    color: transparent;
}

.bc-product-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: auto;
    padding-top: 8px;
}

.bc-product-actions form {
    margin: 0;
    display: flex;
}

.bc-product-actions .bc-btn {
    width: 100%;
    flex: 1;
    padding: 8px;
    font-size: 12px;
}

.bc-btn-spacer {
    visibility: hidden;
    pointer-events: none;
}

.bc-form {
    max-width: 640px;
    background: #fff;
    border: 1px solid #e4e4e4;
    padding: 16px 16px 18px;
}

.bc-block {
    margin: 0 0 28px;
}

.bc-block-title {
    margin: 0 0 10px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    color: #888;
}

.bc-readonly {
    margin: 0 0 8px;
}

.bc-readonly > div {
    display: grid;
    grid-template-columns: 150px 1fr;
    gap: 12px;
    padding: 8px 10px;
    border: 1px solid #e0e0e0;
    background: #fafafa;
    margin-bottom: 6px;
}

.bc-readonly dt {
    margin: 0;
    font-size: 12px;
    font-weight: 600;
    color: #888;
}

.bc-readonly dd {
    margin: 0;
    font-size: 13px;
    font-weight: 650;
    color: #222;
    word-break: break-word;
}

.bc-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.bc-field {
    margin-bottom: 14px;
}

.bc-grid .bc-field {
    margin-bottom: 0;
}

.bc-field.is-full {
    grid-column: 1 / -1;
}

.bc-field label,
.bc-field .bc-label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    margin-bottom: 6px;
    color: #555;
}

.bc-field input,
.bc-field select,
.bc-field textarea {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 8px 10px;
    border: 1px solid #d0d0d0;
    border-radius: 3px;
    background: #fff;
    font: inherit;
    font-size: 13px;
    outline: none;
}

.bc-field input[type="file"] {
    padding: 12px 10px;
    background: #fafafa;
    border-style: dashed;
    cursor: pointer;
}

.bc-field textarea {
    min-height: 110px;
    resize: vertical;
}

.bc-field input:focus,
.bc-field select:focus,
.bc-field textarea:focus {
    background: #fff;
    border-color: #3d7ec9;
}

.bc-hint-sm {
    display: block;
    margin-top: 5px;
    font-size: 12px;
    color: #888;
}

.bc-price-preview {
    margin-top: 6px;
    font-size: 13px;
    font-weight: 700;
    color: #222;
}

.bc-err {
    display: block;
    margin-top: 5px;
    font-size: 12px;
    color: #c00;
}

.bc-sizes {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
    gap: 8px;
}

.bc-size {
    background: #f7f7f7;
    border: 1px solid #e8e8e8;
    border-radius: 3px;
    padding: 8px;
    text-align: center;
}

.bc-size span {
    display: block;
    font-size: 12px;
    font-weight: 700;
    margin-bottom: 6px;
}

.bc-size input {
    width: 100%;
    padding: 6px;
    text-align: center;
    border: 1px solid #ddd;
    border-radius: 3px;
    background: #fff;
    font: inherit;
}

.bc-photos {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.bc-photo {
    width: 84px;
    position: relative;
}

.bc-photo img {
    width: 84px;
    height: 84px;
    object-fit: cover;
    border-radius: 3px;
    display: block;
    background: #eee;
    border: 1px solid #e4e4e4;
}

.bc-photo button {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 22px;
    height: 22px;
    border: 0;
    border-radius: 2px;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    cursor: pointer;
}

.bc-logo-edit {
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
}

.bc-logo-pick {
    position: relative;
    overflow: hidden;
}

.bc-file-input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    font-size: 20px;
    border: 0;
    padding: 0;
    margin: 0;
}

.bc-logo-edit img,
.bc-logo-ph {
    width: 56px;
    height: 56px;
    border-radius: 4px;
    object-fit: cover;
    background: #ececec;
    border: 1px solid #e0e0e0;
}

.bc-logo-ph {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 20px;
    color: #333;
}

.bc-seg {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.bc-seg label {
    text-transform: none;
    letter-spacing: 0;
    font-size: 13px;
    font-weight: 650;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 6px;
    background: #fff;
    padding: 8px 10px;
    border: 1px solid #d0d0d0;
    border-radius: 3px;
    cursor: pointer;
}

.bc-actions {
    display: flex;
    gap: 8px;
    margin-top: 8px;
    flex-wrap: wrap;
}

.bc-auth {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 72px 20px 32px;
    background: #f3f3f3;
    box-sizing: border-box;
}

.bc-auth-storefront {
    position: fixed;
    top: max(16px, env(safe-area-inset-top));
    left: max(16px, env(safe-area-inset-left));
    z-index: 20;
    color: #333;
    text-decoration: none;
    font-size: 12px;
    font-weight: 700;
    border: 1px solid #ddd;
    border-radius: 3px;
    padding: 8px 12px;
    background: #fff;
}

.bc-auth-storefront:hover {
    background: #2b2b2b;
    color: #fff;
    border-color: #2b2b2b;
}

.bc-auth-card {
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
    background: #fff;
    border: 1px solid #e4e4e4;
    padding: 28px 24px;
}

.bc-auth-card h1 {
    margin: 0 0 20px;
    font-size: 20px;
    font-weight: 700;
    text-align: center;
}

.bc-auth-note {
    margin: 0 0 16px;
    color: #666;
    font-size: 13px;
    line-height: 1.5;
    text-align: center;
}

.bc-auth-card .bc-btn,
.bc-auth-page button.bc-btn[type="submit"] {
    width: 100%;
    padding: 10px;
}

.bc-code-input {
    letter-spacing: 0.4em;
    text-align: center;
    font-size: 22px !important;
    font-weight: 700;
}

.bc-auth-resend {
    margin: 12px 0 0;
    text-align: center;
}

.bc-link-btn {
    background: none;
    border: 0;
    padding: 8px;
    color: #888;
    font: inherit;
    font-size: 13px;
    cursor: pointer;
    text-decoration: underline;
}

.bc-link-btn:hover {
    color: #111;
}

.bc-alt {
    margin: 16px 0 0;
    text-align: center;
    font-size: 13px;
    color: #888;
}

.bc-alt a {
    color: #2a6cb8;
}

.bc-picked {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    background: #f7f7f7;
    border: 1px solid #e8e8e8;
    border-radius: 3px;
    padding: 10px 12px;
    margin: 8px 0 12px;
}

.bc-picked strong {
    min-width: 0;
    word-break: break-word;
}

.bc-mark {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.4px;
    color: #0a8;
}

.cdek-list-toggle,
.cdek-sidebar-close-mob {
    border: 0;
    background: #2b2b2b;
    color: #fff;
    border-radius: 3px;
    padding: 8px 12px;
    cursor: pointer;
    font-size: 12px;
    display: none;
}

.cdek-pvz-card {
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 3px;
    padding: 10px 12px;
    cursor: pointer;
}

.cdek-pvz-card-title {
    font-weight: 700;
    font-size: 12px;
    color: #1a1a1a;
    margin-bottom: 3px;
}

.cdek-pvz-card-addr {
    font-size: 11px;
    color: #555;
    margin-bottom: 8px;
    line-height: 1.35;
}

.cdek-pvz-card-btn {
    background: #3d7ec9;
    color: #fff;
    border: none;
    padding: 6px 12px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
}

body.cdek-map-open {
    overflow: hidden;
}

.bc-order-meta {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin: 0 0 14px;
}

.bc-order-items {
    margin: 0 0 16px;
    padding: 4px 14px;
    list-style: none;
    background: #fff;
    border: 1px solid #e4e4e4;
}

.bc-order-items li {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
    font-size: 13px;
}

.bc-order-items li:last-child {
    border-bottom: none;
}

.bc-order-items .sum {
    flex-shrink: 0;
    font-weight: 700;
    color: #111;
}

.bc-back {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    margin-bottom: 6px;
    color: #2a6cb8;
    text-decoration: none;
    font-size: 13px;
    font-weight: 650;
}

.bc-back:hover {
    text-decoration: underline;
}

@media (max-width: 900px) {
    html {
        height: auto;
    }

    .bc-body:not(.bc-auth-page) {
        height: auto;
        min-height: 100dvh;
        overflow: visible;
        overflow-x: hidden;
    }

    .bc-app {
        display: flex;
        flex-direction: column;
        grid-template-columns: none;
        height: auto;
        min-height: 100dvh;
        overflow: visible;
    }

    .bc-sidebar {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        flex-direction: row;
        align-items: stretch;
        height: auto;
        z-index: 30;
        border-top: 1px solid #1f1f1f;
        padding-bottom: env(safe-area-inset-bottom);
    }

    .bc-sidebar-logo {
        display: none;
    }

    .bc-nav {
        flex-direction: row;
        flex: 1;
        padding: 4px 4px 6px;
        gap: 2px;
        justify-content: stretch;
    }

    .bc-nav a {
        flex: 1;
        min-height: 52px;
        gap: 3px;
    }

    .bc-nav a span,
    .bc-sidebar-foot a span {
        position: static;
        transform: none;
        opacity: 1;
        visibility: visible;
        background: none;
        box-shadow: none;
        padding: 0;
        font-size: 10px;
        color: inherit;
        max-width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        line-height: 1.2;
    }

    .bc-nav a.is-on::before {
        display: none;
    }

    .bc-sidebar-foot {
        display: none;
    }

    .bc-workspace {
        flex: 1 0 auto;
    }

    .bc-pathbar {
        position: sticky;
        top: 0;
        z-index: 20;
        min-height: calc(48px + env(safe-area-inset-top));
        padding-top: env(safe-area-inset-top);
        padding-left: max(12px, env(safe-area-inset-left));
        padding-right: max(8px, env(safe-area-inset-right));
        gap: 8px;
    }

    .bc-path-title {
        display: block;
    }

    .bc-path-trail {
        display: none;
    }

    .bc-user {
        width: 44px;
        height: 44px;
        max-width: none;
        padding: 0;
        justify-content: center;
    }

    .bc-user-text,
    .bc-user > i {
        display: none;
    }

    .bc-user img,
    .bc-user-letter {
        width: 28px;
        height: 28px;
        border-radius: 50%;
    }

    .bc-user-letter {
        font-size: 12px;
    }

    .bc-menu-drop {
        min-width: 220px;
        right: 0;
        border-radius: 8px;
    }

    .bc-menu-drop a {
        padding: 14px 16px;
        font-size: 15px;
        min-height: 48px;
    }

    .bc-page-profile .bc-toolbar {
        display: none;
    }

    .bc-toolbar {
        padding: 8px max(12px, env(safe-area-inset-left)) 8px max(12px, env(safe-area-inset-right));
    }

    .bc-tool-btn {
        min-height: 44px;
        width: 100%;
        font-size: 15px;
        border-radius: 8px;
    }

    .bc-sheet {
        padding: 16px 16px 20px;
        border-left: 0;
        border-right: 0;
    }

    html:has(.bc-page-profile) {
        height: auto;
        overflow: auto;
    }

    .bc-page-profile.bc-body:not(.bc-auth-page) {
        height: auto !important;
        max-height: none !important;
        overflow: auto !important;
        overflow-x: hidden !important;
        -webkit-overflow-scrolling: touch;
    }

    .bc-page-profile .bc-app,
    .bc-page-profile .bc-workspace,
    .bc-page-profile .bc-main {
        height: auto !important;
        max-height: none !important;
        overflow: visible !important;
    }

    .bc-page-profile .bc-main {
        padding: 0 0 calc(140px + env(safe-area-inset-bottom));
    }

    .bc-page-profile .bc-main > .bc-flash {
        max-width: none;
        margin: 12px 12px 0;
        border-radius: 8px;
    }

    .bc-page-profile .bc-sheet {
        padding: 18px 16px 24px;
    }

    .bc-page-profile .bc-title {
        font-size: 22px;
        margin-bottom: 8px;
    }

    .bc-page-profile .bc-lead {
        font-size: 14px;
        margin-bottom: 18px;
    }

    .bc-page-profile .bc-form input:not([type="hidden"]):not([type="radio"]):not([type="checkbox"]):not([type="file"]),
    .bc-page-profile .bc-form textarea,
    .bc-page-profile .bc-form select {
        font-size: 16px !important;
        min-height: 48px;
        -webkit-user-select: text !important;
        user-select: text !important;
        pointer-events: auto !important;
        touch-action: manipulation;
        caret-color: auto;
        background: #fff;
    }

    .bc-page-profile .bc-form textarea {
        min-height: 120px;
    }

    .bc-page-profile .bc-form .bc-actions {
        position: fixed;
        left: 0;
        right: 0;
        bottom: calc(62px + env(safe-area-inset-bottom));
        z-index: 28;
        margin: 0;
        padding: 10px 16px;
        background: #fff;
        border-top: 1px solid #e8e8e8;
        box-shadow: 0 -8px 20px rgba(0, 0, 0, 0.08);
    }

    .bc-page-profile .bc-form .bc-actions .bc-btn {
        width: 100%;
        min-height: 48px;
        font-size: 15px;
        border-radius: 8px;
        pointer-events: auto;
    }

    .bc-logo-edit {
        flex-wrap: wrap;
        gap: 12px;
    }

    .bc-logo-edit .bc-btn {
        flex: 1;
        min-width: 140px;
        min-height: 44px;
    }

    .bc-fm {
        margin: 0 -12px;
        border-left: 0;
        border-right: 0;
    }

    .bc-fm-table thead {
        display: none;
    }

    .bc-fm-table,
    .bc-fm-table tbody {
        display: block;
        width: 100%;
    }

    .bc-fm-table tbody tr {
        display: flex;
        align-items: center;
        gap: 10px;
        padding: 12px;
        border-bottom: 1px solid #ececec;
    }

    .bc-fm-table tbody tr:last-child {
        border-bottom: 0;
    }

    .bc-fm-table td {
        border: 0;
        padding: 0;
        width: auto;
    }

    .bc-fm-check {
        width: auto;
        flex-shrink: 0;
    }

    .bc-fm-table td:nth-child(2) {
        flex: 1;
        min-width: 0;
    }

    .bc-fm-name {
        overflow: hidden;
    }

    .bc-fm-name > span:last-child {
        min-width: 0;
        overflow: hidden;
    }

    .bc-fm-size,
    .bc-fm-perm,
    .bc-fm-date {
        display: none;
    }

    .bc-fm-table td:has(.bc-fm-actions) {
        flex-shrink: 0;
        width: auto;
    }

    .bc-fm-ico-btn {
        width: 40px;
        height: 40px;
    }

    .bc-main {
        overflow: visible;
        padding: 12px 12px calc(88px + env(safe-area-inset-bottom));
    }

    .bc-money,
    .bc-money-2,
    .bc-order-meta {
        grid-template-columns: 1fr 1fr;
        max-width: none;
    }

    .bc-grid:not(.bc-pack) {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .bc-pack {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
        margin: 0 0 14px;
    }

    .bc-form {
        max-width: none;
        padding: 14px;
    }

    .bc-field input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="hidden"]),
    .bc-field select,
    .bc-field textarea {
        font-size: 16px;
        min-height: 44px;
    }

    .bc-form .bc-actions {
        position: sticky;
        bottom: calc(64px + env(safe-area-inset-bottom));
        z-index: 6;
        flex-direction: column;
        margin: 16px -14px 0;
        padding: 12px 14px 8px;
        background: linear-gradient(to top, #f3f3f3 82%, rgba(243, 243, 243, 0));
    }

    .bc-form .bc-actions .bc-btn {
        width: 100%;
        min-height: 44px;
    }

    .bc-seg label {
        flex: 1;
        min-width: 0;
        justify-content: center;
        min-height: 44px;
    }

    .bc-readonly > div {
        grid-template-columns: 1fr;
        gap: 4px;
    }
}

@media (max-width: 640px) {
    .bc-products {
        grid-template-columns: 1fr;
    }

    .bc-table-wrap.is-cards {
        border: 0;
        background: transparent;
        overflow: visible;
    }

    .bc-table-wrap.is-cards thead {
        display: none;
    }

    .bc-table-wrap.is-cards tbody {
        display: flex;
        flex-direction: column;
        gap: 8px;
    }

    .bc-table-wrap.is-cards tbody tr {
        display: block;
        padding: 12px 14px 10px;
        background: #fff;
        border: 1px solid #e4e4e4;
    }

    .bc-table-wrap.is-cards tbody td {
        display: flex;
        justify-content: space-between;
        align-items: flex-start;
        gap: 12px;
        padding: 6px 0;
        border: 0;
        text-align: right;
        word-break: break-word;
    }

    .bc-table-wrap.is-cards tbody td:first-child {
        display: block;
        text-align: left;
        padding: 0 0 8px;
        margin-bottom: 4px;
        border-bottom: 1px solid #f0f0f0;
        font-size: 14px;
    }

    .bc-table-wrap.is-cards tbody td::before {
        content: attr(data-label);
        font-size: 11px;
        font-weight: 700;
        color: #888;
        flex-shrink: 0;
        text-align: left;
    }

    .bc-table-wrap.is-cards tbody td:first-child::before {
        display: none;
    }

    .bc-table-wrap.is-cards tbody td:empty,
    .bc-table-wrap.is-cards tbody td[data-label=""] {
        display: block;
        padding-top: 8px;
        text-align: left;
    }

    .bc-table-wrap.is-cards tbody td[data-label=""]::before {
        display: none;
    }

    .bc-auth {
        padding: 88px 16px 32px;
        align-items: flex-start;
    }
}

@media (max-width: 768px) {
    #cdekMapOverlay {
        z-index: 100000 !important;
        padding: env(safe-area-inset-top) 0 env(safe-area-inset-bottom);
        box-sizing: border-box;
    }

    .cdek-modal {
        height: 100% !important;
        width: 100% !important;
        max-width: none !important;
        border-radius: 0 !important;
    }

    .cdek-modal-body {
        flex-direction: column !important;
    }

    .cdek-map-container {
        display: flex !important;
        flex-direction: column;
        width: 100% !important;
        flex: 0 0 auto !important;
        height: auto !important;
    }

    .cdek-map-container #cdekMap {
        height: 36vh !important;
        min-height: 200px;
    }

    .cdek-search-overlay {
        position: relative !important;
        top: auto !important;
        left: auto !important;
        width: 100% !important;
        padding: 10px 12px 8px;
        box-sizing: border-box;
    }

    .cdek-search-overlay input {
        font-size: 16px !important;
    }

    .cdek-list-toggle,
    .cdek-sidebar-close-mob {
        display: none !important;
    }

    .cdek-sidebar {
        position: relative !important;
        width: 100% !important;
        height: auto !important;
        flex: 1 1 auto !important;
        min-height: 0;
        border-left: none !important;
        border-top: 1px solid #eaeaea;
        transform: none !important;
    }
}
