﻿/* ============================================
   MODERN RESET & BASE STYLES
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #e9eef3 100%);
    color: #1a2a3a;
    line-height: 1.5;
    min-height: 100vh;
}

/* ============================================
   TOPBAR / NAVIGACIJA
   ============================================ */
.topbar {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.topbar-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0.75rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.25rem;
    color: #2563eb;
    transition: opacity 0.2s;
}

    .brand:hover {
        opacity: 0.8;
    }

.brand-icon {
    font-size: 1.5rem;
}

.brand-text {
    background: linear-gradient(135deg, #2563eb, #1e40af);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Desktop navigacija */
.nav-menu {
    display: flex;
    align-items: center;
}

.nav-links {
    display: flex;
    gap: 0.25rem;
    flex-wrap: wrap;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 0.75rem;
    text-decoration: none;
    color: #4a5a6a;
    font-weight: 500;
    transition: all 0.2s;
}

    .nav-link:hover {
        background: #f0f4f9;
        color: #2563eb;
    }

    .nav-link .nav-icon {
        font-size: 1.1rem;
    }

.nav-divider {
    width: 1px;
    height: 30px;
    background: #e2e8f0;
    margin: 0 0.5rem;
}

.nav-user-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    color: #2563eb;
    font-weight: 600;
    background: #eff6ff;
    border-radius: 0.75rem;
}

.logout-link {
    color: #dc2626;
}

    .logout-link:hover {
        background: #fef2f2;
        color: #dc2626;
    }

/* Mobilni meni dugme */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 28px;
    height: 20px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
}

    .mobile-menu-toggle span {
        width: 100%;
        height: 2px;
        background: #2c3e50;
        border-radius: 2px;
        transition: all 0.3s;
    }

.mobile-menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 1001;
}

    .mobile-menu-overlay.open {
        display: block;
    }

.nav-header {
    display: none;
}

/* ============================================
   RESPONSIVE - MOBILNI IZGLED
   ============================================ */
@media (max-width: 768px) {
    .topbar-container {
        padding: 0.75rem 1rem;
    }

    .mobile-menu-toggle {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 85%;
        max-width: 320px;
        height: 100vh;
        background: white;
        box-shadow: -5px 0 30px rgba(0, 0, 0, 0.1);
        transition: right 0.3s ease;
        z-index: 1002;
        overflow-y: auto;
    }

        .nav-menu.open {
            right: 0;
        }

    .nav-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 1.25rem 1.25rem 0.75rem;
        border-bottom: 1px solid #eef2f6;
        font-weight: 600;
        font-size: 1.1rem;
        color: #1a2a3a;
    }

    .nav-close {
        background: none;
        border: none;
        font-size: 1.8rem;
        cursor: pointer;
        color: #94a3b8;
        line-height: 1;
    }

    .nav-links {
        flex-direction: column;
        gap: 0;
        padding: 0.5rem 0;
    }

    .nav-link, .nav-user-info {
        padding: 0.875rem 1.25rem;
        border-radius: 0;
        border-bottom: 1px solid #f0f4f9;
    }

    .nav-divider {
        display: none;
    }

    .nav-user-info {
        background: #f8fafc;
        margin-top: 0.5rem;
    }

    .logout-link {
        color: #dc2626;
        border-top: 1px solid #f0f4f9;
        margin-top: 0.25rem;
    }
}

/* ============================================
   GLAVNI SADRŽAJ - KONTEJNER
   ============================================ */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }
}

/* ============================================
   KARTICE I FORME - MODERNIZOVANE
   ============================================ */
.card, .settings-card {
    background: white;
    border-radius: 1.25rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03), 0 1px 2px rgba(0, 0, 0, 0.05);
    padding: 1.75rem;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: box-shadow 0.2s;
}

    .card:hover, .settings-card:hover {
        box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
    }

@media (max-width: 640px) {
    .card, .settings-card {
        padding: 1.25rem;
        border-radius: 1rem;
    }
}

/* Form elementi */
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.25rem;
}

label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    color: #4a5a6a;
    margin-bottom: 0.4rem;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

input, select, textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1.5px solid #e2e8f0;
    border-radius: 0.75rem;
    font-size: 0.95rem;
    font-family: inherit;
    transition: all 0.2s;
    background: white;
}

    input:focus, select:focus, textarea:focus {
        outline: none;
        border-color: #2563eb;
        box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
    }

