/* Berichtsheft Server - Stylesheet */

:root {
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --success-color: #27ae60;
    --warning-color: #f39c12;
    --danger-color: #e74c3c;
    --light-color: #ecf0f1;
    --dark-color: #2c3e50;
    --text-color: #333;
    --border-color: #ddd;
    --shadow: 0 2px 5px rgba(0,0,0,0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: #f5f6fa;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */
.main-header {
    background: var(--primary-color);
    color: white;
    padding: 0;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 60px;
}

.logo a {
    color: white;
    text-decoration: none;
    font-size: 1.3rem;
    font-weight: bold;
}

.main-nav ul {
    display: flex;
    list-style: none;
    gap: 5px;
}

.main-nav a {
    color: rgba(255,255,255,0.9);
    text-decoration: none;
    padding: 8px 15px;
    border-radius: 4px;
    transition: background 0.3s;
}

.main-nav a:hover {
    background: rgba(255,255,255,0.1);
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-name {
    font-weight: 500;
}

.user-role {
    opacity: 0.8;
    font-size: 0.9rem;
}

.btn-link {
    color: white;
    text-decoration: none;
    padding: 6px 12px;
    border-radius: 4px;
    background: rgba(255,255,255,0.1);
}

.btn-logout {
    color: white;
    text-decoration: none;
    padding: 6px 12px;
    border-radius: 4px;
    background: var(--danger-color);
}

/* Main Content */
.main-content {
    flex: 1;
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
    padding: 20px;
}

/* Footer */
.main-footer {
    background: var(--primary-color);
    color: rgba(255,255,255,0.8);
    text-align: center;
    padding: 15px;
    margin-top: auto;
}

.footer-container {
    max-width: 1400px;
    margin: 0 auto;
}

/* Alerts */
.alert {
    padding: 15px 20px;
    border-radius: 4px;
    margin-bottom: 20px;
}

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

.alert-error, .alert-danger {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeeba;
}

.alert-info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    font-size: 1rem;
    transition: all 0.3s;
}

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

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

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

.btn-success:hover {
    background: #219a52;
}

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

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

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

.btn-secondary {
    background: #95a5a6;
    color: white;
}

.btn-sm {
    padding: 5px 10px;
    font-size: 0.875rem;
}

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

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-control:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.form-control.is-invalid {
    border-color: var(--danger-color);
}

.invalid-feedback {
    color: var(--danger-color);
    font-size: 0.875rem;
    margin-top: 5px;
}

textarea.form-control {
    min-height: 100px;
    resize: vertical;
}

/* Cards */
.card {
    background: white;
    border-radius: 8px;
    box-shadow: var(--shadow);
    margin-bottom: 20px;
}

.card-header {
    padding: 15px 20px;
    border-bottom: 1px solid var(--border-color);
    font-weight: 600;
    background: #f8f9fa;
    border-radius: 8px 8px 0 0;
}

.card-body {
    padding: 20px;
}

.card-footer {
    padding: 15px 20px;
    border-top: 1px solid var(--border-color);
    background: #f8f9fa;
    border-radius: 0 0 8px 8px;
}

/* Tables */
.table-responsive {
    overflow-x: auto;
}

.table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 0;
}

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

.table th {
    background: #f8f9fa;
    font-weight: 600;
}

.table tbody tr:hover {
    background: #f8f9fa;
}

/* Status Badges */
.badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.badge-entwurf {
    background: #ffeaa7;
    color: #856404;
}

.badge-fertig {
    background: #81ecec;
    color: #0c5460;
}

.badge-beim_ausbilder {
    background: #74b9ff;
    color: #004085;
}

.badge-nacharbeit {
    background: #fab1a0;
    color: #721c24;
}

.badge-freigegeben {
    background: #55efc4;
    color: #155724;
}

/* Login Page */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.login-box {
    background: white;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 400px;
}

.login-box h1 {
    text-align: center;
    margin-bottom: 30px;
    color: var(--primary-color);
}

.login-box .logo-text {
    text-align: center;
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 20px;
}

/* Dashboard */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    padding: 25px;
    border-radius: 8px;
    box-shadow: var(--shadow);
    text-align: center;
}

