/**
 * LandingPage CSS - Dashboard Styles
 * Extrahiert aus LandingPage.html für bessere Wartbarkeit
 */

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 10px;
}

/* ===== NAVBAR ===== */
.navbar {
    background: white;
    padding: 12px 20px;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    animation: slideDown 0.5s ease-out;
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

.navbar-brand {
    font-size: 24px;
    font-weight: bold;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

.user-email {
    font-size: 14px;
    color: #666;
    font-weight: 500;
}

.btn-logout {
    padding: 8px 20px;
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-logout:hover {
    background: #c82333;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
}

/* ===== CONTAINER ===== */
.container {
    max-width: 100%;
    margin: 0 auto;
    padding: 0 10px;
}

/* ===== WELCOME CARD ===== */
.welcome-card {
    background: white;
    padding: 25px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    margin-bottom: 20px;
    text-align: center;
    animation: fadeIn 0.6s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

.welcome-card h1 {
    font-size: 36px;
    margin-bottom: 10px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.welcome-card p {
    font-size: 18px;
    color: #666;
    margin-bottom: 20px;
}

.welcome-card .user-greeting {
    font-size: 20px;
    color: #333;
    font-weight: 600;
    margin-top: 10px;
}

/* ===== FEATURE CARDS ===== */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin-top: 30px;
}

.feature-card {
    background: white;
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    display: block;
    animation: fadeInUp 0.6s ease-out forwards;
    opacity: 0;
    position: relative;
}

.feature-card.locked {
    opacity: 0.6;
    cursor: not-allowed;
}

.feature-card.locked:hover {
    transform: none;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.lock-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 48px;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 10;
}

.feature-card.locked .lock-overlay {
    opacity: 1;
}

.feature-card.locked::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.65);
    border-radius: 20px;
    z-index: 5;
}

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

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

.feature-card:hover {
    transform: translateY(-15px) scale(1.03);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.35);
}

.feature-icon {
    font-size: 50px;
    margin-bottom: 15px;
}

.feature-card h3 {
    font-size: 22px;
    margin-bottom: 10px;
    color: #333;
}

.feature-card p {
    font-size: 14px;
    color: #666;
    line-height: 1.6;
}

/* ===== CARD VARIANTS ===== */
.card-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}
.card-primary h3, .card-primary p { color: white; }

.card-success {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    color: white;
}
.card-success h3, .card-success p { color: white; }

.card-info {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
}
.card-info h3, .card-info p { color: white; }

.card-warning {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
    color: white;
}
.card-warning h3, .card-warning p { color: white; }

/* ===== ADMIN CARDS ===== */
.cards-grid-admin {
    display: grid;
    gap: 25px;
    margin-top: 30px;
}

.feature-card-full-width {
    background: linear-gradient(135deg, #9b9b9b 0%, #d4d4d4 100%);
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    text-decoration: none;
    color: white;
    display: block;
    animation: fadeInUp 0.6s ease-out forwards;
    opacity: 0;
    position: relative;
}

.feature-card-full-width h3,
.feature-card-full-width p { color: white; }

.feature-card-full-width:hover {
    transform: translateY(-15px) scale(1.03);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.4);
}

.feature-card-full-width.locked {
    opacity: 0.6;
    cursor: not-allowed;
}

.feature-card-full-width.locked:hover {
    transform: none;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.feature-card-full-width.locked::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.65);
    border-radius: 20px;
    z-index: 5;
}

.feature-card-full-width.locked .lock-overlay { opacity: 1; }

/* Gear Icon Animation */
.gear-icon {
    font-size: 50px;
    margin-bottom: 15px;
    display: inline-block;
    animation: spinSlow 20s linear infinite;
}

@keyframes spinSlow {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.feature-card-full-width:hover .gear-icon {
    animation: spinMedium 12s linear infinite;
}

@keyframes spinMedium {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* ===== STATS BAR ===== */
.stats-bar {
    display: flex;
    justify-content: space-around;
    background: white;
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    margin-top: 30px;
}

.stat-item { text-align: center; }

.stat-value {
    font-size: 32px;
    font-weight: bold;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    font-size: 14px;
    color: #666;
    margin-top: 5px;
}

/* ===== MODAL ===== */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0; top: 0;
    width: 100%; height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    animation: fadeIn 0.3s ease;
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    border-radius: 20px;
    padding: 35px;
    max-width: 1100px;
    width: 95%;
    max-height: 85vh;
    overflow-y: auto;
    position: relative;
    animation: slideUp 0.3s ease;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    font-size: 15px;
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(50px); }
    to { opacity: 1; transform: translateY(0); }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e1e8ed;
}

