* {
    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: 20px;
}

/* LOGIN STRANICA */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

.login-box {
    background: white;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    max-width: 400px;
    width: 100%;
}

.login-box h1 {
    color: #667eea;
    margin-bottom: 10px;
    font-size: 28px;
    text-align: center;
}

.login-box p {
    color: #666;
    margin-bottom: 30px;
    text-align: center;
}

/* GLAVNA STRANICA */
.header {
    background: white;
    padding: 20px 0;
    border-radius: 10px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header h1 {
    color: #667eea;
    font-size: 28px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-info span {
    color: #333;
}

.user-info strong {
    color: #667eea;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* FORME */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-weight: 500;
}

.form-group input[type="text"],
.form-group input[type="password"],
.form-group input[type="file"],
.form-group input[type="datetime-local"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
}

.form-group small {
    display: block;
    margin-top: 5px;
    color: #666;
    font-size: 12px;
}

.form-group.checkbox {
    display: flex;
    align-items: center;
}

.form-group.checkbox label {
    margin: 0;
    display: flex;
    align-items: center;
    cursor: pointer;
}

.form-group.checkbox input {
    width: auto;
    margin-right: 8px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

/* BUTTONS */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 5px;
    font-size: 14px;
    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: #5568d3;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
}

.btn-danger {
    background: #dc3545;
    color: white;
}

.btn-danger:hover {
    background: #c82333;
}

.btn-small {
    padding: 6px 12px;
    font-size: 12px;
}

/* SEKCIJE */
.upload-section,
.filter-section,
.files-section {
    background: white;
    padding: 30px;
    border-radius: 10px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.upload-section h2,
.files-section h2 {
    color: #667eea;
    margin-bottom: 20px;
    font-size: 22px;
}

.filter-section {
    display: flex;
    align-items: center;
    gap: 15px;
}

.filter-section label {
    font-weight: 600;
    color: #333;
}

.filter-section select {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
}

/* PROGRESS BAR */
.upload-progress {
    margin-top: 20px;
}

.progress-bar {
    width: 100%;
    height: 30px;
    background: #e9ecef;
    border-radius: 15px;
    overflow: hidden;
    position: relative;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea, #764ba2);
    transition: width 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

#progressText {
    display: block;
    text-align: center;
    margin-top: 10px;
    font-weight: 600;
    color: #667eea;
}

/* MESSAGES */
.message {
    margin-top: 15px;
    padding: 12px;
    border-radius: 5px;
    display: none;
}

.message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    display: block;
}

.message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    display: block;
}

.error-message {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    padding: 12px;
    border-radius: 5px;
    margin-bottom: 20px;
}

/* FILE CARDS */
.file-card {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 15px;
    transition: all 0.3s;
}

.file-card:hover {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.file-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 15px;
}

.file-info h3 {
    color: #333;
    margin-bottom: 8px;
    font-size: 18px;
}

.file-meta {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    font-size: 14px;
    color: #666;
}

.file-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.file-actions {
    display: flex;
    gap: 10px;
}

.badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

.badge-month {
    background: #667eea;
    color: white;
}

/* COMMENTS */
.comments-section {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 2px solid #dee2e6;
}

.comments-section h4 {
    color: #333;
    margin-bottom: 15px;
    font-size: 16px;
}

.comment {
    background: white;
    padding: 12px;
    border-radius: 5px;
    margin-bottom: 10px;
    border-left: 3px solid #667eea;
}

.comment-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 13px;
}

.comment-author {
    font-weight: 600;
    color: #667eea;
}

.comment-date {
    color: #999;
}

.comment-text {
    color: #333;
    font-size: 14px;
    line-height: 1.5;
}

.comment-form {
    margin-top: 15px;
}

.comment-form textarea {
    width: 100%;
    min-height: 80px;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
    resize: vertical;
}

.comment-form button {
    margin-top: 10px;
}

/* LOADING */
.loading {
    text-align: center;
    color: #666;
    padding: 40px;
    font-style: italic;
}

/* RESPONSIVE */
@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
    }

    .header .container {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

    .file-header {
        flex-direction: column;
        gap: 15px;
    }

    .file-actions {
        width: 100%;
        flex-direction: column;
    }

    .file-actions .btn {
        width: 100%;
    }
}
