/* ==========================================================================
   Reusable panel components (ours, not the author's).
   Kept out of core.css so an author update can never overwrite them.
   ========================================================================== */


/* --------------------------------------------------------------------------
   State badge — a small tinted pill for one piece of state:
   Public/Private, Active/Inactive, Completed/Pending, Paid/Unpaid…

   Why a new one: the panel's .badge is font-size 8px (unreadable), and .tag is
   a solid saturated fill with white text that shouts next to normal table text.
   These are soft instead — a light tint of the colour, with the same hue
   darkened for the text, so they sit calmly in a table but stay easy to scan.

   <span class="state-badge state-badge-green">Public</span>
   Add state-badge-dot for a leading dot (it takes the text colour):
   <span class="state-badge state-badge-dot state-badge-orange">Private</span>
   -------------------------------------------------------------------------- */
.state-badge {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .3rem .6rem;
    border: 1px solid transparent;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    line-height: 1;
    white-space: nowrap;
    vertical-align: middle;
}

/* Two or more badges that belong together — a state and its count, e.g.
   Private / Allowed 2. Stacked, not side by side: they were on one line while the
   row was short, but the Bonuses column made every row taller anyway, so the
   height is free now and the width is not. Reads down the column instead of
   stretching it. */
.state-badge-group {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: .3rem;
    white-space: nowrap;
}

/* One badge holding a short list rather than one badge per item — three pills in a
   row was noise. The pill radius goes with it: once a badge has lines it is a box,
   and 999px on a box looks like a mistake. */
.state-badge-stack {
    flex-direction: column;
    align-items: flex-start;
    gap: .15rem;
    border-radius: 8px;
    line-height: 1.35;
}

.state-badge-dot::before {
    content: "";
    flex: none;
    width: .4rem;
    height: .4rem;
    border-radius: 50%;
    background: currentColor;
}

.state-badge-green {
    background-color: #e9f7ee;
    border-color: #c3e6d0;
    color: #1a7f43;
}

.state-badge-orange {
    background-color: #fdf1e3;
    border-color: #f5d8b3;
    color: #a2590f;
}

.state-badge-red {
    background-color: #fdecec;
    border-color: #f5c9c8;
    color: #b02a27;
}

.state-badge-blue {
    background-color: #ecebfb;
    border-color: #cdcaf5;
    color: #4038c7;
}

.state-badge-grey {
    background-color: #f1f3f5;
    border-color: #dfe3e8;
    color: #5b6472;
}


/* --------------------------------------------------------------------------
   Summernote's Link / Picture / Video dialogs.

   They no longer go through Bootstrap's modal plugin and they now live in
   <body> — see the long note in admin/js/custom.js for why. That leaves the
   look to us.
   -------------------------------------------------------------------------- */

/* While one of these dialogs is open, the modal hosting it drops its transform
   (the class is put on by admin/js/custom.js, which explains why). Bootstrap's
   own settled value is translate(0,0), so none looks exactly the same — but it
   stops .modal-dialog being the containing block for the dialog's fixed
   positioning, which is what pinned the dialog to our modal's box instead of the
   screen. Same specificity as Bootstrap's .modal.show .modal-dialog, and this
   file loads later, so it wins. */
.modal.has-note-dialog .modal-dialog {
    transform: none;
}

/* Bootstrap no longer builds a backdrop for these, and they do not need one:
   .note-modal is already a full-screen fixed layer, so it dims the page by
   itself. No extra element, nothing that can leak. */
.note-modal {
    background: rgba(0, 0, 0, .5);
    /* The gutter lives here, not on .modal-dialog. Bootstrap's own gutter is
       margin: .5rem on .modal-dialog, but that element needs auto side margins to
       centre — and an auto margin computes to 0 once the dialog is wide enough to
       fill the row, which put the popup flush against both screen edges on a
       phone. Padding on this layer keeps the gap at every width. */
    padding: 0 .5rem;
}

/* On a phone the popup is narrower than the screen allows, on purpose: max-width
   caps it on a desktop, but below that the dialog just fills whatever it is given,
   so the only way to hold it in is a wider gutter. Phones only — the desktop size
   is set by max-width on .modal-dialog and is already right. */
@media (max-width: 575.98px) {
    .note-modal {
        padding: 0 1.75rem;
    }
}

/* The header carries the title on the left and the X on the right, like every
   other modal here. summernote's markup puts the X BEFORE the <h4> (Bootstrap 3
   floated it right), but this panel is on Bootstrap 4 where .modal-header is a
   flex row — so in source order the X lands on the left and the title on the
   right. order: puts them back the way round without touching the markup. */
