/* Dark space theme — Dijkxhoorn Projectbeheer */

.space-theme {
    background-color: #030712;
    background-image:
        radial-gradient(ellipse 80% 50% at 50% -20%, rgba(99, 102, 241, 0.25), transparent),
        radial-gradient(ellipse 60% 40% at 100% 0%, rgba(168, 85, 247, 0.12), transparent),
        radial-gradient(ellipse 50% 30% at 0% 100%, rgba(14, 165, 233, 0.1), transparent),
        radial-gradient(1px 1px at 20px 30px, rgba(255, 255, 255, 0.35), transparent),
        radial-gradient(1px 1px at 80px 120px, rgba(255, 255, 255, 0.2), transparent),
        radial-gradient(1px 1px at 160px 60px, rgba(255, 255, 255, 0.25), transparent),
        radial-gradient(1px 1px at 240px 180px, rgba(255, 255, 255, 0.15), transparent),
        radial-gradient(1px 1px at 320px 40px, rgba(255, 255, 255, 0.3), transparent),
        radial-gradient(1px 1px at 400px 140px, rgba(255, 255, 255, 0.2), transparent);
    background-size: 100% 100%, 100% 100%, 100% 100%, 450px 200px, 450px 200px, 450px 200px, 450px 200px, 450px 200px, 450px 200px;
    color: #e2e8f0;
}

.space-nav {
    background: rgba(3, 7, 18, 0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

.space-card {
    background: rgba(15, 23, 42, 0.55);
    border: 1px solid rgba(148, 163, 184, 0.15);
    backdrop-filter: blur(16px);
    box-shadow: 0 0 40px rgba(99, 102, 241, 0.08);
}

.space-card-red {
    border-color: rgba(248, 113, 113, 0.35);
    box-shadow: 0 0 48px rgba(239, 68, 68, 0.12);
}

.space-card-amber {
    border-color: rgba(251, 191, 36, 0.35);
    box-shadow: 0 0 48px rgba(245, 158, 11, 0.1);
}

.space-card-violet {
    border-color: rgba(167, 139, 250, 0.35);
    box-shadow: 0 0 48px rgba(139, 92, 246, 0.12);
}

.space-card-cyan {
    border-color: rgba(34, 211, 238, 0.35);
    box-shadow: 0 0 48px rgba(6, 182, 212, 0.12);
}

.space-stat-value {
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.02em;
}

.space-scroll-hint {
    animation: space-float 2.5s ease-in-out infinite;
}

@keyframes space-float {
    0%, 100% { transform: translateY(0); opacity: 0.7; }
    50% { transform: translateY(6px); opacity: 1; }
}

/* Donkere varianten voor bestaande pagina's (project, KPI, …) */
.space-theme .bg-white {
    background-color: rgba(15, 23, 42, 0.65) !important;
}

.space-theme .bg-gray-50,
.space-theme .bg-gray-100 {
    background-color: rgba(30, 41, 59, 0.5) !important;
}

.space-theme .border-gray-100,
.space-theme .border-gray-200,
.space-theme .border-gray-300 {
    border-color: rgba(148, 163, 184, 0.2) !important;
}

.space-theme .text-gray-900 {
    color: #f1f5f9 !important;
}

.space-theme .text-gray-800 {
    color: #e2e8f0 !important;
}

.space-theme .text-gray-700,
.space-theme .text-gray-600 {
    color: #cbd5e1 !important;
}

.space-theme .text-gray-500,
.space-theme .text-gray-400 {
    color: #94a3b8 !important;
}

.space-theme .divide-gray-100 > :not([hidden]) ~ :not([hidden]),
.space-theme .divide-gray-200 > :not([hidden]) ~ :not([hidden]) {
    border-color: rgba(148, 163, 184, 0.15) !important;
}

.space-theme input,
.space-theme select,
.space-theme textarea {
    background-color: rgba(15, 23, 42, 0.8) !important;
    color: #e2e8f0 !important;
    border-color: rgba(148, 163, 184, 0.25) !important;
}

.space-theme input::placeholder {
    color: #64748b !important;
}

.space-theme tr:hover {
    background-color: rgba(99, 102, 241, 0.08) !important;
}

.space-theme .hover\:bg-orange-50:hover {
    background-color: rgba(249, 115, 22, 0.1) !important;
}

/* Chatbot widget */
.chatbot-root {
    position: fixed;
    bottom: 1.25rem;
    right: 1.25rem;
    z-index: 60;
}

.chatbot-bubble {
    width: 3.25rem;
    height: 3.25rem;
    border-radius: 9999px;
    background: linear-gradient(135deg, #06b6d4, #6366f1);
    color: #fff;
    box-shadow: 0 8px 32px rgba(6, 182, 212, 0.35);
    border: 1px solid rgba(34, 211, 238, 0.4);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.chatbot-bubble:hover {
    transform: scale(1.05);
    box-shadow: 0 12px 40px rgba(6, 182, 212, 0.45);
}

.chatbot-panel {
    width: min(32rem, calc(100vw - 1.5rem));
    height: min(85vh, 44rem);
    max-height: calc(100vh - 2rem);
    display: flex;
    flex-direction: column;
    border-radius: 1rem;
    overflow: hidden;
}

.chatbot-messages {
    flex: 1;
    overflow-y: auto;
    min-height: 0;
    padding: 1rem 1.125rem;
}

.chatbot-msg {
    display: block;
    width: fit-content;
    max-width: 92%;
    white-space: pre-wrap;
    word-break: break-word;
    font-size: 0.9375rem;
    line-height: 1.55;
    padding: 0.75rem 0.875rem;
    text-align: left;
    text-indent: 0;
}

.chatbot-input {
    display: block;
    width: 100%;
    min-height: 2.75rem;
    max-height: 9rem;
    padding: 0.625rem 0.75rem;
    line-height: 1.45;
    text-align: left;
    text-indent: 0;
    resize: none;
    overflow-y: auto;
    field-sizing: content;
}

@supports not (field-sizing: content) {
    .chatbot-input {
        min-height: 2.75rem;
    }
}

.chatbot-input-row {
    align-items: stretch;
}

.chatbot-send {
    align-self: flex-end;
    min-height: 2.75rem;
    min-width: 2.75rem;
}

.chatbot-hint {
    font-size: 0.6875rem;
    line-height: 1.4;
    color: #64748b;
}

.chatbot-msg-user {
    background: rgba(6, 182, 212, 0.15);
    border: 1px solid rgba(34, 211, 238, 0.25);
    color: #e2e8f0;
}

.chatbot-msg-assistant {
    background: rgba(30, 41, 59, 0.8);
    border: 1px solid rgba(148, 163, 184, 0.2);
    color: #e2e8f0;
}

@media (min-width: 1024px) {
    .chatbot-panel {
        width: min(36rem, calc(100vw - 2rem));
        height: min(88vh, 48rem);
    }
}
