}

.logo {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(56, 189, 248, .95), rgba(139, 92, 246, .85));
    display: grid;
    place-items: center;
    box-shadow: 0 8px 18px rgba(56, 189, 248, .18);
    font-weight: 900;
}

.brand h1 {
    margin: 0;
    font-size: 16px;
    line-height: 1.15;
}

.brand p {
    margin: 0;
    font-size: 12px;
    color: var(--muted);
}

.top-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

.nav-link.active {
    background: linear-gradient(135deg, var(--brand), rgba(139, 92, 246, .85));
    color: #061018;
    border: none;
}

.nav-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.auto-reply-grid {
    display: grid;
    grid-template-columns: minmax(320px, 0.9fr) minmax(420px, 1.4fr);
    gap: 16px;
    margin-top: 16px;
}

.auto-reply-progress {
    margin: 16px 0;
}

#autoReplyProgressFill {
    height: 100%;
    width: 0;
    border-radius: inherit;
    background: linear-gradient(90deg, #38bdf8, #22c55e);
    transition: width .25s ease, background .2s ease;
}

#autoReplyProgressFill.bad {
    background: linear-gradient(90deg, #fb7185, #ef4444);
}

#autoReplyProgressFill.ok {
    background: linear-gradient(90deg, #34d399, #22c55e);
}

.auto-reply-status {
    border: 1px solid rgba(148, 163, 184, .22);
    border-radius: 8px;
    padding: 12px 14px;
    color: #cbd5e1;
    background: rgba(15, 23, 42, .55);
    line-height: 1.45;
}

.auto-reply-status.success {
    border-color: rgba(34, 197, 94, .35);
    color: #bbf7d0;
    background: rgba(22, 101, 52, .16);
}

.auto-reply-status.error {
    border-color: rgba(248, 113, 113, .35);
    color: #fecaca;
    background: rgba(127, 29, 29, .16);
}

.auto-reply-session-box {
    margin-top: 12px;
    padding: 12px;
    border: 1px solid rgba(56, 189, 248, .22);
    border-radius: 8px;
    background: rgba(14, 165, 233, .08);
}

.auto-reply-session-box .row {
    margin-top: 10px;
}

.auto-reply-session-box input {
    min-width: 160px;
}

.auto-reply-session-actions,
.auto-reply-primary-actions {
    display: grid;
    gap: 10px;
    margin-top: 10px;
}

.auto-reply-session-actions {
    grid-template-columns: auto minmax(140px, 1fr) minmax(160px, 1fr) auto;
    align-items: center;
}

.auto-reply-primary-actions {
    grid-template-columns: minmax(0, 1fr) auto;
    margin-bottom: 10px;
}

.auto-reply-primary-actions .btn {
    min-height: 42px;
}

#autoReplyResetButton {
    border-color: rgba(248, 113, 113, .5);
    box-shadow: 0 0 0 1px rgba(248, 113, 113, .12) inset;
}

#autoReplyResetButton.armed {
    background: linear-gradient(135deg, #fb7185, #ef4444);
    color: #fff;
}

.auto-reply-locked-card {
    position: relative;
    overflow: hidden;
}

.auto-reply-lock {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    margin-bottom: 16px;
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.35);
    border-radius: 14px;
    color: #e2e8f0;
}

.auto-reply-lock div {
    font-size: 28px;
    line-height: 1;
}

.auto-reply-lock span {
    color: #cbd5e1;
    font-size: 13px;
    display: block;
    margin-top: 3px;
}

.auto-reply-lock.hidden {
    display: none !important;
}

.auto-reply-toolbar,
.auto-reply-actions,
.auto-reply-rule-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.switch-line {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #e2e8f0;
    font-weight: 700;
}

.switch-line input {
    width: 18px;
    height: 18px;
}

.auto-reply-safety-grid {
    display: grid;
    grid-template-columns: minmax(220px, .65fr) minmax(320px, 1.35fr);
    gap: 12px;
    align-items: stretch;
}

.auto-reply-cooldown-card {
    display: grid;
    gap: 10px;
    padding: 14px;
    border: 1px solid rgba(56, 189, 248, .2);
    border-radius: 8px;
    background: rgba(14, 165, 233, .08);
}

.auto-reply-cooldown-card input {
    min-height: 42px;
    font-size: 16px;
    font-weight: 800;
}

.auto-reply-checks {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    padding: 0;
    border: 0;
    background: transparent;
}

.auto-reply-checks label {
    min-height: 56px;
    padding: 12px;
    border: 1px solid rgba(148, 163, 184, .18);
    border-radius: 8px;
    background: rgba(15, 23, 42, .48);
}

.auto-reply-checks label:hover {
    border-color: rgba(56, 189, 248, .42);
    background: rgba(14, 165, 233, .1);
}

.auto-reply-checks label,
.compact-switch {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #cbd5e1;
    font-weight: 700;
}

.auto-reply-note {
    margin: 8px 0 14px;
}

.auto-reply-rule {
    border: 1px solid rgba(148, 163, 184, .18);
    border-radius: 8px;
    padding: 14px;
    margin-bottom: 14px;
    background: rgba(15, 23, 42, .36);
}

.auto-reply-rule-head {
    margin-bottom: 12px;
}

.auto-reply-rule-head b {
    display: block;
    color: #f8fafc;
}

.auto-reply-rule-head span {
    color: #38bdf8;
    font-size: 13px;
}

.auto-reply-rule-tools {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap;
}

.form-grid.two {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.form-grid.three {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.form-grid.compact {
    gap: 8px;
}

.auto-reply-rule textarea {
    min-height: 112px;
    resize: vertical;
}

.auto-reply-custom-user {
    border-left: 4px solid rgba(56, 189, 248, .75);
}

.auto-reply-excluded-user {
    border-left: 4px solid rgba(239, 68, 68, .85);
}

.auto-reply-whitelist-user {
    border-left: 4px solid rgba(34, 197, 94, .85);
}

/* Auto Reply Accordion System */
.auto-reply-accordion {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 14px;
}

.auto-reply-accordion-item {
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 10px;
    background: rgba(15, 23, 42, 0.45);
    overflow: hidden;
    transition: all 0.25s ease;
}

.auto-reply-accordion-item:hover {
    border-color: rgba(56, 189, 248, 0.35);
}

.auto-reply-accordion-item.active {
    border-color: rgba(56, 189, 248, 0.65);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35), 0 0 15px rgba(56, 189, 248, 0.1);
}

.auto-reply-accordion-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    cursor: pointer;
    background: rgba(30, 41, 59, 0.4);
    user-select: none;
    transition: all 0.2s ease;
}

.auto-reply-accordion-header:hover {
    background: rgba(56, 189, 248, 0.09);
}

.auto-reply-accordion-item.active .auto-reply-accordion-header {
    background: rgba(14, 165, 233, 0.12);
    border-bottom: 1px solid rgba(56, 189, 248, 0.2);
}

.auto-reply-accordion-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 700;
    color: #f8fafc;
}

.auto-reply-accordion-meta {
    display: flex;
    align-items: center;
    gap: 8px;
}

.auto-reply-accordion-badge {
    font-size: 11px;
    padding: 2px 10px;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.14);
    color: var(--muted-light, #cbd5e1);
    font-weight: 600;
}

.auto-reply-accordion-chevron {
    width: 20px;
    height: 20px;
    display: inline-grid;
    place-items: center;
    color: #94a3b8;
    font-size: 11px;
    transition: transform 0.25s ease;
}

.auto-reply-accordion-item.active .auto-reply-accordion-chevron {
    transform: rotate(180deg);
    color: #38bdf8;
}

.auto-reply-accordion-body {
    display: none;
    padding: 16px;
}

.auto-reply-accordion-item.active .auto-reply-accordion-body {
    display: block;
}

.auto-reply-section-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid rgba(148, 163, 184, 0.12);
}

.auto-reply-actions {
    justify-content: flex-start;
    flex-wrap: wrap;
    margin-top: 14px;
}

.auto-reply-preview {
    min-height: 120px;
    padding: 16px;
    line-height: 1.65;
}

fieldset:disabled {
    opacity: .62;
}

@media (max-width: 980px) {
    .auto-reply-grid,
    .form-grid.two,
    .form-grid.three,
    .auto-reply-safety-grid,
    .auto-reply-session-actions,
    .auto-reply-primary-actions,
    .auto-reply-checks {
        grid-template-columns: 1fr;
    }
}

.nav-icon {
    display: inline-grid;
    place-items: center;
    width: 16px;
    min-width: 16px;
    line-height: 1;
}

.pill {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    background: rgba(17, 28, 51, .85);
    border: 1px solid rgba(34, 50, 83, .8);
    border-radius: 14px;
    color: var(--muted);
    min-width: 260px;
}

.pill input {
    width: 100%;
    border: none;
    outline: none;
    background: transparent;
    color: var(--text);
    font-size: 13px;
}

.grid {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.left {
    flex: 0 0 380px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-width: 320px;
}

.right {
    flex: 1 1 auto;
    min-width: 320px;
}

.wallet-layout {
    display: block;
}

@media (max-width:980px) {
    .grid {
        flex-direction: column;
    }

    .left,
    .right {
        min-width: 0;
    }

    .pill {
        min-width: 0;
    }
}

.card {
    background: linear-gradient(180deg, rgba(17, 28, 51, .95), rgba(15, 26, 47, .92));
    border: 1px solid rgba(34, 50, 83, .85);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 16px;
}

.card h2 {
    margin: 0 0 12px;
    font-size: 14px;
    color: #dbeafe;
}

.sub {
    margin: -6px 0 14px;
    font-size: 12px;
    color: var(--muted);
}

.row {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
    padding: 4px;
}

input:not([type="checkbox"]):not([type="radio"]),
select,
textarea {
    width: 100%;
    padding: 11px 12px;
    border-radius: 14px;
    border: 1px solid rgba(34, 50, 83, .85);
    background: rgba(11, 18, 38, .45);
    color: var(--text);
    outline: none;
    font-size: 13px;
}

textarea {
    min-height: 120px;
    resize: vertical;
}

.hint {
    font-size: 12px;
    color: var(--muted);
    margin-top: 8px;
    line-height: 1.45;
}

.btn {
    border: none;
    cursor: pointer;
    border-radius: 10px;
    min-height: 42px;
    padding: 0 14px;
    font-weight: 700;
    font-size: 13px;
    color: #061018;
    background: linear-gradient(135deg, var(--brand), rgba(139, 92, 246, .85));
    transition: transform .18s ease, filter .18s ease, opacity .18s ease, box-shadow .18s ease, border-color .18s ease, background .18s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    user-select: none;
    white-space: nowrap;
    text-decoration: none;
    box-shadow: 0 8px 18px rgba(15, 23, 42, .16);
}

.btn:hover {
    filter: brightness(1.06);
    transform: translateY(-1px);
    box-shadow: 0 12px 26px rgba(56, 189, 248, .18);
}

.btn:active {
    transform: translateY(0) scale(.99);
    opacity: .9;
}

.btn:disabled {
    cursor: not-allowed;
    opacity: .62;
    transform: none;
    filter: none;
    box-shadow: none;
}

.btn.ghost {
    background: rgba(17, 28, 51, .75);
    border: 1px solid rgba(34, 50, 83, .85);
    color: var(--text);
    font-weight: 650;
    box-shadow: none;
}

.btn.ghost:hover {
    background: rgba(56, 189, 248, 0.15);
    border-color: rgba(56, 189, 248, 0.6);
    box-shadow: 0 10px 24px rgba(56, 189, 248, .12);
}

.btn.ok {
    background: linear-gradient(135deg, rgba(34, 197, 94, .95), rgba(16, 185, 129, .85));
    color: #05110b;
}

.btn.warn {
    background: linear-gradient(135deg, rgba(245, 158, 11, .95), rgba(251, 191, 36, .85));
    color: #1a1204;
}

.btn.danger {
    background: linear-gradient(135deg, rgba(239, 68, 68, .95), rgba(244, 63, 94, .85));
    color: #1a070a;
}

.btn.w100 {
    width: 100%;
}

.product-picker-btn {
    justify-content: flex-start;
    flex-wrap: wrap;
    text-align: left;
}

.selected-product-name {
    min-width: 0;
    flex: 1 1 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.btn.small {
    min-height: 34px;
    padding: 0 11px;
    border-radius: 8px;
    font-size: 12px;
}

.table-wrap {
    overflow: auto;
    border-radius: 16px;
    border: 1px solid rgba(34, 50, 83, .85);
    background: rgba(11, 18, 38, .35);
    resize: vertical;
    min-height: 220px;
    max-height: 70vh;
}

.user-list-wrap {
    max-height: calc(100vh - 270px);
    overflow: auto !important;
    -webkit-overflow-scrolling: touch;
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 720px;
}

table th,
table td {
    vertical-align: middle;
}

table th:nth-child(2),
table td:nth-child(2),
table th:nth-child(3),
table td:nth-child(3),
table th:nth-child(4),
table td:nth-child(4) {
    text-align: center;
}

thead th {
    text-align: left;
    font-size: 12px;
    color: var(--muted);
    padding: 12px;
    background: rgba(17, 28, 51, .65);
    position: sticky;
    top: 0;
    z-index: 2;
    border-bottom: 1px solid rgba(34, 50, 83, .85);
}

tbody td {
    padding: 12px;
    border-bottom: 1px solid rgba(34, 50, 83, .55);
    font-size: 13px;
}

tbody tr:hover {
    background: rgba(56, 189, 248, .06);
}

.price-input {
    width: 100%;
    min-width: 80px;
    max-width: 240px;
    text-align: center;
}

.stock-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 92px;
    padding: 8px 12px;
    border-radius: 12px;
    font-weight: 700;
    color: #fff;
}

.stock-badge.in-stock {
    background: #16a34a;
}

.stock-badge.out-of-stock {
    background: #b91c1c;
}

.actions {
    display: flex;
    gap: 8px;
    flex-wrap: nowrap;
    align-items: center;
}

.modal {
    position: fixed;
    inset: 0;
    display: none;
    background: rgba(0, 0, 0, .6);
    align-items: center;
    justify-content: center;
    padding: 18px;
    z-index: 50;
}

#modal {
    z-index: 80;
}

#successModal {
    z-index: 81;
}

#renameModal {
    z-index: 82;
}

#menuManagerModal {
    z-index: 70;
}

.modal.show {
    display: flex;
}

.modal-content {
    width: min(980px, 100%);
    max-height: 85vh;
    overflow: auto;
    background: linear-gradient(180deg, rgba(17, 28, 51, .98), rgba(15, 26, 47, .96));
    border: 1px solid rgba(34, 50, 83, .85);
    border-radius: 18px;
    box-shadow: var(--shadow);
    padding: 16px;
}

.modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.modal-head h3 {
    margin: 0;
    font-size: 14px;
    color: #dbeafe;
}

.modal-body {
    border-radius: 14px;
    border: 1px solid rgba(34, 50, 83, .75);
    background: rgba(11, 18, 38, .32);
    padding: 10px;
}

.order-row {
    display: flex;
    gap: 10px;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px dashed rgba(34, 50, 83, .55);
}

.order-row:last-child {
    border-bottom: none;
}

.order-row .idx {
    width: 40px;
    color: var(--muted);
    font-size: 12px;
    text-align: right;
    padding-right: 6px;
    flex: 0 0 auto;
}

.order-row input {
    flex: 1 1 auto;
    min-width: 240px;
}

#botLangs .order-row {
    display: grid;
    grid-template-columns: minmax(64px, .7fr) minmax(120px, 1fr) auto auto auto;
    gap: 10px;
    align-items: center;
    max-width: 100%;
    overflow: hidden;
}

#botLangs .order-row input {
    min-width: 0 !important;
    width: 100%;
}

#botLangs .order-row label.hint {
    margin: 0;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

#botLangs .order-row label.hint input {
    width: auto;
    min-width: 0 !important;
}

#botLangs .order-row .btn {
    width: 34px;
    min-width: 34px;
    padding: 0;
    height: 34px;
}

@media (max-width: 720px) {
    #botLangs .order-row {
        grid-template-columns: 1fr;
    }
}

.bot-button-card {
    border: 1px solid rgba(34, 50, 83, .75);
    border-radius: 8px;
    background: rgba(11, 18, 38, .32);
    padding: 6px;
    margin: 6px 0;
}

.bot-button-card .row {
    padding: 2px 0;
    gap: 8px;
}

.bot-button-card input {
    min-height: 38px;
    padding: 9px 10px;
}

.bot-button-card .actions .btn {
    min-width: 34px;
    padding: 8px 9px;
}

.telegram-quick-control-split {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 12px;
    align-items: start;
    margin-bottom: 16px;
}

.telegram-quick-control-card {
    min-width: 0;
    margin-top: 0 !important;
}

