/*
 * Admin — page-level styles.
 *
 * Views me <style> ya style="" nahi likhte; jo cheez kisi page ko chahiye wo yahan class ke sath aati hai.
 * Rang aur layout: theme.css. Dashboard: dashboard.css.
 * Sirf data se banne wali values (jaise progress bar ki width %) views me inline rehti hain.
 */

/* ---------------- Utilities (kai pages par) ---------------- */

/* Alert / notice ko beech me tang chaurai me rakho */
.adm-narrow { max-width: 600px; margin-left: auto; margin-right: auto; }

/* JS (.show()/.hide()) se khulne wala hissa — shuru me chhupa */
.adm-hidden { display: none; }

/* Andar scroll hone wali list */
.adm-scroll-box { max-height: 220px; overflow-y: auto; }

/* Tasveerein: category icon, form preview, bari preview */
.adm-img-icon { width: 40px; height: auto; }
.adm-img-md { max-width: 200px; max-height: 200px; }
.adm-img-lg { max-width: 400px; max-height: 400px; }

/* Form me upload ki hui tasveer ka preview: chaarkhana background — safed logo bhi nazar aaye */
.user-admin-form-group img.adm-img-md,
[class*="box_"] img.adm-img-md {
    padding: 10px;
    border-radius: 10px;
    border: 1px solid var(--adm-line);
    background-color: #9aa3b5;
    background-image: linear-gradient(45deg, #7f899d 25%, transparent 25%), linear-gradient(-45deg, #7f899d 25%, transparent 25%), linear-gradient(45deg, transparent 75%, #7f899d 75%), linear-gradient(-45deg, transparent 75%, #7f899d 75%);
    background-size: 16px 16px;
    background-position: 0 0, 0 8px, 8px -8px, -8px 0;
}

/* Payment gateway / brand logo ek chhote dabbe me */
.adm-logo-box {
    max-width: 120px;
    height: auto;
    padding: 10px;
    border: 1px solid var(--adm-line);
    border-radius: 8px;
    background: #fff;
}

/* Header ke user menu me bara avatar */
.adm-avatar.adm-avatar-lg { width: 42px; height: 42px; }

/* Card header ki chhoti search (tickets waghera) */
.adm-search { position: relative; min-width: 260px; }
.adm-search i { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--adm-muted); font-size: 13px; }
.adm-search .form-control { padding-left: 38px; height: 40px; }

