/* Base fallback styles for components and small custom utilities */
:root {
    color-scheme: dark;
}
body {
    margin: 0;
    min-height: 100vh;
    font-family: Inter, ui-sans-serif, system-ui, sans-serif;
    background-color: #020617;
    color: #e2e8f0;
}

/* Form and content helpers */
.form-field {
    margin-bottom: 1rem;
}
.form-field label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #cbd5e1;
}
.form-field input,
.form-field textarea {
    width: 100%;
    border-radius: 1rem;
    border: 1px solid #334155;
    background-color: #111827;
    padding: 0.85rem 1rem;
    color: #e2e8f0;
}
.form-field textarea {
    min-height: 160px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 1rem;
    padding: 0.8rem 1.25rem;
    font-weight: 600;
    color: white;
    background-color: #8b5cf6;
    border: 1px solid transparent;
    transition: background-color 200ms ease, transform 200ms ease;
}
.btn:hover {
    background-color: #7c3aed;
}
.btn-secondary {
    background-color: #111827;
    color: #cbd5e1;
    border: 1px solid #334155;
}
.btn-secondary:hover {
    background-color: #1f2937;
}

.table-component {
    background: #020617;
}
.table-component table {
    width: 100%;
    border-collapse: collapse;
}
.table-component th,
.table-component td {
    padding: 1rem 1rem;
    border-bottom: 1px solid #1f2937;
    text-align: left;
}
.table-component th {
    font-size: 0.95rem;
    font-weight: 700;
    color: #cbd5e1;
    background-color: #020617;
}
.table-component td {
    color: #e2e8f0;
}
.table-component tr:hover td {
    background-color: #111827;
}

.toolbar-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
    margin-bottom: 1.5rem;
}

.sidebar-nav .nav-link {
    display: block;
    width: 100%;
    border-radius: 1.5rem;
    padding: 0.85rem 1rem;
    text-decoration: none;
    transition: background-color 200ms ease, color 200ms ease;
    color: #cbd5e1;
}
.sidebar-nav .nav-link:hover {
    background-color: #111827;
    color: white;
}
.sidebar-nav .nav-link.active {
    background-color: #171d2f;
    color: white;
}

.content-panel,
.rounded-[28px] {
    background-color: #020617;
    border-color: #1f2937;
}

.panel-header h2,
h3 {
    color: #f8fafc;
}

.chat-widget-container {
    position: fixed;
    right: 1.5rem;
    bottom: 1.5rem;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.75rem;
}
.chat-button {
    padding: 0;
    border: none;
    border-radius: 999px;
    background-color: #7c3aed;
    color: white;
    cursor: pointer;
    width: 3.5rem;
    height: 3.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: 0 24px 60px rgba(124, 58, 237, 0.24);
}
.chat-button:hover {
    background-color: #6d28d9;
}
.chat-widget {
    width: 20rem;
    max-width: 100%;
    background: #111827;
    border: 1px solid #334155;
    border-radius: 1.5rem;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.32);
    display: none;
    flex-direction: column;
    overflow: hidden;
}
.chat-widget.open {
    display: flex;
}
.chat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #334155;
}
.chat-title {
    font-size: 1rem;
    font-weight: 700;
    color: #f8fafc;
}
.chat-messages {
    padding: 1rem;
    min-height: 16rem;
    max-height: 18rem;
    overflow-y: auto;
    background-color: #0f172a;
}
.chat-form {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1rem 1.25rem;
    border-top: 1px solid #334155;
    background-color: #111827;
}
.chat-form input {
    flex: 1;
    border-radius: 1.25rem;
    border: 1px solid #334155;
    background-color: #0f172a;
    padding: 0.95rem 1rem;
    color: #000000;
}
.chat-form button {
    border-radius: 1.25rem;
    border: none;
    background-color: #8b5cf6;
    color: white;
    padding: 0.9rem 1.25rem;
    font-weight: 600;
}
.chat-button.pulse {
    animation: chat-pulse 1.6s ease-in-out infinite;
    box-shadow: 0 0 0 0 rgba(140, 92, 246, 0.45);
}
.chat-button.hidden {
    display: none;
}
@keyframes chat-pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(140, 92, 246, 0.45);
    }
    50% {
        transform: scale(1.08);
        box-shadow: 0 0 0 14px rgba(140, 92, 246, 0.18);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(140, 92, 246, 0);
    }
}

/* Chat widget overrides for Tailwind-like look */
.chat-widget-container {
    position: fixed;
    right: 1.5rem;
    bottom: 1.5rem;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.75rem;
}
.chat-button {
    padding: 0;
    border: none;
    border-radius: 999px;
    background-color: #06b6d4;
    color: white;
    cursor: pointer;
    width: 3.5rem;
    height: 3.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.16);
}
.chat-button:hover {
    background-color: #0ea5e9;
}
.chat-widget {
    width: 20rem;
    max-width: 100%;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 1.5rem;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.12);
    display: none;
    flex-direction: column;
    overflow: hidden;
}
.chat-widget.open {
    display: flex;
}
.chat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #e2e8f0;
}
.chat-title {
    font-size: 1rem;
    font-weight: 700;
    color: #0f172a;
}
.chat-messages {
    padding: 1rem;
    min-height: 16rem;
    max-height: 18rem;
    overflow-y: auto;
    background-color: #f8fafc;
}
.chat-form {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1rem 1.25rem;
    border-top: 1px solid #e2e8f0;
    background-color: #ffffff;
}
.chat-form input {
    flex: 1;
    border-radius: 1.25rem;
    border: 1px solid #e2e8f0;
    background-color: #f8fafc;
    padding: 0.95rem 1rem;
}
.chat-form button {
    border-radius: 1.25rem;
    border: none;
    background-color: #06b6d4;
    color: white;
    padding: 0.9rem 1.25rem;
    font-weight: 600;
}
.chat-button.pulse {
    animation: chat-pulse 1.6s ease-in-out infinite;
    box-shadow: 0 0 0 0 rgba(6, 182, 212, 0.45);
}
.chat-button.hidden {
    display: none;
}
@keyframes chat-pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(6, 182, 212, 0.45);
    }
    50% {
        transform: scale(1.08);
        box-shadow: 0 0 0 14px rgba(6, 182, 212, 0.18);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(6, 182, 212, 0);
    }
}

.bg-table {
  background-color: #ffffff08;
}