/**
 * ESTILOS GLOBALES - KONNEXIA
 * ============================
 * Estilos compartidos por todas las partes de la aplicación.
 */

/* ============================================================================
   RESET Y BASE
   ============================================================================ */

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--kx-font);
    line-height: 1.6;
    color: #1F2937;
    background-color: #F3F4F6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ============================================================================
   TIPOGRAFÍA
   ============================================================================ */

h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 0.5em;
}

h1 { font-size: 2rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1rem; }

p {
    margin-bottom: 1rem;
}

a {
    color: #D91A8A;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* ============================================================================
   FORMULARIOS
   ============================================================================ */

.form-group {
    margin-bottom: 1.25rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #374151;
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    border: 1px solid #D1D5DB;
    border-radius: 8px;
    background-color: white;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: #D91A8A;
    box-shadow: 0 0 0 3px rgba(217, 26, 138, 0.1);
}

.form-input.error {
    border-color: #EF4444;
}

.form-error {
    color: #EF4444;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

.form-help {
    color: #6B7280;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

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

/* ============================================================================
   BOTONES
   ============================================================================ */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 500;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

.btn:hover {
    text-decoration: none;
    transform: translateY(-1px);
}

.btn:active {
    transform: translateY(0);
}

.btn-primary {
    background-color: #D91A8A;
    color: white;
}

.btn-primary:hover {
    background-color: #B8157A;
}

.btn-secondary {
    background-color: #6B7280;
    color: white;
}

.btn-secondary:hover {
    background-color: #4B5563;
}

.btn-success {
    background-color: #D91A8A;
    color: white;
}

.btn-success:hover {
    background-color: #B8157A;
}

.btn-danger {
    background-color: #EF4444;
    color: white;
}

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

.btn-outline {
    background-color: transparent;
    border: 2px solid #D1D5DB;
    color: #374151;
}

.btn-outline:hover {
    background-color: #F3F4F6;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.125rem;
}

/* ============================================================================
   ALERTAS / MENSAJES
   ============================================================================ */

.alert {
    padding: 1rem 1.25rem;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.alert-success {
    background-color: #FFF5F9;
    color: #B8157A;
    border: 1px solid #FFD6E8;
}

.alert-error {
    background-color: #FEE2E2;
    color: #991B1B;
    border: 1px solid #FECACA;
}

.alert-warning {
    background-color: #FEF3C7;
    color: #92400E;
    border: 1px solid #FDE68A;
}

.alert-info {
    background-color: #FFF5F9;
    color: #D91A8A;
    border: 1px solid #FFD6E8;
}

/* ============================================================================
   TABLAS
   ============================================================================ */

.table-container {
    overflow-x: auto;
    background: white;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.table {
    width: 100%;
    border-collapse: collapse;
}

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

.table th {
    background-color: #F9FAFB;
    font-weight: 600;
    color: #374151;
    white-space: nowrap;
}

.table tr:hover {
    background-color: #F9FAFB;
}

.table tr:last-child td {
    border-bottom: none;
}

/* ============================================================================
   CARDS
   ============================================================================ */

.card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    padding: 1.5rem;
}

.card-header {
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #E5E7EB;
}

.card-title {
    font-size: 1.125rem;
    font-weight: 600;
}

/* ============================================================================
   BADGES / ETIQUETAS DE ESTADO
   ============================================================================ */

.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 9999px;
    text-transform: uppercase;
}

.badge-gray { background: #E5E7EB; color: #374151; }

/* Tipo de evento */
.badge-blue { background: #FFD6E8; color: #9D174D; }          /* Rosa claro - REUNION SEMANAL */
.badge-magenta { background: #D91A8A; color: #FFFFFF; }       /* Magenta - EVENTO ESPECIAL */

/* Código de grupo */
.badge-purple { background: #8B5CF6; color: #FFFFFF; }        /* Púrpura - genérico */
.badge-abante { background: #D91A8A; color: #FFFFFF; }        /* Magenta - ABANTE (Bilbao) */
.badge-ekin { background: #3B82F6; color: #FFFFFF; }          /* Azul - EKIN (Getxo) */

/* Estados de evento */
.badge-green { background: #22C55E; color: #FFFFFF; }         /* Verde - CERRADA, HOY */
.badge-yellow { background: #F59E0B; color: #FFFFFF; }        /* Amarillo - PENDIENTE DE CERRAR */
.badge-red { background: #EF4444; color: #FFFFFF; }           /* Rojo - SIN VALIDAR */

/* ============================================================================
   UTILIDADES
   ============================================================================ */

.text-center { text-align: center; }
.text-right { text-align: right; }
.text-muted { color: #6B7280; }
.text-small { font-size: 0.875rem; }

.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 1rem; }
.mt-4 { margin-top: 1.5rem; }
.mt-5 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 1.5rem; }
.mb-5 { margin-bottom: 2rem; }

.d-flex { display: flex; }
.justify-between { justify-content: space-between; }
.align-center { align-items: center; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }

.hidden { display: none !important; }
