/* Reset i ogólne */
body {
    margin: 0;
    font-family: 'Segoe UI', Tahoma, sans-serif;
    background: #121212;
    color: #e0e0e0;
}

/* Pasek nawigacyjny */
header {
    position: sticky;
    top: 0;
    background: #181a22e8;
    color: #f3f6fb;
    padding: 10px 20px;
    display: flex;
    gap: 10px;
    z-index: 1000;
    border-bottom: 1.5px solid #2ad6fc;
    font-family: 'Orbitron', Arial, sans-serif;
}

header button,
header a {
    background: #232838;
    color: #f3f6fb;
    border: 1.5px solid #2ad6fc;
    padding: 10px 14px;
    cursor: pointer;
    border-radius: 10px;
    text-decoration: none;
    font-family: 'Orbitron', Arial, sans-serif;
    font-size: 1rem;
    letter-spacing: 1px;
    box-shadow: 0 2px 10px #2ad9;
    transition: background 0.2s ease, color 0.2s ease;
}

header button:hover,
header a:hover {
    background: #2c3244;
    color: #aefcff;
}

header button:hover,
header a:hover {
    background: #555;
}

a {
    color: #4fc3f7;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* Sekcje */
section {
    display: none;
    padding: 20px;
    background: #1e1e1e;
    border-bottom: 1px solid #333;
}

h2 {
    margin-top: 0;
    color: #ffffff;
}

/* Tabela */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
    font-size: 14px;
}

th, td {
    padding: 8px 12px;
    border: 1px solid #333;
    vertical-align: top;
}

th {
    background: #292929;
    position: sticky;
    top: 50px;
    z-index: 2;
    color: #ffffff;
}

.filter-row td {
    background: #202533;
    border-top: none;
    position: sticky;
    top: 93px;
    z-index: 1;
}

.filter-row input {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #46c1f8;
    border-radius: 6px;
    background: #161b26;
    color: #eef;
    box-sizing: border-box;
    font-size: 0.9rem;
}

.filter-row input::placeholder {
    color: #8ea8bc;
}

tr:nth-child(even) {
    background-color: #1a1a1a;
}

.notes {
    max-width: 400px;
    white-space: pre-wrap;
}

.completed-date-col {
    white-space: nowrap;
    width: 1%;
    min-width: 7.5rem;
}

.device-notes-cell {
    white-space: normal;
}

.device-wishlist-block {
    margin: 0 0 8px;
    padding: 0;
    text-indent: 0;
}

.device-wishlist-title,
.device-wishlist-links,
.device-notes-cell .legacy-notes {
    margin: 0;
    padding: 0;
    text-indent: 0;
}

.device-wishlist-links {
    white-space: normal;
}

.device-wishlist-links a {
    display: block;
    margin: 0 0 4px 0;
}

.device-notes-cell .legacy-notes {
    white-space: pre-wrap;
}

.device-notes-cell .legacy-notes-title,
.device-notes-cell .legacy-notes-content {
    margin: 0;
    padding: 0;
    text-indent: 0;
}

.device-notes-cell .legacy-notes-content {
    white-space: pre-wrap;
}

.form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: stretch;
    margin-top: 20px;
}

.form-actions button,
.form-actions a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 10px 18px;
    margin: 0;
    box-sizing: border-box;
    line-height: 1.2;
    border-radius: 6px;
    font-size: 1rem;
    font-family: 'Orbitron', sans-serif;
    text-decoration: none;
}

.form-actions .cancel-button {
    margin-left: 0;
}

.form-actions .secondary-action {
    background: #444;
    color: #fff;
    box-shadow: none;
}

.form-actions .secondary-action:hover {
    background: #555;
}

.form-actions .delete-button {
    background: #9f1f1f;
    color: #fff;
    border: 1px solid #d45454;
}

.form-actions .delete-button:hover {
    background: #b72828;
    color: #fff;
    text-decoration: none;
}

/* Obrazki */
img.preview-img {
    cursor: pointer;
    transition: transform 0.2s ease;
}

img.preview-img:hover {
    transform: scale(1.05);
}

/* Lightbox */
.lightbox {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.9);
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

.lightbox img {
    max-width: 95%;
    max-height: 95%;
    border: 4px solid white;
    box-shadow: 0 0 20px black;
}
/* Kontener formularza */
.form-wrapper {
    background: white;
    padding: 20px;
    margin: 20px auto;
    max-width: 1200px;
    border: 1px solid #ccc;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0,0,0,0.05);
}

/* Styl etykiet i pól */
form label {
    display: block;
    margin-bottom: 10px;
    font-weight: bold;
}

form input[type="text"],
form input[type="number"],
form input[type="date"],
form select,
form textarea {
    width: 100%;
    padding: 6px;
    margin-top: 4px;
    border: 1px solid #aaa;
    border-radius: 4px;
    box-sizing: border-box;
    font-size: 14px;
}

/* Styl przycisków */
form button,
.cancel-button {
    display: inline-block;
    margin-top: 10px;
    padding: 8px 14px;
    font-size: 14px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
}

form button:hover,
.cancel-button:hover {
    background-color: #0056b3;
}

/* Nagłówki podstron */
.form-wrapper h2 {
    margin-top: 0;
    font-size: 20px;
    border-bottom: 1px solid #ddd;
    padding-bottom: 10px;
    margin-bottom: 20px;
}

