* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #2c2c2c 0%, #1a1a1a 50%, #2c2c2c 100%);
    background-size: 200% 200%;
    min-height: 100vh;
    margin: 0;
    padding: 0;
}

.container {
    background: #ffffff;
    border-radius: 20px;
    max-width: 1200px;
    width: calc(100% - 4rem);
    margin: 2rem auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

header {
    background: #000000;
    color: white;
    padding: 1.5rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    position: relative;
    z-index: 100;
}

.logo-container {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.logo {
    height: 75px;
    width: auto;
    object-fit: contain;
    filter: drop-shadow(2px 2px 4px rgba(0, 0, 0, 0.3));
}

.header-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    gap: 0;
    text-align: center;
    justify-content: flex-start;
    padding-top: 0.5rem;
}

.company-name {
    font-family: "Science Gothic", sans-serif;
    font-optical-sizing: auto;
    font-weight: 600;
    font-style: normal;
    font-size: 3rem;
    color: #ffffff;
    white-space: nowrap;
    margin: 0;
    letter-spacing: -0.5px;
    text-shadow: 3px 3px 8px rgba(0, 0, 0, 0.6);
    font-variation-settings:
        "slnt" 0,
        "wdth" 100,
        "CTRS" 0;
    line-height: 1;
}

.company-divider {
    width: 250px;
    height: 1px;
    background: linear-gradient(to right, transparent 0%, #ffffff 15%, #ffffff 85%, transparent 100%);
    margin: 0.25rem auto 0.5rem auto;
}

.company-tagline {
    font-size: 0.7rem;
    color: #ffffff;
    opacity: 0.85;
    white-space: nowrap;
    letter-spacing: 2px;
    font-weight: 300;
    font-style: italic;
    margin-top: 0.25rem;
}

.nav-section {
    background: #000000;
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: center;
    overflow-x: auto;
    position: relative;
    z-index: 0;
}

.nav-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: nowrap;
    min-width: fit-content;
}

.nav-button {
    background: #ffffff;
    border: none;
    color: #052b63;
    padding: clamp(0.6rem, 1vw, 1rem) clamp(1rem, 2vw, 2rem);
    border-radius: 15px;
    cursor: pointer;
    font-size: clamp(0.75rem, 1vw, 1rem);
    font-weight: 500;
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    min-width: clamp(90px, 12vw, 180px);
    flex: 1 1 auto;
    max-width: clamp(90px, 12vw, 200px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    text-decoration: none;
}

.nav-button .emoji {
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    line-height: 1;
}

.nav-button .text {
    color: #052b63;
    font-size: 1rem;
}

.nav-button:hover {
    background: #14a4e3;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(20, 164, 227, 0.3);
}

.nav-button:hover .text {
    color: white;
}

.nav-button.active {
    background: #fa8912;
    color: white;
}

.nav-button.active .text {
    color: white;
}

/* Breadcrumb navigace */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.breadcrumb-item {
    color: #052b63;
    text-decoration: none;
    transition: color 0.2s;
}

.breadcrumb-item:hover {
    color: #14a4e3;
    text-decoration: underline;
}

.breadcrumb-separator {
    color: #999;
    margin: 0 4px;
}

.breadcrumb-current {
    color: #333;
    font-weight: 600;
}


/* Tlačítko Zpět - textové s ikonou */
.btn-back-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: 8px;
    background: #f5f5f5;
    border: 1px solid #ddd;
    color: #052b63;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
}

.btn-back-icon:hover {
    background: #052b63;
    color: white;
    border-color: #052b63;
    transform: translateX(-3px);
    box-shadow: 0 4px 12px rgba(5, 43, 99, 0.2);
}

.btn-back-icon:active {
    transform: translateX(-1px);
}

.user-menu {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
    z-index: 10000;
}

.user-avatar {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.3s;
    padding: 2px;
}

.user-avatar:hover {
    background: #f5f5f5;
    transform: scale(1.05);
}

.user-initials {
    color: #052b63;
    font-weight: 600;
    font-size: 0.9rem;
}

.user-name {
    font-size: 0.9rem;
    color: white;
    font-weight: 500;
    white-space: nowrap;
}

/* Dropdown Menu */
.user-dropdown {
    position: absolute;
    top: calc(100% + 15px);
    right: 0;
    background: white;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
    min-width: 250px;
    display: none;
    overflow: hidden;
    z-index: 10000;
    animation: dropdownSlideIn 0.2s ease;
}

@keyframes dropdownSlideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.user-dropdown.active {
    display: block;
}

.dropdown-header {
    padding: 1.25rem 1.5rem;
}

.dropdown-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: #000;
    margin-bottom: 0.25rem;
}

