/* ==========================================================================
   Shadcn Design System
   Overrides Bootstrap/Tabler visual components while keeping the grid intact.
   ========================================================================== */

/* === Shadcn CSS Custom Properties === */
:root {
    --background: 258 55% 5%;
    --foreground: 0 0% 98%;
    --card: 258 40% 8%;
    --card-foreground: 0 0% 98%;
    --popover: 258 45% 7%;
    --popover-foreground: 0 0% 98%;
    --primary: 263 85% 68%;
    --primary-foreground: 0 0% 100%;
    --secondary: 258 28% 15%;
    --secondary-foreground: 0 0% 90%;
    --muted: 258 30% 10%;
    --muted-foreground: 250 15% 58%;
    --accent: 258 25% 20%;
    --accent-foreground: 0 0% 98%;
    --destructive: 0 72% 51%;
    --destructive-foreground: 0 0% 98%;
    --border: 258 22% 24%;
    --input: 258 28% 16%;
    --ring: 263 85% 68%;
    --radius: 0.75rem;
    --sidebar: 258 55% 4%;
    --sidebar-foreground: 0 0% 88%;
    --sidebar-border: 258 22% 16%;
    --sidebar-width: 16rem;
    /* Glass effect tokens */
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.12);
    --glass-highlight: rgba(255, 255, 255, 0.18);
    --glass-blur: blur(28px) saturate(200%);
    --glass-shadow: 0 8px 40px rgba(0, 0, 0, 0.45), 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* === Base === */
body {
    font-family: 'Inter', ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
    background:
        radial-gradient(ellipse 80% 60% at 20% -10%, rgba(120, 60, 220, 0.22) 0%, transparent 60%),
        radial-gradient(ellipse 60% 50% at 80% 110%, rgba(80, 30, 180, 0.18) 0%, transparent 60%),
        linear-gradient(160deg, hsl(262, 60%, 5%) 0%, hsl(250, 52%, 7%) 50%, hsl(260, 48%, 9%) 100%) !important;
    background-attachment: fixed !important;
    background-repeat: no-repeat !important;
    color: hsl(var(--foreground)) !important;
    -webkit-font-smoothing: antialiased;
    font-size: 0.875rem;
}

/* === Links === */
a:not(.btn):not(.sidebar-item):not(.portal-item):not(.dropdown-item):not(.nav-link):not(.page-link):not(.list-group-item):not(.breadcrumb-item a):not(.remove) {
    color: #c4b5fd !important;
    text-decoration: none;
}
a:not(.btn):not(.sidebar-item):not(.portal-item):not(.dropdown-item):not(.nav-link):not(.page-link):not(.list-group-item):not(.breadcrumb-item a):not(.remove):hover {
    color: #ddd6fe !important;
    text-decoration: underline;
}

/* The .no-underline utility must beat the global link hover underline (which has no !important). */
a.no-underline,
a.no-underline:hover {
    text-decoration: none !important;
}

/* === Logo === */
.navbar-brand-image {
    height: 1.75rem;
    aspect-ratio: 486 / 126;
    background-image: url("../images/daktela-logo-color-default-cropped-aD7mPv3.svg");
    background-size: contain;
    background-repeat: no-repeat;
    background-position: left center;
    filter: brightness(0) invert(1) opacity(0.85);
}

/* === Admin layout shell (replaces Tabler's .page / .navbar-vertical) === */
.app-layout {
    display: flex;
    min-height: 100vh;
}
.app-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 50;
    display: flex;
    flex-direction: column;
    width: var(--sidebar-width);
    background: rgba(12, 6, 32, 0.82) !important;
    backdrop-filter: blur(32px) saturate(200%);
    -webkit-backdrop-filter: blur(32px) saturate(200%);
    border-right: 1px solid rgba(255, 255, 255, 0.1) !important;
    box-shadow: 4px 0 32px rgba(0, 0, 0, 0.4);
    /* No overflow:hidden — it clips Bootstrap collapse transitions */
}
.app-sidebar::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 260px;
    height: 260px;
    background: radial-gradient(ellipse at bottom right,
        rgba(139, 92, 246, 0.42) 0%,
        rgba(109, 40, 217, 0.22) 40%,
        rgba(76, 29, 149, 0.06) 70%,
        transparent 100%);
    pointer-events: none;
    z-index: 0;
}
.app-main {
    flex: 1 1 0%;
    display: flex;
    flex-direction: column;
    min-width: 0;
    margin-left: var(--sidebar-width);
}
.app-topbar {
    position: sticky;
    top: 0;
    z-index: 40;
    display: flex;
    height: 3.5rem;
    align-items: center;
    gap: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(10, 5, 28, 0.72) !important;
    backdrop-filter: blur(28px) saturate(200%);
    -webkit-backdrop-filter: blur(28px) saturate(200%);
    padding: 0 1.5rem;
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06);
}
.app-content {
    flex: 1 1 0%;
    background: transparent;
}

/* Sidebar header */
.sidebar-logo {
    display: flex;
    height: 3.5rem;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
    padding: 0 1rem;
    flex-shrink: 0;
    position: relative;
    z-index: 1;
}