/* Zastosuj Orbitron i ciemne tło z neonowymi akcentami */
body {
  font-family: 'Orbitron', Arial, sans-serif;
  background: #101218;
  color: #f3f6fb;
}

.form-wrapper {
  background: #181a22e8;
  border: 1.5px solid #2ad6fc;
  box-shadow: 0 2px 18px #2ad9;
  border-radius: 12px;
  padding: 20px 30px;
  margin: 40px auto;
  max-width: 800px;
}

form label {
  display: block;
  margin: 15px 0 5px;
  font-weight: bold;
  color: #aefcff;
}

form input[type="text"],
form input[type="number"],
form input[type="date"],
form select,
form textarea {
  width: 100%;
  padding: 10px;
  border: 1.5px solid #46c1f8;
  border-radius: 6px;
  background: #232838;
  color: #eef;
  box-sizing: border-box;
}

form textarea {
  resize: vertical;
}

form button {
  background: #28a745;
  border: none;
  color: #fff;
  padding: 10px 18px;
  font-size: 1rem;
  margin-top: 20px;
  border-radius: 6px;
  cursor: pointer;
  transition: 0.2s;
  box-shadow: 0 2px 10px #28a745aa;
}

form button:hover {
  background: #218838;
}

a.cancel-button {
  margin-left: 20px;
  color: #f88;
  text-decoration: none;
  font-weight: bold;
}

a.cancel-button:hover {
  text-decoration: underline;
  color: #faa;
}
.form-wrapper {
    max-width: 600px;
    margin: 40px auto;
    padding: 20px 30px;
    background: #1f1f1f;
    border: 1.5px solid #2ad6fc;
    border-radius: 12px;
    box-shadow: 0 4px 18px #2ad9;
    color: #f3f6fb;
    font-family: 'Orbitron', Arial, sans-serif;
}
button, input[type="submit"] {
    font-family: 'Orbitron', sans-serif;
    font-weight: 500;
    font-size: 1rem;
    background-color: #2b2b2b;
    color: #fff;
    border: 1px solid #2ad6fc;
    padding: 10px 16px;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s;
}

button:hover, input[type="submit"]:hover {
    background-color: #3c3c3c;
}
.logout-button {
    background: #a00;
    color: white;
    border: none;
    padding: 8px 12px;
    cursor: pointer;
    border-radius: 4px;
    text-decoration: none;
    transition: background 0.2s;
    margin-left: 10px;
}
.logout-button:hover {
    background: #c33;
}

.error-message {
  background: #4c1e1e;
  color: #ffbaba;
  border: 1px solid #ff5c5c;
  padding: 12px 16px;
  border-radius: 6px;
  margin: 20px auto;
  max-width: 480px;
  font-size: 1.1rem;
  text-align: center;
  font-family: 'Orbitron', Arial, sans-serif;
  box-shadow: 0 2px 10px rgba(255, 0, 0, 0.2);
}
.year-toggle {
    margin: 20px 0;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.year-toggle button {
    background: #2a2a2a;
    color: #f3f6fb;
    border: 1px solid #2ad6fc;
    border-radius: 6px;
    padding: 6px 14px;
    font-family: 'Orbitron', sans-serif;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background 0.2s;
}

.year-toggle button:hover {
    background: #3a3a3a;
}

canvas {
    margin-top: 20px;
    max-width: 100%;
}

.button-back {
    display: inline-block;
    padding: 8px 16px;
    background: #2ad6fc;
    color: #000;
    text-decoration: none;
    border-radius: 6px;
    font-weight: bold;
    font-family: 'Orbitron', sans-serif;
    box-shadow: 0 2px 6px #1ab;
}

.button-back:hover {
    background: #1ac9eb;
}
.year-toggle button {
    background: #333;
    color: #fff;
    border: 1px solid #46c1f8;
    padding: 8px 12px;
    margin: 5px;
    font-family: 'Orbitron', sans-serif;
    font-size: 14px;
    cursor: pointer;
    border-radius: 4px;
    transition: background 0.2s;
}
.year-toggle button:hover {
    background: #555;
}
#platformChart {
    max-height: 1200px; /* lub inna wartość, np. 500px */
    width: 100%;
}
canvas {
  max-height: 600px;
  width: 100%;
}

.stats-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.stats-card {
    background: #181a22e8;
    border: 1.5px solid #2ad6fc;
    border-radius: 12px;
    padding: 18px 16px;
    box-shadow: 0 2px 18px #2ad9;
}

.stats-card-value {
    font-size: 2rem;
    font-weight: 700;
    color: #fff;
}

.stats-card-label {
    margin-top: 8px;
    color: #aefcff;
    font-size: 0.92rem;
}

.stats-chart-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 20px;
    margin-bottom: 24px;
}

.stats-panel {
    background: #181a22e8;
    border: 1.5px solid #2ad6fc;
    border-radius: 12px;
    padding: 18px;
    box-shadow: 0 2px 18px #2ad9;
    margin-bottom: 24px;
}

.stats-panel h3 {
    margin: 0 0 14px;
    color: #fff;
    font-size: 1rem;
}

.stats-canvas-wrap {
    position: relative;
    height: 320px;
}

.stats-table {
    margin-top: 0;
}