/* ---------------- Support tickets (admin/ticket) ---------------- */
.adm-row-attn > td:first-child { box-shadow: inset 3px 0 0 #ef4444; }
.adm-ticket-link { display: flex; align-items: baseline; gap: 10px; color: var(--adm-text); }
.adm-ticket-link:hover .adm-ticket-subject { color: var(--adm-blue); }
.adm-ticket-id { font-weight: 700; color: var(--adm-muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.adm-ticket-subject { font-weight: 600; }

/* Conversation */
.adm-thread { display: flex; flex-direction: column; gap: 18px; }
.adm-msg { display: flex; gap: 12px; max-width: 82%; }
.adm-msg.is-support { align-self: flex-end; flex-direction: row-reverse; }
.adm-msg-avatar {
    width: 38px; height: 38px; flex-shrink: 0; border-radius: 12px;
    display: inline-flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 14px; background: var(--adm-soft); color: var(--adm-muted); border: 1px solid var(--adm-line);
}
.adm-msg.is-support .adm-msg-avatar { background: var(--adm-blue); color: #fff; border-color: var(--adm-blue); }
.adm-msg-avatar-lg { width: 48px; height: 48px; font-size: 18px; background: var(--adm-blue-soft); color: var(--adm-blue); border: 0; }
.adm-msg-body { min-width: 0; }
.adm-msg-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 12.5px; color: var(--adm-muted); margin-bottom: 6px; }
.adm-msg.is-support .adm-msg-meta { justify-content: flex-end; }
.adm-msg-meta strong { color: var(--adm-text); font-size: 13.5px; }
.adm-msg-role { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; padding: 2px 7px; border-radius: 6px; background: var(--adm-soft); }
.adm-msg.is-support .adm-msg-role { background: var(--adm-blue-soft); color: var(--adm-blue); }
.adm-msg-text {
    padding: 12px 16px; border-radius: 4px 14px 14px 14px;
    background: var(--adm-soft); border: 1px solid var(--adm-line);
    color: var(--adm-text); font-size: 14.5px; line-height: 1.6; white-space: pre-line; word-break: break-word;
}
.adm-msg.is-support .adm-msg-text { border-radius: 14px 4px 14px 14px; background: var(--adm-blue-soft); border-color: rgba(var(--adm-blue-rgb), .2); }
.adm-msg-image { display: inline-block; margin-top: 8px; }
.adm-msg-image img { max-width: 260px; max-height: 200px; border-radius: 10px; border: 1px solid var(--adm-line); object-fit: cover; }
.adm-msg-file { display: inline-flex; align-items: center; gap: 8px; margin-top: 8px; padding: 8px 12px; border-radius: 10px; border: 1px solid var(--adm-line); background: var(--adm-card); font-size: 13px; font-weight: 600; }
.adm-msg-file i { color: #dc2626; }
.adm-reply textarea { resize: vertical; min-height: 110px; }
@media (max-width: 767.98px) { .adm-msg { max-width: 100%; } }

/* ---------------- Notifications (admin/notification) ---------------- */
.adm-note-row { display: flex; align-items: flex-start; gap: 14px; padding: 14px 12px; border-radius: 12px; border-bottom: 1px dashed var(--adm-line); }
.adm-note-row:last-child { border-bottom: 0; }
.adm-note-row.is-unread { background: rgba(var(--adm-blue-rgb), .05); }
.adm-note-row.is-unread .adm-note-text { font-weight: 600; }

/* Key / value list (customer card) */
.adm-kv { display: grid; gap: 10px; }
.adm-kv > div { display: flex; justify-content: space-between; gap: 12px; font-size: 13.5px; padding-bottom: 10px; border-bottom: 1px dashed var(--adm-line); }
.adm-kv > div:last-child { border-bottom: 0; padding-bottom: 0; }
.adm-kv span { color: var(--adm-muted); }
.adm-kv strong { color: var(--adm-text); font-variant-numeric: tabular-nums; }
.adm-kv-lg > div { padding: 14px 0; align-items: center; font-size: 14.5px; }
.adm-kv-lg code { background: var(--adm-soft); color: var(--adm-text); padding: 4px 8px; border-radius: 6px; font-size: 13px; }

/* ---------------- Theme files (admin/theme/files) ---------------- */
.adm-img-tile { height: 120px; }
.adm-img-tile img { max-width: 100%; max-height: 110px; object-fit: contain; }

/* ---------------- Theme editor (admin/theme/edit) ---------------- */
.theme-editor .CodeMirror {
    height: calc(100vh - 360px);
    min-height: 420px;
    border: 1px solid var(--bs-gray-300);
    border-radius: .475rem;
    font-size: 13px;
    font-family: SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}
.theme-editor textarea.fallback {
    width: 100%;
    min-height: 520px;
    font-family: SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
    font-size: 13px;
}

/* ---------------- Settings hub (admin/settings) ---------------- */
.st-intro { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; padding: 18px 22px !important; }
.st-intro > div:first-child { flex: 1 1 320px; min-width: 0; }
.st-search { position: relative; flex: 0 1 300px; min-width: 0; }
.st-search i { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--db-muted); font-size: 12px; pointer-events: none; }
.st-search input { padding-left: 34px; }
.st-group { margin-bottom: 22px; }
.st-group-title { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--db-muted); margin: 0 0 10px 2px; }
.st-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.st-item { display: flex; align-items: flex-start; gap: 14px; padding: 16px; background: var(--db-card); border: 1px solid var(--db-line); border-radius: var(--db-radius); color: inherit; min-width: 0; transition: border-color .15s, transform .15s, box-shadow .15s; }
.st-item:hover, .st-item:focus-visible { border-color: var(--db-gold); transform: translateY(-1px); box-shadow: 0 6px 18px rgba(15, 23, 42, .06); }
.st-item[hidden], .st-group[hidden] { display: none; }
.st-icon { flex-shrink: 0; width: 40px; height: 40px; border-radius: 11px; display: inline-flex; align-items: center; justify-content: center; background: var(--db-gold-soft); color: var(--db-gold-deep); font-size: 16px; }
.st-body { display: flex; flex-direction: column; gap: 3px; flex: 1; min-width: 0; }
.st-label { font-size: 14.5px; font-weight: 700; color: var(--db-ink); }
.st-desc { font-size: 12.5px; color: var(--db-muted); line-height: 1.45; }
.st-state { display: inline-flex; align-items: center; gap: 6px; margin-top: 6px; font-size: 12px; font-weight: 600; overflow-wrap: anywhere; }
.st-state i { font-size: 6px; flex-shrink: 0; }
.st-state-on { color: var(--db-green); }
.st-state-off, .st-state-muted { color: var(--db-muted); }
.st-state-warning { color: var(--db-amber); }
.st-go { flex-shrink: 0; align-self: center; font-size: 11px; color: var(--db-muted); }
@media (max-width: 575.98px) {
    .st-grid { grid-template-columns: 1fr; }
    .st-search { flex-basis: 100%; }
    .st-item { padding: 14px; }
}
/* ---------------- Currencies (admin/currency) ---------------- */
.cur-intro { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; padding: 18px 22px !important; }
.cur-intro > div:first-child { flex: 1 1 360px; min-width: 0; }
.cur-code { display: inline-block; padding: 3px 8px; border-radius: 6px; background: var(--db-soft); font-weight: 700; font-size: 12.5px; letter-spacing: .03em; color: var(--db-ink); }
.cur-switch { cursor: pointer; margin: 0; }
.cur-switch .form-check-input { cursor: pointer; }
.cur-pick { min-height: 220px; }
.cur-pick option { padding: 6px 8px; border-radius: 6px; }
.cur-pick option[hidden] { display: none; }.cur-none { padding: 28px 12px; text-align: center; color: var(--db-muted); border: 1px dashed var(--db-line); border-radius: 10px; font-size: 13px; }
.cur-none[hidden], .cur-pick[hidden] { display: none; }
@media (max-width: 767.98px) {
    .cur-table thead { display: none; }
    .cur-table, .cur-table tbody, .cur-table tr, .cur-table td { display: block; width: 100%; }
    .cur-table tr { border: 1px solid var(--db-line) !important; border-radius: 12px; padding: 12px 14px; margin-bottom: 10px; }
    .cur-table td { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 5px 0 !important; border: 0 !important; text-align: right !important; }
    .cur-table td::before { content: attr(data-label); color: var(--db-muted); font-size: 12px; font-weight: 600; text-align: left; }
    .cur-table td.cur-name { display: block; text-align: left !important; padding-bottom: 8px !important; }
    .cur-table td.cur-actions { justify-content: flex-end; gap: 6px; padding-top: 10px !important; }
    .cur-table td.cur-name::before, .cur-table td.cur-actions::before { content: none; }
}@media (max-width: 767.98px) { .cur-table tr, .cur-table tr:first-child { padding: 12px 14px !important; } }

/* Wallets search */
.wal-search { flex: 0 1 380px; min-width: 0; }
@media (max-width: 575.98px) { .wal-search { flex-basis: 100%; } }

/* ---------------- Discounts (admin/discounts) ---------------- */
.dc-intro { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; padding: 18px 22px !important; }
.dc-intro > div:first-child { flex: 1 1 380px; min-width: 0; }
.dc-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.dc-stats .card-body { padding: 16px 20px; }
.dc-stats span { display: block; font-size: 12.5px; font-weight: 600; color: var(--db-muted); }
.dc-stats strong { display: block; font-size: 22px; font-weight: 700; color: var(--db-ink); margin-top: 2px; }
.dc-search { flex: 0 1 380px; min-width: 0; }
.dc-pill { display: inline-block; padding: 3px 10px; border-radius: 999px; background: rgba(31, 157, 99, .1); color: var(--db-green); font-weight: 700; font-size: 12.5px; }
.dc-section-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 14px; }
.dc-row-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.dc-pct { width: 120px !important; flex: 0 0 120px; }
.dc-add-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-start; padding: 14px; border: 1px dashed var(--db-line); border-radius: 12px; background: var(--db-soft); margin: 0; }
.dc-grow { flex: 1 1 280px; min-width: 0; }
.dc-results { display: flex; flex-direction: column; gap: 4px; margin-top: 6px; max-height: 260px; overflow-y: auto; }
.dc-results:empty { display: none; }
.dc-result { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; width: 100%; padding: 8px 10px; border: 1px solid var(--db-line); border-radius: 8px; background: var(--db-card); text-align: left; cursor: pointer; }
.dc-result:hover, .dc-result:focus-visible { border-color: var(--db-gold); }
.dc-result b { font-size: 13px; color: var(--db-ink); overflow-wrap: anywhere; }
.dc-result span { font-size: 12px; color: var(--db-muted); }
.dc-result em { font-style: normal; font-size: 11px; font-weight: 700; color: var(--db-green); }
.dc-result-empty { font-size: 12.5px; color: var(--db-muted); padding: 6px 2px; }
.dc-picked { margin-top: 8px; padding: 8px 10px; border-radius: 8px; background: rgba(31, 157, 99, .08); color: var(--db-green); font-weight: 600; font-size: 13px; overflow-wrap: anywhere; }
.dc-picked span { color: var(--db-muted); font-weight: 500; }
.dc-picked[hidden] { display: none; }
.dc-table select option[hidden], #dc-cat-select option[hidden] { display: none; }
@media (max-width: 767.98px) {
    .dc-stats { grid-template-columns: 1fr; }
    .dc-table thead { display: none; }
    .dc-table, .dc-table tbody, .dc-table tr, .dc-table td { display: block; width: 100%; }
    .dc-table tr, .dc-table tr:first-child { border: 1px solid var(--db-line) !important; border-radius: 12px; padding: 12px 14px !important; margin-bottom: 10px; }
    .dc-table td { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 5px 0 !important; border: 0 !important; text-align: right !important; }
    .dc-table td::before { content: attr(data-label); color: var(--db-muted); font-size: 12px; font-weight: 600; text-align: left; flex-shrink: 0; }
    .dc-table td.dc-name { display: block; text-align: left !important; padding-bottom: 8px !important; }
    .dc-table td.dc-actions { justify-content: flex-end; gap: 6px; padding-top: 10px !important; }
    .dc-table td.dc-name::before, .dc-table td.dc-actions::before { content: none; }
    .dc-search { flex-basis: 100%; }
}
.dc-loss { display: inline-flex; align-items: center; gap: 5px; color: var(--db-red); font-weight: 600; font-size: 12.5px; }
.dc-floor-on { border-color: rgba(31, 157, 99, .35) !important; }