/* Sidebar partner profile */
.sidebar-partner {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
    flex-shrink: 0;
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.sidebar-partner-list {
    max-height: 10.5rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.sidebar-partner-label {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(255, 255, 255, 0.55);
    text-align: center;
}
.sidebar-partner-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    min-width: 0;
    text-align: center;
}
.sidebar-partner-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 3.5rem;
    height: 3.5rem;
    flex-shrink: 0;
    border-radius: calc(var(--radius) - 2px);
    background: rgba(147, 87, 255, 0.2);
    color: #c4b5fd;
    font-size: 1.5rem;
}
.sidebar-partner-info {
    min-width: 0;
    width: 100%;
    line-height: 1.3;
}
.sidebar-partner-name {
    font-size: 0.8125rem;
    font-weight: 600;
    color: hsl(var(--sidebar-foreground));
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.sidebar-partner-detail {
    font-size: 0.6875rem;
    color: hsl(var(--muted-foreground));
    word-break: break-word;
}

/* Permitted partners/accounts lists on the user profile — a normal list-view table capped to roughly the
   header row plus seven body rows (~2.75rem each), scrolling beyond so a large set stays bounded. */
.permitted-scroll {
    max-height: 23rem;
    overflow-y: auto;
}

/* The whole card header doubles as the collapse toggle, so it is a button stripped back to the header's
   own look — .card-header already supplies the flex layout, padding and border. */
.permitted-toggle {
    width: 100%;
    background: none;
    border-width: 0 0 1px 0;
    text-align: left;
    color: inherit;
}

.permitted-toggle-chevron {
    margin-left: 0.75rem;
    font-size: 0.7rem;
    color: hsl(var(--muted-foreground));
    transition: transform 0.2s ease;
}

.permitted-toggle[aria-expanded="true"] .permitted-toggle-chevron {
    transform: rotate(180deg);
}

/* Themed scrollbars for the capped partner/account lists — tinted to the partner accent purple */
.sidebar-partner-list,
.permitted-scroll {
    scrollbar-width: thin;
    scrollbar-color: rgba(147, 87, 255, 0.45) transparent;
}

.sidebar-partner-list::-webkit-scrollbar,
.permitted-scroll::-webkit-scrollbar {
    width: 8px;
}

.sidebar-partner-list::-webkit-scrollbar-track,
.permitted-scroll::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar-partner-list::-webkit-scrollbar-thumb,
.permitted-scroll::-webkit-scrollbar-thumb {
    background: rgba(147, 87, 255, 0.45);
    border-radius: 9999px;
}

.sidebar-partner-list::-webkit-scrollbar-thumb:hover,
.permitted-scroll::-webkit-scrollbar-thumb:hover {
    background: rgba(147, 87, 255, 0.7);
}

/* Multi-select pills (Tom Select): the whole pill is a click-to-remove target with a red hover cue
   and an always-visible "×" affordance; drop the divider Tom Select draws before the "×". */
.ts-wrapper.multi .item {
    cursor: pointer;
}

.ts-wrapper.multi .item:hover {
    background-color: rgba(220, 53, 69, 0.2) !important;
}

.ts-wrapper.multi .item .remove {
    border-left: 0 !important;
    padding-left: 0.25rem;
}

/* The "×" must not change on hover — no dark tint (the whole pill's red hover is the only cue);
   underline/recolor is already prevented by excluding .remove from the global link rule. */
.ts-wrapper.multi .item .remove:hover {
    background: transparent !important;
}

/* Cap the pill control at ~4 pill rows (item ≈24.7px + 3px margin, control pad-top 7px) so a large
   selection scrolls inside instead of growing the form; search lives in the dropdown, so adding
   never depends on this scroll. */
.ts-wrapper.multi .ts-control {
    max-height: 7.25rem;
    overflow-y: auto;
}

/* Sidebar nav items */
.sidebar-nav {
    flex: 1 1 0%;
    overflow-y: auto;
    padding: 0.75rem 0.5rem;
    position: relative;
    z-index: 1;
}
.sidebar-item {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.45rem 0.75rem;
    border-radius: calc(var(--radius) - 2px);
    font-size: 0.875rem;
    font-weight: 500;
    color: hsl(var(--sidebar-foreground)) !important;
    text-decoration: none !important;
    transition: background-color 0.15s ease, color 0.15s ease;
    cursor: pointer;
    border: none;
    background: transparent;
    width: 100%;
    text-align: left;
    line-height: 1.4;
}
.sidebar-item:hover {
    background: rgba(255, 255, 255, 0.07);
    color: #fff;
}
.sidebar-item.active {
    background: rgba(255, 255, 255, 0.13);
    color: #fff;
    font-weight: 600;
    border: none;
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.1) inset, 0 2px 8px rgba(0, 0, 0, 0.2);
}
.sidebar-item-icon {
    width: 1rem;
    text-align: center;
    flex-shrink: 0;
    font-size: 0.875rem;
}
.sidebar-item-chevron {
    margin-left: auto;
    font-size: 0.7rem;
    transition: transform 0.2s ease;
    color: hsl(var(--muted-foreground));
}
.sidebar-item[aria-expanded="true"] .sidebar-item-chevron {
    transform: rotate(180deg);
}
.sidebar-children {
    padding-left: 1.625rem;
    margin-top: 0.125rem;
}
.sidebar-group-label {
    padding: 0.375rem 0.75rem;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(255, 255, 255, 0.3);
}

/* Portal recursive items */
.portal-item {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.35rem 0.625rem;
    border-radius: calc(var(--radius) - 2px);
    font-size: 0.8125rem;
    color: hsl(var(--sidebar-foreground)) !important;
    text-decoration: none !important;
    transition: background-color 0.15s ease;
    background: transparent;
    border: none;
}
.portal-item:hover { background: rgba(255, 255, 255, 0.08); color: #fff !important; }
.portal-item.active { background: rgba(147, 87, 255, 0.2); color: #fff !important; font-weight: 500; }
.portal-toggle { color: rgba(255, 255, 255, 0.4); }

/* === Cards === */
.card {
    background: rgba(255, 255, 255, 0.055) !important;
    backdrop-filter: blur(28px) saturate(200%);
    -webkit-backdrop-filter: blur(28px) saturate(200%);
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    border-radius: var(--radius) !important;
    box-shadow:
        0 8px 40px rgba(0, 0, 0, 0.45),
        0 1px 0 rgba(255, 255, 255, 0.14) inset,
        0 -1px 0 rgba(0, 0, 0, 0.2) inset !important;
    color: hsl(var(--card-foreground)) !important;
    position: relative;
    overflow: hidden;
}
.card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--radius);
    background: linear-gradient(135deg, rgba(255,255,255,0.08) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}
.card > * { position: relative; z-index: 1; }
.card-header {
    padding: 0.875rem 1.25rem !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.09) !important;
    background: rgba(255, 255, 255, 0.03) !important;
    display: flex;
    align-items: center;
    min-height: 3.25rem;
    gap: 0.75rem;
}
.card-title {
    font-size: 0.875rem !important;
    font-weight: 600 !important;
    color: #ffffff !important;
    margin: 0 !important;
    line-height: 1.4;
}
.card-subtitle {
    font-size: 0.8125rem !important;
    color: rgba(255, 255, 255, 0.5) !important;
    margin: 0 !important;
}
.card-body { padding: 1.25rem !important; }
.card-footer {
    padding: 0.75rem 1.25rem !important;
    border-top: 1px solid rgba(255, 255, 255, 0.09) !important;
    background: rgba(255, 255, 255, 0.02) !important;
}
.card-options {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}
.card-table { margin-bottom: 0 !important; }
.card-md { max-width: 28rem; }

