/*
 * Base from /root/examples/static/common/css/cover.css
 */

.h1, .h2, .h3, h1, h2, h3 {
    margin-top: 10px;
    margin-bottom: 10px;
    color: #1D7891;
}

h4 {
    color: #1D7891;
}

h4.bg-primary, h5.bg-primary {
    color: #191919;
    font-weight: bold;
    background: #D9D9D9 linear-gradient(to right, rgba(176, 216, 250, 0.74) 60px, #f8f9f9 40%) repeat scroll 0 0;
    padding: 8px;
    margin-bottom: 20px;
    margin-top: 10px;
}

h4.bg-primary > small {
    color: #191919;
}

.bg-primary.white {
    font-weight: bold;
    background: #D9D9D9 linear-gradient(to right, rgba(176, 216, 250, 0.74) 10px, #fff 30%) repeat scroll 0 0;
}

hr.line-style {
    margin-top: 10px;
    border-top: 2px solid #1D7891;
}

.input-group-addon:first-child {
    min-width: 40px;
}

textarea {
    resize: vertical;
}

@font-face {
    font-family: logo_font;
    src: url("../fonts/armalite_rifle.eot");
    src: url("../fonts/armalite_rifle.ttf"),
    url("../fonts/armalite_rifle.woff") format('woff'),
    url("../fonts/armalite_rifle.woff2") format('woff2'),
    url("../fonts/armalite_rifle.eot?#iefix") format('embedded-opentype'),
    url("../fonts/armalite_rifle.woff") format('truetype');
}

@font-face {
    font-family: gunplay;
    src: url("../fonts/gunplay.eot");
    src: url("../fonts/gunplay.ttf"),
    url("../fonts/gunplay.woff") format('woff'),
    url("../fonts/gunplay.woff2") format('woff2'),
    url("../fonts/gunplay.eot?#iefix") format('embedded-opentype'),
    url("../fonts/gunplay.woff") format('truetype');
}

body {
    background-color: #f8f8f8;
}

#wrapper {
    width: 100%;
}

#page-wrapper {
    padding: 0 15px;
    min-height: 568px;
    background-color: #f3f5f8;
    background-image:
        radial-gradient(rgba(44, 62, 80, 0.06) 0.7px, transparent 0.7px),
        radial-gradient(rgba(255, 255, 255, 0.85) 0.7px, transparent 0.7px),
        linear-gradient(180deg, #f8f9fb 0%, #edf1f5 100%);
    background-size: 4px 4px, 4px 4px, 100% 100%;
    background-position: 0 0, 2px 2px, 0 0;
}

.main-content {
    padding: 20px 10px;
}

@media (min-width: 768px) {
    #page-wrapper {
        position: inherit;
        margin: 0 0 0 280px;
        padding: 0 30px;
        border-left: 1px solid #8c8c8c;
        -webkit-box-shadow: 2px 0 5px -1px #8c8c8c inset;
        -moz-box-shadow: 2px 0 5px -1px #8c8c8c inset;
        box-shadow: 2px 0 5px -1px #8c8c8c inset;
    }
}

.alert {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 4px;
    border: 1px solid transparent;
    -webkit-box-shadow: 2px 0 5px -1px #8c8c8c;
    -moz-box-shadow: 2px 0 5px -1px #8c8c8c;
    box-shadow: 2px 0 5px -1px #8c8c8c;
}

@-webkit-keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.navbar-default {
    background: #f8f8f8 linear-gradient(to bottom, #f4f4f4 20px, #e0e0e0 100%) repeat scroll 0 0;
    border-color: #d4d4d4;
}

.navbar-top-links {
    margin-right: 0;
}

.navbar-top-links li {
    display: inline-block;
}

.navbar-top-links li:last-child {
    margin-right: 15px;
}

.navbar-top-links li a {
    padding: 15px;
    min-height: 50px;
}

@media (min-width: 768px) {
    .navbar-top-links {
        padding-left: 280px;
    }

    .navbar-default .navbar-brand.page-title {
        font-family: gunplay, serif;
        color: #1b6d85;
        width: auto;
    }
}

.sidebar .sidebar-nav.navbar-collapse {
    padding-right: 0;
    padding-left: 0;
    background-color: #1b6d85;
}

.sidebar .sidebar-logo {
    padding: 11px;
    font-size: 18px;
    font-family: logo_font, serif;
    color: #FFF;
    min-height: 50px;
    text-align: center;
    background: #1b6d85 linear-gradient(to bottom, #5b8ea5 10px, #1b6d85 100%) repeat scroll 0 0;
}

.side-nav {
    border: medium none;
    border-radius: 0;
    overflow-y: auto;
    background-color: #3a4b55;
    bottom: 0;
    overflow-x: hidden;
    padding-bottom: 40px;
    position: fixed;
    top: 0;
    left: 280px;
    width: 280px;
    margin-left: -280px;
}

.sidebar ul li {
    background-color: #3a4b55;
    border-top: 1px solid #49565D;
}

.sidebar ul li a.active {
    background-color: #2d3a42;
    border-left: 3px #70ee6e solid;
}

.nav.side-nav > li > a,
.nav.nav-second-level > li > a,
.nav.nav-third-level > li > a {
    position: relative;
    display: block;
    padding: 10px 15px;
    color: rgba(255, 255, 255, 0.8);
}

.nav.side-nav > li > a:focus,
.nav.side-nav > li > a:hover,
.nav.nav-second-level > li > a:focus,
.nav.nav-second-level > li > a:hover,
.nav.nav-third-level > li > a:focus,
.nav.nav-third-level > li > a:hover {
    text-decoration: none;
    background-color: #2d3a42;
    border-left: 3px #ee9482 solid;
}

@media (min-width: 768px) {
    .sidebar {
        z-index: 1;
        position: absolute;
        width: 280px;
    }
}

.panel {
    box-shadow: 0 0 4px rgba(0,0,0,0.5);
}

.panel-heading {
    font-weight: bold;
}

.audit-log-table td:last-child {
    width: 28%;
}

.audit-detail {
    display: inline-block;
    max-width: 100%;
    white-space: pre-wrap;
    word-break: break-word;
}

.table tr > th,
.table > thead > tr > th,
table.dataTable thead th,
.trade-table thead th,
.market-table thead th,
.mini-table thead th {
    background-color: rgb(24, 178, 200);
    color: #FFF;
    border-bottom: 2px solid #3A4B55;
}

.table-hover > tbody > tr:hover > td {
    background-color: rgba(39, 151, 186, 0.84);
    color: #fff;
}

.text-bold {
    font-weight: bold;
}

.hide {
    display: none;
}

/*
 * Compatibility styles for existing Razor pages.
 * Keeps old template look without extra visual effects.
 */

.content {
    width: 100%;
}

.page-hero,
.card {
    margin-bottom: 20px;
    padding: 15px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-shadow: 0 0 4px rgba(0, 0, 0, 0.2);
}

.page-hero .eyebrow,
.card .eyebrow {
    color: #777;
    font-size: 12px;
    font-weight: bold;
    text-transform: uppercase;
}