button, .button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: white;
    border: none;
    padding: 0.7rem 1.5rem;
    border-radius: 0.75rem;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

    button:hover, .button:hover {
        transform: translateY(-1px);
        box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
        background: linear-gradient(135deg, #1d4ed8, #1e40af);
    }

    .button.small {
        padding: 0.4rem 1rem;
        font-size: 0.8rem;
    }

    .button.secondary {
        background: #f1f5f9;
        color: #1e293b;
    }

        .button.secondary:hover {
            background: #e2e8f0;
            transform: none;
            box-shadow: none;
        }

    .button.warning {
        background: linear-gradient(135deg, #f59e0b, #d97706);
    }

    .button.danger {
        background: linear-gradient(135deg, #ef4444, #dc2626);
    }

/* Alert i OK poruke */
.alert, .ok, .info {
    padding: 1rem 1.25rem;
    border-radius: 0.75rem;
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.alert {
    background: #fef2f2;
    border-left: 4px solid #ef4444;
    color: #991b1b;
}

.ok {
    background: #ecfdf5;
    border-left: 4px solid #10b981;
    color: #065f46;
}

.info {
    background: #eff6ff;
    border-left: 4px solid #2563eb;
    color: #1e40af;
}

/* Tabela */
.table-wrap {
    overflow-x: auto;
    border-radius: 1rem;
    background: white;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

th, td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #f0f4f9;
}

th {
    background: #f8fafc;
    font-weight: 600;
    color: #2c3e50;
}

@media (max-width: 640px) {
    th, td {
        padding: 0.75rem 0.5rem;
        font-size: 0.8rem;
    }
}

/* Summary kartice na Clients strani */
.summary {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin: 1.5rem 0;
}

.summary-card {
    background: white;
    border-radius: 1rem;
    padding: 1rem 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.05);
    min-width: 120px;
    flex: 1;
}

    .summary-card b {
        display: block;
        font-size: 0.75rem;
        text-transform: uppercase;
        color: #6b7c8e;
        margin-bottom: 0.5rem;
    }

    .summary-card span {
        font-size: 1.75rem;
        font-weight: 700;
        color: #1a2a3a;
    }

    .summary-card.clickable {
        cursor: pointer;
        transition: all 0.2s;
    }

        .summary-card.clickable:hover {
            transform: translateY(-2px);
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
        }

/* Grid za lokacije */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.25rem;
}

@media (max-width: 640px) {
    .grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

.client-card {
    background: white;
    border-radius: 1rem;
    padding: 1.25rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    border: 1px solid #eef2f6;
    transition: all 0.2s;
}

    .client-card:hover {
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    }

/* Badge status */
.badge {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border-radius: 2rem;
    font-size: 0.7rem;
    font-weight: 600;
}

    .badge.online {
        background: #10b981;
        color: white;
    }

    .badge.offline {
        background: #94a3b8;
        color: white;
    }

/* Inline forme */
.inline-form {
    display: inline-block;
}

/* Filter za pretragu */
.search-box {
    width: 100%;
    margin-bottom: 1.5rem;
    padding: 0.875rem 1rem;
    border-radius: 3rem;
    background: white;
    border: 1px solid #e2e8f0;
    font-size: 0.95rem;
}

/* Firma header */
.firm-header-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.firm-header {
    background: none;
    border: none;
    font-weight: 600;
    font-size: 1.2rem;
    padding: 0.5rem 0;
    cursor: pointer;
    display: flex;
    align-items: baseline;
    gap: 1rem;
    flex-wrap: wrap;
}

    .firm-header small {
        font-size: 0.8rem;
        font-weight: normal;
        color: #6b7c8e;
    }

.firm-content.collapsed {
    display: none;
}

/* Ostali pomoćni stilovi */
.mono {
    font-family: 'SF Mono', 'Fira Code', monospace;
    font-size: 0.85rem;
}

.small {
    font-size: 0.75rem;
}

.err {
    color: #dc2626;
}

.muted {
    color: #6b7c8e;
    font-size: 0.8rem;
}

.sticker-input.saved {
    background: #ecfdf5;
    border-color: #10b981;
}

.sticker-input.save-error {
    background: #fef2f2;
    border-color: #ef4444;
}

/* Animacije */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card, .client-card, .summary-card {
    animation: fadeIn 0.3s ease-out;
}
    /* ============================================
   DODATNI STILOVI ZA Clients.cshtml
   ============================================ */

    /* Summary kartice - dodajemo warning klasu */
    .summary-card.warning b {
        color: #d97706;
    }

    .summary-card.warning span {
        color: #d97706;
    }

    /* Aktivni filter na summary karticama */
    .summary-card.active-filter {
        border: 2px solid #2563eb;
        background: #eff6ff;
        transform: scale(1.02);
    }

    /* Online/offline boje za summary kartice */
    .summary-card.online span {
        color: #10b981;
    }

    .summary-card.offline span {
        color: #94a3b8;
    }

/* Duplicates panel - za prikaz duplikata i neaktivnih mašina */
.duplicates-panel {
    background: white;
    border-radius: 1rem;
    padding: 1.25rem;
    margin: 1.5rem 0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    border: 1px solid #eef2f6;
    transition: all 0.3s ease;
}

    .duplicates-panel h3 {
        font-size: 1.1rem;
        margin-bottom: 1rem;
        color: #1a2a3a;
        display: flex;
        align-items: center;
        gap: 0.5rem;
    }

        .duplicates-panel h3::before {
            content: "⚠️";
            font-size: 1.1rem;
        }

    .duplicates-panel.collapsed {
        display: none;
    }

/* Tabela za duplikate */
.dup-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

    .dup-table th,
    .dup-table td {
        padding: 0.75rem;
        text-align: left;
        border-bottom: 1px solid #f0f4f9;
    }

    .dup-table th {
        background: #f8fafc;
        font-weight: 600;
        color: #2c3e50;
    }

    .dup-table tr:hover {
        background: #f8fafc;
    }

/* Dugme za skeniranje - poravnanje */
form:has(> button[type="submit"]) {
    margin: 0 0 1rem 0;
}

form button[type="submit"] {
    margin-bottom: 0;
}

/* Firma wrap i blokovi */
.firms-wrap {
    margin-top: 1rem;
}

.firm-block {
    margin-bottom: 1.5rem;
    background: white;
    border-radius: 1rem;
    overflow: hidden;
    border: 1px solid #eef2f6;
}

.firm-header-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    background: #f8fafc;
    border-bottom: 1px solid #eef2f6;
}

.firm-header {
    background: none;
    border: none;
    font-weight: 600;
    font-size: 1rem;
    padding: 0;
    cursor: pointer;
    display: flex;
    align-items: baseline;
    gap: 0.75rem;
    flex-wrap: wrap;
    flex: 1;
    text-align: left;
}

    .firm-header span {
        font-size: 1rem;
        color: #1a2a3a;
    }

    .firm-header small {
        font-size: 0.75rem;
        font-weight: normal;
        color: #6b7c8e;
    }

.firm-content {
    padding: 1.25rem;
    transition: all 0.3s ease;
}

    .firm-content.collapsed {
        display: none;
    }

/* Grid za klijente */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.25rem;
}

/* Client kartica - popravljamo izgled */
.client-card {
    background: white;
    border-radius: 0.875rem;
    padding: 1rem;
    margin: 0;
    border: 1px solid #eef2f6;
    transition: all 0.2s;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

    .client-card:hover {
        transform: translateY(-2px);
        box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
    }

    .client-card h2 {
        font-size: 1.1rem;
        margin: 0 0 0.75rem 0;
        color: #1a2a3a;
        padding-bottom: 0.5rem;
        border-bottom: 2px solid #eef2f6;
    }

    .client-card p {
        margin: 0.5rem 0;
        font-size: 0.85rem;
        line-height: 1.4;
    }

        .client-card p b {
            color: #4a5a6a;
            font-weight: 600;
        }

/* Firma forma unutar kartice */
.firma-form {
    display: flex;
    gap: 0.5rem;
    margin: 0.75rem 0;
    align-items: center;
    flex-wrap: wrap;
}

    .firma-form input {
        flex: 1;
        min-width: 120px;
        padding: 0.5rem 0.75rem;
        font-size: 0.8rem;
        border-radius: 0.5rem;
    }

    .firma-form button {
        padding: 0.4rem 0.75rem;
        font-size: 0.75rem;
        white-space: nowrap;
    }

/* Machine summary na Clients strani */
.machine-summary {
    background: #f8fafc;
    padding: 0.75rem 1rem;
    border-radius: 0.75rem;
    margin-bottom: 1rem;
    font-size: 0.85rem;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

/* Search box - već postoji, ali dodajemo marginu */
.search-box {
    width: 100%;
    margin: 1rem 0;
    padding: 0.875rem 1rem;
    border-radius: 2rem;
    background: white;
    border: 1px solid #e2e8f0;
    font-size: 0.9rem;
}

    .search-box:focus {
        border-color: #2563eb;
        box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
    }

/* Responsive za mobile - dodatna podešavanja */
@media (max-width: 768px) {
    .firm-header-row {
        flex-direction: column;
        align-items: stretch;
    }

    .firm-header {
        justify-content: space-between;
    }

        .firm-header small {
            font-size: 0.7rem;
        }

    .inline-form {
        width: 100%;
    }

        .inline-form button {
            width: 100%;
        }

    .firm-content {
        padding: 0.75rem;
    }

    .client-card {
        padding: 0.875rem;
    }

    .summary-card span {
        font-size: 1.25rem;
    }

    .summary-card {
        min-width: calc(50% - 0.5rem);
        flex: 0 1 auto;
        padding: 0.75rem 1rem;
    }

    .summary {
        gap: 0.75rem;
    }

    .dup-table th,
    .dup-table td {
        padding: 0.5rem;
        font-size: 0.75rem;
    }
}

@media (max-width: 480px) {
    .summary-card span {
        font-size: 1rem;
    }

    .summary-card b {
        font-size: 0.65rem;
    }

    .client-card h2 {
        font-size: 0.95rem;
    }

    .client-card p {
        font-size: 0.75rem;
    }

    .firma-form {
        flex-direction: column;
    }

        .firma-form input,
        .firma-form button {
            width: 100%;
        }
}

/* Animacija za collapse/expand */
.duplicates-panel,
.firm-content {
    transition: all 0.25s ease;
}

/* Stil za inline forme unutar tabela */
.inline-form {
    display: inline-flex;
    gap: 0.25rem;
    align-items: center;
}

/* Scrollable table za mobilne */
.dup-table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
}

@media (max-width: 640px) {
    .dup-table {
        font-size: 0.7rem;
    }

        .dup-table td,
        .dup-table th {
            white-space: nowrap;
        }
}

/* Popravka za row klasu */
.row {
    width: 100%;
}

/* Info poruke */
.info {
    background: #eff6ff;
    border-left: 4px solid #2563eb;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
    font-size: 0.85rem;
    color: #1e40af;
}

/* Scrollbar - opcionalno */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

    ::-webkit-scrollbar-thumb:hover {
        background: #94a3b8;
    }
/* Popravka za SVG ikonice */
.nav-icon,
.brand-icon {
    flex-shrink: 0;
    display: inline-block;
}

.nav-link svg,
.brand svg {
    transition: transform 0.2s;
}

.nav-link:hover svg {
    transform: scale(1.05);
}

.brand svg {
    margin-right: 2px;
}

/* Za mobile - ista veličina */
@media (max-width: 768px) {
    .nav-icon {
        width: 22px;
        height: 22px;
    }
}

/* Profinjeniji emoji stil (ako koristite emoji opciju) */
.nav-icon {
    font-size: 1.2rem;
    display: inline-block;
    width: 24px;
    text-align: center;
}
.access-user-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.access-section-title {
    margin-top: 1.5rem;
}

.access-firm-grid,
.access-location-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: .75rem;
}

.access-location-group {
    background: #f8fafc;
    border: 1px solid #eef2f6;
    border-radius: 1rem;
    padding: 1rem;
    margin-bottom: 1rem;
}

    .access-location-group h4 {
        margin-bottom: .75rem;
        color: #1a2a3a;
    }

.access-check-card {
    display: flex;
    align-items: center;
    gap: .75rem;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: .9rem;
    padding: .8rem .9rem;
    cursor: pointer;
    text-transform: none;
    letter-spacing: 0;
    margin: 0;
}

    .access-check-card input {
        width: 20px;
        height: 20px;
        flex: 0 0 auto;
    }

    .access-check-card span {
        display: flex;
        flex-direction: column;
        gap: .15rem;
        min-width: 0;
    }

    .access-check-card b {
        font-size: .9rem;
        color: #1a2a3a;
    }

    .access-check-card small {
        font-size: .75rem;
        color: #64748b;
    }

    .access-check-card:has(input:checked) {
        border-color: #2563eb;
        background: #eff6ff;
    }

.firm-access:has(input:checked) {
    border-color: #d97706;
    background: #fffbeb;
}

@media (max-width: 640px) {
    .access-user-head {
        flex-direction: column;
        align-items: stretch;
    }

    .access-firm-grid,
    .access-location-grid {
        grid-template-columns: 1fr;
    }
}
.jackpot-card {
    display: flex;
    flex-direction: column;
    gap: .75rem;
}

.jackpot-values {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
}

.jackpot-pill {
    background: #eff6ff;
    color: #1e40af;
    border: 1px solid #bfdbfe;
    border-radius: 999px;
    padding: .45rem .75rem;
    font-size: .9rem;
}

.jackpot-details.collapsed {
    display: none;
}

.machine-playing-now {
    background: #ecfdf5;
}

.page-back-wrap {
    margin: 10px 0 20px 0;
}

    .page-back-wrap .button {
        min-width: 120px;
    }

.jackpot-filter-card {
    margin-bottom: 20px;
}

.jackpot-filter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.filter-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.firm-filter-group {
    border-top: 1px solid #ddd;
    padding-top: 12px;
    margin-top: 12px;
}

.firm-filter-title {
    display: block;
    margin-bottom: 8px;
}

.firm-filter-locations {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 18px;
    margin-left: 22px;
}

.location-filter-item {
    min-width: 180px;
}
.jackpot-wall-body {
    --wall-card-min: 330px;
    --wall-card-height: 420px;
    --wall-grid-gap: 14px;
    --wall-body-padding: 16px;
    --wall-card-padding: 20px;
    --wall-inner-gap: 9px;
    --wall-pill-gap: 8px;
    --wall-pill-padding-y: 8px;
    --wall-pill-padding-x: 11px;
    --wall-summary-padding: 9px;
    --wall-font-size: 1rem;
    background: #0f172a;
    color: white;
    padding: var(--wall-body-padding);
    min-height: 100vh;
}

.jackpot-wall-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.wall-header-tools,
.wall-zoom-control {
    display: flex;
    align-items: center;
    gap: 12px;
}

.wall-header-tools {
    flex-wrap: wrap;
    justify-content: flex-end;
}

.wall-zoom-control {
    padding: 7px 12px;
    border: 1px solid #334155;
    border-radius: 10px;
    background: #111827;
    font-weight: 700;
}

.wall-zoom-control input {
    width: 150px;
}

.wall-zoom-control output {
    min-width: 44px;
    color: #93c5fd;
}

.jackpot-wall-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(var(--wall-card-min), 1fr));
    grid-auto-rows: var(--wall-card-height);
    gap: var(--wall-grid-gap);
    font-size: var(--wall-font-size);
}

