Files
EpicNext-Cms/src/app/globals.css
T
Simo f7b3845131 Close the web-feasible 100% gaps: REST write/token API, tickets, draw-badge, /me, sanitisation, dusk, radio SSE
Final parity push (web-tier only):
- REST API write + token auth: POST /api/tokens (issue a personal_access_token
  for the session user), Bearer auth via src/lib/api-auth.ts, POST
  /api/articles/[slug]/comment, GET/DELETE /api/me/tokens, full tickets API
  (/api/tickets +[id] +[id]/reply), radio current-dj/points/points-leaderboard/
  embed-config + POST shouts, and a real-time /api/radio/stream (SSE). 31 public
  API routes total.
- Pages: /draw-badge (buy a custom profile badge → credits + RCON), /me
  dashboard (stats + online friends + referral claim). Wired into the nav.
- HTML sanitisation (sanitize-html) — the HTMLPurifier equivalent — applied to
  writeable boxes + article bodies before dangerouslySetInnerHTML.
- "Dusk" dark theme preset + a default-dark site option honoured by the
  no-flash boot script.

Verified live (prod, amx_test): token issue → Bearer endpoint 200, no-token
401; /api/me/tokens lists it; current-dj/leaderboard JSON; /me + /draw-badge
200; reverted the test user + tokens. tsc 0, vitest 49/49, next build 0.
2026-06-29 18:15:01 +02:00

858 lines
20 KiB
CSS