.page-hero p,
.section-note,
.inline-help {
    color: #666;
}

.hero-actions,
.actions,
.editor-actions,
.category-links,
.offer-badges,
.row-links,
.source-chip-grid,
.lots-summary,
.status-stack,
.bot-mini-stack,
.group-badges,
.locale-switcher,
.attachment-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.button-primary,
.button-secondary,
.button-danger,
.danger,
.editor-toggle,
.mc-action-btn {
    display: inline-block;
    padding: 6px 12px;
    margin-bottom: 0;
    font-size: 14px;
    font-weight: normal;
    line-height: 1.42857143;
    text-align: center;
    white-space: nowrap;
    vertical-align: middle;
    border: 1px solid transparent;
    border-radius: 4px;
    user-select: none;
    cursor: pointer;
}

.button-primary,
.mc-action-btn.btn-glow-blue,
.mc-action-btn.btn-glow-purple {
    color: #fff;
    background-color: #337ab7;
    border-color: #2e6da4;
}

.button-secondary,
.editor-toggle {
    color: #333;
    background-color: #fff;
    border-color: #ccc;
}

.button-danger,
.danger,
.mc-action-btn.btn-glow-red {
    color: #fff;
    background-color: #d9534f;
    border-color: #d43f3a;
}

.form-shell label,
.field-block,
.field-control {
    display: block;
    margin-bottom: 12px;
}

.form-shell input[type="text"],
.form-shell input[type="search"],
.form-shell input[type="email"],
.form-shell input[type="number"],
.form-shell input[type="password"],
.form-shell input[type="url"],
.form-shell select,
.form-shell textarea,
.field-control input[type="text"],
.field-control input[type="search"],
.field-control input[type="email"],
.field-control input[type="number"],
.field-control input[type="password"],
.field-control input[type="url"],
.field-control select,
.field-control textarea,
.field-block input,
.field-block select,
.field-block textarea {
    display: block;
    width: 100%;
    height: 38px;
    padding: 8px 12px;
    font-size: 14px;
    line-height: 1.42857143;
    color: #2b3d4f;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
    border: 1px solid #bdd2e6;
    border-radius: 8px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55), 0 1px 2px rgba(27, 59, 89, 0.05);
    transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease;
}

.form-shell textarea,
.field-control textarea,
.field-block textarea {
    height: auto;
    min-height: 96px;
}

.form-shell input[type="text"]:focus,
.form-shell input[type="search"]:focus,
.form-shell input[type="email"]:focus,
.form-shell input[type="number"]:focus,
.form-shell input[type="password"]:focus,
.form-shell input[type="url"]:focus,
.form-shell select:focus,
.form-shell textarea:focus,
.field-control input[type="text"]:focus,
.field-control input[type="search"]:focus,
.field-control input[type="email"]:focus,
.field-control input[type="number"]:focus,
.field-control input[type="password"]:focus,
.field-control input[type="url"]:focus,
.field-control select:focus,
.field-control textarea:focus,
.field-block input:focus,
.field-block select:focus,
.field-block textarea:focus {
    border-color: #5ea3d7;
    outline: none;
    box-shadow: 0 0 0 3px rgba(72, 155, 218, 0.16);
}

.form-shell input[type="file"],
.field-block input[type="file"] {
    display: block;
    width: 100%;
    min-height: 42px;
    margin-top: 2px;
    padding: 7px 10px;
    border: 1px dashed #96b7d3;
    border-radius: 8px;
    background: #f7fbff;
    color: #35536d;
}

.form-shell input[type="file"]::file-selector-button,
.field-block input[type="file"]::file-selector-button {
    margin-right: 10px;
    padding: 7px 12px;
    border: 1px solid #2f77ad;
    border-radius: 6px;
    background: linear-gradient(180deg, #4a9bda 0%, #337ab7 100%);
    color: #fff;
    font-weight: 600;
    cursor: pointer;
    transition: filter .15s ease, transform .08s ease;
}

.form-shell input[type="file"]::file-selector-button:hover,
.field-block input[type="file"]::file-selector-button:hover {
    filter: brightness(1.06);
}

.form-shell input[type="file"]::file-selector-button:active,
.field-block input[type="file"]::file-selector-button:active {
    transform: translateY(1px);
}

.field-error {
    color: #a94442;
    font-size: 12px;
}

.has-error input,
.has-error textarea,
.has-error select {
    border-color: #a94442 !important;
}

.toggle-grid,
.mc-stats-grid,
.toolbar-grid,
.row-grid,
.editor-grid,
.lot-edit-grid,
.overview-grid,
.market-settings-grid,
.market-help-grid,
.category-index,
.details-list {
    display: grid;
    gap: 10px;
}

.toggle-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.toolbar-grid {
    grid-template-columns: 2fr 1fr;
}

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

.editor-grid,
.lot-edit-grid,
.market-help-grid,
.market-settings-grid {
    grid-template-columns: 1fr 1fr;
}

.overview-grid {
    grid-template-columns: repeat(4, 1fr);
}

.field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.field-wide,
.editor-wide,
.market-field-wide {
    grid-column: 1 / -1;
}

.model-catalog-shell {
    overflow-x: auto;
    margin-bottom: 12px;
}

.model-catalog-table {
    margin-bottom: 0;
}

.model-catalog-table th,
.model-catalog-table td {
    vertical-align: middle !important;
}

.model-catalog-table input[type="text"],
.model-catalog-table input[type="number"] {
    min-width: 160px;
    margin-bottom: 0;
}

.model-actions-col {
    width: 1%;
    white-space: nowrap;
    text-align: right;
}

.check-tile,
.table-check {
    display: inline-flex;
    gap: 10px;
    align-items: center;
    font-weight: normal;
    cursor: pointer;
}

.check-tile {
    padding: 6px 10px;
    border: 1px solid #d5e3f0;
    border-radius: 8px;
    background: #f8fbff;
}

.check-tile:hover {
    border-color: #a9c5dc;
    background: #f1f8ff;
}

.main-content input[type="checkbox"],
.main-content input[type="radio"] {
    appearance: none;
    -webkit-appearance: none;
    width: 19px;
    height: 19px;
    margin: 0;
    border: 1px solid #6d90ac;
    background: #fff;
    position: relative;
    cursor: pointer;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75);
    transition: border-color .15s ease, background-color .15s ease, box-shadow .15s ease;
}

.main-content input[type="checkbox"] {
    border-radius: 6px;
}

.main-content input[type="radio"] {
    border-radius: 50%;
}

.main-content input[type="checkbox"]:hover,
.main-content input[type="radio"]:hover {
    border-color: #2f77ad;
    box-shadow: 0 0 0 3px rgba(72, 155, 218, 0.14);
}

.main-content input[type="checkbox"]:checked,
.main-content input[type="radio"]:checked {
    border-color: #1f8aa4;
    background: #1f8aa4;
}

