/* Reset und Basis-Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: url('data:image/svg+xml;utf8,<svg width="100%25" height="100%25" viewBox="0 0 1600 900" fill="none" xmlns="http://www.w3.org/2000/svg" opacity="0.25"><rect width="1600" height="900" fill="%23f5f7fa"/><path d="M100 800 Q400 600 800 700 T1500 600" stroke="%23999" stroke-width="10" fill="none" stroke-linecap="round" stroke-dasharray="30 20"/><path d="M200 600 Q600 400 1200 500 T1500 300" stroke="%23bbb" stroke-width="8" fill="none" stroke-linecap="round" stroke-dasharray="24 18"/><circle cx="350" cy="750" r="22" fill="%23ffe066" stroke="%23f9c74f" stroke-width="4"/><!-- Kind 1 --><circle cx="340" cy="730" r="10" fill="%23f94144"/><rect x="335" y="740" width="10" height="22" rx="5" fill="%234f8cff"/><line x1="340" y1="762" x2="330" y2="775" stroke="%234f8cff" stroke-width="3"/><line x1="345" y1="762" x2="355" y2="775" stroke="%234f8cff" stroke-width="3"/><!-- Ball --><circle cx="370" cy="770" r="7" fill="%23f3722c"/><!-- Kind 2 --><circle cx="900" cy="680" r="10" fill="%23f8961e"/><rect x="895" y="690" width="10" height="22" rx="5" fill="%234caf50"/><line x1="900" y1="712" x2="890" y2="725" stroke="%234caf50" stroke-width="3"/><line x1="905" y1="712" x2="915" y2="725" stroke="%234caf50" stroke-width="3"/><!-- Baum --><ellipse cx="1200" cy="480" rx="18" ry="28" fill="%234caf50"/><rect x="1192" y="508" width="16" height="22" rx="5" fill="%238d5524"/><!-- Sonne --><circle cx="1400" cy="120" r="38" fill="%23ffe066" stroke="%23f9c74f" stroke-width="6"/><g><!-- Strichmännchen Kind 3 --><circle cx="1300" cy="580" r="10" fill="%234f8cff"/><line x1="1300" y1="590" x2="1300" y2="610" stroke="%234f8cff" stroke-width="4"/><line x1="1300" y1="600" x2="1290" y2="620" stroke="%234f8cff" stroke-width="3"/><line x1="1300" y1="600" x2="1310" y2="620" stroke="%234f8cff" stroke-width="3"/><line x1="1300" y1="610" x2="1290" y2="630" stroke="%234f8cff" stroke-width="3"/><line x1="1300" y1="610" x2="1310" y2="630" stroke="%234f8cff" stroke-width="3"/></g></svg>');
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
    min-height: 100vh;
    color: #333;
}

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

/* Login Styles */
.login-card {
    background: white;
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    text-align: center;
    max-width: 400px;
    margin: 100px auto;
}

.login-card h1 {
    color: #667eea;
    margin-bottom: 8px;
    font-size: 2rem;
}

