/* --- FUENTE Y VARIABLES GLOBALES --- */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600;700&display=swap');

:root {
    --color-primario: #007bff;
    --color-fondo: #f0f2f5;
    --color-tarjeta: #ffffff;
    --color-texto: #333333;
    --color-texto-secundario: #666666;
    --sombra-tarjeta: 0 4px 15px rgba(0, 0, 0, 0.1);
    --radio-borde: 12px;
}

/* --- RESETEO Y ESTILOS BASE --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--color-fondo);
    color: var(--color-texto);
    line-height: 1.6;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.container {
    width: 100%;
    max-width: 900px;
    text-align: center;
}

/* --- ENCABEZADOS --- */
.header-logueado, .header-visitante {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 40px 20px;
    border-radius: var(--radio-borde);
    margin-bottom: 40px;
    box-shadow: var(--sombra-tarjeta);
}

.header-logueado h1, .header-visitante h1 {
    margin: 0;
    font-size: 2.8em;
    font-weight: 700;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.2);
}

.header-logueado .subheader {
    font-size: 1.2em;
    margin-top: 10px;
    opacity: 0.9;
    font-weight: 300;
}

.header-visitante p {
    font-size: 1.3em;
    margin-top: 10px;
    font-weight: 300;
}

/* --- BOTONES --- */
.boton-logout, .boton-login {
    display: inline-block;
    padding: 10px 25px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    transition: transform 0.2s ease, background-color 0.3s;
}

.boton-logout {
    background-color: #ff4d4d;
    color: white;
    margin-top: 20px;
}

.boton-logout:hover {
    background-color: #ff1a1a;
    transform: scale(1.05);
}

.boton-login {
    background-color: var(--color-primario);
    color: white;
    font-size: 1.1em;
    margin-top: 20px;
}

.boton-login:hover {
    background-color: #0056b3;
    transform: scale(1.05);
}

/* --- GRID DE PROCESOS Y LOGIN --- */
.grid-procesos, .grid-login {
    display: grid;
    gap: 30px;
}

.grid-procesos {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid-login {
    justify-content: center;
}

/* --- FICHAS / TARJETAS --- */
.ficha, .ficha-login {
    background-color: var(--color-tarjeta);
    border-radius: var(--radio-borde);
    padding: 30px;
    box-shadow: var(--sombra-tarjeta);
    text-decoration: none;
    color: var(--color-texto);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-align: left;
}

.ficha:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.ficha h2 {
    font-size: 1.5em;
    font-weight: 600;
    display: flex;
    align-items: center;
    color: var(--color-primario);
}

.ficha p {
    margin-top: 10px;
    color: var(--color-texto-secundario);
}

.ficha-login {
    max-width: 500px;
    text-align: center;
}

.ficha-login h2 {
    font-size: 1.8em;
    margin-bottom: 15px;
    color: #333;
}

.ficha-login p {
    color: var(--color-texto-secundario);
    margin-bottom: 25px;
}

/* --- ESTILOS PÁGINA DE LOGIN --- */

.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
}

.login-form-panel {
    width: 100%;
    max-width: 420px;
    background-color: var(--color-tarjeta);
    padding: 40px;
    border-radius: var(--radio-borde);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.login-form-panel .form-content {
    width: 100%;
}

.login-form-panel h2 {
    font-size: 2em;
    font-weight: 600;
    color: var(--color-texto);
    margin-bottom: 25px;
    text-align: center;
}

.input-group {
    position: relative;
    margin-bottom: 20px;
}

.input-group i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #aaa;
}

.input-group input {
    width: 100%;
    padding: 12px 15px 12px 45px;
    border: 1px solid #ddd;
    border-radius: 25px;
    font-size: 1em;
    transition: border-color 0.3s;
}

.input-group input:focus {
    outline: none;
    border-color: var(--color-primario);
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.btn-login {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 25px;
    background-color: var(--color-primario);
    color: white;
    font-size: 1.1em;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.2s;
}

.btn-login:hover {
    background-color: #0056b3;
    transform: scale(1.02);
}

.login-links {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
    font-size: 0.9em;
}

.login-links a {
    color: var(--color-primario);
    text-decoration: none;
}

.login-links a:hover {
    text-decoration: underline;
}

.back-to-home {
    text-align: center;
    margin-top: 25px;
    font-size: 0.9em;
}

.back-to-home a {
    color: var(--color-texto-secundario);
    text-decoration: none;
    transition: color 0.3s;
}

.back-to-home a:hover {
    color: var(--color-primario);
}

/* Mensajes de error/éxito */
.message {
    padding: 10px;
    margin-bottom: 15px;
    border-radius: 5px;
    text-align: center;
    font-size: 0.9em;
}
.message.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}
.message.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