.stat-card .stat-number {
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--secondary-color);
}

.stat-card .stat-label {
    color: #666;
    margin-top: 5px;
}

/* Berichtsheft Formular */
.berichtsheft-form {
    background: white;
    border-radius: 8px;
    box-shadow: var(--shadow);
    overflow: hidden;
}

.berichtsheft-header {
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 15px;
    background: #f8f9fa;
}

.berichtsheft-header .info-item {
    display: flex;
    flex-direction: column;
}

.berichtsheft-header .info-label {
    font-size: 0.85rem;
    color: #666;
}

.berichtsheft-header .info-value {
    font-weight: 600;
    font-size: 1rem;
}

.berichtsheft-body {
    padding: 20px;
    overflow: hidden;
}

.day-entry {
    display: grid;
    grid-template-columns: 100px minmax(0, 1fr) minmax(0, 180px) 130px;
    gap: 10px;
    padding: 15px 0;
    border-bottom: 1px solid #eee;
    align-items: start;
}

.day-entry:last-child {
    border-bottom: none;
}

.day-entry > div {
    min-width: 0;
    overflow: hidden;
}

.day-name {
    font-weight: 600;
    padding-top: 8px;
    font-size: 0.9rem;
}

.day-date {
    font-size: 0.8rem;
    color: #666;
}

.day-entry textarea.form-control {
    min-height: 70px;
    resize: vertical;
    font-size: 0.9rem;
    width: 100%;
    box-sizing: border-box;
}

.time-inputs {
    display: flex;
    gap: 3px;
    align-items: center;
    flex-wrap: nowrap;
    justify-content: flex-start;
}