.note-modal .modal-header .modal-title {
    order: 1;
}

.note-modal .modal-header .close {
    order: 2;
    margin-left: auto;
}

/* Centred in the window, so it can never end up above the top of the screen the
   way it did when it was pinned to a modal taller than the viewport. */
.note-modal .modal-dialog {
    display: flex;
    align-items: center;
    min-height: calc(100% - 3.5rem);
    /* clearly narrower than the .modal-lg underneath it (600px), so it reads as
       its own popup instead of part of the modal it is sitting on */
    max-width: 460px;
    /* Bootstrap only centres .modal-dialog from 576px up (margin: 1.75rem auto);
       below that its margin is a plain 0.5rem, which left-aligns the popup on a
       phone. auto on both sides centres it at every width. */
    margin-left: auto;
    margin-right: auto;

    /* This element is stretched tall to centre the popup inside it, so anything
       it paints spans the window rather than hugging the dialog. core.css puts
       `border: 0.1px solid #ddd` on EVERY .modal-dialog and summernote.css adds
       a box-shadow — together they drew a line and a shadow ~250px above and
       below the popup. Both belong on .modal-content, which is where they are. */
    border: 0;
    box-shadow: none;
}

/* the popup itself: its own edge, its own shadow */
.note-modal .modal-content {
    width: 100%;
    border: 1px solid #ccc;
    box-shadow: 0 12px 40px rgba(20, 24, 40, .35);
}


/* --------------------------------------------------------------------------
   Form divider — a section rule inside a form, without the canyon around it.

   core.css sets a bare `hr` twice: line 424 gives it its 1px line, then line
   10101 overrides the margin to 2rem top AND bottom — 64px of air around a 1px
   line. That is a plain element selector, and 39 views across the panel use a
   bare <hr>, so the rule itself must be left alone. A class outranks an element
   selector on its own (0,1,0 beats 0,0,1), so this needs no !important, and the
   line itself still comes from core.css — nothing to keep in sync.

   <hr class="form-divider">
   -------------------------------------------------------------------------- */
.form-divider {
    margin-top: .75rem;
    margin-bottom: .75rem;
}


/* --------------------------------------------------------------------------
   Access search results — the dropdown under the user picker in the per-user
   allow/block modal.

   Deliberately a copy of the panel's own .searchable-select dropdown
   (.search-select-panel / -option / -empty in layout.css): this is the same
   kind of thing, so it should not look like a second opinion. It cannot reuse
   those classes directly — that widget builds itself from a <select>, and this
   list comes from the server on every keystroke.
   -------------------------------------------------------------------------- */

/* the dropdown is absolute — it anchors to this, not to the modal */
.access-search-wrap {
    position: relative;
}

.access-search-results {
    position: absolute;
    top: calc(100% + 5px);
    left: 0;
    right: 0;
    z-index: 20000;   /* same as .search-select-panel: it must clear the modal */
    max-height: 280px;
    overflow-y: auto;
    padding: 6px;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 10px;
    box-shadow: 0 12px 28px rgba(20, 24, 40, .14);
}

.access-search-hit {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 11px;
    border-radius: 8px;
    border-bottom: 1px solid rgba(0, 0, 0, .04);
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    color: #3c4250;
    cursor: pointer;
    word-break: break-word;
}

.access-search-hit:last-child {
    border-bottom: 0;
}

.access-search-hit:hover {
    background: #eef2ff;
    color: #4f46e5;
}

.access-search-empty {
    padding: 10px 11px;
    font-size: 12.5px;
    color: #9aa3b2;
}


/* --------------------------------------------------------------------------
   Access list — the allowed/blocked users inside the modal's card.
   The scroll belongs to the card, not the modal: a hundred users must not push
   the Submit button off the screen.
   -------------------------------------------------------------------------- */
.access-list-scroll {
    min-height: 9rem;     /* one or two rows should not look like a collapsed strip */
    max-height: 22rem;
    overflow-y: auto;
}

/* the header stays put while the rows scroll under it */
.access-list-scroll thead th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: #fff;
}

/* An address has no spaces, so it will not wrap on its own — without this one
   long one stretches the table and the whole modal goes wide. break-all lets it
   fold inside its own cell instead. */
.access-list-email {
    word-break: break-all;
}

/* Created and Action take only what they need, so Email keeps the rest */
.access-list-scroll .created_date,
.access-list-action {
    width: 1%;
    white-space: nowrap;
}

/* The card title carries its count badge, so it has to line them up */
.access-card-title {
    display: flex;
    align-items: center;
    gap: .4rem;
}

