* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    padding: 20px;
    background-color: #f5f5f5;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.breadcrumb {
    margin-bottom: 20px;
    padding: 10px;
    background-color: #eee;
    border-radius: 4px;
}

.files-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}

.file-item {
    position: relative;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    text-align: center;
    transition: all 0.2s;
    background-color: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
}

.file-item:hover {
    background-color: #f8f8f8;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.file-item a {
    text-decoration: none;
    color: #333;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.file-name {
    margin: 8px 0;
    font-size: 0.9em;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.file-size {
    font-size: 0.8em;
    color: #666;
    margin-top: auto;
}

.file-icon {
    font-size: 2em;
    margin-bottom: 15px;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 50px;
    transition: transform 0.2s, color 0.2s;
    color: #666;
}

.file-item:hover .file-icon {
    transform: scale(1.1);
    color: #007bff;
}

/* Colores específicos para tipos de archivo */
.fa-file-pdf { color: #dc3545; }
.fa-file-word { color: #0066cc; }
.fa-file-excel { color: #217346; }
.fa-file-powerpoint { color: #d24726; }
.fa-file-image { color: #28a745; }
.fa-file-audio { color: #6f42c1; }
.fa-file-video { color: #e83e8c; }
.fa-file-archive { color: #fd7e14; }
.fa-file-code { color: #17a2b8; }
.fa-folder { color: #ffc107; }
.fa-arrow-left { color: #6c757d; }

@media (max-width: 600px) {
    .files-grid {
        grid-template-columns: 1fr;
    }
    
    body {
        padding: 10px;
    }
}

/* Controles de vista */
.view-controls {
    margin-bottom: 20px;
    display: flex;
    justify-content: flex-end;
}

.view-switcher {
    display: flex;
    gap: 5px;
}

.view-button {
    padding: 8px 12px;
    border: 1px solid #ddd;
    background: white;
    cursor: pointer;
    border-radius: 4px;
    font-size: 1.2em;
}

.view-button.active {
    background: #e9ecef;
    border-color: #ced4da;
}

/* Vista de lista */
.files-list {
    display: block;
}

.files-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.files-table th,
.files-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.files-table th {
    background: #f8f9fa;
    font-weight: 600;
}

.files-table .sortable {
    cursor: pointer;
}

.files-table .sortable:hover {
    background: #e9ecef;
}

.file-icon-cell {
    text-align: center;
    width: 40px;
}

.files-table tr:hover {
    background: #f8f9fa;
}

.files-table a {
    color: #333;
    text-decoration: none;
    display: block;
}

.files-table a:hover {
    color: #007bff;
}

/* Responsive */
@media (max-width: 600px) {
    .files-table th:last-child,
    .files-table td:last-child {
        display: none;
    }
}

/* Variables y reset */
:root {
    --primary-color: #007bff;
    --secondary-color: #6c757d;
    --background-color: #f8f9fa;
    --footer-color: #b70909;
    --header-height: 70px;
    --footer-height: 60px;
}

body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background-color: var(--background-color);
}

/* Header */
.main-header {
    background-color: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    height: var(--header-height);
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    justify-content: space-between;
}

.logo-container {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 20px;
    text-align: left;
    flex-direction: row;
}

.header-logos {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.client-logo {
    height: 40px;
    width: auto;
    max-width: 150px;
    object-fit: contain;
}

.logo-container h1 {
    font-size: 1.5em;
    color: var(--primary-color);
    margin: 0;
    white-space: nowrap;
}

.header-actions {
    display: flex;
    align-items: center;
}

.logout-button {
    padding: 8px 16px;
    background-color: var(--footer-color);
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-size: 0.9em;
    transition: background-color 0.2s;
}

.logout-button:hover {
    background-color: #a60808;
}

.header-actions {
    display: flex;
    align-items: center;
}

.logout-button {
    padding: 8px 16px;
    background-color: var(--footer-color);
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-size: 0.9em;
    transition: background-color 0.2s;
}

.logout-button:hover {
    background-color: #a60808;
}

/* Main Content */
.main-content {
    flex: 1;
    padding: 20px;
}

/* Footer */
.main-footer {
    background-color: var(--footer-color);
    box-shadow: 0 -2px 4px rgba(0,0,0,0.1);
    height: var(--footer-height);
    margin-top: auto;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.footer-content p {
    color: white;
    font-size: 0.9em;
    margin: 0;
}

.tesicnor-link {
    color: white;
    text-decoration: none;
    font-weight: bold;
}

.tesicnor-link:hover {
    color: #f0f0f0;
    text-decoration: underline;
}

/* Responsive */
@media (max-width: 768px) {
    .header-content, .footer-content {
        padding: 0 10px;
    }

    .logo-container h1 {
        font-size: 1.2em;
    }

    .footer-content p {
        text-align: center;
        font-size: 0.8em;
    }
}

/* Login styles */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--background-color);
}

.login-box {
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 400px;
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-logos {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.login-logo {
    height: 60px;
    width: auto;
    max-width: 150px;
    object-fit: contain;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

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

.form-group label {
    font-weight: 500;
    color: var(--secondary-color);
}

.form-group input {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1em;
}

.login-button {
    background-color: var(--primary-color);
    color: white;
    padding: 12px;
    border: none;
    border-radius: 4px;
    font-size: 1em;
    cursor: pointer;
    transition: background-color 0.2s;
}

.login-button:hover {
    background-color: #0056b3;
}

/* Estilos para login con Keycloak */
.keycloak-login {
    margin-bottom: 20px;
}

.keycloak-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 12px 20px;
    background-color: #0066cc;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 500;
    transition: background-color 0.3s ease;
    border: none;
    cursor: pointer;
}

.keycloak-button:hover {
    background-color: #0052a3;
}

.keycloak-button i {
    font-size: 1.1em;
}

/* Estilos para botón de registro */
.register-link {
    margin-bottom: 20px;
}

.register-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 14px 24px;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    color: #28a745;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
    font-size: 1em;
    letter-spacing: 0.5px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid #28a745;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(40, 167, 69, 0.1);
}

.register-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.register-button:hover {
    background: linear-gradient(135deg, #28a745 0%, #218838 100%);
    color: white;
    border-color: #28a745;
    box-shadow: 0 6px 20px rgba(40, 167, 69, 0.4);
    transform: translateY(-3px);
    letter-spacing: 0.8px;
}

.register-button:hover::before {
    left: 100%;
}

.register-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(40, 167, 69, 0.2);
}

.register-button i {
    font-size: 1.1em;
    transition: transform 0.3s ease;
}

.register-button:hover i {
    transform: scale(1.1);
}

.login-divider {
    display: flex;
    align-items: center;
    margin: 20px 0;
    text-align: center;
}

.login-divider::before,
.login-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid #ddd;
}

.login-divider span {
    padding: 0 15px;
    color: #666;
    font-size: 0.9em;
}

.error-message {
    background-color: #fee;
    color: #c00;
    padding: 10px;
    border-radius: 4px;
    margin-bottom: 20px;
    text-align: center;
}

.legal-links {
    margin-top: 20px;
    text-align: center;
}

.disclaimer-link {
    color: #3498db;
    text-decoration: none;
    font-size: 0.9em;
}

.disclaimer-link:hover {
    text-decoration: underline;
}

.disclaimer-container {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    padding: 30px;
    margin: 20px 0;
}

.disclaimer-header {
    margin-bottom: 30px;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 15px;
}

.disclaimer-header h2 {
    color: #2c3e50;
    margin: 0;
    font-size: 24px;
}

.disclaimer-content {
    line-height: 1.8;
    color: #34495e;
    font-size: 16px;
    margin-bottom: 30px;
}

.disclaimer-footer {
    padding-top: 20px;
    border-top: 1px solid #f0f0f0;
}

.back-button {
    display: inline-block;
    padding: 10px 20px;
    background-color: #3498db;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
}

.back-button:hover {
    background-color: #2980b9;
}

/* Login page legal link */
.legal-links {
    margin-top: 20px;
    text-align: center;
    padding: 10px;
}

.legal-links a {
    color: #7f8c8d;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.legal-links a:hover {
    color: #3498db;
}

.legal-links a i {
    font-size: 12px;
}

.button-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background-color: #3498db;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

.button-link:hover {
    background-color: #2980b9;
} 