/* assets/css/style.css */

/* ===== RESET & BASIS ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

body {
    background: radial-gradient(circle at 100% 0%, #1E1B4B, #0A0F1C);
    min-height: 100vh;
    color: white;
    line-height: 1.5;
    transition: margin-left 0.3s ease;
}

/* ===== SIDEBAR (DESKTOP) ===== */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 240px;
    height: 100vh;
    background: rgba(26, 31, 47, 0.95);
    backdrop-filter: blur(10px);
    border-right: 1px solid rgba(79, 70, 229, 0.2);
    z-index: 100;
    transition: width 0.3s ease;
    overflow-x: hidden;
}

.sidebar.collapsed {
    width: 70px;
}

.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.sidebar-header .logo {
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, #4F46E5, #7C3AED);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    white-space: nowrap;
}

.sidebar.collapsed .sidebar-header .logo {
    display: none;
}

.sidebar-toggle {
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.2s;
}

.sidebar-toggle:hover {
    background: #4F46E5;
    border-color: #4F46E5;
}

.sidebar-nav {
    padding: 1rem 0;
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.8rem 1rem;
    color: #C0C8E0;
    text-decoration: none;
    transition: 0.2s;
    white-space: nowrap;
}

.sidebar-nav a:hover,
.sidebar-nav a.active {
    background: rgba(79, 70, 229, 0.2);
    color: white;
}

.sidebar-nav .icon {
    font-size: 1.3rem;
    min-width: 24px;
    text-align: center;
}

.sidebar.collapsed .sidebar-nav .text {
    display: none;
}

/* ===== MOBILE NAVIGATION (oben) ===== */
.mobile-navbar {
    display: none;
    background: rgba(26, 31, 47, 0.95);
    backdrop-filter: blur(10px);
    padding: 0.8rem 1rem;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(79,70,229,0.2);
    position: sticky;
    top: 0;
    z-index: 90;
}

.hamburger {
    background: none;
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    line-height: 1;
}

