/* Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
}

html {
    height: 100%;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    background-color: #f0f0f0;
    min-height: 100vh;
    height: 100%;
    padding: 0;
    margin: 0;
}

/* Header Styles */
.header {
    background-color: #1c7097;
    color: white;
    padding: 20px;
    text-align: center;
    margin-bottom: 15px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: relative;
}

.header h1 {
    font-size: 28px;
    margin-bottom: 5px;
    font-weight: normal;
}

.header p {
    font-size: 14px;
    opacity: 0.9;
}

/* Burger Menu */
.burger-menu {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    z-index: 1000;
}

.burger-icon {
    width: 30px;
    height: 3px;
    background-color: white;
    margin: 6px 0;
    transition: 0.4s;
    border-radius: 2px;
}

.nav-menu {
    display: none;
    position: absolute;
    left: 20px;
    top: 80px;
    background-color: white;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    border-radius: 4px;
    overflow: hidden;
    z-index: 999;
    min-width: 200px;
}

.nav-menu.active {
    display: block;
}

.nav-menu a {
    display: block;
    padding: 12px 20px;
    color: #1c7097;
    text-decoration: none;
    border-bottom: 1px solid #eee;
    transition: background-color 0.3s;
}

.nav-menu a:last-child {
    border-bottom: none;
}

.nav-divider {
    border: none;
    border-top: 1px solid #ddd;
    margin: 4px 0;
}

.nav-menu a:hover {
    background-color: #f0f0f0;
}

.nav-menu a.active-page {
    background-color: #1c7097;
    color: white;
    font-weight: bold;
}

/* Container Styles */
.container {
    background: white;
    max-width: 600px;
    margin: 0 auto;
    padding: 30px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border-radius: 4px;
}

.container.wide {
    max-width: 1200px;
}

.container.extra-wide {
    max-width: 1400px;
}

/* Form Styles */
.form-group {
    margin-bottom: 15px;
}

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

.form-group input,
.form-group select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 3px;
    font-size: 14px;
    line-height: 1.5;
    height: 42px;
    transition: border-color 0.2s ease;
    background-color: white;
    box-sizing: border-box;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.form-group select {
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 16px;
    padding-right: 35px;
}

.form-group input[type="checkbox"] {
    width: auto;
    height: auto;
    padding: 0;
    margin-right: 5px;
    -webkit-appearance: checkbox;
    -moz-appearance: checkbox;
    appearance: auto;
    border: none;
    border-radius: 0;
    box-shadow: none;
    background-color: transparent;
    background-image: none;
    cursor: pointer;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #1c7097;
    box-shadow: 0 0 0 2px rgba(28, 112, 151, 0.1);
}

.form-group input::placeholder {
    color: #999;
}

.form-section {
    margin-bottom: 30px;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 4px;
}

.form-section h2 {
    margin-bottom: 20px;
    color: #1c7097;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

/* Button Styles */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    transition: background-color 0.3s;
}

.btn-primary {
    background-color: #1c7097;
    color: white;
}

.btn-primary:hover {
    background-color: #145373;
}

.btn-submit {
    width: 100%;
    padding: 10px 20px;
    background-color: #1c7097;
    color: white;
    border: none;
    border-radius: 3px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s;
    margin-top: 10px;
}

.btn-submit:hover {
    background-color: #145373;
}

.btn-danger {
    background-color: #dc3545;
    color: white;
}

.btn-danger:hover {
    background-color: #c82333;
}

.btn-edit {
    background-color: #28a745;
    color: white;
    padding: 5px 10px;
    font-size: 12px;
}

.btn-edit:hover {
    background-color: #218838;
}

.btn-save {
    width: 100%;
    padding: 12px;
    background-color: #1c7097;
    color: white;
    border: none;
    border-radius: 3px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.2s ease;
    margin-top: 10px;
}

.btn-save:hover {
    background-color: #145373;
}

.btn-filter {
    background-color: #1c7097;
    color: white;
}

.btn-filter:hover {
    background-color: #145373;
}

.btn-reset {
    background-color: #666;
    color: white;
}