/* --- ESTILOS PÁGINA DE NOTAS --- */

.notes-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.notes-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #ddd;
}

.notes-header h1 {
    font-size: 2.5em;
    font-weight: 600;
    color: var(--color-texto);
}

.notes-header h1 i {
    margin-right: 15px;
    color: var(--color-primario);
}

.notes-actions a {
    display: inline-flex; /* Use inline-flex for alignment */
    align-items: center;
    padding: 8px 15px; /* Smaller padding */
    border-radius: 20px; /* Rounded corners, not circular */
    font-size: 0.9em; /* Smaller font size */
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.notes-actions a i {
    margin-right: 8px; /* Space between icon and text */
}

.btn-create-note {
    background-color: var(--color-primario);
    color: white;
}
.btn-create-note:hover {
    background-color: #0056b3;
    transform: translateY(-2px);
}

.btn-back {
    background-color: #6c757d;
    color: white;
}
.btn-back:hover {
    background-color: #5a6268;
}

.notes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
}

.note-card {
    background-color: var(--color-tarjeta);
    border-radius: var(--radio-borde);
    box-shadow: var(--sombra-tarjeta);
    padding: 25px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.note-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

.note-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
}

.note-card-header h2 {
    font-size: 1.4em;
    font-weight: 600;
    margin-right: 10px;
    word-break: break-word;
}

.note-card-menu a {
    color: var(--color-texto-secundario);
    margin-left: 10px;
    font-size: 1.1em;
    transition: color 0.3s;
}
.note-card-menu a:hover {
    color: var(--color-primario);
}
.btn-delete:hover {
    color: #ff4d4d;
}

.note-content-snippet {
    flex-grow: 1;
    color: var(--color-texto-secundario);
    line-height: 1.7;
    margin-bottom: 20px;
}

.note-card-footer {
    font-size: 0.8em;
    color: #aaa;
    text-align: right;
    border-top: 1px solid #f0f0f0;
    padding-top: 10px;
    margin-top: auto;
}

.no-notes-message {
    grid-column: 1 / -1; /* Span all columns */
    text-align: center;
    padding: 50px;
    background-color: var(--color-tarjeta);
    border-radius: var(--radio-borde);
}
.no-notes-message h3 {
    font-size: 1.8em;
    font-weight: 500;
    margin-bottom: 10px;
}
.no-notes-message p {
    color: var(--color-texto-secundario);
}

/* --- ESTILOS FORMULARIO DE NOTA --- */

.note-form-container {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 20px;
    min-height: 100vh;
}

.note-form {
    width: 100%;
    max-width: 800px;
    background-color: var(--color-tarjeta);
    padding: 40px;
    border-radius: var(--radio-borde);
    box-shadow: var(--sombra-tarjeta);
}

.note-form h1 {
    text-align: center;
    font-size: 2em;
    margin-bottom: 30px;
    color: var(--color-texto);
}

.note-form .form-group {
    margin-bottom: 25px;
}

.note-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    font-size: 1.1em;
}

.note-form input[type="text"],
.note-form textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1em;
    font-family: 'Poppins', sans-serif;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.note-form input[type="text"]:focus,
.note-form textarea:focus {
    outline: none;
    border-color: var(--color-primario);
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.15);
}

.note-form textarea {
    resize: vertical;
    min-height: 200px;
}

.note-form .form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 15px;
    margin-top: 30px;
}

.note-form .form-actions a,
.note-form .form-actions button {
    padding: 12px 25px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 1px solid transparent;
    cursor: pointer;
    font-size: 1em;
}

.btn-save {
    background-color: var(--color-primario);
    color: white;
}
.btn-save:hover {
    background-color: #0056b3;
}

.btn-cancel {
    background-color: #f0f2f5;
    color: var(--color-texto-secundario);
    border: 1px solid #ddd;
}
.btn-cancel:hover {
    background-color: #e2e6ea;
    border-color: #c8ced3;
}