.mobile-navbar .logo {
    font-size: 1.5rem;
    background: linear-gradient(135deg, #4F46E5, #7C3AED);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.mobile-user {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.mobile-user .current-time {
    font-size: 0.9rem;
    color: #8A92A8;
}

.mobile-user .avatar {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #4F46E5, #7C3AED);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    color: white;
}

/* ===== MOBILES HAMBURGER-MENÜ (Overlay) ===== */
.mobile-menu {
    position: fixed;
    top: 0;
    left: -280px;
    width: 280px;
    height: 100vh;
    background: rgba(26, 31, 47, 0.98);
    backdrop-filter: blur(10px);
    z-index: 200;
    transition: left 0.3s ease;
    padding: 2rem;
    box-shadow: 2px 0 10px rgba(0,0,0,0.5);
}

.mobile-menu.open {
    left: 0;
}

.close-menu {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
}

.mobile-nav-links {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-top: 3rem;
}

.mobile-nav-links a {
    color: #C0C8E0;
    text-decoration: none;
    font-size: 1.2rem;
    font-weight: 500;
}

.mobile-nav-links a:hover,
.mobile-nav-links a.active {
    color: white;
}

/* ===== HAUPTINHALT ===== */
.main-container {
    margin-left: 240px;
    padding: 2rem;
    transition: margin-left 0.3s ease;
    max-width: 1400px;
}

.sidebar.collapsed + .main-container,
.sidebar.collapsed ~ .main-container {
    margin-left: 70px;
}

/* ===== PAGE HEADER (global) ===== */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.page-header h1 {
    font-size: 2.2rem;
    font-weight: 600;
    background: linear-gradient(135deg, #4F46E5, #7C3AED);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.header-time {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: rgba(26, 31, 47, 0.6);
    padding: 0.5rem 1.5rem;
    border-radius: 50px;
    border: 1px solid rgba(79, 70, 229, 0.3);
}

.current-time {
    font-size: 1.3rem;
    font-weight: 600;
    color: #4F46E5;
}

.current-date {
    color: #8A92A8;
    font-size: 0.95rem;
}

/* ===== SERIE BADGE ===== */
.serie-badge {
    background: rgba(79, 70, 229, 0.2);
    border: 1px solid rgba(79, 70, 229, 0.3);
    color: #4F46E5;
    padding: 0.5rem 1.2rem;
    border-radius: 30px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

/* ===== LEGENDE (global) ===== */
.legend {
    display: flex;
    gap: 2rem;
    justify-content: center;
    padding: 1rem;
    background: rgba(26, 31, 47, 0.4);
    border-radius: 50px;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #8A92A8;
    font-size: 0.9rem;
}

.legend-color {
    width: 20px;
    height: 20px;
    border-radius: 4px;
}

/* ===== POPUP (global, wird in spezifischen CSS erweitert) ===== */
.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.popup-overlay.show {
    display: flex;
}

.popup {
    background: #1A1F2F;
    border-radius: 32px;
    padding: 2.5rem;
    width: 90%;
    max-width: 500px;
    border: 1px solid #4F46E5;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.popup-header h2 {
    font-size: 1.8rem;
    color: white;
}

.close-popup {
    background: none;
    border: none;
    color: #8A92A8;
    font-size: 2rem;
    cursor: pointer;
    transition: color 0.3s ease;
}

.close-popup:hover {
    color: #EF4444;
}

.popup-time {
    text-align: center;
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 2rem;
    color: #4F46E5;
}

.popup-note {
    margin-bottom: 2rem;
}

.popup-note label {
    display: block;
    color: #C0C8E0;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.popup-note input,
.popup-note textarea {
    width: 100%;
    padding: 1rem;
    background: #0A0F1C;
    border: 1px solid #2A2F3F;
    border-radius: 16px;
    color: white;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.popup-note input:focus,
.popup-note textarea:focus {
    outline: none;
    border-color: #4F46E5;
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.2);
}

.popup-buttons {
    display: flex;
    gap: 1rem;
}

.save-btn {
    flex: 2;
    background: linear-gradient(135deg, #4F46E5, #7C3AED);
    border: none;
    color: white;
    padding: 1rem;
    border-radius: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.save-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px -10px #4F46E5;
}

.cancel-btn {
    flex: 1;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    padding: 1rem;
    border-radius: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    text-align: center;
}

.cancel-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* ===== DASHBOARD-KOMPONENTEN ===== */
.welcome-section {
    margin-bottom: 2rem;
}

.welcome-title {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 0.3rem;
}

.welcome-date {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: #8A92A8;
}

.date-badge {
    background: rgba(79, 70, 229, 0.2);
    padding: 0.2rem 1rem;
    border-radius: 30px;
    font-size: 0.9rem;
    color: #4F46E5;
    border: 1px solid rgba(79, 70, 229, 0.3);
}

.status-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

.status-card {
    background: rgba(26, 31, 47, 0.8);
    backdrop-filter: blur(10px);
    border-radius: 24px;
    padding: 1.5rem;
    border: 1px solid rgba(79, 70, 229, 0.2);
    transition: all 0.3s ease;
}

.status-card:hover {
    border-color: #4F46E5;
    box-shadow: 0 20px 40px -15px rgba(79, 70, 229, 0.4);
}

.card-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.card-icon {
    font-size: 2rem;
}

.card-header h3 {
    font-size: 1.2rem;
    color: #E0E8FF;
}

.card-content {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.status-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.status-label {
    color: #8A92A8;
}

.status-value {
    font-weight: 600;
    padding: 0.2rem 0.8rem;
    border-radius: 20px;
    font-size: 0.9rem;
}

.status-value.erledigt {
    background: rgba(16,185,129,0.2);
    color: #10B981;
}

.status-value.offen {
    background: rgba(245,158,11,0.2);
    color: #F59E0B;
}

.status-value.verspaetet {
    background: rgba(239,68,68,0.2);
    color: #EF4444;
}

.status-value.serie {
    background: rgba(79,70,229,0.2);
    color: #4F46E5;
}

.section-title {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: #E0E8FF;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-bottom: 2.5rem;
}

.feature-card {
    background: rgba(26,31,47,0.6);
    border: 1px solid rgba(79,70,229,0.2);
    border-radius: 28px;
    padding: 2rem;
    text-align: center;
    text-decoration: none;
    color: white;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.feature-card:hover {
    transform: scale(1.03);
    border-color: #4F46E5;
    background: rgba(26,31,47,0.8);
    box-shadow: 0 20px 40px rgba(79,70,229,0.3);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 0.5rem;
}

.feature-card h4 {
    font-size: 1.4rem;
    margin-bottom: 1rem;
}

.feature-stats {
    display: flex;
    gap: 2rem;
    margin: 1rem 0;
}

.stat-number {
    font-size: 1.8rem;
    font-weight: 700;
    color: #4F46E5;
}

.stat-label {
    font-size: 0.8rem;
    color: #8A92A8;
}

.feature-badge {
    background: linear-gradient(135deg, #4F46E5, #7C3AED);
    padding: 0.4rem 1.5rem;
    border-radius: 30px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-top: 1rem;
}

.activities-section {
    background: rgba(26,31,47,0.6);
    border-radius: 28px;
    padding: 2rem;
    border: 1px solid rgba(79,70,229,0.2);
}

.activities-section h2 {
    color: #E0E8FF;
    margin-bottom: 1.5rem;
}

.activities-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.activity-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.8rem 0;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.activity-time {
    min-width: 70px;
    color: #4F46E5;
    font-weight: 600;
    font-size: 0.9rem;
}

.activity-icon {
    width: 36px;
    height: 36px;
    background: rgba(79,70,229,0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.activity-text {
    flex: 1;
    color: #E0E8FF;
}

.activity-badge {
    padding: 0.2rem 0.8rem;
    border-radius: 30px;
    font-size: 0.8rem;
}

.badge-success {
    background: rgba(16,185,129,0.2);
    color: #10B981;
    border: 1px solid #10B981;
}

.badge-warning {
    background: rgba(239,68,68,0.2);
    color: #EF4444;
    border: 1px solid #EF4444;
}

/* ===== TABELLEN (Admin) ===== */
.data-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1.5rem;
    background: rgba(26, 31, 47, 0.6);
    border-radius: 28px;
    overflow: hidden;
}

.data-table th {
    background: rgba(0, 0, 0, 0.3);
    color: #8A92A8;
    font-weight: 500;
    font-size: 0.9rem;
    padding: 1rem 0.5rem;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.data-table td {
    padding: 1rem 0.5rem;
    color: #E0E8FF;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.data-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.05);
}

.action-buttons {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.edit-btn, .delete-btn {
    padding: 0.3rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    cursor: pointer;
    border: none;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.edit-btn {
    background: rgba(79, 70, 229, 0.2);
    color: #4F46E5;
    border: 1px solid rgba(79, 70, 229, 0.3);
}

.edit-btn:hover {
    background: #4F46E5;
    color: white;
}

.delete-btn {
    background: rgba(239, 68, 68, 0.2);
    color: #EF4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.delete-btn:hover {
    background: #EF4444;
    color: white;
}

.btn-primary {
    background: linear-gradient(135deg, #EF4444, #F59E0B);
    color: white;
    padding: 0.6rem 1.5rem;
    border-radius: 30px;
    text-decoration: none;
    display: inline-block;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.btn-primary:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 20px -10px #EF4444;
}

.role-badge {
    padding: 0.2rem 0.8rem;
    border-radius: 30px;
    font-size: 0.8rem;
    font-weight: 600;
    display: inline-block;
}

.role-admin {
    background: rgba(239, 68, 68, 0.2);
    color: #EF4444;
    border: 1px solid #EF4444;
}

.role-user {
    background: rgba(79, 70, 229, 0.2);
    color: #4F46E5;
    border: 1px solid #4F46E5;
}

/* ===== FORMULARE (Admin/Profil) ===== */
.profile-form {
    background: rgba(26, 31, 47, 0.6);
    border-radius: 32px;
    padding: 2rem;
    border: 1px solid rgba(239, 68, 68, 0.2);
    max-width: 600px;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    color: #C0C8E0;
    margin-bottom: 0.5rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.8rem 1rem;
    background: #0A0F1C;
    border: 1px solid #2A2F3F;
    border-radius: 16px;
    color: white;
    font-size: 0.95rem;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #EF4444;
}

.form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .sidebar {
        display: none;
    }

    .main-container {
        margin-left: 0 !important;
        padding: 1rem;
    }

    .mobile-navbar {
        display: flex;
    }

    .page-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .header-time {
        width: 100%;
        justify-content: center;
    }

    .status-cards {
        grid-template-columns: 1fr;
    }

    .feature-grid {
        grid-template-columns: 1fr;
    }

    .legend {
        flex-direction: column;
        align-items: center;
        gap: 0.5rem;
    }
}

@media (min-width: 769px) {
    .mobile-navbar,
    .mobile-menu {
        display: none;
    }
}

/* Sidebar Trennlinien und Section-Titel */
.sidebar-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    margin: 1rem 0.5rem;
}

.sidebar-section-title {
    color: #8A92A8;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0.5rem 1rem;
}

/* Mobile Menü */
.mobile-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    margin: 1rem 0;
}

.mobile-section-title {
    color: #8A92A8;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0.5rem 0;
}