/* =====================================================
   Berichtsheft Server - Stylesheet
   BBW Education
   ===================================================== */

:root {
    --primary: #1e3c72;
    --primary-light: #2a5298;
    --secondary: #6c757d;
    --success: #28a745;
    --warning: #ffc107;
    --danger: #dc3545;
    --info: #17a2b8;
    --light: #f8f9fa;
    --dark: #343a40;
    --white: #ffffff;
    --font-size-base: 16px;
    --font-size-lg: 18px;
    --font-size-sm: 14px;
    --border-radius: 8px;
    --shadow: 0 4px 15px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 30px rgba(0,0,0,0.15);
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: var(--font-size-base);
    line-height: 1.6;
    color: var(--dark);
    background-color: #f0f2f5;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    margin-bottom: 1rem;
    font-weight: 600;
    color: var(--primary);
}

h1 { font-size: 2rem; }
h2 { font-size: 1.75rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }

a {
    color: var(--primary);
    text-decoration: none;
}

a:hover {
    color: var(--primary-light);
    text-decoration: underline;
}

/* Layout */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

.container-fluid {
    width: 100%;
    padding: 0 20px;
}

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

.card-header {
    background: var(--primary);
    color: var(--white);
    padding: 20px 25px;
    font-size: var(--font-size-lg);
    font-weight: 600;
}

.card-body {
    padding: 25px;
}

.card-footer {
    background: var(--light);
    padding: 15px 25px;
    border-top: 1px solid #e9ecef;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 24px;
    font-size: var(--font-size-base);
    font-weight: 500;
    text-align: center;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
    text-decoration: none;
}

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

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

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

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

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

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

.btn-sm {
    padding: 8px 16px;
    font-size: var(--font-size-sm);
}

.btn-lg {
    padding: 16px 32px;
    font-size: var(--font-size-lg);
}

.btn-block {
    display: block;
    width: 100%;
}

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

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--dark);
    font-size: var(--font-size-base);
}

.form-control {
    width: 100%;
    padding: 14px 16px;
    font-size: var(--font-size-base);
    border: 2px solid #e1e5eb;
    border-radius: var(--border-radius);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(30, 60, 114, 0.1);
}

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

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

select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23343a40' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 40px;
}

/* Tables */
.table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
    font-size: var(--font-size-base);
}

.table th,
.table td {
    padding: 15px 20px;
    text-align: left;
    border-bottom: 1px solid #e9ecef;
}

.table th {
    background: var(--light);
    font-weight: 600;
    color: var(--primary);
    font-size: var(--font-size-base);
}

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

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

/* Badges */
.badge {
    display: inline-block;
    padding: 6px 12px;
    font-size: var(--font-size-sm);
    font-weight: 600;
    border-radius: 20px;
}

.badge-primary { background: var(--primary); color: var(--white); }
.badge-success { background: var(--success); color: var(--white); }
.badge-warning { background: var(--warning); color: var(--dark); }
.badge-danger { background: var(--danger); color: var(--white); }
.badge-secondary { background: var(--secondary); color: var(--white); }
.badge-info { background: var(--info); color: var(--white); }

/* Alerts */
.alert {
    padding: 18px 24px;
    border-radius: var(--border-radius);
    margin-bottom: 20px;
    font-size: var(--font-size-base);
}

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

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

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

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

/* Navigation */
.navbar {
    background: var(--primary);
    padding: 0;
    box-shadow: var(--shadow);
}

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

.navbar-brand {
    color: var(--white);
    font-size: 1.4rem;
    font-weight: 700;
    padding: 20px 0;
    text-decoration: none;
}

.navbar-brand:hover {
    color: var(--white);
    text-decoration: none;
}

.navbar-nav {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    align-items: center;
}

.navbar-nav li {
    margin-left: 5px;
}

.navbar-nav a {
    color: rgba(255,255,255,0.85);
    padding: 20px 18px;
    display: block;
    transition: all 0.3s ease;
    font-size: var(--font-size-base);
}

.navbar-nav a:hover,
.navbar-nav a.active {
    color: var(--white);
    background: rgba(255,255,255,0.1);
    text-decoration: none;
}

.navbar-user {
    color: var(--white);
    padding: 20px;
    font-size: var(--font-size-sm);
}

/* Sidebar */
.layout-with-sidebar {
    display: flex;
    min-height: calc(100vh - 70px);
}