/* === Buttons === */
.btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    white-space: nowrap !important;
    border-radius: calc(var(--radius) - 2px) !important;
    font-size: 0.875rem !important;
    font-weight: 500 !important;
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease, opacity 0.15s ease !important;
    cursor: pointer;
    padding: 0.5rem 1rem !important;
    border: 1px solid transparent !important;
    text-decoration: none !important;
    line-height: 1.25 !important;
    gap: 0.375rem;
}
.btn-sm { padding: 0.3125rem 0.75rem !important; font-size: 0.8125rem !important; }
.btn-lg { padding: 0.625rem 1.25rem !important; font-size: 1rem !important; }
.btn-icon { width: 2.25rem !important; height: 2.25rem !important; padding: 0 !important; }
.btn-list { display: flex; gap: 0.5rem; align-items: center; }

.btn-primary {
    background: linear-gradient(135deg, hsl(263 85% 68%) 0%, hsl(280 80% 60%) 100%) !important;
    color: #ffffff !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
    box-shadow: 0 0 18px rgba(147, 87, 255, 0.4), 0 4px 12px rgba(0, 0, 0, 0.3) !important;
}
.btn-primary:hover, .btn-primary:focus {
    background: linear-gradient(135deg, hsl(263 85% 72%) 0%, hsl(280 80% 65%) 100%) !important;
    border-color: rgba(255, 255, 255, 0.3) !important;
    color: #ffffff !important;
    box-shadow: 0 0 24px rgba(147, 87, 255, 0.55), 0 4px 16px rgba(0, 0, 0, 0.3) !important;
}
.btn-secondary {
    background: rgba(255, 255, 255, 0.08) !important;
    color: rgba(255, 255, 255, 0.9) !important;
    border-color: rgba(255, 255, 255, 0.15) !important;
    backdrop-filter: blur(12px);
}
.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.13) !important;
    color: #fff !important;
    border-color: rgba(255, 255, 255, 0.22) !important;
}
.btn-outline-primary {
    background-color: transparent !important;
    color: hsl(var(--primary)) !important;
    border-color: hsl(var(--primary)) !important;
}
.btn-outline-primary:hover {
    background-color: hsl(var(--primary)) !important;
    color: hsl(var(--primary-foreground)) !important;
}
.btn-outline-secondary {
    background-color: transparent !important;
    color: hsl(var(--foreground)) !important;
    border-color: hsl(var(--border)) !important;
}
.btn-outline-secondary:hover { background-color: hsl(var(--accent)) !important; }
.btn-danger {
    background-color: hsl(var(--destructive)) !important;
    color: hsl(var(--destructive-foreground)) !important;
    border-color: hsl(var(--destructive)) !important;
}
.btn-danger:hover { background-color: hsl(var(--destructive) / 0.88) !important; }
.btn-warning {
    background-color: hsl(45 93% 47%) !important;
    color: #fff !important;
    border-color: hsl(45 93% 47%) !important;
}
.btn-warning:hover { background-color: hsl(45 93% 40%) !important; }
.btn-success {
    background-color: hsl(142 71% 45%) !important;
    color: #fff !important;
    border-color: hsl(142 71% 45%) !important;
}
.btn.disabled, .btn:disabled { opacity: 0.5 !important; pointer-events: none !important; }
.btn.opacity-50 { opacity: 0.5; }

/* === Tables === */
.table {
    width: 100%;
    font-size: 0.875rem !important;
    border-collapse: collapse !important;
    color: hsl(var(--foreground)) !important;
}
.table > thead > tr > th {
    height: 2.75rem;
    padding: 0.625rem 1rem !important;
    text-align: left;
    font-weight: 600 !important;
    font-size: 0.75rem !important;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: rgba(255, 255, 255, 0.45) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.09) !important;
    border-top: none !important;
    background: transparent !important;
    vertical-align: middle !important;
    white-space: nowrap;
}
.table > tbody > tr > td {
    padding: 0.75rem 1rem !important;
    border-top: none !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06) !important;
    vertical-align: middle !important;
    color: rgba(255, 255, 255, 0.88) !important;
}
.table > tbody > tr:last-child > td { border-bottom: none !important; }
.table > tbody > tr:hover > td { background-color: rgba(255, 255, 255, 0.04) !important; }
.table-vcenter > tbody > tr > td,
.table-vcenter > thead > tr > th { vertical-align: middle !important; }

/* Native date/time picker indicators render black by default — tint them so they stay visible on the
   dark form controls. */
input[type="date"]::-webkit-calendar-picker-indicator,
input[type="datetime-local"]::-webkit-calendar-picker-indicator,
input[type="time"]::-webkit-calendar-picker-indicator,
input[type="month"]::-webkit-calendar-picker-indicator,
input[type="week"]::-webkit-calendar-picker-indicator {
    filter: invert(1);
    opacity: 0.6;
    cursor: pointer;
}
input[type="date"]::-webkit-calendar-picker-indicator:hover,
input[type="datetime-local"]::-webkit-calendar-picker-indicator:hover,
input[type="time"]::-webkit-calendar-picker-indicator:hover,
input[type="month"]::-webkit-calendar-picker-indicator:hover,
input[type="week"]::-webkit-calendar-picker-indicator:hover {
    opacity: 0.9;
}

