/*
 * Novus UI: shared design tokens and building blocks.
 *
 * One source for color, type, spacing, radius and elevation so the landing
 * page, dashboard, server settings and admin panel look like one product.
 * Brand color stays Discord-style indigo (#5865f2). Components are prefixed
 * `ui-` so they never collide with older page styles while pages migrate.
 */
:root {
    /* Brand */
    --ui-brand: #5865f2;
    --ui-brand-600: #4752c4;
    --ui-brand-700: #3c45a5;
    --ui-brand-50: #f3f4ff;
    --ui-brand-100: #e6e8ff;
    --ui-brand-ring: rgba(88, 101, 242, .22);

    /* Neutrals */
    --ui-ink: #0f172a;
    --ui-text: #334155;
    --ui-muted: #64748b;
    --ui-subtle: #94a3b8;
    --ui-line: #e8ebf3;
    --ui-line-strong: #d7dce8;
    --ui-bg: #ffffff;
    --ui-bg-soft: #f8f9fc;
    --ui-bg-tint: #f5f6ff;

    /* Status */
    --ui-success: #16a34a;
    --ui-success-50: #ecfdf3;
    --ui-warning: #d97706;
    --ui-warning-50: #fffbeb;
    --ui-danger: #dc2626;
    --ui-danger-50: #fef2f2;

    /* Type */
    --ui-font: "Outfit", "Segoe UI", system-ui, -apple-system, sans-serif;
    --ui-text-xs: .75rem;
    --ui-text-sm: .875rem;
    --ui-text-md: 1rem;
    --ui-text-lg: 1.125rem;

    /* Shape & depth */
    --ui-radius-sm: 8px;
    --ui-radius: 12px;
    --ui-radius-lg: 16px;
    --ui-radius-xl: 24px;
    --ui-shadow-sm: 0 1px 2px rgba(15, 23, 42, .06);
    --ui-shadow: 0 1px 2px rgba(15, 23, 42, .05), 0 8px 24px -12px rgba(15, 23, 42, .12);
    --ui-shadow-lg: 0 24px 60px -24px rgba(15, 23, 42, .25);

    /* Layout */
    --ui-container: 1160px;
    --ui-gutter: clamp(16px, 4vw, 32px);
}

