:root {
    --ds-brand: #F13606;
    --ds-brand-dark: #D63005;
    --ds-brand-soft: #fff1ed;
    --ds-brand-glow: rgba(241, 54, 6, 0.24);
    --ds-bg: #f1f5f9;
    --ds-card: #ffffff;
    --ds-border: #dbe3ee;
    --ds-text: #0f172a;
    --ds-muted: #64748b;
    --ds-radius-sm: 6px;
    --ds-radius-md: 10px;
    --ds-radius-lg: 14px;
    --ds-shadow: 0 10px 30px rgba(2, 6, 23, 0.05);
}

body.bg-slate-100 {
    background:
        radial-gradient(circle at 8% 6%, rgba(241, 54, 6, 0.08), transparent 28%),
        radial-gradient(circle at 92% 92%, rgba(14, 165, 233, 0.04), transparent 24%),
        var(--ds-bg);
    color: var(--ds-text);
}

body.bg-slate-100 main {
    letter-spacing: 0.005em;
}

body.bg-slate-100 .rounded-xl,
body.bg-slate-100 .rounded-2xl {
    border-radius: var(--ds-radius-lg);
}

body.bg-slate-100 .rounded-lg {
    border-radius: var(--ds-radius-md);
}

body.bg-slate-100 .shadow-sm,
body.bg-slate-100 .shadow,
body.bg-slate-100 .shadow-xl {
    box-shadow: 0 14px 34px rgba(2, 6, 23, 0.06) !important;
}

body.bg-slate-100 .bg-white {
    background-color: var(--ds-card) !important;
}

body.bg-slate-100 .border-slate-200,
body.bg-slate-100 .border-slate-300 {
    border-color: var(--ds-border) !important;
}

body.bg-slate-100 input[type="text"],
body.bg-slate-100 input[type="email"],
body.bg-slate-100 input[type="password"],
body.bg-slate-100 input[type="number"],
body.bg-slate-100 input[type="date"],
body.bg-slate-100 input[type="datetime-local"],
body.bg-slate-100 textarea,
body.bg-slate-100 select {
    border-radius: var(--ds-radius-sm) !important;
    border-color: #c7d2e1 !important;
    background: #fbfdff !important;
    color: var(--ds-text) !important;
    transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease;
}

body.bg-slate-100 input:focus,
body.bg-slate-100 select:focus,
body.bg-slate-100 textarea:focus {
    outline: none;
    border-color: var(--ds-brand) !important;
    box-shadow: 0 0 0 3px rgba(241, 54, 6, 0.14) !important;
    background: #fff !important;
}

body.bg-slate-100 button,
body.bg-slate-100 .btn,
body.bg-slate-100 a[class*="bg-brand-"],
body.bg-slate-100 a[class*="bg-[#F13606]"] {
    border-radius: var(--ds-radius-sm);
}

body.bg-slate-100 .bg-brand-600,
body.bg-slate-100 .bg-\[\#F13606\] {
    background-color: var(--ds-brand) !important;
}

body.bg-slate-100 .hover\:bg-brand-700:hover {
    background-color: var(--ds-brand-dark) !important;
}

body.bg-slate-100 table thead {
    background: #f8fafc;
}

body.bg-slate-100 table thead th {
    color: #475569;
    font-size: 11px;
    letter-spacing: 0.08em;
}

body.bg-slate-100 table tbody tr:hover {
    background: rgba(241, 245, 249, 0.7);
}

body.bg-slate-100 .overflow-x-auto {
    border-radius: 12px;
}

body.bg-slate-100 .ds-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: #fff;
}

body.bg-slate-100 .ds-table thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    background: #f8fafc;
    border-bottom: 1px solid #dbe3ee;
}

body.bg-slate-100 .ds-table tbody td {
    border-bottom: 1px solid #eef2f7;
    color: #0f172a;
}

body.bg-slate-100 .ds-table tbody tr:last-child td {
    border-bottom: 0;
}

body.bg-slate-100 .ds-table tbody tr:nth-child(even) {
    background: #fcfdff;
}

