/* NOTE: App uses a dark gradient theme (see templates/base.html). */

:root {
    --ui-surface: rgba(255, 255, 255, 0.03);
    --ui-surface-2: rgba(255, 255, 255, 0.06);
    --ui-border: rgba(255, 255, 255, 0.10);
    --ui-border-strong: rgba(255, 255, 255, 0.18);
    --ui-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
    --ui-shadow-soft: 0 4px 12px rgba(0, 0, 0, 0.20);
    --ui-focus: 0 0 0 0.2rem rgba(129, 140, 248, 0.35);
}

body {
    color: var(--text-primary, #ffffff);
}

h1, h2, h3, h4, h5, h6 {
    color: var(--text-primary, #ffffff);
    letter-spacing: 0.01em;
}

/* Guardrail: avoid dark utility text on dark card surfaces */
.card .text-dark:not(.badge):not(.btn):not(.dropdown-item) {
    color: var(--text-primary, #ffffff) !important;
}

/* Panels / cards */
.card,
.panel,
.glass-card {
    background: var(--ui-surface);
    border: 1px solid var(--ui-border);
    box-shadow: var(--ui-shadow-soft);
    border-radius: 12px;
    backdrop-filter: blur(8px);
}

.card:hover,
.panel:hover,
.glass-card:hover {
    border-color: var(--ui-border-strong);
    box-shadow: var(--ui-shadow);
    transition: box-shadow .2s ease, border-color .2s ease;
}

/* Tables */
.table {
    --bs-table-bg: transparent;
    --bs-table-color: var(--text-primary, #fff);
    --bs-table-border-color: var(--ui-border);
}

.table thead th {
    color: var(--text-secondary, rgba(255,255,255,.7));
    font-weight: 600;
    border-bottom-width: 1px;
}

.table tbody tr:hover {
    background: var(--ui-surface-2);
}

/* Forms */
.form-control,
.form-select,
textarea {
    background-color: rgba(0, 0, 0, 0.20);
    border: 1px solid var(--ui-border);
    color: var(--text-primary, #fff);
}

.form-control::placeholder,
textarea::placeholder {
    color: rgba(255, 255, 255, 0.45);
}

.form-control:focus,
.form-select:focus,
textarea:focus {
    background-color: rgba(0, 0, 0, 0.25);
    border-color: var(--accent-secondary, #818cf8);
    color: var(--text-primary, #fff);
    box-shadow: var(--ui-focus);
}

/* Buttons */
.btn {
    border-radius: 10px;
    font-weight: 600;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-primary, #6366f1), var(--accent-secondary, #818cf8));
    border: none;
}

.btn-primary:hover,
.btn-primary:focus {
    filter: brightness(1.06);
    transform: translateY(-1px);
}

.btn-outline-light {
    border-color: var(--ui-border-strong);
}

/* Utility helpers */
.muted {
    color: var(--text-secondary, rgba(255,255,255,.7));
}

.section-divider {
    border-top: 1px solid var(--ui-border);
    margin: 1rem 0 1.5rem;
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
    * {
        transition: none !important;
        animation: none !important;
    }
}
