:root {
    --color-bg: oklch(86.9% 0.005 56.366);
    /* light neutral */
    --color-surface: #ffffff;
    /* white */
    --color-text: #1e293b;
    /* slate-800 */
    /* Calm Tailwind palette */
    --color-primary: #0e7490;
    /* cyan-700 */
    --color-accent: #0ea5e9;
    /* sky-500 */
    --color-danger: #dc2626;
    /* red-600 */
    --color-success: #16a34a;
    /* green-600 */
    --color-nav: #0f172a;
    /* slate-900 */
    --color-footer: #0f172a;
    /* slate-900 */
    --color-border: #e5e7eb;
    --bg-image: none;
    /* optional: set to url('...') */
    --font-body: 'Manrope', 'Inter', system-ui, -apple-system, sans-serif;
    --font-heading: 'Manrope', 'Inter', system-ui, -apple-system, sans-serif;
    --text-base: 16px;
    --text-lg: 18px;
    --text-xl: 20px;
    --text-2xl: 24px;
    --text-3xl: 30px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --shadow-card: 0 10px 25px rgba(0, 0, 0, 0.08);
    --shadow-btn: 0 8px 16px rgba(56, 189, 248, 0.3);
}

html {
    scroll-behavior: smooth;
}

html,
body {
    background-color: var(--color-bg);
    color: var(--color-text);
}

.theme-body {
    background-color: var(--color-bg);
    color: var(--color-text);
    min-height: 100vh;
    font-family: var(--font-body);
    font-size: var(--text-base);
    line-height: 1.6;
}

.page-shell {
    background-color: var(--color-bg);
    min-height: 100vh;
    padding: 0;
    padding-top: 72px;
}

.theme-navbar {
    background: var(--color-nav);
    color: #f8fafc;
    /* slate-50 */
}

.theme-navbar a {
    color: #f8fafc;
}

.theme-navbar a:hover {
    color: #fbbf24;
}

/* amber-400 */

.mobile-menu.theme-navbar {
    background: var(--color-nav);
    color: #f8fafc;
}

.theme-footer {
    background: var(--color-footer);
    color: #f8fafc;
}

.theme-footer a {
    color: #f8fafc;
}

.theme-footer a:hover {
    color: #fbbf24;
}

.nav-link {
    color: #f8fafc;
    font-weight: 500;
    padding: 0.35rem 0.15rem;
    transition: color 0.2s ease, opacity 0.2s ease;
}

.nav-link:hover {
    color: #fbbf24;
}

/* Brand utility overrides to avoid hard-coded blues across pages */
.text-ftcblue {
    color: var(--color-primary) !important;
}

.bg-ftcblue {
    background-color: var(--color-primary) !important;
    color: #fff;
}

.border-ftcblue {
    border-color: var(--color-primary) !important;
}

.focus\:ring-ftcblue:focus {
    --tw-ring-color: var(--color-primary) !important;
}

.logout-link {
    color: #ef4444 !important;
    /* red-500 */
}

.logout-link:hover {
    color: #f87171 !important;
    /* red-400 */
}

.login-link {
    color: #16a34a !important;
    /* green-600 */
}

.login-link:hover {
    color: #22c55e !important;
    /* green-500 */
}

.theme-body h1,
.theme-body .h1 {
    font-family: var(--font-heading);
    font-size: var(--text-3xl);
    font-weight: 700;
}

.theme-body h2,
.theme-body .h2 {
    font-family: var(--font-heading);
    font-size: var(--text-2xl);
    font-weight: 700;
}

.theme-body h3,
.theme-body .h3 {
    font-family: var(--font-heading);
    font-size: var(--text-xl);
    font-weight: 700;
}

.theme-body p,
.theme-body li {
    font-size: var(--text-base);
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    padding: 0.65rem 1.2rem;
    background: var(--color-primary);
    color: #fff;
    border-radius: var(--radius-md);
    border: none;
    box-shadow: 0 8px 16px color-mix(in oklab, var(--color-primary) 35%, transparent);
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, filter 0.2s ease;
}

.btn-primary:hover {
    transform: translateY(-1px);
    filter: brightness(0.95);
    box-shadow: 0 10px 20px color-mix(in oklab, var(--color-primary) 45%, transparent);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    padding: 0.65rem 1.2rem;
    background: #fff;
    color: var(--color-text);
    border-radius: var(--radius-md);
    border: 1px solid color-mix(in srgb, var(--color-nav) 25%, #e5e7eb);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.btn-secondary:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 18px rgba(0, 0, 0, 0.08);
    border-color: color-mix(in srgb, var(--color-nav) 35%, #d1d5db);
}

.btn-secondary:active {
    transform: translateY(0);
}

.btn-danger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    padding: 0.65rem 1.2rem;
    background: var(--color-danger);
    color: #fff;
    border: none;
    border-radius: var(--radius-md);
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn-danger:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 20px rgba(220, 38, 38, 0.35);
}

.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.6rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    background: var(--color-bg);
    color: var(--color-text);
}

.alert {
    border-radius: var(--radius-md);
    padding: 0.75rem 1rem;
    border: 1px solid var(--color-border);
}

.alert-success {
    background: #ecfdf3;
    color: #166534;
    border-color: #bbf7d0;
}

.alert-error {
    background: #fef2f2;
    color: #b91c1c;
    border-color: #fecdd3;
}

.alert-info {
    background: #eff6ff;
    color: #1d4ed8;
    border-color: #bfdbfe;
}

.input {
    width: 100%;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 0.65rem 0.85rem;
    background: #e6e6e6;
    box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.08);
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

.input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.2), inset 0 1px 2px rgba(15, 23, 42, 0.08);
}

.panel {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    padding: 1.5rem;
}

.card {
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
}

.panel-header {
    border-bottom: 1px solid var(--color-border);
    padding-bottom: 0.75rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.table-default {
    width: 100%;
    border-collapse: collapse;
    border: 1px solid var(--color-border);
    font-size: 0.95rem;
}

.table-default th,
.table-default td {
    padding: 0.65rem 0.75rem;
    border-bottom: 1px solid var(--color-border);
}

.table-default thead {
    background: #f8fafc;
}

.table-default tbody tr:nth-child(odd) {
    background: #f9fafb;
}

#back-to-top {
    background: rgba(255, 255, 255, 0.8);
    color: var(--color-nav);
    border-color: rgba(255, 255, 255, 0.9);
}

.modal-backdrop {
    background: rgba(0, 0, 0, 0.6);
}

.modal-card {
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    border: 1px solid var(--color-border);
}

.image-library-container {
    display: block;
    width: 100%;
    position: relative;
    overflow: hidden;
}

/* Global cursor style for clickable elements */
:where(a, button, input[type="submit"], input[type="button"], input[type="reset"], [role="button"], label, select, .btn, [onclick]) {
    cursor: pointer;
}

/* Make labels larger/bolder on the learning module editor page */
#module-edit-form label {
    font-size: 0.95rem;
    font-weight: 700;
}

#functions-panel,
#functions-panel span {
    color: var(--color-text);
}