.dropdown-username {
    font-size: 0.85rem;
    color: #666;
    font-weight: 400;
}

.dropdown-company {
    font-size: 0.9rem;
    color: #052b63;
    font-weight: 500;
    margin-top: 0.5rem;
}

.dropdown-divider {
    height: 1px;
    background: #e0e0e0;
    margin: 0;
}

.dropdown-item {
    width: 100%;
    padding: 1rem 1.5rem;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    color: #000;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: background 0.2s;
    text-align: left;
    text-decoration: none;
}

.dropdown-item:hover {
    background: #f5f5f5;
}

.dropdown-icon {
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
}

.content {
    padding: 2rem;
}

.content h1,
.content h2,
.content h3 {
    color: #052b63;
    margin-bottom: 1rem;
}

.content h1 {
    font-size: 2.5rem;
}

.content p {
    color: #666;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

/* Světle modré karty v modrém containeru mají černý text - už upraveno v admin.php */

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

.stat-card {
    background: white;
    color: #333;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    text-align: center;
    border: 1px solid #e0e0e0;
}

.stat-card-total {
    background: linear-gradient(135deg, #0b448f 0%, #052b63 100%);
    color: #ffffff;
}

.stat-card-total h3,
.stat-card-total p {
    color: #ffffff !important;
}

.stat-card-weekly {
    background: linear-gradient(135deg, #fa8912 0%, #f1461a 100%);
    color: #ffffff;
}

.stat-card-weekly h3,
.stat-card-weekly p {
    color: #ffffff !important;
}

.device-card {
    background: white;
    border: 2px solid #fa8912;
    border-radius: 12px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
    overflow: visible;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    display: flex;
    flex-direction: column;
}

.device-card:hover {
    border-color: #fa8912;
    box-shadow: 0 4px 12px rgba(250, 137, 18, 0.3);
    transform: translateY(-2px);
}

.device-card.active {
    border-color: #fa8912;
}

.device-card.inactive {
    border-color: #f1461a;
    opacity: 0.7;
}

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

.device-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    background: linear-gradient(135deg, #0b448f 0%, #052b63 100%);
    color: white;
}

.device-status {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85em;
    font-weight: 600;
}

.device-status.active {
    background: #14a4e3;
    color: white;
}

.device-status.inactive {
    background: #f1461a;
    color: white;
}

.device-name-container {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.device-name {
    font-size: 1.2em;
    font-weight: 600;
    color: #333;
    margin-bottom: 10px;
}

.device-name-display {
    font-size: 1.2em;
    font-weight: 600;
    color: #333;
    flex: 1;
}

.device-name-input {
    flex: 1;
    padding: 8px 12px;
    border: 2px solid #0b448f;
    border-radius: 5px;
    font-size: 1.1em;
    font-weight: 600;
}

.btn-edit-name {
    padding: 5px 10px;
    background: #0b448f;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9em;
}

.btn-edit-name:hover {
    background: #052b63;
}

.device-details {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

.device-card.expanded .device-details {
    max-height: 500px;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #e0e0e0;
}

.device-settings-button {
    display: none;
}

.device-card.expanded .device-settings-button {
    display: block !important;
}

.device-detail-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    font-size: 0.9em;
}

.device-detail-label {
    color: #666;
    font-weight: 500;
}

.device-detail-value {
    color: #333;
    font-weight: 600;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    border-radius: 15px;
    padding: 20px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(11, 68, 143, 0.4);
    border: 2px solid #14a4e3;
    position: relative;
    margin: 20px;
}

/* Modal pro nastavení zařízení - zobrazit uprostřed */
#deviceSettingsModal .modal-content {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    margin: 0;
    max-width: 500px;
    width: 90%;
    max-height: auto;
}

@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        max-width: 95%;
        padding: 15px;
        margin: 10px;
        max-height: 95vh;
        border-radius: 10px;
    }
    
    .modal-header {
        font-size: 1.2em;
        margin-bottom: 15px;
    }
    
    .modal-body {
        gap: 10px;
    }
    
    .form-group {
        margin-bottom: 12px !important;
    }
    
    .form-group input,
    .form-group select {
        font-size: 16px !important; /* Zabraňuje zoom na iOS */
        padding: 12px !important;
    }
}

.modal-header {
    font-size: 1.5em;
    font-weight: 600;
    margin-bottom: 20px;
    color: #0b448f;
}

.modal-body {
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

@media (max-width: 768px) {
    .modal-body {
        margin-bottom: 15px;
        gap: 10px;
    }
}

.version-info {
    background: linear-gradient(135deg, #f5f5f5 0%, #e8e8e8 100%);
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 15px;
    border: 1px solid #14a4e3;
}

.version-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #e0e0e0;
}

.version-row:last-child {
    border-bottom: none;
}

.version-label {
    color: #666;
    font-weight: 500;
}

.version-value {
    color: #333;
    font-weight: 600;
}

.version-value.new {
    color: #14a4e3;
}

.version-value.old {
    color: #f1461a;
}

.modal-footer {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.modal-select-row {
    display: flex;
    gap: 12px;
}

.modal-select-row select {
    flex: 1;
    padding: 10px;
    border-radius: 8px;
    border: 2px solid #0b448f;
    background-color: #ffffff;
    font-size: 1em;
    font-weight: 600;
    color: #052b63;
    appearance: none;
    transition: all 0.3s;
}

.modal-select-row select:hover {
    border-color: #14a4e3;
    box-shadow: 0 2px 8px rgba(20, 164, 227, 0.2);
}

.modal-select-row select:focus {
    border-color: #14a4e3;
    outline: none;
    box-shadow: 0 0 0 3px rgba(20, 164, 227, 0.2);
}

.btn-filter {
    background: linear-gradient(135deg, #fa8912 0%, #f1461a 100%);
}

.modal-close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #f1461a;
    color: white;
    border: none;
    cursor: pointer;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    line-height: 1;
    transition: all 0.2s ease;
}

@media (max-width: 768px) {
    .modal-close {
        width: 40px;
        height: 40px;
        font-size: 24px;
        top: 8px;
        right: 8px;
    }
}

.modal-close:hover {
    background: #d63a0f;
    transform: scale(1.1);
}

.modal-action {
    margin-top: 20px;
    display: flex;
    justify-content: flex-end;
}

@media (max-width: 768px) {
    .modal-action {
        margin-top: 15px;
    }
    
    .modal-action .btn {
        width: 100%;
        padding: 12px;
        font-size: 1em;
    }
}

.modal-action-text {
    font-size: 0.95em;
    color: #052b63;
    background: #e3f2fd;
    padding: 10px;
    border-radius: 6px;
    margin-left: 10px;
    flex: 1;
    align-self: center;
    border-left: 4px solid #14a4e3;
}

.modal-action-text.error {
    background: #ffe0e0;
    color: #f1461a;
    border-left: 4px solid #f1461a;
}

.modal-action-text.success {
    background: #e0f7fa;
    color: #0b448f;
    border-left: 4px solid #14a4e3;
}

.btn-update {
    background: #14a4e3;
    color: white;
}

.btn-update:hover {
    background: #0769bc;
}

.btn-success {
    background: #14a4e3;
    color: white;
}

.btn-success:hover {
    background: #0769bc;
}

.btn-warning {
    background: #fa8912;
    color: white;
}

.btn-warning:hover {
    background: #f1461a;
}

.btn-cancel {
    background: #95a5a6;
    color: white;
}

.btn-cancel:hover {
    background: #7f8c8d;
}

.stat-card h3 {
    font-size: 2.5em;
    margin-bottom: 10px;
    color: #333;
}

.stat-card-total h3,
.stat-card-weekly h3 {
    color: #ffffff !important;
    font-weight: 600;
}

.stat-card p {
    font-size: 1.1em;
    opacity: 1;
    color: #666;
}

.stat-card-total p,
.stat-card-weekly p {
    color: #ffffff !important;
    opacity: 0.95;
    font-weight: 400;
}

.table-container {
    margin-top: 2rem;
    margin-left: 2rem;
    margin-right: 2rem;
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid #e0e0e0;
}

thead {
    background: #f8f9fa;
}

th {
    padding: 1.25rem 1rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.9rem;
    color: #052b63;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid #fa8912;
}

td {
    padding: 1.25rem 1rem;
    border-bottom: 1px solid #f0f0f0;
    color: #333;
    background: white;
}

tbody tr {
    transition: all 0.2s ease;
}

tbody tr:hover {
    background: rgba(250, 137, 18, 0.15);
    transform: scale(1.01);
    box-shadow: 0 2px 8px rgba(250, 137, 18, 0.4);
}

tbody tr:last-child td {
    border-bottom: none;
}

.btn {
    padding: 12px 30px;
    background: linear-gradient(135deg, #0b448f 0%, #052b63 100%);
    color: white;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-size: 1em;
    margin: 5px;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
    box-shadow: 0 3px 8px rgba(11, 68, 143, 0.3), 0 1px 3px rgba(0,0,0,0.2);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(11, 68, 143, 0.4);
}

.btn-danger {
    background: linear-gradient(135deg, #fa8912 0%, #f1461a 100%);
    box-shadow: 0 3px 8px rgba(250, 137, 18, 0.3), 0 1px 3px rgba(0,0,0,0.2);
}

.btn-danger:hover {
    box-shadow: 0 5px 15px rgba(250, 137, 18, 0.4);
}

.loading {
    text-align: center;
    padding: 40px;
    font-size: 1.2em;
    color: #666;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #333;
}

.form-group input, .form-group select {
    width: 100%;
    padding: 12px;
    border: 2px solid #0b448f;
    border-radius: 5px;
    font-size: 1em;
    transition: all 0.3s;
}

.form-group input:focus, .form-group select:focus {
    border-color: #14a4e3;
    outline: none;
    box-shadow: 0 0 0 3px rgba(20, 164, 227, 0.2);
}

.data-table-container {
    border: none;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(11, 68, 143, 0.2), 0 2px 4px rgba(0,0,0,0.1);
}

.refresh-btn {
    float: right;
    margin-bottom: 10px;
}

.filter-row {
    margin: 15px 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.search-wrapper {
    width: 100%;
}

.search-wrapper input {
    width: 100%;
    border-radius: 5px;
    border: 2px solid #0b448f;
    padding: 10px;
    transition: all 0.3s;
}

.search-wrapper input:focus {
    border-color: #14a4e3;
    outline: none;
    box-shadow: 0 0 0 3px rgba(20, 164, 227, 0.2);
}

.actions-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.download-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

/* Mobilní zařízení */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }
    
    .container {
        width: calc(100% - 2rem);
        margin: 1rem auto;
        border-radius: 15px;
    }
    
    header {
        padding: 1.5rem 1rem;
        flex-wrap: wrap;
    }
    
    .logo {
        height: 50px;
    }

    .company-name {
        font-size: 2rem;
    }

    .company-divider {
        width: 180px;
    }

    .company-tagline {
        font-size: 0.6rem;
    }

    .user-avatar {
        width: 32px;
        height: 32px;
    }

    .user-name {
        font-size: 0.75rem;
    }

    .nav-section {
        padding: 1.5rem 1rem;
    }

    .nav-button {
        min-width: 90px;
        max-width: 90px;
        padding: 0.75rem 0.5rem;
        font-size: 0.8rem;
    }

    .nav-button .emoji {
        font-size: 1.8rem;
    }

    .nav-buttons {
        gap: 0.5rem;
    }
    
    .content {
        padding: 1.5rem 1rem;
    }
    
    .stats {
        grid-template-columns: repeat(2, minmax(120px, 1fr));
        gap: 10px;
        margin-bottom: 15px;
    }

    .stat-card {
        padding: 12px;
    }

    .nav-label {
        display: none;
    }
    
    .stat-card h3 {
        font-size: 1.6em;
    }
    
    .stat-card p {
        font-size: 0.85em;
    }
    
    .data-table-container {
        overflow: visible;
        margin: 0 -10px;
        border-left: none;
        border-right: none;
        border-radius: 0;
        width: calc(100% + 20px);
        padding: 0 !important;
        box-sizing: border-box !important;
        -webkit-appearance: none !important;
        appearance: none !important;
    }
    
    .data-table-container table {
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        box-sizing: border-box !important;
        -webkit-appearance: none !important;
        appearance: none !important;
    }
    
    /* Reset všech tabulek */
    table {
        width: 100% !important;
        margin: 0 !important;
        table-layout: fixed !important;
        border-collapse: collapse !important;
        font-size: 0.4em !important;
    }
    
    /* Hlavičky */
    th {
        padding: 3px 1px !important;
        font-size: 0.45em !important;
        font-weight: 600 !important;
        text-align: left !important;
        overflow: visible !important;
        white-space: normal !important;
        word-wrap: break-word !important;
        line-height: 1.0 !important;
        background: #0b448f !important;
        color: white !important;
    }
    
    /* Buňky */
    td {
        padding: 3px 1px !important;
        font-size: 0.4em !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        white-space: nowrap !important;
    }
    
    th:first-child, td:first-child {
        padding-left: 6px !important;
    }
    
    th:last-child, td:last-child {
        padding-right: 6px !important;
    }
    
    /* Tabulka logů - velmi úzké sloupce */
    #table-logs th:nth-child(1), #table-logs td:nth-child(1) {
        width: 20% !important;
        max-width: 20% !important;
        white-space: normal !important;
        word-wrap: break-word !important;
        font-size: 0.38em !important;
    }
    
    #table-logs th:nth-child(2), #table-logs td:nth-child(2) {
        width: 10% !important;
        max-width: 10% !important;
    }
    
    #table-logs th:nth-child(3), #table-logs td:nth-child(3) {
        width: 15% !important;
        max-width: 15% !important;
    }
    
    #table-logs th:nth-child(4), #table-logs td:nth-child(4) {
        width: 10% !important;
        max-width: 10% !important;
    }
    
    #table-logs th:nth-child(5), #table-logs td:nth-child(5) {
        width: 15% !important;
        max-width: 15% !important;
    }
    
    /* Skrýt Akce */
    #table-logs th.action-column,
    #table-logs td.action-column,
    #table-logs th:nth-child(6),
    #table-logs td:nth-child(6) {
        display: none !important;
        width: 0 !important;
        max-width: 0 !important;
    }
    
    /* Tabulka uživatelů */
    #table-users th:nth-child(1), #table-users td:nth-child(1) {
        width: 35% !important;
        max-width: 35% !important;
    }
    
    #table-users th:nth-child(2), #table-users td:nth-child(2) {
        width: 65% !important;
        max-width: 65% !important;
    }
    
    #table-users th:nth-child(3), #table-users td:nth-child(3) {
        display: none !important;
        width: 0 !important;
    }
    
    /* Tabulka aut */
    #table-cars th:nth-child(1), #table-cars td:nth-child(1) {
        width: 20% !important;
        max-width: 20% !important;
    }
    
    #table-cars th:nth-child(2), #table-cars td:nth-child(2) {
        width: 80% !important;
        max-width: 80% !important;
    }
    
    #table-cars th:nth-child(3), #table-cars td:nth-child(3) {
        display: none !important;
        width: 0 !important;
    }
    
    .btn {
        padding: 8px 10px !important;
        font-size: 0.75em !important;
        margin: 3px 0 !important;
    }
    
    .refresh-btn {
        float: none;
        margin-bottom: 10px;
    }
    
    /* Filtrace na mobilu */
    .filter-section {
        padding: 15px 10px !important;
        margin: 0 -10px !important;
        width: calc(100% + 20px) !important;
        box-sizing: border-box !important;
        -webkit-appearance: none !important;
        appearance: none !important;
        -webkit-backdrop-filter: none !important;
        backdrop-filter: none !important;
    }
    
    .filter-section label {
        display: block;
        margin-bottom: 8px;
        font-weight: 600;
        -webkit-appearance: none !important;
        appearance: none !important;
    }
    
    .filter-section select {
        width: 100% !important;
        margin: 5px 0 !important;
        padding: 10px !important;
        box-sizing: border-box !important;
        -webkit-appearance: none !important;
        appearance: none !important;
        -webkit-tap-highlight-color: transparent !important;
        border: 1px solid #ddd;
        border-radius: 4px;
        background-color: white;
    }
    
    .filter-section > div {
        width: 100% !important;
        margin: 5px 0 !important;
        padding: 0 !important;
        box-sizing: border-box !important;
        -webkit-appearance: none !important;
        appearance: none !important;
    }
    
    .filter-section input[type="date"] {
        width: 100% !important;
        padding: 10px !important;
        margin: 0 !important;
        box-sizing: border-box !important;
        border: 1px solid #ddd !important;
        border-radius: 4px !important;
        -webkit-appearance: none !important;
        appearance: none !important;
        -webkit-tap-highlight-color: transparent !important;
        background-color: white !important;
        font-size: 16px !important; /* Zabránit zoomu na iOS */
    }
    
    .filter-section input[type="date"]::-webkit-calendar-picker-indicator {
        -webkit-appearance: none !important;
        appearance: none !important;
    }
    
    .filter-buttons {
        display: flex !important;
        gap: 5px !important;
        margin-top: 10px !important;
        width: 100% !important;
        -webkit-appearance: none !important;
        appearance: none !important;
    }
    
    .filter-buttons button {
        flex: 1 !important;
        min-width: 48% !important;
        max-width: 48% !important;
        margin: 0 !important;
        padding: 8px 10px !important;
        font-size: 0.85em !important;
        box-sizing: border-box !important;
        -webkit-appearance: none !important;
        appearance: none !important;
        -webkit-tap-highlight-color: transparent !important;
        border: none !important;
    }
    
    .action-buttons {
        display: flex !important;
        flex-wrap: wrap !important;
        gap: 5px !important;
        justify-content: space-between !important;
        margin: 15px 0 !important;
        -webkit-appearance: none !important;
        appearance: none !important;
    }
    
    .action-buttons .btn {
        flex: 1 !important;
        min-width: 48% !important;
        max-width: 48% !important;
        margin: 0 !important;
        box-sizing: border-box !important;
        -webkit-appearance: none !important;
        appearance: none !important;
        -webkit-tap-highlight-color: transparent !important;
    }
    
    .refresh-btn {
        display: none !important;
    }
    
    
    .form-group {
        margin-bottom: 15px;
    }
    
    .form-group input, .form-group select {
        padding: 10px;
    }
}