.main-content input[type="checkbox"]:checked::after {
    content: "";
    position: absolute;
    left: 6px;
    top: 2px;
    width: 5px;
    height: 10px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.main-content input[type="radio"]:checked::after {
    content: "";
    position: absolute;
    left: 4px;
    top: 4px;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #fff;
}

.main-content input[type="checkbox"]:focus-visible,
.main-content input[type="radio"]:focus-visible {
    outline: 2px solid #6bc3ff;
    outline-offset: 2px;
}

.table-check input[type="checkbox"] {
    margin: 0;
}

.summary-chip,
.status-pill,
.table-badge,
.inline-pill,
.stock-inline,
.js-stock-pill,
.js-editor-stock-pill,
.market-recommendation {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    border: 1px solid #ccc;
    background: #f5f5f5;
    color: #333;
    font-size: 12px;
}

.table-badge.is-link {
    background: #e9f4ff;
    border-color: #b9d5ee;
    color: #225d86;
}

.inline-pill.is-success,
.status-pill.is-success,
.stock-inline.is-success,
.js-stock-pill.is-success,
.js-editor-stock-pill.is-success,
.market-recommendation.is-good {
    background: #dff0d8;
    border-color: #d6e9c6;
    color: #3c763d;
}

.inline-pill.is-warning,
.status-pill.is-warning,
.stock-inline.is-warning,
.js-stock-pill.is-warning,
.js-editor-stock-pill.is-warning,
.market-recommendation.is-warning {
    background: #fcf8e3;
    border-color: #faebcc;
    color: #8a6d3b;
}

.market-price-good {
    background: #dff0d8;
    border-color: #d6e9c6;
    color: #3c763d;
    font-weight: 600;
}

.market-price-warning {
    background: #fcf8e3;
    border-color: #faebcc;
    color: #8a6d3b;
    font-weight: 600;
}

.market-price-bad {
    background: #f2dede;
    border-color: #ebccd1;
    color: #a94442;
    font-weight: 600;
}

.market-recommended {
    color: #2563eb;
    font-weight: 600;
}

.market-delta-good {
    color: #3c763d;
    font-weight: 600;
}

.market-delta-bad {
    color: #a94442;
    font-weight: 600;
}

.link-button {
    background: none;
    border: none;
    color: #2563eb;
    cursor: pointer;
    padding: 0;
    font: inherit;
    text-decoration: underline;
}

.link-button:hover {
    color: #1d4ed8;
}

.inline-pill.is-loading,
.status-pill.is-loading,
.summary-chip.is-loading {
    background: #eef5fb;
    border-color: #c4dbef;
    color: #2f5d7c;
}

.inline-pill.is-danger,
.status-pill.is-danger,
.summary-chip.is-danger {
    background: #f2dede;
    border-color: #ebccd1;
    color: #a94442;
}

.stock-inline.is-danger,
.js-stock-pill.is-danger,
.js-editor-stock-pill.is-danger,
.market-recommendation.is-bad {
    background: #f2dede;
    border-color: #ebccd1;
    color: #a94442;
}

.surface-note {
    padding: 10px 12px;
    border-radius: 4px;
    margin: 8px 0;
    background: #d9edf7;
    border: 1px solid #bce8f1;
    color: #31708f;
}

.surface-note.is-warning {
    background: #fcf8e3;
    border-color: #faebcc;
    color: #8a6d3b;
}

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

.section-head h3,
.lot-group-head h4 {
    margin: 4px 0;
}

.category-meta,
.metric-note,
.detail-label,
.platform-meta,
.file-caption,
.muted-cell {
    color: #777;
}

.trade-table-shell,
.market-table-shell {
    overflow-x: auto;
}

.trade-table,
.market-table,
.mini-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
}

.trade-table th,
.trade-table td,
.market-table th,
.market-table td,
.mini-table th,
.mini-table td {
    border: 1px solid #ddd;
    padding: 8px;
    vertical-align: top;
}

.template-library-table tr.is-selected-row td {
    background: #eef6ff;
}

.market-lot-cell,
.offer-title,
.market-table td,
.mini-table td {
    word-break: break-word;
}

.editor-row {
    display: none;
}

.editor-row.is-open {
    display: table-row;
}

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

.lot-language-toolbar {
    display: grid;
    gap: 12px;
    margin-bottom: 16px;
    padding: 12px 14px;
    border: 1px solid #d5e3f0;
    border-radius: 12px;
    background: #f8fbff;
}

.lot-language-switcher,
.lot-language-actions,
.attachment-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.lot-translate-status {
    margin: 0;
}

.attachment-card {
    border: 1px solid #ddd;
    border-radius: 8px;
    background: #fff;
    overflow: hidden;
}

.attachment-preview-trigger {
    display: block;
    width: 100%;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: zoom-in;
}

.attachment-card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    display: block;
    border-bottom: 1px solid #d8e4ee;
}

.attachment-placeholder {
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #777;
    background: linear-gradient(180deg, #f3f8fd 0%, #ebf2f9 100%);
}

.attachment-meta,
.attachment-actions {
    padding: 8px;
}

.attachment-meta {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    align-items: center;
}

.image-preview-modal {
    position: fixed;
    inset: 0;
    z-index: 1200;
}

.image-preview-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(4, 11, 20, 0.82);
}

.image-preview-dialog {
    position: relative;
    z-index: 1;
    width: min(1080px, calc(100vw - 32px));
    max-height: calc(100vh - 32px);
    margin: 16px auto;
    padding: 14px;
    border-radius: 14px;
    border: 1px solid rgba(116, 155, 189, 0.28);
    background: #10202f;
    color: #e7f3ff;
    box-shadow: 0 18px 70px rgba(0, 0, 0, 0.45);
}

.image-preview-header,
.image-preview-footer {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    align-items: center;
}

.image-preview-stage {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 320px;
    max-height: calc(100vh - 180px);
    margin: 12px 0;
}

.image-preview-stage img {
    max-width: 100%;
    max-height: calc(100vh - 210px);
    border-radius: 10px;
    object-fit: contain;
}

.image-preview-close {
    border: 0;
    background: transparent;
    color: #dfefff;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
}

.radio-pill {
    display: inline-block;
    padding: 4px 8px;
    border: 1px solid #ccc;
    border-radius: 12px;
    background: #fff;
    cursor: pointer;
}

.radio-pill.is-active {
    background: #337ab7;
    border-color: #2e6da4;
    color: #fff;
}

