/* base.css — reset, typografia, elementy formularzy, animacje globalne */
* { box-sizing: border-box; margin: 0; padding: 0; }

html, body { height: 100%; }
body {
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  background-image: var(--bg-grad);
  background-attachment: fixed;
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background-color var(--t-slow) var(--ease), color var(--t-slow) var(--ease);
}

.hidden { display: none !important; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 { color: var(--text-strong); font-weight: 700; letter-spacing: -.02em; }

::selection { background: rgba(27,63,230,.18); }

/* scrollbary */
* { scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent; }
*::-webkit-scrollbar { width: 11px; height: 11px; }
*::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 99px; border: 3px solid transparent; background-clip: content-box; }
*::-webkit-scrollbar-thumb:hover { background: var(--faint); background-clip: content-box; }

/* pola formularzy */
input, select, textarea {
  font: 400 13.5px var(--font);
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: 9px 11px;
  outline: none;
  transition: border-color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease), background var(--t-fast) var(--ease);
}
input::placeholder, textarea::placeholder { color: var(--faint); }
input:hover, select:hover, textarea:hover { border-color: var(--line-strong); }
input:focus, select:focus, textarea:focus {
  border-color: var(--accent);
  box-shadow: var(--sh-focus);
  background: var(--surface);
}
input.num { text-align: right; font-variant-numeric: tabular-nums; }
textarea { resize: vertical; min-height: 74px; width: 100%; line-height: 1.5; }
select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 16px) center, calc(100% - 11px) center;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 30px;
  cursor: pointer;
}
input[type="checkbox"] {
  appearance: none;
  width: 17px; height: 17px;
  border: 1.5px solid var(--line-strong);
  border-radius: 5px;
  background: var(--surface);
  cursor: pointer;
  position: relative;
  vertical-align: -3px;
  transition: all var(--t-fast) var(--ease);
}
input[type="checkbox"]:checked { background: var(--accent); border-color: var(--accent); }
input[type="checkbox"]:checked::after {
  content: ''; position: absolute; left: 5px; top: 1.5px;
  width: 4px; height: 9px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg);
}
input[type="checkbox"]:focus-visible { box-shadow: var(--sh-focus); }
input[type="date"] { min-height: 36px; }

.form-error {
  color: var(--danger);
  font-size: 12.5px;
  margin: 8px 0;
  padding: 8px 11px;
  background: var(--danger-bg);
  border-radius: var(--r-sm);
  border: 1px solid color-mix(in srgb, var(--danger) 25%, transparent);
}

.hint { font-size: 12px; color: var(--muted); line-height: 1.5; }
.lbl { display: block; font-size: 11.5px; font-weight: 700; color: var(--text-strong); margin-bottom: 6px; letter-spacing: .01em; }
.empty {
  text-align: center; color: var(--muted); padding: 56px 20px;
  background: var(--surface); border: 1px dashed var(--line-strong);
  border-radius: var(--r-md); font-size: 14px;
}

/* animacje */
@keyframes fade-up { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes pop-in { from { opacity: 0; transform: scale(.96) translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes toast-in { from { opacity: 0; transform: translateX(120%); } to { opacity: 1; transform: none; } }
@keyframes shimmer { 100% { transform: translateX(100%); } }
@keyframes spin { to { transform: rotate(360deg); } }