/* Malé mobilní zařízení */
@media (max-width: 480px) {
    .header h1 {
        font-size: 1.5em;
    }
    
    .stat-card h3 {
        font-size: 1.8em;
    }
    
    /* Tabulky už mají styly z @media (max-width: 768px) */
    /* Žádné další změny pro tabulky */
    
    .btn {
        padding: 10px 12px;
        font-size: 0.85em;
    }
}

/* ============================================
   SPOLEČNÉ STYLY PRO LOGIN, REGISTER, TERMS
   ============================================ */

/* Auth stránky - společné styly */
.auth-page-body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #2c2c2c 0%, #1a1a1a 50%, #2c2c2c 100%);
    background-size: 200% 200%;
    min-height: 100vh;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
}

.auth-container {
    background: #ffffff;
    border-radius: 20px;
    max-width: 500px;
    width: calc(100% - 4rem);
    margin: 2rem auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

.auth-header {
    background: #000000;
    color: white;
    padding: 2rem;
    text-align: center;
}

.auth-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}

.auth-logo img {
    height: 75px;
    width: auto;
    object-fit: contain;
    filter: drop-shadow(2px 2px 4px rgba(0, 0, 0, 0.3));
}

.auth-company-name {
    font-family: "Science Gothic", sans-serif;
    font-optical-sizing: auto;
    font-weight: 600;
    font-style: normal;
    font-size: 2.5rem;
    color: #ffffff;
    white-space: nowrap;
    margin: 0.5rem 0;
    letter-spacing: -0.5px;
    text-shadow: 3px 3px 8px rgba(0, 0, 0, 0.6);
    line-height: 1;
}