body.bg-slate-100 .ds-table tbody tr:hover {
    background: #f6f9fc;
}

body.bg-slate-100 .ds-empty {
    text-align: center;
    padding: 28px 12px !important;
    color: #64748b !important;
    font-weight: 500;
}

body.bg-slate-100 .ds-nav-item {
    border: 1px solid transparent;
    transition: all .16s ease;
    position: relative;
    overflow: hidden;
}

body.bg-slate-100 .ds-nav-item:hover {
    border-color: #d6deea;
    transform: translateX(2px);
}

body.bg-slate-100 .ds-nav-item.ds-active {
    background: linear-gradient(135deg, #F13606 0%, #D63005 100%);
    border-color: #c82c04;
    color: #fff;
    box-shadow: 0 10px 24px rgba(241, 54, 6, 0.32);
}

body.bg-slate-100 * {
    transition: background-color .14s ease, border-color .14s ease, color .14s ease, box-shadow .14s ease;
}

body.bg-slate-100 .ds-nav-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 800;
    background: #e2e8f0;
    color: #475569;
}

body.bg-slate-100 .ds-nav-item.ds-active .ds-nav-icon {
    background: rgba(255, 255, 255, 0.25);
    color: #fff;
}

body.bg-slate-100 .ds-sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    z-index: 25;
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s ease;
}

body.bg-slate-100 .ds-sidebar {
    z-index: 30;
    box-shadow: 6px 0 24px rgba(2, 6, 23, 0.04);
}

body.bg-slate-100 .ds-sidebar::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 3px;
    background: linear-gradient(180deg, var(--ds-brand) 0%, transparent 75%);
    opacity: .85;
}

body.bg-slate-100 .ds-toast-wrap {
    position: fixed;
    right: 18px;
    top: 88px;
    z-index: 70;
    display: grid;
    gap: 10px;
    width: min(360px, calc(100vw - 32px));
}

body.bg-slate-100 .ds-toast {
    border-radius: 12px;
    border: 1px solid #dbe3ee;
    background: #fff;
    box-shadow: 0 16px 34px rgba(2, 6, 23, 0.2);
    padding: 10px 12px;
    transform: translateY(-8px);
    opacity: 0;
    animation: dsToastIn .2s ease forwards;
}

body.bg-slate-100 .ds-toast-title {
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: #0f172a;
}

body.bg-slate-100 .ds-toast-msg {
    font-size: 13px;
    color: #334155;
    margin-top: 2px;
}

body.bg-slate-100 .ds-toast-success {
    border-color: #9ddfbd;
    background: #f0fdf4;
}

body.bg-slate-100 .ds-toast-error {
    border-color: #fecaca;
    background: #fef2f2;
}

body.bg-slate-100 .ds-toast-info {
    border-color: #bfdbfe;
    background: #eff6ff;
}

body.bg-slate-100 .ds-btn-loading {
    position: relative;
    pointer-events: none;
    opacity: .82;
}

body.bg-slate-100 .ds-btn-loading::after {
    content: "";
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255,255,255,.7);
    border-right-color: transparent;
    border-radius: 999px;
    position: absolute;
    right: 10px;
    top: calc(50% - 7px);
    animation: dsSpin .8s linear infinite;
}

body.bg-slate-100 .bg-brand-600,
body.bg-slate-100 .bg-\[\#F13606\] {
    background: linear-gradient(135deg, #F13606 0%, #D63005 100%) !important;
}

body.bg-slate-100 .bg-brand-50 {
    background: var(--ds-brand-soft) !important;
}

body.bg-slate-100 .text-brand-600 {
    color: var(--ds-brand) !important;
}

body.bg-slate-100 .border-brand-600 {
    border-color: var(--ds-brand) !important;
}

body.bg-slate-100 button:not(:disabled),
body.bg-slate-100 .btn:not(.disabled):not(:disabled),
body.bg-slate-100 a.bg-brand-600 {
    box-shadow: 0 8px 18px rgba(241, 54, 6, 0.18);
}

body.bg-slate-100 button:hover:not(:disabled),
body.bg-slate-100 .btn:hover:not(.disabled),
body.bg-slate-100 a.bg-brand-600:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 22px rgba(241, 54, 6, 0.24);
}