/* core.css ends with an "INDIGO FIXES" block that forces border-radius:10px on
   everything matching [class*="btn-"]:not()...:not() — seven classes of
   specificity, with !important, so even layout.css's own .btn-sm rule loses to
   it. An id is the cheapest thing that outranks it, and #main-modal-content
   wraps every modal in the panel, so this catches the remove buttons wherever
   they sit — in the rows or up in the card header. */
#main-modal-content .access-remove-btn {
    border-radius: 3px !important;
}

/* Magic page (Appearance → Magic) ka colour swatch — compact picker taake .form-control
   ki tarah full-width/tall na ho jaye. Theme-neutral border (light + dark dono mein theek). */
.magic-color {
    width: 130px;
    height: 42px;
    padding: 4px;
    border: 1px solid rgba(128, 128, 128, .35);
    border-radius: 6px;
    background: transparent;
    cursor: pointer;
}

/* Integrations page — platform "logo" badges: brand-colored app-icon tile + FA glyph (white).
   Original logo jaisa feel. NAYA integration add karo to niche .int-logo--<key> ka brand bg
   add karna (warna default gray tile). Border dono themes (light+dark) mein edge define karta. */
/* badge hamesha text block ke TOP pe (mobile pe desc wrap ho ke lambi ho jati thi to
   center-align badge ko beech mein le aata tha — ab title ke saath top pe rehta). */
.int-item { display: flex; align-items: flex-start; }
.int-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    margin-right: 12px;
    border-radius: 9px;
    background: #55606d;                 /* default (unknown / custom) */
    color: #fff;
    font-size: 17px;
    flex-shrink: 0;
    border: 1px solid rgba(128, 128, 128, .18);
}
.int-meta h5 { margin: 0; }

