364 lines
9.1 KiB
CSS
364 lines
9.1 KiB
CSS
@import 'tailwindcss';
|
||
@import 'tw-animate-css';
|
||
|
||
/* ===== FitOS „Ember” — ciepły grafit + koral. Dark (domyślny). ===== */
|
||
:root {
|
||
color-scheme: dark;
|
||
--bg: #141210;
|
||
--bg-card: #1c1917;
|
||
--bg-input: #0f0d0b;
|
||
--line: #2b2620;
|
||
--text: #f2ede6;
|
||
--text-dim: #a1968a;
|
||
--accent: #ff6b4a;
|
||
--accent-dark: #f0542f;
|
||
--accent-ink: #1c0d06;
|
||
--accent-text: #ff7e61;
|
||
--danger: #e5484d;
|
||
--warn: #e8b04a;
|
||
--info: #63b3e4;
|
||
|
||
/* wykończenie powierzchni */
|
||
--shadow: 0 1px 0 color-mix(in srgb, var(--text) 4%, transparent) inset;
|
||
--card-grad: linear-gradient(
|
||
180deg,
|
||
color-mix(in srgb, var(--text) 2.5%, var(--bg-card)),
|
||
var(--bg-card) 60%
|
||
);
|
||
--glow: 0 8px 40px -16px color-mix(in srgb, var(--accent) 40%, transparent);
|
||
--ambient: radial-gradient(
|
||
720px 340px at 50% -80px,
|
||
color-mix(in srgb, var(--accent) 8%, transparent),
|
||
transparent 70%
|
||
);
|
||
--grain-opacity: 0.028;
|
||
|
||
/* ruch */
|
||
--dur-1: 120ms;
|
||
--dur-2: 180ms;
|
||
--dur-3: 240ms;
|
||
--ease-out-quart: cubic-bezier(0.25, 1, 0.5, 1);
|
||
|
||
/* komponenty */
|
||
--btn-grad: linear-gradient(
|
||
180deg,
|
||
color-mix(in srgb, var(--accent) 88%, #fff),
|
||
var(--accent-dark)
|
||
);
|
||
--btn-shadow:
|
||
0 3px 14px -6px color-mix(in srgb, var(--accent) 65%, transparent),
|
||
inset 0 1px 0 color-mix(in srgb, #fff 28%, transparent);
|
||
--inset-shadow: inset 0 1px 3px rgb(0 0 0 / 0.12);
|
||
--progress-grad: linear-gradient(
|
||
90deg,
|
||
color-mix(in srgb, var(--accent) 65%, transparent),
|
||
var(--accent)
|
||
);
|
||
--mark-grad: linear-gradient(
|
||
160deg,
|
||
color-mix(in srgb, var(--accent) 82%, #fff),
|
||
var(--accent-dark)
|
||
);
|
||
--mark-shadow: 0 2px 10px -3px color-mix(in srgb, var(--accent) 60%, transparent);
|
||
--nav-bar-grad: linear-gradient(180deg, var(--accent), var(--accent-dark));
|
||
|
||
/* shadcn tokens — mapped onto the palette above */
|
||
--background: var(--bg);
|
||
--foreground: var(--text);
|
||
--card: var(--bg-card);
|
||
--card-foreground: var(--text);
|
||
--primary: var(--accent);
|
||
--primary-foreground: var(--accent-ink);
|
||
--secondary: var(--bg-input);
|
||
--secondary-foreground: var(--text);
|
||
--muted: var(--bg-input);
|
||
--muted-foreground: var(--text-dim);
|
||
--destructive: var(--danger);
|
||
--border: var(--line);
|
||
--input: var(--line);
|
||
--ring: var(--accent);
|
||
--radius: 0.875rem;
|
||
}
|
||
|
||
/* Light theme — enabled by .light on <html> */
|
||
.light {
|
||
color-scheme: light;
|
||
--bg: #f7f4f0;
|
||
--bg-card: #ffffff;
|
||
--bg-input: #efe9e2;
|
||
--line: #e0d7cb;
|
||
--text: #211b15;
|
||
--text-dim: #6f6558;
|
||
--accent: #f4572e;
|
||
--accent-dark: #dd4620;
|
||
--accent-ink: #1c0d06;
|
||
--accent-text: #c43a15;
|
||
--danger: #d92d20;
|
||
--warn: #b45309;
|
||
--info: #0369a1;
|
||
|
||
--shadow: 0 1px 2px rgb(33 27 21 / 0.05), 0 12px 32px -18px rgb(33 27 21 / 0.18);
|
||
--card-grad: linear-gradient(180deg, #ffffff, color-mix(in srgb, var(--bg) 45%, #ffffff) 140%);
|
||
--glow: 0 8px 36px -18px color-mix(in srgb, var(--accent) 32%, transparent);
|
||
--ambient: radial-gradient(
|
||
720px 340px at 50% -80px,
|
||
color-mix(in srgb, var(--accent) 6%, transparent),
|
||
transparent 70%
|
||
);
|
||
--grain-opacity: 0.05;
|
||
}
|
||
|
||
/* Map design tokens to Tailwind utilities (bg-card, text-dim, border-line, font-display, shadow-card, ...) */
|
||
@theme inline {
|
||
--font-sans: 'Manrope', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
|
||
--font-display: 'Space Grotesk', 'Manrope', system-ui, sans-serif;
|
||
|
||
--color-bg: var(--bg);
|
||
--color-card: var(--bg-card);
|
||
--color-input: var(--bg-input);
|
||
--color-line: var(--line);
|
||
--color-ink: var(--text);
|
||
--color-dim: var(--text-dim);
|
||
--color-accent: var(--accent);
|
||
--color-accent-dark: var(--accent-dark);
|
||
--color-accent-ink: var(--accent-ink);
|
||
--color-accent-text: var(--accent-text);
|
||
--color-danger: var(--danger);
|
||
--color-warn: var(--warn);
|
||
--color-info: var(--info);
|
||
|
||
/* shadcn color utilities (bg-background, text-foreground, border-border, ...) */
|
||
--color-background: var(--background);
|
||
--color-foreground: var(--foreground);
|
||
--color-primary: var(--primary);
|
||
--color-primary-foreground: var(--primary-foreground);
|
||
--color-secondary: var(--secondary);
|
||
--color-secondary-foreground: var(--secondary-foreground);
|
||
--color-muted: var(--muted);
|
||
--color-muted-foreground: var(--muted-foreground);
|
||
--color-destructive: var(--destructive);
|
||
--color-border: var(--border);
|
||
--color-ring: var(--ring);
|
||
|
||
--shadow-card: var(--shadow);
|
||
--shadow-glow: var(--glow);
|
||
|
||
--radius-lg: var(--radius);
|
||
--radius-md: calc(var(--radius) - 4px);
|
||
--radius-sm: calc(var(--radius) - 6px);
|
||
}
|
||
|
||
/* Top menu: zawartość grupy rozwijana od ikonki w lewo, w jednej linii */
|
||
@keyframes topbar-expand {
|
||
from {
|
||
opacity: 0;
|
||
transform: translateX(10px);
|
||
}
|
||
to {
|
||
opacity: 1;
|
||
transform: translateX(0);
|
||
}
|
||
}
|
||
|
||
.topbar-expand {
|
||
animation: topbar-expand 150ms ease-out;
|
||
}
|
||
|
||
/* Pulsujący wskaźnik „na żywo” (live-dot) */
|
||
@keyframes live-ping {
|
||
0% {
|
||
transform: scale(0.5);
|
||
opacity: 0.8;
|
||
}
|
||
80%,
|
||
100% {
|
||
transform: scale(1.5);
|
||
opacity: 0;
|
||
}
|
||
}
|
||
|
||
.live-dot {
|
||
width: 7px;
|
||
height: 7px;
|
||
border-radius: 99px;
|
||
background: var(--accent);
|
||
position: relative;
|
||
display: inline-block;
|
||
flex: none;
|
||
}
|
||
|
||
.live-dot::after {
|
||
content: '';
|
||
position: absolute;
|
||
inset: -4px;
|
||
border-radius: 99px;
|
||
border: 1.5px solid var(--accent);
|
||
opacity: 0.7;
|
||
animation: live-ping 1.8s cubic-bezier(0, 0, 0.2, 1) infinite;
|
||
}
|
||
|
||
/* Skeleton shimmer */
|
||
@keyframes shimmer {
|
||
from {
|
||
background-position: 200% 0;
|
||
}
|
||
to {
|
||
background-position: -200% 0;
|
||
}
|
||
}
|
||
|
||
.skeleton-shimmer {
|
||
background: linear-gradient(
|
||
90deg,
|
||
var(--bg-input) 25%,
|
||
color-mix(in srgb, var(--text) 7%, var(--bg-input)) 50%,
|
||
var(--bg-input) 75%
|
||
);
|
||
background-size: 200% 100%;
|
||
animation: shimmer 1.6s linear infinite;
|
||
}
|
||
|
||
@layer base {
|
||
html {
|
||
background-color: var(--bg);
|
||
}
|
||
|
||
body {
|
||
margin: 0;
|
||
font-family: var(--font-sans);
|
||
background: transparent;
|
||
color: var(--text);
|
||
font-size: 15px;
|
||
-webkit-font-smoothing: antialiased;
|
||
transition: color var(--dur-3) ease;
|
||
}
|
||
|
||
/* ciepła poświata u góry widoku */
|
||
body::before {
|
||
content: '';
|
||
position: fixed;
|
||
top: 0;
|
||
left: 0;
|
||
right: 0;
|
||
height: 420px;
|
||
background: var(--ambient);
|
||
pointer-events: none;
|
||
z-index: -1;
|
||
}
|
||
|
||
/* ziarno — przełamuje płaskie powierzchnie */
|
||
body::after {
|
||
content: '';
|
||
position: fixed;
|
||
inset: 0;
|
||
pointer-events: none;
|
||
z-index: 60;
|
||
opacity: var(--grain-opacity);
|
||
mix-blend-mode: overlay;
|
||
background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)'/%3E%3C/svg%3E");
|
||
}
|
||
|
||
h1,
|
||
h2,
|
||
h3 {
|
||
font-family: var(--font-display);
|
||
}
|
||
|
||
a {
|
||
color: var(--accent-text);
|
||
text-decoration: none;
|
||
}
|
||
|
||
::selection {
|
||
background: color-mix(in srgb, var(--accent) 32%, transparent);
|
||
}
|
||
|
||
:focus-visible {
|
||
outline: 2px solid color-mix(in srgb, var(--accent) 60%, transparent);
|
||
outline-offset: 2px;
|
||
}
|
||
|
||
* {
|
||
scrollbar-width: thin;
|
||
scrollbar-color: var(--line) transparent;
|
||
}
|
||
|
||
::-webkit-scrollbar {
|
||
width: 10px;
|
||
height: 10px;
|
||
}
|
||
|
||
::-webkit-scrollbar-thumb {
|
||
background: var(--line);
|
||
border-radius: 99px;
|
||
border: 2px solid var(--bg);
|
||
}
|
||
|
||
::-webkit-scrollbar-track {
|
||
background: transparent;
|
||
}
|
||
}
|
||
|
||
/* PWA (standalone) na iOS/Android: pływający tytuł i dolny pasek menu muszą
|
||
„dopełniać” pola safe-area (notch, home-indicator) — w przeglądarkowej
|
||
wersji robi to UI paska (theme-color), więc w media nie ma = zero kosztu */
|
||
@media (display-mode: standalone) {
|
||
.safe-pad-top {
|
||
padding-top: env(safe-area-inset-top);
|
||
background-color: var(--bg);
|
||
}
|
||
}
|
||
|
||
/* dolny pasek menu istnieje tylko na telefonie (<md) — padding safe-area
|
||
wyłącznie tam, żeby nie rozsuwać inline’owych akcji w nagłówku (md+) */
|
||
@media (display-mode: standalone) and (max-width: 767px) {
|
||
.safe-pad-bottom {
|
||
padding-bottom: max(env(safe-area-inset-bottom), 0.75rem);
|
||
background-color: var(--bg-card);
|
||
}
|
||
}
|
||
|
||
/* Checkbox w stylu aplikacji: ciemne pole z krawędzią; po zaznaczeniu
|
||
wypełnienie akcentem i ciemny „ptaszek" (look kontrolowany przez design,
|
||
nie przez natywne widgety OS) */
|
||
input[type='checkbox'] {
|
||
appearance: none;
|
||
-webkit-appearance: none;
|
||
display: inline-grid;
|
||
place-content: center;
|
||
flex: none;
|
||
width: var(--checkbox-size, 1rem);
|
||
height: var(--checkbox-size, 1rem);
|
||
margin: 0;
|
||
vertical-align: middle;
|
||
border: 1px solid var(--line);
|
||
border-radius: 0.3125rem;
|
||
background: var(--bg-input);
|
||
cursor: pointer;
|
||
transition:
|
||
background-color 120ms ease,
|
||
border-color 120ms ease;
|
||
}
|
||
|
||
input[type='checkbox']:hover:not(:disabled) {
|
||
border-color: color-mix(in srgb, var(--accent) 55%, var(--line));
|
||
}
|
||
|
||
input[type='checkbox']:checked {
|
||
background: var(--accent);
|
||
border-color: var(--accent);
|
||
}
|
||
|
||
input[type='checkbox']:checked::before {
|
||
content: '';
|
||
width: 0.7rem;
|
||
height: 0.7rem;
|
||
background: var(--accent-ink);
|
||
clip-path: polygon(14% 44%, 0 61%, 41% 100%, 100% 17%, 85% 3%, 40% 71%);
|
||
}
|
||
|
||
input[type='checkbox']:disabled {
|
||
opacity: 0.5;
|
||
cursor: default;
|
||
}
|