button {
    padding: 12px;
    background-color: blue;
    color: white;
    border-radius: 8px;
}
form {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 400px;
}
input {
    padding: 12px;
    font-size: 16px;
    border-radius: 8px;
    border: 1px solid gray;
}
button,
input {
    font-family: inherit;
}
[hidden] {
    display: none !important;
}

#podglad-zdjecia {
    max-width: 100%;
    height: auto;
}

html {
    background-color: #14191e;
}

body {
    min-height: calc(100vh - 40px);
    font-family: "Inter", Arial, sans-serif;
    margin: 0 auto;
    padding: 20px 16px;
    max-width: 480px;
    background: #14191e url("figma-makieta/Rectangle%202.png") center top / cover no-repeat;
    color: #f2f1ef;
}

.naglowek-katalogu {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-bottom: 5px;
    border-bottom: 1px solid #515b67;
}

.logo-katalogu {
    display: block;
    width: clamp(72px, 18.5vw, 88px);
    height: auto;
}

#wyloguj {
    min-height: 36px;
    padding: 6px 8px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 1px solid currentColor;
    background: transparent;
    color: inherit;
    font: 700 0.875rem "Inter", Arial, sans-serif;
    cursor: pointer;
}

#wyloguj:disabled {
    opacity: 0.6;
    cursor: wait;
}

#komunikat:empty {
    margin: 0;
}

#ekran-zdjecia h1 {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 16px 0 10px;
    font: 800 clamp(1.55rem, 7.5vw, 2rem) / 1.05 "Barlow Condensed", "Arial Narrow", sans-serif;
    text-transform: uppercase;
}

#ekran-zdjecia h1::before {
    content: "";
    flex: 0 0 16px;
    height: 0.95em;
    background: #245be8;
    clip-path: polygon(58% 0, 100% 0, 42% 100%, 0 100%);
}

label[for="kod-czesci"] {
    color: #bfc4cb;
    font-weight: 700;
}

.wiersz-kodu {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    margin-top: 8px;
}

#kod-czesci {
    box-sizing: border-box;
    width: 100%;
    background: #1c2229;
    color: inherit;
    border-color: #82909f;
    font-family: "Roboto Mono", Consolas, monospace;
    font-weight: 500;
}

#opis-czesci:not(:empty) {
    padding: 14px;
    background: #232a32;
    border-left: 5px solid #245be8;
    border-radius: 8px;
}

.kod-z-karty {
    display: block;
    margin-bottom: 2px;
    font: 500 1.125rem "Roboto Mono", Consolas, monospace;
}

#tytul-podgladu {
    margin: 20px 0 8px;
    font-weight: bold;
}

.wizjer {
    position: relative;
    display: grid;
    place-items: center;
    min-height: 150px;
    background: #1c2229;
    border: 1px solid #4c5662;
    border-radius: 8px;
    overflow: hidden;
}

.wizjer::after {
    content: "";
    position: absolute;
    inset: 12px;
    pointer-events: none;
    background:
        linear-gradient(#f2f1ef, #f2f1ef) top left / 18px 2px,
        linear-gradient(#f2f1ef, #f2f1ef) top left / 2px 18px,
        linear-gradient(#f2f1ef, #f2f1ef) top right / 18px 2px,
        linear-gradient(#f2f1ef, #f2f1ef) top right / 2px 18px,
        linear-gradient(#f2f1ef, #f2f1ef) bottom left / 18px 2px,
        linear-gradient(#f2f1ef, #f2f1ef) bottom left / 2px 18px,
        linear-gradient(#f2f1ef, #f2f1ef) bottom right / 18px 2px,
        linear-gradient(#f2f1ef, #f2f1ef) bottom right / 2px 18px;
    background-repeat: no-repeat;
}

.wizjer-pusty {
    margin: 24px;
    color: #bfc4cb;
    text-align: center;
}

#podglad-zdjecia:not([hidden]) {
    display: block;
    width: 100%;
}

#podglad-zdjecia:not([hidden]) + .wizjer-pusty {
    display: none;
}

#pobierz-opis,
#zapisz-zdjecie {
    background: #232a32;
    border: 1px solid #82909f;
    min-height: 44px;
    font-weight: bold;
}

#etykieta-aparatu,
#zapisz-zdjecie {
    box-sizing: border-box;
    display: block;
    width: 100%;
    margin-top: 12px;
    padding: 14px;
    text-align: center;
}

#ekran-zdjecia[data-krok="opis"] #pobierz-opis,
#ekran-zdjecia[data-krok="zdjecie"] #etykieta-aparatu,
#ekran-zdjecia[data-krok="zapis"] #zapisz-zdjecie:not(:disabled) {
    background: #245be8;
    border-color: #245be8;
}

#zapisz-zdjecie:disabled {
    background: #303842;
    border-color: #4c5662;
    color: #bfc4cb;
    cursor: not-allowed;
}

#etykieta-aparatu {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-weight: 700;
    border: 1px solid #82909f;
    border-radius: 8px;
    background: #232a32;
    cursor: pointer;
}

#etykieta-aparatu svg {
    flex: none;
}

#zapisz-zdjecie {
    font: 800 1.5rem / 1 "Barlow Condensed", "Arial Narrow", sans-serif;
    text-transform: uppercase;
}

/* Pole pliku pozostaje dostępne z klawiatury. */
#zdjecie {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    overflow: hidden;
    clip-path: inset(50%);
}

#zdjecie:focus-visible + #etykieta-aparatu {
    outline: 2px solid #91b1ff;
    outline-offset: 3px;
}


#login-form button[type="submit"] {
    margin-top: 12px;
    background: #245be8;
    border: 0;
    border-radius: 8px;
}

#login-form button[type="submit"]:focus-visible {
    outline: 2px solid #91b1ff;
    outline-offset: 3px;
}

#login-form {
    width: 100%;
    max-width: 400px;
    margin-inline: auto;
}