/* 
   ESTILOS GENERALES Y VARIABLES
   Maker Space - Sistema de Gestión Moderno
*/

:root {
    /* Paleta de Colores (Diseño Oscuro Premium) */
    --bg-dark: #0f172a;
    --bg-card: rgba(30, 41, 59, 0.7);
    --accent: #38bdf8;
    --accent-hover: #0ea5e9;
    --text-main: #f8fafc;
    --text-dim: #94a3b8;
    --glass-border: rgba(255, 255, 255, 0.1);
    --shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

/* Reset de Márgenes y Padding */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    /* Fondo con gradiente radial */
    background: radial-gradient(circle at top right, #1e293b, #0f172a);
    color: var(--text-main);
    min-height: 100vh;
    line-height: 1.6;
}

/* EFECTO GLASSMORFISMO 
   Aplica transparencia con desenfoque de fondo
*/
.glass {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow);
}

/* BARRA DE NAVEGACIÓN */
.navbar {
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 1rem 2rem;
    margin-bottom: 2rem;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    font-family: 'Outfit', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-item {
    color: var(--text-dim);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s;
    font-size: 0.9rem;
    letter-spacing: 1px;
}

.nav-item:hover {
    color: var(--accent);
}

.content-wrapper {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 2rem 4rem;
}

/* TARJETAS DE NAVEGACIÓN (Dashboard) */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.card {
    padding: 2.5rem;
    border-radius: 24px;
    text-decoration: none;
    color: inherit;
    transition: transform 0.3s, border-color 0.3s;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.card:hover {
    transform: translateY(-10px);
    border-color: var(--accent);
}

.card i {
    font-size: 3rem;
    color: var(--accent);
    margin-bottom: 1.5rem;
}

.card h2 {
    font-family: 'Outfit', sans-serif;
    margin-bottom: 1rem;
}

/* COMPONENTES DE BOTONES */
.btn {
    padding: 0.75rem 1.5rem;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
}

.btn-primary {
    background: var(--accent);
    color: var(--bg-dark);
}

.btn-primary:hover {
    background: var(--accent-hover);
    transform: scale(1.02);
}

.btn-icon {
    background: none;
    border: none;
    color: var(--text-dim);
    font-size: 1.3rem;
    cursor: pointer;
    transition: color 0.3s;
}

.btn-icon:hover {
    color: var(--accent);
}

/* FORMULARIOS Y ENTRADAS */
.form-group {
    margin-bottom: 1.5rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-dim);
    font-size: 0.9rem;
}

input,
select,
textarea {
    width: 100%;
    padding: 1rem;
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    color: white;
    font-family: inherit;
}

input:focus {
    outline: none;
    border-color: var(--accent);
}

/* SISTEMA DE NOTIFICACIONES FLOTANTES */
#notification-container {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    z-index: 1000;
}

.notification {
    padding: 1rem 2rem;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 1rem;
    animation: slideIn 0.3s ease-out;
    transition: opacity 0.5s;
}

/* Animación de entrada de notificaciones */
@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Estados de colores para alertas */
.green {
    border-left: 4px solid #10b981;
}

.red {
    border-left: 4px solid #ef4444;
}

.blue {
    border-left: 4px solid #3b82f6;
}

/* ELEMENTOS DE LISTADO (Proyectos/Préstamos) */
.repo-item {
    padding: 1.5rem;
    border-radius: 16px;
    margin-bottom: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.3s;
}

.repo-item:hover {
    background: rgba(255, 255, 255, 0.05);
    cursor: pointer;
}

/* ESTILOS PARA EL CONTENIDO RENDERIZADO (README) */
.markdown-body {
    background: transparent !important;
    color: var(--text-main) !important;
}

/* FILAS DINÁMICAS EN FORMULARIOS DE PRÉSTAMOS */
.item-row {
    display: grid;
    grid-template-columns: 1fr 2fr 100px auto;
    gap: 1rem;
    align-items: flex-end;
    margin-bottom: 1rem;
}

/* Adaptabilidad para móviles */
/* MODALES */
.receipt-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 95%;
    max-width: 450px;
    max-height: 90vh;
    overflow-y: auto;
    z-index: 1001;
    padding: 2.5rem;
    border-radius: 24px;
    display: none;
}

#modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(4px);
    z-index: 1000;
}

@media (max-width: 768px) {
    .item-row {
        grid-template-columns: 1fr;
    }

    .receipt-modal {
        padding: 1.5rem;
    }
}