.btn-reset:hover {
    background-color: #555;
}

/* Input with Clear Button */
.input-with-clear {
    position: relative;
    display: block;
}

.input-with-clear input {
    padding-right: 40px;
}

/* Clear Input Button */
.clear-input-btn {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 50%;
    width: 26px;
    height: 26px;
    font-size: 16px;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 0;
    line-height: 1;
    transition: background-color 0.2s ease;
    z-index: 10;
}

.clear-input-btn:hover {
    background-color: #c82333;
}

.clear-input-btn:active {
    transform: translateY(-50%) scale(0.95);
}

/* Message Styles */
.message {
    padding: 12px 15px;
    border-radius: 3px;
    margin-bottom: 20px;
}

.success, .success-message {
    background-color: #d4edda;
    color: #155724;
    padding: 12px 15px;
    border-radius: 3px;
    margin-bottom: 20px;
    border: 1px solid #c3e6cb;
}

.success-message {
    display: none;
}

.error, .error-message {
    background-color: #f8d7da;
    color: #721c24;
    padding: 12px 15px;
    border-radius: 3px;
    margin-bottom: 20px;
    border: 1px solid #f5c6cb;
}

/* Table Styles */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

table th,
table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

table th,
thead {
    background-color: #1c7097;
    color: white;
    font-weight: bold;
}

th {
    font-size: 14px;
}

td {
    font-size: 14px;
    color: #333;
}

table tr:hover,
tbody tr:hover {
    background-color: #f5f5f5;
}

.history-section {
    margin-top: 30px;
    padding-top: 30px;
    border-top: 2px solid #e0e0e0;
}

.history-section h3 {
    color: #1c7097;
    margin-bottom: 15px;
    font-size: 18px;
}

.history-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

.history-table th {
    background-color: #1c7097;
    color: white;
    font-weight: bold;
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #ddd;
    font-size: 14px;
}

.history-table td {
    padding: 12px;
    border-bottom: 1px solid #ddd;
    font-size: 14px;
    color: #333;
}

.history-table tr:hover {
    background-color: #f5f5f5;
}

.no-data {
    text-align: center;
    padding: 20px;
    color: #999;
    font-style: italic;
}

.total-row {
    font-weight: bold;
    background-color: #f0f0f0;
    border-top: 2px solid #1c7097;
}

/* Badge Styles */
.badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: bold;
}

.badge-success {
    background-color: #d4edda;
    color: #155724;
}

.badge-danger {
    background-color: #f8d7da;
    color: #721c24;
}

.badge-avgas {
    background-color: #e3f2fd;
    color: #1976d2;
}

.badge-mogas {
    background-color: #fff3e0;
    color: #f57c00;
}

.badge-jet {
    background-color: #f3e5f5;
    color: #7b1fa2;
}

.badge-diesel {
    background-color: #e8f5e9;
    color: #2e7d32;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 0;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    border-radius: 4px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

/* Kompaktere Abstände im Modal-Formular */
.modal-content .form-group {
    margin-bottom: 8px;
}

.modal-content .form-group label {
    margin-bottom: 3px;
    font-size: 13px;
}

.modal-content .form-group input:not([type="checkbox"]),
.modal-content .form-group select {
    height: 36px;
    padding: 6px 10px;
    font-size: 14px;
}

.modal-content .btn-save {
    margin-top: 6px;
    padding: 10px;
}

.modal-header {
    padding: 12px 20px;
    background-color: #1c7097;
    color: white;
    border-radius: 4px 4px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    font-size: 1em;
}

.modal-body {
    padding: 20px;
}

.close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 28px;
    cursor: pointer;
    line-height: 20px;
}

.close-btn:hover {
    opacity: 0.8;
}

/* Edit Button */
.edit-btn {
    background: none;
    border: none;
    color: #1c7097;
    cursor: pointer;
    font-size: 18px;
    padding: 5px;
    transition: color 0.2s ease;
}

.edit-btn:hover {
    color: #165a79;
}

