/* ====================================================
   COMMON STYLES — shared across all pages
   ==================================================== */
@import url('animations.css');
@import url('darktheme.css');

/* Base */
html { font-size: clamp(14px, 1rem + 0.2vw, 18px); overflow-y: scroll; }

/* Apply custom font to all form/UI elements.
   --custom-font is set per-page via an inline :root block. */
body { font-family: var(--custom-font); }
form, input, select, textarea, button, label { font-family: var(--custom-font) !important; }
.form-control, .form-select, .btn, .dropdown-menu,
.ts-control, .ts-dropdown, .tooltip, .popover, .badge,
.ant-tg-btn-primary, .ant-tg-btn-ghost, .modal-title {
    font-family: var(--custom-font) !important;
}

/* ── Navbar ── */
.navbar { background-color: var(--nav-bg, #141414); border-bottom: 1px solid var(--nav-border, rgba(255,255,255,0.1)); padding: 0.6rem 0; position: sticky; top: 0; z-index: 1030; }
.navbar-brand { font-size: 1.1rem; font-weight: 800; letter-spacing: -0.5px; color: var(--nav-brand-color, #ffffff) !important; }
.btn-nav-ghost { background-color: var(--nav-ghost-bg, rgba(255,255,255,0.07)) !important; border: 1px solid var(--nav-ghost-border, rgba(255,255,255,0.18)) !important; color: var(--nav-ghost-text, rgba(255,255,255,0.85)) !important; }
.btn-nav-ghost:hover { background-color: var(--nav-ghost-hover-bg, rgba(255,255,255,0.15)) !important; border-color: var(--nav-ghost-hover-border, rgba(255,255,255,0.35)) !important; color: var(--nav-ghost-hover-text, #ffffff) !important; }
.btn-nav-ghost::after { background-color: var(--nav-ghost-ripple, rgba(255,255,255,0.25)) !important; }
.navbar .btn-primary { background-color: var(--nav-primary-bg, #4f46e5) !important; color: var(--nav-primary-text, #ffffff) !important; border-color: var(--nav-primary-bg, #4f46e5) !important; }
.navbar .btn-primary:hover { background-color: var(--nav-primary-hover-bg, #4338ca) !important; }
.navbar .btn-primary::after { background-color: var(--nav-primary-ripple, #4f46e5) !important; }
.dropdown-toggle::after { display: none !important; }

/* ── Cards ── */
.card { border: none; border-radius: 1rem; box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1); }

/* ── Buttons ── */
.btn { border-radius: 0.5rem; font-weight: 600; padding: 0.4rem 0.8rem; transition: all 0.2s; font-size: 0.85rem; }
.btn-sm { padding: 0.25rem 0.6rem; font-size: 0.8rem; }
.btn-primary { background-color: #4f46e5; border: none; }
.btn-primary:hover { background-color: #4338ca; transform: translateY(-1px); }

/* Global Button Ripple */
@keyframes btn-ripple-outline {
    0%   { transform: scaleX(1)   scaleY(1);   opacity: 0.4; }
    100% { transform: scaleX(1.4) scaleY(1.6); opacity: 0; }
}
.btn:not(.btn-link) { position: relative; overflow: visible; transition: all 0.2s; border-radius: 8px !important; }
.btn:not(.btn-link)::after {
    content: ""; display: inline-block; height: 100%; width: 100%;
    border: 0; border-radius: 8px; position: absolute; top: 0; left: 0;
    z-index: -1; transition: all 0.4s;
}
.btn-primary::after   { background-color: var(--ripple-primary,   #4f46e5); }
.btn-secondary::after { background-color: var(--ripple-secondary, #6c757d); }
.btn-success::after   { background-color: var(--ripple-success,   #198754); }
.btn-danger::after    { background-color: var(--ripple-danger,    #dc3545); }
.btn-warning::after   { background-color: #ffc107; }
.btn-info::after      { background-color: #0dcaf0; }
.btn-light::after     { background-color: #f8f9fa; }
.btn-dark::after      { background-color: #212529; }
.btn-nav-ghost::after { background-color: var(--ripple-ghost, #ffffff); }
.btn[class*="btn-outline-"]::after { background-color: var(--ripple-outline, #4f46e5); }
.btn[class*="btn-outline-"]::after { opacity: 0; transition: none; }
.btn:not([class*="btn-outline-"])::after { opacity: 0.4; }
.btn:not(.btn-link):hover { transform: translateY(-3px); box-shadow: 0 10px 20px rgba(0,0,0,0.15); }
.btn[class*="btn-outline-"]:hover::after { animation: btn-ripple-outline 0.45s ease-out forwards; }
.btn:not(.btn-link):hover::after { transform: scaleX(1.4) scaleY(1.6); opacity: 0; }
.btn:not(.btn-link):active { transform: translateY(-1px); box-shadow: 0 5px 10px rgba(0,0,0,0.15); }

/* ── Ant-style Buttons (replaces Bootstrap .btn-* look for converted markup) ── */
.ant-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    border-radius: 6px; font-weight: 500; padding: 0.4rem 0.9rem; font-size: 0.85rem;
    line-height: 1.4; border: 1px solid transparent; cursor: pointer;
    transition: all 0.2s cubic-bezier(0.645,0.045,0.355,1);
}
.ant-btn-sm { padding: 0.25rem 0.65rem; font-size: 0.8rem; }
.ant-btn:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(0,0,0,0.08); }
.ant-btn:active { transform: translateY(0); box-shadow: none; }
.ant-btn:disabled, .ant-btn.disabled { opacity: 0.5; cursor: not-allowed; transform: none; box-shadow: none; }

.ant-btn-primary { background: #4f46e5; border-color: #4f46e5; color: #fff; }
.ant-btn-primary:hover { background: #6366f1; border-color: #6366f1; color: #fff; }
.ant-btn-primary:active { background: #4338ca; border-color: #4338ca; }

.ant-btn-secondary { background: #fff; border-color: #d1d5db; color: #374151; }
.ant-btn-secondary:hover { border-color: #4f46e5; color: #4f46e5; }

.ant-btn-success { background: #16a34a; border-color: #16a34a; color: #fff; }
.ant-btn-success:hover { background: #15803d; border-color: #15803d; }

.ant-btn-danger { background: #dc2626; border-color: #dc2626; color: #fff; }
.ant-btn-danger:hover { background: #b91c1c; border-color: #b91c1c; }

.ant-btn-warning { background: #f59e0b; border-color: #f59e0b; color: #fff; }
.ant-btn-warning:hover { background: #d97706; border-color: #d97706; }

.ant-btn-light { background: #f8fafc; border-color: #e2e8f0; color: #2c2c2c; }
.ant-btn-light:hover { background: #f1f5f9; border-color: #cbd5e1; }

.ant-btn-white { background: #fff; border-color: #e5e7eb; color: #111827; }
.ant-btn-white:hover { border-color: #4f46e5; color: #4f46e5; }

.ant-btn-link { background: transparent; border-color: transparent; color: #4f46e5; padding-left: 0; padding-right: 0; }
.ant-btn-link:hover { color: #4338ca; text-decoration: underline; transform: none; box-shadow: none; }

.ant-btn-outline-secondary { background: transparent; border-color: #94a3b8; color: #555555; }
.ant-btn-outline-secondary:hover { border-color: #4f46e5; color: #4f46e5; }

.ant-btn-outline-primary { background: transparent; border-color: #4f46e5; color: #4f46e5; }
.ant-btn-outline-primary:hover { background: #4f46e5; color: #fff; }

.ant-btn-outline-danger { background: transparent; border-color: #dc2626; color: #dc2626; }
.ant-btn-outline-danger:hover { background: #dc2626; color: #fff; }

.ant-btn-outline-warning { background: transparent; border-color: #f59e0b; color: #b45309; }
.ant-btn-outline-warning:hover { background: #f59e0b; color: #fff; }

.ant-btn-outline-info { background: transparent; border-color: #0ea5e9; color: #0369a1; }
.ant-btn-outline-info:hover { background: #0ea5e9; color: #fff; }

.ant-btn-outline-light { background: transparent; border-color: #e2e8f0; color: #555555; }
.ant-btn-outline-light:hover { background: #f1f5f9; border-color: #cbd5e1; }

.ant-btn-outline-success { background: transparent; border-color: #16a34a; color: #15803d; }
.ant-btn-outline-success:hover { background: #16a34a; color: #fff; }

/* Ant-style close icon (replaces Bootstrap .btn-close visuals; data-bs-dismiss keeps working since it's attribute-driven) */
.ant-close {
    box-sizing: content-box; width: 1em; height: 1em; padding: 0.25em; color: #000;
    background: transparent url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23000'%3e%3cpath d='M.293.293a1 1 0 0 1 1.414 0L8 6.586 14.293.293a1 1 0 1 1 1.414 1.414L9.414 8l6.293 6.293a1 1 0 0 1-1.414 1.414L8 9.414l-6.293 6.293a1 1 0 0 1-1.414-1.414L6.586 8 .293 1.707a1 1 0 0 1 0-1.414z'/%3e%3c/svg%3e") center/1em auto no-repeat;
    border: 0; border-radius: 6px; opacity: 0.5;
}
.ant-close:hover { color: #000; opacity: 0.75; }
.ant-close:focus { outline: 0; box-shadow: 0 0 0 0.25rem rgba(79,70,229,0.25); opacity: 1; }
.ant-close-white { filter: invert(1) grayscale(100%) brightness(200%); }

/* ── Form Controls ── */
.form-control, .form-select { border-radius: 0.5rem; border: 1px solid #cbd5e1; padding: 0.5rem 0.75rem; font-size: 0.9rem; }
.form-control:focus, .form-select:focus { border-color: #4f46e5; box-shadow: 0 0 0 4px rgba(79,70,229,0.1); outline: none; }

/* ── Modals ── */
.modal-content { border: none; border-radius: 1rem; box-shadow: 0 25px 50px -12px rgb(0 0 0 / 0.25); }
.modal-header { border-bottom: 1px solid #f1f5f9; padding: 1.5rem; position: relative; }
.modal-header .btn-close, .modal-header .ant-close { position: absolute; right: 1.5rem; top: 1.5rem; margin: 0; }
.modal-footer { border-top: 1px solid #f1f5f9; padding: 1.25rem; }

/* ── Assignee / next-action badge ── */
.b-assignee, .b-next { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px 3px 3px; border-radius: 6px; font-size: 11px; font-weight: 600; border: none; white-space: nowrap; }
.b-assignee .av, .b-next .av { width: 18px; height: 18px; border-radius: 4px; display: flex; align-items: center; justify-content: center; font-size: 9px; font-weight: 700; flex-shrink: 0; }

/* ── Status badge ── */
.b-status {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 3px 9px; border-radius: 6px;
    font-size: 11px; font-weight: 600; letter-spacing: .01em; white-space: nowrap;
}
.b-status .dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; animation: dot-pulse 1.8s ease-in-out infinite; }
.b-status.status-is-closed .dot { display: none; }

/* ── Follow-up badge ── */
.b-fu {
    position: relative; overflow: hidden;
    display: inline-flex; align-items: center; gap: 5px;
    padding: 3px 9px; border-radius: 6px;
    font-size: 11px; font-weight: 600; white-space: nowrap !important;
    flex-shrink: 0; font-variant-numeric: tabular-nums;
}
.countdown-text { white-space: nowrap !important; display: inline-block; }
.b-fu .dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.b-fu.fu-now  { background: var(--fu-now-bg, #dc2626); color: var(--fu-now-text, #fff); }
.b-fu.fu-now  .dot { background: var(--fu-now-dot, #fca5a5); animation: dot-pulse 1.4s ease-in-out infinite; }
.b-fu.fu-now::after  { content: ''; position: absolute; top: 0; left: -70%; width: 55%; height: 100%; background: linear-gradient(90deg, transparent, rgba(255,255,255,.42), transparent); animation: shimmer 2s ease-in-out infinite; }
.b-fu.fu-soon { background: var(--fu-soon-bg, #d97706); color: var(--fu-soon-text, #fff); }
.b-fu.fu-soon .dot { background: var(--fu-soon-dot, #fde68a); animation: dot-pulse 2s ease-in-out infinite; }
.b-fu.fu-soon::after { content: ''; position: absolute; top: 0; left: -70%; width: 55%; height: 100%; background: linear-gradient(90deg, transparent, rgba(255,255,255,.35), transparent); animation: shimmer 2.5s ease-in-out infinite; }
.b-fu.fu-closed { background: transparent; color: var(--fu-closed-bg, #16a34a); padding: 0; }
.b-fu.fu-closed .dot { display: none; }
.b-fu.fu-closed::after { display: none; }

/* ── Time-remaining badge ── */
.b-time {
    display: inline-flex; align-items: center; gap: 5px;
    background: var(--fu-waiting-bg, #eff6ff); color: var(--fu-waiting-text, #1d4ed8);
    border-radius: 6px; padding: 3px 9px;
    font-size: 11px; font-weight: 600; border: 1px solid var(--fu-waiting-ring, #bfdbfe);
    font-variant-numeric: tabular-nums;
}
.b-time .ring { width: 8px; height: 8px; border-radius: 50%; border: 2px solid var(--fu-waiting-ring, #bfdbfe); border-top-color: var(--fu-waiting-ring-top, #3b82f6); flex-shrink: 0; animation: spin 1.1s linear infinite; }

/* ── Follow-up label ── */
.fu-label { font-size: 9.5px; color: #9ca3af; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; min-width: 24px; display: inline-block; }

/* ── Animations — see animations.css ── */

/* ── Pagination ── */
.ant-pg-btn { width:32px; height:32px; border-radius:8px; display:flex; align-items:center; justify-content:center; font-size:13px; flex-shrink:0; }
.ant-pg-btn-link { border:1px solid #e5e7eb; background:#fff; color:#374151; transition:background .15s; text-decoration:none; }
.ant-pg-btn-link:hover { background:#f3f4f6; color:#374151; }
.ant-pg-btn-disabled { border:1px solid #e5e7eb; background:#f9fafb; color:#9ca3af; cursor:default; pointer-events:none; }
.ant-pg-btn-active { background:#4f46e5; color:#fff; font-weight:600; border:none; }
.pg-dots { width:32px; height:32px; display:flex; align-items:center; justify-content:center; font-size:12px; color:#9ca3af; letter-spacing:1px; }

/* ── Custom Tooltip ── */
.tt-tip {
    position: fixed;
    z-index: 10020;
    background: #1a1a1a;
    color: #f1f5f9;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.45;
    padding: 5px 10px;
    border-radius: 6px;
    border: 1px solid #333;
    pointer-events: none;
    max-width: 260px;
    white-space: normal;
    word-break: break-word;
    box-shadow: 0 4px 14px rgba(0,0,0,0.6);
    visibility: hidden;
    opacity: 0;
    transition: opacity .12s ease;
    filter: none !important;
}
.tt-tip.tt-tip--show { visibility: visible; opacity: 1; }

/* ── Notifications ── */
:root {
    --tt-success: #22c55e;
    --tt-danger: #ef4444;
    --tt-warning: #f59e0b;
    --tt-primary: #3b82f6;
}
.tt-toast-wrap { position: fixed; top: 64px; right: 20px; z-index: 10010; display: flex; flex-direction: column; gap: 10px; pointer-events: none; }
.tt-toast {
    pointer-events: all;
    background: #fff; border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.12), 0 1px 4px rgba(0,0,0,0.06);
    display: flex; align-items: flex-start; gap: 12px;
    padding: 14px 14px 14px 16px; min-width: 280px; max-width: 360px;
    border-top: 3px solid var(--tt-success);
    opacity: 0; transform: translateY(8px);
    transition: opacity 0.2s ease, transform 0.2s ease, background .2s ease, border-color .2s ease;
}
.tt-toast.tt-show { opacity: 1; transform: translateY(0); }
.tt-toast.tt-hiding { opacity: 0; transform: translateY(8px); }
.tt-toast[data-type="success"] { border-top-color: var(--tt-success); }
.tt-toast[data-type="danger"]  { border-top-color: var(--tt-danger); }
.tt-toast[data-type="warning"] { border-top-color: var(--tt-warning); }
.tt-toast[data-type="primary"] { border-top-color: var(--tt-primary); }
.tt-toast-icon { width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0; font-size: 14px; }
.tt-toast[data-type="success"] .tt-toast-icon { background: color-mix(in srgb, var(--tt-success) 18%, white); color: color-mix(in srgb, var(--tt-success) 75%, black); }
.tt-toast[data-type="danger"]  .tt-toast-icon { background: color-mix(in srgb, var(--tt-danger) 18%, white);  color: color-mix(in srgb, var(--tt-danger) 75%, black); }
.tt-toast[data-type="warning"] .tt-toast-icon { background: color-mix(in srgb, var(--tt-warning) 18%, white); color: color-mix(in srgb, var(--tt-warning) 75%, black); }
.tt-toast[data-type="primary"] .tt-toast-icon { background: color-mix(in srgb, var(--tt-primary) 18%, white); color: color-mix(in srgb, var(--tt-primary) 75%, black); }
.tt-toast-body { flex: 1; min-width: 0; }
.tt-toast-title-row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.tt-toast-title { font-size: 13px; font-weight: 600; color: #141414; line-height: 1.4; }
.tt-toast-sub { font-size: 12px; color: #555555; margin-top: 2px; line-height: 1.4; }
.tt-toast-close { background: none; border: none; color: #9ca3af; cursor: pointer; font-size: 15px; padding: 0; line-height: 1; flex-shrink: 0; margin-top: 1px; transition: color 0.12s; }
.tt-toast-close:hover { color: #374151; }
.tt-toast-badge, .tt-toast-tag {
    font-size: 10px; font-weight: 600; padding: 2px 7px; border-radius: 999px; flex-shrink: 0; line-height: 1.5;
}
.tt-toast-action {
    background: none; border: none; font-size: 12px; font-weight: 600; cursor: pointer;
    flex-shrink: 0; padding: 0; margin-top: 1px; text-decoration: underline; text-underline-offset: 2px;
    color: var(--tt-primary);
}
.tt-toast[data-type="success"] .tt-toast-action { color: color-mix(in srgb, var(--tt-success) 70%, black); }
.tt-toast[data-type="danger"]  .tt-toast-action { color: color-mix(in srgb, var(--tt-danger) 70%, black); }
.tt-toast[data-type="warning"] .tt-toast-action { color: color-mix(in srgb, var(--tt-warning) 70%, black); }
.tt-toast[data-type="primary"] .tt-toast-action { color: color-mix(in srgb, var(--tt-primary) 70%, black); }

/* ── Toast style variants (selectable in Settings → Toast Notifications) ── */

/* 2 · minimal pill */
.tt-toast[data-style="2"] { border-radius: 999px; border-top: none; align-items: center; padding: 10px 16px 10px 14px; }
.tt-toast[data-style="2"] .tt-toast-icon { width: 8px; height: 8px; margin-top: 0; }
.tt-toast[data-style="2"] .tt-toast-icon i { display: none; }
.tt-toast[data-style="2"][data-type="success"] .tt-toast-icon { background: var(--tt-success); }
.tt-toast[data-style="2"][data-type="danger"]  .tt-toast-icon { background: var(--tt-danger); }
.tt-toast[data-style="2"][data-type="warning"] .tt-toast-icon { background: var(--tt-warning); }
.tt-toast[data-style="2"][data-type="primary"] .tt-toast-icon { background: var(--tt-primary); }

/* 3 · success green fill */
.tt-toast[data-style="3"] { border: 1px solid; border-top-width: 1px; box-shadow: none; }
.tt-toast[data-style="3"] .tt-toast-icon { background: transparent; border: 1.5px solid; width: 24px; height: 24px; }
.tt-toast[data-style="3"][data-type="success"] { background: color-mix(in srgb, var(--tt-success) 12%, white); border-color: color-mix(in srgb, var(--tt-success) 45%, white); }
.tt-toast[data-style="3"][data-type="danger"]  { background: color-mix(in srgb, var(--tt-danger) 12%, white);  border-color: color-mix(in srgb, var(--tt-danger) 45%, white); }
.tt-toast[data-style="3"][data-type="warning"] { background: color-mix(in srgb, var(--tt-warning) 12%, white); border-color: color-mix(in srgb, var(--tt-warning) 45%, white); }
.tt-toast[data-style="3"][data-type="primary"] { background: color-mix(in srgb, var(--tt-primary) 12%, white); border-color: color-mix(in srgb, var(--tt-primary) 45%, white); }
.tt-toast[data-style="3"][data-type="success"] .tt-toast-title, .tt-toast[data-style="3"][data-type="success"] .tt-toast-icon { color: color-mix(in srgb, var(--tt-success) 55%, black); border-color: color-mix(in srgb, var(--tt-success) 55%, black); }
.tt-toast[data-style="3"][data-type="danger"]  .tt-toast-title, .tt-toast[data-style="3"][data-type="danger"]  .tt-toast-icon { color: color-mix(in srgb, var(--tt-danger) 55%, black);  border-color: color-mix(in srgb, var(--tt-danger) 55%, black); }
.tt-toast[data-style="3"][data-type="warning"] .tt-toast-title, .tt-toast[data-style="3"][data-type="warning"] .tt-toast-icon { color: color-mix(in srgb, var(--tt-warning) 55%, black); border-color: color-mix(in srgb, var(--tt-warning) 55%, black); }
.tt-toast[data-style="3"][data-type="primary"] .tt-toast-title, .tt-toast[data-style="3"][data-type="primary"] .tt-toast-icon { color: color-mix(in srgb, var(--tt-primary) 55%, black); border-color: color-mix(in srgb, var(--tt-primary) 55%, black); }

/* 4 · left accent bar */
.tt-toast[data-style="4"] { border-top: none; border-left-width: 4px; border-left-style: solid; padding-left: 12px; }
.tt-toast[data-style="4"][data-type="success"] { border-left-color: var(--tt-success); }
.tt-toast[data-style="4"][data-type="danger"]  { border-left-color: var(--tt-danger); }
.tt-toast[data-style="4"][data-type="warning"] { border-left-color: var(--tt-warning); }
.tt-toast[data-style="4"][data-type="primary"] { border-left-color: var(--tt-primary); }

/* 5 · dark / inverted (always dark, regardless of theme) */
.tt-toast[data-style="5"] { background: #111827 !important; border-top: none; box-shadow: 0 4px 20px rgba(0,0,0,.5); }
.tt-toast[data-style="5"] .tt-toast-title { color: #e5e7eb !important; }
.tt-toast[data-style="5"] .tt-toast-sub { color: #9ca3af !important; }
.tt-toast[data-style="5"] .tt-toast-close { color: #6b7280 !important; }
.tt-toast[data-style="5"] .tt-toast-icon { background: transparent; border: 1.5px solid; width: 24px; height: 24px; }
.tt-toast[data-style="5"][data-type="success"] .tt-toast-icon { border-color: var(--tt-success); color: var(--tt-success); }
.tt-toast[data-style="5"][data-type="danger"]  .tt-toast-icon { border-color: var(--tt-danger);  color: var(--tt-danger); }
.tt-toast[data-style="5"][data-type="warning"] .tt-toast-icon { border-color: var(--tt-warning); color: var(--tt-warning); }
.tt-toast[data-style="5"][data-type="primary"] .tt-toast-icon { border-color: var(--tt-primary); color: var(--tt-primary); }

/* 6 · outlined border */
.tt-toast[data-style="6"] { border: 1px solid; box-shadow: none; }
.tt-toast[data-style="6"][data-type="success"] { border-color: var(--tt-success); }
.tt-toast[data-style="6"][data-type="danger"]  { border-color: var(--tt-danger); }
.tt-toast[data-style="6"][data-type="warning"] { border-color: var(--tt-warning); }
.tt-toast[data-style="6"][data-type="primary"] { border-color: var(--tt-primary); }

/* 7 · soft tint */
.tt-toast[data-style="7"] { border-top: none; }
.tt-toast[data-style="7"] .tt-toast-icon { background: transparent; }
.tt-toast[data-style="7"][data-type="success"] { background: color-mix(in srgb, var(--tt-success) 16%, white); }
.tt-toast[data-style="7"][data-type="danger"]  { background: color-mix(in srgb, var(--tt-danger) 16%, white); }
.tt-toast[data-style="7"][data-type="warning"] { background: color-mix(in srgb, var(--tt-warning) 16%, white); }
.tt-toast[data-style="7"][data-type="primary"] { background: color-mix(in srgb, var(--tt-primary) 16%, white); }
.tt-toast[data-style="7"][data-type="success"] .tt-toast-title, .tt-toast[data-style="7"][data-type="success"] .tt-toast-icon { color: color-mix(in srgb, var(--tt-success) 60%, black); }
.tt-toast[data-style="7"][data-type="danger"]  .tt-toast-title, .tt-toast[data-style="7"][data-type="danger"]  .tt-toast-icon { color: color-mix(in srgb, var(--tt-danger) 60%, black); }
.tt-toast[data-style="7"][data-type="warning"] .tt-toast-title, .tt-toast[data-style="7"][data-type="warning"] .tt-toast-icon { color: color-mix(in srgb, var(--tt-warning) 60%, black); }
.tt-toast[data-style="7"][data-type="primary"] .tt-toast-title, .tt-toast[data-style="7"][data-type="primary"] .tt-toast-icon { color: color-mix(in srgb, var(--tt-primary) 60%, black); }

/* 8 · top bar + timestamp */
.tt-toast[data-style="8"] { border-top-width: 2px; }
.tt-toast[data-style="8"] .tt-toast-sub { margin-top: 4px; opacity: .75; }

/* 9 · pill + badge */
.tt-toast[data-style="9"] { border-radius: 999px; border-top: none; align-items: center; padding: 10px 14px 10px 12px; }
.tt-toast[data-style="9"] .tt-toast-badge { display: inline-block; }
.tt-toast[data-style="9"][data-type="success"] .tt-toast-badge { background: color-mix(in srgb, var(--tt-success) 20%, white); color: color-mix(in srgb, var(--tt-success) 60%, black); }
.tt-toast[data-style="9"][data-type="danger"]  .tt-toast-badge { background: color-mix(in srgb, var(--tt-danger) 20%, white);  color: color-mix(in srgb, var(--tt-danger) 60%, black); }
.tt-toast[data-style="9"][data-type="warning"] .tt-toast-badge { background: color-mix(in srgb, var(--tt-warning) 20%, white); color: color-mix(in srgb, var(--tt-warning) 60%, black); }
.tt-toast[data-style="9"][data-type="primary"] .tt-toast-badge { background: color-mix(in srgb, var(--tt-primary) 20%, white); color: color-mix(in srgb, var(--tt-primary) 60%, black); }

/* 10 · action toast (undo) */
.tt-toast[data-style="10"] { align-items: center; }
.tt-toast[data-style="10"][data-type="success"] .tt-toast-action { color: var(--tt-success); }
.tt-toast[data-style="10"][data-type="danger"]  .tt-toast-action { color: var(--tt-danger); }
.tt-toast[data-style="10"][data-type="warning"] .tt-toast-action { color: var(--tt-warning); }
.tt-toast[data-style="10"][data-type="primary"] .tt-toast-action { color: var(--tt-primary); }

/* 11 · rich context (avatar) */
.tt-toast[data-style="11"] .tt-toast-avatar { font-size: 12px; font-weight: 700; color: #fff; }
.tt-toast[data-style="11"][data-type="success"] .tt-toast-avatar { background: var(--tt-success); }
.tt-toast[data-style="11"][data-type="danger"]  .tt-toast-avatar { background: var(--tt-danger); }
.tt-toast[data-style="11"][data-type="warning"] .tt-toast-avatar { background: var(--tt-warning); }
.tt-toast[data-style="11"][data-type="primary"] .tt-toast-avatar { background: var(--tt-primary); }

/* 12 · color strip + tag */
.tt-toast[data-style="12"] { border-top: none; border-left-width: 4px; border-left-style: solid; padding-left: 12px; }
.tt-toast[data-style="12"] .tt-toast-tag { display: inline-block; }
.tt-toast[data-style="12"][data-type="success"] { border-left-color: var(--tt-success); }
.tt-toast[data-style="12"][data-type="danger"]  { border-left-color: var(--tt-danger); }
.tt-toast[data-style="12"][data-type="warning"] { border-left-color: var(--tt-warning); }
.tt-toast[data-style="12"][data-type="primary"] { border-left-color: var(--tt-primary); }
.tt-toast[data-style="12"][data-type="success"] .tt-toast-tag { background: color-mix(in srgb, var(--tt-success) 20%, white); color: color-mix(in srgb, var(--tt-success) 60%, black); }
.tt-toast[data-style="12"][data-type="danger"]  .tt-toast-tag { background: color-mix(in srgb, var(--tt-danger) 20%, white);  color: color-mix(in srgb, var(--tt-danger) 60%, black); }
.tt-toast[data-style="12"][data-type="warning"] .tt-toast-tag { background: color-mix(in srgb, var(--tt-warning) 20%, white); color: color-mix(in srgb, var(--tt-warning) 60%, black); }
.tt-toast[data-style="12"][data-type="primary"] .tt-toast-tag { background: color-mix(in srgb, var(--tt-primary) 20%, white); color: color-mix(in srgb, var(--tt-primary) 60%, black); }

/* 13 · bold card (left bar + solid icon, bold title) */
.tt-toast[data-style="13"] { border-top: none; border-left-width: 4px; border-left-style: solid; padding-left: 14px; align-items: center; }
.tt-toast[data-style="13"] .tt-toast-title { font-weight: 700; font-size: 14px; }
.tt-toast[data-style="13"] .tt-toast-icon { color: #fff; }
.tt-toast[data-style="13"][data-type="success"] { border-left-color: var(--tt-success); }
.tt-toast[data-style="13"][data-type="danger"]  { border-left-color: var(--tt-danger); }
.tt-toast[data-style="13"][data-type="warning"] { border-left-color: var(--tt-warning); }
.tt-toast[data-style="13"][data-type="primary"] { border-left-color: var(--tt-primary); }
.tt-toast[data-style="13"][data-type="success"] .tt-toast-icon { background: var(--tt-success); }
.tt-toast[data-style="13"][data-type="danger"]  .tt-toast-icon { background: var(--tt-danger); }
.tt-toast[data-style="13"][data-type="warning"] .tt-toast-icon { background: var(--tt-warning); }
.tt-toast[data-style="13"][data-type="primary"] .tt-toast-icon { background: var(--tt-primary); }

/* 14 · tinted card + bordered action button */
.tt-toast[data-style="14"] { border-top: none; border-left-width: 4px; border-left-style: solid; padding-left: 14px; align-items: center; }
.tt-toast[data-style="14"] .tt-toast-title { font-weight: 700; }
.tt-toast[data-style="14"] .tt-toast-icon { color: #fff; }
.tt-toast[data-style="14"] .tt-toast-action {
    border: 1px solid; border-radius: 6px; padding: 5px 12px; text-decoration: none;
    font-weight: 600; background: transparent; margin-top: 0;
}
.tt-toast[data-style="14"][data-type="success"] { border-left-color: var(--tt-success); background: color-mix(in srgb, var(--tt-success) 10%, white); }
.tt-toast[data-style="14"][data-type="danger"]  { border-left-color: var(--tt-danger);  background: color-mix(in srgb, var(--tt-danger) 10%, white); }
.tt-toast[data-style="14"][data-type="warning"] { border-left-color: var(--tt-warning); background: color-mix(in srgb, var(--tt-warning) 10%, white); }
.tt-toast[data-style="14"][data-type="primary"] { border-left-color: var(--tt-primary); background: color-mix(in srgb, var(--tt-primary) 10%, white); }
.tt-toast[data-style="14"][data-type="success"] .tt-toast-icon { background: var(--tt-success); }
.tt-toast[data-style="14"][data-type="danger"]  .tt-toast-icon { background: var(--tt-danger); }
.tt-toast[data-style="14"][data-type="warning"] .tt-toast-icon { background: var(--tt-warning); }
.tt-toast[data-style="14"][data-type="primary"] .tt-toast-icon { background: var(--tt-primary); }
.tt-toast[data-style="14"][data-type="success"] .tt-toast-title, .tt-toast[data-style="14"][data-type="success"] .tt-toast-action { color: color-mix(in srgb, var(--tt-success) 55%, black); border-color: color-mix(in srgb, var(--tt-success) 55%, black); }
.tt-toast[data-style="14"][data-type="danger"]  .tt-toast-title, .tt-toast[data-style="14"][data-type="danger"]  .tt-toast-action { color: color-mix(in srgb, var(--tt-danger) 55%, black);  border-color: color-mix(in srgb, var(--tt-danger) 55%, black); }
.tt-toast[data-style="14"][data-type="warning"] .tt-toast-title, .tt-toast[data-style="14"][data-type="warning"] .tt-toast-action { color: color-mix(in srgb, var(--tt-warning) 55%, black); border-color: color-mix(in srgb, var(--tt-warning) 55%, black); }
.tt-toast[data-style="14"][data-type="primary"] .tt-toast-title, .tt-toast[data-style="14"][data-type="primary"] .tt-toast-action { color: color-mix(in srgb, var(--tt-primary) 55%, black); border-color: color-mix(in srgb, var(--tt-primary) 55%, black); }

/* 15 · compact list row (no icon, link-style action) */
.tt-toast[data-style="15"] { border-top: none; border-left-width: 3px; border-left-style: solid; padding-left: 12px; align-items: center; }
.tt-toast[data-style="15"] .tt-toast-icon { display: none; }
.tt-toast[data-style="15"] .tt-toast-title { font-weight: 700; }
.tt-toast[data-style="15"][data-type="success"] { border-left-color: var(--tt-success); }
.tt-toast[data-style="15"][data-type="danger"]  { border-left-color: var(--tt-danger); }
.tt-toast[data-style="15"][data-type="warning"] { border-left-color: var(--tt-warning); }
.tt-toast[data-style="15"][data-type="primary"] { border-left-color: var(--tt-primary); }

/* ── Sidebar ── */
/* ── Sidebar panels (dual-panel swap: main ↔ settings) ── */
.sb-panel { display: none; flex-direction: column; flex: 1; min-height: 0; }
.sb-panel.sb-panel-active { display: flex; }
.sb-panel.sb-panel-entering { display: flex; animation: sb-slide-in 0.22s cubic-bezier(0.4,0,0.2,1) forwards; }
.sb-panel.sb-panel-entering-back { display: flex; animation: sb-slide-in-back 0.22s cubic-bezier(0.4,0,0.2,1) forwards; }
@keyframes sb-slide-in      { from { opacity:0; transform:translateX(14px); } to { opacity:1; transform:translateX(0); } }
@keyframes sb-slide-in-back { from { opacity:0; transform:translateX(-14px); } to { opacity:1; transform:translateX(0); } }
/* Back button in settings brand (inherits .sb-brand-icon box; overrides anchor/div defaults) */
.ant-sb-back-btn { border: none; padding: 0; cursor: pointer; transition: background 0.15s, color 0.15s; }
.ant-sb-back-btn:hover { background: #1246b5 !important; }

.sidebar { width: 200px; flex-shrink: 0; border-right: 1px solid #e5e7eb; display: flex; flex-direction: column; padding: 16px 0; background: #fff; height: 100vh; overflow-y: auto; overflow-x: hidden; scrollbar-width: none; transition: width 0.22s cubic-bezier(0.4,0,0.2,1); }
.sidebar::-webkit-scrollbar { display: none; }
.sidebar.no-transition { transition: none !important; }
.sidebar.collapsed { width: 52px; }
.sidebar.collapsed .sb-text { display: none !important; }
.sidebar.collapsed .sb-item { justify-content: center; padding-left: 0; padding-right: 0; gap: 0; }
.sidebar.collapsed .sb-item i { width: auto; }
.sidebar.collapsed .sb-section { padding: 0 4px; }
.sidebar.collapsed .sb-bottom { padding: 0 4px; padding-top: 12px; }
.sb-brand { display: flex; align-items: center; gap: 9px; padding: 0 10px 20px 12px; flex-shrink: 0; }
.sb-brand-icon { width: 32px; height: 32px; border-radius: 8px; background: #1654D1; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 15px; flex-shrink: 0; }
.sb-brand-name { font-size: 14px; font-weight: 700; color: #1f2937; }
.ant-sb-toggle-btn { position: fixed; top: 18px; left: 200px; z-index: 300; width: 18px; height: 30px; border: none; border-radius: 0 10px 10px 0; background: #1654D1; cursor: pointer; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 15px; font-weight: 700; box-shadow: 2px 0 4px rgba(0,0,0,0.2); transition: left 0.22s cubic-bezier(0.4,0,0.2,1), background 0.12s; }
.ant-sb-toggle-btn:hover { background: #1246b5; }
.sb-section { padding: 0 8px; margin-bottom: 4px; }
.sb-label { font-size: 10.5px; font-weight: 700; color: #9ca3af; text-transform: uppercase; letter-spacing: 0.06em; padding: 0 8px; margin-bottom: 4px; margin-top: 12px; display: block; }
.sb-item { display: flex; align-items: center; gap: 9px; padding: 7px 10px; border-radius: 6px; font-size: 13px; color: #4b5563; cursor: pointer; transition: background 0.12s; text-decoration: none; }
.sb-item:hover { background: #f9fafb; color: #1f2937; }
.sb-item.active { background: #EFF6FF; color: #1654D1; font-weight: 600; }
.sb-item i { font-size: 15px; flex-shrink: 0; width: 18px; text-align: center; }
.sb-item-danger { color: #dc2626 !important; }
.sb-item-danger:hover { background: #fff5f5 !important; }
.sb-count { margin-left: auto; background: #1654D1; color: #fff; font-size: 10px; font-weight: 700; border-radius: 20px; padding: 1px 7px; }
.sb-bottom { margin-top: auto; padding: 0 8px; border-top: 1px solid #e5e7eb; padding-top: 12px; flex-shrink: 0; }
/* Collapsed: center the brand icon, slide the edge toggle button to match */
.sidebar.collapsed .sb-brand { justify-content: center; padding-left: 4px; padding-right: 4px; }
.sidebar.collapsed ~ .ant-sb-toggle-btn { left: 52px; }

/* ── Topbar ── */
.topbar { display: flex; align-items: center; gap: 12px; padding: 10px 20px; border-bottom: 1px solid #e5e7eb; background: #fff; flex-shrink: 0; }
.topbar-title { font-size: 18px; font-weight: 700; color: #1f2937; white-space: nowrap; margin-left: 8px; }
.topbar-title-mobile { display: none; }
.topbar-search { flex: 1; max-width: 420px; position: relative; }
.topbar-search form { position: relative; display: flex; align-items: center; }
.topbar-search input { width: 100%; border: 1px solid #e5e7eb; border-radius: 8px; padding: 7px 30px 7px 32px; font-size: 13px; color: #374151; outline: none; background: #f9fafb; font-family: inherit; }
.topbar-search input:focus { border-color: #1654D1; background: #fff; box-shadow: 0 0 0 3px rgba(22,84,209,0.1); }
.topbar-search-icon { position: absolute; left: 10px; color: #9ca3af; font-size: 14px; pointer-events: none; z-index: 1; }
.topbar-clear { position: absolute; right: 8px; color: #9ca3af; font-size: 14px; text-decoration: none; line-height: 1; }
.topbar-clear:hover { color: #6b7280; }
.topbar-spacer { flex: 1; }
.topbar-bell { width: 34px; height: 34px; border-radius: 8px; border: 1px solid #e5e7eb; display: flex; align-items: center; justify-content: center; cursor: pointer; color: #6b7280; font-size: 16px; text-decoration: none; position: relative; flex-shrink: 0; background: #fff; }
.topbar-bell:hover { background: #f9fafb; color: #374151; }
.topbar-bell.rml-active { background: #fff7ed; border-color: #fed7aa; color: #f59e0b; }
.ant-topbar-darkmode-btn { width: 34px; height: 34px; border-radius: 8px; border: 1px solid #e5e7eb; display: flex; align-items: center; justify-content: center; cursor: pointer; color: #6b7280; font-size: 16px; flex-shrink: 0; background: #fff; transition: background 0.15s, color 0.15s, border-color 0.15s; }
.ant-topbar-darkmode-btn:hover { background: #f9fafb; color: #374151; }
body.dark-mode .ant-topbar-darkmode-btn { background: #141414; border-color: #2c2c2c; color: #f1c40f; }
.topbar-badge-bell { position: absolute; top: -5px; right: -5px; background: #1654D1; color: #fff; font-size: 9px; font-weight: 700; border-radius: 10px; padding: 1px 5px; min-width: 16px; text-align: center; line-height: 14px; }
.ant-topbar-user-btn { display: flex; align-items: center; gap: 7px; padding: 4px 10px 4px 4px; border: 1px solid #e5e7eb; border-radius: 8px; cursor: pointer; background: #fff; }
.ant-topbar-user-btn:hover { background: #f9fafb; border-color: #d1d5db; }
.topbar-avatar { width: 26px; height: 26px; border-radius: 50%; color: #fff; font-size: 11px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.topbar-username { font-size: 13px; font-weight: 500; color: #374151; }
.hdr-dd-item { display: block; padding: 8px 16px; font-size: 13px; font-weight: 600; color: #000000; text-decoration: none; transition: background 0.12s; }
.hdr-dd-item:hover { background: #f8fafc; color: #000000; }
.hdr-dd-danger { color: #ef4444 !important; }
.hdr-dd-danger:hover { background: #fff5f5 !important; }

/* ── Shared action buttons (used in modals across the app) ── */
.ant-tg-btn-primary { display:inline-flex; align-items:center; gap:6px; height:32px; background:#1D4ED8; color:#fff; border:none; border-radius:7px; padding:0 14px; font-size:13px; font-weight:600; cursor:pointer; box-shadow:0 1px 4px rgba(29,78,216,0.22); transition:background 0.15s, box-shadow 0.15s; white-space:nowrap; }
.ant-tg-btn-primary:hover { background:#1e40af; box-shadow:0 2px 10px rgba(29,78,216,0.32); }
.ant-tg-btn-primary i { font-size:13px; }
.ant-tg-btn-ghost { display:inline-flex; align-items:center; gap:6px; background:#fff; color:#374151; border:1px solid #e5e7eb; border-radius:6px; padding:6px 14px; font-size:13px; font-weight:500; cursor:pointer; transition:background 0.12s; white-space:nowrap; }
.ant-tg-btn-ghost:hover { background:#f9fafb; border-color:#d1d5db; }

/* ── Notification sidebar panel — slides in from the right ── */
#notifModal .notif-sidebar-dialog {
    position:fixed; top:0; right:0; margin:0; max-width:420px; width:100%; height:100vh;
    transform:translateX(100%); transition:transform .3s ease-out;
}
#notifModal.show .notif-sidebar-dialog { transform:translateX(0); }
.notif-sidebar-content {
    height:100%; border-radius:0; overflow:hidden; border:none; box-shadow:-8px 0 40px rgba(0,0,0,0.25);
    display:flex; flex-direction:column; background:#fff;
}
.notif-sidebar-header {
    display:flex; align-items:center; justify-content:space-between;
    padding:16px 20px; border-bottom:1px solid #e2e8f0; flex-shrink:0; background:#fff;
}
.notif-sidebar-title-row { display:flex; align-items:center; gap:12px; }
.notif-sidebar-bell-icon {
    width:36px; height:36px; border-radius:10px; background:#4f46e5;
    display:flex; align-items:center; justify-content:center; flex-shrink:0;
}
.notif-sidebar-bell-icon i { font-size:16px; color:#fff; }
.notif-sidebar-title { font-size:17px; font-weight:700; color:#000000; margin:0; }
.notif-sidebar-header-actions { display:flex; align-items:center; gap:14px; }
.notif-sidebar-mark-all {
    font-size:13px; font-weight:600; color:#4f46e5; background:none; border:none;
    cursor:pointer; padding:0; white-space:nowrap;
}
.notif-sidebar-mark-all:hover { color:#4338ca; text-decoration:underline; }
.notif-sidebar-close {
    background:#f1f5f9; border:none; color:#555555; width:32px; height:32px;
    border-radius:8px; display:flex; align-items:center; justify-content:center;
    font-size:14px; transition:background .15s, color .15s; flex-shrink:0;
}
.notif-sidebar-close:hover { background:#e2e8f0; color:#2c2c2c; }

.notif-sidebar-body { flex:1; min-height:0; overflow:hidden; }
.notif-sidebar-feed { height:100%; overflow-y:auto; background:#fff; padding:8px; }
.notif-sidebar-empty { padding:40px 16px; text-align:center; color:#94a3b8; font-size:13px; }

.notif-sidebar-card {
    display:flex; align-items:flex-start; gap:12px; padding:14px 16px;
    border:1px solid #e2e8f0; border-radius:12px; margin-bottom:8px;
    cursor:pointer; position:relative; transition:background 0.1s;
}
.notif-sidebar-card:last-child { margin-bottom:0; }
.notif-sidebar-card:hover { background:#f8fafc; }
.notif-sidebar-card.unread { background:#fafbff; border-color:#e0e7ff; }
.notif-sidebar-card.unread .notif-sidebar-card-dot {
    position:absolute; top:16px; right:16px; width:8px; height:8px;
    border-radius:50%; background:#4f46e5;
}

.notif-sidebar-card-icon {
    width:40px; height:40px; border-radius:10px; background:#f0f5ff;
    display:flex; align-items:center; justify-content:center; flex-shrink:0;
}
.notif-sidebar-card-icon img { width:24px; height:24px; object-fit:contain; }
.notif-sidebar-card-icon i { font-size:18px; color:#555555; }

.notif-sidebar-card-body { flex:1; min-width:0; }
.notif-sidebar-card-badge {
    display:inline-block; font-size:10px; font-weight:700; text-transform:uppercase;
    letter-spacing:0.04em; padding:3px 8px; border-radius:4px; margin-bottom:6px;
}
.notif-sidebar-card-badge.badge-mention { background:#ede9fe; color:#7c3aed; }
.notif-sidebar-card-badge.badge-created { background:#eff6ff; color:#2563eb; }
.notif-sidebar-card-badge.badge-comment { background:#eff6ff; color:#2563eb; }
.notif-sidebar-card-badge.badge-update { background:#dcfce7; color:#16a34a; }
.notif-sidebar-card-badge.badge-deleted { background:#fef2f2; color:#dc2626; }
.notif-sidebar-card-badge.badge-restored { background:#fefce8; color:#ca8a04; }
.notif-sidebar-card-badge.badge-reminder { background:#fefce8; color:#d97706; }
.notif-sidebar-card-badge.badge-sla { background:#fef2f2; color:#dc2626; }
.notif-sidebar-card-badge.badge-sla-warn { background:#fefce8; color:#d97706; }
.notif-sidebar-card-badge.badge-note { background:#f0fdf4; color:#16a34a; }
.notif-sidebar-card-badge.badge-edit-req { background:#fef2f2; color:#dc2626; }

.notif-sidebar-card-text {
    font-size:13px; font-weight:500; color:#2c2c2c; line-height:1.45;
    display:-webkit-box; -webkit-line-clamp:3; -webkit-box-orient:vertical; overflow:hidden;
}
.notif-sidebar-card-text b, .notif-page-card-text b { font-weight: 800; color: #111111; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; }
body.dark-mode .notif-sidebar-card-text b, body.dark-mode .notif-page-card-text b { color: #ffffff; }
.notif-sidebar-card-mention {
    font-size:12px; font-weight:600; color:#4f46e5; margin-top:4px;
}
.notif-sidebar-card-time {
    font-size:11px; color:#94a3b8; margin-top:4px;
}
.notif-sidebar-card-status {
    display:flex; align-items:center; gap:6px; margin-top:6px; flex-wrap:wrap;
}
.notif-sidebar-card-status-label { font-size:11px; color:#555555; font-weight:500; }
.notif-sidebar-card-status-badge {
    font-size:10px; font-weight:600; padding:2px 8px; border-radius:4px;
}
.notif-sidebar-card-status-badge.status-pending { background:#fefce8; color:#ca8a04; border:1px solid #fde68a; }
.notif-sidebar-card-status-badge.status-troubleshoot { background:#ede9fe; color:#7c3aed; border:1px solid #c4b5fd; }
.notif-sidebar-card-status-badge.status-progress { background:#eff6ff; color:#2563eb; border:1px solid #bfdbfe; }
.notif-sidebar-card-status-badge.status-done { background:#dcfce7; color:#16a34a; border:1px solid #bbf7d0; }
.notif-sidebar-card-status-arrow { font-size:12px; color:#94a3b8; }

.notif-sidebar-footer {
    display:flex; align-items:center; justify-content:space-between;
    padding:14px 20px; border-top:1px solid #e2e8f0; background:#f8fafc; flex-shrink:0;
}
.notif-sidebar-footer-left { display:flex; align-items:center; gap:8px; font-size:12px; color:#555555; font-weight:500; }
.notif-sidebar-footer-left i { font-size:14px; color:#94a3b8; }
.notif-sidebar-view-all {
    font-size:12px; font-weight:600; color:#4f46e5; text-decoration:none;
    display:inline-flex; align-items:center; gap:4px; padding:6px 14px;
    border:1.5px solid #c7d2fe; border-radius:8px; background:#fff;
    transition:background .15s, border-color .15s;
}
.notif-sidebar-view-all:hover { background:#eef2ff; border-color:#a5b4fc; }
.notif-sidebar-view-all i { font-size:11px; }

/* ── Notification sidebar — mobile ── */
@media (max-width: 768px) {
    #notifModal.modal { overflow:hidden !important; }
    #notifModal .notif-sidebar-dialog { height:100dvh; height:100vh; }
    .notif-sidebar-content { height:100%; }
    .notif-sidebar-footer {
        padding-bottom: calc(14px + env(safe-area-inset-bottom, 0px));
    }
    #announceModal.modal { overflow:hidden !important; }
    #announceModal .ann-modal-dialog { height:100dvh; height:100vh; }
    .ann-modal-content { height:100%; }
}

/* ── "What's New" announcements panel — slides in from the right edge,
   full viewport height, matching notification sidebar layout. ── */
#announceModal.modal { padding-right:0 !important; }
#announceModal .ann-modal-dialog {
    position:fixed; top:0; right:0; margin:0; max-width:420px; width:100%; height:100vh;
    transform:translateX(100%); transition:transform .3s ease-out;
}
#announceModal.show .ann-modal-dialog { transform:translateX(0); }
.ann-modal-content {
    height:100%; border-radius:0; overflow:hidden; border:none; box-shadow:-8px 0 40px rgba(0,0,0,0.25);
    display:flex; flex-direction:column; background:#fff;
}
.ann-bell-icon { background:#7c3aed !important; }
.ann-bell-icon i { font-size:15px !important; }
.ann-header .notif-sidebar-title { font-size:16px; }
.ann-body-wrap { background:#f8fafc; }
.ann-footer { background:#f8fafc; }

.ann-feed { height:100%; overflow-y:auto; background:#f8fafc; padding:8px; }
.ann-feed-loading-more { display:flex; justify-content:center; padding:18px; }

/* ── Announcement cards — matching notification card structure ── */
.ann-card {
    display:flex; align-items:flex-start; gap:12px; padding:14px 16px;
    border:1px solid #e2e8f0; border-radius:12px; margin-bottom:8px;
    cursor:pointer; position:relative; background:#fff; transition:background 0.1s;
}
.ann-card:last-child { margin-bottom:0; }
.ann-card:hover { background:#f8fafc; }
.ann-card.unread { background:#fafbff; border-color:#e0e7ff; }
.ann-card.unread .ann-card-dot {
    position:absolute; top:16px; right:16px; width:8px; height:8px;
    border-radius:50%; background:#7c3aed;
}
.ann-card-icon {
    width:40px; height:40px; border-radius:10px; background:#f1f5f9;
    display:flex; align-items:center; justify-content:center; flex-shrink:0;
}
.ann-card-icon img { width:30px; height:30px; object-fit:contain; }
.ann-card-icon i { font-size:18px; color:#7c3aed; }
.ann-card-body { flex:1; min-width:0; }
.ann-card-badge {
    display:inline-block; font-size:10px; font-weight:700; text-transform:uppercase;
    letter-spacing:0.04em; padding:3px 8px; border-radius:4px; margin-bottom:6px;
    background:#ede9fe; color:#7c3aed;
}
.ann-card-badge.badge-release { background:#dcfce7; color:#16a34a; }
.ann-card-badge.badge-update { background:#eff6ff; color:#2563eb; }
.ann-card-badge.badge-fix { background:#fef2f2; color:#dc2626; }
.ann-card-title {
    font-size:13px; font-weight:600; color:#000000; line-height:1.45;
    display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden;
}
.ann-card-excerpt {
    font-size:12px; color:#555555; line-height:1.45; margin-top:3px;
    display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden;
}
.ann-card-time {
    font-size:11px; color:#94a3b8; margin-top:4px;
}

/* Rich content inside expanded announcement cards */
.ann-body { font-size:13.5px; color:#555555; line-height:1.6; margin:0; padding:12px 0 0; }
.ann-body p { margin:0 0 10px; }
.ann-body p:last-child { margin-bottom:0; }
.ann-body ul, .ann-body ol { margin:0 0 10px; padding-left:22px; }
.ann-body li { margin-bottom:4px; }
.ann-body .ann-h { font-weight:800; color:#000000; line-height:1.35; margin:14px 0 6px; }
.ann-body .ann-h:first-child { margin-top:0; }
.ann-body h1.ann-h { font-size:18px; } .ann-body h2.ann-h { font-size:16.5px; }
.ann-body h3.ann-h { font-size:15px; }  .ann-body h4.ann-h,
.ann-body h5.ann-h, .ann-body h6.ann-h { font-size:13.5px; }
.ann-body .ann-quote { border-left:3px solid #cbd5e1; padding:6px 14px; margin:0 0 10px; font-style:italic; color:#2c2c2c; }
.ann-body .ann-quote footer { font-size:11.5px; font-style:normal; color:#94a3b8; margin-top:3px; }
.ann-body .ann-hr { border:none; border-top:1px solid #e2e8f0; margin:14px 0; }
.ann-body mark { background:#fef08a; padding:1px; border-radius:2px; }
.ann-body .ann-inline-image { margin:6px 0; }
.ann-body .ann-image-caption { font-size:11.5px; color:#94a3b8; text-align:center; margin:4px 0 10px; }
.ann-body .ann-checklist { list-style:none; margin:0 0 10px; padding:0; }
.ann-body .ann-checklist li { display:flex; align-items:flex-start; gap:7px; margin-bottom:5px; }
.ann-body .ann-checklist li i { color:#94a3b8; margin-top:2px; flex-shrink:0; }
.ann-body .ann-checklist li.checked { color:#94a3b8; text-decoration:line-through; }
.ann-body .ann-checklist li.checked i { color:#4f46e5; }
.ann-body .ann-warning { display:flex; gap:10px; padding:12px 14px; border-radius:8px; border-left:4px solid #f59e0b; background:#fffbeb; margin:0 0 10px; }
.ann-body .ann-warning i { color:#f59e0b; margin-top:2px; flex-shrink:0; }
.ann-body .ann-table { width:100%; border-collapse:collapse; margin:0 0 12px; font-size:12.5px; }
.ann-body .ann-table td, .ann-body .ann-table th { border:1px solid #e2e8f0; padding:6px 9px; text-align:left; }
.ann-body .ann-table th { background:#f8fafc; font-weight:700; }
.ann-body .ann-link-card { display:block; border:1px solid #e2e8f0; border-radius:8px; padding:10px 12px; margin:0 0 10px; text-decoration:none; }
.ann-body .ann-link-card:hover { border-color:#c7d2fe; background:#f8fafc; }
.ann-body .ann-link-title { font-size:13px; font-weight:700; color:#4f46e5; }
.ann-body .ann-link-desc { font-size:12px; color:#555555; margin-top:2px; }
.ann-image { width:100%; border-radius:10px; display:block; margin-top:8px; }

/* Release-style card (version pill + Added/Changed/Fixed) */
.ann-meta { display:flex; align-items:center; gap:12px; flex-wrap:wrap; margin:0 0 12px; }
.ann-pill { font-size:12px; font-weight:800; color:#fff; border-radius:7px; padding:4px 10px; }
.ann-meta-item { display:inline-flex; align-items:center; gap:5px; font-size:12px; color:#555555; font-weight:500; }
.ann-section + .ann-section { margin-top:12px; padding-top:12px; border-top:1px solid #f1f5f9; }
.ann-section-hdr { display:flex; align-items:center; gap:7px; font-size:13px; font-weight:700; margin-bottom:6px; }

/* ── RML Set Reminder Modal ── */
.rml-preset-grid { display:grid; grid-template-columns:1fr 1fr; gap:0.45rem; }
.rml-preset-chip { display:flex; align-items:center; gap:0.4rem; padding:0.45rem 0.7rem; border-radius:0.5rem; font-size:0.78rem; font-weight:600; border:1px solid; cursor:pointer; transition:filter 0.12s; text-align:left; line-height:1.3; background:none; }
.rml-preset-chip:hover { filter:brightness(0.93); }
.rml-preset-chip .rml-chip-icon { font-size:0.8rem; flex-shrink:0; }
.rml-preset-chip:last-child:nth-child(odd) { grid-column:1/-1; }
.rml-chip--fast { background:#f0fdf4; border-color:#bbf7d0; color:#166534; }
.rml-chip--fast .rml-chip-icon { color:#16a34a; }
.rml-chip--day  { background:#fefce8; border-color:#fde68a; color:#92400e; }
.rml-chip--day  .rml-chip-icon { color:#d97706; }
.rml-chip--week { background:#eff6ff; border-color:#bfdbfe; color:#1e40af; }
.rml-chip--week .rml-chip-icon { color:#2563eb; }
.rml-chip--weekday { background:#f5f3ff; border-color:#ddd6fe; color:#5b21b6; }
.rml-chip--weekday .rml-chip-icon { color:#7c3aed; }

/* ── Tom Select — global shape and behaviour ── */
.ts-wrapper { border-radius: 0.5rem !important; background-color: #fff !important; }
.ts-dropdown { border-radius: 0.5rem !important; font-size: 13px !important; }
.ts-dropdown .option { padding: 7px 12px !important; }
.ts-control input { font-size: inherit !important; min-width: 0 !important; }
.ts-wrapper.single .ts-control { flex-wrap: nowrap !important; overflow: hidden; }
.ts-wrapper.single .ts-control .ts-item { background: transparent !important; color: inherit !important; border-radius: 0 !important; padding: 0 !important; margin: 0 !important; border: none !important; font-weight: inherit !important; font-size: inherit !important; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.ts-wrapper.single.has-items:not(.input-active) .ts-control input { position: absolute !important; opacity: 0 !important; pointer-events: none !important; }

/* ── Dark/light mode transition ── */
body.theme-transition,
body.theme-transition .card,
body.theme-transition .card-header,
body.theme-transition .card-footer,
body.theme-transition .card-body,
body.theme-transition .modal-content,
body.theme-transition .modal-header,
body.theme-transition .modal-footer,
body.theme-transition .modal-body,
body.theme-transition .sidebar,
body.theme-transition .topbar,
body.theme-transition .form-control,
body.theme-transition .form-select,
body.theme-transition .input-group-text,
body.theme-transition .dropdown-menu,
body.theme-transition .dropdown-item,
body.theme-transition .table,
body.theme-transition .table td,
body.theme-transition .table th,
body.theme-transition .list-group-item,
body.theme-transition .accordion-item,
body.theme-transition .accordion-button,
body.theme-transition .accordion-body,
body.theme-transition .ant-topbar-darkmode-btn,
body.theme-transition .sb-item,
body.theme-transition .ant-sb-toggle-btn,
body.theme-transition p,
body.theme-transition span,
body.theme-transition h1, body.theme-transition h2, body.theme-transition h3,
body.theme-transition h4, body.theme-transition h5, body.theme-transition h6 {
    transition: background-color 0.35s ease, color 0.35s ease, border-color 0.35s ease !important;
}

/* ── Mobile app shell (sidebar becomes an off-canvas drawer) ── */
.topbar-hamburger { display: none; width: 34px; height: 34px; border-radius: 8px; border: 1px solid #e5e7eb; background: #fff; align-items: center; justify-content: center; cursor: pointer; color: #374151; font-size: 17px; flex-shrink: 0; }
.topbar-hamburger:hover { background: #f9fafb; }
.sb-backdrop { display: none; position: fixed; inset: 0; background: rgba(15,23,42,0.45); z-index: 1900; }
.sb-backdrop.show { display: block; }

@media (max-width: 860px) {
    .topbar-hamburger { display: flex; }
    .ant-sb-toggle-btn { display: none; }

    .sidebar, .sidebar.collapsed {
        position: fixed; top: 0; left: 0; z-index: 2000;
        width: 260px !important;
        box-shadow: 4px 0 24px rgba(0,0,0,0.18);
        transform: translateX(-100%);
        transition: transform 0.22s cubic-bezier(0.4,0,0.2,1);
    }
    .sidebar.mobile-open { transform: translateX(0); }
    .sidebar.collapsed .sb-text { display: inline !important; }
    .sidebar.collapsed .sb-item { justify-content: flex-start !important; padding-left: 10px !important; padding-right: 10px !important; gap: 9px !important; }
    .sidebar.collapsed .sb-brand { justify-content: flex-start !important; padding-left: 12px !important; }

    .topbar { flex-wrap: wrap; padding: 8px 12px; gap: 8px; }
    .topbar-title { font-size: 15px; margin-left: 4px; }
    .topbar-search { order: 10; flex-basis: 100%; max-width: none; }
    .topbar-username { display: none; }
}

/* Modal background blur — topbar modals (notifications, announcements, about) */
body.tt-topbar-modal-open > *:not(.modal):not(.modal-backdrop):not(#tt-toast-wrap):not(.ts-dropdown):not(.tooltip):not(.bs-tooltip-auto):not(#sessionIdleBanner):not(#tt-title-tip):not(.tt-tip):not(#_td_wo_picker):not(#_td_na_picker):not(#sharedConfirmModal) {
    filter: blur(3px);
    transition: filter 0.2s ease;
}

/* Modal background blur — only when a ticket detail modal is open */
body.td-modal-blur > *:not(.modal):not(.modal-backdrop):not(#tt-toast-wrap):not(.ts-dropdown):not(.tooltip):not(.bs-tooltip-auto):not(#sessionIdleBanner):not(#tt-title-tip):not(.tt-tip):not(#_td_wo_picker):not(#_td_na_picker):not(#mentionSuggest):not(#sharedConfirmModal) {
    filter: blur(3px);
    transition: filter 0.2s ease;
}

/* Reset — only when NEITHER blur context is active */
body:not(.tt-topbar-modal-open):not(.td-modal-blur) > *:not(.modal):not(.modal-backdrop):not(#tt-toast-wrap):not(.ts-dropdown):not(.tooltip):not(.bs-tooltip-auto):not(#sessionIdleBanner):not(#tt-title-tip):not(.tt-tip):not(#_td_wo_picker):not(#_td_na_picker):not(#mentionSuggest):not(#sharedConfirmModal) {
    filter: none;
    transition: filter 0.2s ease;
}

/* Disable blur on mobile — causes overlay issues with modals */
@media (max-width: 768px) {
    body.tt-topbar-modal-open > *,
    body.td-modal-blur > * {
        filter: none !important;
    }
}

/* ── Mobile Bottom Navigation ── */
.mobile-bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1050;
    background: #fff;
    border-top: 1px solid #e5e7eb;
    padding: 6px 0 env(safe-area-inset-bottom, 6px);
    box-shadow: 0 -2px 10px rgba(0,0,0,0.06);
}
.mobile-bottom-nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-around;
    max-width: 500px;
    margin: 0 auto;
}
.mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 4px 8px;
    border-radius: 8px;
    text-decoration: none;
    color: #94a3b8;
    font-size: 10px;
    font-weight: 600;
    transition: color 0.15s;
    min-width: 56px;
}
.mobile-nav-item i { font-size: 20px; }
.mobile-nav-item.active { color: #1654D1; }
.mobile-nav-item:hover { color: #1654D1; background: #f1f5f9; }
body.dark-mode .mobile-bottom-nav { background: #000000; border-top-color: #141414; }
body.dark-mode .mobile-nav-item { color: #555555; }
body.dark-mode .mobile-nav-item.active { color: #60a5fa; }
body.dark-mode .mobile-nav-item:hover { color: #60a5fa; background: #141414; }

/* ── Dark mode overrides for inline-styled elements ── */
body.dark-mode .ant-btn-white { background: #141414 !important; color: #e2e8f0 !important; border-color: #2c2c2c !important; }
body.dark-mode .ant-btn-white:hover { background: #2c2c2c !important; }
body.dark-mode .topbar-search .card { background: #141414 !important; }
body.dark-mode .topbar-search .form-control { color: #e2e8f0 !important; }
body.dark-mode .topbar-search .form-control::placeholder { color: #555555 !important; }
body.dark-mode #sharedConfirmModal > div { background: #141414 !important; }
body.dark-mode #sharedConfirmModal button[style*="background:#fff"],
body.dark-mode #sharedConfirmModal button[style*="background: #fff"] { background: #2c2c2c !important; border-color: #555555 !important; color: #e2e8f0 !important; }

/* ── Mobile Ticket Cards ── */
.mobile-cards-wrap {
    display: none;
    padding: 12px 14px 0;
}
.mobile-ticket-card {
    display: none;
    background: #fff;
    border: 1px solid #e8ecf1;
    border-radius: 14px;
    padding: 14px 14px 12px;
    margin-bottom: 10px;
    position: relative;
    transition: box-shadow 0.18s ease, transform 0.18s ease;
    cursor: pointer;
    border-left: 3px solid transparent;
}
.mobile-ticket-card:active {
    transform: scale(0.985);
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}
.mobile-ticket-card.mtc-prio-urgent {
    border-left-color: #dc2626;
    background: linear-gradient(135deg, #fef2f2 0%, #fff 40%);
}
.mobile-ticket-card.mtc-prio-high {
    border-left-color: #ea580c;
    background: linear-gradient(135deg, #fff7ed 0%, #fff 40%);
}
body.dark-mode .mobile-ticket-card { background: #141414; border-color: #2d3a4f; }
body.dark-mode .mobile-ticket-card.mtc-prio-urgent {
    border-left-color: #f87171;
    background: linear-gradient(135deg, rgba(220,38,38,0.08) 0%, #141414 40%);
}
body.dark-mode .mobile-ticket-card.mtc-prio-high {
    border-left-color: #fb923c;
    background: linear-gradient(135deg, rgba(234,88,12,0.08) 0%, #141414 40%);
}

/* Top row: ticket # + priority + menu */
.mtc-top-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 6px;
}
.mtc-identity {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    flex: 1;
}
.mtc-sr-no {
    font-size: 10px;
    font-weight: 700;
    color: #94a3b8;
    background: #f1f5f9;
    border-radius: 4px;
    padding: 2px 5px;
    line-height: 1;
    flex-shrink: 0;
}
body.dark-mode .mtc-sr-no { background: #141414; color: #555555; }
.mtc-ticket-no {
    font-size: 14px;
    font-weight: 700;
    color: var(--ticket-no-color, #1a56db);
    white-space: nowrap;
    letter-spacing: -0.01em;
}
body.dark-mode .mtc-ticket-no { color: #60a5fa; }
.mtc-prio-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 2px 7px;
    border-radius: 5px;
    line-height: 1.3;
}
.mtc-prio-badge i { font-size: 10px; }
.mtc-prio-badge.mtc-prio-urgent { background: #fef2f2; color: #dc2626; }
.mtc-prio-badge.mtc-prio-high { background: #fff7ed; color: #ea580c; }
body.dark-mode .mtc-prio-badge.mtc-prio-urgent { background: rgba(220,38,38,0.15); color: #f87171; }
body.dark-mode .mtc-prio-badge.mtc-prio-high { background: rgba(234,88,12,0.15); color: #fb923c; }

/* Menu button */
.mtc-menu-btn {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    border: none;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #94a3b8;
    font-size: 16px;
    flex-shrink: 0;
    transition: background 0.12s, color 0.12s;
}
.mtc-menu-btn:active { background: #f1f5f9; color: #555555; }
body.dark-mode .mtc-menu-btn { color: #555555; }
body.dark-mode .mtc-menu-btn:active { background: #2c2c2c; color: #94a3b8; }

/* Title */
.mtc-title {
    font-size: 13.5px;
    font-weight: 500;
    color: #141414;
    line-height: 1.45;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
body.dark-mode .mtc-title { color: #cbd5e1; }

/* Meta row: status + follow-up */
.mtc-meta-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.mtc-status-chip {
    display: inline-flex;
    align-items: center;
    font-size: 11px;
    font-weight: 600;
    padding: 3px 9px;
    border-radius: 6px;
    background: #f1f5f9;
    color: #555555;
    letter-spacing: 0.01em;
    white-space: nowrap;
}
body.dark-mode .mtc-status-chip { background: #2c2c2c; color: #94a3b8; }
.mtc-fu-info {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    color: #555555;
}
.mtc-fu-item {
    display: inline-flex;
    align-items: center;
    gap: 3px;
}
.mtc-fu-label {
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #94a3b8;
    background: #f1f5f9;
    border-radius: 3px;
    padding: 1px 4px;
    line-height: 1;
}
body.dark-mode .mtc-fu-label { background: #141414; color: #555555; }
.mtc-fu-info .b-fu,
.mtc-fu-info .b-time {
    font-size: 11px;
}

/* Links row */
.mtc-links {
    display: flex;
    gap: 6px;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #f1f5f9;
}
body.dark-mode .mtc-links { border-top-color: #2d3a4f; }
.mtc-link-btn {
    width: 28px;
    height: 28px;
    border-radius: 7px;
    border: 1px solid #e8ecf1;
    background: #f8fafc;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: #555555;
    transition: all 0.12s ease;
}
.mtc-link-btn:active { background: #e0e7ff; border-color: #c7d2fe; color: #4f46e5; }
.mtc-link-btn svg { width: 14px; height: 14px; }
body.dark-mode .mtc-link-btn { background: #000000; border-color: #2c2c2c; color: #555555; }
body.dark-mode .mtc-link-btn:active { background: #1a1a2e; border-color: #3b82f6; color: #60a5fa; }

/* Empty state */
.mobile-empty-state {
    text-align: center;
    padding: 48px 16px;
    color: #94a3b8;
}
.mobile-empty-state i {
    font-size: 2.5rem;
    opacity: 0.25;
    display: block;
    margin-bottom: 10px;
}
.mobile-empty-state p {
    font-size: 13px;
    font-weight: 500;
    margin: 0;
}

/* Mobile priority section */
.mobile-prio-section {
    display: none;
    background: linear-gradient(90deg, color-mix(in srgb, #e11d48 10%, transparent) 0%, transparent 70%);
    border-radius: 8px;
    padding: 8px 11px;
    margin-bottom: 8px;
}
.mobile-prio-section .mps-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    flex-wrap: nowrap;
}
.mobile-prio-section .mps-icon { color: #e11d48; font-size: 13px; flex-shrink: 0; }
.mobile-prio-section .mps-label {
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #e11d48;
    white-space: nowrap;
}
.mobile-prio-section .mps-count {
    font-size: 8px;
    font-weight: 600;
    color: #e11d48;
    background: color-mix(in srgb, #e11d48 12%, transparent);
    border: 0.5px solid color-mix(in srgb, #e11d48 30%, transparent);
    border-radius: 10px;
    padding: 1px 8px;
    white-space: nowrap;
}

/* ── Mobile RML Banner ── */
.mobile-rml-banner {
    display: none;
    background: linear-gradient(90deg, color-mix(in srgb, #e05a00 10%, transparent) 0%, transparent 70%);
    border: 1px solid #e05a00;
    border-radius: 8px;
    padding: 8px 11px;
    margin-bottom: 8px;
}
.mrb-inner { display: flex; align-items: center; gap: 6px; }
.mrb-icon { color: #e05a00; font-size: 13px; flex-shrink: 0; }
.mrb-label { font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: #e05a00; flex: 1; }
.mrb-clear { color: #e05a00; font-size: 12px; text-decoration: none; opacity: 0.7; }
.mrb-clear:hover { opacity: 1; }
body.dark-mode .mobile-rml-banner { background: linear-gradient(90deg, rgba(224,90,0,0.1) 0%, transparent 70%); }
body.dark-mode .mrb-label, body.dark-mode .mrb-icon, body.dark-mode .mrb-clear { color: #f59e0b; }
.mtc-rml { border-left: 3px solid #e05a00 !important; }
body.dark-mode .mtc-rml { border-left-color: #f59e0b !important; }
.mtc-rml-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 9px;
    font-weight: 700;
    color: #fff;
    background: #e05a00;
    border-radius: 4px;
    padding: 1px 5px;
    line-height: 1;
}
body.dark-mode .mtc-rml-badge { background: #b45309; color: #fef3c7; }
.mtc-rml-badge i { font-size: 9px; }

/* ── Mobile Toolbar ── */
.mobile-toolbar {
    display: none;
    padding: 10px 16px;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
    background: #fff;
    border-bottom: 1px solid #e5e7eb;
}
body.dark-mode .mobile-toolbar { background: #000000; border-bottom-color: #141414; }
.mobile-toolbar .mt-new-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 8px 14px;
    border-radius: 8px;
    background: #1D4ED8;
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    white-space: nowrap;
}
.mobile-toolbar .mt-sort-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 7px 12px;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    background: #fff;
    color: #374151;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
}
body.dark-mode .mobile-toolbar .mt-sort-btn { background: #141414; border-color: #2c2c2c; color: #e2e8f0; }
.mobile-toolbar .mt-more-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    background: #fff;
    color: #374151;
    font-size: 16px;
    cursor: pointer;
}
body.dark-mode .mobile-toolbar .mt-more-btn { background: #141414; border-color: #2c2c2c; color: #e2e8f0; }
.mobile-toolbar .mt-clear-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 8px;
    border: 1px solid #fecaca;
    background: #fef2f2;
    color: #dc2626;
    font-size: 14px;
    cursor: pointer;
    text-decoration: none;
}
body.dark-mode .mobile-toolbar .mt-clear-btn { background: #450a0a; border-color: #7f1d1d; color: #fca5a5; }

/* ── Mobile Media Queries ── */
@media (max-width: 768px) {
    /* Allow scrolling on mobile */
    html, body { overflow: auto !important; height: auto !important; }

    /* Prevent iOS zoom-on-focus — all form inputs must be ≥16px */
    .form-control, .form-select, input[type="text"], input[type="email"],
    input[type="password"], input[type="number"], input[type="url"],
    input[type="tel"], input[type="date"], input[type="datetime-local"],
    input[type="search"], textarea, select { font-size: 16px !important; }

    /* Show mobile bottom nav — hide when any Bootstrap modal is open */
    .mobile-bottom-nav { display: block; }
    body.modal-open .mobile-bottom-nav { display: none !important; }

    /* Adjust main layout for bottom nav — account for iPhone home indicator */
    .main { padding-bottom: calc(60px + env(safe-area-inset-bottom, 0px)) !important; overflow-y: auto !important; }

    /* Topbar adjustments */
    .topbar { padding: 8px 12px; }
    .topbar-title { font-size: 16px; font-weight: 700; }

    /* Adjust topbar search for mobile */
    .topbar-search { max-width: none; }

    /* Mobile page heading */
    .topbar-title-mobile { display: block; }

    /* Shared: compact buttons on mobile */
    .ant-tb-btn, .ant-tb-btn-ghost { padding: 5px 10px; font-size: 11px; }
}


