/* ========== RESET & BASE STYLES ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ========== MOBILE VIEW BASE ========== */
.mobile-view {
    margin: 0;
    min-height: 100vh;
    width: 100vw;
    font-family: Arial, sans-serif;
    background-color: #f8f9fa;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* ========== LAYOUT CONTAINERS ========== */
.mobile-view .container {
    min-height: 100vh;
    width: 100%;
    display: flex;
    flex-direction: column;
    padding: 20px;
}

.mobile-view .dashboard-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 100%;
    padding: 20px 0;
}

.mobile-view .message-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ========== CONTENT BOXES ========== */
.mobile-view .time-container {
    width: 100%;
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

.mobile-view .dashboard2-container {
    width: 100%;
    background: white;
    border-radius: 12px;
    padding: 15px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    margin-bottom: 30px;
    text-align: center;
    font-size: 1.4em;
    font-weight: 500;
}

.mobile-view .dashboard2-container div {
    background: #f8f9fa;
    margin: 10px 0;
    padding: 12px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* ========== KONTROLLEN LISTE ========== */
.mobile-view .kontrollen-liste {
    width: 100%;
    margin: 20px 0;
}

.mobile-view .kontrolle-item {
    background: white;
    border-radius: 12px;
    margin-bottom: 20px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.mobile-view .kontrolle-header {
    background: #f8f9fa;
    padding: 15px;
    font-size: 1.2em;
    font-weight: 500;
    border-bottom: 1px solid #dee2e6;
}

.mobile-view .kontrolle-content {
    padding: 15px;
}

.mobile-view .kontrolle-content div {
    margin: 8px 0;
    font-size: 1.1em;
}

/* ========== BUTTONS & LINKS ========== */
.mobile-view .button-container {
    width: 100%;
    margin-top: auto;
}

.mobile-view .button-group {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.mobile-view .dashboard-link {
    display: block;
    width: 100%;
    padding: 15px;
    margin: 12px 0;
    border-radius: 8px;
    text-align: center;
    font-size: 16px;
    font-weight: bold;
    text-decoration: none;
}

.mobile-view .dashboard-link:active {
    transform: scale(0.98);
}

.mobile-view .dashboard-link.start { background-color: #28a745; color: white; }
.mobile-view .dashboard-link.logout { background-color: #343a40; color: white; }
.mobile-view .dashboard-link.open { background-color: #ffa500; color: white; }
.mobile-view .dashboard-link.closed { background-color: #28a745; color: white; }
.mobile-view .dashboard-link.new { background-color: #dc3545; color: white; }
.mobile-view .dashboard-link.back { background-color: #6c757d; color: white; }

.mobile-view .edit-button {
    background: #007bff;
    color: white;
    padding: 8px 16px;
    border-radius: 4px;
    text-decoration: none;
    display: inline-block;
}

/* ========== FORMS & INPUTS ========== */
.mobile-view .login-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 15px;
}

.mobile-view .form-group {
    margin-bottom: 15px;
}

/* Label styling for form groups */
.mobile-view .form-group label,
.mobile-view .transporteur-section label,
.mobile-view .kennzeichen-section label,
.mobile-view .herkunft-section label {
    font-size: 1.2em;  /* 20% larger */
    font-weight: bold;
    margin-bottom: 8px;
    display: block;
    color: #333;
}

/* Section titles */
.mobile-view h2,
.mobile-view h3 {
    font-size: 1.4em;
    font-weight: bold;
    margin: 20px 0;
    color: #333;
}

.mobile-view .form-group input {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

/* ========== SELECT SECTIONS ========== */
.mobile-view .transporteur-section,
.mobile-view .kennzeichen-section,
.mobile-view .herkunft-section {
    margin: 20px 0;
}

.mobile-view .transporteur-input-group,
.mobile-view .kennzeichen-input-group,
.mobile-view .herkunft-input-group {
    margin-top: 10px;
}

/* iOS Dropdown Styling Fix */
.mobile-view select,
.mobile-view select option {
    width: 100%;
    color: #333;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background: #fff;
    padding: 15px;
    font-size: 16px;
    border: 1px solid #ddd;
    border-radius: 8px;
    margin: 5px 0;
}

.mobile-view select::-ms-expand {
    display: none;
}

/* ========== NEW ENTRY INPUTS ========== */
.mobile-view #transporteur-input,
.mobile-view #kennzeichen-input,
.mobile-view #herkunft-input {
    width: 100%;
    padding: 12px;
    margin-top: 10px;
    border: 2px solid #007bff;
    border-radius: 4px;
    font-size: 1.1em;
}

/* ========== SAVE BUTTON ========== */
.mobile-view .dashboard-link.save {
    background-color: #28a745;
    color: white;
    margin-bottom: 10px;
}

/* Einheitliche Größe für alle Eingabefelder */
.mobile-view input[type="text"],
.mobile-view input[type="number"],
.mobile-view #transporteur-input,
.mobile-view #kennzeichen-input,
.mobile-view #herkunft-input {
    width: 100%;
    padding: 15px;
    font-size: 16px;
    border: 1px solid #ddd;
    border-radius: 8px;
    margin: 5px 0;
}

.mobile-view button {
    padding: 10px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
}

.mobile-view .save-button {
    background: #28a745;
    color: white;
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1em;
}

.mobile-view .save-button:hover {
    background: #218838;
}

/* ========== DESKTOP VIEW STYLES ========== */
.desktop-view {
    padding: 30px;
    background: #f8f9fa;
}

.desktop-view .container {
    max-width: 1400px;
    margin: 0 auto;
}

.header-section {
    display: flex;
    align-items: center;
    margin-bottom: 40px;
}

.header-section .logo {
    width: 150px;
    margin-right: 30px;
}

.admin-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 40px;
}

.grid-section {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.section-title {
    font-size: 24px;
    padding: 20px;
    border-bottom: 1px solid #eee;
}

.list-container {
    padding: 20px;
}

.list-header {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 6px;
    font-weight: bold;
    display: flex;
}

.list-row {
    border: 1px solid #eee;
    border-radius: 6px;
    margin: 10px 0;
}

.list-summary {
    padding: 15px;
    display: flex;
    align-items: center;
    cursor: pointer;
}

.edit-section {
    padding: 20px;
    border-top: 1px solid #eee;
    background: #f8f9fa;
}

.edit-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.email-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 16px;
}

.action-button {
    padding: 10px 20px;
    border-radius: 6px;
    border: none;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.action-button.edit {
    background: #007bff;
    color: white;
}

.action-button.save {
    background: #28a745;
    color: white;
}

.action-button.delete {
    background: #dc3545;
    color: white;
}

.action-button.logout {
    background: #6c757d;
    color: white;
    text-decoration: none;
    display: inline-block;
}

.footer-section {
    text-align: right;
    margin-top: 30px;
}

/* ========== UTILITY CLASSES ========== */
.page-title {
    font-family: 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 32px;
    font-weight: 500;
    color: #2c3e50;
    margin: 0;
}

.section-title {
    font-family: 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 24px;
    font-weight: 500;
    color: #2c3e50;
}

body.desktop-view {
    font-family: 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

.mobile-view .logo {
    width: 200px;
    height: auto;
    margin: 20px auto;
}

/* File Upload Styling */
.custom-file-upload {
    display: inline-block;
    padding: 12px 20px;
    background-color: #f0f0f0;
    border: 1px solid #ddd;
    color: #333;
    border-radius: 8px;
    cursor: pointer;
    margin: 10px 0;
    width: 100%;
    text-align: center;
    font-weight: bold;
}

.custom-file-upload:hover {
    background-color: #e0e0e0;
}

input[type="file"] {
    display: none;
}

.file-feedback {
    margin-top: 5px;
    padding: 8px;
    background: #f8f9fa;
    border-radius: 4px;
    font-size: 0.9em;
    word-break: break-all;
}

/* Bildvorschau-Container */
.image-preview {
    max-width: 100%;
    margin: 10px 0;
    border-radius: 8px;
    overflow: hidden;
}

.image-preview img {
    width: 100%;
    height: auto;
    display: block;
}

.overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1000;
}

.overlay.show {
    display: flex;
    justify-content: center;
    align-items: center;
}

.overlay-content {
    background: white;
    padding: 20px;
    border-radius: 5px;
    text-align: center;
}

.loading-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 999;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.progress-bar {
    width: 200px;
    height: 20px;
    background: #ddd;
    border-radius: 10px;
    margin: 20px 0;
}

.progress-bar-fill {
    width: 0%;
    height: 100%;
    background: #4CAF50;
    border-radius: 10px;
    transition: width 0.3s ease;
}

.status-text {
    color: white;
    margin-top: 10px;
}

.list-container {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    max-height: 80vh;
    overflow-y: auto;
    margin: 20px 0;
    border: 1px solid #ddd;
}

.list-header, .list-summary {
    display: flex;
    justify-content: space-between;
    padding: 15px;
    margin: 0 10px;
}

.list-item {
    text-align: left;
    padding: 0 10px;
}

.list-row {
    border-bottom: 1px solid #eee;
    background: white;
}

.list-summary:hover {
    background-color: #f8f9fa;
}

.pdf-icon {
    text-align: center;
    color: #dc3545;
    cursor: pointer;
}

.pdf-icon img {
    width: 24px;
    height: auto;
    cursor: pointer;
}

.pdf-icon img:hover {
    opacity: 0.8;
}

.pdf-icon i {
    font-size: 1.2em;
}

.pdf-icon i:hover {
    color: #c82333;
}

.edit-section {
    padding: 20px;
    background: #f8f9fa;
    border-top: 1px solid #eee;
    display: none;
}

.edit-section.expanded {
    display: block;
}

.edit-section select,
.edit-section input {
    width: 100%;
    padding: 10px;
    margin: 5px 0;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.edit-section option {
    padding: 5px;
}

.transporteur-input-group,
.kennzeichen-input-group {
    margin-bottom: 15px;
}

.warning-message {
    background: #fff3cd;
    border: 1px solid #ffeeba;
    color: #856404;
    padding: 15px;
    margin: 15px 0;
    border-radius: 8px;
    text-align: center;
    font-weight: bold;
}

.add-user-section {
    margin-top: 30px;
    padding-top: 30px;
    border-top: 2px solid #eee;
}

.subsection-title {
    font-family: 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 20px;
    font-weight: 500;
    color: #2c3e50;
    margin-bottom: 20px;
}

.action-button.add {
    background: #28a745;
    color: white;
}

.action-button.add:hover {
    background: #218838;
}

.reporting-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    padding: 20px;
}

.report-item {
    text-align: center;
}

.report-item h3 {
    font-family: 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 18px;
    margin-bottom: 15px;
    color: #2c3e50;
}

.action-button.report {
    background: #17a2b8;
    color: white;
    width: 100%;
}

.action-button.report:hover {
    background: #138496;
}

.hidrive-section {
    background: #f5f5f5;
    padding: 20px;
    border-radius: 8px;
    margin-top: 20px;
}

.hidrive-grid {
    display: grid;
    grid-gap: 15px;
    margin-bottom: 20px;
}
