/* ===== Motyw ciemny -- nadpisanie kolorow DaisyUI ===== */
[data-theme="dark"] {
    --b1: 0.145 0 0;          /* base-100: #1d1d1d */
    --b2: 0.12 0 0;           /* base-200: #1a1a1a */
    --b3: 0.18 0 0;           /* base-300: #262626 */
    --bc: 0.93 0 0;           /* base-content: #ededed */
}

/* Subtelniejsze zebra stripes */
.table-zebra tbody tr:nth-child(even) {
    background-color: oklch(0.16 0 0);
}

html, body {
    height: 100%;
    overflow-x: hidden;
}
html {
    font-size: 17px;
}
@media (max-width: 767px) {
    html {
        font-size: 15px;
    }
}
body {
    margin: 0;
    padding-top: 210px;
    background-color: oklch(var(--b1));
    color: oklch(var(--bc));
}
@media (max-width: 767px) {
    body {
          padding-top: 72px;
    }
}
.page-wrapper {
    min-height: calc(100vh - 210px);
    display: flex;
    flex-direction: column;
}
@media (max-width: 767px) {
    .page-wrapper {
          min-height: calc(100vh - 72px);
    }
}
main {
    flex: 1;
    min-width: 0;
}

h2, h3 {
    text-align: center;
}

/* Centered layout for the login page form */
.login-form {
    max-width: none;
    margin: auto;
}

.login-form label {
    white-space: nowrap;
}

.actions {
    margin-top: 20px;
}

/* Optional wrapper for centering form buttons */
.form-actions {
    text-align: center;
    width: 100%;
    margin-top: 1rem;
}

/* Stylizacja nagłówka */
header {
    background-color: #17383E;
    color: white;
    padding: 20px;
    background-image: url("https://retrievershop.pl/wp-content/uploads/2024/08/paw-pattern-2.svg");
    background-size: cover;
    text-align: center;
}

footer {
    margin-top: auto;
    text-align: center;
}

footer a {
    color: #17383E;
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

.text-brand {
    color: #17383E;
}

.barcode-feedback {
    position: fixed;
    top: 90px;
    right: 1rem;
    max-width: 360px;
    width: min(90vw, 360px);
    z-index: 1100;
    pointer-events: none;
}

.barcode-feedback .alert {
    margin-bottom: 0.5rem;
    pointer-events: auto;
}

/* Ustawienie szerokości tabeli */
table {
    width: 100%;
    table-layout: auto;
    border-collapse: collapse;
    margin-top: 5px;
}

/* Tabele: przewijanie poziome na mobile */
.overflow-x-auto {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    max-width: 100%;
}

/* Nagłówki tabeli */
th {
    padding: 8px 12px;
}

/* Zmniejszenie odstępów w wersji mobilnej */
@media (max-width: 768px) {
    table {
        width: 100%;
    }
    th, td {
        padding: 6px;
        font-size: 0.9em;
    }
}

.log-container {
    max-height: 600px;
    overflow-y: auto;
    padding: 10px;
    border: 1px solid oklch(var(--b3));
    background-color: oklch(var(--b2));
    margin: 20px auto;
    width: 90%;
}

.log-content {
    font-family: monospace;
    text-align: left;
    white-space: pre-wrap;
}

/* Mobile slide-in menu + backdrop */
.mobile-menu-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1040;
}
.mobile-menu-backdrop.open {
    display: block;
}
.mobile-menu {
    position: fixed;
    top: 0;
    right: 0;
    width: 280px;
    max-width: 85vw;
    height: 100%;
    background-color: #17383E;
    padding: 1rem;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    z-index: 1050;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}
.mobile-menu ul {
    flex-grow: 1;
}
.mobile-menu.open {
    transform: translateX(0);
}
.mobile-menu a {
    color: #fff;
    text-decoration: none;
    display: block;
    padding: 10px 8px;
    transition: background-color 0.2s ease, color 0.2s ease;
    border-radius: 6px;
}
.mobile-menu a:hover,
.mobile-menu a:active {
    background-color: rgba(255, 255, 255, 0.25);
    color: #fff;
}



/* Orders table */
#orders-table-v2 th,
#orders-table-v2 td { vertical-align: middle; }

#orders-table-v2 td:nth-child(3) {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 350px;
}

/* Blokada scrolla body przy otwartym mobile menu */
body.menu-open {
    overflow: hidden;
}

/* Globalny overlay ladowania */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}
.loading-spinner {
    text-align: center;
}
