:root {
    color-scheme: dark;
}

html:not(.dark) {
    color-scheme: light;
}

body {
    background:
        radial-gradient(circle at 12% 8%, rgba(99, 102, 241, 0.16), transparent 32%),
        radial-gradient(circle at 88% 92%, rgba(16, 185, 129, 0.09), transparent 34%),
        #020617;
}

.panel {
    background: rgba(15, 23, 42, 0.78);
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 16px;
    box-shadow: 0 14px 40px rgba(2, 6, 23, 0.35);
    backdrop-filter: blur(8px);
}

.field {
    width: 100%;
    margin-top: 0.375rem;
    border-radius: 0.75rem;
    border: 1px solid rgba(100, 116, 139, 0.45);
    background: rgba(30, 41, 59, 0.72);
    padding: 0.625rem 0.75rem;
    color: #e2e8f0;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

.field:focus {
    outline: none;
    border-color: rgba(99, 102, 241, 0.85);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.22);
}

.btn-primary {
    border-radius: 0.75rem;
    background: linear-gradient(135deg, #6366f1, #4f46e5);
    color: #ffffff;
    font-weight: 600;
    transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 26px rgba(79, 70, 229, 0.35);
}

.btn-secondary {
    border-radius: 0.75rem;
    border: 1px solid rgba(100, 116, 139, 0.45);
    background: rgba(30, 41, 59, 0.72);
    color: #cbd5e1;
}

html:not(.dark) body {
    background:
        radial-gradient(circle at 10% 10%, rgba(99, 102, 241, 0.12), transparent 32%),
        radial-gradient(circle at 92% 90%, rgba(16, 185, 129, 0.08), transparent 34%),
        #f8fafc !important;
    color: #0f172a !important;
}

html:not(.dark) .bg-slate-950,
html:not(.dark) .bg-slate-900 {
    background-color: #ffffff !important;
    color: #0f172a !important;
}

html:not(.dark) .border-slate-800,
html:not(.dark) .border-slate-700 {
    border-color: #cbd5e1 !important;
}

html:not(.dark) .text-slate-400,
html:not(.dark) .text-slate-300 {
    color: #475569 !important;
}

html:not(.dark) .bg-slate-800,
html:not(.dark) .bg-slate-700 {
    background-color: #f1f5f9 !important;
    color: #0f172a !important;
}

html:not(.dark) .panel {
    background: rgba(255, 255, 255, 0.88);
    border-color: rgba(148, 163, 184, 0.45);
    box-shadow: 0 16px 36px rgba(15, 23, 42, 0.08);
}

html:not(.dark) .field {
    background: #ffffff;
    border-color: #cbd5e1;
    color: #0f172a;
}

html:not(.dark) .btn-secondary {
    background: #ffffff;
    border-color: #cbd5e1;
    color: #334155;
}

.kanban-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(280px, 1fr));
    gap: 12px;
    overflow-x: auto;
}

.kanban-column {
    background: #0f172a;
    border: 1px solid #1e293b;
    border-radius: 12px;
    min-height: 420px;
    display: flex;
    flex-direction: column;
}

html:not(.dark) .kanban-column {
    background: #ffffff;
    border-color: #cbd5e1;
}

.kanban-column-body {
    padding: 8px;
    flex: 1;
    overflow-y: auto;
    max-height: calc(100vh - 280px);
}

.lead-card {
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 10px;
    padding: 10px;
    margin-bottom: 8px;
    cursor: pointer;
}

html:not(.dark) .lead-card {
    background: #f8fafc;
    border-color: #cbd5e1;
}

.lead-card .lead-title {
    font-size: 14px;
    font-weight: 600;
}

.lead-card .lead-meta {
    font-size: 12px;
    color: #94a3b8;
}

html:not(.dark) .lead-card .lead-meta {
    color: #475569;
}

.drag-ghost {
    opacity: 0.5;
}

@media (max-width: 980px) {
    .kanban-grid {
        display: flex;
        flex-wrap: nowrap;
    }

    .kanban-column {
        min-width: 300px;
        max-width: 300px;
    }
}
