/* ==========================================================================
   PROJEKT MANAGER FRONTEND STYLES
   ========================================================================== */

/* Portal Styles */
.projektmanager-portal {
    background: #ffffff;
    border: 1px solid #e1e5e9;
    border-radius: 12px;
    padding: 40px;
    margin: 30px 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.portal-header {
    text-align: center;
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f0f2f5;
}

.portal-header h2 {
    color: #0073aa;
    font-size: 28px;
    font-weight: 700;
    margin: 0 0 10px 0;
    line-height: 1.2;
}

.portal-header p {
    color: #666;
    font-size: 16px;
    margin: 0;
    line-height: 1.5;
}

.portal-content {
    width: 100%;
}

.portal-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    margin: 0;
}

.portal-grid[data-columns="1"] {
    grid-template-columns: 1fr;
}

.portal-grid[data-columns="2"] {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.portal-grid[data-columns="3"] {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.portal-grid[data-columns="4"] {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.portal-card {
    background: #ffffff;
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    padding: 24px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.portal-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
    border-color: #0073aa;
}

.portal-card:focus-within {
    outline: 2px solid #005fcc;
    outline-offset: 2px;
}

.card-icon {
    font-size: 32px;
    margin-bottom: 16px;
    display: block;
    line-height: 1;
}

.portal-card h3 {
    color: #23282d;
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 12px 0;
    line-height: 1.3;
}

.portal-card p {
    color: #666;
    font-size: 14px;
    line-height: 1.5;
    margin: 0 0 16px 0;
}

.card-link {
    display: inline-flex;
    align-items: center;
    background: #0073aa;
    color: #ffffff !important;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
}

.card-link:hover,
.card-link:focus {
    background: #005a87;
    color: #ffffff !important;
    text-decoration: none;
    outline: 2px solid #005fcc;
    outline-offset: 2px;
}

/* Dashboard Widget Styles */
.projektmanager-dashboard-widget {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 20px;
    margin: 20px 0;
}

.projektmanager-dashboard-widget h3 {
    color: #0073aa;
    margin-top: 0;
    margin-bottom: 16px;
    font-size: 18px;
    font-weight: 600;
}

.dashboard-stats {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.stat-item {
    text-align: center;
    min-width: 80px;
}

.stat-number {
    display: block;
    font-size: 24px;
    font-weight: 700;
    color: #0073aa;
    line-height: 1;
}

.stat-label {
    display: block;
    font-size: 12px;
    color: #666;
    margin-top: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Files Widget Styles */
.projektmanager-files-widget {
    background: #ffffff;
    border: 1px solid #e1e5e9;
    border-radius: 6px;
    padding: 20px;
    margin: 20px 0;
}

.projektmanager-files-widget h3 {
    color: #0073aa;
    margin-top: 0;
    margin-bottom: 16px;
    font-size: 18px;
    font-weight: 600;
}

/* Responsive Design */
@media (max-width: 768px) {
    .projektmanager-portal {
        padding: 20px;
        margin: 15px 0;
    }
    
    .portal-header {
        margin-bottom: 24px;
        padding-bottom: 16px;
    }
    
    .portal-header h2 {
        font-size: 24px;
    }
    
    .portal-grid {
        grid-template-columns: 1fr !important;
        gap: 16px;
    }
    
    .portal-card {
        padding: 20px;
    }
    
    .portal-card h3 {
        font-size: 16px;
    }
    
    .dashboard-stats {
        justify-content: center;
        gap: 16px;
    }
}

@media (max-width: 480px) {
    .projektmanager-portal {
        padding: 16px;
        margin: 10px 0;
    }
    
    .portal-header h2 {
        font-size: 20px;
    }
    
    .portal-header p {
        font-size: 14px;
    }
    
    .portal-card {
        padding: 16px;
    }
    
    .card-icon {
        font-size: 28px;
        margin-bottom: 12px;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .projektmanager-portal {
        background: #1a1a1a;
        border-color: #333;
        color: #e0e0e0;
    }
    
    .portal-header h2 {
        color: #4a9eff;
    }
    
    .portal-header p {
        color: #b0b0b0;
    }
    
    .portal-header {
        border-bottom-color: #333;
    }
    
    .portal-card {
        background: #2a2a2a;
        border-color: #444;
        color: #e0e0e0;
    }
    
    .portal-card:hover {
        border-color: #4a9eff;
    }
    
    .portal-card h3 {
        color: #ffffff;
    }
    
    .portal-card p {
        color: #b0b0b0;
    }
    
    .projektmanager-dashboard-widget {
        background: #2a2a2a;
        border-color: #444;
        color: #e0e0e0;
    }
    
    .projektmanager-dashboard-widget h3 {
        color: #4a9eff;
    }
    
    .stat-number {
        color: #4a9eff;
    }
    
    .stat-label {
        color: #b0b0b0;
    }
    
    .projektmanager-files-widget {
        background: #2a2a2a;
        border-color: #444;
        color: #e0e0e0;
    }
    
    .projektmanager-files-widget h3 {
        color: #4a9eff;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .projektmanager-portal {
        border-width: 2px;
    }
    
    .portal-card {
        border-width: 2px;
    }
    
    .card-link {
        border: 2px solid transparent;
    }
    
    .card-link:hover,
    .card-link:focus {
        border-color: #ffffff;
    }
}

/* Print Styles */
@media print {
    .projektmanager-portal {
        box-shadow: none;
        border: 1px solid #000;
    }
    
    .portal-card {
        box-shadow: none;
        break-inside: avoid;
    }
    
    .card-link {
        background: transparent !important;
        color: #000 !important;
        border: 1px solid #000;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .portal-card {
        transition: none;
    }
    
    .portal-card:hover {
        transform: none;
    }
    
    .card-link {
        transition: none;
    }
}