.wall-card {
    background: #111827;
    color: white;
    border: 1px solid #334155;
    height: 100%;
    min-width: 0;
    overflow: hidden;
    padding: var(--wall-card-padding);
    gap: var(--wall-inner-gap);
    box-sizing: border-box;
}

    .wall-card h2 {
        font-size: 1.45em;
        margin: 0;
    }

    .wall-card > p {
        margin: 0;
        font-size: .95em;
    }

.wall-card .jackpot-values {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--wall-pill-gap);
}

.wall-pill {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    border-radius: 10px;
    padding: var(--wall-pill-padding-y) var(--wall-pill-padding-x);
    color: #eff6ff;
    background: linear-gradient(135deg, #1d4ed8, #2563eb);
    border: 1px solid #60a5fa;
    box-shadow: 0 5px 14px rgba(37, 99, 235, .24);
}

.wall-pill small {
    color: #bfdbfe;
    font-size: .72em;
    font-weight: 800;
    letter-spacing: .08em;
}

.wall-pill strong {
    font-size: 1.45em;
    line-height: 1.1;
    color: #fff;
    font-variant-numeric: tabular-nums;
}

.wall-card .machine-summary {
    margin: auto 0 0;
    padding: var(--wall-summary-padding);
    gap: var(--wall-inner-gap);
    background: #1e293b;
    color: #e2e8f0;
    font-size: .8em;
}

.wall-card .inactive {
    color: #fca5a5;
}

.wall-alerts {
    display: flex;
    flex-direction: column;
    gap: 5px;
    min-height: 0;
}

.wall-alert {
    padding: 7px 9px;
    border-radius: 8px;
    font-size: .78em;
    line-height: 1.25;
}

.wall-alert-critical,
.wall-alert-error {
    color: #fff;
    background: #991b1b;
    border: 1px solid #f87171;
}

.wall-alert-offline {
    color: #fff7ed;
    background: #9a3412;
    border: 1px solid #fb923c;
}

.wall-has-alarm {
    border-color: #ef4444;
    box-shadow: 0 0 0 2px rgba(239, 68, 68, .3);
}

.wall-playing {
    outline: 3px solid #22c55e;
}
.jackpot-filter-body.collapsed {
    display: none;
}
.tabs {
    display: flex;
    gap: 8px;
    margin: 12px 0 18px 0;
    flex-wrap: wrap;
}

.tab-btn.active {
    font-weight: bold;
    border-bottom: 3px solid #2563eb;
}

.hidden {
    display: none;
}

.cell-input {
    width: 120px;
}

    .cell-input.ok {
        background: #dcfce7;
    }

    .cell-input.err {
        background: #fee2e2;
    }
.table-scroll {
    overflow: auto;
    max-height: 70vh;
    border: 1px solid #ddd;
    border-radius: 8px;
}

.restore-table {
    border-collapse: collapse;
    width: max-content;
    min-width: 100%;
}

    .restore-table th {
        position: sticky;
        top: 0;
        background: #f8fafc;
        z-index: 2;
    }

    .restore-table th,
    .restore-table td {
        border: 1px solid #ddd;
        padding: 4px 6px;
        white-space: nowrap;
    }

    .restore-table input {
        width: 90px;
        padding: 3px 5px;
        font-size: 13px;
    }

        .restore-table input[type="checkbox"] {
            width: auto;
        }

    .restore-table .wide {
        width: 160px;
    }
/* Table toolbar */
.table-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 16px;
    padding: 8px;
    background: #f5f5f5;
    border-radius: 8px;
}

