﻿/* 
 * Mini-Mailchimp - Hoja de estilos inspirada en la Asociación Rural del Uruguay
 * Color institucional: verde #0F5B2D
 */
:root {
    --primary-green: #0F5B2D;
    --primary-dark:  #0A421F;
    --light-bg:      #f8f9fa;
    --white:         #ffffff;
}

/* Reset y tipografía */
body {
    background-color: var(--light-bg);
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    margin: 0;
}

/* Navbar */
.navbar {
    background-color: var(--primary-green);
    padding: 0.75rem 1rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.navbar .navbar-brand {
    color: var(--white);
    font-weight: 700;
    text-decoration: none;
    font-size: 1.4rem;
}
.navbar .nav-link {
    color: rgba(255,255,255,0.85);
    text-decoration: none;
    margin-left: 1rem;
}
.navbar .nav-link:hover {
    color: var(--white);
}

/* Contenedor principal */
.container {
    max-width: 1140px;
    margin: 2rem auto;
    padding: 0 1rem;
}

/* Tarjetas y paneles */
.card {
    background: var(--white);
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    margin-bottom: 1.5rem;
}
.card-header {
    background-color: var(--primary-green);
    color: var(--white);
    padding: 0.75rem 1.25rem;
    border-radius: 8px 8px 0 0;
    font-weight: 600;
}
.card-body {
    padding: 1.25rem;
}

/* Botones */
.btn {
    display: inline-block;
    padding: 0.5rem 1.2rem;
    font-size: 0.95rem;
    border-radius: 6px;
    border: 1px solid transparent;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.2s;
}
.btn-primary {
    background-color: var(--primary-green);
    color: white;
    border-color: var(--primary-green);
}
.btn-primary:hover {
    background-color: var(--primary-dark);
}
.btn-outline-primary {
    background: transparent;
    color: var(--primary-green);
    border-color: var(--primary-green);
}
.btn-outline-primary:hover {
    background: var(--primary-green);
    color: white;
}
.btn-danger {
    background-color: #dc3545;
    color: white;
    border-color: #dc3545;
}
.btn-sm {
    padding: 0.3rem 0.8rem;
    font-size: 0.85rem;
}

/* Formularios */
.form-label {
    display: block;
    margin-bottom: 0.3rem;
    font-weight: 500;
}
.form-control {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 0.95rem;
    margin-bottom: 0.8rem;
}
.form-control:focus {
    border-color: var(--primary-green);
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(15,91,45,0.25);
}
.form-select {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid #ccc;
    border-radius: 6px;
}

/* Tablas */
table {
    width: 100%;
    border-collapse: collapse;
    background: var(--white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}
th, td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid #e9ecef;
}
th {
    background-color: #f1f3f5;
    font-weight: 600;
}

/* Alertas */
.alert {
    padding: 0.75rem 1.25rem;
    border-radius: 6px;
    margin-bottom: 1rem;
}
.alert-success { background: #d4edda; color: #155724; }
.alert-danger  { background: #f8d7da; color: #721c24; }
.alert-warning { background: #fff3cd; color: #856404; }
.alert-info    { background: #d1ecf1; color: #0c5460; }

/* Utilidades */
.text-center { text-align: center; }
.mt-3 { margin-top: 1rem; }
.mb-3 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 1.5rem; }
.d-inline { display: inline; }
.badge {
    padding: 0.25em 0.6em;
    font-size: 0.75em;
    border-radius: 20px;
    color: white;
}
.bg-success { background-color: #198754; }
.bg-warning { background-color: #ffc107; color: #000; }
.bg-secondary { background-color: #6c757d; }
.bg-danger  { background-color: #dc3545; }

/* Progreso (barra de envío) */
.progress {
    height: 20px;
    background: #e9ecef;
    border-radius: 10px;
    overflow: hidden;
    margin: 1rem 0;
}
.progress-bar {
    height: 100%;
    background-color: var(--primary-green);
    width: 0%;
    transition: width 0.3s;
}

/* Editor Summernote */
.note-editor.note-frame {
    border: 1px solid #ccc !important;
    border-radius: 6px !important;
    margin-bottom: 1rem !important;
}
.note-editor.note-frame:focus-within {
    border-color: var(--primary-green) !important;
    box-shadow: 0 0 0 0.2rem rgba(15,91,45,0.25) !important;
}
.note-toolbar {
    background: #f8f9fa !important;
    border-bottom: 1px solid #dee2e6 !important;
    padding: 8px !important;
}
.note-btn {
    background: white !important;
    border: 1px solid #dee2e6 !important;
    border-radius: 4px !important;
    padding: 5px 10px !important;
    font-size: 13px !important;
}
.note-btn:hover {
    background: #e9ecef !important;
}
.note-editing-area {
    background: white !important;
    min-height: 300px;
}
.note-editable {
    font-family: Arial, Helvetica, sans-serif !important;
    font-size: 14px !important;
    line-height: 1.6 !important;
    color: #333 !important;
}
.note-placeholder {
    color: #999 !important;
}

/* Botón de test */
.btn-test {
    background-color: #fff3cd !important;
    border: 1px solid #ffc107 !important;
    color: #856404 !important;
}
.btn-test:hover {
    background-color: #ffe69c !important;
    color: #664d03 !important;
}

/* Modal */
#testModal .card {
    animation: modalSlideIn 0.3s ease;
}
@keyframes modalSlideIn {
    from { transform: translateY(-60px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* Tabla responsive */
@media (max-width: 768px) {
    table {
        font-size: 0.8rem;
    }
    .btn {
        display: block;
        width: 100%;
        margin-bottom: 0.3rem;
    }
}