/* === Forms === */
.form-control {
    display: block !important;
    width: 100%;
    border: 1px solid rgba(255, 255, 255, 0.18) !important;
    border-radius: calc(var(--radius) - 2px) !important;
    padding: 0.5rem 0.75rem !important;
    font-size: 0.875rem !important;
    font-family: inherit !important;
    background-color: hsl(var(--input)) !important;
    backdrop-filter: blur(8px);
    color: #fff !important;
    transition: border-color 0.15s ease, box-shadow 0.15s ease !important;
    height: auto !important;
    line-height: 1.4;
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.35) inset !important;
}
.form-control:focus {
    border-color: rgba(255, 255, 255, 0.38) !important;
    box-shadow: 0 0 0 2px hsl(var(--ring) / 0.25), 0 1px 6px rgba(0, 0, 0, 0.35) inset !important;
    outline: none !important;
}
.form-control::placeholder { color: rgba(255, 255, 255, 0.3) !important; }
.form-control:disabled { opacity: 0.5; cursor: not-allowed; }
.form-select {
    display: block !important;
    width: 100%;
    border: 1px solid rgba(255, 255, 255, 0.18) !important;
    border-radius: calc(var(--radius) - 2px) !important;
    padding: 0.5rem 2.25rem 0.5rem 0.75rem !important;
    font-size: 0.875rem !important;
    font-family: inherit !important;
    background-color: hsl(var(--input)) !important;
    backdrop-filter: blur(8px);
    color: #fff !important;
    height: auto !important;
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.35) inset !important;
}
.form-select:focus {
    border-color: rgba(255, 255, 255, 0.38) !important;
    box-shadow: 0 0 0 2px hsl(var(--ring) / 0.25), 0 1px 6px rgba(0, 0, 0, 0.35) inset !important;
    outline: none !important;
}
.form-label {
    display: block;
    font-size: 0.875rem !important;
    font-weight: 500 !important;
    margin-bottom: 0.375rem !important;
    color: hsl(var(--foreground)) !important;
}
/* Tabler emits .form-hint for field help, but the Symfony Bootstrap 5 form theme emits .form-text, so both
   need styling — otherwise `help` on a form field falls through to Bootstrap's near-black default and is
   unreadable on this dark theme. */
.form-hint,
.form-text {
    font-size: 0.8125rem;
    color: hsl(var(--muted-foreground));
    margin-top: 0.25rem;
}
.form-check-input {
    border-color: hsl(var(--border)) !important;
    background-color: hsl(var(--input)) !important;
}
.form-check-input:checked {
    background-color: hsl(var(--primary)) !important;
    border-color: hsl(var(--primary)) !important;
}
.input-group { display: flex; }
.input-group .form-control:not(:last-child) {
    border-radius: calc(var(--radius) - 2px) 0 0 calc(var(--radius) - 2px) !important;
}
.input-group-flat .form-control { border-radius: calc(var(--radius) - 2px) 0 0 calc(var(--radius) - 2px) !important; }
.input-group-text {
    display: flex;
    align-items: center;
    padding: 0.5rem 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-left: none;
    background: hsl(var(--muted));
    border-radius: 0 calc(var(--radius) - 2px) calc(var(--radius) - 2px) 0;
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.55);
}
.form-footer { margin-top: 1rem; }

/* Form selectgroup (toggle-like buttons) */
.form-selectgroup { display: flex; gap: 0.25rem; flex-wrap: wrap; }
.form-selectgroup-input { position: absolute; opacity: 0; pointer-events: none; }
.form-selectgroup-label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.4rem 0.875rem;
    font-size: 0.875rem;
    font-weight: 500;
    border: 1px solid hsl(var(--border));
    border-radius: calc(var(--radius) - 2px);
    background: hsl(var(--muted));
    color: hsl(var(--muted-foreground));
    cursor: pointer;
    transition: all 0.15s ease;
    user-select: none;
}
.form-selectgroup-label:hover { background: hsl(var(--accent)); color: hsl(var(--accent-foreground)); }
.form-selectgroup-input:checked + .form-selectgroup-label {
    background: hsl(var(--primary)) !important;
    color: hsl(var(--primary-foreground)) !important;
    border-color: hsl(var(--primary)) !important;
}
.form-selectgroup-input:disabled + .form-selectgroup-label { opacity: 0.5; cursor: not-allowed; }

/* === Alerts === */
.alert {
    border-radius: var(--radius) !important;
    padding: 0.875rem 1rem !important;
    border-width: 1px !important;
    border-style: solid !important;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    font-size: 0.875rem !important;
    margin-bottom: 1rem;
}
.alert-icon { flex-shrink: 0; padding-top: 0.0625rem; }
.alert-description { flex: 1; }
.alert-list { margin: 0; padding: 0; list-style: none; }
.alert-success { background: rgba(21, 128, 61, 0.18) !important; border-color: rgba(34, 197, 94, 0.3) !important; color: hsl(142 71% 72%) !important; }
.alert-danger { background: rgba(185, 28, 28, 0.18) !important; border-color: rgba(239, 68, 68, 0.3) !important; color: hsl(0 72% 75%) !important; }
.alert-warning { background: rgba(161, 98, 7, 0.18) !important; border-color: rgba(234, 179, 8, 0.3) !important; color: hsl(45 93% 72%) !important; }
.alert-info { background: rgba(29, 78, 216, 0.18) !important; border-color: rgba(96, 165, 250, 0.3) !important; color: hsl(214 100% 75%) !important; }
.alert-primary { --tblr-alert-color: hsl(var(--primary)); background: hsl(var(--primary) / 0.15) !important; border-color: hsl(var(--primary) / 0.3) !important; color: color-mix(in srgb, hsl(var(--primary)), white 35%) !important; }

