/* ============================================================================
   PROJEKTTAGEBUCH - PREMIUM DESIGN MIT GLASS-MORPHISMUS
   ============================================================================ */

/* CSS Variables für konsistente Farben */
:root {
    --primary-gradient: linear-gradient(135deg, #ff6b35, #ff9558);
    --secondary-gradient: linear-gradient(135deg, #ff8552, #ffa070);
    --success-gradient: linear-gradient(135deg, #22c55e, #16a34a);
    --danger-gradient: linear-gradient(135deg, #ef4444, #dc2626);
    --info-gradient: linear-gradient(135deg, #3b82f6, #2563eb);
    --warning-gradient: linear-gradient(135deg, #f59e0b, #d97706);
    --glass-bg: rgba(255, 255, 255, 0.1);
    --glass-border: rgba(255, 255, 255, 0.2);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.2);
    --shadow-xl: 0 24px 64px rgba(0, 0, 0, 0.25);
    --card-bg: #ffffff;
    --card-border: rgba(255, 107, 53, 0.15);
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --accent-color: #ff6b35;
}

/* Body und Grundlayout */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg,
        #f4e4bc 0%,
        #d4a574 25%,
        #b8956a 50%,
        #8b5a3c 75%,
        #5c3317 90%,
        #3d1a00 100%);
    background-repeat: no-repeat;
    background-attachment: fixed;
    background-size: cover;
    color: var(--text-primary);
    min-height: 100vh;
    margin: 0;
    padding: 0;
}

/* Premium Navbar */
.navbar {
    background: var(--glass-bg) !important;
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
    box-shadow: var(--shadow-md);
}

.navbar-brand {
    font-weight: 700;
    color: white !important;
    text-shadow: 0 2px 8px rgba(0,0,0,0.2);
    font-size: 20px;
}

.navbar .btn-light {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #1e293b;
    font-weight: 600;
    border-radius: 12px;
    padding: 8px 16px;
    transition: all 0.3s ease;
}

.navbar .btn-light:hover {
    background: white;
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

/* Container anpassen */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Premium Cards */
.card {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    box-shadow: var(--shadow-md);
    border: 2px solid var(--card-border);
    margin-bottom: 30px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--primary-gradient);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    border-color: var(--accent-color);
}

.card:hover::before {
    opacity: 1;
}

.card-header {
    background: linear-gradient(135deg, #f9fafb 0%, #f3f4f6 100%);
    border-bottom: 2px solid var(--card-border);
    border-radius: 19px 19px 0 0;
    padding: 25px;
    font-weight: 700;
    color: var(--text-primary);
    font-size: 18px;
}

.card-body {
    padding: 25px;
}

/* Premium Form Elements */
.form-label {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 10px;
    font-size: 15px;
}

.form-control {
    padding: 12px 16px;
    border: 2px solid var(--card-border);
    border-radius: 10px;
    font-size: 15px;
    transition: all 0.3s ease;
    background: #ffffff;
    color: var(--text-primary);
}

.form-control:focus {
    outline: none;
    border-color: var(--accent-color);
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.12);
}

.form-control::placeholder {
    color: var(--text-secondary);
    opacity: 0.7;
}

/* Premium Buttons */
.btn-primary {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
    padding: 16px 32px;
    border: none;
    border-radius: 16px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 700;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 8px 24px rgba(59, 130, 246, 0.35);
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s;
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(59, 130, 246, 0.45);
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

/* Premium List Groups */
.list-group-item {
    background: linear-gradient(135deg, #fffbeb 0%, #fef9e6 50%, #fef3c7 100%);
    border: 2px solid rgba(251, 191, 36, 0.3);
    border-radius: 16px !important;
    margin-bottom: 16px;
    padding: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(180, 83, 9, 0.15);
    position: relative;
}

.list-group-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.list-group-item:hover {
    background: linear-gradient(135deg, #fffef7 0%, #fffcf0 50%, #fef9e6 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(180, 83, 9, 0.2);
    border-color: rgba(251, 191, 36, 0.5);
}

.list-group-item:hover::before {
    opacity: 1;
}

/* Entry Card Layout */
.entry-card-container {
    display: flex;
    gap: 0;
}

.entry-icon {
    flex-shrink: 0;
    width: 100px;
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    border-right: 2px solid rgba(251, 191, 36, 0.3);
    position: relative;
}

.entry-icon::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at center, rgba(251, 191, 36, 0.15) 0%, transparent 70%);
}

.entry-icon img {
    width: 60px;
    height: 60px;
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
    position: relative;
    z-index: 1;
}

.entry-content {
    flex: 1;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.entry-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 12px;
}

.entry-date {
    flex: 1;
    min-width: 200px;
}

.entry-date h6 {
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.entry-date .date-icon {
    color: var(--accent-color);
    font-size: 16px;
}

.entry-text {
    color: #4b5563;
    line-height: 1.6;
    margin: 0;
    font-size: 14px;
}

.entry-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    padding-top: 12px;
    margin-top: 8px;
    border-top: 1px solid rgba(251, 191, 36, 0.25);
}

.entry-meta {
    display: flex;
    gap: 8px;
    align-items: center;
}

.entry-badge {
    background: var(--primary-gradient);
    color: white;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 2px 6px rgba(255, 107, 53, 0.3);
}

.entry-actions {
    display: flex;
    gap: 6px;
}

.entry-actions .btn {
    border-radius: 10px;
    padding: 8px 12px;
    font-size: 13px;
    transition: all 0.2s ease;
}

.entry-actions .btn-outline-primary {
    border-color: #3b82f6;
    color: #3b82f6;
    background: white;
}

.entry-actions .btn-outline-primary:hover {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.entry-actions .btn-outline-warning {
    border-color: #3b82f6;
    color: #3b82f6;
    background: white;
}

.entry-actions .btn-outline-warning:hover {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.entry-actions .btn-outline-danger {
    border-color: #ef4444;
    color: #ef4444;
    background: white;
}

.entry-actions .btn-outline-danger:hover {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

/* Responsive Design für Entry Cards */
@media (max-width: 768px) {
    .entry-icon {
        width: 80px;
        padding: 15px;
    }

    .entry-icon img {
        width: 50px;
        height: 50px;
    }

    .entry-content {
        padding: 15px;
    }

    .entry-date h6 {
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .entry-card-container {
        flex-direction: column;
    }

    .entry-icon {
        width: 100%;
        border-right: none;
        border-bottom: 2px solid rgba(251, 191, 36, 0.3);
        padding: 15px;
    }

    .entry-icon img {
        width: 50px;
        height: 50px;
    }
}

/* Premium Alerts */
.alert {
    border-radius: 16px;
    border: none;
    padding: 18px 24px;
    font-weight: 500;
    box-shadow: var(--shadow-sm);
}

.alert-danger {
    background: linear-gradient(135deg, #fef2f2, #fee2e2);
    color: #dc2626;
    border-left: 4px solid #ef4444;
}

.alert-success {
    background: linear-gradient(135deg, #f0fdf4, #dcfce7);
    color: #16a34a;
    border-left: 4px solid #22c55e;
}

.alert-info {
    background: linear-gradient(135deg, #eff6ff, #dbeafe);
    color: #1d4ed8;
    border-left: 4px solid #3b82f6;
}

/* Premium Spinner */
.spinner-border {
    margin: 40px auto;
    display: block;
    width: 3rem;
    height: 3rem;
    border-width: 0.3em;
    color: #3b82f6;
}

/* Text Muted */
.text-muted {
    color: #64748b !important;
    font-size: 13px;
    font-weight: 500;
}

/* Code Elements */
code {
    background: linear-gradient(135deg, #f1f5f9, #e2e8f0);
    padding: 6px 12px;
    border-radius: 8px;
    border: 1px solid #cbd5e1;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    color: #1e293b;
    font-weight: 600;
}

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

.login-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    box-shadow: var(--shadow-xl);
    border: 1px solid var(--glass-border);
    max-width: 500px;
    width: 100%;
}

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

.login-header h2 {
    font-size: 32px;
    font-weight: 800;
    margin: 0;
    text-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.login-body {
    padding: 40px;
}

/* Dashboard Specific */
.dashboard-header {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: var(--shadow-md);
    border: 2px solid var(--card-border);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.dashboard-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--primary-gradient);
}

.dashboard-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
    letter-spacing: -0.3px;
}

.dashboard-nav {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-nav {
    padding: 12px 24px;
    font-size: 15px;
    font-weight: 600;
    border-radius: 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid #e5e7eb;
    background: white;
    color: var(--text-primary);
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
}

.btn-nav::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(59, 130, 246, 0.15), transparent);
    transition: left 0.5s;
}

.btn-nav:hover::before {
    left: 100%;
}

.btn-nav:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: #3b82f6;
}

.btn-nav.active {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
    border-color: #3b82f6;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.35);
}

.btn-nav.active:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(59, 130, 246, 0.45);
}

.section-card {
    animation: fadeInUp 0.6s ease forwards;
}

/* File Upload Styling */
.form-control[type="file"] {
    padding: 12px;
    background: rgba(255, 255, 255, 0.8);
    border: 2px dashed rgba(251, 191, 36, 0.3);
    transition: all 0.3s ease;
}

.form-control[type="file"]:hover {
    border-color: #f59e0b;
    background: rgba(255, 255, 255, 0.95);
}

/* Character Counter */
#charCount {
    font-weight: 600;
    color: #3b82f6;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }

    .card {
        margin-bottom: 20px;
        border-radius: 18px;
        border-width: 2px;
    }

    .card-header {
        padding: 20px;
        border-radius: 16px 16px 0 0;
        font-size: 17px;
    }

    .card-body {
        padding: 20px;
    }

    .login-header {
        padding: 30px 20px;
    }

    .login-header h2 {
        font-size: 24px;
    }

    .login-body {
        padding: 30px 20px;
    }

    .dashboard-header {
        padding: 25px 20px;
        border-radius: 20px;
    }

    .dashboard-title {
        font-size: 26px;
    }

    .dashboard-nav {
        gap: 10px;
    }

    .btn-nav {
        padding: 12px 20px;
        font-size: 15px;
        flex: 1;
        min-width: 150px;
    }

    .btn-primary {
        padding: 14px 24px;
        font-size: 15px;
    }

    .form-control {
        padding: 12px 16px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 10px;
    }

    .card {
        border-radius: 16px;
        border-width: 2px;
    }

    .card-header {
        padding: 15px;
        border-radius: 14px 14px 0 0;
        font-size: 16px;
    }

    .card-body {
        padding: 15px;
    }

    .login-header h2 {
        font-size: 20px;
    }

    .dashboard-header {
        padding: 20px 15px;
    }

    .dashboard-title {
        font-size: 22px;
    }

    .dashboard-nav {
        flex-direction: column;
        gap: 8px;
    }

    .btn-nav {
        width: 100%;
        padding: 12px 16px;
        font-size: 14px;
    }

    .btn-primary {
        padding: 12px 20px;
        font-size: 14px;
    }
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card {
    animation: fadeInUp 0.6s ease forwards;
}

.card:nth-child(1) { animation-delay: 0.1s; }
.card:nth-child(2) { animation-delay: 0.2s; }
.card:nth-child(3) { animation-delay: 0.3s; }

/* Custom Scrollbar */
.list-group::-webkit-scrollbar {
    width: 8px;
}

.list-group::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.list-group::-webkit-scrollbar-thumb {
    background: linear-gradient(to bottom, #c1c1c1, #a1a1a1);
    border-radius: 4px;
}

.list-group::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(to bottom, #a1a1a1, #818181);
}
