/* === GLOBAL === */
body {
    font-family: Arial, sans-serif;
    background-color: #f1f1f1;
    color: #333;
    margin: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

/* === LAYOUT === */
.main-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto auto;
    gap: 20px;
    max-width: 1000px;
    margin: 40px auto;
    padding: 20px;
}

.zone {
    background-color: white;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* === ZONE POSITIONING === */
.zone1 { grid-column: 1; grid-row: 1; display: flex; justify-content: center; align-items: center; }
.zone2 { grid-column: 2; grid-row: 1; display: flex; justify-content: center; align-items: center; }
.zone3 { grid-column: 1 / span 2; grid-row: 2; }
.zone4 { grid-column: 1 / span 2; grid-row: 3; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; }
.zone5 { grid-column: 2; grid-row: 3; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; }

.button-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    justify-items: center;
}

/* === TYPOGRAPHY === */
h1 {
    font-size: 32px;
    margin-bottom: 10px;
    color: #006600;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    margin-top: 10px;
}

/* === IMAGES === */
.img-logo {
    width: 100%;
    max-width: 300px;
    height: auto;
}

.img-photo {
    width: 100%;
    max-width: 300px;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* === FORMULARZ LOGIN === */
#login-form {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.label-input {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.label-input label {
    margin-right: 10px;
    font-size: 20px;
    color: #006600;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

input[type="text"],
input[type="password"] {
    width: 100%;
    max-width: 250px;
    padding: 8px;
    font-size: 16px;
    border-radius: 4px;
    border: 1px solid #ccc;
    margin-bottom: 5px;
    margin-top: 5px;
}

/* === BUTTONS: LOG IN & PE === */
.login-button,
.pe-button {
    padding: 10px 20px;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    text-transform: uppercase;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.login-button:hover,
.pe-button:hover {
    background-color: #45a049;
}

.login-button:active,
.pe-button:active {
    background-color: #3e8e41;
}

.pe-button {
    gap: 10px;
    max-width: 100px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
}

.pe-button img {
    width: 100%;
}

.logi {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.pe-button span {
    font-size: 10px;
}

/* === LOGIN MESSAGE === */
#login-message {
    margin-top: 10px;
    font-weight: bold;
}

/* === BUTTON STANY WYŁĄCZONE === */
.button-disabled {
    opacity: 0.3;
    pointer-events: none;
    cursor: default;
}

/* === GREEN CIRCLE BUTTON (⭠) === */
.green-button {
    position: relative;
    background-color: #4CAF50;
    padding: 10px;
    border-radius: 50%;
    text-decoration: none;
    color: white;
    height: fit-content;
    width: fit-content;
}

/* === MODAL + PDF === */
.modal {
    position: fixed;
    z-index: 998;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.5);
}

.modal-content {
    background-color: #fefefe;
    padding: 20px;
    border-radius: 10px;
    width: 90%;
    max-width: 400px;
    text-align: center;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
}

.close {
    font-size: 24px;
    cursor: pointer;
    align-self: flex-end;
}

#pdfContainer {
    display: none;
    position: fixed;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.85);
    z-index: 999;
    align-items: center;
    justify-content: center;
    padding: 10px;
}

/* #pdfContainer button {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 80px;
    height: 80px;
    background-color: #4CAF50;
    color: #fff;
    border: none;
    border-radius: 50%;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

#pdfContainer button:hover {
    background-color: #45a049;
    transform: scale(1.05);
    box-shadow: 0 6px 10px rgba(0, 0, 0, 0.2);
} */

@media (max-width: 700px) {
    #pdfContainer button {
        width: 50px;
        height: 50px;
        font-size: 18px;
    }
}

/* === CIRCLE LANGUAGE BUTTONS === */
.circle-buttons {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 300px;
    height: 300px;
    margin: auto;
    overflow: hidden;
    left: -30px;
}

.circle-buttons::before {
    content: "";
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background-color: #f1f1f1;
    z-index: -2;
}

.circle-buttons button {
    position: absolute;
    width: 80px;
    height: 80px;
    background-color: transparent;
    border: none;
    cursor: pointer;
    z-index: 0;
}

.circle-buttons button img {
    width: 60px;
    height: 60px;
}

.circle-buttons button span {
    font-size: 10px;
    text-transform: uppercase;
    font-weight: bold;
    z-index: 9999;
    position: relative;
    color: #006600;
}

.circle-buttons button:nth-child(1) { top: 0%; left: 33%; transform: translateX(-50%); }
.circle-buttons button:nth-child(2) { top: 35%; left: 22%; transform: translateX(-50%); }
.circle-buttons button:nth-child(3) { top: 35%; left: 78%; transform: translateX(-50%); }
.circle-buttons button:nth-child(4) { top: 35%; left: 50%; transform: translateX(-50%); }
.circle-buttons button:nth-child(5) { top: 0%; left: 67%; transform: translateX(-50%); }
.circle-buttons button:nth-child(6) { top: 68%; left: 67%; transform: translateX(-50%); }
.circle-buttons button:nth-child(7) { top: 70%; left: 33%; transform: translateX(-50%); }