.auth-company-divider {
    width: 200px;
    height: 1px;
    background: linear-gradient(to right, transparent 0%, #ffffff 15%, #ffffff 85%, transparent 100%);
    margin: 0.5rem auto;
}

.auth-company-tagline {
    font-size: 0.7rem;
    color: #ffffff;
    opacity: 0.85;
    white-space: nowrap;
    letter-spacing: 2px;
    font-weight: 300;
    font-style: italic;
    margin-top: 0.5rem;
}

.auth-content {
    padding: 2rem;
}

.auth-content h2 {
    text-align: center;
    margin-bottom: 2rem;
    color: #052b63;
    font-size: 1.5rem;
    font-weight: 600;
}

.auth-form-group {
    margin-bottom: 1.5rem;
}

.auth-form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #333;
}

.auth-form-group input {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1em;
    box-sizing: border-box;
    transition: border-color 0.3s;
}

.auth-form-group input:focus {
    outline: none;
    border-color: #0b448f;
}

.auth-form-group small {
    color: #666;
    font-size: 0.85em;
    display: block;
    margin-top: 0.25rem;
}

.auth-btn {
    width: 100%;
    padding: 12px 30px;
    background: linear-gradient(135deg, #0b448f 0%, #052b63 100%);
    color: white;
    border: none;
    border-radius: 25px;
    font-size: 1.1em;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 3px 8px rgba(11, 68, 143, 0.3);
}

.auth-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(11, 68, 143, 0.4);
}