.locale-switcher-button {
    display: inline-block;
    padding: 7px 14px;
    border: 1px solid #c5d7e7;
    border-radius: 10px;
    background: linear-gradient(180deg, #ffffff 0%, #f2f7fc 100%);
    color: #38526b;
    font-weight: 600;
    cursor: pointer;
    transition: border-color .15s ease, background-color .15s ease, box-shadow .15s ease, color .15s ease;
}

.locale-switcher-button:hover {
    border-color: #8eb8d8;
    background: #eef6ff;
}

.locale-switcher-button.is-active {
    background: linear-gradient(180deg, #4a9bda 0%, #337ab7 100%);
    border-color: #2e6da4;
    color: #fff;
    box-shadow: 0 0 0 2px rgba(51, 122, 183, 0.16);
}

.locale-switcher-button:focus-visible {
    outline: 2px solid rgba(94, 163, 215, 0.5);
    outline-offset: 2px;
}

.range-box {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 6px;
    align-items: center;
}

.back-pill {
    display: inline-block;
    margin-bottom: 8px;
    padding: 2px 10px;
    border: 1px solid #ccc;
    border-radius: 12px;
    color: #555;
    background: #f5f5f5;
}

.notification-nav-item {
    padding: 10px 0;
}

.notification-btn {
    margin-right: 8px;
}

.theme-toggle-btn {
    margin-right: 8px;
}

.notification-count.is-hidden,
.is-hidden,
.hidden,
.visually-hidden {
    display: none !important;
}

.toast-stack {
    position: fixed;
    right: 10px;
    top: 10px;
    width: 320px;
    max-width: calc(100vw - 20px);
    z-index: 1040;
}

.toast-item {
    margin-bottom: 8px;
    padding: 10px;
    border-radius: 4px;
    border: 1px solid #bce8f1;
    background: #d9edf7;
    color: #31708f;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
    opacity: 0;
    transform: translateY(-6px);
    transition: opacity .2s ease, transform .2s ease;
}

.toast-item.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.toast-title {
    font-weight: bold;
    margin-bottom: 4px;
}

.category-catalog-tool {
    margin-top: 10px;
    padding: 10px;
    border: 1px dashed #c7d6e5;
    border-radius: 4px;
    background: #f8fbff;
}

.category-catalog-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 8px 0;
}

.category-letter-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 8px 0;
}

.letter-chip {
    display: inline-block;
    padding: 4px 10px;
    border: 1px solid #ccc;
    border-radius: 12px;
    background: #fff;
    color: #333;
    cursor: pointer;
}

.letter-chip.is-active {
    background: #337ab7;
    border-color: #2e6da4;
    color: #fff;
}

.category-catalog-status {
    margin: 8px 0;
}

.category-catalog-list {
    max-height: 380px;
    overflow: auto;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #fff;
    padding: 6px;
}

.catalog-section-item {
    display: flex;
    gap: 10px;
    padding: 8px;
    margin-bottom: 6px;
    border: 1px solid #e5e5e5;
    border-radius: 4px;
    background: #fff;
    cursor: pointer;
}

.catalog-section-item:last-child {
    margin-bottom: 0;
}

.catalog-section-item:hover {
    background: #f5f9fc;
}

.catalog-section-item input[type="checkbox"] {
    margin-top: 2px;
}

.catalog-section-body {
    min-width: 0;
}

.catalog-section-body strong {
    display: block;
}

.catalog-section-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 4px 0;
}

.catalog-subcategories {
    font-size: 12px;
    color: #666;
    word-break: break-word;
}

/*
 * Plugin editor (Monaco workspace)
 */

.plugin-dev-layout {
    display: grid;
    grid-template-columns: minmax(280px, 320px) minmax(0, 1fr);
    gap: 12px;
}

.plugin-dev-sidebar {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 0;
}

.plugin-dev-main {
    min-width: 0;
}

.plugin-shortcut-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.plugin-editor-caption {
    margin-bottom: 6px;
    font-size: 13px;
    font-weight: bold;
    color: #555;
}

.plugin-monaco-host {
    width: 100%;
    height: 64vh;
    min-height: 420px;
    border: 1px solid #cfd8e3;
    border-radius: 4px;
    overflow: hidden;
    background: #fff;
}

.plugin-monaco-host.plugin-monaco-host-script {
    height: 34vh;
    min-height: 240px;
}

.plugin-inline-alert {
    margin-top: 6px;
    margin-bottom: 0;
}

.plugin-diagnostic-list {
    margin-top: 8px;
    margin-bottom: 0;
    max-height: 220px;
    overflow: auto;
    padding-left: 18px;
}

.plugin-diagnostic-item code {
    white-space: pre-wrap;
}

.plugin-diagnostic-item.severity-error code {
    color: #b52d2a;
}

.plugin-diagnostic-item.severity-warning code {
    color: #8a6d3b;
}

.plugin-script-output {
    white-space: pre-wrap;
    margin-top: 8px;
    margin-bottom: 0;
}

@media (max-width: 1200px) {
    .plugin-dev-layout {
        grid-template-columns: 1fr;
    }

    .plugin-monaco-host {
        height: 54vh;
    }

    .plugin-monaco-host.plugin-monaco-host-script {
        height: 30vh;
    }
}

/*
 * Status page tweaks
 */

.mission-control {
    max-width: 1180px;
}

.mc-core-panel {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 12px;
    margin-bottom: 12px;
}

.mc-status-panel {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 14px 15px;
    box-shadow: 0 0 4px rgba(0, 0, 0, 0.2);
}