.modal-header h2 {
    font-size: 26px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.close-modal {
    background: none;
    border: none;
    font-size: 30px;
    cursor: pointer;
    color: #666;
    transition: color 0.3s;
    line-height: 1;
}

.close-modal:hover { color: #dc3545; }

/* ===== ADMIN TABS ===== */
.admin-tabs {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
    border-bottom: 2px solid #e1e8ed;
    padding-bottom: 0;
    overflow-x: auto;
}

.admin-tab {
    padding: 14px 28px;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    color: #999;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.admin-tab:hover { color: #667eea; }

.admin-tab.active {
    color: #667eea;
    border-bottom-color: #667eea;
}

.admin-tab.disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.admin-tab.disabled:hover { color: #999; }

.tab-content { display: none; }

.tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

/* ===== TEXTBAUSTEIN LIST ===== */
.textbaustein-list {
    display: grid;
    gap: 15px;
}

.textbaustein-item {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.textbaustein-item:hover {
    background: white;
    border-color: #667eea;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.1);
    transform: translateX(5px);
}

.textbaustein-info { flex: 1; }

.textbaustein-info h3 {
    font-size: 18px;
    color: #333;
    margin-bottom: 5px;
}

.textbaustein-info .id-badge {
    display: inline-block;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.textbaustein-actions {
    display: flex;
    gap: 10px;
}

.btn-small {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.btn-edit {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-edit:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.btn-history {
    background: #17a2b8;
    color: white;
}

.btn-history:hover {
    background: #138496;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(23, 162, 184, 0.3);
}

/* ===== STATES ===== */
.empty-state {
    text-align: center;
    padding: 40px;
    color: #666;
}

.empty-state-icon {
    font-size: 60px;
    margin-bottom: 15px;
}

.loading-spinner {
    text-align: center;
    padding: 40px;
}

.spinner-large {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ===== MONITORING DASHBOARD ===== */
.stat-card {
    background: white;
    border-radius: 10px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.stat-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.25);
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    flex-shrink: 0;
}

.stat-info { flex: 1; }

.chart-container {
    background: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.chart-container canvas {
    max-height: 250px;
}

/* ===== FOOTER ===== */
footer {
    background: white;
    text-align: center;
    margin-top: 40px;
    padding: 30px 20px;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

footer .footer-links {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
    margin-bottom: 15px;
}

footer a {
    color: #667eea;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.3s ease;
}

footer a:hover {
    color: #764ba2;
    text-decoration: underline;
}

footer .copyright {
    color: #666;
    font-size: 13px;
    margin: 0;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

    .welcome-card h1 { font-size: 28px; }
    .cards-grid { grid-template-columns: 1fr; }
    .stats-bar { flex-direction: column; gap: 20px; }
    
    footer .footer-links {
        flex-direction: column;
        gap: 10px;
    }
}

/* iPhone / Small Mobile */
@media (max-width: 480px) {
    body {
        padding: 8px;
    }
    
    .navbar {
        padding: 10px 15px;
        border-radius: 12px;
    }
    
    .navbar-brand {
        font-size: 20px;
    }
    
    .user-email {
        font-size: 12px;
        max-width: 150px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    
    .btn-logout {
        padding: 6px 14px;
        font-size: 13px;
    }
    
    .welcome-card {
        padding: 20px 15px;
        border-radius: 15px;
    }
    
    .welcome-card h1 {
        font-size: 24px;
    }
    
    .welcome-card p {
        font-size: 14px;
    }
    
    .cards-grid {
        gap: 15px;
        margin-top: 20px;
    }
    
    .feature-card {
        padding: 20px;
        border-radius: 15px;
    }
    
    .feature-icon {
        font-size: 40px;
    }
    
    .feature-card h3 {
        font-size: 18px;
    }
    
    .feature-card p {
        font-size: 13px;
    }
    
    .cards-grid-admin {
        margin-top: 15px;
    }
    
    .feature-card-full-width {
        padding: 20px;
        border-radius: 15px;
    }
    
    .gear-icon {
        font-size: 35px !important;
    }
    
    .stats-bar {
        padding: 15px;
        border-radius: 12px;
        gap: 15px;
    }
    
    .stat-value {
        font-size: 22px;
    }
    
    .stat-label {
        font-size: 12px;
    }
    
    /* Modal für Mobile */
    .modal-content {
        width: 95%;
        max-height: 90vh;
        margin: 5vh auto;
        border-radius: 15px;
    }
    
    .modal-header {
        padding: 15px;
    }
    
    .modal-header h2 {
        font-size: 18px;
    }
    
    .admin-tabs {
        flex-direction: column;
        gap: 8px;
        padding: 10px;
    }
    
    .admin-tab {
        padding: 10px 15px;
        font-size: 13px;
    }
    
    .tab-content {
        padding: 15px;
    }
    
    footer {
        padding: 20px 15px;
        margin-top: 25px;
        border-radius: 12px;
    }
    
    footer a {
        font-size: 13px;
    }
    
    footer .copyright {
        font-size: 11px;
    }
}

/* Extra small devices */
@media (max-width: 360px) {
    .navbar-brand {
        font-size: 18px;
    }
    
    .welcome-card h1 {
        font-size: 20px;
    }
    
    .feature-icon {
        font-size: 35px;
    }
}