/* Discounts: type picker, notes */
.dc-types { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.dc-type { position: relative; display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; border: 1px solid var(--db-line); border-radius: 12px; background: var(--db-card); color: inherit; cursor: pointer; min-width: 0; }
.dc-type:hover { border-color: var(--db-gold); }
.dc-type.is-active, .dc-type:has(input:checked) { border-color: var(--db-gold); box-shadow: 0 0 0 1px var(--db-gold) inset; background: var(--db-gold-soft); }
.dc-type input { margin-top: 3px; flex-shrink: 0; }
.dc-type span { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.dc-type b { font-size: 13.5px; color: var(--db-ink); }
.dc-type small { font-size: 12px; color: var(--db-muted); line-height: 1.35; }
.dc-type em { position: absolute; top: 8px; right: 10px; font-style: normal; font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--db-green); }
.dc-note { display: flex; gap: 8px; align-items: flex-start; padding: 10px 12px; border-radius: 10px; background: rgba(217, 138, 11, .1); color: #8a5a06; font-size: 13px; }
.dc-note i { margin-top: 3px; }
.dc-now { display: flex; flex-wrap: wrap; gap: 6px 20px; font-size: 13px; color: var(--bs-gray-700); }
.dc-pct-lg { max-width: 180px; }
.dc-add-btn { align-self: flex-end; }
.dc-add-row > div:not(.dc-grow) { flex: 0 0 auto; }
@media (max-width: 767.98px) {
    .dc-types { grid-template-columns: 1fr; }
    .dc-add-btn { align-self: stretch; width: 100%; }
}
.dc-types-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
#dc-add .dc-types { grid-template-columns: 1fr 1fr; }
@media (max-width: 767.98px) { .dc-types-2, #dc-add .dc-types { grid-template-columns: 1fr; } }

/* Discount page v2: customer header, rule rows, add row with search dropdown */
.dc-avatar { flex-shrink: 0; width: 44px; height: 44px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; background: var(--db-gold-soft); color: var(--db-gold-deep); font-weight: 700; font-size: 18px; }
.dc-facts { display: flex; flex-wrap: wrap; gap: 10px; }
.dc-facts > div { display: flex; flex-direction: column; padding: 8px 14px; border: 1px solid var(--db-line); border-radius: 10px; background: var(--db-soft); min-width: 140px; }
.dc-facts span { font-size: 11.5px; font-weight: 600; color: var(--db-muted); text-transform: uppercase; letter-spacing: .04em; }
.dc-facts b { font-size: 14px; color: var(--db-ink); }
.dc-type { align-items: center; }
.dc-type-icon { flex-shrink: 0; width: 36px; height: 36px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; background: var(--db-soft); color: var(--db-muted); font-size: 15px; }
.dc-type.is-active .dc-type-icon { background: var(--db-card); color: var(--db-gold-deep); }
.dc-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 14px; }
.dc-count { display: inline-flex; align-items: center; justify-content: center; min-width: 22px; height: 22px; padding: 0 7px; margin-left: 6px; border-radius: 999px; background: var(--db-soft); color: var(--db-muted); font-size: 12px; font-weight: 700; vertical-align: middle; }
.dc-list { border: 1px solid var(--db-line); border-radius: 12px; margin-bottom: 14px; }
.dc-item { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 16px; }
.dc-item + .dc-item { border-top: 1px solid var(--db-line); }
.dc-item-main { min-width: 0; flex: 1 1 auto; }
.dc-item-title { font-weight: 600; color: var(--db-ink); font-size: 14px; overflow-wrap: anywhere; }
.dc-item-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; margin-top: 3px; font-size: 12.5px; color: var(--db-muted); }
.dc-prices { display: inline-flex; align-items: center; gap: 6px; }
.dc-prices s { color: var(--db-muted); }
.dc-prices i { font-size: 10px; }
.dc-prices b { color: var(--db-green); }
.dc-line { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.dc-edit { display: flex; align-items: center; gap: 8px; margin: 0; }
.dc-empty-line { padding: 16px; text-align: center; color: var(--db-muted); font-size: 13px; }
.dc-add { display: grid; grid-template-columns: minmax(0, 1fr) 150px auto; gap: 10px; align-items: end; padding: 14px 16px; border-radius: 12px; background: var(--db-soft); margin: 0; }
.dc-add .form-label { font-size: 12.5px; font-weight: 600; margin-bottom: 6px; }
.dc-add-btn { height: 34px; }
.dc-picker { position: relative; }
.dc-picker > i { position: absolute; left: 12px; top: 11px; font-size: 12px; color: var(--db-muted); pointer-events: none; }
.dc-picker input { padding-left: 34px; }
.dc-picker input.is-picked { border-color: var(--db-green); background: rgba(31, 157, 99, .05); font-weight: 600; }
.dc-picker .dc-results { position: absolute; z-index: 20; left: 0; right: 0; top: calc(100% + 4px); margin: 0; padding: 6px; background: var(--db-card); border: 1px solid var(--db-line); border-radius: 10px; box-shadow: 0 10px 28px rgba(15, 23, 42, .12); }
.dc-picker .dc-result { border: 0; border-radius: 6px; }
.dc-picker .dc-result:hover, .dc-picker .dc-result:focus-visible { background: var(--db-soft); }
@media (max-width: 767.98px) {
    .dc-item { flex-direction: column; align-items: stretch; gap: 10px; }
    .dc-line { justify-content: flex-end; }
    .dc-add { grid-template-columns: 1fr; }
    .dc-add-btn { width: 100%; }
    .dc-facts > div { flex: 1 1 140px; }
}
.dc-type:has(em) { padding-right: 78px; }

/* Discounts list: two stat cards, balanced columns */
.dc-stats-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.dc-list-table .dc-col-customer { width: 30%; }
.dc-list-table .dc-col-given { width: 150px; }
.dc-list-table .dc-col-actions { width: 170px; }
.dc-pill { white-space: normal; line-height: 1.4; }
@media (max-width: 767.98px) { .dc-stats-2 { grid-template-columns: 1fr; } }
/* "Stop discounts at cost price" icon tile */
.dc-floor-icon { flex-shrink: 0; width: 42px; height: 42px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; font-size: 17px; }
.dc-floor-icon.is-on { background: rgba(31, 157, 99, .12); color: var(--db-green); }
.dc-floor-icon.is-off { background: rgba(217, 138, 11, .14); color: var(--db-amber); }
.dc-floor-icon i { color: inherit !important; font-size: 17px; }
.dc-floor-icon.is-on { color: var(--db-green) !important; }
.dc-floor-icon.is-off { color: var(--db-amber) !important; }

.dc-loss-line { display: flex; align-items: center; gap: 6px; margin-top: 6px; font-size: 12px; font-weight: 600; }
.dc-loss-line.is-loss { color: var(--db-red); }
.dc-loss-line.is-capped { color: var(--db-muted); }

/* Loss line: one colour for icon and text, clickable */
.dc-loss-line { width: fit-content; max-width: 100%; padding: 3px 8px; border-radius: 6px; text-decoration: none; }
.dc-loss-line i { color: inherit !important; font-size: 11px; }
.dc-loss-line.is-loss { color: var(--db-red) !important; background: rgba(214, 69, 61, .08); }
.dc-loss-line.is-capped { color: var(--bs-gray-600) !important; background: var(--db-soft); }
.dc-loss-line:hover { filter: brightness(.95); }
.dc-loss-line .dc-loss-go { font-size: 9px; opacity: .7; }
/* Discounts list on phones */
@media (max-width: 767.98px) {
    .dc-list-table td[data-label="Discount"] { display: block; text-align: left !important; }
    .dc-list-table td[data-label="Discount"]::before { display: block; margin-bottom: 6px; }
    .dc-list-table .dc-pill { display: inline-block; white-space: normal; text-align: left; }
    .dc-list-table .dc-loss-line { display: flex; margin-top: 8px; text-align: left; }
    .dc-stats-2 { grid-template-columns: 1fr 1fr; gap: 10px; }
    .dc-stats .card-body { padding: 14px 16px; }
    .dc-stats span { font-size: 11.5px; }
    .dc-stats strong { font-size: 19px; }
    .dc-floor .card-body { flex-wrap: nowrap !important; flex-direction: column; align-items: stretch !important; gap: 12px !important; }
    .dc-floor .btn { align-self: flex-start; margin-left: 54px; }
}@media (max-width: 767.98px) { .dc-list-table tbody tr:first-child { margin-top: 12px; } }

/* Services list: average delivery time under the name */
.svc-avg { display: flex; align-items: center; gap: 6px; margin-top: 4px; font-size: 12px; font-weight: 600; color: var(--bs-gray-700); }
.svc-avg i { font-size: 11px; color: var(--bs-gray-500); }
.svc-avg-src { font-weight: 500; color: var(--bs-gray-500); }

/* Affiliates (admin/affiliate/*) */
.aff-admin-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.aff-admin-tip { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 10px; background: var(--db-soft); font-size: 13px; color: var(--bs-gray-700); }
.aff-admin-tip i { color: var(--db-green) !important; margin-top: 2px; }
.aff-admin-details { max-width: 280px; white-space: normal; overflow-wrap: anywhere; font-size: 13px; }
@media (max-width: 991.98px) { .aff-admin-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Service category icons (CategoryIconService): brand tile or uploaded image */
.cat-ico { --cat-ico: #64748b; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; border-radius: 7px; background: var(--cat-ico); color: #fff; vertical-align: middle; line-height: 1; }
.cat-ico i { color: #fff !important; margin: 0 !important; padding: 0 !important; }
.cat-ico-img { background: transparent; overflow: hidden; }
.cat-ico-img img { width: 100%; height: 100%; object-fit: contain; display: block; }
.cat-ico-sm { width: 22px; height: 22px; font-size: 12px; border-radius: 6px; }
.cat-ico-md { width: 32px; height: 32px; font-size: 16px; }
.cat-ico-lg { width: 44px; height: 44px; font-size: 22px; border-radius: 10px; }
.cat-ico-xl { width: 64px; height: 64px; font-size: 30px; border-radius: 14px; }
.cat-ico-cell { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; }
.cat-ico-cell span { font-size: 11px; font-weight: 600; color: var(--bs-gray-500); }
/* Category icons page (admin/service/cat/icons) + icon picker on the category form */
.ci-drop { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 26px 16px; border: 2px dashed var(--bs-gray-300); border-radius: 12px; text-align: center; cursor: pointer; transition: border-color .15s, background .15s; }
.ci-drop:hover { border-color: var(--bs-primary); background: var(--db-soft); }
.ci-drop i { font-size: 26px; color: var(--bs-primary) !important; }
.ci-drop span { font-size: 12.5px; color: var(--bs-gray-600); }
.ci-drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.ci-tool { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 14px; border-radius: 10px; background: var(--db-soft); margin: 0; }
.ci-tool b { display: block; font-size: 14px; color: var(--bs-gray-900); }
.ci-tool span { font-size: 12.5px; color: var(--bs-gray-600); }
.ci-tool .btn { flex-shrink: 0; }
.ci-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.ci-grid-sm { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px; }
.ci-tile { position: relative; display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--bs-gray-200); border-radius: 12px; min-width: 0; }
.ci-tile-sm { padding: 8px 10px; gap: 10px; }
.ci-meta { display: flex; flex-direction: column; min-width: 0; flex: 1; line-height: 1.35; }
.ci-name { font-weight: 600; font-size: 13px; color: var(--bs-gray-900); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ci-meta .db-muted { font-size: 11.5px; }
.ci-badge { flex-shrink: 0; }
.ci-del i { font-size: 13px; }
@media (max-width: 575.98px) { .ci-tool { flex-direction: column; align-items: stretch; } }
.ip-section { padding: 10px 0; border-top: 1px solid var(--bs-gray-200); }
.ip-section:first-of-type { border-top: 0; }
.ip-section summary { cursor: pointer; font-weight: 600; font-size: 13.5px; color: var(--bs-gray-800); padding: 2px 0 8px; }
.ip-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; margin-bottom: 8px; }
.ip-opt { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 6px 8px; border: 1px solid var(--bs-gray-200); border-radius: 10px; cursor: pointer; text-align: center; transition: border-color .15s, box-shadow .15s; }
.ip-opt:hover { border-color: var(--bs-gray-400); }
.ip-opt input { position: absolute; opacity: 0; pointer-events: none; }
.ip-opt:has(input:checked) { border-color: var(--bs-primary); box-shadow: 0 0 0 3px rgba(27, 132, 255, .15); }
.ip-opt:has(input:focus-visible) { box-shadow: 0 0 0 3px rgba(27, 132, 255, .3); }
.ip-opt-label { font-size: 11.5px; color: var(--bs-gray-700); line-height: 1.25; overflow-wrap: anywhere; }
.ip-opt-wide { flex-direction: row; justify-content: flex-start; text-align: left; gap: 12px; padding: 10px 14px; max-width: 420px; }
.ip-opt-text { display: flex; flex-direction: column; }
.ip-opt-text b { font-size: 13.5px; color: var(--bs-gray-900); }
.ip-opt-text small { font-size: 12px; color: var(--bs-gray-600); }
/* Add transaction (admin/transaction/create) */
.tx-step { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; font-weight: 700; font-size: 14.5px; color: var(--bs-gray-900); }
.tx-step span { width: 24px; height: 24px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 12px; background: var(--db-soft); color: var(--bs-primary); }
.tx-picked { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border: 1px solid var(--bs-primary); border-radius: 12px; background: rgba(27, 132, 255, .04); }
.tx-picked-main { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.tx-picked-main b { color: var(--bs-gray-900); }
.tx-picked-main span { font-size: 12.5px; color: var(--bs-gray-600); overflow-wrap: anywhere; }
.tx-picked-bal { display: flex; flex-direction: column; align-items: flex-end; }
.tx-picked-bal span { font-size: 11.5px; color: var(--bs-gray-500); }
.tx-picked-bal b { font-size: 15px; color: var(--bs-gray-900); font-variant-numeric: tabular-nums; }
.tx-type { display: flex; gap: 8px; margin-bottom: 12px; }
.tx-type label { flex: 1; margin: 0; cursor: pointer; }
.tx-type input { position: absolute; opacity: 0; pointer-events: none; }
.tx-type span { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 10px; border-radius: 10px; border: 1px solid var(--bs-gray-300); font-weight: 600; color: var(--bs-gray-700); }
.tx-type input:checked + span { border-color: var(--bs-primary); background: rgba(27, 132, 255, .06); color: var(--bs-primary); }
.tx-type input[value="deduct"]:checked + span { border-color: var(--db-red); background: rgba(214, 69, 61, .06); color: var(--db-red); }
.tx-type span i { color: inherit !important; }
.tx-amount .form-control { font-weight: 700; font-variant-numeric: tabular-nums; }
.tx-amount .form-select { max-width: 120px; font-weight: 600; }
.tx-preview { display: flex; gap: 24px; flex-wrap: wrap; margin-top: 12px; padding: 12px 14px; border-radius: 10px; background: var(--db-soft); }
.tx-preview > div { display: flex; flex-direction: column; }
.tx-preview span { font-size: 12px; color: var(--bs-gray-600); }
.tx-preview b { font-size: 16px; color: var(--bs-gray-900); font-variant-numeric: tabular-nums; }
.tx-real { align-items: flex-start !important; gap: 10px; }
.tx-real b { display: block; color: var(--bs-gray-900); font-size: 13.5px; }
.tx-real small { color: var(--bs-gray-600); font-size: 12.5px; }
.tx-real[hidden] { display: none !important; }
@media (max-width: 575.98px) { .tx-picked { flex-wrap: wrap; } .tx-picked-bal { align-items: flex-start; } }
.ci-undo { border-left: 4px solid var(--db-amber) !important; }
.ci-undo b { color: var(--bs-gray-900); }
.cat-ico b { font-weight: 800; color: #fff; font-size: .62em; line-height: 1; }
.ci-grid-plat { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.ci-lock { color: var(--bs-gray-400) !important; font-size: 12px; flex-shrink: 0; }
/* Logo page (admin/logo/logo) */
.lg-preview { display: flex; align-items: center; justify-content: center; height: 140px; border-radius: 12px; padding: 20px; margin-bottom: 8px; }
.lg-preview img { max-height: 100%; max-width: 100%; object-fit: contain; }
.lg-preview-dark { background: #0f172a; color: #94a3b8; }
.lg-preview-light { background: #fff; border: 1px solid var(--bs-gray-200); }
.lg-faded { opacity: .9; }
