/* Klijent Portal Frontend Styles */

/* Opšti stilovi */
.klijent-portal-clients-list,
.klijent-portal-projects-list {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Klijenti lista */
.client-item {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    margin-bottom: 25px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.client-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.client-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.client-name {
    margin: 0;
    font-size: 1.4em;
    font-weight: 600;
}

.client-projects-count {
    background: rgba(255, 255, 255, 0.2);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.9em;
    font-weight: 500;
}

.client-description {
    padding: 20px 25px;
    border-bottom: 1px solid #f0f0f0;
    color: #555;
    line-height: 1.6;
}

.client-details {
    padding: 20px 25px;
    background: #f8f9fa;
}

.client-email,
.client-phone {
    margin-bottom: 10px;
    display: flex;
    align-items: center;
}

.client-email:last-child,
.client-phone:last-child {
    margin-bottom: 0;
}

.client-email strong,
.client-phone strong {
    min-width: 80px;
    color: #495057;
    font-weight: 600;
}

.client-email a,
.client-phone a {
    color: #007cba;
    text-decoration: none;
    transition: color 0.3s ease;
}

.client-email a:hover,
.client-phone a:hover {
    color: #005a87;
    text-decoration: underline;
}

/* Projekti lista */
.project-item {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    margin-bottom: 25px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-left: 4px solid #007cba;
}

.project-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.project-header {
    background: #f8f9fa;
    padding: 20px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #e9ecef;
}

.project-name {
    margin: 0;
    font-size: 1.3em;
    font-weight: 600;
    color: #333;
}

.project-description {
    padding: 20px 25px;
    border-bottom: 1px solid #f0f0f0;
    color: #555;
    line-height: 1.6;
}

.project-details {
    padding: 20px 25px;
    background: #f8f9fa;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.project-client,
.project-status,
.project-budget,
.project-start-date,
.project-end-date {
    display: flex;
    flex-direction: column;
}

.project-client strong,
.project-status strong,
.project-budget strong,
.project-start-date strong,
.project-end-date strong {
    color: #495057;
    font-weight: 600;
    margin-bottom: 5px;
    font-size: 0.9em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Badge-ovi za prioritet */
.priority-badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8em;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.priority-nisak {
    background: #d4edda;
    color: #155724;
}

.priority-srednji {
    background: #fff3cd;
    color: #856404;
}

.priority-visok {
    background: #f8d7da;
    color: #721c24;
}

.priority-hitno {
    background: #f8d7da;
    color: #721c24;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.7; }
    100% { opacity: 1; }
}

/* Statistike widget */
.klijent-portal-stats-widget {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    padding: 30px;
    margin: 30px 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    text-align: center;
}

.stat-item {
    padding: 20px;
    border-radius: 8px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    transition: transform 0.3s ease;
}

.stat-item:hover {
    transform: translateY(-5px);
}

.stat-number {
    font-size: 2.5em;
    font-weight: 700;
    margin-bottom: 10px;
    display: block;
}

.stat-label {
    font-size: 1em;
    opacity: 0.9;
    font-weight: 500;
}

/* Rokovi projekata */
.klijent-portal-deadlines {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    padding: 25px;
    margin: 30px 0;
}

.klijent-portal-deadlines h3 {
    margin-top: 0;
    color: #333;
    font-size: 1.4em;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 15px;
    margin-bottom: 20px;
}

.deadlines-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.deadline-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #007cba;
    transition: all 0.3s ease;
}

.deadline-item:hover {
    background: white;
    box-shadow: 0 2px 8px rgba(0, 124, 186, 0.1);
}

.deadline-project {
    flex: 1;
}

.deadline-project strong {
    color: #333;
    font-size: 1.1em;
}

.deadline-client {
    color: #6c757d;
    font-size: 0.9em;
    margin-left: 10px;
}

.deadline-date {
    text-align: right;
    color: #495057;
    font-weight: 500;
}

.days-left {
    display: block;
    font-size: 0.8em;
    color: #6c757d;
    margin-top: 5px;
}

/* Responsive dizajn */
@media (max-width: 768px) {
    .klijent-portal-clients-list,
    .klijent-portal-projects-list {
        padding: 15px;
    }
    
    .client-header,
    .project-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .client-projects-count {
        align-self: flex-end;
    }
    
    .project-details {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .klijent-portal-stats-widget {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 20px;
    }
    
    .deadline-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .deadline-date {
        text-align: left;
    }
    
    .stat-number {
        font-size: 2em;
    }
}

@media (max-width: 480px) {
    .client-header,
    .project-header {
        padding: 15px 20px;
    }
    
    .client-description,
    .project-description {
        padding: 15px 20px;
    }
    
    .client-details,
    .project-details {
        padding: 15px 20px;
    }
    
    .client-name {
        font-size: 1.2em;
    }
    
    .project-name {
        font-size: 1.1em;
    }
}

/* Animacije */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.client-item,
.project-item,
.klijent-portal-stats-widget,
.klijent-portal-deadlines {
    animation: fadeInUp 0.6s ease-out;
}

/* Hover efekti */
.client-item:hover .client-header,
.project-item:hover .project-header {
    background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
}

.stat-item:hover {
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

/* Loading stanje */
.klijent-portal-loading {
    text-align: center;
    padding: 60px 20px;
    color: #6c757d;
    font-size: 1.1em;
}

.klijent-portal-loading::after {
    content: '';
    display: block;
    width: 30px;
    height: 30px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #007cba;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 20px auto 0;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Prazno stanje */
.klijent-portal-empty {
    text-align: center;
    padding: 60px 20px;
    color: #6c757d;
}

.klijent-portal-empty::before {
    content: "📋";
    font-size: 3em;
    display: block;
    margin-bottom: 20px;
}

/* Filtri i pretraga */
.klijent-portal-filters {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    padding: 20px;
    margin-bottom: 30px;
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: center;
}

.klijent-portal-filters select,
.klijent-portal-filters input {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 0.9em;
}

.klijent-portal-filters button {
    padding: 8px 16px;
    background: #007cba;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9em;
    transition: background 0.3s ease;
}

.klijent-portal-filters button:hover {
    background: #005a87;
}