/* === Badges === */
.badge {
    display: inline-flex !important;
    align-items: center !important;
    border-radius: 9999px !important;
    padding: 0.22rem 0.65rem !important;
    font-size: 0.72rem !important;
    font-weight: 700 !important;
    line-height: 1 !important;
    border: 1px solid transparent !important;
    white-space: nowrap;
    letter-spacing: 0.02em;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}
.badge.bg-primary {
    background: linear-gradient(135deg, hsl(263 85% 68%) 0%, hsl(280 80% 60%) 100%) !important;
    color: #fff !important;
    border-color: rgba(255,255,255,0.2) !important;
    box-shadow: 0 0 12px rgba(147, 87, 255, 0.45), 0 2px 4px rgba(0,0,0,0.3) !important;
}
.badge.bg-success, .bg-success.badge {
    background: linear-gradient(135deg, hsl(142 71% 40%) 0%, hsl(160 70% 38%) 100%) !important;
    color: #fff !important;
    border-color: rgba(255,255,255,0.18) !important;
    box-shadow: 0 0 12px rgba(34, 197, 94, 0.4), 0 2px 4px rgba(0,0,0,0.3) !important;
}
.badge.bg-warning {
    background: linear-gradient(135deg, hsl(38 95% 50%) 0%, hsl(30 90% 45%) 100%) !important;
    color: #fff !important;
    border-color: rgba(255,255,255,0.18) !important;
    box-shadow: 0 0 12px rgba(251, 191, 36, 0.4), 0 2px 4px rgba(0,0,0,0.3) !important;
}
.badge.bg-danger {
    background: linear-gradient(135deg, hsl(0 72% 52%) 0%, hsl(10 80% 48%) 100%) !important;
    color: #fff !important;
    border-color: rgba(255,255,255,0.18) !important;
    box-shadow: 0 0 12px rgba(239, 68, 68, 0.4), 0 2px 4px rgba(0,0,0,0.3) !important;
}
.badge.bg-secondary {
    background: rgba(255, 255, 255, 0.1) !important;
    color: rgba(255, 255, 255, 0.85) !important;
    border: 1px solid rgba(255, 255, 255, 0.18) !important;
    backdrop-filter: blur(8px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.2) !important;
}
.badge.bg-purple {
    background: linear-gradient(135deg, hsl(271 81% 58%) 0%, hsl(290 75% 52%) 100%) !important;
    color: #fff !important;
    border-color: rgba(255,255,255,0.18) !important;
    box-shadow: 0 0 12px rgba(168, 85, 247, 0.45), 0 2px 4px rgba(0,0,0,0.3) !important;
}

/* === Avatar === */
.avatar {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 9999px !important;
    font-weight: 600 !important;
    flex-shrink: 0;
    background-color: hsl(var(--primary)) !important;
    color: hsl(var(--primary-foreground)) !important;
    width: 2rem !important;
    height: 2rem !important;
    font-size: 0.75rem !important;
    line-height: 1 !important;
    background-size: cover !important;
    background-position: center !important;
    overflow: hidden;
    user-select: none;
}
.avatar-sm { width: 1.75rem !important; height: 1.75rem !important; font-size: 0.7rem !important; }
.avatar-lg { width: 2.5rem !important; height: 2.5rem !important; font-size: 0.875rem !important; }
.avatar.bg-primary { background-color: hsl(var(--primary)) !important; }
.avatar.bg-success { background-color: hsl(142 71% 45%) !important; }
.avatar.bg-warning { background-color: hsl(45 93% 47%) !important; }
.avatar.bg-danger { background-color: hsl(var(--destructive)) !important; }
.avatar.bg-purple { background-color: hsl(271 81% 56%) !important; }
.avatar.bg-secondary, .avatar.bg-secondary.bg-opacity-50 { background-color: hsl(var(--muted)) !important; color: hsl(var(--muted-foreground)) !important; }

/* Native colour input rendered as a compact swatch (profile avatar colour) */
input[type="color"].form-control {
    width: 3rem;
    min-width: 3rem;
    padding: 0.25rem;
    cursor: pointer;
}

/* === Dropdowns (Bootstrap JS) === */
.dropdown { position: relative; }
.dropdown-menu {
    position: absolute !important;
    top: 100% !important;
    left: 0 !important;
    z-index: 1000 !important;
    min-width: 10rem !important;
    padding: 0.25rem !important;
    margin-top: 0.25rem !important;
    background: rgba(14, 8, 38, 0.92) !important;
    backdrop-filter: blur(32px) saturate(200%) !important;
    -webkit-backdrop-filter: blur(32px) saturate(200%) !important;
    border: 1px solid rgba(255, 255, 255, 0.13) !important;
    border-radius: var(--radius) !important;
    box-shadow:
        0 12px 40px rgba(0, 0, 0, 0.5),
        0 1px 0 rgba(255, 255, 255, 0.1) inset !important;
    display: none;
    color: hsl(var(--popover-foreground));
}
.dropdown-menu.show { display: block !important; }
.dropdown-menu-end { right: 0 !important; left: auto !important; }
.dropdown-menu-arrow::before {
    content: '' !important;
    position: absolute !important;
    top: -5px !important;
    right: 0.75rem !important;
    width: 10px !important;
    height: 10px !important;
    background: rgba(22, 14, 50, 0.88) !important;
    border-top: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-left: 1px solid rgba(255, 255, 255, 0.1) !important;
    transform: rotate(45deg) !important;
}
.dropdown-item {
    display: flex !important;
    align-items: center !important;
    width: 100% !important;
    padding: 0.4rem 0.75rem !important;
    font-size: 0.875rem !important;
    font-weight: 400 !important;
    color: hsl(var(--foreground)) !important;
    text-decoration: none !important;
    background: transparent !important;
    border: none !important;
    cursor: pointer;
    border-radius: calc(var(--radius) - 4px) !important;
    gap: 0.5rem;
    white-space: nowrap;
}
.dropdown-item:hover, .dropdown-item:focus {
    background-color: hsl(var(--accent)) !important;
    color: hsl(var(--accent-foreground)) !important;
}
.dropdown-item.active {
    background-color: hsl(var(--primary)) !important;
    color: hsl(var(--primary-foreground)) !important;
}
.dropdown-item.disabled { opacity: 0.5 !important; pointer-events: none !important; }
.dropdown-divider { margin: 0.25rem 0 !important; border-top: 1px solid hsl(var(--border)) !important; opacity: 1 !important; }
.dropdown-header {
    padding: 0.375rem 0.75rem !important;
    font-size: 0.72rem !important;
    font-weight: 600 !important;
    color: hsl(var(--muted-foreground)) !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
}
.dropdown-item-indicator { margin-right: 0.25rem; }
.dropdown-toggle::after { display: none !important; }

