body { padding: 60px 1% 80px 1%; margin: 0 auto; max-width: 600px; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; padding: 60px 1% 80px 1%; background-color: #ffffff; color: #333; }
.container { background-color: #fff;
 padding: 1rem 0.3rem; 
 text-align: left; }
h1 { color: #34495e; text-align: center; margin-bottom: 1rem; font-size: 1.8em; }
h2 { color: #34495e; text-align: center; margin-bottom: 1rem; font-size: 1.4em; }
h3 { color: #34495e; text-align: center; margin-bottom: 0.1rem; font-size: 1.1em; }
.form-group { margin-bottom: 1rem; }
label { display: block; margin-bottom: 0.5rem;  }
input[type="email"], input[type="password"], input[type="text"], select {
    width: calc(100% - 0.1rem);
    padding: 0.6rem;
    margin-top: 0.3rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-sizing: border-box;
}

.login form {
max-width: 90%;
margin-left: auto;
margin-right: auto;
}

p {
    text-align: center;
  }
.text-center {
    text-align: center !important;
    color: #507499;
}

    /* NOVÝ STYL PRO TLAČÍTKO RESTARTU KAMERY */
    .restart-button {
        background-color: #007bff;
        color: white;
        border: none;
        padding: 10px 15px;
        border-radius: 5px;
        cursor: pointer;
        margin: 10px auto;
        display: block;
        font-size: 1em;
    }
    .restart-button:hover {
        background-color: #0056b3;
    }
    .restart-button i {
        margin-right: 8px;
    }
    
button, .btn {
    background-color: #007bff;
    color: white;
    padding: 0.8rem;
    border: none;     margin-bottom: 1.1rem;

    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    width: 100%;
    box-sizing: border-box;
    margin-top: 1rem;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}
button:hover, .btn:hover { background-color: #0056b3; }
button:disabled { background-color: #cccccc; cursor: not-allowed; }
.btn-danger { background-color: #dc3545; }
.btn-danger:hover { background-color: #c82333; }
.btn-secondary { background-color: #6c757d; }
.btn-secondary:hover { background-color: #5a6268; }

.error { color: red; font-weight: bold; text-align: center; margin-bottom: 1rem; }
.success { color: green; font-weight: bold; text-align: center; margin-bottom: 1rem; }
.status-message {
    padding: 0.8rem;
    border-radius: 4px;
    margin-top: 1rem;
    text-align: center;
    font-size: 1em;
}
.status-message.success { background-color: #d4edda; color: #155724; border: 1px solid #c3e6cb; }
.status-message.error { background-color: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; }
.status-message.info { background-color: #cfe2ff; color: #055160; border: 1px solid #b6d4fe; display: none !important;  }
.status-message.warning { background-color: #fff3cd; color: #664d03; border: 1px solid #ffecb5; }

.scan-button-main {
        width: 100%;
        padding: 15px;
        font-size: 1.2rem;
        font-weight: bold;
        background-color: #3498db;
        color: white;
        border: none;
        border-radius: 8px;
        cursor: pointer;
        margin-bottom: 15px;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 10px;
        transition: background-color 0.3s;
    }
    .scan-button-main:hover {
        background-color: #2980b9;
    }
    .scan-button-main.retry-button {
        background-color: #e74c3c;
    }
    .scan-button-main.retry-button:hover {
        background-color: #c0392b;
    }
    #scan-controls {
        text-align: center;
        padding: 10% 0; height: 40%;
    }
    .modal-content h3 {
        text-align: center;
        margin-top: 0;
        margin-bottom: 15px;
        color: #333;
    }
    .close-scanner {
        color: #aaa;
        float: right; text-align: right;
        font-size: 28px;
        font-weight: bold;
        cursor: pointer;
    }
    .close-scanner:hover,
    .close-scanner:focus {
        color: black;
        text-decoration: none;
        cursor: pointer;
    }
    #qr-code-reader {
        border: 2px solid #eee;
        border-radius: 8px;
    }
    #scanner-status-in-modal {
        margin-top: 15px;
    }
    
.dochazka-header {
    display: block;
    justify-content: space-between;
    align-items: center;
    margin-top: 1.5rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid #eee;
    padding-bottom: 0.5rem;
}
.dochazka-header h2 { margin: 0; }
.dochazka-record {
    background-color: #f9f9f9;
    border: 1px solid #eee;
    border-radius: 6px;
    padding: 0.5rem;
    margin-bottom: 0.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    position: relative;
}
.dochazka-record .type { text-transform: capitalize; margin-right: 10px; }
.dochazka-record .note-icon {
    cursor: pointer;
    font-size: 1.2em;
}
.dochazka-record .note-display { font-size: 0.8em; color: #507499; width: 100%; margin-top: 0.5em; }

.qr-code-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 1rem;
}
#qr-code-reader {
    width: 100%;
    max-width: 600px;
    
    
    border-radius: 6px;
    overflow: hidden;
    
}

/* Styl pro modalní okno */
.modal {
    display: none;
    position: fixed;
    z-index: 1050;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.4);
    padding-top: 60px;
}
.modal-content {
    background-color: #fefefe;
    margin: 5% auto;
    padding: 10px;
    border: 1px solid #888;
    width: 85%;
    max-width: 400px;
    border-radius: 8px;
}
.modal-content h3 {
    text-align: center;
    color: #0056b3;
    margin-bottom: 1rem;
}
.close {
    color: #aaa;
        float: right; text-align: right;
        font-size: 28px;
        font-weight: bold;
        cursor: pointer;
}
.close:hover,
.close:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}
.modal-quick-select button {
    display: block;
    width: 100%;
    margin-bottom: 10px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 10px;
    cursor: pointer;
    font-size: 1em;
}
.modal-quick-select button:hover {
    background-color: #0056b3;
}
.modal-quick-select #other-reasons-btn {
    background-color: #343a40;
    color: white;
}
.modal-quick-select #other-reasons-btn:hover {
    background-color: #23272b;
}
.note-textarea-group {
    display: none;
    margin-top: 1rem;
}
.note-textarea-group textarea {
    width: 100%;
    height: 100px;
    margin-bottom: 10px;
    box-sizing: border-box;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}
#save-note-btn { background-color: #007bff; }
#save-note-btn:hover { background-color: #0056b3; }
#delete-note-btn { background-color: #dc3545; margin-top: 0.5rem; display: none; }
#delete-note-btn:hover { background-color: #c82333; }
.logo { display: block; margin: 20px auto 20px auto; max-width: 200px; height: auto; }

/* Styly pro menu */
.main-menu {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: space-around;
    align-items: center;
    background-color: #2c3e50;
    box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.1);
    padding: 10px 0px 19px 0px;
    z-index: 1000;
}
.menu-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: #f9f9f9;
    font-size: 12px;
    transition: color 0.2s;
}
.menu-item i { font-size: 24px; margin-bottom: 5px; }
.menu-item.active { color: #00a0e3; }
.menu-item:hover { color: #00a0e3; }

/* --- NOVÉ STYLY PRO PWA VYLEPŠENÍ --- */
.app-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: #2c3e50;
    color: #f9f9f9;
    z-index: 1010;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}
.header-content {
    max-width: 600px;
    margin: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem 1rem;
    height: 60px;
    box-sizing: border-box;
}
.header-name, .header-title {
    font-size: 1.1em;
    font-weight: bold;
}



/* Styl pro aktivní časovač */
#live-timer-display.timer-active {
    color: #28a745;  
}

   /* Nové styly pro zobrazení stavu přihlášení a časovače */
        #work-status-container {
            display: flex;
            justify-content: center;
            align-items: center;
            gap: 10px; /* Mezera mezi bloky */
            margin: 1rem 0;
            height: 55px; /* Mírně zvětšíme výšku kontejneru */
            padding-bottom: 20px;
        }
        
        /* Styl pro menší text "Přihlášen" */
        #status-display {
            padding: 8px 15px;
            border-radius: 4px;
            font-weight: bold;
            font-size: 0.9em; /* --- ZDE JE ZMENŠENÍ --- */
            display: flex;
            align-items: center;
            justify-content: center;
            height: 100%;
            box-sizing: border-box;
            background-color: #cde5b0; /* Zelené pozadí */
            color: black;
        }
        
        /* Styl pro velký časovač */
        #live-timer-display {
            padding: 10px 20px;
            border-radius: 4px;
            font-weight: bold;
            font-size: 1.8em; /* --- ZDE JE ZVĚTŠENÍ --- */
            display: flex;
            align-items: center;
            justify-content: center;
            height: 100%;
            box-sizing: border-box;
            background-color: #f0f0f0; /* Světle šedé pozadí pro časovač */
            color: #333;
            font-family: monospace;
            min-width: 150px; /* Mírně zvětšíme minimální šířku */
        }

        /* Styl pro zobrazení aktuálního data a času (když není přihlášen) */
        #current-datetime-display {
            font-size: 22px;
            color: #2c3e50;
            font-weight: bold;
            height: 45px;
            font-family: monospace;
            text-align: center;
            width: 100%;
            /*padding: 1rem 0;*/
        }

.offline-status {
    background-color: #ffc107;
    color: #333;
    text-align: center;
    padding: 0.5rem;
    font-weight: bold;
    border-radius: 4px;
    margin-bottom: 1rem;
}
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { padding: 8px; border: 1px solid #ddd; text-align: left; }
.table thead { background-color: #f2f2f2; }
.card { border-radius: 8px; box-shadow: 0 2px 4px rgba(0,0,0,0.1); border: none; margin-bottom: 1rem; }
.table-responsive { overflow-x: auto; }