/*
 * ============================================================================
 *  Digital Quest - Admin Design System v2
 *
 *  სტანდარტი: ყველა გვერდი ერთი და იგივე კომპონენტებით —
 *    page head → (stat strip) → card(s): card head · tabs · toolbar · table / form
 *
 *  ტიპოგრაფია (fonts.css):
 *    --dq-font-text  'Mark Geo'       - ტექსტი, უჯრები, ფორმები, ღილაკები
 *    --dq-font-caps  'Mark Geo Caps'  - სათაურები, label-ები, სვეტების სახელები, badge-ები
 *    text-transform არსად გამოიყენება (ქართული → მთავრული მხოლოდ Caps შრიფტით).
 *
 *  კონტრასტი (თეთრ ზედაპირზე): text 18:1 · text-2 11:1 · muted 6.4:1 · faint 4.5:1
 *
 *   1 Tokens   2 Base & type   3 Layout   4 Sidebar   5 Sidebar (sm)   6 Page head
 *   7 Card     8 Stat strip    9 Tabs    10 Toolbar   11 Buttons      12 Table
 *  13 Badges  14 Forms        15 Bulk bar 16 Panel    17 Menu         18 Charts
 *  19 Modal / toast / misc
 * ============================================================================
 */

/* ── 1. Tokens ───────────────────────────────────────────────────────────── */
:root {
    /* აქცენტი - შაბლონის ნარინჯისფერი, ოდნავ ღრმა (ნაკლებად კაშკაშა) */
    --dq-accent:        #EB5B12;
    --dq-accent-600:    #D14E0C;
    --dq-accent-text:   #C2470A;   /* ნარინჯისფერი ტექსტი თეთრზე (5:1) */
    --dq-accent-50:     #FDF1EA;
    --dq-accent-100:    #F9DCCB;

    --dq-page:          #F6F6F8;   /* მთავარი ფონი (ბარათების ქვეშ) */
    --dq-surface:       #FFFFFF;
    --dq-sidebar:       #EFF0F3;
    --dq-fill:          #E9EAEE;   /* შევსებული კონტროლები (hover) */
    --dq-fill-2:        #F1F2F5;   /* შევსებული კონტროლები (default) */
    --dq-border:        #E1E2E7;
    --dq-border-soft:   #ECEDF0;
    --dq-hover:         #F7F7F9;
    --dq-field:         #F4F5F7;   /* ფორმის ველების ფონი (მცირე ნაცრისფერი) */

    --dq-text:          #111114;
    --dq-text-2:        #34353B;
    --dq-muted:         #5C5D66;
    --dq-faint:         #74757E;

    --dq-green:         #15803D;
    --dq-green-bg:      #EAF6EE;
    --dq-red:           #C8281E;
    --dq-red-bg:        #FCECEA;
    --dq-amber:         #B26B00;
    --dq-amber-bg:      #FFF5E0;
    --dq-dark:          #1A1D28;
    --dq-logo:          #1E1E26;
    --dq-online:        #16A34A;

    --dq-radius-sm:     4px;
    --dq-radius:        6px;
    --dq-radius-lg:     10px;
    --dq-radius-xl:     14px;

    --dq-shadow-card:   0 1px 2px rgba(17, 17, 20, .04);
    --dq-shadow:        0 10px 28px rgba(17, 17, 20, .10), 0 1px 3px rgba(17, 17, 20, .06);
    --dq-shadow-lg:     0 24px 64px rgba(17, 17, 20, .18), 0 2px 6px rgba(17, 17, 20, .06);

    --dq-sidebar-w:     249px;
    --dq-sidebar-w-sm:  68px;
    --dq-topbar-h:      56px;
    --dq-gutter:        24px;

    --dq-font-text: "Mark Geo", system-ui, -apple-system, "Segoe UI", sans-serif;
    --dq-font-caps: "Mark Geo Caps", "Mark Geo", system-ui, sans-serif;
    --dq-font: var(--dq-font-text);
}

/* ── 2. Base & typography ────────────────────────────────────────────────── */
html, body { height: 100%; }
body {
    margin: 0;
    background: var(--dq-page);
    color: var(--dq-text);
    font-family: var(--dq-font-text);
    font-size: 14px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}
/* ქართულზე uppercase აკრძალულია - მთავრული მხოლოდ Caps შრიფტით */
body, body *, body *::before, body *::after { text-transform: none !important; }
body .text-uppercase, body .text-lowercase { text-transform: none !important; }

a { color: var(--dq-accent-text); text-decoration: none; }
a:hover { color: var(--dq-accent-600); }
::selection { background: var(--dq-accent-100); }
:focus-visible { outline: 2px solid var(--dq-accent); outline-offset: 2px; }
code { color: var(--dq-accent-text); }

/* ტიპოგრაფიის როლები */
.dq-caps,
.mark-geo-caps-medium, .mark-geo-caps-semibold { font-family: var(--dq-font-caps) !important; letter-spacing: .3px; }
.mark-geo-regular, .mark-geo-medium, .mark-geo-semibold { font-family: var(--dq-font-text) !important; }
.mark-geo-medium, .mark-geo-caps-medium { font-weight: 500; }
.mark-geo-semibold, .mark-geo-caps-semibold { font-weight: 600; }
h1, h2, h3, h4, h5, h6 { font-family: var(--dq-font-caps); letter-spacing: .2px; color: var(--dq-text); }
.text-muted { color: var(--dq-muted) !important; }
.icon-12 { width: 12px; height: 12px; fill: currentColor; }
.icon-16 { width: 16px; height: 16px; fill: currentColor; }
.dq-num { font-variant-numeric: tabular-nums; }

/* ── 3. Layout ───────────────────────────────────────────────────────────── */
main.main {
    margin-left: var(--dq-sidebar-w);
    min-height: 100vh;
    background: var(--dq-page);
    border-left: 1px solid var(--dq-border);
    transition: margin-left .2s ease;
}
.main-content, .page-content { margin: 0; padding: 0; }
.page-content > .container-fluid { padding: 0 0 56px; }
.page-content > .container-fluid > :not(.dq-page-head) { margin-left: var(--dq-gutter); margin-right: var(--dq-gutter); }
.page-content > .container-fluid > .dq-page-head + * { margin-top: var(--dq-gutter); }
.page-content > .container-fluid > .row { --bs-gutter-x: 20px; }
.vertical-overlay { display: none; }
[data-sidebar-size="sm"] main.main { margin-left: var(--dq-sidebar-w-sm); }

.dq-stack { display: grid; gap: 20px; }
.dq-grid-2 { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 20px; }
@media (max-width: 1199.98px) { .dq-grid-2 { grid-template-columns: 1fr; } }