.time-inputs input.form-control {
    width: 45px !important;
    min-width: 45px !important;
    max-width: 45px !important;
    text-align: center;
    padding: 8px 2px;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.time-inputs span {
    font-size: 0.85rem;
    white-space: nowrap;
    flex-shrink: 0;
}

.berichtsheft-footer {
    padding: 20px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8f9fa;
    flex-wrap: wrap;
    gap: 15px;
}

.total-time {
    font-size: 1.1rem;
}

.total-time strong {
    color: var(--secondary-color);
}

/* Responsive Berichtsheft */
@media (max-width: 1000px) {
    .day-entry {
        grid-template-columns: 90px minmax(0, 1fr) minmax(0, 150px) 120px;
        gap: 8px;
    }
}

@media (max-width: 850px) {
    .day-entry {
        grid-template-columns: 85px minmax(0, 1fr) minmax(0, 130px) 115px;
        gap: 6px;
    }
    
    .time-inputs input.form-control {
        width: 40px !important;
        min-width: 40px !important;
        max-width: 40px !important;
        padding: 6px 2px;
    }
}

@media (max-width: 768px) {
    .day-entry {
        grid-template-columns: 1fr;
        gap: 10px;
        padding: 15px;
        background: #fafafa;
        margin-bottom: 10px;
        border-radius: 8px;
        border: 1px solid #eee;
    }
    
    .day-entry > div {
        overflow: visible;
    }
    
    .day-name {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0;
        font-size: 1rem;
        border-bottom: 1px solid #ddd;
        padding-bottom: 10px;
        margin-bottom: 5px;
    }
    
    .day-date {
        font-size: 0.85rem;
    }
    
    .day-entry > div {
        width: 100%;
    }
    
    .day-entry > div[data-label]::before {
        content: attr(data-label);
        display: block;
        font-weight: 600;
        font-size: 0.85rem;
        color: #555;
        margin-bottom: 5px;
    }
    
    .time-inputs {
        justify-content: flex-start;
    }
    
    .time-inputs input.form-control {
        width: 55px !important;
        min-width: 55px !important;
        max-width: 55px !important;
    }
    
    .berichtsheft-footer {
        flex-direction: column;
        align-items: stretch;
    }
    
    .berichtsheft-footer .actions {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .berichtsheft-header {
        grid-template-columns: 1fr;
    }
    
    .berichtsheft-body {
        padding: 10px;
    }
    
    .day-entry {
        padding: 12px;
    }
}

/* Responsive Berichtsheft */
@media (max-width: 900px) {
    .day-entry {
        grid-template-columns: 90px 1fr 150px 110px;
        gap: 8px;
    }
    
    .time-inputs input {
        width: 45px !important;
        min-width: 45px;
    }
}

@media (max-width: 768px) {
    .day-entry {
        grid-template-columns: 1fr;
        gap: 10px;
        padding: 15px;
        background: #fafafa;
        margin-bottom: 10px;
        border-radius: 8px;
        border: 1px solid #eee;
    }
    
    .day-name {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0;
        font-size: 1rem;
        border-bottom: 1px solid #ddd;
        padding-bottom: 10px;
        margin-bottom: 5px;
    }
    
    .day-date {
        font-size: 0.85rem;
    }
    
    .day-entry > div {
        width: 100%;
    }
    
    .day-entry > div::before {
        content: attr(data-label);
        display: block;
        font-weight: 600;
        font-size: 0.85rem;
        color: #555;
        margin-bottom: 5px;
    }
    
    .time-inputs {
        justify-content: flex-start;
    }
    
    .time-inputs input {
        width: 60px !important;
    }
    
    .berichtsheft-footer {
        flex-direction: column;
        align-items: stretch;
    }
    
    .berichtsheft-footer .actions {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .berichtsheft-header {
        grid-template-columns: 1fr;
    }
    
    .berichtsheft-body {
        padding: 10px;
    }
    
    .day-entry {
        padding: 12px;
    }
}

/* Unterschriften */
.signatures {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 20px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

.signature-box {
    text-align: center;
    padding: 15px;
    background: white;
    border-radius: 4px;
    border: 1px solid var(--border-color);
}

.signature-box .sig-label {
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 10px;
}

.signature-box .sig-status {
    font-weight: 600;
}

.signature-box .sig-status.signed {
    color: var(--success-color);
}

.signature-box .sig-status.pending {
    color: var(--warning-color);
}

/* Week Overview */
.week-overview {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 15px;
}

.week-card {
    background: white;
    border-radius: 8px;
    box-shadow: var(--shadow);
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: transform 0.2s;
}

.week-card:hover {
    transform: translateY(-2px);
}

.week-card .week-info h3 {
    margin-bottom: 5px;
}

.week-card .week-info .dates {
    font-size: 0.85rem;
    color: #666;
}

/* Admin Panel */
.admin-actions {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

/* Responsive */
@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
        height: auto;
        padding: 15px;
        gap: 15px;
    }
    
    .main-nav ul {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .user-menu {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .day-entry {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .berichtsheft-footer {
        flex-direction: column;
        gap: 15px;
    }
}

/* Print Styles */
@media print {
    .main-header,
    .main-footer,
    .btn,
    .no-print {
        display: none !important;
    }
    
    .main-content {
        max-width: 100%;
        padding: 0;
    }
    
    .card {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}
.main-footer {
    /* Hintergrund ist bei dir schon blau – falls nicht, hier Beispiel: */
    /* background-color: #004a99; */
    color: #ffffff;
}

.main-footer .footer-container {
    text-align: center;
    font-size: 12px;
}

.main-footer p {
    margin: 2px 0;
    color: #ffffff;
}

.main-footer a {
    color: #ffffff;
    text-decoration: underline;
}

.main-footer a:hover {
    text-decoration: none;
    opacity: 0.85;
}