.telegram-quick-control-card h2 {
    margin-bottom: 8px;
}

.telegram-quick-control-card .hint {
    font-size: 12px;
}

.compact-editor {
    width: 100%;
}

.compact-editor summary {
    display: grid;
    grid-template-columns: 24px minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    list-style: none;
}

.compact-editor summary::-webkit-details-marker {
    display: none;
}

.compact-toggle {
    width: 22px;
    height: 22px;
    border: 1px solid var(--border);
    border-radius: 6px;
    display: inline-grid;
    place-items: center;
    color: var(--accent);
    font-weight: 900;
}

.compact-title {
    min-width: 0;
    display: grid;
    gap: 2px;
}

.compact-title b,
.compact-title small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.compact-title small {
    color: var(--muted);
    font-size: 11px;
}

.compact-actions {
    display: inline-flex;
    gap: 5px;
}

.compact-actions .btn {
    min-width: 30px;
    min-height: 30px;
    padding: 6px 8px;
}

.compact-editor-body {
    padding-top: 8px;
}

.custom-callback-editor {
    display: grid;
    gap: 8px;
    margin-top: 10px;
}

.custom-callback-editor textarea {
    min-height: 120px;
    resize: vertical;
}

.telegram-command-list {
    display: grid;
    gap: 6px;
}

