:root {
    --bg: #0b1120;
    --bg-card: #020617;
    --accent: #38bdf8;
    --accent-soft: rgba(56, 189, 248, 0.12);
    --text: #e5e7eb;
    --muted: #9ca3af;
    --danger: #f97373;
    --radius-xl: 18px;
    --shadow-soft: 0 18px 40px rgba(15, 23, 42, 0.7);
    --border-subtle: 1px solid rgba(148, 163, 184, 0.25);
    --font-main: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: var(--font-main);
    background: radial-gradient(circle at top, #1e293b 0, #020617 45%, #000 100%);
    color: var(--text);
}

/* === Auth === */

.auth-body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.auth-container {
    max-width: 420px;
    width: 100%;
}

.auth-card {
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.96), rgba(15, 23, 42, 0.98));
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-soft);
    border: 1px solid rgba(148, 163, 184, 0.3);
    padding: 28px 24px 24px;
}

.auth-card h1 {
    margin: 0 0 4px;
    font-size: 1.35rem;
    letter-spacing: 0.03em;
	text-align: center;
}

.auth-subtitle {
    margin: 0 0 16px;
    font-size: 0.9rem;
    color: var(--muted);
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-top: 10px;
}

.auth-form label {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 0.9rem;
}

.auth-form input {
    background: #020617;
    border-radius: 10px;
    border: 1px solid rgba(148, 163, 184, 0.6);
    padding: 9px 10px;
    color: var(--text);
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}

.auth-form input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.6);
    background: #020819;
}

.btn-primary {
    margin-top: 8px;
    width: 100%;
    padding: 10px 14px;
    border-radius: 999px;
    border: none;
    background: linear-gradient(135deg, #38bdf8, #0ea5e9);
    color: #0b1120;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    box-shadow: 0 12px 30px rgba(8, 47, 73, 0.7);
    transition: transform 0.12s ease, box-shadow 0.12s ease, filter 0.1s ease;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 16px 40px rgba(8, 47, 73, 0.9);
    filter: brightness(1.03);
}

.btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 10px 25px rgba(8, 47, 73, 0.8);
}

.auth-footer {
    margin-top: 16px;
    font-size: 0.78rem;
    color: var(--muted);
    text-align: center;
}

/* Alerts */

.alert {
    padding: 8px 10px;
    border-radius: 10px;
    font-size: 0.85rem;
    margin-bottom: 8px;
}

.alert-error {
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(248, 113, 113, 0.6);
    color: #fecaca;
}

/* === Main layout === */

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    border-bottom: var(--border-subtle);
    backdrop-filter: blur(12px);
    background: radial-gradient(circle at top left, rgba(56, 189, 248, 0.12), transparent 55%),
                radial-gradient(circle at bottom right, rgba(59, 130, 246, 0.08), transparent 55%),
                rgba(15, 23, 42, 0.9);
}

.logo-text {
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    font-size: 0.95rem;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.85rem;
    color: var(--muted);
}

.btn-ghost {
    padding: 6px 12px;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.5);
    color: var(--text);
    text-decoration: none;
    font-size: 0.8rem;
    transition: background 0.15s, border-color 0.15s;
}

.btn-ghost:hover {
    background: rgba(148, 163, 184, 0.2);
    border-color: rgba(248, 250, 252, 0.7);
}

.main-layout {
    padding: 20px;
    display: grid;
    gap: 18px;
    grid-template-columns: minmax(0, 2fr) minmax(0, 1.4fr);
}

@media (max-width: 900px) {
    .main-layout {
        grid-template-columns: minmax(0, 1fr);
    }
}

.card {
    background: radial-gradient(circle at top, rgba(56, 189, 248, 0.12), transparent 55%),
                #020617;
    border-radius: var(--radius-xl);
    border: 1px solid rgba(148, 163, 184, 0.3);
    padding: 18px 18px 16px;
    box-shadow: var(--shadow-soft);
}

.card h2 {
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 1.05rem;
}

.card p {
    font-size: 0.9rem;
    color: var(--muted);
}

.card ul {
    margin-top: 8px;
    padding-left: 18px;
    font-size: 0.9rem;
    color: var(--muted);
}

.reg-code-box{
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px dashed rgba(56, 189, 248, 0.6);
  background: rgba(56, 189, 248, 0.06);
}
.reg-code-label{
  display:block;
}
.tooltip{
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  margin-left: 6px;
  border-radius: 999px;
  font-size: 12px;
  cursor: help;
  border: 1px solid rgba(148,163,184,.5);
  color: rgba(226,232,240,.9);
}
.tooltip-content{
  position:absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: 26px;
  width: 230px;
  padding: 8px 10px;
  border-radius: 12px;
  background: rgba(15,23,42,.98);
  border: 1px solid rgba(148,163,184,.35);
  color: #e5e7eb;
  font-size: 12px;
  line-height: 1.3;
  opacity: 0;
  pointer-events:none;
  transition: opacity .15s;
  box-shadow: 0 12px 30px rgba(0,0,0,.35);
  white-space: normal;
}
.tooltip:hover .tooltip-content{
  opacity: 1;
}

.checkbox-row{
  display:flex;
  flex-direction: row-reverse;   /* checkbox po prawej */
  align-items:flex-start;
  gap: 10px;
}

.checkbox-row span{
  flex: 1 1 auto;                /* tekst zajmuje resztę miejsca */
}

/* WAŻNE: nadpisuje globalne style input (width:100%, display:block itp.) */
.checkbox-row input[type="checkbox"]{
  width: 18px !important;
  height: 18px !important;
  display: inline-block !important;
  flex: 0 0 auto !important;
  margin-top: 2px;
}