/* === RESPONSYWNOŚĆ === */
@media (max-width: 700px) {
    .main-grid {
        grid-template-columns: 1fr;
        grid-auto-rows: auto;
        gap: 20px;
    }

    .zone1,
    .zone2,
    .zone3,
    .zone4,
    .zone5,
    .zone6 {  /* ← poprawnie z kropką */
        grid-column: 1 !important;
        grid-row: auto !important;
    }

    .img-logo,
    .img-photo {
        max-width: 90%;
    }

    .modal-content {
        width: 70%;
        max-width: 70%;
    }
}

@media (max-width: 480px) {
    .button-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

#pdfViewerPages {
	overflow-y: auto;
	overflow-x: hidden;
	max-height: 90vh;
	width: 90vw;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 20px;
}

#pdfViewerPages canvas {
	display: block;
	box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

@keyframes spin {
	0% { transform: rotate(0deg); }
	100% { transform: rotate(360deg); }
}

.pdf-close-btn{
  top: 10px; right: 10px; position: absolute; width: 50px; height: 50px; border-radius: 50%; background-color: #4CAF50; color: white; font-size: 18px; border: none; cursor: pointer;
}
.pdf-close-btn:hover{ background:#45A049; }
/* === Checklist (report_checklist) === */

/* Wymuś 3 kolumny (desktop), 2 kolumny (tablet), 1 kolumna (mobile) */
.button-grid.checklist {
  display: grid;
  grid-template-columns: repeat(1, 1fr);
  gap: 14px;
  width: 100%;
}

.pe-button.checklist-item{
    width: 100%;
    max-width: none;
}
/* kafel kroku: bez hovera/animacji */
.pe-button.checklist-item {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  padding: 14px 16px;
  transition: none;
}
.pe-button.checklist-item:hover,
.pe-button.checklist-item:focus,
.pe-button.checklist-item:active {
  background-color: #4CAF50;
  transform: none;
  filter: none;
  box-shadow: 0 2px 6px rgba(0,0,0,.15);
  cursor: default;
}

.checklist-header { display:flex; align-items:center; gap:10px; }
.checklist-num { font-weight:700; }
.checklist-text { line-height:1.3; }

/* Zielone zamiast tailwindowego niebieskiego – bez zmiany rozmiaru/pr spacingu */
button.bg-blue-600,
a.bg-blue-600 {
  background-color: #4CAF50 !important; /* zielony */
  border-color: #4CAF50 !important;
  color: #fff !important;
}

/* Hover dla hover:bg-blue-700 */
button.hover\:bg-blue-700:hover,
a.hover\:bg-blue-700:hover {
  background-color: #45A049 !important; /* ciemniejszy zielony */
  border-color: #45A049 !important;
}

/* (opcjonalnie) focus ring jeśli gdzieś masz focus:ring-blue-500 */
button.focus\:ring-blue-500:focus,
a.focus\:ring-blue-500:focus {
  box-shadow: 0 0 0 3px rgba(76,175,80,.35) !important;
}

/* Select: pełna szerokość kafla, estetyczna strzałka, font z symbolami */
.checklist-select {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;

  width: 90%;
  margin-bottom: 10px;
  min-height: 40px;
  padding: 10px 40px 10px 12px;   /* miejsce na strzałkę */
  border: 2px solid #4CAF50;
  border-radius: 10px;
  background: #fff;

  font: inherit;
  font-weight: 700;               /* symbole czytelne */
  font-family: inherit, "Segoe UI Symbol", "Noto Color Emoji", "Apple Color Emoji", sans-serif;
  text-align-last: left;          /* render wybranej opcji */

  line-height: 1.2;
  cursor: pointer;

  transition: border-color .15s ease, box-shadow .15s ease;
  box-shadow: inset 0 1px 1px rgba(0,0,0,.05);

  background-image: url("data:image/svg+xml;utf8,\
<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 20 20'>\
<path fill='%234CAF50' d='M5.5 7.5L10 12l4.5-4.5z'/></svg>");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px 16px;
}
.checklist-select:hover { border-color:#45A049; }
.checklist-select:focus { outline:none; border-color:#45A049; box-shadow:0 0 0 3px rgba(76,175,80,.25); }

/* Oddzielenie dolnych akcji */
.checklist-actions {
  width: 100%;
  margin-top: 22px;
  padding-top: 14px;
  border-top: 2px dashed rgba(0,0,0,0.10);
  
    grid-template-columns: 1fr;

  display: grid;
  justify-content: center;   /* wycentruj całą siatkę w szerokości 100% */
  justify-items: center;     /* wycentruj same przyciski w kolumnach */
  gap: 12px;
}

/* mobile: jedna kolumna, też wycentrowana */
@media (max-width: 640px){
  .checklist-actions {
    grid-template-columns: minmax(180px, max-content);
    justify-content: center;
  }

    .back-fab{
    position: fixed;
    left: 16px;
    bottom: calc(16px + env(safe-area-inset-bottom));
    z-index: 997; /* poniżej modali (998/999), ale nad treścią */
  }
  .back-fab .green-button{
    width: 56px; height: 56px;
    display: flex; align-items: center; justify-content: center;
    font-size: 22px; line-height: 1;
  }
}

/* linki-„przyciski” – normalny hover pochodzi z .pe-button */
a.pe-button.linklike { text-decoration: none; }
@media (max-width: 640px){
  .checklist-actions { grid-template-columns: 1fr; }
}