.mc-status-line {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.mc-connect-text {
    font-size: 33px;
    line-height: 1.18;
    color: #222;
}

.mc-status-account {
    margin-top: 8px;
    color: #666;
}

.mc-launch-actions form {
    margin-bottom: 0;
}

.mc-launch-actions .mc-action-btn {
    width: 100%;
    margin-bottom: 8px;
    text-align: left;
}

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

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

.status-kpi-grid,
.status-capacity-grid {
    display: grid;
    gap: 12px;
    margin-bottom: 12px;
}

.status-kpi-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.status-capacity-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.metric-card,
.info-card {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 12px 14px;
    box-shadow: 0 0 4px rgba(0, 0, 0, 0.2);
}

.status-metric-card {
    border-left-width: 3px;
}

.status-metric-card .metric-label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.status-metric-card .metric-value {
    margin-top: 6px;
    font-size: 27px;
    font-weight: 700;
    line-height: 1.22;
    color: #173148;
}

.status-metric-card .metric-note {
    margin-top: 6px;
    line-height: 1.34;
    word-break: break-word;
}

.status-metric-card.is-success {
    border-left-color: #46b578;
}

.status-metric-card.is-warning {
    border-left-color: #d29b37;
}

.status-metric-card.is-danger {
    border-left-color: #bc5a66;
}

.status-metric-card.is-neutral {
    border-left-color: #9ba9b8;
}

.status-health-card .details-list {
    margin-top: 4px;
}

.status-detail-stack {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.inline-form {
    display: inline;
}

.mk-accounts-table td {
    word-break: break-word;
}

.rarity-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    white-space: nowrap;
}

.rarity-badge.rarity-diamond {
    background: linear-gradient(135deg, #e0f0ff, #b3d4fc);
    color: #1a5fb4;
}

.rarity-badge.rarity-gold {
    background: linear-gradient(135deg, #fff5cc, #ffe066);
    color: #8a6d00;
}

.rarity-badge.rarity-silver {
    background: linear-gradient(135deg, #f0f0f0, #c8c8c8);
    color: #555;
}

.rarity-badge.rarity-bronze {
    background: linear-gradient(135deg, #f5e0cc, #d4a574);
    color: #6b3a1f;
}

.rarity-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 4px;
    vertical-align: middle;
}

.rarity-dot.rarity-diamond {
    background: #4a9eff;
}

.rarity-dot.rarity-gold {
    background: #f0c030;
}

.rarity-dot.rarity-silver {
    background: #a8a8a8;
}

.rarity-dot.rarity-bronze {
    background: #cd7f32;
}

.detail-row {
    padding: 8px 0;
    border-bottom: 1px solid #eee;
}

.detail-row:last-child {
    border-bottom: 0;
}

.detail-value code {
    font-size: 14px;
}

/*
 * Dark theme
 */

body.theme-dark {
    background-color: #101926;
    color: #d6e1ee;
}

body.theme-dark .h1,
body.theme-dark .h2,
body.theme-dark .h3,
body.theme-dark h1,
body.theme-dark h2,
body.theme-dark h3,
body.theme-dark h4 {
    color: #7ec6ff;
}

body.theme-dark .navbar-default {
    background: #1b2a3a linear-gradient(to bottom, #24384d 20px, #1a2b3d 100%) repeat scroll 0 0;
    border-color: #31485f;
}

body.theme-dark .navbar-default .navbar-brand.page-title {
    color: #9ed6ff;
}

body.theme-dark .navbar-top-links .navbar-brand.page-title {
    color: #c9d8e6;
}

body.theme-dark .sidebar .sidebar-nav.navbar-collapse {
    background-color: #173048;
}

body.theme-dark .sidebar .sidebar-logo {
    color: #fff;
    background: #173048 linear-gradient(to bottom, #2b4f72 10px, #173048 100%) repeat scroll 0 0;
}

body.theme-dark .side-nav {
    background-color: #243547;
}

body.theme-dark .sidebar ul li {
    background-color: #243547;
    border-top-color: #37516b;
}

body.theme-dark .sidebar ul li a.active {
    background-color: #1a2a3b;
    border-left-color: #53ce95;
}

body.theme-dark .nav.side-nav > li > a,
body.theme-dark .nav.nav-second-level > li > a,
body.theme-dark .nav.nav-third-level > li > a {
    color: #d4e2f0;
}

body.theme-dark .nav.side-nav > li > a:focus,
body.theme-dark .nav.side-nav > li > a:hover,
body.theme-dark .nav.nav-second-level > li > a:focus,
body.theme-dark .nav.nav-second-level > li > a:hover,
body.theme-dark .nav.nav-third-level > li > a:focus,
body.theme-dark .nav.nav-third-level > li > a:hover {
    background-color: #1a2a3b;
    border-left-color: #7fc5ff;
}

body.theme-dark #page-wrapper {
    background-color: #152131;
    background-image:
        radial-gradient(rgba(255, 255, 255, 0.045) 0.8px, transparent 0.8px),
        radial-gradient(rgba(0, 0, 0, 0.24) 0.8px, transparent 0.8px),
        linear-gradient(180deg, #1a2737 0%, #121d2b 100%);
    background-size: 4px 4px, 4px 4px, 100% 100%;
    background-position: 0 0, 2px 2px, 0 0;
}

@media (min-width: 768px) {
    body.theme-dark #page-wrapper {
        border-left-color: #31485f;
        -webkit-box-shadow: 2px 0 5px -1px #162433 inset;
        -moz-box-shadow: 2px 0 5px -1px #162433 inset;
        box-shadow: 2px 0 5px -1px #162433 inset;
    }
}

body.theme-dark .page-hero,
body.theme-dark .card,
body.theme-dark .mc-status-panel,
body.theme-dark .metric-card,
body.theme-dark .info-card {
    background: #1c2b3b;
    border-color: #31485f;
    box-shadow: 0 0 4px rgba(0, 0, 0, 0.45);
    color: #d6e1ee;
}

body.theme-dark .page-hero .eyebrow,
body.theme-dark .card .eyebrow,
body.theme-dark .section-note,
body.theme-dark .inline-help,
body.theme-dark .metric-note,
body.theme-dark .detail-label,
body.theme-dark .platform-meta,
body.theme-dark .file-caption,
body.theme-dark .muted-cell,
body.theme-dark .mc-status-account {
    color: #9db0c3;
}

body.theme-dark .status-metric-card .metric-value {
    color: #daf0ff;
}

body.theme-dark .status-metric-card.is-success {
    border-left-color: #53ce95;
}

body.theme-dark .status-metric-card.is-warning {
    border-left-color: #e0af53;
}

body.theme-dark .status-metric-card.is-danger {
    border-left-color: #c46b75;
}

body.theme-dark .status-metric-card.is-neutral {
    border-left-color: #607d96;
}

body.theme-dark .status-detail-stack .muted-cell {
    color: #9db0c3;
}

body.theme-dark .detail-row {
    border-bottom-color: #2b4054;
}

body.theme-dark .rarity-badge.rarity-diamond {
    background: linear-gradient(135deg, #1a3a5c, #264d7a);
    color: #7ec4ff;
}

body.theme-dark .rarity-badge.rarity-gold {
    background: linear-gradient(135deg, #3d3200, #5c4b00);
    color: #ffd740;
}

body.theme-dark .rarity-badge.rarity-silver {
    background: linear-gradient(135deg, #2a2a2a, #3d3d3d);
    color: #c8c8c8;
}

body.theme-dark .rarity-badge.rarity-bronze {
    background: linear-gradient(135deg, #3d2a1a, #5c3f28);
    color: #e8a86d;
}

body.theme-dark .mc-connect-text {
    color: #eaf3ff;
}

body.theme-dark .summary-chip,
body.theme-dark .status-pill,
body.theme-dark .table-badge,
body.theme-dark .inline-pill,
body.theme-dark .stock-inline,
body.theme-dark .js-stock-pill,
body.theme-dark .js-editor-stock-pill,
body.theme-dark .market-recommendation {
    background: #25374a;
    border-color: #3d586f;
    color: #d6e6f8;
}

body.theme-dark .table-badge.is-link {
    background: #1d435f;
    border-color: #2f6b92;
    color: #bfe6ff;
}

body.theme-dark .inline-pill.is-success,
body.theme-dark .status-pill.is-success,
body.theme-dark .stock-inline.is-success,
body.theme-dark .js-stock-pill.is-success,
body.theme-dark .js-editor-stock-pill.is-success,
body.theme-dark .market-recommendation.is-good {
    background: #204634;
    border-color: #2d7050;
    color: #b8e8cf;
}

body.theme-dark .inline-pill.is-warning,
body.theme-dark .status-pill.is-warning,
body.theme-dark .stock-inline.is-warning,
body.theme-dark .js-stock-pill.is-warning,
body.theme-dark .js-editor-stock-pill.is-warning,
body.theme-dark .market-recommendation.is-warning {
    background: #4f4527;
    border-color: #7d6931;
    color: #f0deb0;
}

body.theme-dark .stock-inline.is-danger,
body.theme-dark .js-stock-pill.is-danger,
body.theme-dark .js-editor-stock-pill.is-danger,
body.theme-dark .market-recommendation.is-bad {
    background: #542c34;
    border-color: #8b3f4e;
    color: #f0bcc6;
}

body.theme-dark .market-price-good {
    background: #204634;
    border-color: #2d7050;
    color: #b8e8cf;
}

body.theme-dark .market-price-warning {
    background: #4f4527;
    border-color: #7d6931;
    color: #f0deb0;
}

body.theme-dark .market-price-bad {
    background: #542c34;
    border-color: #8b3f4e;
    color: #f0bcc6;
}

body.theme-dark .market-recommended {
    color: #60a5fa;
}

body.theme-dark .market-delta-good {
    color: #b8e8cf;
}

body.theme-dark .market-delta-bad {
    color: #f0bcc6;
}

body.theme-dark .surface-note {
    background: #22445e;
    border-color: #316182;
    color: #cae7ff;
}

body.theme-dark .surface-note.is-warning {
    background: #4d442a;
    border-color: #796636;
    color: #f0dfb4;
}

body.theme-dark .form-shell input[type="text"],
body.theme-dark .form-shell input[type="search"],
body.theme-dark .form-shell input[type="email"],
body.theme-dark .form-shell input[type="number"],
body.theme-dark .form-shell input[type="password"],
body.theme-dark .form-shell input[type="url"],
body.theme-dark .form-shell select,
body.theme-dark .form-shell textarea,
body.theme-dark .field-control input[type="text"],
body.theme-dark .field-control input[type="search"],
body.theme-dark .field-control input[type="email"],
body.theme-dark .field-control input[type="number"],
body.theme-dark .field-control input[type="password"],
body.theme-dark .field-control input[type="url"],
body.theme-dark .field-control select,
body.theme-dark .field-control textarea,
body.theme-dark .dynamic-row input[type="text"],
body.theme-dark .dynamic-row input[type="search"],
body.theme-dark .dynamic-row input[type="email"],
body.theme-dark .dynamic-row input[type="number"],
body.theme-dark .dynamic-row input[type="password"],
body.theme-dark .dynamic-row input[type="url"],
body.theme-dark .dynamic-row textarea,
body.theme-dark .field-block input,
body.theme-dark .field-block select,
body.theme-dark .field-block textarea {
    color: #d9e6f3;
    background: #132131;
    border-color: #334d66;
    box-shadow: inset 0 1px 1px rgba(0, 0, 0, .22);
}

body.theme-dark .form-shell input[type="text"]:focus,
body.theme-dark .form-shell input[type="search"]:focus,
body.theme-dark .form-shell input[type="email"]:focus,
body.theme-dark .form-shell input[type="number"]:focus,
body.theme-dark .form-shell input[type="password"]:focus,
body.theme-dark .form-shell input[type="url"]:focus,
body.theme-dark .form-shell select:focus,
body.theme-dark .form-shell textarea:focus,
body.theme-dark .field-control input[type="text"]:focus,
body.theme-dark .field-control input[type="search"]:focus,
body.theme-dark .field-control input[type="email"]:focus,
body.theme-dark .field-control input[type="number"]:focus,
body.theme-dark .field-control input[type="password"]:focus,
body.theme-dark .field-control input[type="url"]:focus,
body.theme-dark .field-control select:focus,
body.theme-dark .field-control textarea:focus,
body.theme-dark .dynamic-row input[type="text"]:focus,
body.theme-dark .dynamic-row input[type="search"]:focus,
body.theme-dark .dynamic-row input[type="email"]:focus,
body.theme-dark .dynamic-row input[type="number"]:focus,
body.theme-dark .dynamic-row input[type="password"]:focus,
body.theme-dark .dynamic-row input[type="url"]:focus,
body.theme-dark .dynamic-row textarea:focus,
body.theme-dark .field-block input:focus,
body.theme-dark .field-block select:focus,
body.theme-dark .field-block textarea:focus {
    border-color: #5ea3d7;
    box-shadow: 0 0 0 3px rgba(94, 163, 215, 0.24);
}

body.theme-dark .form-shell input[type="file"],
body.theme-dark .field-block input[type="file"] {
    color: #d3e4f3;
    border-color: #3f6b8c;
    background: #132131;
}

body.theme-dark .form-shell input[type="file"]::file-selector-button,
body.theme-dark .field-block input[type="file"]::file-selector-button {
    border-color: #3f85be;
    background: linear-gradient(180deg, #3a81b8 0%, #2a628f 100%);
}

body.theme-dark .check-tile {
    border-color: #334d66;
    background: rgba(20, 39, 58, 0.86);
}

body.theme-dark .lot-language-toolbar {
    border-color: #334d66;
    background: rgba(20, 39, 58, 0.86);
}

body.theme-dark .check-tile:hover {
    border-color: #4e7392;
    background: rgba(27, 49, 71, 0.94);
}

body.theme-dark .main-content input[type="checkbox"],
body.theme-dark .main-content input[type="radio"] {
    border-color: #4a7091;
    background: #132131;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

body.theme-dark .main-content input[type="checkbox"]:hover,
body.theme-dark .main-content input[type="radio"]:hover {
    border-color: #5ba6de;
    box-shadow: 0 0 0 3px rgba(91, 166, 222, 0.2);
}

body.theme-dark .main-content input[type="checkbox"]:checked,
body.theme-dark .main-content input[type="radio"]:checked {
    border-color: #1f8aa4;
    background: #1f8aa4;
}

body.theme-dark .model-catalog-table > thead > tr > th {
    background-color: #1f8aa4;
    color: #e7f5ff;
    border-bottom: 1px solid rgba(115, 176, 212, 0.35);
}

body.theme-dark .model-catalog-table > tbody > tr > td {
    background-color: rgba(18, 44, 69, 0.94);
    color: #d7e6f7;
    border-top: 1px solid rgba(115, 176, 212, 0.2);
}

body.theme-dark .model-catalog-table.table-striped > tbody > tr:nth-of-type(odd) > td {
    background-color: rgba(15, 38, 58, 0.94);
}

body.theme-dark .form-control {
    color: #d9e6f3;
    background-color: #132131;
    border-color: #334d66;
}

body.theme-dark .form-control:focus {
    border-color: #4d6f8f;
    box-shadow: 0 0 0 1px rgba(112, 172, 225, 0.2);
}

body.theme-dark .control-label,
body.theme-dark label {
    color: #c4d8ea;
}

body.theme-dark .form-shell input::placeholder,
body.theme-dark .form-shell textarea::placeholder,
body.theme-dark .field-control input::placeholder,
body.theme-dark .field-control textarea::placeholder,
body.theme-dark .dynamic-row input::placeholder,
body.theme-dark .dynamic-row textarea::placeholder {
    color: #7e93a8;
}

body.theme-dark .form-shell input:-webkit-autofill,
body.theme-dark .field-control input:-webkit-autofill,
body.theme-dark .field-block input:-webkit-autofill,
body.theme-dark .dynamic-row input:-webkit-autofill {
    -webkit-text-fill-color: #d9e6f3;
    -webkit-box-shadow: 0 0 0 1000px #132131 inset;
    transition: background-color 9999s ease-out;
    caret-color: #e7f4ff;
}

body.theme-dark .button-secondary,
body.theme-dark .editor-toggle {
    color: #d6e4f2;
    background-color: #223649;
    border-color: #355067;
}

body.theme-dark .button-primary,
body.theme-dark .mc-action-btn.btn-glow-blue,
body.theme-dark .mc-action-btn.btn-glow-purple,
body.theme-dark .notification-btn {
    color: #fff;
    background-color: #2f7bb4;
    border-color: #2b6c9b;
}

body.theme-dark .button-danger,
body.theme-dark .danger,
body.theme-dark .mc-action-btn.btn-glow-red {
    color: #fff;
    background-color: #b24b58;
    border-color: #8f3a44;
}

body.theme-dark .trade-table,
body.theme-dark .market-table,
body.theme-dark .mini-table,
body.theme-dark .attachment-card {
    background: #1c2b3b;
    color: #d6e1ee;
    border-color: #31485f;
}

body.theme-dark .trade-table th,
body.theme-dark .trade-table td,
body.theme-dark .market-table th,
body.theme-dark .market-table td,
body.theme-dark .mini-table th,
body.theme-dark .mini-table td {
    border-color: #31485f;
}

body.theme-dark .template-library-table tr.is-selected-row td {
    background: #1f3a50;
}

body.theme-dark .table-hover > tbody > tr:hover > td {
    background-color: #275271;
    color: #fff;
}

body.theme-dark .audit-log-table > tbody > tr > td,
body.theme-dark .audit-log-table > tbody > tr > th {
    background-color: #1f3145;
    color: #d6e1ee;
    border-top-color: #31485f;
}

body.theme-dark .audit-log-table.table-striped > tbody > tr:nth-of-type(odd) > td,
body.theme-dark .audit-log-table.table-striped > tbody > tr:nth-of-type(odd) > th {
    background-color: #1a2a3d;
}

body.theme-dark .attachment-card img {
    border-bottom-color: #31485f;
}

body.theme-dark .attachment-placeholder {
    background: linear-gradient(180deg, #213548 0%, #1a2b3b 100%);
    color: #9db0c3;
}

body.theme-dark .radio-pill {
    background: #223649;
    border-color: #355067;
    color: #d4e3f1;
}

body.theme-dark .radio-pill.is-active {
    background: #2f7bb4;
    border-color: #2b6c9b;
    color: #fff;
}

body.theme-dark .locale-switcher-button {
    background: #223649;
    border-color: #355067;
    color: #d4e3f1;
}

body.theme-dark .locale-switcher-button:hover {
    border-color: #4a7aa0;
    background: #274056;
}

body.theme-dark .locale-switcher-button.is-active {
    background: #2f7bb4;
    border-color: #2b6c9b;
    color: #fff;
    box-shadow: 0 0 0 2px rgba(47, 123, 180, 0.2);
}

body.theme-dark .back-pill {
    border-color: #3d586f;
    color: #d4e3f1;
    background: #25374a;
}

body.theme-dark .theme-toggle-btn {
    color: #d4e3f1;
    background-color: #24384b;
    border-color: #3d586f;
}

body.theme-dark .notification-count {
    background-color: #b94a48;
}

body.theme-dark .toast-item {
    border-color: #316182;
    background: #22445e;
    color: #cae7ff;
}

body.theme-dark .category-catalog-tool {
    background: #1a3046;
    border-color: #3b5873;
}

body.theme-dark .letter-chip {
    background: #223649;
    border-color: #355067;
    color: #d6e4f2;
}

body.theme-dark .letter-chip.is-active {
    background: #2f7bb4;
    border-color: #2b6c9b;
    color: #fff;
}

body.theme-dark .category-catalog-list {
    background: #132131;
    border-color: #334d66;
}

body.theme-dark .catalog-section-item {
    background: #1c2b3b;
    border-color: #31485f;
    color: #d6e1ee;
}

body.theme-dark .catalog-section-item:hover {
    background: #23374b;
}

body.theme-dark .plugin-editor-caption {
    color: #c4d8ea;
}

body.theme-dark .plugin-monaco-host {
    border-color: #355067;
    background: #0f1724;
}

body.theme-dark .plugin-diagnostic-item.severity-error code {
    color: #ff8d9a;
}

body.theme-dark .plugin-diagnostic-item.severity-warning code {
    color: #ffd69a;
}

body.theme-dark .catalog-subcategories {
    color: #9db0c3;
}

body.theme-dark code {
    color: #ff9eb2;
    background-color: #352633;
}

@media (max-width: 1024px) {
    .mc-core-panel,
    .mc-stats-grid {
        grid-template-columns: 1fr;
    }

    .mc-connect-text {
        font-size: 28px;
    }

    .toolbar-grid,
    .editor-grid,
    .lot-edit-grid,
    .market-settings-grid,
    .market-help-grid,
    .row-grid,
    .field-row,
    .overview-grid {
        grid-template-columns: 1fr;
    }

    .status-kpi-grid,
    .status-capacity-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .notification-label {
        display: none;
    }
}

@media (max-width: 767px) {
    .page-hero,
    .card {
        padding: 12px;
    }

    .category-head,
    .category-meta {
        display: block;
    }

    .category-meta > span {
        display: block;
        margin-top: 4px;
    }

    .status-kpi-grid,
    .status-capacity-grid {
        grid-template-columns: 1fr;
    }

    .status-metric-card .metric-value {
        font-size: 24px;
    }

    .market-table-shell {
        overflow-x: visible;
    }

    .market-table,
    .market-table tbody,
    .market-table tr,
    .market-table td {
        display: block;
        width: 100%;
    }

    .market-table thead {
        display: none;
    }

    .market-table {
        border: 0;
        background: transparent;
        border-collapse: separate;
        border-spacing: 0;
    }

    .market-table tbody {
        display: flex;
        flex-direction: column;
        gap: 14px;
        background: transparent;
    }

    .market-table tr {
        border: 1px solid #ddd;
        border-radius: 8px;
        overflow: hidden;
        background: #fff;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    }

    .market-table td {
        border: 0;
        border-bottom: 1px solid #eee;
        padding: 10px 12px;
    }

    .market-table td:last-child {
        border-bottom: 0;
    }

    .market-table td[data-label] {
        display: grid;
        grid-template-columns: minmax(110px, 44%) 1fr;
        gap: 8px;
        align-items: start;
    }

    .market-table td[data-label]::before {
        content: attr(data-label);
        color: #777;
        font-size: 12px;
        font-weight: bold;
        text-transform: uppercase;
        line-height: 1.4;
    }

    .market-lot-cell {
        padding-bottom: 12px;
        background: rgba(24, 178, 200, 0.06);
    }

    .offer-title {
        font-size: 18px;
        line-height: 1.45;
    }

    .market-competitors-inner {
        overflow-x: auto;
    }

    body.theme-dark .market-table {
        background: transparent;
    }

    body.theme-dark .market-table tr {
        background: #1c2b3b;
        border-color: #31485f;
        box-shadow: none;
    }

    body.theme-dark .market-table td {
        border-bottom-color: #31485f;
    }

    body.theme-dark .market-table td[data-label]::before,
    body.theme-dark .category-meta,
    body.theme-dark .category-meta > span {
        color: #92a9bf;
    }

    body.theme-dark .market-lot-cell {
        background: rgba(47, 123, 180, 0.14);
    }
}

/* ===================================================================
   Skeleton loading placeholder
   =================================================================== */
.skeleton {
    background: linear-gradient(90deg, #e8eef4 25%, #f5f8fb 50%, #e8eef4 75%);
    background-size: 200% 100%;
    animation: skeleton-pulse 1.5s ease-in-out infinite;
    border-radius: 4px;
    color: transparent !important;
}

.skeleton * { visibility: hidden; }

.skeleton-line {
    height: 14px;
    margin-bottom: 8px;
    border-radius: 4px;
}

.skeleton-line.w-60 { width: 60%; }
.skeleton-line.w-40 { width: 40%; }
.skeleton-line.w-80 { width: 80%; }

@keyframes skeleton-pulse {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

body.theme-dark .skeleton,
body.theme-dark .skeleton-line {
    background: linear-gradient(90deg, #1c2b3b 25%, #253a4f 50%, #1c2b3b 75%);
    background-size: 200% 100%;
    animation: skeleton-pulse 1.5s ease-in-out infinite;
}

/* ===================================================================
   Card / element enter animations
   =================================================================== */
@keyframes fade-up {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}

.anim-fade-up {
    animation: fade-up .3s ease-out both;
}

/* ===================================================================
   Toast variants
   =================================================================== */
.toast-item.is-success {
    background: #dff0d8; border-color: #d6e9c6; color: #3c763d;
}

.toast-item.is-error {
    background: #f2dede; border-color: #ebccd1; color: #a94442;
}

.toast-item.is-warning {
    background: #fcf8e3; border-color: #faebcc; color: #8a6d3b;
}

body.theme-dark .toast-item.is-success {
    background: #204634; border-color: #2d7050; color: #b8e8cf;
}

body.theme-dark .toast-item.is-error {
    background: #542c34; border-color: #8b3f4e; color: #f0bcc6;
}

body.theme-dark .toast-item.is-warning {
    background: #4f4527; border-color: #7d6931; color: #f0deb0;
}

/* ===================================================================
   Mobile split-panel & responsive overrides (< 768px)
   =================================================================== */
.mobile-back-btn {
    display: none;
}

@media (max-width: 767px) {
    .split-panel-list.is-hidden-mobile,
    .split-panel-detail.is-hidden-mobile {
        display: none !important;
    }

    .mobile-back-btn {
        display: inline-flex !important;
        align-items: center;
        gap: 6px;
        margin-bottom: 10px;
        padding: 6px 12px;
        border: 1px solid #ccc;
        border-radius: 6px;
        background: #f5f5f5;
        color: #333;
        cursor: pointer;
        font-size: 13px;
    }

    body.theme-dark .mobile-back-btn {
        background: #223649;
        border-color: #355067;
        color: #d6e4f2;
    }

    .orders-list, .buyers-list {
        max-height: 60vh;
    }

    .chat-message-list {
        max-height: 50vh;
    }

    .mc-connect-text {
        font-size: 22px;
    }

    .mc-launch-actions {
        display: flex;
        flex-wrap: wrap;
        gap: 6px;
    }

    .mc-launch-actions form {
        flex: 1;
        min-width: 120px;
    }

    .mc-launch-actions .mc-action-btn {
        margin-bottom: 0;
    }

    .orders-filter-form,
    .buyers-filter-form {
        flex-direction: column;
        align-items: stretch;
    }

    .orders-filter-form select,
    .orders-filter-form input,
    .buyers-filter-form select,
    .buyers-filter-form input[type="text"] {
        min-width: 0 !important;
        width: 100%;
    }

    .stats-cards-row,
    .buyers-summary-row {
        grid-template-columns: 1fr 1fr;
    }

    .stat-card-value { font-size: 15px; }
    .stat-card-icon { font-size: 18px; }

    .chart-container {
        height: 200px;
    }

    .top-buyers-card {
        margin-top: 12px;
    }

    .buyer-profile-stats {
        flex-direction: column;
        gap: 8px;
    }

    .bp-stat {
        display: flex;
        align-items: center;
        gap: 8px;
        text-align: left;
    }

    .bp-stat-label { margin-top: 0; }

    .buyer-orders-table-wrap {
        max-height: 200px;
    }

    .order-detail-label { min-width: 90px; }
}

/* Quick Restock modal */
.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 1300;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(4, 11, 20, 0.82);
}

.modal-box {
    position: relative;
    display: flex;
    flex-direction: column;
    width: min(960px, calc(100vw - 48px));
    max-height: calc(100vh - 64px);
    border-radius: 14px;
    border: 1px solid rgba(116, 155, 189, 0.28);
    background: #10202f;
    color: #e7f3ff;
    box-shadow: 0 18px 70px rgba(0, 0, 0, 0.45);
}

.modal-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 20px 10px;
    border-bottom: 1px solid rgba(116, 155, 189, 0.15);
    flex-shrink: 0;
}

.modal-head h3 { margin: 0; font-size: 1.1rem; }

.modal-close {
    background: none;
    border: none;
    color: #e7f3ff;
    font-size: 1.4rem;
    cursor: pointer;
    padding: 0 4px;
    line-height: 1;
}

.modal-body {
    padding: 16px 20px;
    overflow-y: auto;
    flex: 1 1 auto;
    min-height: 0;
}

.modal-body label {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 0.85rem;
}

.modal-body input[type="number"],
.modal-body select {
    padding: 6px 8px;
    border-radius: 6px;
    border: 1px solid rgba(116, 155, 189, 0.3);
    background: #0a1620;
    color: #e7f3ff;
    font-size: 0.85rem;
}

.modal-foot {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    padding: 10px 20px 14px;
    border-top: 1px solid rgba(116, 155, 189, 0.15);
    flex-shrink: 0;
}

.modal-foot-left {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.85rem;
    color: rgba(231, 243, 255, 0.65);
}

.modal-foot-right {
    display: flex;
    gap: 8px;
}

/* Restock filter grid */
.restock-filters {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
}

/* Restock preview table */
.restock-preview-wrap {
    margin-top: 14px;
    max-height: 420px;
    overflow-y: auto;
    border: 1px solid rgba(116, 155, 189, 0.18);
    border-radius: 8px;
}

.restock-preview-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.82rem;
}

.restock-preview-table thead {
    position: sticky;
    top: 0;
    z-index: 1;
}

.restock-preview-table th {
    background: #0d1a28;
    padding: 7px 8px;
    text-align: left;
    font-weight: 600;
    border-bottom: 1px solid rgba(116, 155, 189, 0.22);
    white-space: nowrap;
}

.restock-preview-table td {
    padding: 5px 8px;
    border-bottom: 1px solid rgba(116, 155, 189, 0.08);
    vertical-align: middle;
}

.restock-preview-table tbody tr:hover {
    background: rgba(116, 155, 189, 0.06);
}

.restock-preview-table input[type="checkbox"] {
    margin: 0;
    cursor: pointer;
}

.restock-preview-table .email-cell {
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.restock-preview-table .num-cell {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.restock-select-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 10px;
    font-size: 0.83rem;
}

.restock-select-actions {
    display: flex;
    gap: 6px;
}

.restock-select-actions button {
    font-size: 0.78rem;
    padding: 2px 8px;
}
