/* ============================================
   AGENDAFIP - ESTILOS GENERALES
   ============================================ */

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

body {
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
    line-height: 1.6;
}

/* HEADER */
.app-header {
    background: rgba(255, 255, 255, 0.95);
    padding: 15px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.app-header h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #667eea;
}

.menu-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 5px 10px;
    border-radius: 8px;
    transition: background 0.2s;
}

.menu-btn:hover {
    background: #f0f0f0;
}

.dropdown-menu {
    position: absolute;
    top: 60px;
    right: 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    min-width: 200px;
    display: none;
    flex-direction: column;
    overflow: hidden;
}

.dropdown-menu.show {
    display: flex;
}

.dropdown-menu a {
    padding: 12px 20px;
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: background 0.2s;
    border-bottom: 1px solid #f0f0f0;
}

.dropdown-menu a:hover {
    background: #667eea;
    color: white;
}

/* MAIN CONTAINER */
.main-container {
    max-width: 800px;
    margin: 30px auto;
    padding: 0 20px;
}

/* FORMULARIOS */
.formulario {
    background: white;
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.encabezado {
    text-align: center;
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f0f0f0;
}

.encabezado h2 {
    color: black;
    font-weight: 600;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #2c3e50;
    font-size: 0.95rem;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

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

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

/* UBICACIÓN Y MAPA */
.ubicacion-section {
    margin: 20px 0;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 12px;
    border: 1px solid #e9ecef;
}

.ubicacion-section label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: #2c3e50;
}

.ubicacion-section input[type="text"] {
    width: 100%;
    padding: 10px 15px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    margin-bottom: 12px;
}

.mapa-container {
    width: 100%;
    height: 250px;
    border-radius: 10px;
    border: 2px solid #ddd;
    margin: 10px 0;
    cursor: pointer;
}

.mapa-container:hover {
    border-color: #667eea;
}

.ubicacion-section small {
    display: block;
    color: #666;
    font-size: 0.85rem;
    margin-top: 8px;
}

/* BOTONES */
.btn-primary {
    width: 100%;
    padding: 14px;
    /*background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;*/
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.btn-primary:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.btn-secondary {
    padding: 10px 20px;
    background: #e0e0e0;
    color: #333;
    border: none;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
}

.btn-secondary:hover {
    background: #d0d0d0;
}

/* MENSAJES */
.mensaje {
    padding: 12px 16px;
    border-radius: 10px;
    margin: 15px 0;
    font-weight: 500;
    display: none;
}

.mensaje.show {
    display: block;
}

.mensaje.success {
    /*background: #d4edda;*/
    color: white;
    border-color: solid 0.5px black;
    /*border: 1px solid #c3e6cb;*/
    
}

.mensaje.error {
    /*background: #f8d7da;*/
    color: #721c24;
    /*border: 1px solid #f5c6cb;*/
}

.mensaje.info {
    /*background: #cce5ff;*/
    color: #004085;
    /*border: 1px solid #b8daff;*/
}

/* LISTA DE EVENTOS */
.lista-eventos {
    display: grid;
    gap: 15px;
    margin-top: 20px;
}

.evento-card {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 18px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: transform 0.2s, box-shadow 0.2s;
}

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

.evento-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
    flex-wrap: wrap;
    gap: 8px;
}

.evento-header h4 {
    margin: 0;
    color: #2c3e50;
    font-size: 1.1rem;
    font-weight: 600;
}

.evento-fecha {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.evento-nota {
    color: #555;
    margin: 8px 0;
    font-size: 0.95rem;
    line-height: 1.5;
}

.evento-ubicacion {
    background: #e8f4fd;
    padding: 10px 14px;
    border-radius: 8px;
    margin: 10px 0;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.evento-ubicacion .link-mapa {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
    margin-left: auto;
}

.evento-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.btn-editar,
.btn-eliminar {
    flex: 1;
    padding: 10px;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-editar {
    background: #3498db;
    color: white;
}

.btn-editar:hover {
    background: #2980b9;
}

.btn-eliminar {
    background: #e74c3c;
    color: white;
}

.btn-eliminar:hover {
    background: #c0392b;
}

.cargando,
.vacio,
.error {
    text-align: center;
    padding: 40px 20px;
    color: #666;
    background: white;
    border-radius: 12px;
}

.error {
    color: #e74c3c;
}

/* MODAL */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
}

.modal-content {
    background: white;
    padding: 25px;
    border-radius: 16px;
    width: 100%;
    max-width: 550px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.modal-close {
    float: right;
    font-size: 28px;
    cursor: pointer;
    color: #999;
}

.modal-close:hover {
    color: #333;
}

.modal-content h3 {
    margin: 0 0 20px 0;
    color: #2c3e50;
    text-align: center;
}

.modal-actions {
    display: flex;
    gap: 12px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.modal-actions .btn-primary,
.modal-actions .btn-secondary {
    flex: 1;
}

/* AUTH (LOGIN/REGISTRO) */
.auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.auth-card {
    background: white;
    padding: 40px;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 400px;
    text-align: center;
}

.auth-card h1 {
    color: #667eea;
    margin-bottom: 10px;
}

.auth-card h2 {
    color: #2c3e50;
    margin-bottom: 25px;
    font-weight: 600;
}

.auth-link {
    margin-top: 20px;
    color: #666;
}

.auth-link a {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
}

.auth-link a:hover {
    text-decoration: underline;
}

/* RESPONSIVE */
@media (max-width: 600px) {
    .app-header {
        padding: 12px 15px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .evento-header {
        flex-direction: column;
    }
    
    .evento-actions {
        flex-direction: column;
    }
}