@import "tailwindcss";
@plugin "@tailwindcss/forms";
@plugin "@tailwindcss/typography";
@custom-variant dark (&:where(.dark, .dark *));
@theme {
--font-sans: var(--font-nunito), "Nunito", ui-sans-serif, system-ui, -apple-system,
"Segoe UI", sans-serif;
--breakpoint-sm: 40rem;
--breakpoint-md: 48rem;
--breakpoint-lg: 64rem;
--breakpoint-xl: 80rem;
--breakpoint-2xl: 96rem;
--radius-sm: 6px;
--radius-md: 10px;
--radius-lg: 14px;
--shadow-card: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
--shadow-card-hover: 0 4px 12px rgba(0, 0, 0, 0.1), 0 2px 4px rgba(0, 0, 0, 0.06);
}
/* Default theme variables (faithful to AtomCMS app.blade.php). ThemeVars may
override these at runtime from website_settings. */
:root {
--color-primary: #f59e0b;
--color-primary-hover: #cf9d15;
--color-background: #f8fafc;
--color-surface: #ffffff;
--color-dropdown: #ffffff;
--color-navbar: #ffffff;
--color-navbar-text: #1e293b;
--color-text: #0f172a;
--color-text-muted: #64748b;
--color-accent: #10b981;
--color-danger: #ef4444;
--button-color: #f59e0b;
--button-text-color: #1e293b;
--button-secondary-color: #22c55e;
--button-secondary-text-color: #ffffff;
--button-secondary-hover-color: #16a34a;
--button-danger-color: #ef4444;
--button-danger-text-color: #ffffff;
--button-danger-hover-color: #dc2626;
--button-outline-color: #eeb425;
--button-outline-text-color: #1a1a2e;
--button-outline-hover-color: #cf9d15;
--border-radius: 12px;
--border-color: #eeb425;
--font-family: var(--font-nunito), "Nunito", sans-serif;
--size-heading-h1: 32px;
--size-heading-h2: 24px;
--size-heading-h3: 20px;
--avatar-border-radius: 8px;
--avatar-border-color: #eeb425;
--badge-background: #eeb425;
--badge-text-color: #000000;
--badge-border-radius: 4px;
--card-border-radius: 12px;
--link-color: #eeb425;
--link-hover-color: #cf9d15;
--input-border-color: #4b5563;
--input-focus-color: #eeb425;
--navbar-height: 64px;
/* Aliases used throughout the admin pages' inline styles. */
--muted: var(--color-text-muted);
--border: color-mix(in srgb, var(--color-text-muted) 18%, transparent);
}
/* Dark mode (toggled by html.dark; wins over :root + ThemeVars via specificity). */
html.dark {
--color-background: #0f1117;
--color-surface: #171a21;
--color-dropdown: #1f242d;
--color-navbar: #171a21;
--color-navbar-text: #e5e7eb;
--color-text: #e5e7eb;
--color-text-muted: #9ca3af;
}
html.dark input,
html.dark select,
html.dark textarea {
background: #11151c;
color: var(--color-text);
}
html.dark .currency,
html.dark .article-img {
background: #1f242d;
}
html {
scroll-behavior: smooth;
}
body {
font-family: var(--font-family);
color: var(--color-text, #0f172a);
}
::-webkit-scrollbar-thumb {
border-radius: 100px;
border: 4px solid transparent;
background-clip: content-box;
background-color: #2c3039;
}
::-webkit-scrollbar {
width: 12px;
}
::-webkit-scrollbar-track {
background: transparent;
}
/* ── Atom theme components ────────────────────────────────── */
@layer components {
.nav-item {
@apply flex h-auto md:h-[60px] items-center text-[14px] font-semibold uppercase transition duration-200 ease-in-out md:border-b-4! md:border-transparent! md:hover:border-b-[#eeb425]!;
color: var(--color-navbar-text, #1e293b);
}
.dropdown-item {
@apply block py-2 px-4 font-semibold transition duration-200;
color: var(--color-text);
}
.dropdown-item:hover {
background-color: var(--color-primary, #eeb425);
color: var(--button-text-color, #1a1a2e);
}
}
/* ── Atom icons / backgrounds (asset paths adapted to /assets) ── */
.icon-base {
background-repeat: no-repeat;
background-position: center;
background-size: contain;
}
.nav-credit-icon {
background: #e9b124 url("/assets/images/icons/currency/credits.png") no-repeat center;
outline: 1px solid #b26d18;
}
.nav-ducket-icon {
background: #c44aac url("/assets/images/icons/currency/duckets.png") no-repeat center;
outline: 1px solid #812378;
}
.nav-diamond-icon {
background: #caf1f3 url("/assets/images/icons/currency/diamonds.png") no-repeat center;
outline: 1px solid #6caff4;
}
.navigation-icon {
width: 20px;
height: 25px;
background-repeat: no-repeat;
background-position: center;
}
.navigation-icon.shop {
background-image: url("/assets/images/icons/navigation/shop.png");
}
.navigation-icon.leaderboards {
background-image: url("/assets/images/icons/navigation/leaderboards.png");
}
.navigation-icon.rules {
background-image: url("/assets/images/icons/navigation/rules.gif");
}
.navigation-icon.home {
background-image: url("/assets/images/icons/navigation/home.png");
}
.navigation-icon.community {
background-image: url("/assets/images/icons/navigation/community.png");
}
.site-bg {
background: url("/assets/images/background-light.jpg") no-repeat fixed right bottom;
}
.app.dark .site-bg {
background: url("/assets/images/background-dark.jpg") no-repeat fixed right bottom;
}
.article-body {
line-height: 1.7;
}
.article-body img {
max-width: 100%;
height: auto;
border-radius: 8px;
}
.article-body p {
margin: 0 0 0.85rem;
}
.article-body a {
text-decoration: underline;
}
.text-body {
color: var(--color-text);
}
.text-muted {
color: var(--color-text-muted);
}
.text-nav {
color: var(--color-navbar-text);
}
.text-shadow {
text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}
.transition-base {
transition: all 0.2s ease-in-out;
}
.hover-lift {
transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.hover-lift:hover {
transform: translateY(-2px);
box-shadow: var(--shadow-card-hover);
}
.card-base {
background-color: var(--color-surface);
border-radius: var(--radius-md);
box-shadow: var(--shadow-card);
border: 1px solid color-mix(in srgb, var(--color-text-muted) 15%, transparent);
}
.card-base:hover {
box-shadow: var(--shadow-card-hover);
border-color: color-mix(in srgb, var(--color-text-muted) 25%, transparent);
}
/* ── App component classes (used across the converted pages) ── */
h1 {
font-size: var(--size-heading-h1, 30px);
font-weight: 800;
margin: 0.2em 0 0.5em;
}
h2 {
font-size: var(--size-heading-h2, 22px);
font-weight: 700;
}
h3 {
font-size: var(--size-heading-h3, 18px);
font-weight: 700;
}
a {
color: var(--link-color);
text-decoration: none;
}
a:hover {
text-decoration: underline;
}
.muted {
color: var(--color-text-muted);
font-size: 0.875rem;
}
.hero {
background: linear-gradient(120deg, rgba(245, 158, 11, 0.16), rgba(16, 185, 129, 0.12)),
var(--color-surface);
border: 1px solid color-mix(in srgb, var(--color-text-muted) 15%, transparent);
border-radius: 18px;
padding: 2rem 2.25rem;
box-shadow: var(--shadow-card);
margin-bottom: 1.5rem;
}
.card {
background: var(--color-surface);
border: 1px solid color-mix(in srgb, var(--color-text-muted) 15%, transparent);
border-radius: var(--card-border-radius);
box-shadow: var(--shadow-card);
padding: 1.1rem 1.25rem;
}
.card.hover:hover {
transform: translateY(-2px);
box-shadow: var(--shadow-card-hover);
transition: all 0.2s ease-in-out;
}
.grid {
display: grid;
gap: 1rem;
}
.grid.cols-2 {
grid-template-columns: repeat(2, 1fr);
}
.grid.cols-3 {
grid-template-columns: repeat(3, 1fr);
}
@media (max-width: 720px) {
.grid.cols-2,
.grid.cols-3 {
grid-template-columns: 1fr;
}
}
.article-img {
width: 100%;
height: 140px;
object-fit: cover;
display: block;
background: linear-gradient(135deg, #fde68a, #fbbf24);
}
.btn {
display: inline-flex;
align-items: center;
justify-content: center;
gap: 0.4rem;
padding: 0.5rem 1.1rem;
border-radius: var(--border-radius);
border: 2px solid transparent;
font-family: inherit;
font-weight: 700;
font-size: 14px;
cursor: pointer;
transition: all 0.18s ease-in-out;
background: #eef2f7;
color: var(--color-text);
text-decoration: none;
}
.btn:hover {
transform: translateY(-1px);
box-shadow: var(--shadow-card);
text-decoration: none;
}
.btn-primary {
background: var(--button-color);
color: var(--button-text-color);
}
.btn-secondary {
background: var(--button-secondary-color);
color: var(--button-secondary-text-color);
}
.btn-danger {
background: var(--button-danger-color);
color: var(--button-danger-text-color);
}
.btn-outline {
background: transparent;
border-color: var(--button-outline-color);
color: #8a6a05;
}
input,
select,
textarea {
font-family: inherit;
font-size: 14px;
padding: 0.5rem 0.7rem;
border: 2px solid color-mix(in srgb, var(--color-text-muted) 22%, transparent);
border-radius: var(--radius-sm);
background: #fbfcfe;
color: var(--color-text);
outline: none;
transition: border-color 0.15s ease;
}
input:focus,
select:focus,
textarea:focus {
border-color: var(--color-primary);
}
table {
width: 100%;
border-collapse: collapse;
}
th {
text-align: left;
color: var(--color-text-muted);
font-size: 0.8rem;
text-transform: uppercase;
letter-spacing: 0.03em;
padding: 0.4rem 0.5rem;
}
td {
padding: 0.55rem 0.5rem;
border-top: 1px solid color-mix(in srgb, var(--color-text-muted) 15%, transparent);
}
.avatar {
border-radius: var(--avatar-border-radius);
background: #f1f5f9;
border: 2px solid var(--avatar-border-color);
}
.currency {
display: inline-flex;
align-items: center;
gap: 0.4rem;
font-weight: 800;
font-size: 0.85rem;
padding: 0.2rem 0.6rem 0.2rem 0.2rem;
border-radius: 999px;
background: #f8fafc;
border: 1px solid color-mix(in srgb, var(--color-text-muted) 15%, transparent);
}
.currency .coin {
width: 22px;
height: 22px;
border-radius: 999px;
display: grid;
place-items: center;
color: #fff;
font-size: 0.7rem;
}
.coin.credits {
background: #e9b124;
}
.coin.duckets {
background: #c44aac;
}
.coin.diamonds {
background: #4bc0d9;
}
/* ── Admin panel (Housekeeping) ─────────────────────────────────
Faithful to AtomCMS's Filament panel: dark #2d2d44 sidebar with
grouped nav + amber active state, a topbar, and a light content
area with carded tables. Scoped under .admin so it never leaks
into the public site. */
.admin {
display: grid;
grid-template-columns: 232px minmax(0, 1fr);
gap: 1.25rem;
align-items: start;
}
@media (max-width: 860px) {
.admin {
grid-template-columns: 1fr;
}
}
.admin-sidebar {
position: sticky;
top: 1rem;
align-self: start;
background: #2d2d44;
color: #e7e9f3;
border-radius: 14px;
padding: 0.85rem 0.7rem;
box-shadow: var(--shadow-card);
max-height: calc(100vh - 2rem);
overflow-y: auto;
}
.admin-sidebar-head {
display: flex;
align-items: center;
gap: 0.6rem;
padding: 0.3rem 0.45rem 0.85rem;
border-bottom: 1px solid rgba(255, 255, 255, 0.09);
margin-bottom: 0.5rem;
}
.admin-avatar {
flex: none;
width: 38px;
height: 38px;
border-radius: 10px;
display: grid;
place-items: center;
font-weight: 800;
color: #1a1a2e;
background: var(--color-primary, #eeb425);
}
.admin-sidebar-name {
font-weight: 700;
font-size: 0.92rem;
line-height: 1.1;
color: #fff;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.admin-rank-badge {
display: inline-block;
margin-top: 0.2rem;
font-size: 0.66rem;
font-weight: 700;
text-transform: uppercase;
letter-spacing: 0.05em;
color: #1a1a2e;
background: var(--color-primary, #eeb425);
border-radius: 999px;
padding: 0.05rem 0.5rem;
}
.admin-nav {
display: flex;
flex-direction: column;
gap: 0.1rem;
}
.admin-nav-group {
margin-top: 0.55rem;
}
.admin-nav-group-label {
display: block;
font-size: 0.64rem;
font-weight: 700;
text-transform: uppercase;
letter-spacing: 0.09em;
color: rgba(231, 233, 243, 0.42);
padding: 0.3rem 0.55rem 0.25rem;
}
.admin-nav-link {
display: flex;
align-items: center;
gap: 0.55rem;
padding: 0.43rem 0.6rem;
border-radius: 9px;
color: #c8cbe0;
font-size: 0.85rem;
font-weight: 600;
text-decoration: none;
transition: background 0.15s ease, color 0.15s ease;
}
.admin-nav-link:hover {
background: rgba(255, 255, 255, 0.07);
color: #fff;
text-decoration: none;
}
.admin-nav-link.active {
background: var(--color-primary, #eeb425);
color: #1a1a2e;
box-shadow: 0 2px 8px rgba(238, 180, 37, 0.35);
}
.admin-content {
min-width: 0;
}
.admin-topbar {
display: flex;
align-items: center;
justify-content: space-between;
gap: 1rem;
background: var(--color-surface);
border: 1px solid var(--border);
border-radius: 12px;
padding: 0.7rem 1.15rem;
margin-bottom: 1.1rem;
box-shadow: var(--shadow-card);
}
.admin-topbar h2 {
margin: 0;
font-size: 1.05rem;
font-weight: 800;
}
/* Page content inside the admin panel */
.admin-page main > h1:first-child,
.admin-page > h1:first-child {
margin-top: 0;
}
.admin-page h1 {
font-size: 1.5rem;
padding-bottom: 0.5rem;
border-bottom: 2px solid var(--border);
margin-bottom: 0.85rem;
}
/* Carded tables — give the bare admin tables a surface + frame. */
.admin-page table {
background: var(--color-surface);
box-shadow: var(--shadow-card);
border: 1px solid var(--border);
border-radius: 12px;
overflow: hidden;
}
.admin-page thead th {
background: color-mix(in srgb, var(--color-primary) 12%, var(--color-surface));
color: var(--color-text-muted);
border-bottom: 1px solid var(--border);
white-space: nowrap;
}
.admin-page th,
.admin-page td {
padding: 0.6rem 0.8rem;
}
.admin-page tbody tr {
transition: background 0.12s ease;
}
.admin-page tbody tr:hover {
background: color-mix(in srgb, var(--color-primary) 7%, transparent);
}
.admin-page tbody td {
border-top: 1px solid color-mix(in srgb, var(--color-text-muted) 12%, transparent);
}
/* status pill used by some admin lists */
.admin-badge {
display: inline-block;
font-size: 0.72rem;
font-weight: 700;
padding: 0.1rem 0.55rem;
border-radius: 999px;
background: color-mix(in srgb, var(--color-primary) 18%, transparent);
color: var(--color-text);
}
.admin-badge.ok {
background: color-mix(in srgb, #16a34a 20%, transparent);
}
.admin-badge.danger {
background: color-mix(in srgb, #ef4444 22%, transparent);
}
/* Dashboard: live-status tiles, server info, diagnostics */
.admin-stats {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
gap: 0.9rem;
margin-bottom: 1.4rem;
}
.admin-stat-card {
background: var(--color-surface);
border: 1px solid var(--border);
border-left: 4px solid var(--color-text-muted);
border-radius: 12px;
padding: 0.85rem 1rem;
box-shadow: var(--shadow-card);
}
.admin-stat-card.ok {
border-left-color: #16a34a;
}
.admin-stat-card.warn {
border-left-color: var(--color-primary, #eeb425);
}
.admin-stat-card.danger {
border-left-color: #ef4444;
}
.admin-stat-top {
display: flex;
align-items: center;
justify-content: space-between;
gap: 0.5rem;
}
.admin-stat-label {
font-size: 0.72rem;
font-weight: 700;
text-transform: uppercase;
letter-spacing: 0.05em;
color: var(--color-text-muted);
}
.admin-stat-icon {
font-size: 1.1rem;
line-height: 1;
}
.admin-stat-value {
font-size: 1.7rem;
font-weight: 800;
line-height: 1.1;
margin-top: 0.3rem;
}
.admin-stat-hint {
font-size: 0.78rem;
color: var(--color-text-muted);
margin-top: 0.15rem;
}
.admin-info-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
gap: 0.6rem 1.2rem;
}
.admin-info-item {
display: flex;
flex-direction: column;
gap: 0.1rem;
font-size: 0.88rem;
}
.admin-diag {
display: flex;
flex-direction: column;
}
.admin-diag-row {
display: flex;
align-items: center;
gap: 0.6rem;
padding: 0.5rem 0.1rem;
border-top: 1px solid color-mix(in srgb, var(--color-text-muted) 12%, transparent);
}
.admin-diag-row:first-child {
border-top: none;
}
.admin-diag-label {
font-weight: 700;
font-size: 0.88rem;
}
.admin-diag-detail {
flex: 1;
font-size: 0.82rem;
}
.admin-dot {
flex: none;
width: 9px;
height: 9px;
border-radius: 999px;
background: var(--color-text-muted);
}
.admin-dot.ok {
background: #16a34a;
box-shadow: 0 0 0 3px color-mix(in srgb, #16a34a 22%, transparent);
}
.admin-dot.warn {
background: var(--color-primary, #eeb425);
box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-primary) 22%, transparent);
}
.admin-dot.danger {
background: #ef4444;
box-shadow: 0 0 0 3px color-mix(in srgb, #ef4444 22%, transparent);
}
.admin-section {
margin-top: 1.6rem;
}
.admin-section > h2 {
margin: 0 0 0.7rem;
font-size: 1.15rem;
}
/* ── Public design system (faithful to the atom theme) ──────────
content-card = surface card with a primary-tinted header (icon +
title + subtitle) and a padded body — the signature atom block. */
.content-card {
display: flex;
flex-direction: column;
width: 100%;
background: var(--color-surface);
color: var(--color-text);
border: 1px solid color-mix(in srgb, var(--color-text-muted) 15%, transparent);
border-radius: 14px;
box-shadow: var(--shadow-card);
overflow: hidden;
}
.content-card-head {
display: flex;
align-items: center;
gap: 0.7rem;
padding: 0.85rem 1rem;
background: color-mix(in srgb, var(--color-primary) 9%, var(--color-surface));
border-bottom: 1px solid color-mix(in srgb, var(--color-text-muted) 10%, transparent);
}
.content-card-icon {
flex: none;
width: 44px;
height: 44px;
border-radius: 999px;
display: grid;
place-items: center;
font-size: 1.25rem;
background: color-mix(in srgb, var(--color-primary) 18%, var(--color-surface));
box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--color-primary) 30%, transparent);
}
.content-card-head-text {
min-width: 0;
flex: 1;
}
.content-card-title {
margin: 0;
font-weight: 700;
font-size: 1rem;
line-height: 1.2;
}
.content-card-subtitle {
margin: 0.15rem 0 0;
font-size: 0.78rem;
color: var(--color-text-muted);
}
.content-card-action {
flex: none;
}
.content-card-body {
padding: 1rem;
}
/* Responsive card grids (atom: 1 / sm2 / md3 / lg4). */
.card-grid {
display: grid;
gap: 1rem;
grid-template-columns: 1fr;
}
@media (min-width: 40rem) {
.card-grid.sm-2 { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 48rem) {
.card-grid.md-2 { grid-template-columns: repeat(2, 1fr); }
.card-grid.md-3 { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 64rem) {
.card-grid.lg-3 { grid-template-columns: repeat(3, 1fr); }
.card-grid.lg-4 { grid-template-columns: repeat(4, 1fr); }
}
/* Stat tiles (value in the primary colour + muted label). */
.stat-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
gap: 0.85rem;
}
.stat-block {
background: var(--color-background);
border: 1px solid color-mix(in srgb, var(--color-text-muted) 12%, transparent);
border-radius: 12px;
padding: 0.85rem 1rem;
text-align: center;
}
.stat-block-value {
font-size: 1.6rem;
font-weight: 800;
line-height: 1.1;
color: var(--color-primary);
}
.stat-block-label {
margin-top: 0.2rem;
font-size: 0.78rem;
color: var(--color-text-muted);
}
/* Empty states */
.empty-state {
text-align: center;
padding: 2rem 1rem;
}
.empty-state-icon {
font-size: 2rem;
margin-bottom: 0.4rem;
}
/* Online / offline pill */
.online-badge {
display: inline-flex;
align-items: center;
gap: 0.35rem;
font-size: 0.74rem;
font-weight: 700;
padding: 0.1rem 0.55rem 0.1rem 0.45rem;
border-radius: 999px;
background: color-mix(in srgb, var(--color-text-muted) 14%, transparent);
color: var(--color-text-muted);
}
.online-badge.online {
background: color-mix(in srgb, #16a34a 16%, transparent);
color: #15803d;
}
.online-dot {
width: 8px;
height: 8px;
border-radius: 999px;
background: currentColor;
}
.online-badge.online .online-dot {
background: #16a34a;
box-shadow: 0 0 0 3px color-mix(in srgb, #16a34a 22%, transparent);
}
/* Leaderboard rank chip */
.rank-badge {
display: inline-grid;
place-items: center;
min-width: 2.1rem;
height: 2.1rem;
padding: 0 0.35rem;
border-radius: 999px;
font-weight: 800;
font-size: 0.95rem;
background: var(--color-background);
border: 1px solid color-mix(in srgb, var(--color-text-muted) 18%, transparent);
}
.rank-badge.rank-1 {
background: color-mix(in srgb, #eab308 20%, transparent);
border-color: #eab308;
}
.rank-badge.rank-2 {
background: color-mix(in srgb, #94a3b8 22%, transparent);
border-color: #94a3b8;
}
.rank-badge.rank-3 {
background: color-mix(in srgb, #f97316 20%, transparent);
border-color: #f97316;
}