.mode-toggle {
    display: flex;
    gap: 4px;
    background: #e0e0e0;
    padding: 2px;
    border-radius: 8px;
}

.mode-btn {
    padding: 6px 16px;
    border: none;
    background: transparent;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
}

    .mode-btn.active {
        background: #007bff;
        color: white;
    }

.pagination {
    display: flex;
    gap: 8px;
    align-items: center;
}

    .pagination button {
        padding: 6px 12px;
        border: 1px solid #ccc;
        background: white;
        border-radius: 6px;
        cursor: pointer;
    }

        .pagination button:disabled {
            opacity: 0.5;
            cursor: not-allowed;
        }

.pagination-bottom {
    margin-top: 16px;
    display: flex;
    justify-content: center;
}

.table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .table-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .mode-toggle {
        justify-content: center;
    }

    .pagination {
        justify-content: center;
    }
}
.device-status-table {
    width: 100%;
    border-collapse: collapse;
}

.device-status-table th,
.device-status-table td {
    padding: 8px 10px;
    border-bottom: 1px solid #e5e7eb;
    text-align: left;
    vertical-align: top;
}

.device-status-table th {
    background: #f8fafc;
    color: #334155;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0;
}

.device-status-table .device-row-bad td {
    background: #fff1f2;
}

.device-status-table .device-row-bad td:nth-child(4) {
    color: #991b1b;
    font-weight: 700;
}