/* ---------- Layout ---------- */
.ui-container { width: 100%; max-width: var(--ui-container); margin-inline: auto; padding-inline: var(--ui-gutter); }
.ui-section { padding-block: clamp(64px, 9vw, 112px); }
.ui-section-head { max-width: 680px; margin: 0 auto clamp(32px, 5vw, 56px); text-align: center; }
.ui-kicker { display: inline-block; margin-bottom: 12px; color: var(--ui-brand); font-size: var(--ui-text-xs); font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.ui-title { margin: 0 0 14px; color: var(--ui-ink); font-size: clamp(1.75rem, 3.4vw, 2.5rem); font-weight: 700; letter-spacing: -.03em; line-height: 1.12; }
.ui-lead { margin: 0; color: var(--ui-muted); font-size: var(--ui-text-lg); line-height: 1.65; }

/* ---------- Buttons ---------- */
.ui-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 20px; border: 1px solid transparent; border-radius: var(--ui-radius); font: inherit; font-size: var(--ui-text-sm); font-weight: 600; line-height: 1; text-decoration: none; white-space: nowrap; cursor: pointer; transition: background .15s, border-color .15s, color .15s, box-shadow .15s, transform .15s; }
.ui-btn:focus-visible { outline: none; box-shadow: 0 0 0 4px var(--ui-brand-ring); }
.ui-btn-primary { background: var(--ui-brand); color: #fff; box-shadow: 0 6px 16px -6px rgba(88, 101, 242, .6); }
.ui-btn-primary:hover { background: var(--ui-brand-600); transform: translateY(-1px); }
.ui-btn-secondary { border-color: var(--ui-line-strong); background: #fff; color: var(--ui-ink); }
.ui-btn-secondary:hover { border-color: var(--ui-subtle); background: var(--ui-bg-soft); }
.ui-btn-ghost { background: transparent; color: var(--ui-text); }
.ui-btn-ghost:hover { background: var(--ui-bg-soft); color: var(--ui-ink); }
.ui-btn-lg { min-height: 52px; padding: 0 26px; font-size: var(--ui-text-md); border-radius: 14px; }
.ui-btn-sm { min-height: 34px; padding: 0 12px; font-size: var(--ui-text-xs); border-radius: var(--ui-radius-sm); }

/* ---------- Surfaces ---------- */
.ui-card { border: 1px solid var(--ui-line); border-radius: var(--ui-radius-lg); background: var(--ui-bg); box-shadow: var(--ui-shadow-sm); }
.ui-card-pad { padding: clamp(20px, 3vw, 28px); }
.ui-pill { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border: 1px solid var(--ui-brand-100); border-radius: 999px; background: var(--ui-brand-50); color: var(--ui-brand-700); font-size: var(--ui-text-xs); font-weight: 600; }
.ui-pill-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--ui-success); box-shadow: 0 0 0 3px rgba(22, 163, 74, .18); }
.ui-badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; border-radius: 999px; background: var(--ui-bg-soft); color: var(--ui-muted); font-size: var(--ui-text-xs); font-weight: 600; }
.ui-badge-success { background: var(--ui-success-50); color: var(--ui-success); }
.ui-badge-warning { background: var(--ui-warning-50); color: var(--ui-warning); }
.ui-badge-danger { background: var(--ui-danger-50); color: var(--ui-danger); }
.ui-badge-brand { background: var(--ui-brand-50); color: var(--ui-brand-700); }
.ui-icon { display: inline-grid; flex: 0 0 auto; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: var(--ui-brand-50); color: var(--ui-brand); }
.ui-icon svg { width: 22px; height: 22px; }
.ui-check { display: inline-flex; align-items: center; gap: 8px; color: var(--ui-text); font-size: var(--ui-text-sm); }
.ui-check::before { content: ""; width: 18px; height: 18px; flex: 0 0 18px; border-radius: 50%; background: var(--ui-success-50) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2316a34a' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5L20 7'/%3E%3C/svg%3E") center / 11px no-repeat; }

/* ---------- Forms ---------- */
.ui-input, .ui-select, .ui-textarea { width: 100%; min-height: 44px; padding: 10px 14px; border: 1px solid var(--ui-line-strong); border-radius: var(--ui-radius); background: #fff; color: var(--ui-ink); font: inherit; font-size: var(--ui-text-sm); transition: border-color .15s, box-shadow .15s; }
.ui-input:focus, .ui-select:focus, .ui-textarea:focus { outline: none; border-color: var(--ui-brand); box-shadow: 0 0 0 4px var(--ui-brand-ring); }
.ui-label { display: block; margin-bottom: 6px; color: var(--ui-ink); font-size: var(--ui-text-sm); font-weight: 600; }
.ui-help { margin-top: 6px; color: var(--ui-muted); font-size: var(--ui-text-xs); line-height: 1.5; }

/* ---------- Disclosure (FAQ) ---------- */
.ui-accordion { display: grid; gap: 10px; }
.ui-accordion details { border: 1px solid var(--ui-line); border-radius: var(--ui-radius-lg); background: #fff; transition: border-color .15s, box-shadow .15s; }
.ui-accordion details[open] { border-color: var(--ui-brand-100); box-shadow: var(--ui-shadow); }
.ui-accordion summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 22px; color: var(--ui-ink); font-weight: 600; list-style: none; cursor: pointer; }
.ui-accordion summary::-webkit-details-marker { display: none; }
.ui-accordion summary::after { content: "+"; flex: 0 0 auto; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--ui-bg-soft); color: var(--ui-muted); font-size: 18px; font-weight: 500; transition: transform .2s; }
.ui-accordion details[open] summary::after { transform: rotate(45deg); background: var(--ui-brand-50); color: var(--ui-brand); }
.ui-accordion summary:focus-visible { outline: none; box-shadow: inset 0 0 0 3px var(--ui-brand-ring); border-radius: var(--ui-radius-lg); }
.ui-accordion .ui-accordion-body { padding: 0 22px 20px; color: var(--ui-muted); line-height: 1.7; }

@media (prefers-reduced-motion: reduce) {
    .ui-btn, .ui-accordion details, .ui-accordion summary::after { transition: none; }
    .ui-btn-primary:hover { transform: none; }
}

/* ---------- Drag-and-drop file upload (public/js/novus-dropzone.js) ---------- */
.novus-dropzone { position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: 14px; min-height: 92px; padding: 18px 20px; border: 1.5px dashed var(--ui-line-strong); border-radius: var(--ui-radius); background: var(--ui-bg-soft); color: var(--ui-text); font-weight: 400; cursor: pointer; transition: border-color .15s, background .15s, box-shadow .15s; }
.novus-dropzone:hover { border-color: var(--ui-brand); background: var(--ui-brand-50); }
.novus-dropzone:focus-visible { outline: none; border-color: var(--ui-brand); box-shadow: 0 0 0 4px var(--ui-brand-ring); }
.novus-dropzone.is-dragging { border-style: solid; border-color: var(--ui-brand); background: var(--ui-brand-50); box-shadow: 0 0 0 4px var(--ui-brand-ring); }
.novus-dropzone.has-file { border-style: solid; border-color: var(--ui-line); background: #fff; cursor: default; }
.novus-dropzone.is-invalid { border-color: var(--ui-danger); background: var(--ui-danger-50); }
.novus-dropzone-input { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; opacity: 0; pointer-events: none; }
.novus-dropzone-icon { display: grid; place-items: center; flex: 0 0 44px; height: 44px; border-radius: 12px; background: #fff; color: var(--ui-brand); box-shadow: var(--ui-shadow-sm); }
.novus-dropzone-icon svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.novus-dropzone-text { display: grid; gap: 2px; min-width: 0; }
.novus-dropzone-text strong { color: var(--ui-ink); font-size: .9rem; font-weight: 600; }
.novus-dropzone-text small { color: var(--ui-muted); font-size: .78rem; font-weight: 400; }
.novus-dropzone-text u { color: var(--ui-brand-700); font-weight: 600; text-decoration: none; }
.novus-dropzone-file { display: flex; flex: 1 1 100%; align-items: center; gap: 12px; min-width: 0; }
.novus-dropzone-file img { width: 96px; height: 56px; flex: 0 0 auto; border: 1px solid var(--ui-line); border-radius: 8px; background: var(--ui-bg-soft); object-fit: contain; }
.novus-dropzone-file-meta { display: grid; flex: 1 1 auto; gap: 2px; min-width: 0; }
.novus-dropzone-file-meta strong { overflow: hidden; color: var(--ui-ink); font-size: .88rem; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.novus-dropzone-file-meta small { color: var(--ui-muted); font-size: .76rem; font-weight: 400; }
.novus-dropzone-remove { flex: 0 0 auto; min-height: 34px; padding: 0 12px; border: 1px solid var(--ui-line-strong); border-radius: 9px; background: #fff; color: var(--ui-text); font: inherit; font-size: .78rem; font-weight: 600; cursor: pointer; }
.novus-dropzone-remove:hover { border-color: var(--ui-danger); color: var(--ui-danger); }
.novus-dropzone-error { flex: 1 1 100%; color: var(--ui-danger); font-size: .78rem; font-weight: 600; }
.novus-dropzone [hidden] { display: none !important; }
