.card-title .material-icons,
.form-label .material-icons {
    vertical-align: middle;
    margin-right: 0.5rem;
}

.form-label .material-icons {
    font-size: 18px;
}

.form-control, textarea, select {
    max-width: 400px;
    width: 100%;
    display: inline-block;
}

input[type="file"] {
    display: none;
}

#files-display,
#dirfiles-display {
    border: none;
    background: transparent;
    width: 70%;
    margin-top: 0.5em;
    font-size: 0.875rem;
    color: var(--text-secondary);
    padding: 0.25rem 0;
}

/* Enhanced button styles for upload feedback */
.btn {
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.btn-success {
    background-color: #4caf50 !important;
    border-color: #4caf50 !important;
    color: white !important;
}

.btn-success:hover:not(:disabled) {
    background-color: #45a049 !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(76, 175, 80, 0.3);
}

.btn-info {
    background-color: #2196f3 !important;
    border-color: #2196f3 !important;
    color: white !important;
}

.btn-info:hover:not(:disabled) {
    background-color: #1976d2 !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(33, 150, 243, 0.3);
}

.btn-warning {
    background-color: #ff9800 !important;
    border-color: #ff9800 !important;
    color: white !important;
}

.btn-warning:hover:not(:disabled) {
    background-color: #f57c00 !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(255, 152, 0, 0.3);
}

/* Upload progress indicator */
.upload-progress {
    margin-top: 1.5rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, var(--bg-paper) 0%, rgba(255,255,255,0.02) 100%);
    border: 1px solid var(--divider);
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.progress-bar-container {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    align-items: center;
}

.progress-bar {
    width: 100%;
    max-width: 300px;
    height: 12px;
    background-color: var(--divider);
    border-radius: 6px;
    overflow: hidden;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.1);
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-main) 0%, #4caf50 50%, #2196f3 100%);
    width: 0%;
    transition: width 0.4s ease-out;
    border-radius: 6px;
    position: relative;
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.3) 50%, transparent 100%);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.progress-text {
    font-size: 0.875rem;
    color: var(--text-secondary);
    text-align: center;
    font-weight: 500;
}

/* File selection feedback */
.file-selected {
    animation: fileSelected 0.3s ease-out;
}

@keyframes fileSelected {
    0% { transform: scale(1); }
    50% { transform: scale(1.02); }
    100% { transform: scale(1); }
}

/* Enhanced form group styling */
.form-group {
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: rgba(255,255,255,0.02);
    border-radius: 8px;
    border: 1px solid transparent;
    transition: border-color 0.3s ease;
}

.form-group:hover {
    border-color: var(--divider);
}

.form-group label {
    display: block;
    margin-bottom: 0.75rem;
    font-weight: 600;
    color: var(--text-primary);
}

/* Button group styling */
.button-group {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    flex-wrap: wrap;
}

/* File count display */
.file-count-info {
    margin-top: 0.75rem;
    padding: 0.5rem;
    background: rgba(33, 150, 243, 0.1);
    border: 1px solid rgba(33, 150, 243, 0.2);
    border-radius: 6px;
    animation: fadeIn 0.3s ease-out;
    display: none; /* Hidden by default */
}

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

.file-count-info small {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-weight: 500;
}

.file-count-info .material-icons {
    font-size: 14px;
}