/* ── 4. Sidebar ──────────────────────────────────────────────────────────── */
.dq-sidebar {
    position: fixed; inset: 0 auto 0 0;
    width: var(--dq-sidebar-w);
    display: flex; flex-direction: column;
    background: var(--dq-sidebar);
    z-index: 1002;
    transition: width .2s ease, transform .2s ease;
}
.dq-ws { display: flex; align-items: center; gap: 10px; margin: 12px 14px 16px; color: var(--dq-text); }
.dq-ws:hover { color: var(--dq-text); }
.dq-ws-logo {
    flex: 0 0 40px; width: 40px; height: 40px;
    border-radius: 10px; background: var(--dq-logo);
    display: grid; place-items: center; overflow: hidden;
}
.dq-ws-logo img { width: 26px; height: 26px; object-fit: contain; }
.dq-ws-text { flex: 1; min-width: 0; line-height: 1.3; }
.dq-ws-text b { display: block; font-size: 14.5px; font-weight: 600; }
.dq-ws-text small { color: var(--dq-faint); font-size: 12.5px; }
.dq-ws-caret { color: var(--dq-faint); }

.dq-search { position: relative; margin: 0 14px 8px; }
.dq-search svg { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: var(--dq-muted); }
.dq-search input {
    width: 100%; height: 34px; padding: 0 32px 0 34px;
    border: 1px solid transparent; border-radius: var(--dq-radius);
    background: var(--dq-fill);
    font: 400 13.5px var(--dq-font-text); color: var(--dq-text);
}
.dq-search input::placeholder { color: var(--dq-muted); }
.dq-search input:focus { outline: none; background: #fff; border-color: var(--dq-accent); box-shadow: 0 0 0 3px var(--dq-accent-50); }
.dq-search kbd {
    position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
    min-width: 18px; padding: 0 5px;
    border: 1px solid var(--dq-border); border-radius: 3px;
    background: #fff; color: var(--dq-muted);
    font: 500 11px/16px var(--dq-font-text); text-align: center; box-shadow: none;
}

.dq-nav { flex: 1; overflow-y: auto; padding: 0 14px 12px; scrollbar-width: thin; }
.dq-nav-group { margin-top: 10px; }
.dq-nav-head { display: flex; align-items: center; }
.dq-nav-title {
    display: flex; align-items: center; gap: 8px; flex: 1;
    padding: 8px 6px;
    border: 0; background: none;
    color: var(--dq-faint);
    font: 500 11.5px/1 var(--dq-font-caps);
    letter-spacing: .5px;
    cursor: pointer;
}
.dq-nav-title svg { transform: rotate(180deg); transition: transform .15s; }
.dq-nav-group.is-collapsed .dq-nav-title svg { transform: none; }
.dq-nav-group.is-collapsed .dq-nav-list { display: none; }
.dq-nav-add { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 4px; color: var(--dq-faint); }
.dq-nav-add:hover { background: var(--dq-fill); color: var(--dq-text); }
.dq-nav-list { list-style: none; margin: 0; padding: 0; }

.dq-nav-link {
    position: relative;
    display: flex; align-items: center; gap: 10px;
    height: 32px; margin: 0 0 1px; padding: 0 8px;
    border-radius: var(--dq-radius);
    color: var(--dq-text-2);
    font-size: 14px;
}
.dq-nav-link:hover { background: var(--dq-fill); color: var(--dq-text); }
.dq-nav-link.active {
    background: #fff; color: var(--dq-text); font-weight: 500;
    box-shadow: 0 1px 2px rgba(17, 17, 20, .06), 0 0 0 1px rgba(17, 17, 20, .03);
}
.dq-nav-link.active .dq-nav-icon { color: var(--dq-accent); }
.dq-nav-icon { flex: 0 0 18px; width: 18px; height: 18px; color: var(--dq-muted); }
.dq-nav-label { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dq-nav-count {
    min-width: 22px; height: 20px; padding: 0 6px;
    border-radius: 5px; background: #fff; border: 1px solid var(--dq-border);
    color: var(--dq-muted);
    font: 500 11.5px/18px var(--dq-font-text); text-align: center;
}
.dq-nav-count.is-alert { background: var(--dq-accent); border-color: var(--dq-accent); color: #fff; }
.dq-nav-dot { flex: 0 0 18px; display: grid; place-items: center; }
.dq-nav-dot i { width: 8px; height: 8px; border-radius: 2px; background: var(--dot, var(--dq-accent)); }
.dq-nav-ext { color: var(--dq-faint); }

.dq-user { position: relative; display: flex; align-items: center; gap: 10px; margin: 8px 14px 14px; padding-top: 12px; border-top: 1px solid var(--dq-border); }
.dq-avatar {
    position: relative; flex: 0 0 36px; width: 36px; height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #F28A52, var(--dq-accent));
    color: #fff; display: grid; place-items: center;
    font: 600 14px var(--dq-font-text);
}
.dq-avatar::after {
    content: ""; position: absolute; right: -1px; bottom: -1px;
    width: 10px; height: 10px; border-radius: 50%;
    background: var(--dq-online); border: 2px solid var(--dq-sidebar);
}
.dq-user-text { flex: 1; min-width: 0; line-height: 1.3; color: inherit; text-decoration: none; }
.dq-user-text b, .dq-user-text small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dq-user-text:hover b { color: var(--dq-accent-text); }
.dq-user-text b { display: block; font-size: 14px; font-weight: 500; color: var(--dq-text); }
.dq-user-text small { color: var(--dq-faint); font-size: 12.5px; }

/* ── 5. Sidebar - დახურული (sm) ──────────────────────────────────────────── */
[data-sidebar-size="sm"] .dq-sidebar { width: var(--dq-sidebar-w-sm); }
[data-sidebar-size="sm"] .dq-ws { justify-content: center; margin: 12px 8px 14px; }
[data-sidebar-size="sm"] .dq-ws-text,
[data-sidebar-size="sm"] .dq-ws-caret,
[data-sidebar-size="sm"] .dq-search,
[data-sidebar-size="sm"] .dq-nav-label,
[data-sidebar-size="sm"] .dq-nav-ext,
[data-sidebar-size="sm"] .dq-nav-add,
[data-sidebar-size="sm"] .dq-user-text,
[data-sidebar-size="sm"] .dq-user .dq-icon-btn { display: none; }
[data-sidebar-size="sm"] .dq-nav { padding: 0 10px; overflow: visible; }
[data-sidebar-size="sm"] .dq-nav-title { justify-content: center; padding: 8px 0; }
[data-sidebar-size="sm"] .dq-nav-title span,
[data-sidebar-size="sm"] .dq-nav-title svg { display: none; }
[data-sidebar-size="sm"] .dq-nav-title::before { content: ""; width: 18px; height: 1px; background: var(--dq-border); }
[data-sidebar-size="sm"] .dq-nav-group.is-collapsed .dq-nav-list { display: block; }
[data-sidebar-size="sm"] .dq-nav-link { justify-content: center; width: 44px; height: 40px; margin: 2px auto; padding: 0; }
[data-sidebar-size="sm"] .dq-nav-icon { width: 20px; height: 20px; flex-basis: 20px; }
[data-sidebar-size="sm"] .dq-nav-count:not(.is-alert) { display: none; }
[data-sidebar-size="sm"] .dq-nav-count { position: absolute; top: 5px; right: 5px; min-width: 0; width: 8px; height: 8px; padding: 0; font-size: 0; border: 0; }
[data-sidebar-size="sm"] .dq-nav-link:hover .dq-nav-label {
    display: block; position: absolute; left: 52px; top: 50%; transform: translateY(-50%);
    padding: 6px 12px; border-radius: var(--dq-radius);
    background: var(--dq-dark); color: #fff;
    font-size: 13px; font-weight: 500; white-space: nowrap;
    box-shadow: var(--dq-shadow); z-index: 1010; pointer-events: none;
}
[data-sidebar-size="sm"] .dq-user { justify-content: center; margin: 8px 10px 14px; }

@media (max-width: 991.98px) {
    main.main, [data-sidebar-size="sm"] main.main { margin-left: 0; border-left: 0; }
    .dq-sidebar { transform: translateX(-100%); box-shadow: var(--dq-shadow-lg); width: var(--dq-sidebar-w) !important; }
    body.dq-menu-open .dq-sidebar { transform: none; }
    body.dq-menu-open .vertical-overlay { display: block; position: fixed; inset: 0; background: rgba(17, 17, 20, .4); z-index: 1001; }
    :root { --dq-gutter: 16px; }
}

/* ── 6. Page head (topbar) ───────────────────────────────────────────────── */
.dq-page-head {
    position: sticky; top: 0; z-index: 1000;
    display: flex; align-items: center; gap: 12px;
    min-height: var(--dq-topbar-h);
    padding: 0 var(--dq-gutter) 0 16px;
    background: rgba(255, 255, 255, .96);
    backdrop-filter: saturate(180%) blur(8px);
    border-bottom: 1px solid var(--dq-border);
}
.dq-burger {
    display: grid; place-items: center; width: 32px; height: 32px;
    border: 0; border-radius: var(--dq-radius); background: none; color: var(--dq-muted); cursor: pointer;
}
.dq-burger:hover { background: var(--dq-hover); color: var(--dq-text); }
.dq-page-title { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.dq-page-title h1 {
    margin: 0;
    font: 600 18px/1.2 var(--dq-font-caps); letter-spacing: .4px;
    color: var(--dq-text);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.dq-page-title .dq-count { color: var(--dq-faint); font-size: 15px; font-variant-numeric: tabular-nums; }
.dq-crumbs { color: var(--dq-faint); font-size: 12.5px; margin-left: 4px; white-space: nowrap; }
.dq-crumbs span + span::before { content: "/"; margin: 0 6px; color: #C9CAD0; }
.dq-head-actions { margin-left: auto; display: flex; align-items: center; gap: 6px; }

.dq-icon-btn {
    position: relative; display: inline-grid; place-items: center;
    width: 32px; height: 32px;
    border: 0; border-radius: var(--dq-radius);
    background: none; color: var(--dq-muted); cursor: pointer;
}
.dq-icon-btn:hover { background: var(--dq-fill-2); color: var(--dq-text); }
.dq-icon-btn .dq-dot { position: absolute; top: 6px; right: 6px; width: 7px; height: 7px; border-radius: 50%; background: var(--dq-accent); border: 1.5px solid #fff; }

.dq-avatars { display: inline-flex; align-items: center; margin: 0 8px 0 6px; }
.dq-av {
    width: 30px; height: 30px; margin-left: -7px;
    border-radius: 50%; border: 2px solid #fff;
    background: var(--av, #F28A52); color: #fff;
    display: inline-grid; place-items: center;
    font: 600 12px var(--dq-font-text);
}
.dq-av:first-child { margin-left: 0; }
.dq-av-more { background: var(--dq-accent-50); color: var(--dq-accent-text); font-weight: 500; }

/* ── 7. Card (ერთი სტანდარტი ყველა გვერდზე) ──────────────────────────────── */
body .card, .dq-card {
    background: var(--dq-surface);
    border: 1px solid var(--dq-border) !important;
    border-radius: var(--dq-radius-lg) !important;
    box-shadow: var(--dq-shadow-card) !important;
    margin-bottom: 20px;
    overflow: hidden;
}
body .card-header, .dq-card-head {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    min-height: 56px;
    padding: 12px 18px !important;
    background: var(--dq-surface) !important;
    border-bottom: 1px solid var(--dq-border) !important;
    border-radius: 0 !important;
}
body .card-title, body .card-header h5, body .card-header h6, .dq-card-title {
    margin: 0;
    color: var(--dq-text) !important;
    font: 600 14px/1.3 var(--dq-font-caps) !important;
    letter-spacing: .4px;
}
.dq-card-sub { margin: 2px 0 0; color: var(--dq-muted); font-size: 12.5px; }
body .card-header svg.icon-16 { color: var(--dq-faint) !important; }
body .card-body, .dq-card-body { padding: 20px 18px; }
body .card-footer { background: var(--dq-surface); border-top: 1px solid var(--dq-border); }

/* ── 8. Stat strip (KPI) ─────────────────────────────────────────────────── */
.dq-kpis {
    display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
    background: var(--dq-surface);
    border: 1px solid var(--dq-border);
    border-radius: var(--dq-radius-lg);
    box-shadow: var(--dq-shadow-card);
    overflow: hidden;
    margin-bottom: 20px;
}
.dq-kpi {
    display: flex; align-items: center; justify-content: space-between; gap: 14px;
    min-height: 96px; padding: 16px 20px;
    border-right: 1px solid var(--dq-border-soft);
    min-width: 0;
}
.dq-kpi:last-child { border-right: 0; }
.dq-kpi-label { color: var(--dq-muted); font: 500 12px/1.3 var(--dq-font-caps); letter-spacing: .4px; margin-bottom: 6px; white-space: nowrap; }
.dq-kpi-value { display: flex; align-items: baseline; gap: 8px; }
.dq-kpi-value b { font: 600 28px/1.1 var(--dq-font-text); letter-spacing: -.5px; color: var(--dq-text); }
.dq-kpi-meta { margin-top: 4px; color: var(--dq-faint); font-size: 12px; }
.dq-trend {
    display: inline-flex; align-items: center; gap: 3px;
    height: 20px; padding: 0 6px; border-radius: 10px;
    font: 600 12px/1 var(--dq-font-text);
}
.dq-trend.is-up { color: var(--dq-green); background: var(--dq-green-bg); }
.dq-trend.is-down { color: var(--dq-red); background: var(--dq-red-bg); }
.dq-trend.is-flat { color: var(--dq-muted); background: var(--dq-fill-2); }
.dq-spark { flex: 0 1 104px; height: 40px; color: var(--dq-accent); overflow: visible; }
@media (max-width: 1199.98px) {
    .dq-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .dq-kpi:nth-child(2) { border-right: 0; }
    .dq-kpi:nth-child(-n+2) { border-bottom: 1px solid var(--dq-border-soft); }
}
@media (max-width: 575.98px) {
    .dq-kpis { grid-template-columns: 1fr; }
    .dq-kpi { border-right: 0; border-bottom: 1px solid var(--dq-border-soft); }
}

/* ── 9. Tabs (ბარათის შიგნით) ────────────────────────────────────────────── */
.dq-tabs {
    display: flex; gap: 4px;
    padding: 0 12px;
    border-bottom: 1px solid var(--dq-border);
    overflow-x: auto; overflow-y: hidden; scrollbar-width: none;
}
.dq-tabs::-webkit-scrollbar { display: none; }
.dq-tab { position: relative; padding: 14px 10px; color: var(--dq-muted); font-size: 14px; white-space: nowrap; }
.dq-tab:hover { color: var(--dq-text); }
.dq-tab.active { color: var(--dq-accent-text); font-weight: 500; }
.dq-tab.active::after { content: ""; position: absolute; left: 4px; right: 4px; bottom: -1px; height: 2px; border-radius: 2px 2px 0 0; background: var(--dq-accent); }
.dq-tab-count {
    display: inline-block; min-width: 20px; margin-left: 6px; padding: 0 6px;
    border-radius: 10px; background: var(--dq-fill-2); color: var(--dq-muted);
    font: 500 11.5px/18px var(--dq-font-text); text-align: center;
}
.dq-tab.active .dq-tab-count { background: var(--dq-accent-50); color: var(--dq-accent-text); }

/* ── 10. Toolbar ─────────────────────────────────────────────────────────── */
.dq-toolbar { display: flex; align-items: center; gap: 8px; padding: 14px 16px; flex-wrap: wrap; }
.dq-toolbar-search { position: relative; width: 260px; max-width: 100%; }
.dq-toolbar-search svg { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: var(--dq-muted); }
.dq-toolbar-search input {
    width: 100%; height: 34px; padding: 0 10px 0 34px;
    border: 1px solid transparent; border-radius: var(--dq-radius);
    background: var(--dq-fill-2);
    font: 400 13.5px var(--dq-font-text); color: var(--dq-text);
}
.dq-toolbar-search input::placeholder { color: var(--dq-muted); }
.dq-toolbar-search input:focus { outline: none; background: #fff; border-color: var(--dq-accent); box-shadow: 0 0 0 3px var(--dq-accent-50); }
.dq-toolbar-meta { color: var(--dq-muted); font-size: 13px; }
.dq-spacer { flex: 1; }

/* ── 11. Buttons (ერთი სტანდარტი: 34px, radius 6) ────────────────────────── */
.dq-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 7px;
    height: 34px; padding: 0 13px;
    border: 1px solid transparent; border-radius: var(--dq-radius);
    background: var(--dq-fill-2); color: var(--dq-text-2);
    font: 500 13.5px/1 var(--dq-font-text);
    cursor: pointer; white-space: nowrap;
    transition: background .12s, border-color .12s, color .12s;
}
.dq-btn:hover { background: var(--dq-fill); color: var(--dq-text); }
.dq-btn-soft { background: var(--dq-accent-50); color: var(--dq-accent-text); }
.dq-btn-soft:hover { background: var(--dq-accent-100); color: var(--dq-accent-600); }
.dq-btn-primary { background: var(--dq-accent); color: #fff; }
.dq-btn-primary:hover { background: var(--dq-accent-600); color: #fff; }
.dq-btn-danger { background: var(--dq-red-bg); color: var(--dq-red); }
.dq-btn-danger:hover { background: #F8DAD6; color: var(--dq-red); }
.dq-btn-block { width: 100%; }
.dq-btn[disabled], .dq-btn.disabled { opacity: .5; pointer-events: none; }

/* კომპონენტების chip-ები (doc-cat-chip) - იგივე ღილაკის სტანდარტი */
body a.doc-cat-chip, body button.doc-cat-chip {
    display: inline-flex !important; align-items: center; justify-content: center; gap: 6px;
    height: 32px !important; min-width: 32px; padding: 0 11px !important;
    border: 1px solid transparent !important; border-radius: var(--dq-radius) !important;
    background: var(--dq-fill-2) !important; color: var(--dq-text-2) !important;
    font: 500 13px/1 var(--dq-font-text) !important; letter-spacing: 0 !important;
}
body a.doc-cat-chip:hover, body button.doc-cat-chip:hover { background: var(--dq-fill) !important; color: var(--dq-text) !important; }
body .doc-cat-chip:has(use[href$="#plus"]) { background: var(--dq-accent) !important; color: #fff !important; }
body .doc-cat-chip:has(use[href$="#plus"]):hover { background: var(--dq-accent-600) !important; }
/* მხოლოდ აიქონიანი ღილაკები - მხოლოდ ცხრილის უჯრებში (ფორმის submit-ს არ ეხება) */
body td .doc-cat-chip:has(use[href$="#edit"]):not(:has(span)),
body td .doc-cat-chip:has(use[href$="#trash"]):not(:has(span)) { padding: 0 !important; width: 32px; }
body .doc-cat-chip:has(use[href$="#trash"]) { color: var(--dq-red) !important; }
body .doc-cat-chip:has(use[href$="#trash"]):hover { background: var(--dq-red-bg) !important; }
body .btn-primary { background: var(--dq-accent); border-color: var(--dq-accent); border-radius: var(--dq-radius); font-weight: 500; }
body .btn-primary:hover, body .btn-primary:focus { background: var(--dq-accent-600); border-color: var(--dq-accent-600); }

/* ── 12. Table (ერთი სტანდარტი ყველა გვერდზე) ────────────────────────────── */
body .table { margin: 0; color: var(--dq-text); --bs-table-bg: transparent; --bs-table-hover-bg: var(--dq-hover); }
body .table > thead > tr { background: #FAFAFB !important; }
body .table > thead th {
    height: 40px;
    padding: 0 14px !important;
    vertical-align: middle !important;
    border-top: 0 !important;
    border-bottom: 1px solid var(--dq-border) !important;
    background: transparent !important;
    color: var(--dq-muted) !important;
    font: 500 11.5px/1.2 var(--dq-font-caps) !important;
    letter-spacing: .5px !important;
    white-space: nowrap;
}
body .table > tbody td {
    height: 52px;
    padding: 8px 14px !important;
    border-top: 0 !important;
    border-bottom: 1px solid var(--dq-border-soft) !important;
    background: transparent !important;
    font: 400 14px/1.4 var(--dq-font-text);
    color: var(--dq-text);
    vertical-align: middle !important;
}
body .table > tbody tr { transition: background .1s; }
body .table > tbody tr:hover { background: var(--dq-hover) !important; }
body .table > tbody tr:last-child td { border-bottom: 0 !important; }
body .table > :not(caption) > * > * { box-shadow: none; }
body .table img { border-radius: var(--dq-radius-sm); object-fit: cover; }
body .table th:first-child, body .table td:first-child { padding-left: 18px !important; }
body .table th:last-child, body .table td:last-child { padding-right: 18px !important; }
body .table-responsive { margin: 0; }

.dq-table-wrap { overflow-x: auto; }
.dq-table th, .dq-table td { white-space: nowrap; }
.dq-table th:first-child, .dq-table td:first-child { width: 36px; }
.dq-table tr[data-row] { cursor: pointer; }
.dq-table tr.is-active, .dq-table tr.is-selected { background: var(--dq-accent-50) !important; }
.dq-table tr[data-row]:focus-visible { outline: 2px solid var(--dq-accent); outline-offset: -2px; }
.dq-table tr.is-unread td.dq-name { font-weight: 600; }
.dq-table tr.is-unread td.dq-name::before {
    content: ""; display: inline-block; width: 6px; height: 6px; margin: 0 8px 2px 0;
    border-radius: 50%; background: var(--dq-accent); vertical-align: middle;
}
.dq-table .dq-icon-btn { width: 30px; height: 28px; }
.dq-cell-strong { color: var(--dq-text); font-weight: 500; }
.dq-cell-muted { color: var(--dq-muted) !important; }
.dq-cell-clip { max-width: 300px; overflow: hidden; text-overflow: ellipsis; }

.dq-check {
    appearance: none; -webkit-appearance: none;
    width: 16px; height: 16px; margin: 0; vertical-align: middle;
    border: 1.5px solid #B9BAC2; border-radius: 4px;
    background: #fff; cursor: pointer;
    display: inline-grid; place-items: center;
    transition: background .1s, border-color .1s;
}
.dq-check:hover { border-color: var(--dq-muted); }
.dq-check:checked, .dq-check:indeterminate { background: var(--dq-accent); border-color: var(--dq-accent); }
.dq-check:checked::after { content: ""; width: 4px; height: 8px; margin-top: -2px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.dq-check:indeterminate::after { content: ""; width: 8px; height: 2px; background: #fff; border-radius: 1px; }

.dq-empty { padding: 56px 16px; text-align: center; color: var(--dq-muted); }
.dq-empty svg { color: var(--dq-faint); margin-bottom: 10px; }

.pagination { gap: 4px; margin: 0; padding: 14px 16px; justify-content: flex-end !important; border-top: 1px solid var(--dq-border-soft); }
.page-link {
    min-width: 32px; height: 32px; padding: 0 10px; display: grid; place-items: center;
    border: 1px solid var(--dq-border) !important; border-radius: var(--dq-radius) !important;
    color: var(--dq-text-2) !important; font-size: 13px; background: #fff;
}
.page-item.active .page-link { background: var(--dq-accent) !important; border-color: var(--dq-accent) !important; color: #fff !important; }

/* ── 13. Badges ──────────────────────────────────────────────────────────── */
.dq-status, body span.doc-cat-chip {
    display: inline-flex !important; align-items: center; gap: 5px;
    height: 22px !important; padding: 0 8px !important;
    border: 0 !important; border-radius: 11px !important;
    background: var(--dq-fill-2) !important; color: var(--dq-muted) !important;
    font: 500 11.5px/1 var(--dq-font-caps) !important; letter-spacing: .4px !important;
    white-space: nowrap;
}
.dq-status::before, body span.doc-cat-chip::before {
    content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .9;
}
.dq-status.is-new, .dq-status.is-accent { background: var(--dq-accent-50) !important; color: var(--dq-accent-text) !important; }
.dq-status.is-good { background: var(--dq-green-bg) !important; color: var(--dq-green) !important; }
.dq-status.is-bad { background: var(--dq-red-bg) !important; color: var(--dq-red) !important; }
/* კომპონენტების სტატუსის chip-ები: ფერი inline-დან (აქტიური - მწვანე, არააქტიური - ნაცრისფერი) */
body span.doc-cat-chip[style*="#2f9e44"], body span.doc-cat-chip[style*="#2b8a3e"], body span.doc-cat-chip[style*="#37b24d"],
body span.doc-cat-chip[style*="#12805c"], body span.doc-cat-chip[style*="#099268"], body span.doc-cat-chip[style*="#0ca678"] {
    background: var(--dq-green-bg) !important; color: var(--dq-green) !important;
}

/* slug / კოდის ტეგები ცხრილებში */
body [class$="-slug"], body .seo-slug {
    display: inline-block; padding: 2px 8px; border-radius: 5px;
    background: var(--dq-fill-2) !important; border: 0 !important;
    color: var(--dq-text-2) !important;
    font: 500 12px/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace !important;
}
.badge { border-radius: 10px; font-weight: 600; }
.bg-danger { background-color: var(--dq-accent) !important; }

/* ── 14. Forms (ერთი სტანდარტი) ──────────────────────────────────────────── */
body .form-control, body .form-select, body input[type="text"].form-control, body textarea.form-control {
    min-height: 38px;
    border: 1px solid var(--dq-border);
    border-radius: var(--dq-radius);
    background-color: #fff;
    font: 400 14px/1.45 var(--dq-font-text);
    color: var(--dq-text);
    box-shadow: none;
}
body .form-control::placeholder { color: var(--dq-faint); }
body .form-control:focus, body .form-select:focus { border-color: var(--dq-accent); box-shadow: 0 0 0 3px var(--dq-accent-50); }
body .form-label, body label[class$="-label"], body [class$="-label"]:is(label, div) {
    color: var(--dq-text-2) !important;
    font: 500 12px/1.3 var(--dq-font-caps) !important;
    letter-spacing: .4px !important;
    margin-bottom: 6px;
}
body .form-text, body [class$="-hint"] { color: var(--dq-faint) !important; font-size: 12.5px !important; }
body .form-check-input { border-color: #B9BAC2; }
body .form-check-input:checked { background-color: var(--dq-accent); border-color: var(--dq-accent); }
body .form-check-input:focus { box-shadow: 0 0 0 3px var(--dq-accent-50); border-color: var(--dq-accent); }
body .form-check-label { color: var(--dq-text-2); }
/* ფორმის სექციების სათაურები (კომპონენტებში: *-section-title) */
body [class$="-section-title"], body [class*="-section-label"] {
    color: var(--dq-muted) !important;
    font: 600 11.5px/1.3 var(--dq-font-caps) !important;
    letter-spacing: .5px !important;
}

/* ── 15. Bulk action bar ─────────────────────────────────────────────────── */
.dq-bulk {
    position: fixed; left: 50%; bottom: 24px; z-index: 1040;
    display: flex; align-items: center; gap: 2px;
    padding: 4px 4px 4px 14px;
    border-radius: 10px;
    background: var(--dq-dark); color: #E4E5EA;
    box-shadow: 0 16px 40px rgba(0, 0, 0, .28);
    transform: translate(-50%, 140%); opacity: 0;
    transition: transform .25s cubic-bezier(.2, .9, .3, 1.2), opacity .2s;
    font-size: 13.5px;
}
.dq-bulk.is-visible { transform: translate(-50%, 0); opacity: 1; }
.dq-bulk-count { color: #A9AAB5; padding-right: 10px; margin-right: 4px; border-right: 1px solid #353846; white-space: nowrap; }
.dq-bulk-count b { color: #fff; font-weight: 600; }
.dq-bulk button {
    display: inline-flex; align-items: center; gap: 6px;
    height: 32px; padding: 0 10px;
    border: 0; border-radius: 6px; background: none; color: #FAFAFA;
    font: 500 13.5px/1 var(--dq-font-text); cursor: pointer; white-space: nowrap;
}
.dq-bulk button:hover { background: #2A2D3A; }
.dq-bulk .dq-bulk-sep { width: 1px; height: 18px; background: #353846; margin: 0 2px; }
.dq-bulk .dq-bulk-discard { background: #fff; color: var(--dq-red); margin-left: 6px; }
.dq-bulk .dq-bulk-discard:hover { background: #F1F2F5; }

/* ── 16. Overview panel ──────────────────────────────────────────────────── */
.dq-panel {
    position: fixed; top: 72px; right: 24px; z-index: 1050;
    width: 380px; max-width: calc(100vw - 32px); max-height: calc(100vh - 96px);
    display: flex; flex-direction: column;
    border-radius: var(--dq-radius-xl); background: #fff;
    border: 1px solid var(--dq-border); box-shadow: var(--dq-shadow-lg);
    opacity: 0; transform: translateY(8px) scale(.98); pointer-events: none;
    transition: opacity .18s ease, transform .22s cubic-bezier(.2, .9, .3, 1.1);
}
.dq-panel.is-open { opacity: 1; transform: none; pointer-events: auto; }
.dq-panel-head { display: flex; align-items: center; gap: 8px; padding: 12px 12px 4px 16px; color: var(--dq-muted); font: 500 12px var(--dq-font-caps); letter-spacing: .4px; }
.dq-panel-head .dq-grip { color: #C9CAD0; }
.dq-panel-head .dq-spacer { flex: 1; }
.dq-panel-body { overflow-y: auto; padding: 4px 20px 20px; }
.dq-profile { text-align: center; padding: 8px 0 16px; }
.dq-profile .dq-avatar { width: 72px; height: 72px; margin: 0 auto 10px; font-size: 26px; }
.dq-profile .dq-avatar::after { width: 14px; height: 14px; right: 2px; bottom: 2px; border-color: #fff; background: var(--status, #9A9BA3); }
.dq-profile h3 { margin: 0; font: 600 17px/1.3 var(--dq-font-text); color: var(--dq-text); }
.dq-profile p { margin: 2px 0 0; color: var(--dq-muted); font-size: 13.5px; }
.dq-panel-actions { display: flex; gap: 8px; margin-bottom: 14px; }
.dq-panel-actions .dq-btn-primary { flex: 1; height: 38px; }
.dq-panel-actions .dq-square { width: 38px; height: 38px; padding: 0; }
.dq-ptabs { display: flex; border-bottom: 1px solid var(--dq-border); margin: 0 -20px 6px; padding: 0 20px; }
.dq-ptab { flex: 1; padding: 10px 0; border: 0; background: none; color: var(--dq-muted); font: 500 14px var(--dq-font-text); position: relative; cursor: pointer; }
.dq-ptab.active { color: var(--dq-accent-text); }
.dq-ptab.active::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--dq-accent); border-radius: 2px 2px 0 0; }
.dq-ppane { display: none; }
.dq-ppane.active { display: block; }
.dq-info { list-style: none; margin: 0; padding: 0; }
.dq-info li { display: grid; grid-template-columns: 18px 100px 1fr; gap: 8px; align-items: center; padding: 9px 0; font-size: 14px; border-bottom: 1px solid var(--dq-border-soft); }
.dq-info li:last-child { border-bottom: 0; }
.dq-info li svg { color: var(--dq-faint); }
.dq-info li span { color: var(--dq-muted); }
.dq-info li b { font-weight: 500; color: var(--dq-text); word-break: break-word; }
.dq-message { white-space: pre-wrap; word-break: break-word; padding: 12px 14px; border-radius: var(--dq-radius); background: var(--dq-fill-2); color: var(--dq-text-2); font-size: 14px; line-height: 1.6; }

/* ── 17. Dropdown menu ───────────────────────────────────────────────────── */
.dq-menu {
    position: fixed; z-index: 1060; top: 0; left: 0;
    min-width: 210px; padding: 5px;
    border-radius: 10px; background: #fff;
    border: 1px solid var(--dq-border); box-shadow: var(--dq-shadow);
    opacity: 0; transform: translateY(-4px) scale(.98); pointer-events: none;
    transition: opacity .12s, transform .14s;
}
.dq-menu.is-open { opacity: 1; transform: none; pointer-events: auto; }
.dq-menu button, .dq-menu a {
    display: flex; align-items: center; gap: 10px;
    width: 100%; height: 36px; padding: 0 10px;
    border: 0; border-radius: 7px; background: none;
    color: var(--dq-text-2); font: 400 14px/1 var(--dq-font-text); text-align: left; cursor: pointer;
}
.dq-menu button:hover, .dq-menu a:hover { background: var(--dq-hover); color: var(--dq-text); }
.dq-menu svg { color: var(--dq-muted); flex: 0 0 16px; }
.dq-menu .is-danger, .dq-menu .is-danger svg { color: var(--dq-red); }
.dq-menu hr { margin: 4px 0; border: 0; border-top: 1px solid var(--dq-border); opacity: 1; }

/* ── 18. Charts (dataviz: 2px line, ~10% area wash, hairline grid, crosshair) ── */
.dq-chart { position: relative; padding: 8px 18px 14px; }
.dq-chart svg { display: block; width: 100%; overflow: visible; }
.dq-chart .grid line { stroke: var(--dq-border-soft); stroke-width: 1; shape-rendering: crispEdges; }
.dq-chart .axis text { fill: var(--dq-faint); font: 400 11.5px var(--dq-font-text); font-variant-numeric: tabular-nums; }
.dq-chart .line { fill: none; stroke: var(--dq-accent); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.dq-chart .area { fill: var(--dq-accent); opacity: .10; }
.dq-chart .bar { fill: var(--dq-accent); }
.dq-chart .bar.is-muted { fill: #C9CAD0; }
.dq-chart .cross { stroke: var(--dq-faint); stroke-width: 1; opacity: 0; }
.dq-chart .dot { fill: var(--dq-accent); stroke: #fff; stroke-width: 2; opacity: 0; }
.dq-chart.is-hover .cross, .dq-chart.is-hover .dot { opacity: 1; }
.dq-chart .hit { fill: transparent; cursor: crosshair; }
.dq-tip {
    position: absolute; z-index: 5; pointer-events: none;
    padding: 8px 10px; border-radius: 8px;
    background: var(--dq-dark); color: #fff;
    font: 400 12.5px/1.35 var(--dq-font-text);
    box-shadow: var(--dq-shadow);
    transform: translate(-50%, calc(-100% - 12px));
    opacity: 0; transition: opacity .1s; white-space: nowrap;
}
.dq-tip b { display: block; font-size: 15px; font-weight: 600; }
.dq-chart.is-hover .dq-tip { opacity: 1; }
.dq-chart-empty { padding: 48px 16px; text-align: center; color: var(--dq-muted); }

/* რანჟირების ზოლი (მეტრი) ცხრილებში */
.dq-meter { display: flex; align-items: center; gap: 10px; min-width: 140px; }
.dq-meter-track { flex: 1; height: 6px; border-radius: 3px; background: var(--dq-accent-50); overflow: hidden; }
.dq-meter-fill { display: block; height: 100%; border-radius: 3px; background: var(--dq-accent); }
.dq-meter-val { min-width: 32px; text-align: right; font-variant-numeric: tabular-nums; color: var(--dq-text); font-weight: 500; }

/* ── 19. Modal / toast / misc ────────────────────────────────────────────── */
body .modal-content { border: 1px solid var(--dq-border); border-radius: var(--dq-radius-xl); box-shadow: var(--dq-shadow-lg); }
body .modal-header { border-bottom: 1px solid var(--dq-border); }
body .modal-title { font: 600 15px var(--dq-font-caps); letter-spacing: .4px; }
body .modal-footer { border-top: 1px solid var(--dq-border); }
.modal-backdrop.show { opacity: .35; }

body .toast-item { background: var(--dq-dark) !important; color: #fff !important; border-radius: 10px; box-shadow: 0 16px 40px rgba(0, 0, 0, .25); }
body .toast-success .toast-icon { color: #4ADE80; }
body .toast-error   .toast-icon { color: #F87171; }
body .toast-warning .toast-icon { color: #FBBF24; }
body .toast-info    .toast-icon { color: #FB923C; }
body .toast-text { font-family: var(--dq-font-text); }

body.auth-bg { background: var(--dq-page); }
#page-topbar, .navbar-brand-box, .app-menu:not(.dq-sidebar), .page-title-box { display: none !important; }

/* ── 20. სტანდარტის დაცვა კომპონენტების საკუთარ სტილებზე ─────────────────── */
/* ველები - ყველგან თეთრი, ერთი ჩარჩო, ერთი focus */
body :where(input:not([type="checkbox"], [type="radio"], [type="file"], [type="range"], [type="color"], .dq-check), textarea, select) {
    background-color: var(--dq-field) !important;
    border: 1px solid var(--dq-border) !important;
    border-radius: var(--dq-radius) !important;
    color: var(--dq-text) !important;
    font-family: var(--dq-font-text) !important;
    font-size: 14px !important;
    box-shadow: none !important;
}
body :where(input:not([type="checkbox"], [type="radio"], [type="file"]), textarea, select):hover { border-color: #CFD0D6 !important; }
body :where(input:not([type="checkbox"], [type="radio"], [type="file"]), textarea, select):focus {
    background-color: #fff !important;
    border-color: var(--dq-accent) !important;
    box-shadow: 0 0 0 3px var(--dq-accent-50) !important;
    outline: none !important;
}
body .dq-search input, body .dq-toolbar-search input { background-color: var(--dq-fill-2) !important; border-color: transparent !important; }
body .dq-sidebar .dq-search input { background-color: var(--dq-fill) !important; }
body input[type="file"].form-control { padding: 6px 8px; background: #fff; border: 1px solid var(--dq-border); border-radius: var(--dq-radius); }
/* Quill editor - იგივე ჩარჩო */
body .ql-toolbar.ql-snow { border-color: var(--dq-border) !important; border-radius: var(--dq-radius) var(--dq-radius) 0 0; background: #FAFAFB; }
body .ql-container.ql-snow { border-color: var(--dq-border) !important; border-radius: 0 0 var(--dq-radius) var(--dq-radius); font-family: var(--dq-font-text); }

/* ატვირთვის ზონები */
body [class*="dropzone"], body [class*="-drop-zone"], body [class*="upload-zone"], body [class$="-drop"] {
    background: #FAFAFB !important;
    border: 1.5px dashed #C9CAD0 !important;
    border-radius: var(--dq-radius-lg) !important;
}

/* ბმულები ცხრილებში - ტექსტის ფერით, hover-ზე აქცენტი */
body .table a:not(.doc-cat-chip):not(.dq-btn):not(.dq-icon-btn) { color: var(--dq-text-2) !important; text-decoration: none; }
body .table a:not(.doc-cat-chip):not(.dq-btn):not(.dq-icon-btn):hover { color: var(--dq-accent-text) !important; text-decoration: underline; }

/* განახლების/მეტა badge-ები (კომპონენტებში *-badge) */
body [class$="-updated-badge"], body [class$="-meta-badge"] {
    background: var(--dq-fill-2) !important; color: var(--dq-muted) !important; border: 0 !important;
    border-radius: 11px !important; padding: 3px 9px !important; font: 500 12px var(--dq-font-text) !important;
}

/* განაცხადების ცხრილი: სვეტები ეტევა (Mark Geo უფრო განიერია) */
.dq-table td.dq-cell-clip { max-width: 220px; }
.dq-table td:nth-child(4) { max-width: 230px; overflow: hidden; text-overflow: ellipsis; }

/* ფორმის ბარათები: ერთი მაქს. სიგანე და ცენტრი */
body .row.justify-content-center > [class*="col-"] > .card { margin-left: auto; margin-right: auto; }

/* მთავარი მოქმედება (ფორმის submit) - ყველგან primary ღილაკი */
body button[type="submit"].doc-cat-chip:not(:has(use[href$="#trash"])),
body .seo-btn-primary {
    height: 34px !important; padding: 0 16px !important;
    border-radius: var(--dq-radius) !important;
    background: var(--dq-accent) !important; color: #fff !important; border-color: transparent !important;
    font: 500 13.5px/1 var(--dq-font-text) !important;
}
body button[type="submit"].doc-cat-chip:not(:has(use[href$="#trash"])):hover,
body .seo-btn-primary:hover { background: var(--dq-accent-600) !important; }

/* განაცხადების ცხრილი - სრულად ეტევა 1280px+ ეკრანზე */
body .dq-table > thead th, body .dq-table > tbody td { padding-left: 12px !important; padding-right: 12px !important; }
body .dq-table td.dq-cell-clip { max-width: 180px; }
body .dq-table td:nth-child(4) { max-width: 210px; }


/* ── 21. ცხრილის სტანდარტული უჯრები (UiComponent) ────────────────────────── */
.dq-title-cell { display: flex; align-items: center; gap: 12px; min-width: 220px; }
.dq-title-text { display: flex; flex-direction: column; line-height: 1.35; min-width: 0; }
.dq-title-text .dq-cell-muted { font-size: 12.5px; }
.dq-title-text a.dq-cell-strong { color: var(--dq-text) !important; }
.dq-title-text a.dq-cell-strong:hover { color: var(--dq-accent-text) !important; text-decoration: none !important; }
.dq-thumb { flex: 0 0 48px; width: 48px; height: 36px; border-radius: 6px; object-fit: cover; border: 1px solid var(--dq-border-soft); background: var(--dq-fill-2); }
.dq-thumb-empty { display: inline-block; }
.dq-row-actions { display: inline-flex; align-items: center; gap: 4px; }
.dq-row-actions form { margin: 0; }
.dq-icon-danger:hover { background: var(--dq-red-bg) !important; color: var(--dq-red) !important; }
.dq-code { display: inline-block; padding: 2px 8px; border-radius: 5px; background: var(--dq-fill-2); color: var(--dq-text-2); font: 500 12px/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.dq-tags { display: flex; flex-wrap: wrap; gap: 4px; }
.dq-tag { display: inline-block; padding: 1px 8px; border-radius: 10px; background: var(--dq-fill-2); color: var(--dq-muted); font-size: 12px; }

/* ── 22. Header ── */
.dq-btn-ghost { background: transparent; color: var(--dq-text-2); }
.dq-btn-ghost:hover { background: var(--dq-fill-2); }
.dq-icon-btn .dq-badge-count {
    position: absolute; top: 2px; right: 0;
    min-width: 17px; height: 17px; padding: 0 4px;
    border-radius: 9px; border: 2px solid #fff;
    background: var(--dq-accent); color: #fff;
    font: 600 10px/13px var(--dq-font-text); text-align: center;
}
@media (max-width: 767.98px) { .dq-hide-sm { display: none; } }

/* სიის ბარათების სათაური, რომელიც მხოლოდ გვერდის სათაურს და "+ დამატებას" იმეორებდა
   (დამატება ახლა header-შია) - იმალება */
body .card:has(.table) > .card-header:has(a.doc-cat-chip[href$="-add"]) { display: none !important; }

/* ── 23. ფორმის გვერდები ─────────────────────────────────────────────────── */
/* ბარათის სათაური "X - ახალი" + "უკან" იმეორებდა გვერდის header-ს (იქაა "სიაზე დაბრუნება") */
body .card:has(form) > .card-header:has(a.doc-cat-chip[href]) { display: none !important; }

/* მოქმედებების ზოლი ფორმის ბოლოს - sticky, ყოველთვის ხელმისაწვდომი */
body form [class$="-actions"]:not(.dq-row-actions) {
    position: sticky; bottom: 0; z-index: 5;
    display: flex; align-items: center; justify-content: flex-end; gap: 8px;
    margin: 24px -18px -20px !important; padding: 14px 18px !important;
    background: rgba(255, 255, 255, .96); backdrop-filter: blur(6px);
    border-top: 1px solid var(--dq-border) !important;
}

/* ფაილის ველი */
body input[type="file"] {
    width: 100%; padding: 5px !important;
    background: var(--dq-field) !important; border: 1px solid var(--dq-border) !important;
    border-radius: var(--dq-radius) !important; color: var(--dq-muted); font: 400 13.5px var(--dq-font-text);
}
body input[type="file"]::file-selector-button {
    margin-right: 10px; height: 28px; padding: 0 12px;
    border: 0; border-radius: 5px; background: #fff; color: var(--dq-text-2);
    font: 500 13px var(--dq-font-text); cursor: pointer; box-shadow: 0 0 0 1px var(--dq-border);
}
body input[type="file"]::file-selector-button:hover { background: var(--dq-fill-2); }

/* Quill toolbar - გადაიტანოს ხაზზე, scrollbar-ის გარეშე */
body .ql-toolbar.ql-snow { overflow: visible !important; white-space: normal !important; display: flex; flex-wrap: wrap; gap: 2px 0; }
body form [class$="-actions"] button[type="submit"] { min-width: 120px; }

/* ცხრილის მოქმედებები ყველა სიაში ერთნაირად: გამჭვირვალე აიქონ-ღილაკები, მარჯვნივ */

body td .doc-cat-chip:has(use[href$="#trash"]):hover { background: var(--dq-red-bg) !important; color: var(--dq-red) !important; }
body .table td:last-child > .d-flex:has(.doc-cat-chip) { justify-content: flex-end; }
body td .doc-cat-chip svg { width: 16px; height: 16px; }

/* ── 24. ცხრილის მოქმედების აიქონები - ერთი სტილი ყველა სიაში ─────────────
   რედაქტირება: ნაცრისფერი ფონი, მუქი აიქონი · წაშლა: ნაცრისფერი ფონი, წითელი აიქონი */
body .dq-row-actions { gap: 6px; }
body .dq-row-actions .dq-icon-btn,
body td a.doc-cat-chip, body td button.doc-cat-chip {
    width: 32px; height: 32px; padding: 0 !important;
    display: inline-flex; align-items: center; justify-content: center;
    border: 0 !important; border-radius: 7px !important;
    background: var(--dq-fill-2) !important; color: var(--dq-text-2) !important;
}
body .dq-row-actions .dq-icon-btn:hover,
body td a.doc-cat-chip:hover, body td button.doc-cat-chip:hover { background: var(--dq-fill) !important; color: var(--dq-text) !important; }
body .dq-row-actions .dq-icon-danger,
body td .doc-cat-chip:has(use[href$="#trash"]) { color: var(--dq-red) !important; }
body .dq-row-actions .dq-icon-danger:hover,
body td .doc-cat-chip:has(use[href$="#trash"]):hover { background: var(--dq-red-bg) !important; color: var(--dq-red) !important; }

/* პარტნიორის ლოგო - მთლიანად ჩანდეს (არა cover), თეთრ ფონზე */
.dq-logo-cell .dq-thumb { object-fit: contain; background: #fff; padding: 3px; }
.dq-link-ext { color: var(--dq-text-2) !important; font-size: 13px; }
.dq-link-ext:hover { color: var(--dq-accent-text) !important; }

/* Bootstrap-ის row/col-12 gutter სიის ბარათებს ავიწროებდა - ყველა ცხრილი ერთ სიგანეზე */
body .container-fluid > .row:has(> .col-12 > .card .table) { margin-left: var(--dq-gutter); margin-right: var(--dq-gutter); }
body .container-fluid > .row:has(> .col-12 > .card .table) > .col-12 { padding-left: 0; padding-right: 0; }
