/* ============================================================
   STYLES.CSS - Diseño Premium Skotnica (Clean UI) - CORREGIDO
   ============================================================ */

   @import url('https://fonts.googleapis.com/css2?family=Lato:wght@300;400;700&family=Poppins:wght@400;500;600;700&display=swap');

   :root {
       /* COLORES */
       --primary: #111885;       /* Azul Skotnica */
       --primary-light: #2a33a6;
       --accent: #eb1d26;        /* Rojo Skotnica */
       --dark: #1a1a1a;
       --text-body: #4a5568;
       --bg-body: #f3f4f6;       /* Fondo Gris Suave */
       --white: #ffffff;
       --border: #e2e8f0;
       
       /* SOMBRAS */
       --shadow-sm: 0 1px 3px rgba(0,0,0,0.12);
       --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1);
   
       /* FUENTES */
       --font-heading: 'Poppins', sans-serif;
       --font-body: 'Lato', sans-serif;
   }
   
   * { box-sizing: border-box; margin: 0; padding: 0; outline: none; }
   
   body {
       font-family: var(--font-body);
       color: var(--text-body);
       background-color: var(--bg-body);
       line-height: 1.6;
       font-size: 15px;
       display: flex;
       flex-direction: column;
       min-height: 100vh;
   }
   
   h1, h2, h3, h4, h5, h6 {
       font-family: var(--font-heading);
       color: var(--primary);
       font-weight: 600;
       margin-bottom: 1rem;
   }
   
   a { text-decoration: none; color: inherit; transition: all 0.3s ease; }
   
   /* --- LAYOUT --- */
   .container {
       max-width: 1200px;
       margin: 0 auto;
       padding: 0 20px;
   }
   
   /* --- TARJETAS (CARD BOX) --- */
   .card-box {
       background: var(--white);
       border-radius: 12px;
       box-shadow: var(--shadow-md);
       padding: 30px;
       margin-bottom: 30px;
       border: 1px solid var(--border);
   }
   
   /* --- TOP BAR --- */
   .top-bar { background-color: var(--dark); color: #ccc; font-size: 13px; padding: 8px 0; }
   .top-bar-content { display: flex; justify-content: flex-end; align-items: center; }
   .top-actions { display: flex; align-items: center; gap: 15px; }
   .top-link { color: #fff; font-weight: 500; display: flex; align-items: center; gap: 5px; }
   .top-link:hover { color: var(--accent); }
   .separator { margin: 0 5px; color: #555; }
   .social-mini a { color: #fff; margin-left: 10px; font-size: 16px; }
   .social-mini a:hover { color: var(--accent); }
   
   /* --- HEADER --- */
   .main-header {
       background: var(--white); padding: 15px 0;
       box-shadow: 0 2px 10px rgba(0,0,0,0.05);
       position: sticky; top: 0; z-index: 100;
   }
   .header-grid { display: flex; justify-content: space-between; align-items: center; }
   .logo-img { height: 50px; width: auto; display: block; }
   
   .main-nav ul { display: flex; gap: 25px; list-style: none; margin: 0; padding: 0; }
   .main-nav a { font-weight: 600; font-size: 14px; color: var(--dark); position: relative; }
   .main-nav a:hover, .main-nav a.active { color: var(--accent); }
   
   /* --- BOTONES --- */
   .btn-primary {
       display: inline-flex; align-items: center; justify-content: center;
       background: var(--primary); color: var(--white);
       padding: 10px 25px; border-radius: 8px;
       font-weight: 500; text-transform: uppercase; font-size: 13px;
       border: none; cursor: pointer; box-shadow: var(--shadow-sm);
       transition: all 0.3s ease;
   }
   .btn-primary:hover { background: var(--primary-light); transform: translateY(-2px); }
   .btn-contact { background: var(--accent); color: white !important; padding: 8px 20px; border-radius: 50px; }
   .btn-contact:hover { background: var(--primary); }
   
   /* --- FORMULARIOS --- */
   input, select, textarea {
       width: 100%; padding: 10px 15px;
       border: 1px solid #cbd5e0; border-radius: 6px;
       font-size: 14px; font-family: var(--font-body);
       background-color: #fff; color: var(--dark);
   }
   input:focus, select:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(17, 24, 133, 0.1); }
   
   /* CORRECCIÓN INPUT NUMBER: Eliminar flechas y arreglar warning */
   input[type=number] {
       -moz-appearance: textfield; /* Firefox Legacy */
       appearance: textfield;      /* Estándar Moderno */
   }
   input[type=number]::-webkit-outer-spin-button,
   input[type=number]::-webkit-inner-spin-button {
       -webkit-appearance: none;
       margin: 0;
   }

   /* Etiqueta global (Vertical por defecto) */
   label { font-weight: 600; color: var(--primary); margin-bottom: 5px; display: block; font-size: 13px; }
   
   /* --- TABLAS --- */
   .table-responsive { overflow-x: auto; border-radius: 8px; box-shadow: var(--shadow-sm); background: white; border: 1px solid var(--border); }
   table { width: 100%; border-collapse: collapse; min-width: 600px; }
   table th { background-color: #6c757d; color: var(--white); padding: 12px; text-align: center; font-size: 13px; font-weight: 500; }
   table td { padding: 10px 12px; border-bottom: 1px solid var(--border); color: var(--text-body); font-size: 14px; text-align: center; }
   table tr:nth-child(even) { background-color: #f8fafc; }
   table tr:hover { background-color: #eef2ff; }
   .total-row td { background-color: #e2e8f0; font-weight: 700; color: var(--dark); }
   
   /* --- UTILIDADES --- */
   .title-header-row { display: flex; align-items: center; gap: 20px; margin-bottom: 25px; }
   .page-banner { background: var(--accent); color: var(--white); padding: 10px 0; font-size: 13px; font-weight: 500; margin-bottom: 30px; }
   
   /* --- FOOTER --- */
   .main-footer {
       background: var(--dark); color: #888;
       padding: 20px 0; margin-top: auto;
       font-size: 13px; text-align: center !important;
       width: 100%; display: block;
   }
   .main-footer p { margin: 0; padding: 0; text-align: center; width: 100%; }
   
   /* --- DROPDOWN --- */
   .dropdown-wrapper { position: relative; padding-bottom: 5px; margin-bottom: -5px; cursor: pointer; }
   .dropdown-menu { display: none; position: absolute; top: 100%; right: 0; background: var(--white); width: 220px; box-shadow: var(--shadow-md); border-radius: 0 0 8px 8px; z-index: 1000; padding: 10px 0; border-top: 3px solid var(--accent); }
   .dropdown-wrapper:hover .dropdown-menu { display: block; }
   .dropdown-menu a { display: flex; align-items: center; padding: 10px 20px; color: var(--text-body); font-size: 13px; border-bottom: 1px solid var(--border); }
   .dropdown-menu a:hover { background-color: #f8fafc; color: var(--accent); padding-left: 25px; }
   
   /* --- MODALES --- */
   .modal-overlay { display: none; position: fixed; z-index: 2000; left: 0; top: 0; width: 100%; height: 100%; background-color: rgba(0,0,0,0.6); backdrop-filter: blur(2px); }
   .modal-content { background: #fff; margin: 5% auto; width: 90%; max-width: 600px; position: relative; border-radius: 12px; box-shadow: 0 25px 50px -12px rgba(0,0,0,0.25); animation: slideDown 0.3s; overflow: hidden; }
   .modal-body-gray { padding: 30px; text-align: left; }
   .modal-title { color: var(--primary); font-size: 20px; border-bottom: 1px solid #eee; padding-bottom: 15px; margin-bottom: 20px; }
   .modal-form-row { display: flex; align-items: center; margin-bottom: 15px; }
   .modal-form-row label { width: 120px; text-align: right; margin-right: 15px; }
   .close-modal { position: absolute; right: 15px; top: 15px; color: #999; font-size: 24px; cursor: pointer; font-weight: bold; }
   .close-modal:hover { color: var(--accent); }
   @keyframes slideDown { from {transform: translateY(-50px); opacity: 0;} to {transform: translateY(0); opacity: 1;} }
   
   /* --- LOGIN --- */
   .login-wrapper { display: flex; align-items: center; justify-content: center; min-height: 80vh; background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%); }
   .login-container { width: 100%; max-width: 450px; padding: 40px; background: #fff; border-radius: 16px; box-shadow: 0 20px 25px -5px rgba(0,0,0,0.1); border-top: 6px solid var(--accent); }
   .login-header { text-align: center; margin-bottom: 30px; }
   .input-wrapper { position: relative; }
   .input-wrapper i { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); color: var(--primary); }
   .input-wrapper input { padding-left: 45px; }
   .btn-login { width: 100%; padding: 12px; background: var(--primary); color: #fff; border-radius: 50px; font-weight: 700; border: none; cursor: pointer; transition: 0.3s; margin-top: 15px;}
   .btn-login:hover { background: var(--primary-light); transform: translateY(-2px); box-shadow: 0 10px 15px rgba(17, 24, 133, 0.2); }
   .login-footer { margin-top: 25px; text-align: center; font-size: 13px; }
   .login-footer a { color: var(--primary); font-weight: 500; }
   .login-footer a:hover { color: var(--accent); text-decoration: underline; }
   
   /* --- FILTROS (CORREGIDO PARA QUE SE VEA HORIZONTAL) --- */
   .filters-container {
       background: var(--white); padding: 15px; border-radius: 8px;
       box-shadow: var(--shadow-sm); margin-bottom: 20px;
       display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 15px;
       border: 1px solid var(--border);
   }
   
   .filter-group {
       display: flex; align-items: center; gap: 15px; /* Espacio horizontal entre checks */
   }
   
   /* Forzamos que los labels dentro de filtros sean horizontales */
   .filter-group label {
       display: flex; 
       align-items: center;
       margin: 0;
       width: auto;
       font-weight: 500;
       cursor: pointer;
   }
   
   .filter-group input[type="checkbox"] {
       width: auto;
       margin-right: 5px;
   }
   
   /* Badges */
   .status-badge { padding: 4px 10px; border-radius: 20px; font-size: 11px; font-weight: 700; text-transform: uppercase; }
   .status-p { background-color: #fff3cd; color: #856404; }
   .status-r { background-color: #cff4fc; color: #055160; }
   .status-ap { background-color: #d1e7dd; color: #0f5132; }
   .status-an { background-color: #f8d7da; color: #842029; }
   .action-link { margin: 0 5px; font-size: 13px; text-decoration: underline; cursor: pointer; }
   .action-edit { color: var(--primary); }
   .action-delete { color: var(--accent); }

   /* --- MENSAJES DE ERROR (LOGIN) --- */
   .error-message {
       display: none; /* ESTO ES LO IMPORTANTE: Oculto por defecto */
       background: #fff5f5; 
       color: #c53030; 
       border: 1px solid #feb2b2;
       padding: 10px; 
       border-radius: 6px; 
       font-size: 13px; 
       text-align: center; 
       margin-bottom: 15px;
       margin-top: 15px;
   }

   /* Corrección alineación menú Admin */
   #adminMenuContainer {
       display: flex;
       align-items: center;
       margin-right: 15px; /* Separación con el usuario */
   }