/* === Breadcrumb === */
.breadcrumb {
    display: flex !important;
    flex-wrap: wrap !important;
    padding: 0 !important;
    margin: 0 !important;
    list-style: none !important;
    font-size: 0.8125rem !important;
    align-items: center;
    gap: 0.125rem;
}
.breadcrumb-item { display: flex; align-items: center; }
.breadcrumb-item a { color: hsl(var(--muted-foreground)) !important; text-decoration: none; }
.breadcrumb-item a:hover { color: hsl(var(--foreground)) !important; text-decoration: underline; }
.breadcrumb-item.active { color: hsl(var(--foreground)) !important; font-weight: 500; }
.breadcrumb-arrows .breadcrumb-item + .breadcrumb-item::before {
    content: '/' !important;
    color: hsl(var(--muted-foreground)) !important;
    margin: 0 0.25rem;
    font-weight: 300;
}

/* === Pagination === */
.pagination {
    display: flex !important;
    padding-left: 0 !important;
    list-style: none !important;
    margin: 0 !important;
    gap: 0.25rem !important;
    align-items: center;
}
.page-item { display: flex; }
.page-link {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: 2rem !important;
    height: 2rem !important;
    padding: 0 0.5rem !important;
    font-size: 0.875rem !important;
    border-radius: calc(var(--radius) - 2px) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    color: rgba(255, 255, 255, 0.85) !important;
    background: rgba(255, 255, 255, 0.07) !important;
    backdrop-filter: blur(8px);
    text-decoration: none !important;
    transition: all 0.15s ease !important;
}
.page-link:hover { background-color: hsl(var(--accent)) !important; color: hsl(var(--accent-foreground)) !important; border-color: hsl(var(--border)) !important; }
.page-link.active, .page-item.active .page-link {
    background-color: hsl(var(--primary)) !important;
    color: hsl(var(--primary-foreground)) !important;
    border-color: hsl(var(--primary)) !important;
}
.page-item.disabled .page-link { opacity: 0.4 !important; pointer-events: none !important; }

/* === Accordion === */
.accordion-item {
    background: rgba(255, 255, 255, 0.055) !important;
    backdrop-filter: blur(28px) saturate(180%);
    -webkit-backdrop-filter: blur(28px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    border-radius: var(--radius) !important;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}
.accordion-button {
    background: transparent !important;
    color: hsl(var(--foreground)) !important;
    font-size: 0.875rem !important;
    font-weight: 500 !important;
    padding: 0.875rem 1.25rem !important;
    border: none !important;
    box-shadow: none !important;
}
.accordion-button:not(.collapsed) {
    background: transparent !important;
    color: hsl(var(--foreground)) !important;
    box-shadow: none !important;
}
.accordion-button::after { opacity: 0.6 !important; filter: invert(1); }
.accordion-body { padding: 1.25rem !important; background: transparent !important; }
.bg-surface { background-color: hsl(var(--card)) !important; }

/* === Collapse (Bootstrap JS) — needed for sidebar expand/collapse === */
.collapse:not(.show) { display: none; }
.collapsing { height: 0; overflow: hidden; transition: height 0.2s ease; }

/*
 * Tabler's CSS has: .show { color: var(--tblr-btn-active-color); background-color: var(--tblr-btn-active-bg) }
 * This targets ANY .show element including .collapse.show, bleeding dark-blue text into sidebar children.
 * Reset those properties for sidebar collapse containers.
 */
.app-sidebar .collapse.show,
.app-sidebar .collapsing,
.app-sidebar .sidebar-children {
    background-color: transparent !important;
    color: rgba(255, 255, 255, 0.88) !important;
    border-color: transparent !important;
    box-shadow: none !important;
}

.collapse.show {
    visibility: visible;
}

/* === Tabs === */
.nav-tabs {
    border-bottom: 1px solid hsl(var(--border)) !important;
    gap: 0 !important;
}
.nav-tabs .nav-link {
    border: none !important;
    border-bottom: 2px solid transparent !important;
    padding: 0.625rem 1rem !important;
    font-size: 0.875rem !important;
    font-weight: 500 !important;
    color: hsl(var(--muted-foreground)) !important;
    border-radius: 0 !important;
    margin-bottom: -1px;
}
.nav-tabs .nav-link:hover { color: hsl(var(--foreground)) !important; background: transparent !important; }
.nav-tabs .nav-link.active {
    border-bottom-color: hsl(var(--primary)) !important;
    color: hsl(var(--foreground)) !important;
    background: transparent !important;
}

/* === Page header (header-simple template) === */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem 0 1rem !important;
    border: none !important;
    background: transparent !important;
    gap: 1rem;
}
.page-title {
    font-size: 1.375rem !important;
    font-weight: 700 !important;
    color: hsl(var(--foreground)) !important;
    margin: 0 !important;
    line-height: 1.2 !important;
    letter-spacing: -0.01em;
}
.page-pretitle {
    font-size: 0.7rem !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.07em !important;
    color: rgba(255, 255, 255, 0.4) !important;
    margin-bottom: 0.25rem !important;
}

