Files
MSPPPPaM/css/auth-styl.css
T

634 lines
16 KiB
CSS
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
/* ============================================================
AUTH SYSTÉM STYL
============================================================
Umístění: libovolné (např. /css/auth-styl.css)
Aktivace: v auth/config.php nastavit
define('AUTH_CSS', '/css/auth-styl.css');
Funguje bez jakýchkoliv změn v PHP souborech.
Styluje čistě pomocí HTML elementů žádné třídy nejsou
potřeba.
============================================================ */
/* ------------------------------------------------------------
GOOGLE FONTS
Montserrat 100 tři velikosti (viz níže)
IBM Plex Serif 300 jedna velikost pro veškerý text
------------------------------------------------------------ */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@100&family=IBM+Plex+Serif:ital,wght@0,300;1,300&display=swap');
/* ------------------------------------------------------------
TYPOGRAFICKÁ STUPNICE MONTSERRAT
============================================================
Velikost A 2.2rem ... hlavní nadpis stránky (h1), jednou
Velikost B 0.88rem ... nadpisy sekcí (h2, h3)
Velikost C 0.78rem ... nejmenší = IBMPlexSerif velikost
(th, button, label, span#heslo-sila)
IBM Plex Serif ... 0.78rem pro veškerý ostatní text
------------------------------------------------------------ */
/* ------------------------------------------------------------
PROMĚNNÉ
------------------------------------------------------------ */
:root {
/* Pozadí */
--bg-hlavni: #141414; /* tělo stránky = barva mezer mezi bloky */
--bg-obsah: #222222; /* světlejší bloky obsahu */
--bg-prvek: #2a2a2a; /* inputy, tabulky, textarea */
--bg-prvek-focus: #313131; /* input při focusu */
/* Písmo */
--text-hlavni: #d0d0d0;
--text-jemny: #7a7a7a;
--text-nadpis: #eeeeee;
/* Akcent tmavě červená */
--akcent: #5c1010; /* pozadí tlačítek, th */
--akcent-hover: #7a1515; /* hover tlačítek */
--akcent-svetly: #c0392b; /* text, h1, h3, odkazy */
--akcent-okraj: #4a0d0d; /* okraje akcentových prvků */
/* Ocelová šedá */
--ocel: #3a4455; /* okraje inputů, tabulek */
--ocel-svetly: #6a7a90; /* labely, h2, pomocný text */
/* Stavy */
--chyba-text: #f08080;
--uspech-text: #68d391;
/* Rozměry */
--pruh-max: 620px;
--sekce-mezera: 1.6rem; /* výška tmavé mezery mezi bloky */
--sekce-padding: 1.4rem; /* vnitřní odsazení bloků */
--polomer-blok: 6px; /* zaoblení rohů bloků */
--polomer-prvek: 4px; /* zaoblení inputů, tlačítek */
/* Stíny */
--stin-blok: 0 2px 12px rgba(0, 0, 0, 0.45);
--stin-input: inset 0 1px 3px rgba(0, 0, 0, 0.3);
--stin-input-focus: 0 0 0 2px rgba(192, 57, 43, 0.25);
}
/* ------------------------------------------------------------
ZÁKLAD
------------------------------------------------------------ */
*, *::before, *::after {
box-sizing: border-box;
margin: 0;
padding: 0;
}
html {
font-size: 16px;
scroll-behavior: smooth;
}
body {
background-color: var(--bg-hlavni);
color: var(--text-hlavni);
font-family: 'IBM Plex Serif', Georgia, serif;
font-size: 0.78rem; /* jedna velikost pro všechen IBM Plex Serif text */
font-weight: 300;
line-height: 1.75;
min-height: 100vh;
display: flex;
flex-direction: column;
align-items: center;
padding: 0;
animation: fadein 0.2s ease-in;
}
/* ------------------------------------------------------------
OBSAHOVÝ PRUH
------------------------------------------------------------ */
body > * {
width: 100%;
max-width: var(--pruh-max);
}
/* ------------------------------------------------------------
BLOKY OBSAHU světlejší pozadí, zaoblení, stín
------------------------------------------------------------ */
body > h1,
body > h2,
body > h3,
body > p,
body > form,
body > table,
body > section,
body > ol,
body > ul,
body > textarea {
background-color: var(--bg-obsah);
padding-left: var(--sekce-padding);
padding-right: var(--sekce-padding);
padding-top: var(--sekce-padding);
padding-bottom: var(--sekce-padding);
border-radius: var(--polomer-blok);
box-shadow: var(--stin-blok);
}
/* Tabulka padding jen nahoře/dole, šířku řídí buňky */
body > table {
padding-left: 0;
padding-right: 0;
overflow: hidden; /* zaoblení se projeví i na th/td */
}
/* Mezery každý blok dostane mezeru nahoře */
body > h1,
body > h2,
body > h3,
body > p,
body > form,
body > table,
body > section,
body > ol,
body > ul,
body > textarea {
margin-top: var(--sekce-mezera);
}
/* hr = čistá tmavá mezera, žádná čára */
body > hr {
border: none;
background: transparent;
height: 0;
padding: 0;
margin: 0;
box-shadow: none;
}
/* h2 těsně za h1 stejný blok, bez mezery nahoře */
body > h1 + h2 {
margin-top: 0;
border-top-left-radius: 0;
border-top-right-radius: 0;
padding-top: 0;
}
/* h1 když za ním následuje h2 zaoblení jen nahoře */
body > h1:has(+ h2) {
border-bottom-left-radius: 0;
border-bottom-right-radius: 0;
padding-bottom: 0.3rem;
box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.45); /* stín jen nahoře */
}
/* Spodní mezera za posledním blokem */
body > *:last-child {
margin-bottom: var(--sekce-mezera);
}
/* Elementy uvnitř formuláře a sekcí bez extra pozadí a stínu */
form > *,
section > * {
background-color: transparent;
box-shadow: none;
border-radius: 0;
margin-top: 0;
padding-left: 0;
padding-right: 0;
}
/* ------------------------------------------------------------
TYPOGRAFIE MONTSERRAT
------------------------------------------------------------ */
/* === VELIKOST A: hlavní nadpis stránky, jednou === */
h1 {
font-family: 'Montserrat', sans-serif;
font-weight: 100;
font-size: 2.2rem;
letter-spacing: 0.14em;
text-transform: uppercase;
color: var(--akcent-svetly);
line-height: 1.2;
}
/* === VELIKOST B: nadpisy sekcí === */
h2,
h3 {
font-family: 'Montserrat', sans-serif;
font-weight: 100;
font-size: 0.88rem;
letter-spacing: 0.18em;
text-transform: uppercase;
}
h2 {
color: var(--ocel-svetly);
}
h3 {
color: var(--akcent-svetly);
}
/* === VELIKOST C: th, button, label, indikátory ===
(shodná s IBM Plex Serif = 0.78rem, aby text vypadal stejně velký) */
p {
font-size: 0.78rem; /* IBM Plex Serif velikost */
}
strong {
color: var(--text-nadpis);
font-weight: 400; /* IBM Plex Serif nemá bold 300→400 */
}
p > strong:first-child {
color: var(--chyba-text);
}
em {
color: var(--text-jemny);
font-style: italic;
}
/* ------------------------------------------------------------
ODKAZY
------------------------------------------------------------ */
a {
color: var(--akcent-svetly);
text-decoration: none;
border-bottom: 1px solid var(--akcent-okraj);
transition: color 0.15s, border-color 0.15s;
}
a:hover,
a:focus {
color: #e74c3c;
border-bottom-color: #e74c3c;
outline: none;
}
/* ------------------------------------------------------------
FORMULÁŘE
------------------------------------------------------------ */
form {
width: 100%;
max-width: var(--pruh-max);
}
form p {
padding: 0;
margin-bottom: 0.9rem;
box-shadow: none;
border-radius: 0;
margin-top: 0;
}
/* === VELIKOST C: label === */
label {
display: block;
font-family: 'Montserrat', sans-serif;
font-weight: 100;
font-size: 0.78rem;
letter-spacing: 0.1em;
text-transform: uppercase;
color: var(--ocel-svetly);
margin-bottom: 0;
line-height: 1.5;
}
/* Inline label pro checkbox jiný styl */
label:has(input[type="checkbox"]) {
display: inline-flex;
align-items: center;
gap: 0.5rem;
font-family: 'IBM Plex Serif', Georgia, serif;
font-weight: 300;
font-size: 0.78rem;
text-transform: none;
letter-spacing: normal;
color: var(--text-hlavni);
cursor: pointer;
}
/* ------------------------------------------------------------
INPUTY
------------------------------------------------------------ */
input[type="text"],
input[type="email"],
input[type="password"] {
display: block;
width: 100%;
background-color: var(--bg-prvek);
color: var(--text-hlavni);
border: 1px solid var(--ocel);
border-radius: var(--polomer-prvek);
padding: 0.45rem 0.7rem;
font-size: 0.78rem;
font-family: 'IBM Plex Serif', Georgia, serif;
font-weight: 300;
box-shadow: var(--stin-input);
transition: border-color 0.15s, background-color 0.15s, box-shadow 0.15s;
outline: none;
margin-top: 0;
}
input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus {
background-color: var(--bg-prvek-focus);
border-color: var(--akcent-svetly);
box-shadow: var(--stin-input), var(--stin-input-focus);
}
input[type="text"]::placeholder,
input[type="email"]::placeholder,
input[type="password"]::placeholder {
color: var(--ocel-svetly);
opacity: 0.6;
}
/* Inline inputy v tabulce admin.php */
table input[type="password"] {
width: auto;
display: inline-block;
padding: 0.2rem 0.4rem;
font-size: 0.78rem;
margin-top: 0;
}
input[type="checkbox"] {
width: 0.85rem;
height: 0.85rem;
accent-color: var(--akcent-svetly);
cursor: pointer;
flex-shrink: 0;
}
/* ------------------------------------------------------------
TEXTAREA
------------------------------------------------------------ */
textarea {
display: block;
width: 100%;
background-color: var(--bg-prvek);
color: #98c898; /* terminálová zelená pro SQL */
border: 1px solid var(--ocel);
border-radius: var(--polomer-prvek);
padding: 0.75rem;
font-family: 'Courier New', Courier, monospace;
font-size: 0.75rem;
line-height: 1.55;
resize: vertical;
outline: none;
box-shadow: var(--stin-input);
}
textarea:focus {
border-color: var(--akcent-svetly);
box-shadow: var(--stin-input), var(--stin-input-focus);
}
/* ------------------------------------------------------------
TLAČÍTKA VELIKOST C (0.78rem Montserrat)
------------------------------------------------------------ */
button[type="submit"],
button[type="button"] {
background-color: var(--akcent);
color: #e8e8e8;
border: 1px solid var(--akcent-okraj);
border-radius: var(--polomer-prvek);
padding: 0.48rem 1.1rem;
font-family: 'Montserrat', sans-serif;
font-weight: 100;
font-size: 0.78rem;
letter-spacing: 0.12em;
text-transform: uppercase;
cursor: pointer;
transition: background-color 0.15s, border-color 0.15s, box-shadow 0.15s;
margin-top: 0.3rem;
box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
}
button[type="submit"]:hover,
button[type="button"]:hover {
background-color: var(--akcent-hover);
border-color: var(--akcent-hover);
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}
button[type="submit"]:focus,
button[type="button"]:focus {
outline: none;
box-shadow: 0 0 0 2px rgba(192, 57, 43, 0.4);
}
button:disabled {
background-color: #1c1c1c;
color: var(--text-jemny);
border-color: #2a2a2a;
cursor: not-allowed;
box-shadow: none;
}
button:disabled:hover {
background-color: #1c1c1c;
border-color: #2a2a2a;
box-shadow: none;
}
/* Inline formuláře odhlášení, smazání v tabulce */
form[style*="display:inline"],
form[style*="display: inline"] {
display: inline;
width: auto;
margin: 0;
padding: 0;
background-color: transparent;
box-shadow: none;
border-radius: 0;
}
form[style*="display:inline"] button,
form[style*="display: inline"] button {
margin-top: 0;
padding: 0.2rem 0.55rem;
font-size: 0.78rem;
}
/* ------------------------------------------------------------
INDIKÁTOR SÍLY HESLA VELIKOST C
------------------------------------------------------------ */
#heslo-sila,
#novy-heslo-sila {
display: inline-block;
font-family: 'Montserrat', sans-serif;
font-weight: 100;
font-size: 0.78rem;
letter-spacing: 0.06em;
color: var(--text-jemny);
margin-top: 0.2rem;
}
#tlacitko-duvod,
#novy-tlacitko-duvod {
font-family: 'Montserrat', sans-serif;
font-weight: 100;
font-size: 0.78rem;
letter-spacing: 0.04em;
color: var(--text-jemny);
margin-left: 0.4rem;
}
/* ------------------------------------------------------------
TABULKY
------------------------------------------------------------ */
table {
width: 100%;
border-collapse: collapse;
font-size: 0.78rem;
}
/* === VELIKOST C: záhlaví tabulky === */
table th {
font-family: 'Montserrat', sans-serif;
font-weight: 100;
font-size: 0.78rem;
letter-spacing: 0.1em;
text-transform: uppercase;
background-color: var(--akcent);
color: #e8e8e8;
text-align: left;
padding: 0.5rem 0.75rem;
border: 1px solid var(--akcent-okraj);
}
table td {
background-color: var(--bg-prvek);
color: var(--text-hlavni);
padding: 0.4rem 0.75rem;
border: 1px solid var(--ocel);
vertical-align: middle;
font-family: 'IBM Plex Serif', Georgia, serif;
font-weight: 300;
font-size: 0.78rem;
}
table tr:nth-child(even) td {
background-color: #262626;
}
table tr:hover td {
background-color: #2d2d2d;
transition: background-color 0.1s;
}
table td em {
color: var(--text-jemny);
font-style: italic;
}
/* ------------------------------------------------------------
KÓDOVÉ ELEMENTY
------------------------------------------------------------ */
code {
background-color: var(--bg-prvek);
color: #98c898;
font-family: 'Courier New', Courier, monospace;
font-size: 0.85em;
padding: 0.1em 0.35em;
border-radius: var(--polomer-prvek);
border: 1px solid var(--ocel);
}
/* ------------------------------------------------------------
SEZNAMY
------------------------------------------------------------ */
ol, ul {
padding-left: 1.4rem;
font-family: 'IBM Plex Serif', Georgia, serif;
font-weight: 300;
font-size: 0.78rem;
}
ol li, ul li {
margin-bottom: 0.25rem;
line-height: 1.65;
}
/* ------------------------------------------------------------
RESPONSIVNÍ DESIGN
------------------------------------------------------------ */
@media (max-width: 680px) {
:root {
--pruh-max: 100%;
--sekce-padding: 1rem;
--sekce-mezera: 1rem;
--polomer-blok: 0px; /* na mobilu bez zaoblení bloky jdou od kraje */
}
h1 {
font-size: 1.6rem;
}
h2, h3 {
font-size: 0.82rem;
}
table td form[style*="display:inline"],
table td form[style*="display: inline"] {
display: block;
margin-bottom: 0.3rem;
}
table td form[style*="display:inline"] button,
table td form[style*="display: inline"] button {
width: 100%;
}
/* iOS: font-size ≥ 16px zabrání zoomu při focusu */
input[type="text"],
input[type="email"],
input[type="password"] {
font-size: 1rem;
}
table input[type="password"] {
display: block;
width: 100%;
margin-bottom: 0.3rem;
font-size: 1rem;
}
}
@media (max-width: 400px) {
h1 {
font-size: 1.3rem;
letter-spacing: 0.08em;
}
button[type="submit"],
button[type="button"] {
width: 100%;
}
}
/* ------------------------------------------------------------
PŘECHOD PŘI NAČTENÍ
------------------------------------------------------------ */
@keyframes fadein {
from { opacity: 0; transform: translateY(4px); }
to { opacity: 1; transform: translateY(0); }
}