/* ========================================
   Repositorio de Archivos - Estilos CSS
   ======================================== */

* {
    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;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    overflow: hidden;
}

/* Header */
header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
    padding: 30px;
    text-align: center;
}

header h1 {
    font-size: 2rem;
    font-weight: 600;
}

/* Alertas */
.alert {
    padding: 15px 20px;
    margin: 20px;
    border-radius: 8px;
    font-weight: 500;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Panel de acciones */
.actions-panel {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    padding: 20px 30px;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
}

.upload-form,
.folder-form {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: flex-end;
    flex: 1;
    min-width: 300px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
    flex: 1;
}

.form-group input[type="file"] {
    display: none;
}

.file-label {
    display: inline-block;
    padding: 12px 20px;
    background: #ffffff;
    border: 2px dashed #667eea;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #667eea;
    font-weight: 500;
}

.file-label:hover {
    background: #667eea;
    color: #ffffff;
}

.form-group input[type="text"] {
    padding: 12px 15px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.form-group input[type="text"]:focus {
    outline: none;
    border-color: #667eea;
}

.file-names {
    font-size: 13px;
    color: #6c757d;
    word-break: break-all;
}

/* Botones */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    white-space: nowrap;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
}

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

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

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

.btn-success:hover {
    background: #218838;
    transform: translateY(-2px);
}

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

.btn-danger:hover {
    background: #c82333;
    transform: translateY(-2px);
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}

/* Breadcrumbs */
.breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    padding: 15px 30px;
    background: #ffffff;
    border-bottom: 1px solid #e9ecef;
    gap: 10px;
}

.breadcrumb-item {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.breadcrumb-item:hover {
    color: #764ba2;
    text-decoration: underline;
}

.breadcrumb-separator {
    color: #6c757d;
}

/* Lista de archivos */
.file-list {
    padding: 20px 30px;
}

.file-list table {
    width: 100%;
    border-collapse: collapse;
}

.file-list thead {
    background: #f8f9fa;
}

.file-list th {
    padding: 15px;
    text-align: left;
    font-weight: 600;
    color: #495057;
    border-bottom: 2px solid #dee2e6;
}

.file-list td {
    padding: 15px;
    border-bottom: 1px solid #dee2e6;
    vertical-align: middle;
}

.file-list tbody tr:hover {
    background: #f8f9fa;
}

.folder-row {
    background: #fff8e1;
}

.folder-row:hover {
    background: #ffecb3;
}

.file-icon {
    font-size: 1.5rem;
    margin-right: 10px;
    vertical-align: middle;
}

.file-name {
    text-decoration: none;
    color: #212529;
    font-weight: 500;
    transition: color 0.3s ease;
}

.folder-name {
    color: #667eea;
}

.file-name:hover {
    color: #667eea;
}

.actions {
    display: flex;
    gap: 10px;
}

.empty-message {
    text-align: center;
    padding: 40px;
    color: #6c757d;
    font-size: 1.1rem;
}

/* Footer */
footer {
    background: #f8f9fa;
    padding: 20px 30px;
    text-align: center;
    border-top: 1px solid #e9ecef;
}

footer p {
    color: #6c757d;
    font-size: 14px;
}

/* Responsive */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }

    .container {
        border-radius: 8px;
    }

    header h1 {
        font-size: 1.5rem;
    }

    .actions-panel {
        flex-direction: column;
        padding: 15px;
    }

    .upload-form,
    .folder-form {
        width: 100%;
    }

    .file-list {
        padding: 15px;
        overflow-x: auto;
    }

    .file-list table {
        font-size: 14px;
    }

    .file-list th,
    .file-list td {
        padding: 10px;
    }

    .actions {
        flex-direction: column;
    }

    .breadcrumbs {
        padding: 15px;
        flex-wrap: wrap;
    }
}