@media (max-width: 980px) {
    .telegram-quick-control-split {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 560px) {
    .compact-editor summary {
        grid-template-columns: 24px minmax(0, 1fr);
    }

    .compact-actions {
        grid-column: 1 / -1;
        justify-content: flex-end;
    }
}

.collapsible-card>h2 {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.collapse-toggle {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    border: 1px solid rgba(251, 113, 133, .72);
    background: linear-gradient(135deg, rgba(239, 68, 68, .95), rgba(244, 63, 94, .84));
    color: #fff;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 900;
    line-height: 1;
    flex: 0 0 auto;
    box-shadow: 0 10px 24px rgba(239, 68, 68, .24), inset 0 1px 0 rgba(255, 255, 255, .18);
    transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease, background .16s ease;
}

.collapsible-card.is-collapsed .collapse-toggle {
    border-color: rgba(56, 189, 248, .8);
    background: linear-gradient(135deg, rgba(14, 165, 233, .98), rgba(37, 99, 235, .9));
    box-shadow: 0 10px 24px rgba(37, 99, 235, .25), inset 0 1px 0 rgba(255, 255, 255, .2);
}

.card-order-controls {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    flex: 0 0 auto;
}

.card-move-btn {
    min-width: 48px;
    height: 32px;
    border-radius: 10px;
    border: 1px solid rgba(75, 95, 135, .65);
    background: rgba(15, 26, 52, .88);
    color: var(--text);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 800;
    line-height: 1;
    padding: 0 10px;
    transition: transform .18s ease, border-color .18s ease, background .18s ease, box-shadow .18s ease, opacity .18s ease;
}

.card-move-btn:hover:not(:disabled) {
    border-color: rgba(101, 125, 180, .9);
    background: rgba(27, 42, 78, .95);
    transform: translateY(-1px);
    box-shadow: 0 10px 20px rgba(15, 23, 42, .18);
}

.card-move-btn:disabled {
    opacity: .38;
    cursor: not-allowed;
}

.collapse-toggle:hover {
    transform: translateY(-1px) scale(1.04);
    border-color: rgba(255, 255, 255, .38);
    box-shadow: 0 14px 28px rgba(56, 189, 248, .24), inset 0 1px 0 rgba(255, 255, 255, .24);
}

.collapse-toggle:active {
    transform: translateY(0) scale(.98);
}

.collapsible-card.is-collapsed> :not(h2) {
    display: none !important;
}

.modal-foot {
    display: flex;
    gap: 10px;
    margin-top: 12px;
    justify-content: flex-end;
    flex-wrap: wrap;
}

.wallet-grid {
    align-items: flex-start;
}

.wallet-left {
    flex: 0 0 400px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-width: 320px;
}

.wallet-right {
    flex: 1 1 auto;
    min-width: 320px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

@media (max-width: 980px) {
    .wallet-grid {
        flex-direction: column;
    }

    .wallet-left,
    .wallet-right {
        min-width: 0;
        width: 100%;
    }
}

/* ===== PROMO FILTER ===== */
#promoSearch {
    min-width: 200px;
    background: var(--surface, #0f172a);
    border: 1px solid #1e293b;
    color: #fff;
    padding: 8px 10px;
    border-radius: 8px;
    outline: none;
}

#promoSearch:focus {
    border-color: var(--brand, #3b82f6);
}

/* select */
#promoFilterType,
#promoFilterStatus,
#promoFilterScope {
    background: var(--surface, #0f172a);
    border: 1px solid #1e293b;
    color: #fff;
    padding: 7px 10px;
    border-radius: 8px;
    cursor: pointer;
    min-width: 120px;
}

#promoFilterType:focus,
#promoFilterStatus:focus,
#promoFilterScope:focus {
    border-color: var(--brand, #3b82f6);
}

/* row filter layout */
.card .row {
    flex-wrap: wrap;
    gap: 8px;
}

/* button filter */
.card .row .btn {
    height: 36px;
    min-height: 36px;
    padding: 0 12px;
    border-radius: 8px;
}

/* button hover */
.btn.ghost.small:hover {
    background: rgba(255, 255, 255, 0.05);
}

/* ===== PROMO SCOPE (list sản phẩm) ===== */
.promo-scope {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.promo-scope-top {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
}

.promo-products {
    display: none;
    background: #020617;
    border: 1px solid #1e293b;
    padding: 8px;
    border-radius: 8px;
    font-size: 13px;
    line-height: 1.6;
}

/* badge nhỏ */
.promo-products div {
    opacity: 0.9;
}

/* responsive */
@media (max-width: 768px) {
    #promoSearch {
        flex: 1 1 100%;
    }

    #promoFilterType,
    #promoFilterStatus,
    #promoFilterScope {
        flex: 1 1 30%;
    }
}

.promo-toolbar {
    display: flex;
    gap: 10px;
    margin: 12px 0;
    padding: 10px;
    border-radius: 12px;
    background: rgba(2, 6, 23, 0.6);
    border: 1px solid rgba(56, 189, 248, 0.1);
}

.promo-toolbar input {
    flex: 1;
}

.promo-toolbar select {
    min-width: 140px;
}

/* badge */
.badge {
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    background: rgba(56, 189, 248, 0.15);
}

.badge.ok {
    background: rgba(34, 197, 94, 0.15);
    color: #22c55e;
}

.badge.off {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}

/* tag sản phẩm */
.tag {
    display: inline-block;
    padding: 4px 8px;
    margin: 3px;
    border-radius: 8px;
    background: rgba(139, 92, 246, 0.15);
    font-size: 12px;
}


.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

.dash-card {
    border-radius: 22px;
    padding: 18px;
    min-height: 116px;
    display: flex;
    align-items: center;
    gap: 14px;
    border: 1px solid rgba(255, 255, 255, .08);
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
}

.dash-card::after {
    content: "";
    position: absolute;
    inset: auto -40px -60px auto;
    width: 140px;
    height: 140px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .12);
}

.dash-card.blue {
    background: linear-gradient(135deg, #0284c7, #0f172a);
}

.dash-card.green {
    background: linear-gradient(135deg, #16a34a, #0f172a);
}

.dash-card.purple {
    background: linear-gradient(135deg, #7c3aed, #0f172a);
}

.dash-card.orange {
    background: linear-gradient(135deg, #f97316, #0f172a);
}

.dash-card.pink {
    background: linear-gradient(135deg, #e11d48, #0f172a);
}

.dash-card.cyan {
    background: linear-gradient(135deg, #0891b2, #0f172a);
}

.dash-icon {
    width: 48px;
    height: 48px;
    border-radius: 16px;
    display: grid;
    place-items: center;
    background: rgba(255, 255, 255, .16);
    font-size: 24px;
    flex: 0 0 auto;
}

.dash-label {
    color: rgba(255, 255, 255, .78);
    font-size: 13px;
    margin-bottom: 6px;
}

.dash-value {
    font-size: 24px;
    font-weight: 900;
    letter-spacing: -.5px;
}

.dash-panel {
    border-radius: 22px;
}

.dash-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.dash-list div {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    padding: 12px;
    border-radius: 14px;
    background: rgba(11, 18, 38, .48);
    border: 1px solid rgba(34, 50, 83, .65);
}

.dash-list span {
    color: var(--muted);
}

.dash-list b {
    color: #fff;
}

.status-box {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.status-item {
    padding: 14px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, .08);
    background: rgba(11, 18, 38, .42);
}

.status-item b {
    display: block;
    margin-bottom: 6px;
}

.status-item span {
    color: var(--muted);
    font-size: 13px;
}

.status-item.ok {
    border-color: rgba(34, 197, 94, .35);
}

.status-item.warn {
    border-color: rgba(245, 158, 11, .38);
}

.status-item.info {
    border-color: rgba(56, 189, 248, .38);
}

.dash-alerts {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.alert {
    padding: 13px;
    border-radius: 14px;
    background: rgba(56, 189, 248, .1);
    border: 1px solid rgba(56, 189, 248, .22);
    color: #dbeafe;
}

.alert.danger {
    background: rgba(239, 68, 68, .1);
    border-color: rgba(239, 68, 68, .28);
}

@media (max-width: 980px) {
    .dashboard-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .status-box {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 620px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .dash-value {
        font-size: 20px;
    }
}


.user-profile-modal {
    width: min(980px, 100%);
}

.user-profile-head {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(56, 189, 248, .16), rgba(139, 92, 246, .12));
    border: 1px solid rgba(56, 189, 248, .24);
    margin-bottom: 14px;
}

.user-avatar {
    width: 64px;
    height: 64px;
    border-radius: 22px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, #38bdf8, #8b5cf6);
    color: #061018;
    font-weight: 900;
    font-size: 26px;
    box-shadow: 0 12px 28px rgba(56, 189, 248, .18);
    overflow: hidden;
}

.user-avatar-small {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    font-size: 16px;
    box-shadow: none;
}

.user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    grid-area: 1 / 1;
}

.user-avatar img + span {
    display: none;
}

.user-avatar.avatar-fallback img {
    display: none;
}

.user-avatar.avatar-fallback span {
    display: block;
}

.user-profile-head h2 {
    margin: 0 0 6px;
    font-size: 20px;
}

.user-stats {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 10px;
    margin-bottom: 14px;
}

.user-stats div {
    padding: 14px;
    border-radius: 16px;
    background: rgba(11, 18, 38, .48);
    border: 1px solid rgba(34, 50, 83, .7);
}

.user-stats span {
    display: block;
    color: var(--muted);
    font-size: 12px;
    margin-bottom: 8px;
}

.user-stats b {
    font-size: 18px;
}

.profile-tabs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}

.profile-tabs .active {
    background: linear-gradient(135deg, var(--brand), rgba(139, 92, 246, .85));
    color: #061018;
    border: none;
}

.profile-content {
    border-radius: 18px;
    border: 1px solid rgba(34, 50, 83, .75);
    background: rgba(11, 18, 38, .32);
    padding: 12px;
    min-height: 260px;
}

.profile-info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.profile-info-grid div {
    padding: 13px;
    border-radius: 14px;
    background: rgba(17, 28, 51, .7);
    border: 1px solid rgba(34, 50, 83, .7);
}

.profile-info-grid span {
    display: block;
    color: var(--muted);
    font-size: 12px;
    margin-bottom: 7px;
}

.profile-info-grid b {
    color: #fff;
}

@media (max-width: 780px) {
    .user-stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .profile-info-grid {
        grid-template-columns: 1fr;
    }
}

.order-detail-modal {
    width: min(1080px, 100%);
}

.order-detail-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px;
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(56, 189, 248, .16), rgba(139, 92, 246, .12));
    border: 1px solid rgba(56, 189, 248, .24);
    margin-bottom: 14px;
}

.order-detail-head h2 {
    margin: 4px 0 0;
    font-size: 17px;
    word-break: break-all;
}

.order-detail-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.order-box {
    padding: 14px;
    border-radius: 18px;
    background: rgba(11, 18, 38, .42);
    border: 1px solid rgba(34, 50, 83, .72);
}

.order-box h2 {
    margin-bottom: 12px;
}

.detail-line {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    padding: 10px 0;
    border-bottom: 1px dashed rgba(34, 50, 83, .65);
}

.detail-line:last-child {
    border-bottom: none;
}

.detail-line span {
    color: var(--muted);
}

.detail-line b {
    color: #fff;
    text-align: right;
    word-break: break-word;
}

#detailDelivered {
    min-height: 130px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.timeline {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.timeline-item {
    display: grid;
    grid-template-columns: 18px 1fr;
    gap: 10px;
    position: relative;
}

.timeline-dot {
    width: 12px;
    height: 12px;
    border-radius: 999px;
    background: linear-gradient(135deg, #22c55e, #38bdf8);
    margin-top: 5px;
    box-shadow: 0 0 0 5px rgba(34, 197, 94, .1);
}

.timeline-item b {
    display: block;
    color: #fff;
    margin-bottom: 4px;
}

.timeline-item p {
    margin: 0 0 4px;
    color: var(--muted);
    font-size: 13px;
}

.timeline-item span {
    color: #93c5fd;
    font-size: 12px;
}

@media (max-width: 820px) {
    .order-detail-grid {
        grid-template-columns: 1fr;
    }
}

.order-row {

    border-left: 4px solid transparent;

}

.order-row.completed {

    border-left: 4px solid #22c55e;

}

.order-row.pending {

    border-left: 4px solid #f59e0b;

}

.order-row.failed {

    border-left: 4px solid #ef4444;

}

.order-row.refunded {

    border-left: 4px solid #3b82f6;

}

code {

    background: #101827;

    padding: 6px 10px;

    border-radius: 8px;

    font-size: 12px;

    color: #7dd3fc;

}

tg-emoji {

    font-size: 28px;

}

.emoji-workspace,
.emoji-layout {
    display: grid;
    grid-template-columns: minmax(420px, 1.08fr) minmax(360px, .92fr);
    gap: 16px;
    margin-top: 18px;
    align-items: start;
}

.emoji-main,
.emoji-flow-card {
    border-radius: 22px;
    min-width: 0;
}

.emoji-flow-card #systemButtonFlowList,
.emoji-main .table-wrap {
    max-height: calc(100vh - 360px);
    overflow: auto;
    padding-right: 4px;
}

@media (max-width: 1080px) {
    .emoji-workspace,
    .emoji-layout {
        grid-template-columns: 1fr;
    }

    .emoji-flow-card #systemButtonFlowList,
    .emoji-main .table-wrap {
        max-height: none;
    }
}

.order-table {
    width: 100%;
    table-layout: fixed;
}

.order-table th,
.order-table td {
    vertical-align: top;
    padding: 14px;
}

.order-table td:nth-child(1) {
    width: 260px;
}

.order-table td:nth-child(2) {
    width: 170px;
}

.order-table td:nth-child(3) {
    width: 180px;
}

.order-table td:nth-child(4) {
    width: 130px;
    text-align: center;
}

.order-table td:nth-child(5) {
    width: 150px;
}

.order-table td:nth-child(6) {
    width: 140px;
}

.order-table td:nth-child(7) {
    width: 130px;
    text-align: center;
}


.order-card-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.order-card {
    border-radius: 18px;
    background: rgba(11, 18, 38, .5);
    border: 1px solid rgba(34, 50, 83, .75);
    border-left: 5px solid transparent;
    padding: 14px;
}

.order-card.completed {
    border-left-color: #22c55e;
}

.order-card.pending {
    border-left-color: #f59e0b;
}

.order-card.failed {
    border-left-color: #ef4444;
}

.order-card.refunded {
    border-left-color: #3b82f6;
}

.order-card-main {
    display: grid;
    grid-template-columns: 260px 150px 150px 120px 150px 140px 120px;
    gap: 14px;
    align-items: center;
}

.order-code {
    font-size: 15px;
    word-break: break-word;
}

@media (max-width: 1200px) {
    .order-card-main {
        grid-template-columns: 1fr 1fr;
    }
}

.order-card-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.order-card {
    width: 100%;
    border-radius: 18px;
    background: rgba(11, 18, 38, .55);
    border: 1px solid rgba(34, 50, 83, .8);
    border-left: 5px solid transparent;
    padding: 16px;
}

.order-card.completed {
    border-left-color: #22c55e;
}

.order-card.pending {
    border-left-color: #f59e0b;
}

.order-card.failed {
    border-left-color: #ef4444;
}

.order-card.refunded {
    border-left-color: #3b82f6;
}

.order-card-main {
    display: grid;
    grid-template-columns: 240px 150px 150px 120px 150px 140px 110px;
    gap: 18px;
    align-items: center;
}

.order-code {
    display: block;
    max-width: 220px;
    font-size: 14px;
    line-height: 1.35;
    word-break: break-word;
}

.order-card .badge {
    white-space: nowrap;
}

.order-card .btn {
    white-space: nowrap;
}

@media (max-width: 1300px) {
    .order-card-main {
        grid-template-columns: 1fr 1fr 1fr;
    }
}

@media (max-width: 800px) {
    .order-card-main {
        grid-template-columns: 1fr;
    }
}

.order-card-header {
    display: grid;
    grid-template-columns: 240px 150px 150px 120px 150px 140px 110px;
    gap: 18px;
    padding: 0 16px 12px;
    color: var(--muted);
    font-weight: 800;
    font-size: 13px;
}

@media (max-width: 1300px) {
    .order-card-header {
        display: none;
    }
}

.order-card-main,
.order-card-header {
    grid-template-columns: 240px 150px 150px 110px 140px 130px 90px;
}

.order-card-main>div:last-child,
.order-card-header>div:last-child {
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

.order-detail-btn {
    min-width: 78px;
    padding: 9px 12px;
    font-size: 12px;
    white-space: nowrap;
}

.order-card-list {
    width: 100%;
    overflow: hidden;
}

.order-card {
    width: 100%;
    box-sizing: border-box;
}

.order-card-main,
.order-card-header {
    display: grid;
    grid-template-columns:
        minmax(180px, 1.5fr) minmax(120px, 1fr) minmax(130px, 1fr) minmax(95px, .8fr) minmax(120px, 1fr) minmax(120px, .9fr) 86px;
    gap: 14px;
    align-items: center;
}

.order-card-main>div,
.order-card-header>div {
    min-width: 0;
}

.order-card-main>div:last-child,
.order-card-header>div:last-child {
    display: flex;
    justify-content: flex-end;
}

.order-detail-btn {
    width: 76px;
    min-width: 76px;
    max-width: 76px;
    padding: 8px 8px;
    font-size: 12px;
    white-space: nowrap;
}

.order-code {
    max-width: 100%;
    word-break: break-word;
}

.order-detail-pro {
    width: min(1180px, 100%);
}

.order-detail-hero {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: center;
    padding: 18px;
    border-radius: 20px;
    background: linear-gradient(135deg, rgba(56, 189, 248, .16), rgba(139, 92, 246, .12));
    border: 1px solid rgba(56, 189, 248, .25);
    margin-bottom: 14px;
}

.order-detail-hero h2 {
    margin: 4px 0;
    font-size: 22px;
    word-break: break-word;
}

.order-detail-hero-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
}

.order-total-big {
    font-size: 24px;
    font-weight: 900;
    color: #fff;
}

.order-detail-summary {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-bottom: 14px;
}

.order-detail-summary div {
    padding: 14px;
    border-radius: 16px;
    background: rgba(11, 18, 38, .48);
    border: 1px solid rgba(34, 50, 83, .75);
}

.order-detail-summary span {
    display: block;
    color: var(--muted);
    font-size: 12px;
    margin-bottom: 8px;
}

.order-detail-summary b {
    color: #fff;
    word-break: break-word;
}

.order-box-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.delivered-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.delivered-item {
    border-radius: 16px;
    background: rgba(17, 28, 51, .72);
    border: 1px solid rgba(34, 50, 83, .75);
    overflow: hidden;
}

.delivered-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-bottom: 1px solid rgba(34, 50, 83, .75);
}

.delivered-item pre {
    margin: 0;
    padding: 14px;
    color: #dbeafe;
    white-space: pre-wrap;
    word-break: break-word;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 13px;
    line-height: 1.55;
}

.order-json-box {
    max-height: 260px;
    overflow: auto;
    padding: 14px;
    border-radius: 16px;
    background: rgba(2, 6, 23, .72);
    border: 1px solid rgba(34, 50, 83, .75);
    color: #bae6fd;
    font-size: 12px;
    line-height: 1.55;
    white-space: pre-wrap;
    word-break: break-word;
}

.order-detail-footer {
    display: flex;
    justify-content: flex-end;
    margin-top: 14px;
}

.timeline-pro .timeline-item.done .timeline-dot {
    background: linear-gradient(135deg, #22c55e, #38bdf8);
    box-shadow: 0 0 0 5px rgba(34, 197, 94, .12);
}

@media (max-width: 900px) {
    .order-detail-summary {
        grid-template-columns: repeat(2, 1fr);
    }

    .order-detail-hero {
        flex-direction: column;
        align-items: flex-start;
    }

    .order-detail-hero-right {
        align-items: flex-start;
    }
}

@media (max-width: 640px) {
    .order-detail-summary {
        grid-template-columns: 1fr;
    }

    .order-box-head {
        flex-direction: column;
        align-items: flex-start;
    }
}

.wrap {
    width: 96vw !important;
    max-width: none !important;
    margin: 20px auto !important;
    padding: 0 10px;
}

.topbar,
.card,
.dashboard-grid {
    width: 100%;
}

@media (max-width: 1200px) {
    .wrap {
        width: 94vw !important;
    }
}

.topbar {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
}

.topbar .brand {
    justify-self: start;
}

.topbar .top-actions {
    justify-self: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    flex-wrap: nowrap;
}

.topbar .pill {
    justify-self: end;
}

.topbar .top-actions .nav-link {
    white-space: nowrap;
}

.topbar {
    display: grid !important;
    grid-template-columns: minmax(240px, 1fr) auto minmax(240px, 1fr) !important;
    align-items: center !important;
    gap: 14px !important;
}

.topbar .brand {
    justify-self: start !important;
}

.topbar .top-actions {
    justify-self: center !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 10px !important;
    flex-wrap: nowrap !important;
}

.topbar .pill {
    justify-self: end !important;
}

.topbar .top-actions .nav-link {
    white-space: nowrap !important;
}

@media (max-width: 1180px) {
    .topbar {
        grid-template-columns: 1fr !important;
    }

    .topbar .brand,
    .topbar .top-actions,
    .topbar .pill {
        justify-self: center !important;
    }

    .topbar .top-actions {
        flex-wrap: wrap !important;
    }
}

.dash-card.cyan {
    background: linear-gradient(135deg, #06b6d4, #0891b2);
}

.dash-card.purple {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
}

.stats-grid{
    display:grid;
    grid-template-columns:2fr 1.3fr 1.3fr;
    gap:16px;
    margin:16px 0;
    align-items:stretch;
}

.stats-grid .card{
    min-height:170px;
}



#paymentStatisticBox div{

justify-content:flex-start;

gap:12px;

font-size:15px;

}

.order-money {
    display: grid;
    grid-template-columns: repeat(2, minmax(92px, 1fr));
    gap: 6px;
    min-width: 220px;
}

.order-money div {
    padding: 6px 8px;
    border-radius: 8px;
    background: rgba(15, 23, 42, .38);
    border: 1px solid rgba(34, 50, 83, .55);
}

.order-money span {
    display: block;
    color: var(--muted);
    font-size: 11px;
    margin-bottom: 2px;
}

.order-money b {
    font-size: 13px;
}

.text-good {
    color: #22c55e;
}

@media (max-width: 900px) {
    .user-stats {
        grid-template-columns: repeat(2, 1fr);
    }
}

.emoji-picker-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(138px, 1fr));
    gap: 10px;
    margin: 14px 0;
    max-height: 56vh;
    overflow: auto;
}

.danger-zone {
    border-color: rgba(239, 68, 68, .38);
    background: linear-gradient(135deg, rgba(127, 29, 29, .18), rgba(15, 23, 42, .7));
}

.top-power-reset-btn {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 1px solid rgba(248, 113, 113, .78);
    background: radial-gradient(circle at 50% 35%, #ef4444, #7f1d1d);
    color: #fff;
    display: grid;
    place-items: center;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 0 0 4px rgba(239, 68, 68, .08);
    flex: 0 0 auto;
    justify-self: end;
    grid-column: 3;
}

.power-icon {
    position: relative;
    width: 17px;
    height: 17px;
    display: block;
}

.power-icon::before {
    content: "";
    position: absolute;
    inset: 4px 2px 1px;
    border: 2px solid currentColor;
    border-top-color: transparent;
    border-radius: 50%;
}

.power-icon::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 0;
    width: 2px;
    height: 10px;
    border-radius: 999px;
    background: currentColor;
    transform: translateX(-50%);
}

.top-power-reset-btn:hover {
    transform: translateY(-1px);
    box-shadow:
        0 0 0 6px rgba(239, 68, 68, .12),
        0 10px 22px rgba(239, 68, 68, .22);
}

.power-reset-btn {
    width: 88px;
    height: 88px;
    border-radius: 50%;
    border: 2px solid rgba(248, 113, 113, .78);
    background: radial-gradient(circle at 50% 35%, #ef4444, #7f1d1d);
    color: #fff;
    display: grid;
    place-items: center;
    font-size: 46px;
    line-height: 1;
    cursor: pointer;
    margin: 18px auto 12px;
    box-shadow:
        0 0 0 8px rgba(239, 68, 68, .08),
        0 20px 42px rgba(239, 68, 68, .26);
}

.power-reset-btn:hover {
    transform: translateY(-1px);
    box-shadow:
        0 0 0 10px rgba(239, 68, 68, .12),
        0 24px 48px rgba(239, 68, 68, .32);
}

.reset-modal {
    width: min(560px, 96vw);
}

.reset-warning {
    padding: 14px;
    border-radius: 8px;
    color: #fecaca;
    background: rgba(127, 29, 29, .34);
    border: 1px solid rgba(239, 68, 68, .44);
    margin-bottom: 14px;
}

.feature-toggle-list {
    display: grid;
    gap: 10px;
}

.feature-toggle {
    display: grid;
    grid-template-columns: 42px 1fr auto 58px;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: 12px;
    border: 1px solid rgba(75, 95, 135, .55);
    background: rgba(15, 26, 52, .55);
    cursor: pointer;
    transition: transform .18s ease, border-color .18s ease, background .18s ease, box-shadow .18s ease;
}

.feature-toggle:hover {
    transform: translateY(-1px);
    border-color: rgba(96, 165, 250, .55);
    box-shadow: 0 12px 26px rgba(15, 23, 42, .18);
}

.feature-toggle.enabled {
    border-color: rgba(34, 197, 94, .45);
    background: linear-gradient(135deg, rgba(22, 101, 52, .28), rgba(15, 26, 52, .72));
}

.feature-toggle.disabled {
    border-color: rgba(239, 68, 68, .45);
    background: linear-gradient(135deg, rgba(127, 29, 29, .28), rgba(15, 26, 52, .72));
}

.feature-toggle-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    background: rgba(255, 255, 255, .08);
    font-size: 20px;
}

.feature-toggle-text {
    display: grid;
    gap: 4px;
}

.feature-toggle-text b {
    color: var(--text);
}

.feature-toggle-text small,
.feature-toggle-state {
    color: var(--muted);
}

.feature-toggle input {
    display: none;
}

.switch-ui {
    width: 58px;
    height: 30px;
    border-radius: 999px;
    position: relative;
    background: linear-gradient(135deg, #ef4444, #991b1b);
    border: 1px solid rgba(255, 255, 255, .18);
    box-shadow: inset 0 0 12px rgba(0, 0, 0, .26);
}

.switch-ui::after {
    content: "";
    width: 24px;
    height: 24px;
    border-radius: 50%;
    position: absolute;
    top: 2px;
    left: 3px;
    background: #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, .26);
    transition: transform .2s ease;
}

.feature-toggle input:checked+.switch-ui {
    background: linear-gradient(135deg, #22c55e, #15803d);
}

.feature-toggle input:checked+.switch-ui::after {
    transform: translateX(27px);
}

.data-reset-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 10px;
    margin-top: 12px;
}

.data-reset-btn {
    min-height: 58px;
    border-radius: 12px;
    border: 1px solid rgba(75, 95, 135, .58);
    background: rgba(15, 26, 52, .72);
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    cursor: pointer;
    text-align: left;
    transition: transform .18s ease, border-color .18s ease, background .18s ease, box-shadow .18s ease, opacity .18s ease;
}

.data-reset-btn span {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    background: rgba(255, 255, 255, .08);
    flex: 0 0 auto;
}

.data-reset-btn:hover {
    border-color: rgba(96, 165, 250, .85);
    transform: translateY(-1px);
    box-shadow: 0 12px 26px rgba(96, 165, 250, .12);
}

.data-reset-btn.danger {
    border-color: rgba(248, 113, 113, .65);
    background: linear-gradient(135deg, rgba(127, 29, 29, .48), rgba(15, 26, 52, .72));
}

.data-reset-btn:disabled {
    opacity: .58;
    cursor: wait;
    transform: none;
}

.password-change-box {
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid rgba(148, 163, 184, .16);
    display: grid;
    gap: 10px;
}

.password-change-box h2 {
    margin-bottom: 0;
}

.app-dialog {
    width: min(460px, 94vw);
}

.app-dialog-message {
    color: var(--text);
    line-height: 1.55;
    white-space: pre-line;
}

.app-dialog-actions {
    justify-content: flex-end;
    margin-top: 16px;
}

.toast-stack {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 120;
    display: grid;
    gap: 10px;
    width: min(360px, calc(100vw - 32px));
    pointer-events: none;
}

.app-toast {
    border-radius: 14px;
    padding: 13px 14px;
    border: 1px solid rgba(148, 163, 184, .22);
    background: rgba(15, 23, 42, .96);
    box-shadow: 0 18px 42px rgba(0, 0, 0, .35);
    display: grid;
    gap: 4px;
    animation: toastIn .2s ease both;
}

.app-toast b {
    color: #fff;
}

.app-toast span {
    color: var(--muted);
    line-height: 1.45;
}

.app-toast.success {
    border-color: rgba(34, 197, 94, .45);
    background: linear-gradient(135deg, rgba(22, 101, 52, .96), rgba(15, 23, 42, .96));
}

.app-toast.error {
    border-color: rgba(239, 68, 68, .48);
    background: linear-gradient(135deg, rgba(127, 29, 29, .96), rgba(15, 23, 42, .96));
}

.app-toast.info {
    border-color: rgba(96, 165, 250, .5);
    background: linear-gradient(135deg, rgba(30, 64, 175, .9), rgba(15, 23, 42, .96));
}

.app-toast.warn,
.app-toast.warning {
    border-color: rgba(245, 158, 11, .5);
    background: linear-gradient(135deg, rgba(146, 64, 14, .95), rgba(15, 23, 42, .96));
}

.app-toast.hide {
    animation: toastOut .22s ease both;
}

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

@keyframes toastOut {
    to {
        opacity: 0;
        transform: translateY(8px);
    }
}

.reset-progress-wrap {
    margin-top: 16px;
}

.reset-progress-bar {
    width: 100%;
    height: 16px;
    border-radius: 999px;
    overflow: hidden;
    background: rgba(15, 23, 42, .7);
    border: 1px solid rgba(148, 163, 184, .22);
}

.reset-progress-bar div {
    width: 0;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #ef4444, #f97316, #22c55e);
    transition: width .22s ease;
}

.reset-progress-meta {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-top: 8px;
    color: var(--muted);
}

.reset-progress-meta b {
    color: #fff;
}

.emoji-picker-item {
    border: 1px solid var(--border);
    background: #fff;
    border-radius: 8px;
    padding: 10px;
    cursor: pointer;
    display: grid;
    gap: 6px;
    text-align: left;
    min-height: 112px;
}

.emoji-picker-item:hover {
    border-color: var(--primary);
    box-shadow: 0 8px 22px rgba(37, 99, 235, .12);
}

.emoji-picker-preview {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    font-size: 30px;
}

.emoji-picker-preview img {
    width: 42px;
    height: 42px;
    object-fit: contain;
}

.emoji-picker-item b,
.emoji-picker-item small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.emoji-picker-item small {
    color: var(--muted);
}

.system-button-row {
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 12px;
    background: rgba(15, 23, 42, .22);
}

.system-button-meta {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 10px;
}

.system-button-meta b {
    color: #fff;
    line-height: 1.4;
}

.system-button-meta span {
    color: var(--muted);
    font-size: 12px;
    font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
}

.bot-buttons-priority-card {
    margin-top: 16px;
}

.telegram-message-template-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 12px;
}

.telegram-message-template textarea {
    min-height: 150px;
    resize: vertical;
}

.telegram-message-group {
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 10px;
    margin-top: 12px;
    background: rgba(255, 255, 255, 0.02);
}

.telegram-message-group summary {
    cursor: pointer;
    font-weight: 800;
    color: var(--text);
    list-style: none;
}

.telegram-message-group summary::-webkit-details-marker {
    display: none;
}

.telegram-message-group-toggle {
    display: inline-flex;
    width: 18px;
    justify-content: center;
    color: var(--accent);
}

.editor-format-row {
    margin-top: 8px;
}

.editor-format-row .btn,
.telegram-message-template .row .btn {
    min-width: 36px;
}

.api-help-box {
    display: grid;
    gap: 8px;
    margin-bottom: 16px;
    padding: 14px;
    border-radius: 8px;
    border: 1px solid rgba(56, 189, 248, .3);
    background: linear-gradient(135deg, rgba(8, 47, 73, .34), rgba(15, 23, 42, .48));
}

.api-help-box b {
    color: #e0f2fe;
}

.api-help-box span {
    color: var(--muted);
    line-height: 1.5;
}

.api-help-box span b {
    color: #fff;
}

.bot-api-success-modal {
    width: min(560px, 94vw);
}

.bot-success-hero {
    display: grid;
    grid-template-columns: 62px 1fr;
    gap: 14px;
    align-items: center;
    margin-bottom: 16px;
    padding: 16px;
    border-radius: 8px;
    border: 1px solid rgba(34, 197, 94, .32);
    background: linear-gradient(135deg, rgba(22, 101, 52, .24), rgba(15, 23, 42, .52));
}

.bot-success-icon {
    width: 62px;
    height: 62px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    background: linear-gradient(135deg, #38bdf8, #22c55e);
    box-shadow: 0 16px 34px rgba(34, 197, 94, .18);
    font-size: 32px;
}

.bot-success-hero b,
.bot-success-hero span {
    display: block;
}

.bot-success-hero b {
    color: #fff;
    margin-bottom: 6px;
}

.bot-success-hero span {
    color: var(--muted);
    line-height: 1.55;
}

.bank-api-grid {
    display: grid;
    grid-template-columns: minmax(320px, .85fr) minmax(420px, 1.15fr);
    gap: 16px;
    margin-top: 16px;
    align-items: start;
}

.bank-api-grid .card:nth-child(3) {
    grid-column: 1 / -1;
}

.bank-info-list {
    display: grid;
    gap: 10px;
    margin: 14px 0;
}

.bank-info-list div {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: rgba(15, 23, 42, .24);
}

.bank-info-list span {
    color: var(--muted);
}

.bank-info-list b {
    color: #fff;
    text-align: right;
    overflow-wrap: anywhere;
}

.status-terminal {
    margin-top: 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    min-height: 260px;
    max-height: 420px;
    overflow: auto;
    padding: 10px;
    background: rgba(2, 6, 23, .45);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.status-line {
    display: grid;
    gap: 3px;
    padding: 9px 10px;
    border-radius: 8px;
    border: 1px solid rgba(148, 163, 184, .16);
    background: rgba(15, 23, 42, .36);
}

.status-line b {
    font-size: 12px;
    color: var(--muted);
}

.status-line span {
    color: #e5e7eb;
}

.status-line.ok {
    border-color: rgba(34, 197, 94, .3);
}

.status-line.bad {
    border-color: rgba(239, 68, 68, .38);
    background: rgba(127, 29, 29, .16);
}

.field-error {
    min-height: 18px;
    margin: 4px 0 10px;
    color: #fca5a5;
    font-size: 12px;
}

.field-invalid {
    border-color: rgba(239, 68, 68, .9) !important;
    box-shadow: 0 0 0 2px rgba(239, 68, 68, .16);
}

.panel-auth-locked {
    overflow: hidden;
}

.panel-auth-overlay {
    position: fixed;
    inset: 0;
    z-index: 500;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 22px;
    background:
        linear-gradient(135deg, rgba(2, 6, 23, .92), rgba(15, 23, 42, .86)),
        radial-gradient(760px 420px at 28% 8%, rgba(56, 189, 248, .28), transparent 62%);
    backdrop-filter: blur(14px);
}

.panel-auth-overlay.show {
    display: flex;
}

.panel-auth-card {
    width: min(520px, 100%);
    border-radius: 8px;
    padding: 24px;
    border: 1px solid rgba(125, 211, 252, .34);
    background: linear-gradient(180deg, rgba(17, 28, 51, .98), rgba(8, 14, 28, .98));
    box-shadow: 0 28px 80px rgba(0, 0, 0, .52);
}

.panel-auth-top {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 18px;
}

.panel-auth-logo {
    width: 54px;
    height: 54px;
    border-radius: 8px;
    display: grid;
    place-items: center;
    font-weight: 900;
    font-size: 18px;
    background: linear-gradient(135deg, #38bdf8, #22c55e);
    color: #04111f;
    box-shadow: 0 12px 28px rgba(56, 189, 248, .2);
}

.panel-auth-top h2 {
    margin: 0;
    font-size: 22px;
    letter-spacing: 0;
}

.panel-auth-top p {
    margin: 4px 0 0;
    color: var(--muted);
    font-size: 13px;
}

.panel-auth-brand {
    display: grid;
    gap: 5px;
    margin-bottom: 16px;
    padding: 13px 14px;
    border-radius: 8px;
    border: 1px solid rgba(56, 189, 248, .28);
    background: rgba(14, 165, 233, .08);
    color: #dbeafe;
}

.panel-auth-brand b {
    font-size: 14px;
}

.panel-auth-brand span {
    color: #a7f3d0;
    font-size: 13px;
}

.panel-auth-brand a {
    color: #7dd3fc;
    font-weight: 800;
    text-decoration: none;
}

.panel-auth-brand a:hover {
    text-decoration: underline;
}

.panel-auth-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 16px;
}

.panel-auth-tabs button {
    height: 40px;
    border-radius: 8px;
    border: 1px solid rgba(75, 95, 135, .72);
    background: rgba(15, 23, 42, .72);
    color: var(--text);
    font-weight: 800;
    cursor: pointer;
    transition: transform .18s ease, border-color .18s ease, background .18s ease, box-shadow .18s ease, opacity .18s ease;
}

.panel-auth-tabs button:hover {
    transform: translateY(-1px);
    border-color: rgba(96, 165, 250, .68);
    box-shadow: 0 10px 22px rgba(56, 189, 248, .12);
}

.panel-auth-tabs button.active {
    background: linear-gradient(135deg, #38bdf8, #22c55e);
    color: #04111f;
    border-color: transparent;
}

.panel-auth-form {
    display: grid;
    gap: 9px;
}

.panel-auth-form.hidden {
    display: none;
}

.panel-auth-form label {
    color: #dbeafe;
    font-weight: 750;
    font-size: 13px;
}

.panel-auth-form input {
    border-radius: 8px;
    min-height: 44px;
    background: rgba(2, 6, 23, .55);
    border-color: rgba(96, 165, 250, .28);
    font-weight: 700;
}

.panel-auth-form .panel-auth-remember {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: fit-content;
    color: #bfdbfe;
    cursor: pointer;
    user-select: none;
}

.panel-auth-form .panel-auth-remember input {
    width: 16px;
    height: 16px;
    min-height: 0;
    accent-color: #22c55e;
}

.panel-auth-form .btn {
    border-radius: 8px;
    min-height: 44px;
    margin-top: 6px;
}

.panel-auth-message {
    min-height: 22px;
    margin-top: 12px;
    color: #fca5a5;
    font-weight: 700;
    font-size: 13px;
}

.panel-auth-message.info {
    color: #93c5fd;
}

.panel-auth-message.success {
    color: #86efac;
}

.panel-auth-footer {
    margin-top: 10px;
    padding-top: 12px;
    border-top: 1px solid rgba(148, 163, 184, .16);
    color: #93c5fd;
    font-size: 12px;
    font-weight: 750;
    text-align: center;
}

.panel-auth-note {
    margin-top: 10px;
    padding: 12px;
    border-radius: 8px;
    border: 1px solid rgba(148, 163, 184, .18);
    background: rgba(2, 6, 23, .36);
    color: var(--muted);
    font-size: 12px;
    line-height: 1.5;
}

@media (max-width: 980px) {
    .bank-api-grid {
        grid-template-columns: 1fr;
    }

    .bank-api-grid .card:nth-child(3) {
        grid-column: auto;
    }
}

/* Responsive guardrails for every admin page. Keep this block last. */
html {
    overflow-x: clip;
}

body {
    min-width: 0;
    overflow-x: clip;
}

img,
video,
canvas,
svg {
    max-width: 100%;
}

.wrap,
.topbar,
.card,
.rental-panel,
.modal-content,
.table-wrap,
.rental-table-wrap {
    max-width: 100%;
}

.brand,
.brand > div,
.pill,
.pill input,
.row,
.card,
.rental-panel,
.rental-config-card,
.modal-content,
.table-wrap,
.rental-table-wrap {
    min-width: 0;
}

.top-actions {
    max-width: 100%;
    min-width: 0;
}

.table-wrap,
.rental-table-wrap,
.emoji-main .table-wrap {
    overflow-x: auto;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
}

table,
.rental-table {
    width: 100%;
}

pre,
code,
textarea,
.rental-log,
.hint,
.sub,
.card,
.rental-panel,
.status-terminal {
    overflow-wrap: anywhere;
}

textarea {
    max-width: 100%;
    white-space: pre-wrap;
}

.row > *,
.rental-row > *,
.auto-reply-session-actions > *,
.auto-reply-primary-actions > * {
    min-width: 0;
}

.modal {
    padding: 14px;
}

.modal-content {
    width: min(920px, calc(100vw - 28px));
    max-height: calc(100vh - 28px);
    overflow: hidden;
}

.modal-body {
    max-height: calc(100vh - 160px);
    overflow: auto;
    -webkit-overflow-scrolling: touch;
}

.modal-head,
.modal-foot,
.rental-actions,
.auto-reply-toolbar,
.auto-reply-actions,
.order-box-head {
    flex-wrap: wrap;
}

@media (max-width: 1180px) {
    .topbar {
        grid-template-columns: 1fr !important;
        align-items: stretch !important;
    }

    .topbar .brand,
    .topbar .pill {
        width: 100%;
        justify-self: stretch !important;
    }

    .topbar .top-actions {
        width: 100%;
        justify-self: stretch !important;
        justify-content: flex-start !important;
        flex-wrap: nowrap !important;
        overflow-x: auto;
        overflow-y: hidden;
        padding: 2px 2px 8px;
        scrollbar-width: thin;
        -webkit-overflow-scrolling: touch;
    }

    .topbar .top-actions .nav-link {
        flex: 0 0 auto;
    }

    .topbar .pill input {
        width: 100%;
    }
}

/* Luxury ocean-blue theme and final desktop navigation behavior. */
:root {
    --bg: #030711;
    --card: rgba(8, 18, 39, .92);
    --line: rgba(77, 163, 255, .24);
    --muted: #a9bad3;
    --text: #f3f8ff;
    --brand: #48a8ff;
    --brand-strong: #187ee6;
    --brand-soft: rgba(72, 168, 255, .13);
    --ok: #3b9eff;
    --sidebar-width: clamp(250px, 20vw, 330px);
    --shadow: 0 20px 52px rgba(0, 4, 14, .48);
}

body {
    background:
        radial-gradient(900px 580px at 8% -8%, rgba(39, 126, 255, .23), transparent 62%),
        radial-gradient(760px 540px at 96% 5%, rgba(65, 105, 225, .15), transparent 61%),
        linear-gradient(145deg, #02050c, #071225 49%, #030812);
}

body::before {
    background-image: linear-gradient(rgba(88, 166, 255, .026) 1px, transparent 1px),
        linear-gradient(90deg, rgba(88, 166, 255, .026) 1px, transparent 1px);
}

.panel-sidebar {
    width: var(--sidebar-width);
    border-color: rgba(72, 168, 255, .2);
    background: linear-gradient(180deg, rgba(5, 13, 29, .99), rgba(2, 7, 17, .99));
    box-shadow: 18px 0 56px rgba(0, 3, 12, .42);
}

.sidebar-brand,
.panel-menu-toggle,
.topbar .pill {
    border-color: rgba(72, 168, 255, .23);
    background: rgba(49, 134, 255, .09);
}

.sidebar-avatar-wrap,
.topbar .logo.panel-avatar {
    background: linear-gradient(135deg, #9bd2ff, #247fea);
    box-shadow: 0 0 0 5px rgba(72, 168, 255, .08), 0 0 27px rgba(37, 126, 234, .3);
}

.sidebar-avatar-wrap {
    cursor: pointer;
}

.sidebar-avatar-wrap::after {
    border-color: rgba(112, 184, 255, .45);
}

.panel-sidebar .nav-link:hover,
.panel-sidebar .nav-link:focus-visible {
    border-color: rgba(72, 168, 255, .3);
    background: rgba(51, 137, 255, .14);
    box-shadow: inset 3px 0 #4aa8ff, 0 8px 24px rgba(0, 5, 18, .24);
}

.panel-sidebar .nav-link.active,
.btn.ok,
.nav-link.active {
    color: #f8fbff;
    border-color: rgba(127, 190, 255, .6);
    background: linear-gradient(135deg, #238eea, #1556bc);
    box-shadow: 0 10px 28px rgba(20, 103, 217, .25);
}

.topbar,
.card,
.dash-card,
.rental-panel,
.rental-config-card,
.modal-content,
.panel-auth-card {
    border-color: rgba(72, 168, 255, .2) !important;
    background: linear-gradient(145deg, rgba(10, 25, 52, .94), rgba(4, 12, 28, .95)) !important;
}

.card:hover,
.dash-card:hover,
.rental-panel:hover,
.rental-config-card:hover {
    border-color: rgba(82, 172, 255, .47) !important;
    box-shadow: 0 22px 52px rgba(0, 4, 16, .52), 0 0 30px rgba(48, 135, 255, .08);
}

input:focus,
select:focus,
textarea:focus {
    border-color: #4aa8ff !important;
    box-shadow: 0 0 0 3px rgba(62, 153, 255, .14), 0 10px 28px rgba(0, 5, 18, .22);
}

.admin-control-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: stretch;
}

.admin-control-grid > .left,
.admin-control-grid > .right {
    display: contents;
}

.admin-control-grid > .left > .card {
    grid-column: 1;
}

.admin-control-grid > .right > .card {
    grid-column: 2;
}

.admin-control-grid > .left > .card,
.admin-control-grid > .right > .card {
    height: 100%;
    margin-top: 0 !important;
}

.brand-settings-card {
    width: min(860px, calc(100vw - 28px));
}

.brand-settings-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(230px, .65fr);
    gap: 24px;
}

.brand-settings-fields {
    display: grid;
    gap: 9px;
}

.brand-settings-fields label {
    margin-top: 5px;
    color: #c7d8ef;
    font-size: 13px;
    font-weight: 750;
}

.brand-avatar-editor {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 22px;
    border: 1px solid rgba(72, 168, 255, .22);
    border-radius: 18px;
    text-align: center;
    background: rgba(28, 92, 174, .08);
}

.brand-avatar-editor span {
    color: var(--muted);
    font-size: 12px;
}

.brand-avatar-preview {
    width: 150px;
    height: 150px;
    padding: 4px;
    border-radius: 50%;
    background: linear-gradient(135deg, #a5d6ff, #1c72da);
    box-shadow: 0 18px 45px rgba(5, 67, 153, .3);
}

.brand-avatar-preview img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

@media (min-width: 1101px) {
    body,
    body:not(.sidebar-open) {
        --sidebar-width: clamp(250px, 20vw, 330px);
        padding-left: var(--sidebar-width);
    }

    body:not(.sidebar-open) .panel-sidebar,
    body.sidebar-open .panel-sidebar {
        width: var(--sidebar-width);
        transform: none;
    }

    body:not(.sidebar-open) .sidebar-brand > div:last-child,
    body:not(.sidebar-open) .sidebar-label,
    body:not(.sidebar-open) .nav-link span:last-child {
        display: block;
    }

    body:not(.sidebar-open) .panel-sidebar .nav-link {
        justify-content: flex-start;
        padding: 0 13px;
    }

    body:not(.sidebar-open) .sidebar-brand,
    body.sidebar-open .sidebar-brand {
        justify-content: flex-start;
        min-height: 70px;
        padding: 10px;
    }

    .sidebar-brand > div:last-child {
        min-width: 0;
        overflow: hidden;
    }

    .sidebar-brand strong,
    .sidebar-brand small {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .panel-menu-toggle {
        display: none;
    }
}

@media (max-width: 980px) {
    .admin-control-grid {
        grid-template-columns: 1fr;
    }

    .admin-control-grid > .left,
    .admin-control-grid > .right {
        display: block;
    }

    .admin-control-grid > .left > .card,
    .admin-control-grid > .right > .card {
        margin-bottom: 16px;
    }
}

@media (max-width: 680px) {
    .brand-settings-grid {
        grid-template-columns: 1fr;
    }

    .brand-avatar-editor {
        grid-row: 1;
    }
}

@media (max-width: 980px) {
    .wrap {
        width: 100% !important;
        margin: 0 auto !important;
        padding: 12px;
    }

    .grid,
    .auto-reply-grid,
    .auto-reply-safety-grid,
    .bank-api-grid,
    .emoji-workspace,
    .emoji-layout,
    .rental-config-layout,
    .order-detail-grid,
    .payments-layout,
    .product-layout,
    .wallet-layout {
        grid-template-columns: 1fr !important;
    }

    .dashboard-grid,
    .stats-grid,
    .rental-grid,
    .system-health-grid,
    .order-detail-summary,
    .payment-stat-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }

    .auto-reply-session-actions,
    .auto-reply-primary-actions {
        grid-template-columns: 1fr !important;
    }

    .card .row,
    .row {
        align-items: stretch;
    }

    .row .btn,
    .card .row .btn,
    .rental-actions .btn {
        flex: 1 1 auto;
    }
}

@media (max-width: 720px) {
    :root {
        --radius: 10px;
    }

    .wrap {
        padding: 10px;
    }

    .topbar,
    .card,
    .rental-panel {
        border-radius: 10px;
        padding: 12px;
    }

    .brand {
        align-items: flex-start;
    }

    .brand h1 {
        font-size: 15px;
    }

    .brand p {
        line-height: 1.35;
    }

    .dashboard-grid,
    .stats-grid,
    .rental-grid,
    .system-health-grid,
    .order-detail-summary,
    .payment-stat-grid,
    .rental-row,
    #messageFields {
        grid-template-columns: 1fr !important;
    }

    .btn {
        min-height: 40px;
        padding: 0 12px;
    }

    .row,
    .rental-actions {
        gap: 8px;
    }

    .row .btn,
    .rental-actions .btn,
    .modal-foot .btn {
        width: 100%;
    }

    .pill {
        padding: 9px 10px;
    }

    .pill input {
        font-size: 13px;
    }

    .modal {
        padding: 8px;
        align-items: stretch;
    }

    .modal-content,
    .rental-modal,
    .rental-modal-wide {
        width: calc(100vw - 16px) !important;
        max-height: calc(100vh - 16px);
        border-radius: 10px;
    }

    .modal-head,
    .modal-body,
    .modal-foot {
        padding-left: 12px;
        padding-right: 12px;
    }

    .modal-body {
        max-height: calc(100vh - 144px);
    }

    input:not([type="checkbox"]):not([type="radio"]),
select,
textarea {
        font-size: 16px;
        border-radius: 10px;
    }
}

@media (max-width: 480px) {
    .wrap {
        padding: 8px;
    }

    .logo {
        width: 34px;
        height: 34px;
        border-radius: 10px;
    }

    .top-actions {
        gap: 6px !important;
    }

    .top-actions .nav-link {
        min-height: 38px;
        padding: 0 10px;
    }

    .card,
    .rental-panel,
    .rental-config-card {
        padding: 10px;
    }

    .rental-table,
    table {
        min-width: 620px;
    }

    .bot-success-hero {
        grid-template-columns: 1fr;
        text-align: left;
    }
}

@media (max-width: 980px) {
    .order-card-header {
        display: none !important;
    }

    .order-card-list {
        overflow-x: hidden !important;
    }

    .order-card-main {
        grid-template-columns: 1fr !important;
        gap: 10px !important;
    }

    .order-card-main > div:last-child {
        justify-content: flex-start !important;
    }

    .order-detail-btn {
        width: 100% !important;
        min-width: 0 !important;
    }

    .promo-toolbar {
        flex-wrap: wrap !important;
        overflow: hidden;
    }

    .promo-toolbar input,
    .promo-toolbar select,
    .promo-toolbar .btn {
        flex: 1 1 100% !important;
        min-width: 0 !important;
    }
}

.user-list-wrap {
    max-height: calc(100vh - 270px);
    overflow-x: auto !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
}

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

.warranty-columns {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-top: 10px;
}

.compact-row {
    align-items: center;
    gap: 8px;
}

.compact-row label {
    min-width: 112px;
    margin: 0;
    color: var(--muted);
    font-size: 12px;
}

.compact-row input {
    min-width: 56px;
}

.warranty-stat-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 12px;
}

.warranty-stat-card {
    background: rgba(15, 23, 42, .55);
    border: 1px solid rgba(148, 163, 184, .22);
    border-radius: 8px;
    padding: 10px 12px;
}

.warranty-stat-card span {
    display: block;
    color: var(--muted);
    font-size: 12px;
}

.warranty-stat-card b {
    display: block;
    margin-top: 4px;
    color: #f8fafc;
    font-size: 20px;
}

.warranty-filter-row {
    margin-bottom: 12px;
}

.warranty-filter-row input {
    flex: 2 1 260px;
}

.warranty-filter-row select {
    flex: 1 1 160px;
}

@media (max-width: 980px) {
    .grid-2,
    .warranty-columns,
    .warranty-stat-grid {
        grid-template-columns: 1fr;
    }
}
.warranty-message-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 6px 0;
}

.warranty-message-toolbar .format-bold {
    font-weight: 800;
}

.warranty-message-toolbar .format-italic {
    font-style: italic;
}

.warranty-message-toolbar .warranty-message-save {
    margin-left: auto;
}

.warranty-variable-help {
    line-height: 1.7;
    margin: 2px 0 6px;
}

.warranty-variable-help code {
    color: #8dd8ff;
    font-weight: 700;
}

/* Modal scroll safety: long forms such as Product/Folder edit do not always
   use a dedicated .modal-body, so the content panel itself must be scrollable. */
.modal.show {
    overflow-x: hidden;
    overflow-y: auto;
    align-items: flex-start;
}

.modal-content,
.rental-modal,
.rental-modal-wide,
.product-modal,
.order-detail-modal,
.user-profile-modal {
    max-height: calc(100vh - 28px);
    overflow-x: hidden !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
}

.modal-body {
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

/* Customer history can contain more rows than the profile modal. Keep the
   generic horizontal table scrolling, but also allow the order/transaction
   tables to scroll vertically instead of clipping everything after 70vh. */
.user-profile-modal .profile-content .table-wrap {
    max-height: min(60vh, 640px);
    overflow-x: auto;
    overflow-y: auto;
    resize: none;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
}

.user-profile-modal .profile-content .table-wrap thead th {
    position: sticky;
    top: 0;
    z-index: 2;
}

/* The responsive table rule disables vertical overflow globally. The CTV
   list can be much taller than the viewport, so give it its own scroll area. */
.ctv-list-wrap {
    max-height: 70vh;
    overflow-x: auto;
    overflow-y: auto;
    resize: vertical;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
}

.ctv-list-wrap thead th {
    position: sticky;
    top: 0;
    z-index: 2;
}

.wallet-deposit-history-wrap {
    max-height: 70vh;
    overflow-x: auto;
    overflow-y: auto;
    resize: vertical;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
}

.wallet-deposit-history-wrap thead th {
    position: sticky;
    top: 0;
    z-index: 2;
}

/* Warranty history tables need their own vertical scroll area. The generic
   responsive table rule above only keeps horizontal scrolling enabled. */
.warranty-tables .table-wrap {
    max-height: 70vh;
    overflow-x: auto;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
}

.warranty-live-log-head {
    justify-content: space-between;
    align-items: flex-start;
}

.warranty-log-connection {
    border: 1px solid rgba(255, 255, 255, .16);
    border-radius: 999px;
    padding: 5px 10px;
    color: #f6c453;
    font-size: 12px;
}

.warranty-log-connection.live {
    color: #65e6a7;
    border-color: rgba(101, 230, 167, .45);
}

.warranty-log-connection.fallback {
    color: #8dd8ff;
    border-color: rgba(141, 216, 255, .4);
}

.warranty-activity-logs {
    height: min(480px, 60vh);
    margin-top: 12px;
    overflow: auto;
    overscroll-behavior: contain;
    border: 1px solid rgba(255, 255, 255, .1);
    border-radius: 12px;
    background: #080d17;
    font: 12px/1.5 Consolas, "Courier New", monospace;
}

.warranty-log-line {
    display: grid;
    grid-template-columns: 145px 68px minmax(120px, 180px) minmax(0, 1fr);
    gap: 9px;
    padding: 7px 10px;
    border-bottom: 1px solid rgba(255, 255, 255, .055);
    color: #d7e0ec;
}

.warranty-log-line:last-child {
    border-bottom: 0;
}

.warranty-log-line.warning { background: rgba(246, 196, 83, .06); }
.warranty-log-line.error { background: rgba(255, 91, 112, .08); }
.warranty-log-line.success { background: rgba(101, 230, 167, .055); }
.warranty-log-time { color: #7f91a8; }
.warranty-log-level { font-weight: 800; text-transform: uppercase; }
.warranty-log-line.warning .warranty-log-level { color: #f6c453; }
.warranty-log-line.error .warranty-log-level { color: #ff6f82; }
.warranty-log-line.success .warranty-log-level { color: #65e6a7; }
.warranty-log-step { color: #8dd8ff; overflow-wrap: anywhere; }
.warranty-log-message { min-width: 0; overflow-wrap: anywhere; }
.warranty-log-context { color: #8fa1b8; margin-left: 8px; }
.warranty-log-empty { padding: 24px; text-align: center; color: #7f91a8; }

@media (max-width: 760px) {
    .warranty-log-line {
        grid-template-columns: 1fr auto;
    }
    .warranty-log-step,
    .warranty-log-message {
        grid-column: 1 / -1;
    }
}

/* Final geometry safeguards: keep the content inside the remaining viewport
   after the desktop sidebar and let dense toolbars wrap on tablet widths. */
body > .wrap {
    width: auto !important;
}

fieldset {
    min-width: 0;
    max-width: 100%;
}

.promo-toolbar,
.promo-toolbar > * {
    min-width: 0;
}

@media (max-width: 1180px) {
    .promo-toolbar {
        flex-wrap: wrap !important;
    }
}

/* 2026 Premium teal panel shell */
:root {
    --bg: #061512;
    --card: rgba(10, 36, 31, .88);
    --line: rgba(94, 234, 212, .21);
    --muted: #a9c8c1;
    --text: #effffb;
    --brand: #45e4c1;
    --brand-strong: #18caa5;
    --brand-soft: rgba(69, 228, 193, .12);
    --ok: #47e6b1;
    --radius: 18px;
    --page-gutter: clamp(3vw, 4.2vw, 7vw);
    --sidebar-width: 270px;
    --shadow: 0 18px 48px rgba(0, 12, 10, .34);
}

html {
    scrollbar-width: none;
    scroll-behavior: smooth;
}

html::-webkit-scrollbar,
body::-webkit-scrollbar {
    width: 0;
    height: 0;
    display: none;
}

body {
    min-height: 100%;
    background:
        radial-gradient(900px 560px at 8% -5%, rgba(45, 212, 191, .19), transparent 62%),
        radial-gradient(750px 520px at 96% 6%, rgba(16, 185, 129, .13), transparent 60%),
        linear-gradient(145deg, #061411, #071d18 48%, #061512);
    background-attachment: fixed;
    padding-left: var(--sidebar-width);
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: -1;
    opacity: .28;
    background-image: linear-gradient(rgba(94, 234, 212, .025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(94, 234, 212, .025) 1px, transparent 1px);
    background-size: 32px 32px;
}

.wrap {
    width: 100%;
    max-width: 1680px;
    padding: clamp(18px, 3vw, 46px) var(--page-gutter) clamp(36px, 5vw, 76px);
}

.panel-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 90;
    width: var(--sidebar-width);
    padding: 22px 15px;
    border-right: 1px solid rgba(94, 234, 212, .18);
    background: linear-gradient(180deg, rgba(7, 31, 26, .98), rgba(5, 22, 19, .98));
    box-shadow: 18px 0 52px rgba(0, 10, 8, .28);
    overflow-y: auto;
    transition: transform .32s cubic-bezier(.2, .8, .2, 1);
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 11px;
    margin: 0 3px 24px;
    padding: 11px;
    border: 1px solid rgba(94, 234, 212, .18);
    border-radius: 17px;
    background: rgba(69, 228, 193, .07);
}

.sidebar-brand strong,
.sidebar-brand small {
    display: block;
}

.sidebar-brand strong {
    color: #f4fffc;
    font-size: 12px;
    letter-spacing: .06em;
}

.sidebar-brand small {
    margin-top: 3px;
    color: var(--muted);
    font-size: 10px;
}

.sidebar-avatar-wrap {
    position: relative;
    flex: 0 0 48px;
    width: 48px;
    height: 48px;
    padding: 2px;
    border-radius: 50%;
    background: linear-gradient(135deg, #99ffe9, #18caa5);
    box-shadow: 0 0 0 5px rgba(69, 228, 193, .08), 0 0 24px rgba(69, 228, 193, .22);
    animation: avatarFloat 4s ease-in-out infinite;
}

.sidebar-avatar-wrap::after {
    content: "";
    position: absolute;
    inset: -5px;
    border: 1px solid rgba(153, 255, 233, .4);
    border-radius: 50%;
    animation: avatarPulse 2.8s ease-out infinite;
}

.sidebar-avatar-wrap img,
.logo.panel-avatar img {
    width: 100%;
    height: 100%;
    display: block;
    border-radius: 50%;
    object-fit: cover;
}

.sidebar-label {
    margin: 0 10px 9px;
    color: #78b9aa;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .13em;
}

.panel-sidebar .top-actions {
    display: grid;
    gap: 7px;
    max-width: none;
    overflow: visible;
}

.panel-sidebar .nav-link {
    width: 100%;
    min-height: 45px;
    justify-content: flex-start;
    padding: 0 13px;
    border: 1px solid transparent;
    border-radius: 13px;
    color: #cce8e1;
    background: transparent;
    transition: color .2s ease, background .2s ease, border-color .2s ease, transform .2s ease, box-shadow .2s ease;
}

.panel-sidebar .nav-link:hover,
.panel-sidebar .nav-link:focus-visible {
    color: #fff;
    border-color: rgba(94, 234, 212, .25);
    background: rgba(69, 228, 193, .11);
    box-shadow: inset 3px 0 #45e4c1, 0 8px 22px rgba(0, 0, 0, .12);
    transform: translateX(3px);
}

.panel-sidebar .nav-link.active {
    color: #032019;
    border-color: rgba(153, 255, 233, .55);
    background: linear-gradient(135deg, #75efd5, #2bd0ad);
    box-shadow: 0 10px 26px rgba(43, 208, 173, .2);
}

.panel-sidebar .nav-icon {
    display: grid;
    place-items: center;
    width: 24px;
    font-size: 16px;
}

.panel-menu-toggle {
    display: grid;
    flex: 0 0 42px;
    width: 42px;
    height: 42px;
    place-content: center;
    gap: 5px;
    padding: 0;
    border: 1px solid rgba(94, 234, 212, .27);
    border-radius: 13px;
    color: var(--text);
    background: rgba(69, 228, 193, .09);
    cursor: pointer;
    transition: .22s ease;
}

.panel-menu-toggle span {
    width: 19px;
    height: 2px;
    border-radius: 4px;
    background: #93f8e2;
    transition: transform .24s ease, opacity .2s ease;
}

.panel-menu-toggle:hover {
    border-color: #5eead4;
    background: rgba(69, 228, 193, .18);
    box-shadow: 0 0 22px rgba(69, 228, 193, .14);
}

.panel-sidebar-backdrop {
    display: none;
}

.topbar {
    display: flex !important;
    min-height: 76px;
    padding: 14px 17px;
    border-color: rgba(94, 234, 212, .2);
    background: rgba(7, 30, 25, .78);
    box-shadow: 0 14px 38px rgba(0, 12, 10, .24);
}

.topbar .brand {
    flex: 1;
    min-width: 0;
}

.topbar .logo.panel-avatar {
    overflow: visible;
    width: 46px;
    height: 46px;
    padding: 2px;
    border-radius: 50%;
    background: linear-gradient(135deg, #a7ffeb, #23cbaa);
    animation: avatarFloat 4s ease-in-out infinite;
}

.topbar .pill {
    border-color: rgba(94, 234, 212, .2);
    background: rgba(5, 23, 19, .55);
}

.card,
.dash-card,
.rental-panel,
.rental-config-card,
.modal-content,
.panel-auth-card {
    border-color: rgba(94, 234, 212, .18) !important;
    background: linear-gradient(145deg, rgba(12, 43, 37, .9), rgba(7, 29, 25, .91)) !important;
    box-shadow: var(--shadow);
    transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease, background .25s ease;
}

.card:hover,
.dash-card:hover,
.rental-panel:hover,
.rental-config-card:hover {
    border-color: rgba(94, 234, 212, .42) !important;
    box-shadow: 0 20px 48px rgba(0, 14, 11, .4), 0 0 28px rgba(69, 228, 193, .06);
    transform: translateY(-2px);
}

.btn,
button,
input:not([type="checkbox"]):not([type="radio"]),
select,
textarea {
    transition: border-color .2s ease, background .2s ease, color .2s ease, box-shadow .2s ease, transform .2s ease;
}

.btn {
    border: 1px solid rgba(94, 234, 212, .22);
    box-shadow: inset 0 1px rgba(255, 255, 255, .035);
}

.btn:hover:not(:disabled),
button:hover:not(:disabled) {
    border-color: rgba(94, 234, 212, .58);
    box-shadow: 0 8px 24px rgba(16, 185, 129, .13);
    transform: translateY(-1px);
}

.btn.ok,
.nav-link.active {
    color: #03251d;
    background: linear-gradient(135deg, #75efd5, #2bd0ad);
}

input:focus,
select:focus,
textarea:focus {
    border-color: #45e4c1 !important;
    outline: none;
    box-shadow: 0 0 0 3px rgba(69, 228, 193, .12), 0 10px 26px rgba(0, 10, 8, .14);
}

.premium-editor-toolbar {
    display: flex;
    gap: 7px;
    align-items: center;
    margin: 8px 0 2px;
}

.premium-editor-toolbar .btn {
    flex: 0 0 38px !important;
    width: 38px !important;
    min-height: 35px;
    padding: 0;
}

body:not(.sidebar-open) .panel-menu-toggle span:first-child {
    transform: translateY(7px) rotate(45deg);
}

body:not(.sidebar-open) .panel-menu-toggle span:nth-child(2) {
    opacity: 0;
}

body:not(.sidebar-open) .panel-menu-toggle span:last-child {
    transform: translateY(-7px) rotate(-45deg);
}

body:not(.sidebar-open) {
    --sidebar-width: 260px;
}

body:not(.sidebar-open) .panel-sidebar {
    width: 260px;
}

.grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
}

.grid > .left,
.grid > .right {
    width: 100%;
    min-width: 0;
}

@keyframes avatarFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-3px); }
}

@keyframes avatarPulse {
    0% { opacity: .65; transform: scale(.92); }
    75%, 100% { opacity: 0; transform: scale(1.16); }
}

@media (max-width: 1100px) {
    body,
    body:not(.sidebar-open) {
        padding-left: 0;
        --sidebar-width: 280px;
    }

    body:not(.sidebar-open) .panel-sidebar,
    .panel-sidebar {
        width: min(84vw, 290px);
        transform: translateX(-105%);
    }

    body.sidebar-open .panel-sidebar {
        transform: translateX(0);
    }

    body:not(.sidebar-open) .sidebar-brand > div:last-child,
    body:not(.sidebar-open) .sidebar-label,
    body:not(.sidebar-open) .nav-link span:last-child {
        display: block;
    }

    body:not(.sidebar-open) .panel-sidebar .nav-link {
        justify-content: flex-start;
        padding: 0 13px;
    }

    .panel-sidebar-backdrop {
        position: fixed;
        inset: 0;
        z-index: 80;
        display: block;
        border: 0;
        opacity: 0;
        visibility: hidden;
        background: rgba(0, 12, 10, .68);
        backdrop-filter: blur(4px);
        transition: opacity .25s ease, visibility .25s ease;
    }

    body.sidebar-open .panel-sidebar-backdrop {
        opacity: 1;
        visibility: visible;
    }

    body:not(.sidebar-open) .panel-menu-toggle span {
        transform: none;
        opacity: 1;
    }
}

@media (max-width: 980px) {
    .wrap {
        width: 100% !important;
        padding: clamp(14px, 4vw, 28px) var(--page-gutter) clamp(30px, 7vw, 56px);
    }
}

@media (max-width: 720px) {
    :root {
        --page-gutter: clamp(3vw, 4vw, 7vw);
    }

    .topbar {
        display: grid !important;
        grid-template-columns: auto minmax(0, 1fr) !important;
        align-items: center !important;
        gap: 11px;
        padding: 12px;
    }

    .topbar .brand {
        width: 100%;
        align-items: center;
    }

    .topbar .brand p {
        display: -webkit-box;
        overflow: hidden;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
    }

    .topbar .pill {
        grid-column: 1 / -1;
    }

    .card,
    .rental-panel,
    .rental-config-card {
        padding: clamp(12px, 4vw, 18px);
    }

    .premium-editor-toolbar .btn {
        width: 40px !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }
}

/* Warranty sections: compact by default, expanded explicitly with +/- button. */
.warranty-collapsible {
    padding: 0 !important;
    overflow: hidden !important;
    background: var(--card, rgba(15, 23, 42, 0.75)) !important;
    border: 1px solid var(--card-border, rgba(255, 255, 255, 0.08)) !important;
    border-radius: var(--radius, 14px) !important;
    box-shadow: var(--shadow, 0 4px 20px rgba(0, 0, 0, 0.25)) !important;
}

.warranty-collapse-toggle {
    width: 100% !important;
    min-height: 58px !important;
    padding: 14px 18px !important;
    border: 0 !important;
    background: transparent !important;
    color: #f8fafc !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 14px !important;
    text-align: left !important;
    cursor: pointer !important;
    transition: background 0.2s ease !important;
}

.warranty-collapse-toggle:hover {
    background: rgba(56, 189, 248, 0.04) !important;
}

.warranty-collapse-toggle > span:first-child {
    display: flex !important;
    flex-direction: column !important;
    gap: 3px !important;
}

.warranty-collapse-toggle b {
    font-size: 15px !important;
    font-weight: 700 !important;
    color: #ffffff !important;
}

.warranty-collapse-toggle small {
    color: #94a3b8 !important;
    font-size: 12px !important;
    font-weight: 400 !important;
}

.warranty-collapse-symbol {
    width: 30px !important;
    height: 30px !important;
    flex: 0 0 30px !important;
    border-radius: 8px !important;
    border: 1px solid rgba(56, 189, 248, 0.3) !important;
    background: rgba(56, 189, 248, 0.1) !important;
    color: #38bdf8 !important;
    display: inline-grid !important;
    place-items: center !important;
    font: 700 18px/1 Arial, sans-serif !important;
    transition: all 0.2s ease !important;
}

.warranty-collapse-toggle:hover .warranty-collapse-symbol {
    background: rgba(56, 189, 248, 0.22) !important;
    border-color: rgba(56, 189, 248, 0.6) !important;
    color: #ffffff !important;
    box-shadow: 0 0 10px rgba(56, 189, 248, 0.3) !important;
}

.warranty-collapse-meta {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 9px !important;
}

.warranty-collapse-body {
    padding: 18px 20px !important;
    border-top: 1px solid rgba(255, 255, 255, 0.08) !important;
    background: rgba(11, 18, 38, 0.35) !important;
}

.warranty-collapsible.is-collapsed .warranty-collapse-body {
    display: none !important;
}

.warranty-section-actions {
    justify-content: flex-end;
    margin-bottom: 12px;
}

/* One wide, information-rich table for both new orders and warranty jobs. */
.warranty-orders-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.warranty-orders-card > .warranty-orders-head h2 {
    margin-bottom: 4px;
    font-size: 16px;
}

/* One unified, responsive table for both new orders and warranty jobs */
.warranty-combined-table-wrap {
    width: 100%;
    max-height: min(650px, 75vh);
    min-height: 280px;
    overflow-x: auto;
    overflow-y: auto;
    overscroll-behavior: contain;
    border-radius: 8px;
    border: 1px solid rgba(148, 163, 184, 0.15);
    background: rgba(11, 18, 38, 0.5);
    scrollbar-gutter: stable;
}

.warranty-combined-table-wrap::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.warranty-combined-table-wrap::-webkit-scrollbar-thumb {
    border: 2px solid rgba(11, 18, 38, 0.95);
    border-radius: 999px;
    background: rgba(56, 189, 248, 0.45);
}

.warranty-combined-table-wrap::-webkit-scrollbar-corner {
    background: rgba(11, 18, 38, 0.95);
}

.warranty-combined-table {
    width: 100%;
    min-width: 100%;
    table-layout: fixed;
    border-collapse: collapse;
}

.warranty-combined-table thead th {
    position: sticky;
    top: 0;
    z-index: 3;
    background: #111c33;
    box-shadow: 0 1px 0 rgba(56, 189, 248, 0.25);
    padding: 10px 8px;
    font-size: 11.5px;
    font-weight: 700;
    color: #93c5fd;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    white-space: nowrap;
    text-align: left;
    vertical-align: middle;
}

.warranty-combined-table th:nth-child(1) { width: 9%; min-width: 80px; }
.warranty-combined-table th:nth-child(2) { width: 13%; min-width: 115px; }
.warranty-combined-table th:nth-child(3) { width: 18%; min-width: 155px; }
.warranty-combined-table th:nth-child(4) { width: 13%; min-width: 115px; }
.warranty-combined-table th:nth-child(5) { width: 14%; min-width: 125px; }
.warranty-combined-table th:nth-child(6) { width: 13%; min-width: 120px; }
.warranty-combined-table th:nth-child(7) { width: 10%; min-width: 95px; }
.warranty-combined-table th:nth-child(8) { width: 10%; min-width: 100px; text-align: center; }

.warranty-order-row td {
    padding: 9px 8px;
    line-height: 1.35;
    font-size: 11.5px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    vertical-align: top;
    word-break: break-word;
    overflow-wrap: break-word;
}

.warranty-order-row:nth-child(even) {
    background: rgba(255, 255, 255, 0.015);
}

.warranty-order-row:hover {
    background: rgba(56, 189, 248, 0.04);
}

.warranty-type-cell {
    display: flex;
    flex-direction: column;
    gap: 4px;
    align-items: flex-start;
}

.warranty-stt-badge {
    font-size: 11px;
    color: #94a3b8;
    background: rgba(255, 255, 255, 0.06);
    padding: 1px 6px;
    border-radius: 4px;
    font-weight: 600;
}

.warranty-type-cell small,
.warranty-cell-line {
    color: #8fa1b8;
    font-size: 11px;
    margin-top: 2px;
    overflow-wrap: anywhere;
}

.warranty-type-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 6px;
    border-radius: 5px;
    font-size: 9.5px;
    font-weight: 800;
    letter-spacing: 0.03em;
    line-height: 1.2;
}

.warranty-type-badge.new {
    color: #38bdf8;
    background: rgba(14, 165, 233, 0.16);
    border: 1px solid rgba(14, 165, 233, 0.4);
}

.warranty-type-badge.warranty {
    color: #c084fc;
    background: rgba(168, 85, 247, 0.16);
    border: 1px solid rgba(168, 85, 247, 0.4);
}

.warranty-primary-text {
    color: #f1f5f9;
    font-weight: 600;
    font-size: 12px;
    display: block;
    overflow-wrap: anywhere;
}

.warranty-package-text {
    color: #38bdf8;
    font-weight: 600;
    font-size: 12px;
    display: block;
    overflow-wrap: anywhere;
}

.warranty-email {
    color: #7dd3fc;
    font-size: 11.5px;
    font-weight: 600;
    overflow-wrap: anywhere;
    display: block;
}

.warranty-email-flow {
    display: flex;
    flex-direction: column;
    gap: 1px;
    font-size: 11px;
}

.warranty-email-flow .email-old-line {
    color: #94a3b8;
    overflow-wrap: anywhere;
}

.warranty-email-flow .email-arrow-line {
    color: #38bdf8;
    font-weight: bold;
    font-size: 11px;
    line-height: 1;
}

.warranty-email-flow .email-new-line {
    overflow-wrap: anywhere;
}

.warranty-email-flow small {
    color: #64748b;
    font-size: 10px;
}

.mode-tag {
    display: inline-block;
    padding: 1px 5px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.06);
    color: #cbd5e1;
    font-size: 10.5px;
}

.warranty-status-detail {
    margin-top: 4px;
    color: #cbd5e1;
    font-size: 10.5px;
    overflow-wrap: anywhere;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.3;
}

.warranty-order-identifiers {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.warranty-order-identifiers span {
    padding: 2px 5px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.04);
    font-size: 11px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4px;
}

.warranty-order-identifiers small {
    color: #64748b;
    font-size: 10px;
}

.warranty-row-actions {
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: 100%;
}

.warranty-action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    width: 100%;
    min-height: 26px;
    padding: 3px 6px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #e2e8f0;
    background: rgba(30, 41, 59, 0.85);
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.18s ease;
    white-space: nowrap;
    text-align: center;
    box-sizing: border-box;
}

.warranty-action-btn:hover {
    filter: brightness(1.2);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

.warranty-action-btn.detail {
    border-color: rgba(56, 189, 248, 0.45);
    color: #38bdf8;
    background: rgba(14, 165, 233, 0.14);
}

.warranty-action-btn.continue {
    border-color: rgba(129, 140, 248, 0.45);
    color: #a5b4fc;
    background: rgba(99, 102, 241, 0.16);
}

.warranty-action-btn.retry {
    border-color: rgba(251, 191, 36, 0.45);
    color: #fbbf24;
    background: rgba(245, 158, 11, 0.16);
}

.warranty-action-btn.success {
    border-color: rgba(52, 211, 153, 0.45);
    color: #34d399;
    background: rgba(16, 185, 129, 0.16);
}

.warranty-action-btn.fail {
    border-color: rgba(248, 113, 113, 0.45);
    color: #f87171;
    background: rgba(239, 68, 68, 0.16);
}

.warranty-action-btn .btn-icon {
    font-size: 11px;
    line-height: 1;
}

.warranty-empty-orders {
    padding: 36px !important;
    text-align: center !important;
    color: #8fa1b8;
    font-size: 13px;
}

/* Warranty Nested Message Accordion & Variables Panel */
.warranty-accordion-guide {
    margin-bottom: 12px;
    padding: 8px 12px;
    border-radius: 6px;
    background: rgba(56, 189, 248, 0.08);
    border: 1px solid rgba(56, 189, 248, 0.2);
}

.warranty-accordion-guide .hint {
    margin: 0;
    color: #93c5fd;
    font-size: 12px;
    line-height: 1.45;
}

.warranty-msg-accordion {
    display: flex;
    flex-direction: column;
    gap: 9px;
}

.warranty-msg-item {
    border: 1px solid rgba(56, 189, 248, 0.2);
    border-radius: 8px;
    background: rgba(15, 23, 42, 0.65);
    overflow: hidden;
    transition: all 0.25s ease;
}

.warranty-msg-item:not(.is-collapsed) {
    border-color: rgba(56, 189, 248, 0.5);
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.35);
}

.warranty-msg-toggle {
    width: 100%;
    padding: 11px 15px;
    border: 0;
    background: linear-gradient(135deg, rgba(24, 38, 64, 0.85), rgba(14, 23, 42, 0.85));
    color: #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    text-align: left;
    cursor: pointer;
    transition: background 0.2s;
}

.warranty-msg-toggle:hover {
    background: linear-gradient(135deg, rgba(32, 52, 84, 0.95), rgba(18, 31, 56, 0.95));
}

.warranty-msg-toggle-title {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.warranty-msg-icon {
    font-size: 15px;
}

.warranty-msg-toggle-title b {
    font-size: 13.5px;
    color: #f1f5f9;
}

.warranty-msg-tag {
    font-size: 11px;
    color: #94a3b8;
    background: rgba(255, 255, 255, 0.06);
    padding: 2px 7px;
    border-radius: 4px;
    font-weight: 500;
}

.warranty-msg-symbol {
    width: 24px;
    height: 24px;
    flex: 0 0 24px;
    border-radius: 6px;
    border: 1px solid rgba(56, 189, 248, 0.35);
    background: rgba(56, 189, 248, 0.1);
    color: #38bdf8;
    display: inline-grid;
    place-items: center;
    font-weight: 700;
    font-size: 15px;
    line-height: 1;
}

.warranty-msg-content {
    padding: 14px 16px;
    border-top: 1px solid rgba(56, 189, 248, 0.15);
    background: rgba(11, 18, 38, 0.6);
}

.warranty-msg-item.is-collapsed .warranty-msg-content {
    display: none;
}

.warranty-msg-editor-wrap {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.warranty-msg-top-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
}

.warranty-msg-fmt-group {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.warranty-var-chips-panel {
    background: rgba(15, 23, 42, 0.75);
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 6px;
    padding: 9px 12px;
}

.warranty-var-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 7px;
}

.warranty-var-title {
    font-size: 11.5px;
    font-weight: 600;
    color: #93c5fd;
}

.warranty-var-chips-list {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.warranty-var-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    border-radius: 5px;
    border: 1px solid rgba(56, 189, 248, 0.25);
    background: rgba(56, 189, 248, 0.08);
    color: #e2e8f0;
    font-size: 11px;
    cursor: pointer;
    transition: all 0.15s ease;
    line-height: 1.3;
}

.warranty-var-chip:hover {
    background: rgba(56, 189, 248, 0.22);
    border-color: rgba(56, 189, 248, 0.55);
    transform: translateY(-1px);
    color: #ffffff;
}

.warranty-var-chip code {
    color: #38bdf8;
    font-weight: 700;
    font-family: monospace;
    font-size: 11px;
}

.warranty-var-chip span {
    color: #94a3b8;
    font-size: 10.5px;
}

.warranty-msg-content textarea {
    width: 100%;
    background: rgba(15, 23, 42, 0.85);
    border: 1px solid rgba(148, 163, 184, 0.25);
    border-radius: 6px;
    color: #f1f5f9;
    padding: 10px 12px;
    font-size: 12.5px;
    line-height: 1.5;
    font-family: Consolas, Monaco, "Courier New", monospace;
    resize: vertical;
    box-sizing: border-box;
}

.warranty-msg-content textarea:focus {
    border-color: #38bdf8;
    outline: none;
    box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.2);
}

.warranty-admin-btn-config {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.warranty-job-detail-modal {
    max-height: calc(100vh - 24px);
}

.warranty-detail-summary {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 9px;
}

.warranty-detail-summary > div,
.warranty-detail-notes > div {
    padding: 10px 11px;
    border-radius: 10px;
    border: 1px solid rgba(34, 50, 83, .72);
    background: rgba(11, 18, 38, .45);
    min-width: 0;
}

.warranty-detail-summary span,
.warranty-detail-notes span {
    display: block;
    color: #8fa1b8;
    font-size: 11px;
    margin-bottom: 5px;
}

.warranty-detail-summary b,
.warranty-detail-notes p {
    margin: 0;
    color: #eef6ff;
    overflow-wrap: anywhere;
}

.warranty-detail-notes {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
    margin-top: 10px;
}

@media (max-width: 900px) {
    .warranty-detail-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .warranty-detail-notes { grid-template-columns: 1fr; }
    .warranty-collapse-toggle { align-items: flex-start; }
    .warranty-collapse-meta { flex-wrap: wrap; }
}

@media (max-width: 560px) {
    .warranty-detail-summary { grid-template-columns: 1fr; }
    .warranty-collapse-toggle small { display: none; }
    .warranty-log-connection { display: none; }
}

/* Final mobile usability layer shared by every admin page. */
@media (max-width: 720px) {
    body {
        font-size: 13px;
    }

    .topbar {
        position: relative;
        top: auto;
        gap: 10px;
    }

    .brand {
        width: 100%;
        min-width: 0;
    }

    .brand > div:last-child {
        min-width: 0;
        flex: 1 1 auto;
    }

    .brand h1,
    .brand p,
    .card h2,
    .modal-head h3 {
        overflow-wrap: anywhere;
    }

    .topbar .top-actions {
        display: grid !important;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        width: 100%;
        gap: 6px !important;
        padding: 0;
        overflow: visible;
    }

    .topbar .top-actions .nav-link {
        width: 100%;
        min-width: 0;
        min-height: 34px;
        height: auto;
        padding: 6px 5px;
        font-size: 10px;
        line-height: 1.15;
        text-align: center;
        white-space: normal !important;
        overflow-wrap: anywhere;
    }

    .topbar .pill {
        width: 100%;
        min-width: 0;
    }

    .grid-2,
    .profile-info-grid,
    .user-stats,
    .stock-stat-grid,
    .product-stock-stats {
        grid-template-columns: 1fr !important;
    }

    .row,
    .actions,
    .modal-head,
    .modal-foot,
    .rental-actions,
    .promo-toolbar {
        flex-wrap: wrap !important;
    }

    .row > input,
    .row > select,
    .row > textarea,
    .row > label,
    .row > .pill {
        flex: 1 1 100% !important;
        width: 100% !important;
        min-width: 0 !important;
    }

    .row > .btn,
    .actions > .btn,
    .modal-foot > .btn,
    .rental-actions > .btn {
        flex: 1 1 calc(50% - 4px) !important;
        width: auto !important;
        min-width: 0 !important;
        height: auto;
        min-height: 38px;
        padding: 7px 9px;
        white-space: normal;
        overflow-wrap: anywhere;
    }

    .table-wrap,
    .rental-table-wrap {
        max-width: 100%;
        border-radius: 10px;
        scrollbar-width: thin;
    }

    .table-wrap table,
    .rental-table-wrap .rental-table {
        font-size: 11px;
    }

    .table-wrap th,
    .table-wrap td,
    .rental-table-wrap th,
    .rental-table-wrap td {
        padding: 8px 7px;
        white-space: normal;
        overflow-wrap: anywhere;
    }

    .table-wrap table:not(:has(th:nth-child(5))) {
        min-width: 100% !important;
        table-layout: auto;
    }

    .table-wrap table:has(th:nth-child(5)) {
        min-width: 560px;
    }

    .modal-content,
    .product-modal,
    .order-detail-modal,
    .user-profile-modal {
        padding: 10px;
    }

    .modal-head .btn {
        flex: 0 1 auto;
        min-width: 72px;
        white-space: normal;
    }
}

@media (max-width: 380px) {
    .topbar .top-actions {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .row > .btn,
    .actions > .btn,
    .modal-foot > .btn,
    .rental-actions > .btn {
        flex-basis: 100% !important;
    }
}

/* Customer profile is a data-heavy view. Use nearly the full desktop viewport
   and fit warranty columns into it without horizontal dragging. */
.modal-content.user-profile-modal {
    width: min(90vw, 1680px);
    max-width: 90vw;
}

.user-profile-modal .warranty-history-table {
    width: 100%;
    min-width: 0;
    table-layout: fixed;
}

.user-profile-modal .warranty-history-table th,
.user-profile-modal .warranty-history-table td {
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.user-profile-modal .warranty-history-table th:nth-child(1) { width: 15%; }
.user-profile-modal .warranty-history-table th:nth-child(2) { width: 18%; }
.user-profile-modal .warranty-history-table th:nth-child(3) { width: 10%; }
.user-profile-modal .warranty-history-table th:nth-child(4) { width: 10%; }
.user-profile-modal .warranty-history-table th:nth-child(5) { width: 16%; }
.user-profile-modal .warranty-history-table th:nth-child(6) { width: 12%; }
.user-profile-modal .warranty-history-table th:nth-child(7) { width: 19%; }

@media (max-width: 760px) {
    .modal-content.user-profile-modal {
        width: calc(100vw - 16px);
        max-width: calc(100vw - 16px);
    }

    .user-profile-modal .warranty-history-table {
        min-width: 720px;
        table-layout: auto;
    }
}

/* Must remain last: desktop sidebar consumes horizontal viewport space. */
body > .wrap {
    width: auto !important;
}

fieldset {
    min-width: 0;
    max-width: 100%;
}

@media (max-width: 1180px) {
    .promo-toolbar {
        min-width: 0;
        flex-wrap: wrap !important;
    }

    .promo-toolbar > * {
        min-width: 0;
    }
}

/* Final color authority: deep ocean blue mixed with luxury black. */
:root {
    --bg: #030711;
    --card: rgba(8, 18, 39, .92);
    --line: rgba(77, 163, 255, .24);
    --muted: #a9bad3;
    --text: #f3f8ff;
    --brand: #48a8ff;
    --brand-strong: #187ee6;
    --brand-soft: rgba(72, 168, 255, .13);
    --ok: #3b9eff;
    --sidebar-width: clamp(250px, 20vw, 330px);
}

body {
    background: radial-gradient(900px 580px at 8% -8%, rgba(39,126,255,.23), transparent 62%),
        radial-gradient(760px 540px at 96% 5%, rgba(65,105,225,.15), transparent 61%),
        linear-gradient(145deg, #02050c, #071225 49%, #030812);
}

.panel-sidebar {
    border-color: rgba(72,168,255,.2);
    background: linear-gradient(180deg, rgba(5,13,29,.99), rgba(2,7,17,.99));
}

.sidebar-brand,
.panel-menu-toggle,
.topbar .pill {
    border-color: rgba(72,168,255,.23);
    background: rgba(49,134,255,.09);
}

.sidebar-avatar-wrap,
.topbar .logo.panel-avatar {
    background: linear-gradient(135deg, #9bd2ff, #247fea);
    box-shadow: 0 0 0 5px rgba(72,168,255,.08), 0 0 27px rgba(37,126,234,.3);
}

.panel-sidebar .nav-link:hover,
.panel-sidebar .nav-link:focus-visible {
    border-color: rgba(72,168,255,.3);
    background: rgba(51,137,255,.14);
    box-shadow: inset 3px 0 #4aa8ff, 0 8px 24px rgba(0,5,18,.24);
}

.panel-sidebar .nav-link.active,
.btn.ok,
.nav-link.active {
    color: #f8fbff;
    border-color: rgba(127,190,255,.6);
    background: linear-gradient(135deg, #238eea, #1556bc);
}

.topbar,
.card,
.dash-card,
.rental-panel,
.rental-config-card,
.modal-content,
.panel-auth-card {
    border-color: rgba(72,168,255,.2) !important;
    background: linear-gradient(145deg, rgba(10,25,52,.94), rgba(4,12,28,.95)) !important;
}

input:focus,
select:focus,
textarea:focus {
    border-color: #4aa8ff !important;
    box-shadow: 0 0 0 3px rgba(62,153,255,.14), 0 10px 28px rgba(0,5,18,.22);
}

@media (min-width: 1101px) {
    body,
    body:not(.sidebar-open) {
        padding-left: var(--sidebar-width);
    }

    body:not(.sidebar-open) .panel-sidebar,
    body.sidebar-open .panel-sidebar {
        width: var(--sidebar-width);
        transform: none;
    }

    body:not(.sidebar-open) .sidebar-brand > div:last-child,
    body:not(.sidebar-open) .sidebar-label,
    body:not(.sidebar-open) .nav-link span:last-child {
        display: block;
    }

    body:not(.sidebar-open) .panel-sidebar .nav-link {
        justify-content: flex-start;
        padding: 0 13px;
    }

    .panel-menu-toggle {
        display: none;
    }
}
.promo-category-checklist {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 8px;
  max-height: 240px;
  overflow-y: auto;
  padding: 8px;
  border: 1px solid var(--border, #30384a);
  border-radius: 10px;
}

.promo-category-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 8px;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.035);
}

.promo-category-option:hover { background: rgba(255, 255, 255, 0.075); }
.promo-category-option input { width: auto; flex: 0 0 auto; }
.promo-category-option span, .promo-category-option small { display: block; }

/* ============================================================================
 * VĂN HẬU MEDIA - ADMIN MASTER-DETAIL (3:7 SPLIT) ARCHITECTURE
 * ============================================================================ */

.admin-master-detail {
    display: grid !important;
    grid-template-columns: 320px 1fr !important;
    gap: 20px !important;
    align-items: start !important;
    margin-top: 18px !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

@media (max-width: 1024px) {
    .admin-master-detail {
        grid-template-columns: 1fr !important;
    }
}

/* Master Nav Container (Left 3 parts) */
.admin-master-nav {
    background: rgba(15, 23, 42, 0.95) !important;
    backdrop-filter: blur(12px) !important;
    border: 1px solid rgba(56, 189, 248, 0.22) !important;
    border-radius: var(--radius, 14px) !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4) !important;
    padding: 14px 12px !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 6px !important;
    position: sticky !important;
    top: 78px !important;
    max-height: calc(100vh - 94px) !important;
    overflow-y: auto !important;
    overscroll-behavior: contain !important;
    scrollbar-width: thin !important;
    align-self: start !important;
    z-index: 20 !important;
}

.admin-master-nav::-webkit-scrollbar {
    width: 4px !important;
}

.admin-master-nav::-webkit-scrollbar-thumb {
    background: rgba(56, 189, 248, 0.3) !important;
    border-radius: 4px !important;
}

.admin-master-header {
    padding: 6px 10px 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.admin-master-header h3 {
    margin: 0;
    font-size: 13px;
    font-weight: 700;
    color: var(--muted-light, #cbd5e1);
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.admin-master-count {
    font-size: 11px;
    font-weight: 700;
    color: #38bdf8;
    background: rgba(56, 189, 248, 0.15);
    padding: 2px 8px;
    border-radius: 9999px;
    border: 1px solid rgba(56, 189, 248, 0.3);
}

.admin-master-list {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.admin-master-item {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    padding: 11px 14px !important;
    border-radius: 10px !important;
    background: rgba(30, 41, 59, 0.4) !important;
    border: 1px solid rgba(255, 255, 255, 0.06) !important;
    color: var(--text, #e2e8f0) !important;
    text-decoration: none !important;
    cursor: pointer !important;
    transition: all 0.2s cubic-bezier(0.2, 0.8, 0.2, 1) !important;
    text-align: left !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

.admin-master-item:hover {
    background: rgba(30, 41, 59, 0.8) !important;
    border-color: rgba(56, 189, 248, 0.35) !important;
    transform: translateX(3px) !important;
    color: #ffffff !important;
}

.admin-master-item.active {
    background: linear-gradient(135deg, rgba(2, 132, 199, 0.3), rgba(37, 99, 235, 0.4)) !important;
    border-color: rgba(56, 189, 248, 0.7) !important;
    box-shadow: 0 4px 18px rgba(2, 132, 199, 0.25), inset 0 0 12px rgba(56, 189, 248, 0.15) !important;
    color: #ffffff !important;
}

.admin-master-item .item-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: rgba(56, 189, 248, 0.12);
    border: 1px solid rgba(56, 189, 248, 0.25);
    display: grid;
    place-items: center;
    font-size: 16px;
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

.admin-master-item.active .item-icon {
    background: rgba(56, 189, 248, 0.25);
    border-color: #38bdf8;
    box-shadow: 0 0 10px rgba(56, 189, 248, 0.4);
    transform: scale(1.06);
}

.admin-master-item .item-info {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.admin-master-item .item-title {
    font-size: 13.5px;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.admin-master-item .item-hint {
    font-size: 11px;
    color: var(--muted, #94a3b8);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.admin-master-item.active .item-hint {
    color: #bae6fd;
}

.admin-master-item .item-arrow {
    color: var(--muted, #94a3b8);
    opacity: 0.4;
    transition: all 0.2s ease;
    display: grid;
    place-items: center;
    flex-shrink: 0;
}

.admin-master-item:hover .item-arrow,
.admin-master-item.active .item-arrow {
    opacity: 1;
    color: #38bdf8;
    transform: translateX(2px);
}

/* Detail Pane Container (Right 7 parts) */
.admin-detail-pane {
    width: 100% !important;
    min-width: 0 !important;
}

.admin-detail-panel {
    display: none;
    animation: fadeInFast 0.22s ease-out forwards;
}

.admin-detail-panel.active {
    display: block !important;
}

.admin-detail-panel > .card {
    margin-top: 0 !important;
}

/* Telegram Messages Compact 1-Line Row */
.telegram-message-template {
    border: 1px solid rgba(56, 189, 248, 0.16) !important;
    border-radius: 10px !important;
    background: rgba(15, 23, 42, 0.75) !important;
    margin-bottom: 8px !important;
    overflow: hidden !important;
    transition: all 0.2s ease !important;
}

.telegram-message-template:hover {
    border-color: rgba(56, 189, 248, 0.4) !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25) !important;
}

.telegram-msg-header {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 12px !important;
    padding: 10px 14px !important;
    cursor: pointer !important;
    background: rgba(30, 41, 59, 0.4) !important;
    transition: background 0.2s ease !important;
    user-select: none !important;
}

.telegram-msg-header:hover {
    background: rgba(56, 189, 248, 0.08) !important;
}

.telegram-msg-header-left {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    min-width: 0 !important;
    flex: 1 1 auto !important;
}

.telegram-msg-group-badge {
    font-size: 10px !important;
    font-weight: 700 !important;
    padding: 2px 7px !important;
    border-radius: 5px !important;
    background: rgba(56, 189, 248, 0.15) !important;
    color: #38bdf8 !important;
    border: 1px solid rgba(56, 189, 248, 0.3) !important;
    text-transform: uppercase !important;
    flex-shrink: 0 !important;
}

.telegram-msg-title {
    font-size: 13.5px !important;
    font-weight: 700 !important;
    color: #f8fafc !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

.telegram-msg-key {
    font-family: var(--font-mono) !important;
    font-size: 11px !important;
    color: var(--muted, #94a3b8) !important;
    background: rgba(0, 0, 0, 0.25) !important;
    padding: 1px 6px !important;
    border-radius: 4px !important;
}

.telegram-msg-toggle-btn {
    width: 26px !important;
    height: 26px !important;
    border-radius: 6px !important;
    background: rgba(56, 189, 248, 0.12) !important;
    border: 1px solid rgba(56, 189, 248, 0.25) !important;
    color: #38bdf8 !important;
    display: grid !important;
    place-items: center !important;
    flex-shrink: 0 !important;
    transition: all 0.2s ease !important;
}

.telegram-msg-header:hover .telegram-msg-toggle-btn {
    background: rgba(56, 189, 248, 0.25) !important;
    border-color: #38bdf8 !important;
    color: #ffffff !important;
}

.telegram-message-template.is-collapsed .telegram-msg-body {
    display: none !important;
}

.telegram-msg-body {
    padding: 14px !important;
    border-top: 1px solid rgba(255, 255, 255, 0.06) !important;
    background: rgba(10, 16, 30, 0.5) !important;
}

/* Universal Rich Text Editor */
/* Universal Rich Text Editor & Textarea Resizing */
.universal-rich-editor {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
}

textarea,
.universal-rich-editor textarea,
.telegram-message-template textarea {
    width: 100% !important;
    min-height: 140px !important;
    max-height: 80vh !important;
    resize: vertical !important;
    font-family: var(--font-main, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif) !important;
    font-size: 13.5px !important;
    line-height: 1.6 !important;
    background: rgba(15, 23, 42, 0.85) !important;
    border: 1px solid rgba(255, 255, 255, 0.14) !important;
    border-radius: 8px !important;
    padding: 12px 14px !important;
    box-sizing: border-box !important;
    display: block !important;
    color: #f8fafc !important;
    overflow-y: auto !important;
    scrollbar-width: thin !important;
    scrollbar-color: rgba(56, 189, 248, 0.45) rgba(15, 23, 42, 0.6) !important;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease !important;
}

textarea:focus,
.universal-rich-editor textarea:focus,
.telegram-message-template textarea:focus {
    border-color: #38bdf8 !important;
    background: rgba(15, 23, 42, 0.98) !important;
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.18) !important;
    outline: none !important;
}

/* Dedicated High-Visibility Webkit Scrollbar for Textarea */
textarea::-webkit-scrollbar {
    width: 8px !important;
    height: 8px !important;
    display: block !important;
}

textarea::-webkit-scrollbar-track {
    background: rgba(15, 23, 42, 0.6) !important;
    border-radius: 4px !important;
}

textarea::-webkit-scrollbar-thumb {
    background: rgba(56, 189, 248, 0.35) !important;
    border-radius: 4px !important;
    border: 1px solid rgba(56, 189, 248, 0.2) !important;
}

textarea::-webkit-scrollbar-thumb:hover {
    background: rgba(56, 189, 248, 0.65) !important;
}

textarea::-webkit-scrollbar-corner {
    background: rgba(15, 23, 42, 0.8) !important;
}

/* High-Visibility Custom Glowing Cyan Resize Handle */
textarea::-webkit-resizer {
    background-color: transparent !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cline x1='14' y1='4' x2='4' y2='14' stroke='%2338bdf8' stroke-width='1.5' stroke-linecap='round'/%3E%3Cline x1='14' y1='8' x2='8' y2='14' stroke='%2338bdf8' stroke-width='1.5' stroke-linecap='round'/%3E%3Cline x1='14' y1='12' x2='12' y2='14' stroke='%2338bdf8' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E") !important;
    background-position: right bottom !important;
    background-repeat: no-repeat !important;
    width: 16px !important;
    height: 16px !important;
}

.editor-toolbar-row {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.editor-chip-btn {
    padding: 4px 9px !important;
    font-size: 11.5px !important;
    border-radius: 6px !important;
    background: rgba(56, 189, 248, 0.08) !important;
    border: 1px solid rgba(56, 189, 248, 0.25) !important;
    color: #7dd3fc !important;
    font-family: var(--font-mono) !important;
    cursor: pointer !important;
    transition: all 0.15s ease !important;
}

.editor-chip-btn:hover {
    background: rgba(56, 189, 248, 0.22) !important;
    border-color: #38bdf8 !important;
    color: #ffffff !important;
    transform: translateY(-1px) !important;
}

.editor-desc-box {
    margin-top: 6px;
    padding: 8px 12px;
    border-radius: 6px;
    background: rgba(56, 189, 248, 0.06);
    border: 1px solid rgba(56, 189, 248, 0.15);
    font-size: 12px;
    color: #94a3b8;
    line-height: 1.45;
}

/* ============================================================================
 * WALLET PANEL - CTV SCOPE SYSTEM & MODAL STYLES
 * ============================================================================ */

.scope-cell-container {
    display: flex;
    flex-direction: column;
    gap: 6px;
    align-items: flex-start;
}

.scope-cell-top {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.scope-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 11.5px;
    font-weight: 600;
    line-height: 1.3;
    white-space: nowrap;
}

.scope-pill.scope-all {
    background: rgba(56, 189, 248, 0.12);
    border: 1px solid rgba(56, 189, 248, 0.35);
    color: #38bdf8;
}

.scope-pill.scope-custom {
    background: rgba(168, 85, 247, 0.14);
    border: 1px solid rgba(168, 85, 247, 0.35);
    color: #c084fc;
}

.scope-pill.scope-none {
    background: rgba(245, 158, 11, 0.12);
    border: 1px solid rgba(245, 158, 11, 0.35);
    color: #fbbf24;
}

.scope-edit-action-btn {
    padding: 3px 8px !important;
    font-size: 11px !important;
    border-radius: 5px !important;
    background: rgba(56, 189, 248, 0.08) !important;
    border: 1px solid rgba(56, 189, 248, 0.25) !important;
    color: #7dd3fc !important;
    cursor: pointer !important;
    transition: all 0.15s ease !important;
}

.scope-edit-action-btn:hover {
    background: rgba(56, 189, 248, 0.25) !important;
    border-color: #38bdf8 !important;
    color: #ffffff !important;
    transform: translateY(-1px) !important;
}

.scope-preview-wrap {
    position: relative;
    display: inline-block;
}

.scope-view-btn {
    padding: 2px 6px !important;
    font-size: 10.5px !important;
    border-radius: 4px !important;
    background: rgba(255, 255, 255, 0.06) !important;
    color: #94a3b8 !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
}

.scope-view-btn:hover {
    background: rgba(255, 255, 255, 0.14) !important;
    color: #ffffff !important;
}

.scope-preview-popover {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    z-index: 100;
    background: #0f172a;
    border: 1px solid rgba(56, 189, 248, 0.3);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.65), 0 0 15px rgba(56, 189, 248, 0.15);
    border-radius: 8px;
    padding: 10px;
    width: 260px;
    max-height: 220px;
    overflow-y: auto;
}

.scope-preview-title {
    font-size: 11px;
    font-weight: 700;
    color: #38bdf8;
    margin-bottom: 6px;
    padding-bottom: 4px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.scope-preview-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.scope-preview-item {
    font-size: 11.5px;
    color: #cbd5e1;
    line-height: 1.35;
    padding: 2px 0;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.05);
}

.scope-preview-item:last-child {
    border-bottom: none;
}

/* Modal Scope Radios */
.scope-radio-card {
    transition: all 0.15s ease;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    background: rgba(255, 255, 255, 0.03) !important;
}

.scope-radio-card:hover {
    background: rgba(56, 189, 248, 0.06) !important;
    border-color: rgba(56, 189, 248, 0.3) !important;
}

.scope-radio-card.active {
    background: rgba(56, 189, 248, 0.1) !important;
    border-color: #38bdf8 !important;
    box-shadow: 0 0 12px rgba(56, 189, 248, 0.15);
}

.scope-radio-card input[type="radio"] {
    appearance: auto !important;
    -webkit-appearance: auto !important;
    accent-color: #38bdf8 !important;
    width: 18px !important;
    min-width: 18px !important;
    max-width: 18px !important;
    height: 18px !important;
    min-height: 18px !important;
    max-height: 18px !important;
    padding: 0 !important;
    margin: 3px 0 0 0 !important;
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
    cursor: pointer !important;
    flex-shrink: 0 !important;
}

/* Hierarchy Tree Picker */
.promo-product-tree {
    display: flex;
    flex-direction: column;
    gap: 6px;
    user-select: none;
}

/* Tree Checkboxes - Explicit Override of Global Input Styles */
.promo-product-tree input[type="checkbox"],
input[type="checkbox"].tree-cat-chk,
input[type="checkbox"].tree-prod-chk {
    appearance: auto !important;
    -webkit-appearance: auto !important;
    accent-color: #38bdf8 !important;
    width: 17px !important;
    min-width: 17px !important;
    max-width: 17px !important;
    height: 17px !important;
    min-height: 17px !important;
    max-height: 17px !important;
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
    border-radius: 3px !important;
    background: transparent !important;
    box-shadow: none !important;
    cursor: pointer !important;
    flex-shrink: 0 !important;
    outline: none !important;
    display: inline-block !important;
    vertical-align: middle !important;
}







/* GLOBAL CHECKBOX & RADIO SHAPE FIX */
input[type="checkbox"],
input[type="radio"] {
    appearance: auto !important;
    -webkit-appearance: auto !important;
    accent-color: #38bdf8 !important;
    width: 16px !important;
    min-width: 16px !important;
    max-width: 16px !important;
    height: 16px !important;
    min-height: 16px !important;
    max-height: 16px !important;
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
    cursor: pointer !important;
    flex-shrink: 0 !important;
    display: inline-block !important;
    vertical-align: middle !important;
    outline: none !important;
}

/* STRICT MODAL ISOLATION & SCROLL SAFETY */
.modal:not(.show):not(.active) {
    display: none !important;
    visibility: hidden !important;
    pointer-events: none !important;
    opacity: 0 !important;
    z-index: -9999 !important;
}

.modal.show,
.modal.active {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    visibility: visible !important;
    pointer-events: auto !important;
    opacity: 1 !important;
    z-index: 100000 !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    max-width: 100vw !important;
    background: rgba(3, 7, 18, 0.82) !important;
    backdrop-filter: blur(16px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(16px) saturate(180%) !important;
    padding: 16px !important;
    box-sizing: border-box !important;
}

.modal.show .modal-content,
.modal.active .modal-content {
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
    transform: none !important;
    position: relative !important;
    z-index: 100001 !important;
}

#editScopeModal .modal-content {
    width: min(720px, 95vw) !important;
    max-height: 90vh !important;
    display: flex !important;
    flex-direction: column !important;
    background: rgba(15, 23, 42, 0.98) !important;
    border: 1px solid rgba(56, 189, 248, 0.35) !important;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.85) !important;
    border-radius: 14px !important;
    overflow: hidden !important;
    padding: 0 !important;
}

#editScopeModal .modal-head {
    flex-shrink: 0 !important;
    padding: 16px 20px !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
    margin: 0 !important;
}

#editScopeModal .modal-body {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    max-height: calc(90vh - 130px) !important;
    overflow-y: auto !important;
    overscroll-behavior: contain !important;
    -webkit-overflow-scrolling: touch !important;
    padding: 16px 20px !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
    border: none !important;
    border-radius: 0 !important;
    background: transparent !important;
}

#editScopeModal .modal-foot {
    flex-shrink: 0 !important;
    padding: 14px 20px !important;
    border-top: 1px solid rgba(255, 255, 255, 0.08) !important;
    background: rgba(0, 0, 0, 0.3) !important;
    margin: 0 !important;
}

#editScopeTree {
    max-height: 280px !important;
    overflow-y: auto !important;
    overscroll-behavior: contain !important;
    -webkit-overflow-scrolling: touch !important;
}


/* ============================================================================
 * PROMO PRODUCT TREE & SCOPE MODAL BEAUTIFICATION & SLIM SCROLLBARS
 * ============================================================================ */

/* Custom Sleek Scrollbars */
.modal-body::-webkit-scrollbar,
.promo-product-tree::-webkit-scrollbar,
.modal-content::-webkit-scrollbar {
    width: 6px !important;
    height: 6px !important;
}
.modal-body::-webkit-scrollbar-track,
.promo-product-tree::-webkit-scrollbar-track,
.modal-content::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2) !important;
    border-radius: 8px !important;
}
.modal-body::-webkit-scrollbar-thumb,
.promo-product-tree::-webkit-scrollbar-thumb,
.modal-content::-webkit-scrollbar-thumb {
    background: rgba(56, 189, 248, 0.35) !important;
    border-radius: 8px !important;
}
.modal-body::-webkit-scrollbar-thumb:hover,
.promo-product-tree::-webkit-scrollbar-thumb:hover,
.modal-content::-webkit-scrollbar-thumb:hover {
    background: rgba(56, 189, 248, 0.6) !important;
}

.modal-body,
.promo-product-tree,
.modal-content {
    scrollbar-width: thin !important;
    scrollbar-color: rgba(56, 189, 248, 0.35) rgba(0, 0, 0, 0.2) !important;
}

/* Tree Container */
.promo-product-tree {
    display: flex !important;
    flex-direction: column !important;
    gap: 6px !important;
    user-select: none !important;
    overflow-y: auto !important;
}

/* Category Card */
.promo-tree-category {
    display: flex !important;
    flex-direction: column !important;
    flex-shrink: 0 !important;
    border: 1px solid rgba(56, 189, 248, 0.25) !important;
    border-radius: 8px !important;
    background: rgba(15, 23, 42, 0.85) !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3) !important;
    overflow: hidden !important;
    transition: all 0.15s ease !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

.promo-tree-category:hover {
    border-color: rgba(56, 189, 248, 0.5) !important;
    background: rgba(23, 37, 60, 0.95) !important;
}

/* Category Head Row */
.promo-tree-category-head {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 8px 12px !important;
    background: rgba(255, 255, 255, 0.03) !important;
    cursor: pointer !important;
    gap: 10px !important;
    user-select: none !important;
    min-height: 40px !important;
    box-sizing: border-box !important;
    transition: background 0.15s ease !important;
    flex-shrink: 0 !important;
}

.promo-tree-category-head:hover {
    background: rgba(56, 189, 248, 0.12) !important;
}

.promo-tree-cat-left {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    flex: 1 1 auto !important;
    min-width: 0 !important;
}

.promo-tree-cat-title {
    font-weight: 700 !important;
    font-size: 13.5px !important;
    color: #ffffff !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    line-height: 1.3 !important;
    letter-spacing: 0.2px !important;
}

.promo-tree-cat-badge {
    font-size: 11px !important;
    padding: 2px 8px !important;
    border-radius: 12px !important;
    background: rgba(56, 189, 248, 0.18) !important;
    color: #38bdf8 !important;
    border: 1px solid rgba(56, 189, 248, 0.4) !important;
    font-weight: 700 !important;
    flex-shrink: 0 !important;
    line-height: 1.3 !important;
    margin-left: 4px !important;
}

.promo-tree-toggle-btn {
    font-size: 12px !important;
    color: #7dd3fc !important;
    padding: 4px 8px !important;
    border-radius: 6px !important;
    background: rgba(56, 189, 248, 0.14) !important;
    border: 1px solid rgba(56, 189, 248, 0.3) !important;
    transition: all 0.15s ease !important;
    flex-shrink: 0 !important;
    line-height: 1 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
}

.promo-tree-category-head:hover .promo-tree-toggle-btn {
    color: #ffffff !important;
    background: rgba(56, 189, 248, 0.35) !important;
    border-color: rgba(56, 189, 248, 0.6) !important;
}

/* Category Products Container */
.promo-tree-category-products {
    display: flex !important;
    flex-direction: column !important;
    padding: 6px 10px 10px 24px !important;
    gap: 4px !important;
    background: rgba(10, 16, 30, 0.85) !important;
    border-top: 1px solid rgba(56, 189, 248, 0.15) !important;
    box-sizing: border-box !important;
}

/* Product Item Row */
.promo-tree-product-item {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 6px 12px !important;
    border-radius: 6px !important;
    background: rgba(255, 255, 255, 0.03) !important;
    border: 1px solid rgba(255, 255, 255, 0.06) !important;
    cursor: pointer !important;
    transition: all 0.15s ease !important;
    gap: 10px !important;
    user-select: none !important;
    min-height: 34px !important;
    box-sizing: border-box !important;
    flex-shrink: 0 !important;
}

.promo-tree-product-item:hover {
    background: rgba(56, 189, 248, 0.14) !important;
    border-color: rgba(56, 189, 248, 0.35) !important;
    transform: translateX(2px) !important;
}

.promo-tree-prod-left {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    flex: 1 1 auto !important;
    min-width: 0 !important;
}

.promo-tree-prod-name {
    font-size: 13px !important;
    color: #e2e8f0 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    line-height: 1.3 !important;
    font-weight: 500 !important;
}

.promo-tree-product-item:hover .promo-tree-prod-name {
    color: #ffffff !important;
}

.promo-tree-prod-price {
    font-size: 12px !important;
    font-weight: 700 !important;
    color: #38bdf8 !important;
    font-family: var(--font-mono, monospace) !important;
    flex-shrink: 0 !important;
    background: rgba(56, 189, 248, 0.12) !important;
    padding: 2px 8px !important;
    border-radius: 6px !important;
    border: 1px solid rgba(56, 189, 248, 0.25) !important;
}