.subtitle {
    color: #666;
    margin-bottom: 30px;
    font-size: 1.1rem;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.login-form input {
    padding: 12px 16px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.login-form input:focus {
    outline: none;
    border-color: #667eea;
}

/* Button Styles */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
}

.btn-primary {
    background: #667eea;
    color: white;
}

.btn-primary:hover {
    background: #5a6fd8;
    transform: translateY(-2px);
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
}

.btn-success {
    background: #28a745;
    color: white;
}

.btn-success:hover {
    background: #218838;
}

.btn-danger {
    background: #dc3545;
    color: white;
}

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

/* Error Message */
.error-message {
    background: #f8d7da;
    color: #721c24;
    padding: 12px;
    border-radius: 8px;
    margin-top: 16px;
    border: 1px solid #f5c6cb;
}

/* Dashboard Styles */
.dashboard-header {
    background: white;
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.dashboard-header h1 {
    color: #667eea;
    font-size: 1.8rem;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

#user-info {
    color: #666;
    font-weight: 500;
}

/* Statistics */
.stats-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.stat-card {
    background: white;
    border-radius: 12px;
    padding: 24px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s;
}

.stat-card:hover {
    transform: translateY(-4px);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: bold;
    color: #667eea;
    margin-bottom: 8px;
}

.stat-label {
    color: #666;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Activities Section */
.activities-section {
    background: white;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.activities-section h2 {
    color: #333;
    margin-bottom: 20px;
    font-size: 1.5rem;
}

.activities-grid {
    display: grid;
    gap: 16px;
}

.activity-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid #e1e5e9;
}

.activity-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.activity-content {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
}

.activity-image-preview {
    flex-shrink: 0;
    width: 120px;
    height: 90px;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    background: #f8f9fa;
    border: 1px solid #e1e5e9;
}

.preview-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.activity-image-preview:hover .preview-image {
    transform: scale(1.05);
}

.image-count {
    position: absolute;
    top: 4px;
    right: 4px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 2px 6px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
}

.no-image {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6c757d;
    font-size: 14px;
    text-align: center;
}

.activity-info {
    flex: 1;
    min-width: 0;
}

.activity-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
}

.activity-name {
    font-size: 18px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 4px;
    line-height: 1.3;
}

.activity-category {
    font-size: 12px;
    color: #6c757d;
    background: #f8f9fa;
    padding: 2px 8px;
    border-radius: 12px;
    display: inline-block;
}

.activity-description {
    color: #495057;
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.activity-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 12px;
    color: #6c757d;
}

.activity-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.activity-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

/* Loading State */
.loading {
    text-align: center;
    padding: 40px;
    color: #666;
    font-style: italic;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    justify-content: center;
    align-items: center;
}

.modal-content {
    background: white;
    border-radius: 12px;
    padding: 30px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

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

.modal-title {
    font-size: 24px;
    font-weight: 600;
    color: #2c3e50;
    margin: 0;
}

.close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #6c757d;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.close:hover {
    background: #f8f9fa;
    color: #495057;
}

/* Activity Detail Styles */
.activity-detail {
    margin-bottom: 20px;
}

.detail-row {
    display: flex;
    margin-bottom: 16px;
    align-items: flex-start;
}

.detail-label {
    font-weight: 600;
    color: #495057;
    min-width: 120px;
    margin-right: 16px;
    font-size: 14px;
}

.detail-value {
    flex: 1;
    color: #2c3e50;
    font-size: 14px;
    line-height: 1.5;
}

/* Image Gallery Styles */
.detail-images {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
    margin-top: 8px;
}

.detail-image {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.detail-image:hover {
    transform: scale(1.05);
    border-color: #667eea;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

/* Modal Actions */
.modal-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e1e5e9;
}

.modal-actions .btn {
    min-width: 100px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 16px;
    }
    
    .dashboard-header {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }
    
    .stats-section {
        grid-template-columns: 1fr;
    }
    
    .activity-header {
        flex-direction: column;
        gap: 8px;
    }
    
    .activity-actions {
        flex-direction: column;
    }
    
    .modal-content {
        width: 95%;
        margin: 20px;
    }
    
    .modal-footer {
        flex-direction: column;
    }
    
    .detail-row {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    
    /* Navigation Buttons vertikal auf Mobile */
    .admin-navigation {
        flex-direction: column;
        align-items: stretch;
    }
    
    .admin-nav-btn {
        width: 100%;
        min-width: unset;
    }
}

/* Platz für Logo oben links */
.admin-logo {
    position: absolute;
    top: 24px;
    left: 32px;
    z-index: 10;
    height: 56px;
    width: auto;
    display: block;
}

@media (max-width: 600px) {
    .admin-logo {
        top: 12px;
        left: 12px;
        height: 38px;
    }
}

/* Admin Navigation - exakt wie bestehende Buttons */
.admin-navigation {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
    justify-content: center;
    padding: 20px 0;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    margin: 20px 0;
}

.admin-nav-btn {
    padding: 16px 28px;
    border: 2px solid transparent;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    -webkit-transition: all 0.3s;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    -webkit-appearance: none;
    appearance: none;
    outline: none;
    min-width: 200px;
    text-align: center;
    -webkit-box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.admin-nav-btn:hover {
    background: linear-gradient(135deg, #5a6fd8 0%, #6a4c93 100%);
    -webkit-transform: translateY(-3px);
    transform: translateY(-3px);
    -webkit-box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.admin-nav-btn.active {
    background: linear-gradient(135deg, #4c63d2 0%, #5a4fcf 100%);
    -webkit-transform: translateY(-2px);
    transform: translateY(-2px);
    -webkit-box-shadow: 0 8px 25px rgba(102, 126, 234, 0.5);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.5);
    border-color: rgba(255, 255, 255, 0.2);
}

/* Tab Content - Safari-kompatibel */
.tab-content {
    -webkit-animation: fadeIn 0.3s ease-in;
    animation: fadeIn 0.3s ease-in;
}

@-webkit-keyframes fadeIn {
    from { opacity: 0; -webkit-transform: translateY(10px); transform: translateY(10px); }
    to { opacity: 1; -webkit-transform: translateY(0); transform: translateY(0); }
}

@keyframes fadeIn {
    from { opacity: 0; -webkit-transform: translateY(10px); transform: translateY(10px); }
    to { opacity: 1; -webkit-transform: translateY(0); transform: translateY(0); }
}

/* Job Monitoring Styles - im bestehenden Design */
.job-card {
    background: white;
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    border: 1px solid #e1e5e9;
}

.job-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.job-status {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.status-active {
    background: #d4edda;
    color: #155724;
}

.status-inactive {
    background: #f8d7da;
    color: #721c24;
}

.job-schedule {
    font-family: 'Monaco', monospace;
    background: #f8f9fa;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 14px;
}

.points-stats {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: horizontal;
    -webkit-box-direction: normal;
    -ms-flex-direction: row;
    flex-direction: row;
    -ms-flex-wrap: wrap;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 24px;
}

/* Fallback für ältere Safari-Versionen */
@supports not (gap: 16px) {
    .points-stats {
        margin: -8px -8px 16px -8px;
    }
    
    .points-stats .stat-box {
        margin: 8px;
        -webkit-box-flex: 1;
        -ms-flex: 1 1 200px;
        flex: 1 1 200px;
        min-width: 200px;
    }
}

/* Moderne Browser mit Grid */
@supports (display: grid) {
    .points-stats {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 16px;
        margin-bottom: 24px;
    }
}

.stat-box {
    background: -webkit-linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    border-radius: 16px;
    text-align: center;
    -webkit-box-shadow: 0 8px 25px rgba(102, 126, 234, 0.2);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.2);
}

.stat-box .stat-number {
    font-size: 2.5em;
    font-weight: bold;
    margin-bottom: 8px;
}

.stat-box .stat-label {
    font-size: 0.9em;
    opacity: 0.9;
}

.next-execution {
    background: #e3f2fd;
    border: 1px solid #bbdefb;
    border-radius: 8px;
    padding: 12px;
    margin-top: 12px;
}

.refresh-btn {
    background: #007bff;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.3s ease;
}

.refresh-btn:hover {
    background: #0056b3;
}

.execution-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #eee;
}

.execution-item:last-child {
    border-bottom: none;
}

.execution-status {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
}

.exec-success {
    background: #d4edda;
    color: #155724;
}

.exec-failed {
    background: #f8d7da;
    color: #721c24;
}

.rank-progress {
    width: 100px;
    height: 8px;
    background: #eee;
    border-radius: 4px;
    overflow: hidden;
}

.rank-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #4CAF50, #2196F3, #9C27B0, #FF9800, #F44336);
    transition: width 0.3s ease;
} 

/* Companies Management Styles */
.companies-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.companies-filters {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    align-items: center;
}

.companies-filters select,
.companies-filters input {
    padding: 10px 15px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 14px;
    background: white;
}

.companies-filters input {
    flex: 1;
    max-width: 300px;
}

.companies-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.company-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    border-left: 4px solid #e1e5e9;
    transition: all 0.3s ease;
}

.company-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.company-card.pending {
    border-left-color: #ffc107;
}

.company-card.approved {
    border-left-color: #28a745;
}

.company-card.rejected {
    border-left-color: #dc3545;
}

.company-card.suspended {
    border-left-color: #6c757d;
}

.company-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
}

.company-info h3 {
    color: #333;
    margin-bottom: 5px;
    font-size: 1.2rem;
}

.company-meta {
    display: flex;
    gap: 20px;
    margin-bottom: 10px;
    font-size: 0.9rem;
    color: #666;
}

.company-status {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
}

.status-pending {
    background: #fff3cd;
    color: #856404;
}

.status-approved {
    background: #d4edda;
    color: #155724;
}

.status-rejected {
    background: #f8d7da;
    color: #721c24;
}

.status-suspended {
    background: #e2e3e5;
    color: #383d41;
}

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

.company-actions button {
    padding: 6px 12px;
    border: none;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-approve {
    background: #28a745;
    color: white;
}

.btn-approve:hover {
    background: #218838;
}

.btn-reject {
    background: #dc3545;
    color: white;
}

.btn-reject:hover {
    background: #c82333;
}

.btn-suspend {
    background: #6c757d;
    color: white;
}

.btn-suspend:hover {
    background: #5a6268;
}

.btn-view {
    background: #007bff;
    color: white;
}

.btn-view:hover {
    background: #0056b3;
}

.company-details {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #e1e5e9;
    font-size: 0.9rem;
    color: #666;
}

.company-details strong {
    color: #333;
}

.no-companies {
    text-align: center;
    padding: 40px;
    color: #666;
    font-style: italic;
} 