.brand-mark {
    display: inline-grid; place-items: center; width: 33px; height: 33px; margin-left: .8rem; margin-right: .4rem;
    border-radius: 50%; background: #007bff; color: #fff; font-size: .85rem; font-weight: 700;
}
.user-panel .brand-mark { margin: 0; }
.content .kicker { margin: 0; color: #6c757d; font-size: .75rem; letter-spacing: .08em; text-transform: uppercase; }
.content h1 { font-size: 1.6rem; font-weight: 500; }
.content h2 { font-size: 1.1rem; font-weight: 600; }
.page-help { color: #6c757d; margin: .25rem 0 .75rem; }
.quick-actions { display: flex; flex-wrap: wrap; gap: .5rem; margin: 0 0 1rem; }
.content .cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; margin-bottom: 1rem; }
.content .stat {
    position: relative; display: block; overflow: hidden; min-height: 92px; padding: .9rem 1rem 1rem;
    border-radius: .25rem; color: #fff; text-decoration: none; box-shadow: 0 0 1px rgba(0,0,0,.125), 0 1px 3px rgba(0,0,0,.2);
}
.content .cards > :nth-child(4n+1) { background: #17a2b8; }
.content .cards > :nth-child(4n+2) { background: #dc3545; }
.content .cards > :nth-child(4n+3) { background: #28a745; }
.content .cards > :nth-child(4n+4) { background: #ffc107; color: #1f2d3d; }
.content .stat span { display: block; font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; opacity: .9; }
.content .stat b { display: block; margin-top: .35rem; font-size: 1.6rem; font-weight: 700; line-height: 1.1; }
.content .stat i { position: absolute; right: 12px; top: 8px; font-size: 4rem; opacity: .2; }
.content .stat:hover { filter: brightness(1.05); color: inherit; }
.chart-card, .desk-panel, .panel-card, .content > form, .content article, .desk-form, .rug-form fieldset {
    background: #fff; border: 1px solid rgba(0,0,0,.125); border-radius: .25rem; padding: 1rem 1.1rem; margin: 0 0 1rem;
    box-shadow: 0 0 1px rgba(0,0,0,.125), 0 1px 3px rgba(0,0,0,.08);
}
.rug-form fieldset { border: 1px solid rgba(0,0,0,.125); }
.rug-form legend { width: auto; padding: 0 .4rem; font-size: 1rem; font-weight: 600; }
.chart-head, .admin-pagehead { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.admin-pagehead { margin-bottom: 1rem; }
.admin-pagehead > div { min-width: 0; flex: 1 1 auto; }
.admin-pagehead > .btn, .admin-pagehead > a.btn { flex: 0 0 auto; }
.admin-pagehead .page-help { margin: 0; }
.admin-pagehead:not(:has(a)) h1,
.admin-pagehead:not(:has(a)) .kicker { display: none; }
.admin-pagehead:not(:has(a)):not(:has(.page-help)) { display: none; }
.social-list { display: grid; gap: .55rem; margin: 0 0 1rem; }
.social-row { display: grid; grid-template-columns: 11rem minmax(0, 1fr); gap: .6rem; }
.social-row select, .social-row input { width: 100%; min-height: 38px; }
.inline-add, .stack-form { width: 100%; }
.inline-add { display: flex; flex-wrap: wrap; gap: .75rem; align-items: flex-end; }
.inline-add .field { flex: 1 1 12rem; min-width: 0; }
.content .inline-add .field, .content .stack-form .field { margin-bottom: 0; }
.inline-add > .btn, .inline-add > button { flex: 0 0 auto; }
.check-inline { display: inline-flex; align-items: center; gap: .4rem; margin: 0 0 .35rem; font-weight: 400; white-space: nowrap; }
.stack-form { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem 1rem; align-items: end; }
.stack-form > h2, .stack-form > p, .stack-form > .theme-gallery, .stack-form > .span-2,
.stack-form > .btn, .stack-form > button, .stack-form > a.btn, .stack-form > .check-inline, .stack-form > label { grid-column: 1 / -1; }
.stack-form > .btn, .stack-form > button, .stack-form > a.btn, .stack-form > .check-inline, .stack-form > label { justify-self: start; width: auto; }
.stack-form > .theme-gallery, .stack-form > .span-2 { justify-self: stretch; width: 100%; }
.plain-list { list-style: none; margin: 0 0 .75rem; padding: 0; }
.item-row { display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: .65rem 0; border-top: 1px solid #dee2e6; }
.item-row form { display: flex; margin: 0; }
.perm-grid { display: flex; flex-wrap: wrap; gap: .55rem 1rem; align-items: center; }
.perm-grid label { font-weight: 400; margin: 0; }
@media (max-width: 800px) {
    .stack-form { grid-template-columns: 1fr; }
}
.content .container-fluid > table,
.content > table {
    border: 1px solid rgba(0,0,0,.125); border-radius: .25rem; overflow: hidden;
    box-shadow: 0 0 1px rgba(0,0,0,.125), 0 1px 3px rgba(0,0,0,.08);
}
.content table { width: 100%; background: #fff; border-collapse: collapse; margin-bottom: 1rem; }
.content th, .content td { padding: .7rem .75rem; border-top: 1px solid #dee2e6; vertical-align: middle; }
.content th { border-bottom: 2px solid #dee2e6; background: #f8f9fa; color: #495057; font-size: .78rem; letter-spacing: .04em; text-transform: uppercase; }
.desk-panel table, .panel-card table { box-shadow: none; }
.desk-toolbar, .order-filters { display: flex; flex-wrap: wrap; gap: .75rem; align-items: flex-end; width: 100%; }
.desk-toolbar > .field, .order-filters > .field { margin: 0; min-width: 0; flex: 1 1 14rem; }
.content .desk-toolbar > .field, .content .order-filters > .field { margin-bottom: 0; }
.desk-toolbar > .btn, .order-filters > .btn, .desk-toolbar > a.btn, .order-filters > a.btn { flex: 0 0 auto; }
.content .field { margin-bottom: .9rem; }
.content .field label, .content label { font-weight: 600; }
.content input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
.content select, .content textarea {
    display: block; width: 100%; max-width: 100%; padding: .45rem .7rem; border: 1px solid #ced4da; border-radius: .25rem; background: #fff; color: #495057;
}
.content .inline-form input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
.content .inline-form select,
.content .stock-form input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
.content .staff-row select {
    display: inline-block; width: 7rem; min-width: 0; max-width: 16rem;
}
.inline-form, .stock-form, .content td form { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; }
.pin-form { position: absolute; width: 1px; height: 1px; margin: 0; padding: 0; overflow: hidden; }
.content td { position: relative; }
.content .inline-form label, .content .stock-form label, .content .staff-row label, .content .tax-edit label {
    display: inline-flex; align-items: center; gap: .35rem; margin: 0; font-weight: 400; white-space: nowrap;
}
.staff-row {
    display: grid; grid-template-columns: minmax(160px, 1.4fr) minmax(140px, .8fr) auto auto;
    gap: .75rem; align-items: center; padding: .75rem 0; border-top: 1px solid #dee2e6;
}
.staff-row strong, .staff-row span { display: block; }
.staff-row span { color: #6c757d; font-size: .85rem; }
.tax-list { padding: 0; overflow: hidden; }
.tax-head, .tax-edit {
    display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) auto auto; gap: .6rem; align-items: center;
}
.tax-head { background: #f8f9fa; color: #495057; font-size: .78rem; letter-spacing: .04em; text-transform: uppercase; border-top: 0; }
.tax-archive-spacer { width: 92px; flex: 0 0 92px; }
.tax-row { display: flex; gap: .5rem; align-items: center; padding: .75rem 1rem; border-top: 1px solid #dee2e6; }
.tax-edit { flex: 1; min-width: 0; }
.tax-edit input:not([type="checkbox"]):not([type="hidden"]) { width: 100%; max-width: none; display: block; }
.tax-empty { margin: 0; padding: 1rem; color: #6c757d; }
.content form button[type="submit"]:not(.password-toggle) {
    display: inline-flex; align-items: center; justify-content: center; width: auto; min-height: 36px; padding: .35rem .85rem;
    border: 0; border-radius: .25rem; background: #007bff; color: #fff; cursor: pointer;
}
.content details:not([open]) > :not(summary) { display: none; }
.zone-foot { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin-top: .35rem; padding-top: .85rem; border-top: 1px solid #dee2e6; }
.zone-foot > form { display: inline-flex; width: auto; margin: 0; }
.zone-foot > details { display: block; }
.zone-foot > details[open] { flex: 1 1 100%; }
.zone-foot > details[open] > form { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; width: 100%; margin-top: .75rem; }
.zone-foot > details[open] > form .field { margin: 0; }
.zone-foot > details[open] > form .span-2, .zone-foot > details[open] > form .check-inline, .zone-foot > details[open] > form button { grid-column: 1 / -1; justify-self: start; }
.content td:has(> details), .content article > details + form { vertical-align: middle; }
.content td:has(> details) { white-space: nowrap; text-align: right; width: 1%; }
.content td:has(> details) > details, .content article > details { display: inline-block; vertical-align: middle; text-align: left; }
.content td:has(> details) > form, .content article > details + form { display: inline-flex; width: auto; margin: 0 0 0 .4rem; }
.content details > summary {
    display: inline-flex; align-items: center; min-height: 36px; padding: .35rem .85rem; border-radius: .25rem;
    background: #007bff; color: #fff; cursor: pointer; list-style: none;
}
.content details > summary::-webkit-details-marker { display: none; }
.content td details[open], .content article > details[open] { display: block; white-space: normal; margin-bottom: .75rem; }
.content td details[open] > form { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; width: min(42rem, 100%); margin-top: .75rem; }
.content td details[open] > form .field { margin: 0; }
.content td details[open] > form textarea, .content td details[open] > form .span-2 { grid-column: 1 / -1; }
.content td details[open] > form button { justify-self: start; }
.content form button.ghost, .content form button.btn.ghost { background: #6c757d; }
@media (max-width: 800px) {
    .tax-edit, .staff-row { grid-template-columns: 1fr; }
}
.content .btn, .content button.btn {
    display: inline-flex; align-items: center; justify-content: center; min-height: 36px; padding: .35rem .85rem;
    border: 0; border-radius: .25rem; background: #007bff; color: #fff; cursor: pointer; text-decoration: none;
}
.content .btn.ghost, .content button.btn.ghost { background: #6c757d; }
.content .btn:hover, .content button.btn:hover { filter: brightness(.95); color: #fff; }
.row-action { display: inline-flex; align-items: center; min-height: 30px; padding: 0 .65rem; border-radius: .25rem; background: #007bff; color: #fff !important; text-decoration: none; font-size: .85rem; }
.status-pill { display: inline-block; padding: .2rem .55rem; border-radius: 10rem; background: #e9ecef; color: #343a40; font-size: .75rem; letter-spacing: .04em; text-transform: uppercase; }
.status-pill.is-live { background: #d4edda; color: #155724; }
.status-pill.is-wait { background: #fff3cd; color: #856404; }
.status-pill.is-stop { background: #f8d7da; color: #721c24; }
.alert { padding: .75rem 1rem; border-radius: .25rem; background: #d4edda; color: #155724; }
.alert.error { background: #f8d7da; color: #721c24; }
.muted, .content small { color: #6c757d; }
.rug-cell { display: flex; align-items: center; gap: .7rem; }
.rug-cell img { width: 52px; height: 40px; object-fit: cover; border-radius: .25rem; background: #e9ecef; }
.rug-cell span { display: flex; flex-direction: column; min-width: 0; }
.rug-cell small { color: #6c757d; }
.content-header .btn { margin-top: 0; }
.content .row > .field { margin-bottom: 0; }
.admin-split { display: grid; grid-template-columns: 1.4fr .8fr; gap: 1rem; align-items: start; }
.desk-stack { display: grid; gap: 1rem; }
.check-row { display: flex; flex-wrap: wrap; gap: .7rem 1rem; margin-bottom: .8rem; }
.chart { display: flex; align-items: flex-end; gap: .35rem; min-height: 150px; }
.chart-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: .3rem; }
.chart-plot { position: relative; width: 100%; height: 120px; }
.chart-bar { position: absolute; left: 50%; bottom: 0; width: 14px; transform: translateX(-50%); border-radius: 4px 4px 0 0; background: #007bff; }
.chart-bar.is-empty { height: 3px !important; background: #dee2e6; }
.chart-day { color: #6c757d; font-size: .75rem; }
.seller-copy { display: grid; min-width: 0; }
.seller-copy a, .seller-copy strong { font-weight: 600; }
.seller-list { list-style: none; margin: .5rem 0 0; padding: 0; display: grid; gap: .75rem; }
.seller-list li.seller-empty { display: block; color: #6c757d; }
.seller-list li { display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: .7rem; align-items: center; }
.seller-rank { width: 36px; height: 36px; display: grid; place-items: center; border-radius: .25rem; background: #e9ecef; font-size: .75rem; }
.seller-meta, .seller-aside { color: #6c757d; font-size: .8rem; }
.seller-track { display: block; height: 4px; margin-top: .35rem; background: #e9ecef; border-radius: 99px; overflow: hidden; }
.seller-track span { display: block; height: 100%; background: #007bff; }
.seller-list li.has-aside { grid-template-columns: 36px minmax(0, 1fr) auto; }
.password-field { position: relative; display: block; }
.password-field input { padding-right: 2.6rem; }
.password-toggle {
    position: absolute; right: .25rem; top: 50%; transform: translateY(-50%);
    width: 2.1rem; height: 2.1rem; margin: 0; padding: 0; border: 0; border-radius: .2rem;
    background: transparent; color: #6c757d; box-shadow: none; line-height: 1;
    display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
}
.password-toggle:hover, .password-toggle[aria-pressed="true"] { background: #e9ecef; color: #343a40; }
input[type="password"] {
    font-family: Verdana, Geneva, sans-serif; font-size: 16px; font-weight: 400; letter-spacing: 0.08em;
}
.profile-mark { width: 72px; height: 72px; margin: 0 auto .75rem; font-size: 1.5rem; }
.box-profile .list-group-item { display: flex; justify-content: space-between; gap: 1rem; }
.box-profile .list-group-item .float-right { float: none; text-align: right; word-break: break-word; }
.login-card-body .form-group > label,
.login-card-body .field > label { display: block; margin-bottom: .35rem; font-weight: 600; }
.login-card-body .field { margin-bottom: 1rem; }
.login-card-body .form-control,
.login-card-body .password-field input { display: block; width: 100%; }
.login-card-body .btn-primary { width: 100%; }
.theme-gallery { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .75rem; margin: 0 0 1.2rem; }
.theme-card { position: relative; display: grid; gap: .2rem; padding: .85rem; border: 1px solid #dee2e6; border-radius: .25rem; background: #fff; cursor: pointer; }
.theme-card input { position: absolute; opacity: 0; }
.theme-card:has(input:checked) { border-color: #007bff; box-shadow: inset 0 0 0 1px #007bff; }
.theme-dots { display: inline-flex; }
.theme-dots i { width: 12px; height: 12px; border-radius: 50%; display: block; margin-right: -4px; border: 1px solid rgba(0,0,0,.15); }
.theme-card small { color: #6c757d; }
@media (max-width: 800px) {
    .theme-gallery { grid-template-columns: 1fr; }
}
.theme-menu { position: relative; }
.theme-menu summary { list-style: none; cursor: pointer; }
.theme-menu summary::-webkit-details-marker { display: none; }
.theme-panel { position: absolute; right: 0; z-index: 30; width: 260px; padding: .4rem; background: #fff; border: 1px solid rgba(0,0,0,.15); border-radius: .25rem; }
.theme-option { display: flex; width: 100%; gap: .5rem; align-items: center; border: 0; background: transparent; text-align: left; padding: .4rem; cursor: pointer; }
.theme-option:hover, .theme-option.is-active { background: #f8f9fa; }
.theme-dots { display: inline-flex; }
.theme-dots i { width: 12px; height: 12px; border-radius: 50%; display: block; margin-right: -3px; border: 1px solid rgba(0,0,0,.15); }
.pagination { display: flex; flex-wrap: wrap; gap: .25rem; }
.pagination svg { width: 16px; height: 16px; }
@media (min-width: 992px) {
    body.sidebar-mini.sidebar-collapse .main-sidebar,
    body.sidebar-mini.sidebar-collapse .main-sidebar::before,
    body.layout-navbar-fixed.sidebar-collapse .brand-link { width: 250px; }
    body.sidebar-mini.sidebar-collapse .content-wrapper,
    body.sidebar-mini.sidebar-collapse .main-footer,
    body.sidebar-mini.sidebar-collapse .main-header { margin-left: 250px !important; }
    body.sidebar-mini.sidebar-collapse .main-sidebar .nav-sidebar .nav-link p,
    body.sidebar-mini.sidebar-collapse .brand-text { display: inline; }
}
@media (max-width: 1100px) {
    .content .cards, .admin-split { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 700px) {
    .content .cards, .admin-split { grid-template-columns: 1fr; }
}