/* === List group === */
.list-group { padding-left: 0; margin-bottom: 0; }
.list-group-item {
    display: block;
    padding: 0.5rem 0.75rem;
    border: none !important;
    font-size: 0.875rem;
    color: hsl(var(--foreground));
    text-decoration: none;
    border-radius: calc(var(--radius) - 2px) !important;
    background: transparent !important;
}
.list-group-item:hover, .list-group-item-action:hover { background-color: hsl(var(--accent)) !important; color: hsl(var(--accent-foreground)) !important; }
.list-group-item.active { background-color: hsl(var(--accent)) !important; color: hsl(var(--accent-foreground)) !important; font-weight: 500; }
.list-group-transparent { background: transparent; }
.subheader {
    font-size: 0.7rem !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.07em !important;
    color: rgba(255, 255, 255, 0.38) !important;
    margin-bottom: 0.5rem !important;
}

/* === Modals === */
.modal-content {
    background: rgba(14, 8, 38, 0.88) !important;
    backdrop-filter: blur(36px) saturate(200%) !important;
    -webkit-backdrop-filter: blur(36px) saturate(200%) !important;
    border: 1px solid rgba(255, 255, 255, 0.13) !important;
    border-radius: var(--radius) !important;
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.6),
        0 1px 0 rgba(255, 255, 255, 0.12) inset !important;
}
.modal-header {
    border-bottom: 1px solid hsl(var(--border)) !important;
    padding: 1rem 1.25rem !important;
}
.modal-title { font-weight: 600 !important; font-size: 1rem !important; color: hsl(var(--foreground)) !important; }
.modal-body { padding: 1.25rem !important; }
.modal-footer { border-top: 1px solid hsl(var(--border)) !important; padding: 0.875rem 1.25rem !important; gap: 0.5rem; background: transparent !important; }