body.bg-slate-100 header.sticky.top-0 {
    box-shadow: 0 6px 22px rgba(15, 23, 42, 0.06);
}

@keyframes dsSpin {
    to { transform: rotate(360deg); }
}

@keyframes dsToastIn {
    to { transform: translateY(0); opacity: 1; }
}

@media (max-width: 1023px) {
    body.bg-slate-100 .ds-sidebar {
        position: fixed;
        top: 73px;
        left: 0;
        bottom: 0;
        height: auto;
        transform: translateX(-100%);
        transition: transform .22s ease;
    }
    body.bg-slate-100.ds-sidebar-open .ds-sidebar {
        transform: translateX(0);
    }
    body.bg-slate-100.ds-sidebar-open .ds-sidebar-overlay {
        opacity: 1;
        pointer-events: auto;
    }
}

/* Conversations: premium inbox treatment without touching backend behavior */
body.conversations-page main > .grid.gap-6.lg\:grid-cols-12 {
    gap: 18px;
}

body.conversations-page .lg\:col-span-3,
body.conversations-page .lg\:col-span-6 {
    border-radius: 14px;
}

body.conversations-page .lg\:col-span-3.rounded-xl.border,
body.conversations-page .lg\:col-span-6 > .rounded-xl.border,
body.conversations-page .lg\:col-span-3.space-y-4 > .rounded-xl.border {
    border-color: #dbe3ee !important;
    box-shadow: 0 10px 30px rgba(2, 6, 23, 0.05) !important;
}

body.conversations-page .lg\:col-span-6 > .rounded-xl.border > h2,
body.conversations-page .lg\:col-span-6 > .rounded-xl.border > h3,
body.conversations-page .lg\:col-span-3.space-y-4 .rounded-xl.border > h3 {
    margin: 0;
    padding: 14px 16px;
    border-bottom: 1px solid #e5edf6;
    background: linear-gradient(180deg, #fbfdff 0%, #f8fafc 100%);
    border-top-left-radius: 14px;
    border-top-right-radius: 14px;
}

body.conversations-page .lg\:col-span-6 > .rounded-xl.border > h2 + *,
body.conversations-page .lg\:col-span-6 > .rounded-xl.border > h3 + *,
body.conversations-page .lg\:col-span-3.space-y-4 .rounded-xl.border > h3 + * {
    margin-top: 0 !important;
    padding: 14px 16px;
}

body.conversations-page .max-h-\[52vh\].space-y-3.overflow-auto.rounded-lg.bg-slate-50 {
    background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%) !important;
    border: 1px solid #dbe3ee;
}

body.conversations-page .max-w-\[80\%\].rounded-lg.border {
    border-radius: 12px;
}

body.conversations-page .ml-auto.bg-brand-600.text-white.max-w-\[80\%\].rounded-lg.border {
    background: linear-gradient(135deg, #F13606 0%, #D63005 100%) !important;
    border-color: #c52e05 !important;
    box-shadow: 0 10px 20px rgba(241, 54, 6, 0.2);
}

body.conversations-page .mr-auto.bg-white.text-slate-900.max-w-\[80\%\].rounded-lg.border {
    border-color: #dbe3ee !important;
}

body.conversations-page .contact-row {
    transition: background-color .12s ease;
}

body.conversations-page .contact-row .truncate {
    font-weight: 700;
}

body.conversations-page #bulk-apply-btn {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
}

body.conversations-page .bg-brand-50 {
    background: #fff4ef !important;
}

@media (max-width: 1280px) {
    body.conversations-page .grid.gap-6.lg\:grid-cols-12 {
        grid-template-columns: 1fr !important;
    }
    body.conversations-page .max-h-\[58vh\].overflow-auto,
    body.conversations-page .max-h-\[52vh\].space-y-3.overflow-auto.rounded-lg.bg-slate-50 {
        max-height: 45vh;
    }
}