/* Filter Section */
.filter-section {
    background-color: #f9f9f9;
    padding: 20px;
    border-radius: 4px;
    margin-bottom: 30px;
}

.filter-title {
    color: #1c7097;
    font-size: 18px;
    margin-bottom: 15px;
    font-weight: bold;
}

.filter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 15px;
}

.filter-field {
    display: flex;
    flex-direction: column;
}

.filter-field label {
    display: block;
    color: #333;
    font-weight: bold;
    margin-bottom: 5px;
    font-size: 14px;
}

.filter-field input,
.filter-field select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 3px;
    font-size: 14px;
    line-height: 1.5;
    height: 42px;
    box-sizing: border-box;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-color: white;
}

.filter-field select {
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 16px;
    padding-right: 35px;
}

.filter-buttons {
    display: flex;
    gap: 10px;
}

.filter-buttons button {
    padding: 10px 20px;
    border: none;
    border-radius: 3px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s;
}

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

.stat-card {
    background-color: #f9f9f9;
    padding: 20px;
    border-radius: 4px;
    border-left: 4px solid #1c7097;
}

.stat-card.warning {
    background-color: #fff3cd;
    border-left-color: #dc3545;
}

.stat-card h3 {
    color: #1c7097;
    font-size: 16px;
    margin-bottom: 10px;
}

.stat-title {
    color: #1c7097;
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 10px;
}

.stat-value {
    font-size: 24px;
    font-weight: bold;
    color: #333;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 12px;
    color: #666;
}

.stat-details {
    font-size: 13px;
    color: #666;
    margin-top: 10px;
    line-height: 1.6;
}

.table-container {
    overflow-x: auto;
}

/* Login Page Specific */
.login-box {
    background: white;
    padding: 30px;
    border-radius: 5px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
}

body.login-page {
    display: -webkit-box;
    display: -webkit-flex;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-pack: center;
    -webkit-justify-content: center;
    -ms-flex-pack: center;
    justify-content: center;
    -webkit-box-align: center;
    -webkit-align-items: center;
    -ms-flex-align: center;
    align-items: center;
    min-height: 100vh;
    height: 100%;
    padding: 20px;
}

.login-box h2 {
    color: #1c7097;
    margin-bottom: 20px;
    text-align: center;
}

.login-box .form-group {
    margin-bottom: 15px;
}

.login-box .form-group label {
    display: block;
    color: #333;
    font-weight: bold;
    margin-bottom: 5px;
    font-size: 14px;
}

.login-box .form-group input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 3px;
    font-size: 14px;
    line-height: 1.5;
    height: 42px;
    box-sizing: border-box;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-color: white;
}

.login-box .form-group input:focus {
    outline: none;
    border-color: #1c7097;
    box-shadow: 0 0 0 2px rgba(28, 112, 151, 0.1);
}

.login-box button[type="submit"] {
    width: 100%;
    padding: 12px;
    background-color: #1c7097;
    color: white;
    border: none;
    border-radius: 3px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.login-box button[type="submit"]:hover {
    background-color: #155a7a;
}

.login-box .error {
    background-color: #f8d7da;
    color: #721c24;
    padding: 12px;
    border-radius: 3px;
    margin-bottom: 15px;
    border: 1px solid #f5c6cb;
}

.login-box .success {
    background-color: #d4edda;
    color: #155724;
    padding: 12px;
    border-radius: 3px;
    margin-bottom: 15px;
    border: 1px solid #c3e6cb;
}

/* Footer */
.footer {
    text-align: center;
    margin-top: 30px;
    color: #666;
    font-size: 12px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .header h1 {
        font-size: 24px;
    }
    
    .filter-grid {
        grid-template-columns: 1fr;
    }
    
    .stats-section {
        grid-template-columns: 1fr;
    }
    
    table {
        font-size: 12px;
    }
    
    th, td {
        padding: 8px 4px;
    }
    
    .history-table {
        font-size: 12px;
    }
    
    .history-table th,
    .history-table td {
        padding: 8px 5px;
    }
}

@media (max-width: 600px) {
    .container {
        padding: 20px;
    }
}
