/* css/style.css */
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
    display: flex; justify-content: center; align-items: center;
    min-height: 100vh; background: #f4f7f6;
    font-family: 'Nunito Sans', sans-serif; color: #333;
}
.card {
    background: #fff; padding: 30px; border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    width: 90%; max-width: 420px; transition: all 0.3s ease;
}
.header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.header h2 { font-size: 1.3rem; color: #003366; }
.header button {
    background: none; border: none; color: #d9534f;
    font-weight: bold; cursor: pointer; font-size: 0.9rem;
}

input {
    width: 100%; padding: 12px 15px; margin-bottom: 15px;
    border: 1px solid #ddd; border-radius: 6px; font-size: 1rem; outline: none;
}
input:focus { border-color: #003366; }
button[type="submit"] {
    width: 100%; padding: 12px; background: #003366; color: #fff;
    border: none; border-radius: 6px; font-size: 1rem; font-weight: bold; cursor: pointer;
}
button[type="submit"]:hover { background: #002244; }

.hidden { display: none !important; }
.info-text { font-size: 0.9rem; color: #666; margin-bottom: 15px; text-align: center; line-height: 1.4; }

.alert { padding: 10px; border-radius: 6px; margin-bottom: 15px; text-align: center; font-size: 0.9rem; }
.alert.error { background: #fdecea; color: #d9534f; }
.alert.success { background: #e3f2fd; color: #0d47a1; border: 1px solid #bbdefb; }

/* Listado de archivos */
.org-block { margin-bottom: 25px; }
.org-title { font-weight: bold; color: #003366; border-bottom: 2px solid #eee; padding-bottom: 5px; margin-bottom: 10px; }
.files-list { display: flex; flex-direction: column; gap: 5px; }

.file-item {
    display: flex; align-items: center; padding: 12px 10px;
    text-decoration: none; color: #333; border-radius: 6px; transition: background 0.2s;
}
.file-item:hover { background: #f5f5f5; }
.file-icon { font-size: 1.5rem; margin-right: 12px; flex-shrink: 0; }

/* CORRECCIÓN CSS PARA MÓVILES (Firefox/Chrome/Safari) */
.file-info {
    display: flex; flex-direction: column;
    flex: 1; min-width: 0; /* Clave para que el texto largo rompa y no desborde */
}
.file-name {
    font-weight: 600; font-size: 0.95rem;
    word-break: break-word; overflow-wrap: break-word;
}

/* Mostrar más */
.hidden-file { display: none !important; }
.btn-show-more {
    background: none; border: none; color: #003366;
    font-weight: bold; cursor: pointer; padding: 12px 0 0 0;
    width: 100%; text-align: center; font-size: 0.9rem;
}
.btn-show-more:hover { text-decoration: underline; }

.loader { border: 3px solid #f3f3f3; border-top: 3px solid #003366; border-radius: 50%; width: 24px; height: 24px; animation: spin 1s linear infinite; margin: 20px auto; }
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }