.discher-service-form {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 5px;
}

.discher-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #0073aa;
}

.discher-header h2 {
    margin: 0;
    font-size: 28px;
    color: #0073aa;
}

.company-info {
    text-align: right;
    font-size: 11px;
    line-height: 1.6;
}

.form-section {
    margin-bottom: 25px;
    padding: 15px;
    background: #f9f9f9;
    border-radius: 4px;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.activity-section {
    display: block;
}

.form-group {
    margin-bottom: 0;
}

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

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="date"],
.form-group input[type="time"],
.form-group input[type="number"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
    box-sizing: border-box;
}

.form-group textarea {
    resize: vertical;
    min-height: 150px;
}

h3 {
    margin: 30px 0 20px 0;
    font-size: 20px;
    color: #0073aa;
    border-bottom: 2px solid #0073aa;
    padding-bottom: 10px;
}

.time-entry {
    position: relative;
    margin-bottom: 20px;
    padding: 20px;
    background: #fff;
    border: 2px solid #0073aa;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 115, 170, 0.1);
}

.time-entry-header {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e0e0e0;
}

.time-row {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 10px;
    margin-bottom: 15px;
}

.time-summary {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    padding-top: 15px;
    border-top: 1px solid #e0e0e0;
    background: #f0f8ff;
    padding: 15px;
    border-radius: 4px;
}

.button-remove {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 5px 12px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.3s;
}

.button-remove:hover {
    background: #c82333;
}

.material-row {
    position: relative;
    display: grid;
    grid-template-columns: 1fr 3fr 1fr 3fr;
    gap: 10px;
    margin-bottom: 10px;
    padding: 15px;
    background: #f9f9f9;
    border-radius: 4px;
    border: 1px solid #e0e0e0;
}

.signature-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin: 20px 0;
}

.signature-box {
    padding: 20px;
    background: #f9f9f9;
    border-radius: 8px;
    border: 2px solid #0073aa;
}

.signature-box label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

.tap-hint {
    font-size: 11px;
    font-weight: normal;
    color: #666;
    font-style: italic;
}

.signature-box input[type="text"] {
    width: 100%;
    padding: 8px;
    margin-bottom: 15px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.signature-box canvas {
    border: 2px solid #0073aa;
    border-radius: 4px;
    cursor: pointer;
    display: block;
    width: 100%;
    height: 200px;
    max-height: 200px;
    background: #f8f8f8;
    touch-action: none;
    transition: all 0.3s;
    -webkit-tap-highlight-color: transparent;
    position: relative;
}

.signature-box canvas:hover {
    box-shadow: 0 0 15px rgba(0, 115, 170, 0.3);
    background: #fff;
    border-color: #005a87;
}

.signature-box canvas:active {
    transform: scale(0.99);
}

.signature-box {
    padding: 20px;
    background: #f9f9f9;
    border-radius: 8px;
    border: 2px solid #0073aa;
    position: relative;
}

.signature-box::after {
    content: '👆 Tippen zum Unterschreiben';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #999;
    font-size: 14px;
    pointer-events: none;
    opacity: 0.7;
    font-style: italic;
}

.signature-box.has-signature::after {
    display: none;
}

.clear-signature {
    margin-top: 10px;
    padding: 8px 20px;
    background: #6c757d;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    transition: background 0.3s;
}

.clear-signature:hover {
    background: #5a6268;
}

/* Fullscreen Signature Modal */
.signature-modal {
    display: none;
    position: fixed;
    z-index: 99999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    overflow: hidden;
}

.signature-modal-content {
    position: relative;
    margin: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    background: white;
}

.signature-modal-header {
    padding: 15px 20px;
    background: #0073aa;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
    height: 70px;
    box-sizing: border-box;
}

.signature-modal-header h3 {
    margin: 0;
    color: white;
    border: none;
    padding: 0;
    font-size: 20px;
}

.modal-close {
    background: transparent;
    border: none;
    color: white;
    font-size: 36px;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.3s;
}

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

#modal-signature {
    flex: 1;
    width: 100%;
    min-height: 300px;
    border: none;
    background: white;
    touch-action: none;
    cursor: crosshair;
    display: block;
    -webkit-tap-highlight-color: transparent;
}