/* per-brand colours */
.int-logo--whatsapp           { background: #25D366; }
.int-logo--telegram           { background: #229ED9; }
.int-logo--crisp              { background: #1972F5; }
.int-logo--tawk_to            { background: #03A84E; }
.int-logo--google_analytics   { background: #E8710A; }
.int-logo--google_tag_manager { background: #246FDB; }
.int-logo--facebook_pixel     { background: #1877F2; }
.int-logo--tiktok_pixel       { background: #111111; }
.int-logo--recaptcha          { background: #1A73E8; }
.int-logo--search_console     { background: #458CF5; }
.int-logo--google_login       { background: #4285F4; }
.int-logo--custom_code        { background: #55606d; }

/* Uploads gallery: image card ka single Action dropdown — card ke bottom pe full-width
   button; menu markup mein .drop-up hai (upar khulta) taake .img-card ke overflow:hidden
   se clip na ho. Selectors specific hain (base .idgrow/.idgrow-btn ko affect nahi karte). */
.img-card .actions .idgrow { flex: 1; }
.img-card .actions .idgrow-btn { width: 100%; justify-content: center; }

/* Logo/Favicon settings page (settings/logo.php) — inline <style> se yahan move; sab kuch
   .logo-settings ke neeche SCOPED taake koi rule (khaaskar .col-md-6 padding) global leak na kare. */
.logo-settings .upload-card {
  position: relative;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 10px; padding: 20px; border: 1px solid #dee2e6; border-radius: 5px;
  margin-bottom: 10px; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,0.05);
  text-align: center; height: 100%;
}
.logo-settings .preview { position: relative; display: inline-block; min-height: 70px; }
.logo-settings .preview img { max-width: 200px; max-height: 110px; border-radius: 5px; border: 1px solid #ddd; margin-bottom: 15px; }
.logo-settings .preview img.is-empty { display: none; }

.logo-settings .preview-empty {
  display: inline-flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 6px; color: #9aa3b2; font-size: 13px; padding: 20px 26px; margin-bottom: 15px;
  border: 1px dashed #cfd4dc; border-radius: 5px;
}
.logo-settings .preview-empty i { font-size: 26px; }

.logo-settings .logo-remove-btn {
  position: absolute; top: -8px; right: -8px;
  width: 26px; height: 26px; border-radius: 50%;
  border: none; background: #e5484d; color: #fff; cursor: pointer;
  font-size: 13px; line-height: 1; display: inline-flex; align-items: center; justify-content: center;
  box-shadow: 0 1px 4px rgba(0,0,0,.2);
}
.logo-settings .logo-remove-btn:hover { background: #cc3a3f; }

.logo-settings .upload-form button.upload-btn {
  background: var(--primary, #4f46e5); color: #fff; padding: 10px 25px; border-radius: 6px;
  font-weight: 500; border: none; cursor: pointer; font-size: 15px;
  display: inline-flex; align-items: center; gap: 8px; transition: background 0.2s ease;
}
.logo-settings .upload-form button.upload-btn:hover { background: #4338ca; }
.logo-settings .upload-form input[type="file"] { display: none; }
.logo-settings .upload-response { margin-top: 10px; }

.logo-settings .loader-text { display: inline-block; font-size: 14px; font-weight: 500; color: var(--primary, #4f46e5); }
.logo-settings .loader-text::after { content: ' Uploading'; display: inline-block; animation: logoUploadingDots 1.2s steps(4, end) infinite; }
@keyframes logoUploadingDots { 0%,20%{content:' Uploading';} 40%{content:' Uploading.';} 60%{content:' Uploading..';} 80%,100%{content:' Uploading...';} }

.logo-settings .col-md-6 { padding-bottom: 55px; }

/* ── Payout status guide (affiliate/update modal) ───────────────────────────
   Status select ke neeche har status ka matlab ek saaf card mein; badge list ke
   badges hi reuse karta hai taake payouts list se visually consistent rahe. */
.payout-status-guide {
  margin-top: 12px;
  border: 1px solid #e9ecef;
  border-radius: 6px;
  background: #f8f9fb;
  overflow: hidden;
}
.payout-status-guide-row {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  padding: 10px 14px;
  border-bottom: 1px solid #edeff2;
}
.payout-status-guide-row .order-status-badge {
  flex: 0 0 auto;
  min-width: 80px;
  text-align: center;
  margin-top: 1px;
}
.payout-status-guide-text {
  font-size: 13px;
  line-height: 1.5;
  color: #5b6472;
}
.payout-status-guide-note {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 9px 14px;
  font-size: 12.5px;
  font-weight: 600;
  color: #9a6b00;
  background: #fff8e8;
}
.payout-status-guide-note i { font-size: 12px; }

/* ── Transactions list: Note column + admin-note sub-line ────────────────────
   System note upar, admin ka note uske neeche (chhota, muted, halke separator ke sath). */
.trx-note-col { min-width: 200px; }
.trx-admin-note {
  margin-top: 5px;
  padding-top: 5px;
  border-top: 1px dashed #e2e6ea;
  font-size: 12px;
  color: #6b7280;
  word-break: break-word;
}
.trx-admin-note b { color: #4b5563; font-weight: 600; }

/* balance_logs amount — credit (paisa aaya) green +, debit (paisa gaya) red -.
   Professional tone (core ka .text-success lime #5eba00 ajeeb lagta tha). Sirf text ka rang. */
.bl-credit { color: #1f9d57; font-weight: 600; }
.bl-debit  { color: #d6453d; font-weight: 600; }
/* type ko muted badge mein — chhota bold text andar */
.bl-type-badge {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 6px;
  background: #eef0f3;
  color: #4b5563;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

/* Dashboard top status/expiry mini stat card (HQ admin jaisa; value color inherit = dark-safe) */
.dash-ov-body { padding: 14px; }
.dash-ov-title { display: flex; align-items: center; gap: 9px; margin: 0 0 12px; font-size: 12px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: #8a93a2; }
.dash-ov-title:not(:first-child) { margin-top: 20px; }
.dash-ov-note { font-weight: 600; font-size: 10px; color: #a3abb8; text-transform: none; letter-spacing: 0; }
.dash-ov-title .fe { color: #4f46e5; font-size: 15px; }
.dash-ov-title::after { content: ""; flex: 1; height: 1px; background: #eef0f3; }
.dash-stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.dash-stat { display: flex; align-items: center; gap: 11px; min-width: 0; background: #f6f7f9; border: 1px solid #e7e9ee; border-radius: 9px; padding: 12px 14px; transition: border-color .15s, box-shadow .15s; }
.dash-stat:hover { border-color: #d6dbe2; box-shadow: rgb(0 0 0 / 6%) 1px 2px 8px; }
.dash-stat-ic { flex: 0 0 38px; width: 38px; height: 38px; display: flex; align-items: center; justify-content: center; border-radius: 9px; font-size: 16px; }
.dash-stat-ic.is-green { background: #e6f6ee; color: #16a34a; }
.dash-stat-ic.is-red   { background: #fdecec; color: #dc2626; }
.dash-stat-ic.is-amber { background: #fef3e2; color: #f59e0b; }
.dash-stat-ic.is-blue  { background: #eef0fe; color: #4f46e5; }
.dash-stat-ic.is-cyan  { background: #f3ecfe; color: #7c3aed; }
.dash-stat-value { font-size: 18px; font-weight: 800; line-height: 1.15; }
.dash-stat-value.dash-cap { text-transform: capitalize; }
.dash-stat-value .dash-unit { color: #4f46e5; margin-left: 1px; }
.dash-stat-value .dash-ch { display: inline-flex; align-items: center; gap: 3px; font-size: 11.5px; font-weight: 600; margin-left: 5px; vertical-align: middle; white-space: nowrap; }
.dash-stat-value .dash-ch i { font-size: 13px; }
.dash-stat-value .dash-ch.up { color: #1fa463; }
.dash-stat-value .dash-ch.down { color: #e0483b; }
.dash-skel { display: inline-block; width: 54px; height: 1em; border-radius: 5px; vertical-align: middle; background: linear-gradient(90deg, #eef0f3 25%, #e2e5ea 37%, #eef0f3 63%); background-size: 400% 100%; animation: dash-shimmer 1.2s ease infinite; }
@keyframes dash-shimmer { 0% { background-position: 100% 0; } 100% { background-position: 0 0; } }

/* Stats card header: title + range pills */
.dash-ov-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; }
.dash-ov-head .card-title { display: flex; align-items: center; gap: 8px; margin: 0; }
.dash-ov-head .card-title .fe { color: #4f46e5; }
/* Range pills (report jaisa segmented toggle, indigo) */
.rpt-period { display: inline-flex; background: #f2f4f8; border-radius: 30px; padding: 3px; }
.rpt-period-btn { border: 0; background: transparent; color: #6b7386; font-size: 12.5px; font-weight: 600; padding: 5px 30px; border-radius: 30px; cursor: pointer; transition: all .18s ease; outline: none; -webkit-tap-highlight-color: transparent; }
.rpt-period-btn:hover { color: #1c2434; }
.rpt-period-btn:focus, .rpt-period-btn:focus-visible, .rpt-period-btn:active { outline: none; box-shadow: none; }
.rpt-period-btn.active { color: #fff; background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%); box-shadow: 0 4px 12px rgba(79, 70, 229, .30); }
.rpt-period-btn.active:focus, .rpt-period-btn.active:focus-visible { box-shadow: 0 4px 12px rgba(79, 70, 229, .30); }
@media (max-width: 576px) {
  .dash-ov-head { flex-wrap: nowrap; }
  .dash-ov-head .card-title { display: none; }
  .rpt-period { width: 100%; padding: 3px; }
  .dash-ov-head .rpt-period-btn { flex: 1; text-align: center; padding: 7px 6px; font-size: 11.5px; }
}
.dash-stat-value.dash-exp { font-size: 14px; }
.dash-stat-label { font-size: 11.5px; color: #8a93a2; margin-top: 3px; }
@media (max-width: 576px) {
  .dash-ov-body { padding: 10px; }
  .dash-ov-title { margin-bottom: 9px; font-size: 11px; }
  .dash-stat-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .dash-stat { gap: 8px; padding: 9px 10px; }
  .dash-stat-ic { flex-basis: 30px; width: 30px; height: 30px; font-size: 13px; border-radius: 7px; }
  .dash-stat-value { font-size: 14px; }
  .dash-stat-value.dash-exp { font-size: 11.5px; }
  .dash-stat-label { font-size: 10px; }
}

/* Feature help button — page-header ke Help button mein "Help" + neeche "#feature_id" (button size same) */
.fhelp-link{ text-decoration:none; }
/* help button black — my-button (indigo) ko override (specificity core.css se upar) */
.fhelp-link .btn.fhelp-btn{ background-color:#1a1a1a; border-color:#1a1a1a; color:#fff; }
.fhelp-link .btn.fhelp-btn:hover{ background-color:#000; border-color:#000; color:#fff; }
.fhelp-btn{ display:inline-flex; align-items:center; gap:7px; line-height:1; }
.fhelp-btn i{ font-size:15px; }
.fhelp-stack{ display:inline-flex; flex-direction:column; align-items:flex-start; line-height:1.15; }
.fhelp-lead{ font-size:11px; font-weight:600; letter-spacing:.02em; }
.fhelp-id{ font-size:8px; opacity:.8; }

/* ===== Header quick-links picker (admin/blocks/quick_links modal) ===== */
.ql-hint{ margin-bottom: 12px; }
.ql-preview{
  display: flex; align-items: center; gap: 10px;
  min-height: 52px; padding: 10px 12px; margin-bottom: 14px;
  border: 1px dashed #cdd3e3; border-radius: 8px; background: #fafbfe;
}
.ql-preview-icons{ display: flex; align-items: center; gap: 8px; flex: 1 1 auto; flex-wrap: wrap; }
.ql-preview-item{
  width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center;
  border-radius: 8px; background: #4f46e5; color: #fff; font-size: 15px;
}
.ql-preview-empty{ color: #9aa0b5; font-size: 13px; }
.ql-count{ flex: 0 0 auto; font-size: 12px; font-weight: 700; color: #6b7280; }

.ql-grid{ display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
.ql-tile{
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  padding: 16px 10px; cursor: pointer; text-align: center;
  border: 1px solid #e5e7ef; border-radius: 10px; background: #fff; color: #374151;
  transition: border-color .15s, background .15s, box-shadow .15s;
}
.ql-tile:focus, .ql-tile:active{ outline: none; }
.ql-tile{ -webkit-tap-highlight-color: transparent; }
.ql-tile:hover{ border-color: #c7cbe0; background: #fafbff; }
.ql-tile-ic{ font-size: 20px; color: #4f46e5; }
.ql-tile-label{ font-size: 12.5px; font-weight: 600; }
.ql-tile-check{
  position: absolute; top: 6px; right: 6px; width: 18px; height: 18px;
  display: none; align-items: center; justify-content: center;
  border-radius: 50%; background: #4f46e5; color: #fff; font-size: 10px;
}
.ql-tile.is-selected{ border-color: #4f46e5; background: #eef0ff; box-shadow: 0 0 0 1px #4f46e5 inset; }
.ql-tile.is-selected .ql-tile-check{ display: inline-flex; }
.ql-tile.is-disabled{ opacity: .45; pointer-events: none; }
@media (max-width: 600px){
  .ql-grid{ grid-template-columns: repeat(auto-fill, minmax(90px, 1fr)); }
}

/* ---------- adminapi: key field with copy icon INSIDE the input ---------- */
.adm-key-field{ position: relative; }
.adm-key-field .form-control{ padding-right: 40px; letter-spacing: 1px; }
.adm-key-copy{
  position: absolute; top: 50%; right: 6px; transform: translateY(-50%);
  border: 0; background: transparent; cursor: pointer; padding: 6px 8px;
  color: var(--adm-muted, #6b7280); border-radius: 6px; line-height: 1;
}
.adm-key-copy:hover{ color: var(--adm-primary, #4f46e5); background: rgba(0,0,0,.05); }

/* adminapi: key input + Generate button ek row me */
.adm-key-row{ display: flex; gap: 8px; align-items: center; }
.adm-key-row .adm-key-field{ flex: 1 1 auto; min-width: 0; }
.adm-key-row .adm-apikey-gen{ flex: 0 0 auto; white-space: nowrap; }

/* adminapi key row — STACK (input poori width apni row, Generate neeche). Side-by-side
   flex me theme ke .btn ke saath input dab raha tha; stack har width par saaf. */
.adm-key-row{ display: block; }
.adm-key-row .adm-key-field{ width: 100%; display: block; margin-bottom: 8px; }
.adm-key-row .adm-apikey-gen{ display: inline-block; width: auto; }

/* generic hide util (JS toggles) */
.adm-hide{ display: none !important; }

/* adminapi key row — FINAL: input + Generate ek hi row me (input fill, button content-width).
   flex:1 1 0% input ko poora grow karata; button width:auto !important theme ke mobile
   width:100% ko defeat karta. (Pichle stack/█flex blocks ko override karta.) */
.adm-key-row{ display: flex !important; flex-wrap: nowrap; gap: 8px; align-items: center; }
.adm-key-row .adm-key-field{ flex: 1 1 0% !important; width: auto !important; min-width: 0; margin: 0 !important; display: block; }
.adm-key-row .adm-apikey-gen{ flex: 0 0 auto !important; width: auto !important; display: inline-flex; align-items: center; white-space: nowrap; }

/* adminapi index intro line under Add Key */
.adm-api-intro{ margin: 10px 2px 16px; font-size: 13px; color: var(--adm-muted, #6b7280); line-height: 1.6; }

/* adminapi intro card — normal readable text (chhota/muted nahi) */
.card-body.adm-api-intro{ color: inherit; }
.card-body.adm-api-intro p{ font-size: 14px; margin: 0 0 12px; line-height: 1.6; }

/* adminapi intro card — kam vertical padding */
.card-body.adm-api-intro{ padding-top: 14px; padding-bottom: 14px; }

/* ---------- adminapi docs page (our own look — ek compact card, chhote sections) ---------- */
.adm-doc{ max-width: 820px; margin: 0 auto; }
.adm-doc-body{ padding: 20px 22px; }
.adm-doc-head{ margin: 0 0 6px; }
.adm-doc-title{ margin: 0 0 6px; font-size: 22px; font-weight: 700; display: flex; align-items: center; gap: 10px; }
.adm-doc-ver{ background: var(--adm-primary, #4f46e5); color:#fff; font-size:11px; font-weight:700; letter-spacing:.3px; padding:3px 9px; border-radius:6px; }
.adm-doc-lead{ margin: 0; color: var(--adm-muted, #6b7280); font-size: 13.5px; line-height: 1.6; }
/* sections — divider ke saath, tight */
.adm-doc-sec{ margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--adm-border, #eceef3); }
.adm-doc-sec-title{ margin: 0 0 8px; font-size: 14px; font-weight: 700; display: flex; align-items: center; gap: 8px; color: #1f2733; }
.adm-doc-sec-title i{ color: var(--adm-primary, #4f46e5); }
.adm-doc-sec p{ margin: 0 0 8px; font-size: 13.5px; line-height: 1.6; }
.adm-doc-sec p:last-child{ margin-bottom: 0; }
/* inline code chip */
.adm-doc code{ background:#f4f5f8; border:1px solid #e2e6ee; border-radius:5px; padding:1px 7px; font-family:monospace,monospace; font-size:13px; color:#c2185b; }
/* one-line code with copy (base url) — accent left rail */
.adm-code-line{ display:flex; align-items:center; gap:8px; background:#f7f8fb; border:1px solid #e6e8ee; border-left:3px solid var(--adm-primary,#4f46e5); border-radius:8px; padding:10px 12px; }
.adm-code-line .adm-code{ flex:1 1 auto; min-width:0; overflow:auto; white-space:nowrap; background:none; border:0; padding:0; color:#1f2733; font-size:13px; }
.adm-code-line .adm-key-copy{ position:static; transform:none; flex:0 0 auto; }
/* multi-line code block (header example) */
.adm-code-block{ background:#0f1728; color:#e2e8f0; border-radius:8px; padding:12px 14px; font-family:monospace,monospace; font-size:13px; overflow:auto; white-space:pre; }

/* adminapi: access — nested resource > groups (edit modal, Status ke neeche) */
.adm-access-label{ font-weight: 700; }
.adm-access-label i{ color: var(--adm-primary, #4f46e5); margin-right: 4px; }
/* resource = distinct mini-panel: tinted bg, header rule ke saath */
.adm-access-res{ background: #f8f9fc; border: 1px solid var(--adm-border, #e2e6ee); border-radius: 10px; padding: 0; margin-bottom: 12px; overflow: hidden; }
.adm-access-res-title{ font-size: 13px; font-weight: 700; color: #1f2733; padding: 10px 14px; background: #eef1f7; border-bottom: 1px solid var(--adm-border, #e2e6ee); margin: 0; }
.adm-access-group{ padding: 12px 14px; border-top: 1px dashed var(--adm-border, #dfe3ee); }
.adm-access-group:first-of-type{ border-top: 0; }
.adm-access-group-title{ font-size: 12px; font-weight: 700; letter-spacing: .3px; text-transform: uppercase; color: var(--adm-muted, #6b7280); margin-bottom: 6px; }
.adm-access-parts-title{ font-size: 12px; font-weight: 600; color: var(--adm-muted, #6b7280); margin: 6px 0 4px; }
.adm-access-grid{ display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 8px 14px; }
.adm-access-indent{ padding-left: 22px; border-left: 2px solid var(--adm-border, #eceef3); margin-left: 4px; }
.adm-access-item{ display: flex; align-items: center; gap: 8px; margin: 0 0 2px; font-weight: 400; cursor: pointer; }
.adm-access-item.adm-access-main{ font-weight: 600; }
.adm-access-item input{ width: 16px; height: 16px; margin: 0; flex: 0 0 auto; }

/* ---------- adminapi docs — endpoints reference ---------- */
.adm-doc .card{ margin-bottom: 16px; }
.adm-doc-sec-first{ border-top: 0 !important; padding-top: 0 !important; margin-top: 0 !important; }
.adm-doc-list{ margin: 6px 0 0; padding-left: 18px; }
.adm-doc-list li{ font-size: 13px; line-height: 1.7; }
.adm-doc-h2{ font-size: 18px; font-weight: 700; margin: 22px 0 12px; color:#1f2733; }
.adm-ep-heading{ margin-bottom: 12px !important; }
/* endpoint rows */
.adm-ep-table{ display: flex; flex-direction: column; gap: 8px; }
.adm-ep{ display: flex; align-items: center; flex-wrap: wrap; gap: 10px; padding: 9px 12px; border: 1px solid var(--adm-border,#e6e8ee); border-radius: 8px; background:#fbfcfe; }
.adm-ep-method{ flex: 0 0 auto; min-width: 46px; text-align: center; font-size: 11px; font-weight: 700; letter-spacing:.4px; padding: 3px 8px; border-radius: 5px; color:#fff; }
.adm-ep-get{ background:#16a34a; }
.adm-ep-post{ background: var(--adm-primary,#4f46e5); }
.adm-ep-path{ flex: 0 0 auto; font-family: monospace,monospace; font-size: 13px; background:#fff; border:1px solid #e2e6ee; border-radius:5px; padding:2px 8px; color:#1f2733; }
.adm-ep-desc{ flex: 1 1 auto; min-width: 160px; font-size: 13px; color:#3a424f; }
.adm-ep-scope{ flex: 0 0 auto; font-size: 12px; color: var(--adm-muted,#6b7280); }
.adm-ep-scope code{ background:#eef1f7; border:0; }
@media (max-width: 600px){
  .adm-ep-desc{ flex-basis: 100%; }
  .adm-ep-scope{ flex-basis: 100%; }
}

/* adminapi docs — endpoint blocks + params */
.adm-ep-block{ padding: 14px 0; border-top: 1px solid var(--adm-border,#eceef3); }
.adm-ep-block.adm-ep-first{ padding-top: 0; border-top: 0; }
.adm-ep-head{ display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.adm-ep-summary{ margin: 8px 0 6px; font-size: 13.5px; color:#3a424f; }
.adm-ep-sub{ font-size: 12px; font-weight: 700; letter-spacing:.3px; text-transform: uppercase; color: var(--adm-muted,#6b7280); margin: 10px 0 6px; }
.adm-ep-sub-lg{ margin-top: 18px; }
.adm-param{ margin: 0; padding-left: 18px; }
.adm-param li{ font-size: 13px; line-height: 1.7; }
.adm-param code{ background:#f4f5f8; border:1px solid #e2e6ee; border-radius:4px; padding:0 5px; }
.adm-param em{ color: var(--adm-muted,#6b7280); font-style: normal; font-size: 12px; }
.adm-req{ font-size: 11px; font-weight: 700; color:#b02a27; background:#fdecec; border-radius:4px; padding:0 6px; }

/* adminapi docs — parameters ki proper table (Parameter/Type/Required/Description) */
.adm-param-table{ width:100%; border-collapse:collapse; margin:2px 0 4px; font-size:13px; }
.adm-param-table th{ text-align:left; font-size:11px; font-weight:700; letter-spacing:.3px; text-transform:uppercase; color:var(--adm-muted,#6b7280); border-bottom:2px solid var(--adm-border,#eceef3); padding:6px 10px; white-space:nowrap; }
.adm-param-table td{ border-bottom:1px solid var(--adm-border,#eceef3); padding:7px 10px; vertical-align:top; line-height:1.6; color:#3a424f; }
.adm-param-table code{ background:#f4f5f8; border:1px solid #e2e6ee; border-radius:4px; padding:0 5px; white-space:nowrap; }
.adm-param-table .adm-pt-type{ color:var(--adm-muted,#6b7280); font-size:12px; white-space:nowrap; }
.adm-pt-req{ font-size:11px; font-weight:700; color:#b02a27; background:#fdecec; border-radius:4px; padding:1px 7px; white-space:nowrap; }
.adm-pt-opt{ font-size:11px; font-weight:600; color:var(--adm-muted,#6b7280); background:#f1f3f7; border-radius:4px; padding:1px 7px; white-space:nowrap; }
.adm-note-sm{ font-size: 12px; color: var(--adm-muted,#6b7280); margin: 8px 0 0; }
.adm-doc-more{ font-size: 13px; color: var(--adm-muted,#6b7280); margin: 4px 2px 20px; }

/* adminapi docs — resource sub-label + endpoint 'panel extension' tag */
.adm-doc-h2-sub{ font-size: 13px; font-weight: 500; color: var(--adm-muted,#6b7280); }
.adm-ep-ext{ font-size: 11px; font-weight: 700; color:#8a5a00; background:#fff5d6; border:1px solid #f2e0a6; border-radius:5px; padding:1px 7px; }
