* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 20px;
    background-color: #f5f5f5;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    background-color: #fff;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
    border-radius: 5px;
}

h1, h2, h3 {
    color: #333;
}

/* Formuláře */
.login-form, .register-form {
    background: white;
    padding: 20px;
    border-radius: 5px;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
    max-width: 500px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 15px;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 5px;
    max-width: 500px;
}

.form-group h3 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #333;
}

label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

input[type="text"],
input[type="password"],
input[type="email"],
input[type="tel"],
input[type="date"],
input[type="file"],
input[type="number"] {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-sizing: border-box;
}

input[type="date"] {
    width: 200px;
}

input[type="number"] {
    width: 60px;
}

input[disabled] {
    background-color: #e9ecef;
    cursor: not-allowed;
}

button {
    background-color: #4CAF50;
    color: white;
    padding: 10px 15px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

button:hover {
    background-color: #45a049;
}

/* Zprávy */
.error {
    color: #721c24;
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    padding: 10px;
    margin-bottom: 15px;
    border-radius: 4px;
}

.success {
    color: #155724;
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    padding: 10px;
    margin-bottom: 15px;
    border-radius: 4px;
}

/* Dashboard */
.dashboard {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 20px;
}

.menu-preview {
    background: #fff;
    padding: 15px;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.menu-preview iframe {
    width: 100%;
    height: 800px;
    border: none;
}

.order-form {
    background: #fff;
    padding: 15px;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

/* Admin rozhraní */
.admin-sections-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 30px;
}

.admin-section {
    margin-bottom: 0;
    padding: 20px;
    background-color: #fff;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.admin-link {
    text-align: center;
    margin: 20px 0;
}

.admin-button {
    display: inline-block;
    padding: 10px 20px;
    background-color: #007bff;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    transition: background-color 0.3s;
}

.admin-button:hover {
    background-color: #0056b3;
}

/* Tabulky */
.menu-table,
.orders-table table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.menu-table th,
.menu-table td,
.orders-table th,
.orders-table td {
    padding: 10px;
    border: 1px solid #ddd;
    text-align: left;
}

.menu-table th,
.orders-table th {
    background-color: #f5f5f5;
    font-weight: bold;
}

.menu-table tr:nth-child(even),
.orders-table tr:nth-child(even) {
    background-color: #f9f9f9;
}

.menu-table tr:hover,
.orders-table tr:hover {
    background-color: #f0f0f0;
}

.delete-button {
    background-color: #ff4444;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 14px;
}

.delete-button:hover {
    background-color: #cc0000;
}

/* Objednávky */
.orders-table {
    margin-bottom: 20px;
    background-color: #fff;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    overflow: hidden;
}

.table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    background-color: #e9ecef;
    border-bottom: 2px solid #dee2e6;
}

.table-header h3 {
    margin: 0;
    color: #495057;
    font-size: 1.1em;
}

/* Objednávkový formulář */
.week-selector {
    margin-bottom: 20px;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 5px;
}

.week-form {
    display: flex;
    align-items: center;
    gap: 10px;
}

.week-form label {
    font-weight: bold;
    margin-right: 10px;
}

.week-form select {
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    min-width: 200px;
}

.week-form select:focus {
    outline: none;
    border-color: #80bdff;
    box-shadow: 0 0 0 0.2rem rgba(0,123,255,.25);
}

.checkbox-group {
    margin-bottom: 15px;
}

.checkbox-group label {
    display: flex;
    align-items: center;
    gap: 10px;
}

.jidla-input {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
}

.jidlo-input {
    display: flex;
    align-items: center;
    gap: 10px;
}

.jidlo-input label {
    white-space: nowrap;
    min-width: 70px;
}

.poznamka-input {
    margin-top: 15px;
    margin-bottom: 15px;
    padding: 10px;
    background-color: #f8f9fa;
    border-radius: 4px;
    border: 1px solid #e9ecef;
}

.poznamka-input label {
    display: block;
    font-size: 0.95em;
    color: #495057;
    margin-bottom: 5px;
    font-weight: 500;
}

.poznamka-input input[type="text"] {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 0.9em;
    background-color: #fff;
}

.poznamka-input input[type="text"]:focus {
    border-color: #80bdff;
    box-shadow: 0 0 0 0.2rem rgba(0,123,255,.25);
    background-color: #fff;
}

.order-info {
    background-color: #fff3cd;
    border: 1px solid #ffeeba;
    color: #856404;
    padding: 10px;
    margin-bottom: 20px;
    border-radius: 4px;
}

.order-info p:last-child {
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
    padding: 8px;
    border-radius: 4px;
    margin-top: 10px;
}

.disabled-message {
    color: #dc3545;
    font-size: 0.9em;
    margin-top: 10px;
}

/* Responzivita */
@media (max-width: 768px) {
    .dashboard {
        grid-template-columns: 1fr;
    }
    
    .admin-sections-container {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .container {
        padding: 10px;
    }
    
    .orders-table {
        overflow-x: auto;
    }
    
    .form-group {
        max-width: 100%;
        padding: 10px;
    }
    
    input[type="date"] {
        width: 100%;
    }
}

.menu-placeholder {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 5px;
    padding: 20px;
    margin: 20px 0;
    text-align: center;
}

.menu-placeholder p {
    color: #6c757d;
    margin: 0;
    line-height: 1.5;
}

.week-form select option {
    padding: 5px;
}

.week-form select option[value="next_week"] {
    font-style: italic;
    color: #6c757d;
}

/* Styling pro řádek se součty */
.soucty-row {
    background-color: #f8f9fa !important;
    border-top: 2px solid #dee2e6 !important;
}

.soucty-row td {
    font-weight: bold;
    color: #495057;
}

.soucty-row td:first-child {
    color: #dc3545;
    font-weight: bold;
}

/* Styling pro neuložené změny */
.form-unsaved {
    border: 2px solid #dc3545 !important;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25) !important;
}

.form-unsaved .form-group {
    border-left: 4px solid #dc3545;
}

.unsaved-indicator {
    background-color: #dc3545;
    color: white;
    padding: 8px 12px;
    border-radius: 4px;
    margin-bottom: 15px;
    font-weight: bold;
    display: none;
}

.unsaved-indicator.show {
    display: block;
}

/* Styling pro změněné inputy */
.input-changed {
    border-color: #dc3545 !important;
    background-color: #fff5f5 !important;
}

.input-changed:focus {
    border-color: #dc3545 !important;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25) !important;
}

/* Styling pro tlačítka formuláře */
.form-buttons {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.admin-actions {
    margin-bottom: 20px;
    text-align: center;
}

.print-button {
    background-color: #6c757d;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    text-decoration: none;
    display: inline-block;
}

.print-button:hover {
    background-color: #5a6268;
    color: white;
    text-decoration: none;
}

/* Styling pro tlačítko tisku dne */
.print-day-button {
    background-color: #17a2b8;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    margin: 5px;
}

.print-day-button:hover {
    background-color: #138496;
}

/* Styly pro označení změn objednávek */
.order-changed {
    background-color: #fff3cd !important;
    border-left: 4px solid #ffc107 !important;
}

.order-changed:hover {
    background-color: #ffeaa7 !important;
}

/* Jméno zákazníka s upravenou objednávkou - jiná barva */
.order-changed td:first-child {
    color: #dc3545 !important;
    font-weight: bold !important;
    background-color: #f8d7da !important;
    border-left: 3px solid #dc3545 !important;
}

.order-changed:hover td:first-child {
    background-color: #f5c6cb !important;
}

.changed-cell {
    background-color: #f8d7da !important;
    border-left: 3px solid #dc3545 !important;
    position: relative;
}

.changed-cell:hover {
    background-color: #f5c6cb !important;
}

.change-indicator {
    color: #dc3545;
    font-size: 1.2em;
    margin-left: 8px;
    cursor: help;
    font-weight: bold;
}

.change-detail {
    display: inline-block;
    font-size: 0.75em;
    margin-left: 3px;
    margin-bottom: 2px;
    padding: 1px 3px;
    border-radius: 3px;
    border: 1px solid #dc3545;
    background-color: rgba(220, 53, 69, 0.05);
}

/* Staré hodnoty - šedé */
.change-detail .old-value {
    color: #6c757d;
    text-decoration: line-through;
    background-color: rgba(108, 117, 125, 0.1);
    padding: 1px 3px;
    border-radius: 2px;
    margin-right: 4px;
}

/* Nové hodnoty - černé a tučné */
.change-detail .new-value {
    color: #000;
    font-weight: bold;
    background-color: rgba(0, 0, 0, 0.05);
    padding: 1px 3px;
    border-radius: 2px;
    margin-left: 4px;
}

/* Šipka mezi starou a novou hodnotou */
.change-detail .arrow {
    color: #dc3545;
    font-weight: bold;
    margin: 0 2px;
}

/* Tooltip pro změny */
[title] {
    position: relative;
}

/* Weekly payment summary styles */
.weekly-summary {
    margin-top: 20px;
}

.summary-stats {
    background-color: #f8f9fa;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
}

.summary-stats p {
    margin: 5px 0;
    font-size: 16px;
}

.payment-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
    font-size: 14px;
}

.payment-table th,
.payment-table td {
    border: 1px solid #ddd;
    padding: 8px;
    text-align: left;
}

.phone-number {
    white-space: nowrap;
}

.payment-table th {
    background-color: #f8f9fa;
    font-weight: bold;
    text-align: center;
}

.payment-cell {
    text-align: center;
    vertical-align: top;
}

.day-payment {
    padding: 5px;
}

.day-payment strong {
    color: #28a745;
    font-size: 16px;
    white-space: nowrap;
}

.day-details {
    margin-top: 3px;
    font-size: 11px;
    color: #666;
}

.day-details small {
    display: inline;
    margin: 0 3px 0 0;
}

.no-order {
    color: #ccc;
    font-style: italic;
}

.total-payment {
    text-align: center;
    font-weight: bold;
    background-color: #e8f5e8;
    white-space: nowrap;
}

.total-row {
    background-color: #d4edda;
    font-weight: bold;
}

.total-row td {
    border-top: 2px solid #28a745;
}

.pricing-info {
    background-color: #f8f9fa;
    padding: 15px;
    border-radius: 5px;
    border-left: 4px solid #28a745;
}

.pricing-info h3 {
    margin-top: 0;
    margin-bottom: 10px;
    color: #28a745;
}

.pricing-info ul {
    margin: 0;
    padding-left: 20px;
}

.pricing-info li {
    margin: 5px 0;
}

/* Klikatelné jméno zákazníka v administraci */
.name-link {
    color: #007bff;
    text-decoration: none;
    font-weight: 500;
}

.name-link:hover {
    text-decoration: underline;
    color: #0056b3;
}

/* Responzivní úpravy pro změny */
@media (max-width: 768px) {
    .change-detail {
        font-size: 0.7em;
        padding: 1px 3px;
    }
    
    .change-indicator {
        font-size: 1em;
        margin-left: 4px;
    }
}