.sidebar {
    width: 280px;
    background: var(--white);
    box-shadow: var(--shadow);
    padding: 25px 0;
}

.sidebar-nav {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-nav a {
    display: block;
    padding: 15px 30px;
    color: var(--dark);
    transition: all 0.3s ease;
    font-size: var(--font-size-base);
    border-left: 4px solid transparent;
}

.sidebar-nav a:hover,
.sidebar-nav a.active {
    background: var(--light);
    color: var(--primary);
    border-left-color: var(--primary);
    text-decoration: none;
}

.sidebar-section {
    padding: 15px 30px;
    font-size: var(--font-size-sm);
    color: var(--secondary);
    text-transform: uppercase;
    font-weight: 600;
    margin-top: 10px;
}

.main-content {
    flex: 1;
    padding: 30px;
}

/* Login Page */
.login-page {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    padding: 20px;
}

.login-card {
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 450px;
    overflow: hidden;
}

.login-header {
    background: var(--primary);
    color: var(--white);
    padding: 40px;
    text-align: center;
}

.login-header h1 {
    color: var(--white);
    margin-bottom: 10px;
    font-size: 1.8rem;
}

.login-header p {
    opacity: 0.9;
    font-size: var(--font-size-base);
}

.login-body {
    padding: 40px;
}

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

.berichtsheft-header {
    background: var(--primary);
    color: var(--white);
    padding: 25px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.berichtsheft-header-item label {
    display: block;
    font-size: var(--font-size-sm);
    opacity: 0.9;
    margin-bottom: 5px;
}

.berichtsheft-header-item span {
    font-size: var(--font-size-lg);
    font-weight: 600;
}

.berichtsheft-body {
    padding: 25px;
}

.day-entry {
    border: 2px solid #e9ecef;
    border-radius: var(--border-radius);
    margin-bottom: 20px;
    overflow: hidden;
}

.day-entry-header {
    background: var(--light);
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    font-size: var(--font-size-base);
}

.day-entry-body {
    padding: 20px;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 20px;
}

.day-entry-body textarea {
    min-height: 100px;
}

.time-input {
    display: flex;
    align-items: center;
    gap: 10px;
}

.time-input input {
    width: 80px;
    text-align: center;
}

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

.stat-card {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 30px;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 20px;
}

.stat-icon {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 2rem;
}

.stat-icon.primary { background: rgba(30, 60, 114, 0.1); color: var(--primary); }
.stat-icon.success { background: rgba(40, 167, 69, 0.1); color: var(--success); }
.stat-icon.warning { background: rgba(255, 193, 7, 0.1); color: var(--warning); }
.stat-icon.danger { background: rgba(220, 53, 69, 0.1); color: var(--danger); }

.stat-content h3 {
    font-size: 2rem;
    margin-bottom: 5px;
    color: var(--dark);
}

.stat-content p {
    color: var(--secondary);
    font-size: var(--font-size-base);
    margin: 0;
}

/* Utilities */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-muted { color: var(--secondary); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-warning { color: var(--warning); }

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.p-2 { padding: 1rem; }
.p-3 { padding: 1.5rem; }
.p-4 { padding: 2rem; }

.d-flex { display: flex; }
.justify-between { justify-content: space-between; }
.align-center { align-items: center; }
.gap-2 { gap: 1rem; }

/* Footer */
.footer {
    margin-top: 2rem;
    padding: 1.5rem 0;
    border-top: 1px solid #dee2e6;
    background-color: #f8f9fa;
    text-align: center;
}

.footer-inner {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
}

.footer-inner a {
    color: #6c757d;
    text-decoration: none;
}

.footer-inner a:hover {
    color: #343a40;
    text-decoration: underline;
}

/* Responsive */
@media (max-width: 992px) {
    .layout-with-sidebar {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
    }
    
    .sidebar-nav a {
        padding: 12px 20px;
    }
}

@media (max-width: 768px) {
    :root {
        --font-size-base: 15px;
    }
    
    .navbar-inner {
        flex-direction: column;
        padding: 10px 20px;
    }
    
    .navbar-nav {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .berichtsheft-header {
        grid-template-columns: 1fr;
    }
    
    .day-entry-body {
        grid-template-columns: 1fr;
    }
    
    .table th, .table td {
        padding: 10px 12px;
    }
}
