/* 
 * Estilos personalizados para la aplicación de almacenamiento
 * 
 * Ubicación: public/assets/css/styles.css
 */

:root {
    --primary-color: #3498db;
    --secondary-color: #2ecc71;
    --danger-color: #e74c3c;
    --warning-color: #f39c12;
    --dark-color: #2c3e50;
    --light-color: #ecf0f1;
    --text-color: #333333;
    --border-radius: 4px;
    --box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Estilos generales */
body {
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    color: var(--text-color);
    background-color: #f5f7fa;
    line-height: 1.6;
}

a {
    color: var(--primary-color);
    text-decoration: none;
}

a:hover {
    color: #217dbb;
}

.container-fluid {
    max-width: 1400px;
}

/* Navegación y sidebar */
.main-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 250px;
    background: var(--dark-color);
    color: #fff;
    z-index: 1030;
    box-shadow: var(--box-shadow);
    transition: all 0.3s ease;
}

.sidebar-collapsed .main-sidebar {
    width: 70px;
}

.sidebar-header {
    padding: 20px;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-brand {
    color: #fff;
    font-size: 1.5rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sidebar-brand i {
    margin-right: 10px;
}

.sidebar-nav {
    padding: 0;
    list-style: none;
    margin: 20px 0;
}

.sidebar-nav .nav-item {
    margin-bottom: 5px;
}

.sidebar-nav .nav-link {
    color: rgba(255, 255, 255, 0.8);
    padding: 12px 20px;
    display: flex;
    align-items: center;
    border-radius: 0;
    transition: all 0.3s ease;
}

.sidebar-nav .nav-link i {
    margin-right: 10px;
    font-size: 18px;
    width: 20px;
    text-align: center;
}

.sidebar-nav .nav-link:hover, 
.sidebar-nav .nav-link.active {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

.form-check .form-check-input {
    float: left;
    margin-left: -1.5em;
    border-block-color: initial;
}
.main-content {
    transition: all 0.3s ease;
    margin-left: 250px;
}

.sidebar-collapsed .main-content {
    margin-left: 70px;
}

.main-navbar {
    background-color: #fff;
    box-shadow: var(--box-shadow);
}

/* Tarjetas y contenedores */
.card {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    margin-bottom: 20px;
}

.card-header {
    background-color: #fff;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    padding: 15px 20px;
}

.card-body {
    padding: 20px;
}

.card-stats {
    overflow: hidden;
}

.card-stats .icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    border-radius: 50%;
}

/* Tablas y listas */
.list-group-item {
    border-left: none;
    border-right: none;
    padding: 15px 20px;
}

.list-group-item:first-child {
    border-top: none;
}

.list-group-item:last-child {
    border-bottom: none;
}

.table {
    margin-bottom: 0;
}

.table th {
    font-weight: 600;
    border-top: none;
    border-bottom-width: 1px;
}

/* Formularios y controles */
.form-control {
    border-radius: var(--border-radius);
    border: 1px solid #ddd;
    padding: 10px 15px;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(52, 152, 219, 0.25);
}

.btn {
    border-radius: var(--border-radius);
    padding: 8px 16px;
    text-transform: none;
    font-weight: 500;
    letter-spacing: 0.3px;
    transition: all 0.3s ease;
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: #217dbb;
    border-color: #217dbb;
}

.btn-success {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
}

.btn-success:hover {
    background-color: #27ae60;
    border-color: #27ae60;
}

.btn-danger {
    background-color: var(--danger-color);
    border-color: var(--danger-color);
}

.btn-danger:hover {
    background-color: #c0392b;
    border-color: #c0392b;
}

/* Alertas y notificaciones */
.alert {
    border: none;
    border-radius: var(--border-radius);
    padding: 15px 20px;
    margin-bottom: 20px;
    box-shadow: var(--box-shadow);
}

/* Badges y etiquetas */
.badge {
    padding: 5px 10px;
    font-weight: 500;
    border-radius: 30px;
}

/* Elementos de archivos */
.file-item {
    display: flex;
    align-items: center;
    padding: 10px;
    border-radius: var(--border-radius);
    transition: all 0.2s ease;
}

.file-item:hover {
    background-color: rgba(0, 0, 0, 0.03);
}

.file-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    margin-right: 15px;
}

.file-info {
    flex-grow: 1;
}

.file-name {
    margin: 0;
    font-size: 14px;
    font-weight: 500;
}

.file-meta {
    font-size: 12px;
    color: #777;
}

.file-actions {
    display: flex;
}

/* Estilos responsivos */
@media (max-width: 992px) {
    .main-sidebar {
        transform: translateX(-100%);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .sidebar-open .main-sidebar {
        transform: translateX(0);
    }
    
    .sidebar-open .main-content {
        margin-left: 250px;
    }
}

@media (max-width: 768px) {
    .sidebar-open .main-content {
        margin-left: 0;
    }
    
    .card-stats {
        margin-bottom: 15px;
    }
}

/* Animaciones y transiciones */
.fade-in {
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Componentes de previsualización */
.preview-container {
    border-radius: var(--border-radius);
    overflow: hidden;
    background: #fff;
    box-shadow: var(--box-shadow);
}

.preview-image {
    max-width: 100%;
    display: block;
    margin: 0 auto;
}

.preview-video {
    width: 100%;
    max-height: 70vh;
}

.preview-audio {
    width: 100%;
    margin: 20px 0;
}

.preview-document {
    width: 100%;
    height: 70vh;
    border: none;
}

/* Modales personalizados */
.modal-content {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.modal-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid #eee;
}

.modal-footer {
    border-top: 1px solid #eee;
}

/* Scrollbar personalizada */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Mejorar accesibilidad para focus */
:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.3);
}

/* Tema oscuro (activable con clase .dark-theme en body) */
body.dark-theme {
    background-color: #1a1a1a;
    color: #e1e1e1;
}

body.dark-theme .card,
body.dark-theme .main-navbar,
body.dark-theme .modal-content {
    background-color: #2a2a2a;
    color: #e1e1e1;
}

body.dark-theme .card-header,
body.dark-theme .modal-header,
body.dark-theme .modal-footer {
    background-color: #333;
    border-color: #444;
}

body.dark-theme .form-control {
    background-color: #333;
    border-color: #444;
    color: #e1e1e1;
}

body.dark-theme .list-group-item {
    background-color: #2a2a2a;
    border-color: #444;
    color: #e1e1e1;
}

body.dark-theme .text-muted {
    color: #aaa !important;
}

body.dark-theme .table {
    color: #e1e1e1;
}

body.dark-theme .table th,
body.dark-theme .table td {
    border-color: #444;
}

body.dark-theme .file-item:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

