/* Modern Service Portal Theme - Refined */
:root {
    --bg-color: #e9ecef;
    /* Darker Grey Background for better contrast */
    --sidebar-bg: #2c3e50;
    /* Dark Blue-Grey Sidebar */
    --sidebar-hover: #34495e;
    /* Slightly lighter for hover */
    --text-color: #343a40;
    /* Darker text */
    --card-bg: #ffffff;
    --primary-color: #3498db;
    /* Modern Blue */
    --secondary-color: #95a5a6;
    /* Grey */
    --success-color: #2ecc71;
    /* Green */
    --danger-color: #e74c3c;
    /* Red */
    --warning-color: #f1c40f;
    /* Yellow */
    --border-color: #ced4da;
    /* Darker border for visibility */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1), 0 1px 3px rgba(0, 0, 0, 0.08);
}

body {
    font-family: 'Segoe UI', "Helvetica Neue", Arial, sans-serif;
    background: linear-gradient(135deg, #2c3e50 0%, #3498db 100%);
    background-attachment: fixed;
    /* Ensures gradient covers full page */
    color: var(--text-color);
    margin: 0;
    padding: 0;
    display: flex;
    min-height: 100vh;
}

/* ... existing code ... */

/* Login Page Specific */
.login-body {
    /* Background removed as it is now global */
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

/* Sidebar Styling */
.sidebar {
    width: 260px;
    background-color: var(--sidebar-bg);
    color: #ecf0f1;
    display: flex;
    flex-direction: column;
    padding: 20px;
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    z-index: 100;
}

.sidebar h2 {
    text-align: center;
    margin-bottom: 30px;
    font-size: 22px;
    font-weight: 600;
    letter-spacing: 1px;
    color: #fff;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 20px;
}

.sidebar-menu {
    list-style: none;
    padding: 0;
    margin: 0;
    flex-grow: 1;
}

.sidebar-menu li {
    margin-bottom: 8px;
}

.sidebar-menu a {
    color: #bdc3c7;
    text-decoration: none;
    font-size: 16px;
    display: block;
    padding: 12px 15px;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.sidebar-menu a:hover,
.sidebar-menu a.active {
    background-color: var(--sidebar-hover);
    color: #fff;
    border-left: 4px solid var(--primary-color);
    padding-left: 11px;
}

/* DateTime Display */
.datetime-display {
    text-align: center;
    margin-bottom: 20px;
    padding: 15px;
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
}

.datetime-display div {
    font-size: 14px;
    color: #bdc3c7;
    margin-bottom: 5px;
}

.datetime-display .time {
    font-size: 24px;
    font-weight: 700;
    color: #fff;
    letter-spacing: 1px;
}

/* Main Content */
.main-content {
    margin-left: 300px;
    padding: 40px;
    width: calc(100% - 300px);
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

h1 {
    font-size: 32px;
    color: #ffffff;
    font-weight: 700;
    margin: 0;
    text-shadow:
        0 1px 0 #cccccc,
        0 2px 0 #b2b2b2,
        0 3px 0 #999999,
        0 4px 3px rgba(0, 0, 0, 0.2);
    letter-spacing: 0.5px;
}

/* Cards */
.card {
    background-color: var(--card-bg);
    padding: 30px;
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    margin-bottom: 25px;
}

.card h3 {
    margin-top: 0;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 15px;
    margin-bottom: 20px;
    color: #2c3e50;
    font-size: 1.2rem;
}

/* Buttons */
.btn {
    padding: 10px 20px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    display: inline-block;
    transition: background-color 0.2s, box-shadow 0.2s;
}

.btn:active {
    transform: translateY(1px);
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
    box-shadow: 0 2px 4px rgba(52, 152, 219, 0.3);
}

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

.btn-danger {
    background-color: var(--danger-color);
    color: white;
}

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

.btn-secondary {
    background-color: var(--secondary-color);
    color: white;
}

.btn-secondary:hover {
    background-color: #7f8c8d;
}

/* Forms */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #495057;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 15px;
    box-sizing: border-box;
    transition: border-color 0.2s, box-shadow 0.2s;
    background-color: #fff;
}

.form-group input:focus,
.form-group select:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.15);
}

/* Improved Task Row in Aufträge vergeben */
.task-row {
    background-color: #f8f9fa;
    border: 1px solid var(--border-color);
    padding: 20px;
    margin-bottom: 15px;
    border-radius: 6px;
    position: relative;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.remove-task-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    line-height: 28px;
    text-align: center;
    color: #dc3545;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.2s;
}

.remove-task-btn:hover {
    background-color: #dc3545;
    color: white;
    border-color: #dc3545;
}


/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
    background-color: #fff;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

table th,
table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

table th {
    background-color: #343a40;
    color: #fff;
    font-weight: 600;
    font-size: 14px;
    letter-spacing: 0.5px;
}

table tr:last-child td {
    border-bottom: none;
}

table tr:hover {
    background-color: #f1f3f5;
}

/* Accordion Styles (Archive) - High Contrast */
.accordion {
    background-color: #fff;
    color: #343a40;
    cursor: pointer;
    padding: 15px 20px;
    width: 100%;
    border: 1px solid var(--border-color);
    /* Visible Border */
    text-align: left;
    outline: none;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.2s;
    margin-bottom: 10px;
    border-radius: 6px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    border-left: 5px solid var(--secondary-color);
}

.accordion:hover {
    background-color: #f8f9fa;
    border-color: #adb5bd;
}

.accordion.active {
    background-color: #343a40;
    /* Dark when active */
    color: #fff;
    border-left-color: var(--primary-color);
    border-color: #343a40;
}

/* Plus/Minus Logic */
.accordion:after {
    content: '\002B';
    font-size: 20px;
    font-weight: bold;
    color: var(--primary-color);
}

.accordion.active:after {
    content: "\2212";
    color: #fff;
}

.panel {
    padding: 0 20px;
    background-color: #fff;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
    margin-bottom: 15px;
    border: 1px solid var(--border-color);
    border-top: none;
    border-radius: 0 0 6px 6px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

/* Status Badges */
.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 4px;
    /* More rectangular modern look */
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: white;
}

.status-open {
    background-color: var(--danger-color);
}

.status-partial {
    background-color: var(--warning-color);
    color: #212529;
}

.status-done {
    background-color: var(--success-color);
}

/* Modal Styling */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(2px);
}

.modal-content {
    background-color: #fff;
    margin: 8% auto;
    padding: 30px;
    border: 1px solid rgba(0, 0, 0, 0.2);
    width: 60%;
    max-width: 600px;
    border-radius: 8px;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
    position: relative;
    animation: modalSlideDown 0.3s;
}

@keyframes modalSlideDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    line-height: 1;
}

.close:hover {
    color: #000;
    text-decoration: none;
    cursor: pointer;
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        width: 100%;
        height: auto;
        position: relative;
    }

    .main-content {
        margin-left: 0;
        width: 100%;
        padding: 20px;
    }
}

/* Login Page Specific */
.login-body {
    background: linear-gradient(135deg, #2c3e50 0%, #3498db 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

.login-container {
    background-color: #fff;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    width: 100%;
    max-width: 400px;
    text-align: center;
}

.login-container h2 {
    color: #2c3e50;
    margin-bottom: 30px;
    font-size: 24px;
}

.login-links {
    margin-top: 15px;
    font-size: 14px;
}

.login-links a {
    color: var(--secondary-color);
    text-decoration: none;
}

.login-links a:hover {
    text-decoration: underline;
    color: var(--primary-color);
}