.device-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 12px;
}

.device-card {
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background: #ffffff;
    padding: 12px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
}

.device-card.online {
    border-left: 4px solid #22c55e;
}

.device-card.offline {
    border-left: 4px solid #ef4444;
}

.device-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
}

.device-card-head strong {
    font-size: 16px;
}

.device-card-head span {
    border-radius: 999px;
    padding: 4px 10px;
    background: #e5e7eb;
    color: #111827;
    font-size: 12px;
    font-weight: 700;
}

.device-card.online .device-card-head span {
    background: #dcfce7;
    color: #166534;
}

.device-card.offline .device-card-head span {
    background: #fee2e2;
    color: #991b1b;
}

.device-card-error {
    margin-bottom: 10px;
    border-radius: 6px;
    background: #fef2f2;
    color: #991b1b;
    padding: 8px 10px;
    font-weight: 700;
    line-height: 1.35;
}

.device-card-rows {
    display: grid;
    gap: 6px;
}

.device-card-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    border-top: 1px solid #f1f5f9;
    padding-top: 6px;
    color: #475569;
}

.device-card-row b {
    color: #111827;
    text-align: right;
}

.device-status-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.device-pill {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 4px 10px;
    border: 1px solid #d1d5db;
    border-radius: 999px;
    background: #f8fafc;
    color: #334155;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.2;
}

.device-pill.online {
    border-color: #86efac;
    background: #dcfce7;
    color: #166534;
}

.device-pill.offline {
    border-color: #fecaca;
    background: #fee2e2;
    color: #991b1b;
}