/* === Color utilities for icons / content === */
.text-muted { color: rgba(255, 255, 255, 0.48) !important; }
.text-secondary { color: rgba(255, 255, 255, 0.5) !important; }
.text-white { color: #fff !important; }
.text-body { color: #fff !important; }
.bg-success { background-color: hsl(142 71% 45%) !important; }
.bg-warning { background-color: hsl(45 93% 47%) !important; }
.bg-danger { background-color: hsl(var(--destructive)) !important; }
.bg-primary { background-color: hsl(var(--primary)) !important; }
.bg-purple { background-color: hsl(271 81% 56%) !important; }
.border-bottom { border-bottom: 1px solid hsl(var(--border)) !important; }
.border-end { border-right: 1px solid hsl(var(--border)) !important; }
.border-top { border-top: 1px solid hsl(var(--border)) !important; }

/* === h2 stats number === */
.h2 {
    font-size: 1.5rem !important;
    font-weight: 700 !important;
    color: hsl(var(--foreground)) !important;
    line-height: 1.2;
}

/* === Footer === */
.app-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(10, 5, 28, 0.6);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    padding: 0.75rem 1.5rem;
    font-size: 0.8125rem;
    color: rgba(255, 255, 255, 0.4);
}

/* === Tom Select Shadcn overrides === */
/* Control (always inside .ts-wrapper) */
.ts-wrapper .ts-control {
    border: 1px solid rgba(255, 255, 255, 0.18) !important;
    border-radius: calc(var(--radius) - 2px) !important;
    background-color: hsl(var(--input)) !important;
    color: #fff !important;
    padding: 0.4375rem 0.75rem !important;
    font-size: 0.875rem !important;
    min-height: calc(2.25rem + 2px) !important;
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.35) inset !important;
}
.ts-wrapper .ts-control,
.ts-wrapper .ts-control * { color: #fff !important; }

/* Multiselect tags */
.ts-wrapper .ts-control .item {
    background: rgba(139, 92, 246, 0.28) !important;
    border: 1px solid rgba(139, 92, 246, 0.5) !important;
    border-radius: calc(var(--radius) - 4px) !important;
    color: #fff !important;
    font-size: 0.8125rem !important;
    font-weight: 500 !important;
    padding: 0.1rem 0.5rem !important;
    line-height: 1.5 !important;
    box-shadow: 0 0 6px rgba(139, 92, 246, 0.2) !important;
    backdrop-filter: blur(4px);
}
.ts-wrapper .ts-control .item.active {
    background: rgba(139, 92, 246, 0.5) !important;
    border-color: rgba(139, 92, 246, 0.8) !important;
    color: #fff !important;
}

.ts-wrapper.focus .ts-control {
    border-color: rgba(255, 255, 255, 0.38) !important;
    box-shadow: 0 0 0 2px hsl(var(--ring) / 0.25), 0 1px 6px rgba(0, 0, 0, 0.35) inset !important;
}

/*
 * Dropdown is appended to <body> via dropdownParent:'body', so it is NOT
 * a descendant of .ts-wrapper at runtime. Target .ts-dropdown directly.
 */
.ts-dropdown {
    border: 1px solid rgba(255, 255, 255, 0.13) !important;
    border-radius: var(--radius) !important;
    background: rgba(14, 8, 38, 0.97) !important;
    backdrop-filter: blur(28px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(28px) saturate(180%) !important;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.55), 0 1px 0 rgba(255,255,255,0.08) inset !important;
    margin-top: 0.25rem !important;
    color: rgba(255, 255, 255, 0.92) !important;
}
.ts-dropdown,
.ts-dropdown * {
    color: rgba(255, 255, 255, 0.92) !important;
}
.ts-dropdown .ts-dropdown-content .option,
.ts-dropdown .option {
    padding: 0.4rem 0.75rem !important;
    font-size: 0.875rem !important;
    color: rgba(255, 255, 255, 0.92) !important;
    border-radius: 0 !important;
    background: transparent !important;
}
.ts-dropdown .option:hover,
.ts-dropdown .option.active {
    background-color: rgba(255, 255, 255, 0.1) !important;
    color: #fff !important;
}
.ts-dropdown .option.selected {
    background: linear-gradient(135deg, hsl(263 85% 60%) 0%, hsl(280 78% 52%) 100%) !important;
    color: #fff !important;
}
/* no-results / loading states */
.ts-dropdown .no-results,
.ts-dropdown .spinner {
    color: rgba(255, 255, 255, 0.5) !important;
    padding: 0.5rem 0.75rem !important;
}

/* === Channel type text colors (unchanged) === */
.text-call { color: #00A0FF !important; }
.text-email { color: #00B152 !important; }
.text-sms { color: #FF9900 !important; }
.text-webchat { color: #cb6fd7 !important; }
.text-facebook-messenger, .text-facebook { color: #373EE0 !important; }
.text-whatsapp { color: #00794E !important; }
.text-viber { color: #5330E9 !important; }
.text-instagram { color: #FF0069 !important; }
.text-comment { color: #A0A0A0 !important; }
.text-external-comment { color: #003366 !important; }

/* === Lead stage badge colors === */
.badge[data-lead-stage="prospect"] {
    background: linear-gradient(135deg, #ff2222 0%, #cc0000 100%) !important;
    color: #fff !important;
    box-shadow: 0 0 14px rgba(255, 30, 30, 0.5) !important;
    border-color: rgba(255,100,100,0.25) !important;
}
.badge[data-lead-stage="presales"] {
    background: linear-gradient(135deg, #e020ff 0%, #aa00dd 100%) !important;
    color: #fff !important;
    box-shadow: 0 0 14px rgba(220, 30, 255, 0.5) !important;
    border-color: rgba(230,100,255,0.25) !important;
}
.badge[data-lead-stage="quotation"] {
    background: linear-gradient(135deg, #ffd900 0%, #e0a800 100%) !important;
    color: #1a1100 !important;
    box-shadow: 0 0 14px rgba(255, 210, 0, 0.4) !important;
    border-color: rgba(255,220,50,0.3) !important;
    text-shadow: none;
}
.badge[data-lead-stage="contract"] {
    background: linear-gradient(135deg, #1e6fff 0%, #0040cc 100%) !important;
    color: #fff !important;
    box-shadow: 0 0 14px rgba(30, 100, 255, 0.5) !important;
    border-color: rgba(80,140,255,0.25) !important;
}
.badge[data-lead-stage="deal"] {
    background: linear-gradient(135deg, #00dd1a 0%, #009910 100%) !important;
    color: #fff !important;
    box-shadow: 0 0 14px rgba(0, 210, 30, 0.5) !important;
    border-color: rgba(50,220,80,0.25) !important;
}
.badge[data-lead-stage="all_done"] {
    background: linear-gradient(135deg, #00b860 0%, #007a3d 100%) !important;
    color: #fff !important;
    box-shadow: 0 0 14px rgba(0, 180, 90, 0.45) !important;
    border-color: rgba(50,200,120,0.25) !important;
}

/* === Link hover utilities === */
.link-primary-hover:hover { color: hsl(var(--primary)) !important; }
.link-secondary-hover:hover { color: hsl(var(--muted-foreground)) !important; }

/* === Trix Editor dark glass theme === */
trix-toolbar {
    background: rgba(255, 255, 255, 0.055) !important;
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    border-bottom: none !important;
    border-radius: var(--radius) var(--radius) 0 0 !important;
    padding: 0.375rem 0.625rem !important;
}
.trix-button-row {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 0.25rem !important;
    align-items: center !important;
}
.trix-button-group {
    display: inline-flex !important;
    background: rgba(255, 255, 255, 0.06) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: calc(var(--radius) - 2px) !important;
    margin: 0 !important;
    padding: 0.125rem !important;
    gap: 0 !important;
}
.trix-button-group-spacer { flex: 1 !important; }
.trix-button {
    background: transparent !important;
    border: none !important;
    border-radius: 4px !important;
    padding: 0.25rem 0.4rem !important;
    opacity: 0.65 !important;
    filter: invert(1) !important;
    cursor: pointer !important;
    height: 1.75rem !important;
    min-width: 1.75rem !important;
    transition: opacity 0.15s ease, background 0.15s ease !important;
}
.trix-button:hover {
    background: rgba(255, 255, 255, 0.12) !important;
    opacity: 1 !important;
}
.trix-button.trix-active {
    background: rgba(147, 87, 255, 0.3) !important;
    opacity: 1 !important;
}
.trix-button:disabled { opacity: 0.25 !important; cursor: default !important; }
.trix-button--dialog {
    filter: none !important;
    background: hsl(var(--primary)) !important;
    color: #fff !important;
    opacity: 1 !important;
    padding: 0.3rem 0.75rem !important;
    font-size: 0.8125rem !important;
    font-weight: 500 !important;
    border-radius: calc(var(--radius) - 2px) !important;
}
.trix-button--dialog:hover { background: hsl(var(--primary) / 0.85) !important; }
trix-editor {
    background: rgba(255, 255, 255, 0.04) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    border-top: none !important;
    border-radius: 0 0 var(--radius) var(--radius) !important;
    color: rgba(255, 255, 255, 0.92) !important;
    padding: 0.75rem 1rem !important;
    min-height: 10rem !important;
    outline: none !important;
    caret-color: hsl(var(--primary));
}
trix-editor:focus {
    border-color: rgba(255, 255, 255, 0.22) !important;
}
/* Link dialog popup */
.trix-dialog {
    background: rgba(14, 8, 38, 0.96) !important;
    backdrop-filter: blur(24px) !important;
    -webkit-backdrop-filter: blur(24px) !important;
    border: 1px solid rgba(255, 255, 255, 0.14) !important;
    border-radius: var(--radius) !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5) !important;
    padding: 0.75rem !important;
}
.trix-dialog__link-fields {
    display: flex !important;
    gap: 0.5rem !important;
    align-items: center !important;
}
.trix-input--dialog {
    background: hsl(var(--input)) !important;
    border: 1px solid rgba(255, 255, 255, 0.18) !important;
    border-radius: calc(var(--radius) - 2px) !important;
    color: #fff !important;
    padding: 0.375rem 0.625rem !important;
    font-size: 0.875rem !important;
    flex: 1 !important;
    outline: none !important;
}
.trix-input--dialog:focus { border-color: rgba(255, 255, 255, 0.38) !important; }