/* Upload Results Styling */
.upload-results-summary {
    margin-bottom: 2rem;
    background: linear-gradient(135deg, var(--bg-paper) 0%, rgba(255,255,255,0.02) 100%);
    border: 1px solid var(--divider);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.summary-header {
    background: linear-gradient(135deg, var(--primary-main) 0%, #1976d2 100%);
    color: white;
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.summary-title {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.summary-stats {
    display: flex;
    gap: 1.5rem;
}

.stat-item {
    text-align: center;
    padding: 0.5rem;
    background: rgba(255,255,255,0.1);
    border-radius: 8px;
    min-width: 60px;
}

.stat-item.success {
    background: rgba(76, 175, 80, 0.2);
    border: 1px solid rgba(76, 175, 80, 0.3);
}

.stat-item.error {
    background: rgba(244, 67, 54, 0.2);
    border: 1px solid rgba(244, 67, 54, 0.3);
}

.stat-number {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1;
}

.stat-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.025em;
    opacity: 0.9;
}

.upload-metadata {
    padding: 1.5rem;
    background: rgba(255,255,255,0.02);
    border-bottom: 1px solid var(--divider);
}

.upload-metadata h4 {
    margin: 0 0 1rem 0;
    color: var(--text-primary);
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.upload-metadata p {
    margin: 0.25rem 0;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.results-section {
    padding: 1.5rem;
    border-bottom: 1px solid var(--divider);
}

.results-section:last-child {
    border-bottom: none;
}

.section-title {
    margin: 0 0 1rem 0;
    font-size: 1.1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    transition: color 0.2s ease;
}

.section-title:hover {
    opacity: 0.8;
}

.expand-icon {
    margin-left: auto !important;
    transition: transform 0.2s ease;
    font-size: 18px;
}

.section-title.collapsed .expand-icon {
    transform: rotate(-90deg);
}

.success-section .section-title {
    color: #4caf50;
}

.error-section .section-title {
    color: #f44336;
}

.file-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.file-item {
    display: flex;
    align-items: center;
    padding: 0.75rem;
    background: var(--bg-default);
    border: 1px solid var(--divider);
    border-radius: 8px;
    transition: all 0.2s ease;
}

.file-item:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.file-item.success {
    border-left: 4px solid #4caf50;
    background: linear-gradient(90deg, rgba(76, 175, 80, 0.05) 0%, var(--bg-default) 100%);
}

.file-item.error {
    border-left: 4px solid #f44336;
    background: linear-gradient(90deg, rgba(244, 67, 54, 0.05) 0%, var(--bg-default) 100%);
}

.file-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-paper);
    border-radius: 8px;
    margin-right: 1rem;
    color: var(--text-secondary);
}

.file-item.success .file-icon {
    background: rgba(76, 175, 80, 0.1);
    color: #4caf50;
}

.file-item.error .file-icon {
    background: rgba(244, 67, 54, 0.1);
    color: #f44336;
}

.file-details {
    flex: 1;
    min-width: 0;
}

.file-name {
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
    word-break: break-all;
}

.file-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.file-type {
    background: rgba(255,255,255,0.1);
    padding: 0.125rem 0.375rem;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.025em;
    font-weight: 500;
}

.error-reason {
    color: #f44336;
    font-style: italic;
}

.file-actions {
    flex-shrink: 0;
    margin-left: 1rem;
}

.results-actions {
    padding: 1.5rem;
    background: rgba(255,255,255,0.02);
    border-top: 1px solid var(--divider);
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Enhanced alert styling */
.alert {
    border-radius: 8px;
    border: none;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin-bottom: 1.5rem;
}

.alert-success {
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.1) 0%, rgba(76, 175, 80, 0.05) 100%);
    border-left: 4px solid #4caf50;
    color: #2e7d32;
}

.alert-danger {
    background: linear-gradient(135deg, rgba(244, 67, 54, 0.1) 0%, rgba(244, 67, 54, 0.05) 100%);
    border-left: 4px solid #f44336;
    color: #c62828;
}

.alert i.material-icons {
    vertical-align: middle;
    margin-right: 0.5rem;
}

/* Responsive adjustments for results */
@media (max-width: 600px) {
    .summary-header {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }

    .summary-stats {
        justify-content: center;
    }

    .file-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

    .file-icon {
        margin-right: 0;
        margin-bottom: 0.5rem;
    }

    .file-actions {
        margin-left: 0;
        width: 100%;
    }

    .file-actions .btn {
        width: 100%;
    }

    .results-actions {
        flex-direction: column;
    }

    .results-actions .btn {
        width: 100%;
    }
}