.auth-error {
    background: #ffe0e0;
    color: #f1461a;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    border-left: 4px solid #f1461a;
}

.auth-success {
    background: #e0f7fa;
    color: #0b448f;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    border-left: 4px solid #14a4e3;
}

.auth-link {
    text-align: center;
    margin-top: 20px;
    color: #666;
}

.auth-link a {
    color: #0b448f;
    text-decoration: none;
    font-weight: 500;
}

.auth-link a:hover {
    text-decoration: underline;
}

.auth-forgot-password {
    text-align: right;
    margin-top: 0.5rem;
}

.auth-forgot-password a {
    color: #0b448f;
    text-decoration: none;
    font-size: 0.9em;
    font-weight: 500;
}

.auth-forgot-password a:hover {
    text-decoration: underline;
}

.auth-checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-weight: normal;
}

.auth-checkbox-label input[type="checkbox"] {
    width: auto;
    margin-right: 8px;
    cursor: pointer;
    flex-shrink: 0;
}

/* Terms stránka - specifické styly */
.terms-container {
    background: #ffffff;
    border-radius: 20px;
    max-width: 900px;
    margin: 0 auto;
    padding: 3rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.terms-header {
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #e0e0e0;
}

.terms-header h1 {
    color: #052b63;
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.terms-header p {
    color: #666;
    font-size: 0.9rem;
}

.terms-content {
    line-height: 1.8;
}

.terms-content h2 {
    color: #0b448f;
    font-size: 1.5rem;
    margin-top: 2rem;
    margin-bottom: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e0e0e0;
}

.terms-content h2:first-of-type {
    border-top: none;
    padding-top: 0;
    margin-top: 0;
}

.terms-content h3 {
    color: #052b63;
    font-size: 1.2rem;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

.terms-content p {
    margin-bottom: 1rem;
    color: #444;
}

.terms-content ul, .terms-content ol {
    margin-bottom: 1rem;
    padding-left: 2rem;
}

.terms-content li {
    margin-bottom: 0.5rem;
    color: #444;
}

.terms-footer {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 2px solid #e0e0e0;
    text-align: center;
}

.terms-last-updated {
    color: #666;
    font-size: 0.85rem;
    margin-top: 1rem;
}