.signature-modal-footer {
    padding: 15px 20px;
    background: #f5f5f5;
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-shrink: 0;
    height: 90px;
    box-sizing: border-box;
    align-items: center;
}

.modal-clear,
.modal-done {
    padding: 12px 35px;
    font-size: 16px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 600;
    -webkit-tap-highlight-color: transparent;
}

.modal-clear {
    background: #6c757d;
    color: white;
}

.modal-clear:hover,
.modal-clear:active {
    background: #5a6268;
    transform: translateY(-1px);
}

.modal-done {
    background: #28a745;
    color: white;
}

.modal-done:hover,
.modal-done:active {
    background: #218838;
    transform: translateY(-1px);
}

/* Mobile optimizations */
@media (max-width: 768px) {
    .signature-modal-header {
        padding: 10px 15px;
        height: 60px;
    }
    
    .signature-modal-header h3 {
        font-size: 16px;
    }
    
    .modal-close {
        font-size: 30px;
        width: 35px;
        height: 35px;
    }
    
    .signature-modal-footer {
        padding: 10px 15px;
        height: 80px;
        gap: 10px;
    }
    
    .modal-clear,
    .modal-done {
        padding: 10px 25px;
        font-size: 14px;
    }
    
    #modal-signature {
        cursor: none; /* Hide cursor on mobile for better touch experience */
    }
}

/* Landscape mode on mobile */
@media (max-height: 500px) and (orientation: landscape) {
    .signature-modal-header {
        height: 50px;
        padding: 8px 15px;
    }
    
    .signature-modal-header h3 {
        font-size: 14px;
    }
    
    .modal-close {
        font-size: 24px;
        width: 30px;
        height: 30px;
    }
    
    .signature-modal-footer {
        height: 60px;
        padding: 8px 15px;
    }
    
    .modal-clear,
    .modal-done {
        padding: 8px 20px;
        font-size: 13px;
    }
}

.button {
    display: inline-block;
    padding: 10px 20px;
    background: #0073aa;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    margin-top: 10px;
    transition: background 0.3s;
}

.button:hover {
    background: #005a87;
}

.button-primary {
    background: #0073aa;
    font-size: 18px;
    padding: 15px 40px;
    font-weight: 600;
}

.button-primary:hover {
    background: #005a87;
}

.form-actions {
    text-align: center;
    margin-top: 40px;
    padding-top: 30px;
    border-top: 2px solid #0073aa;
}

#form-message {
    margin-top: 20px;
    text-align: center;
}

#form-message p {
    padding: 15px;
    border-radius: 4px;
    font-weight: 600;
}

#form-message .success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

#form-message .error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

#form-message .loading {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* Responsive design */
@media (max-width: 1024px) {
    .time-row {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .time-summary {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .form-section {
        grid-template-columns: 1fr;
    }
    
    .time-entry-header {
        grid-template-columns: 1fr;
    }
    
    .time-row {
        grid-template-columns: 1fr 1fr;
    }
    
    .time-summary {
        grid-template-columns: 1fr;
    }
    
    .signature-section {
        grid-template-columns: 1fr;
    }
    
    .material-row {
        grid-template-columns: 1fr;
    }
    
    .discher-header {
        flex-direction: column;
    }
    
    .company-info {
        text-align: left;
        margin-top: 15px;
    }
}

/* Admin styles */
.button-danger {
    background: #dc3545;
    color: white;
}

.button-danger:hover {
    background: #c82333;
}

input[readonly] {
    background: #e9ecef;
    cursor: not-allowed;
}