﻿/* ==========================================================
   ADMIN.CSS (v2.0 - Refactorizado PSTD 2024)
   Ubicación: admin/assets/css/admin.css
   Contiene todo: Layout, Sidebar, Formularios, Galerías,
   Tablas, Botones y Estilos de Módulos.
   
   REFACTORIZACIÓN NOTAS:
   - Eliminadas redundancias
   - Variables CSS unificadas
   - Media queries agrupadas
   - Conflictos de especificidad resueltos
   ========================================================== */

/* ==========================================================
   1. VARIABLES GLOBALES Y RESET
   ========================================================== */
:root {
    /* Paleta Principal */
    --primary: #2c5530;
    --primary-light: #4a7c59;
    --secondary: #f8b500;
    --danger: #e74c3c;
    --success: #2ecc71;
    --warning: #f59e0b;
    
    /* Sistema de Tema */
    --bg-admin: #1e293b;
    --bg-sidebar: #0f172a;
    --bg-content: #f1f5f9;
    --bg-card: #ffffff;
    
/* Texto */
    --text-dark: #1e293b;
    --text-light: #f8fafc;
    --text-muted: #64748b;
    --accent: #d6a354;
    
    /* Sombras SaaS Premium */
    --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.05), 0 1px 2px rgba(15, 23, 42, 0.03);
    --shadow-md: 0 4px 6px -1px rgba(15, 23, 42, 0.05), 0 2px 4px -1px rgba(15, 23, 42, 0.03);
    --shadow-lg: 0 10px 15px -3px rgba(15, 23, 42, 0.05), 0 4px 6px -2px rgba(15, 23, 42, 0.025);
    
    /* Utilidades */
    --radius: 12px; /* Redondeo más pronunciado y amigable */
    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    --border-color: #e2e8f0;
}

/* Sobrescribir acento para panel de colaborador */
.panel-scope { --accent: #3b82f6; }

/* Reset Base */
body {
    margin: 0;
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-content);
    color: var(--text-dark);
    line-height: 1.5;
}

a { 
    text-decoration: none;
    color: inherit;
}

/* ==========================================================
   2. LAYOUT PRINCIPAL
   ========================================================== */
.admin-wrapper {
    display: flex;
    min-height: 100vh;
}

.admin-main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* --- HEADER FIJADO --- */
.admin-header {
    background-color: #ffffff;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    
    /* Fijado arriba */
    position: sticky;
    top: 0;
    z-index: 1100;
    height: 70px;
    box-sizing: border-box;
}

.admin-header h2 { 
    margin: 0; 
    font-size: 1.25rem; 
    color: var(--text-dark);
    font-weight: 700;
}

/* Info de usuario en header */
.admin-user-info { 
    display: flex;
    align-items: center;
    gap: 1.5rem;
    font-size: 0.9rem; 
    color: var(--text-muted); 
}

.admin-user-info span i { color: var(--accent); }
.admin-user-info span strong { color: var(--text-dark); }

.btn-logout {
    font-weight: 600;
    background: var(--bg-sidebar);
    color: #ef4444;
    border: 1px solid #ef4444;
    padding: 0.4rem 0.8rem;
    border-radius: 5px;
    font-size: 0.85rem;
    transition: var(--transition);
}

.btn-logout:hover {
    background: #ef4444;
    color: var(--text-light);
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.4);
}

/* Contenido principal */
.admin-page-content {
    padding: 1.5rem;
    flex: 1;
}

/* ==========================================================
   3. SIDEBAR
   ========================================================== */
.admin-sidebar {
    width: 250px;
    background-color: var(--bg-sidebar);
    color: var(--text-light);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.sidebar-logo {
    padding: 1.5rem;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-logo a {
    color: var(--accent);
    font-size: 1.5rem;
    font-weight: 700;
}

.sidebar-nav {
    flex: 1;
    padding-top: 1rem;
}

.sidebar-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.sidebar-nav li a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.8rem 1.5rem;
    color: var(--text-light);
    font-weight: 500;
    font-size: 0.9rem;
    border-left: 4px solid transparent;
    transition: var(--transition);
}

.sidebar-nav li a:hover {
    background: rgba(255, 255, 255, 0.05);
}

.sidebar-nav li.active a {
    color: var(--accent);
    border-left-color: var(--accent);
    background: linear-gradient(90deg, rgba(214, 163, 84, 0.1), transparent);
}

.panel-scope .sidebar-nav li.active a {
    background: linear-gradient(90deg, rgba(59, 130, 246, 0.1), transparent);
}

.sidebar-nav li a i {
    width: 20px;
    text-align: center;
}

.nav-section-title {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--text-muted);
    padding: 1.5rem 1.5rem 0.5rem;
    font-weight: 600;
}

/* ==========================================================
   4. SISTEMA DE COMPONENTES
   ========================================================== */

/* --- TARJETAS (Card System) --- */
.card-module {
    background: var(--bg-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    margin-bottom: 1.5rem;
    overflow: hidden;
    border: 1px solid var(--border-color);
    animation: fadeIn 0.3s ease-out;
    transition: var(--transition);
}

.card-module:hover {
    box-shadow: var(--shadow-md);
    border-color: #cbd5e1;
    transform: translateY(-2px); /* Microinteracción de elevación */
}

/* Variante moderna para dashboard */
.card-module.modern {
    border-radius: 16px;
}

.card-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #ffffff; /* Limpio, sin gradientes anticuados */
}

.card-header .card-title i {
    color: var(--accent);
}

.card-body {
    padding: 1.5rem;
}

.card-body .form-group:last-child {
    margin-bottom: 0;
}

/* ==========================================================
   5. FORMULARIOS
   ========================================================== */

/* Layout de formulario */
.form-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1.5rem;
    align-items: start;
}

.form-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1.5rem;
}

/* Columna lateral sticky */
.form-card-secondary {
    position: sticky;
    top: 90px;
}

.form-card-secondary h3 {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1rem;
}

/* Grupos de formulario */
.form-group {
    margin-bottom: 1.25rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-dark);
    font-size: 0.9rem;
}

.form-group:focus-within .form-label {
    color: var(--primary);
}

/* Controles */
.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 0.95rem;
    color: var(--text-dark);
    background-color: #f8fafc; /* Fondo ligeramente gris para inputs inactivos */
    transition: var(--transition);
    font-family: 'Inter', sans-serif;
}

.form-control:focus {
    outline: none;
    background-color: #ffffff; /* Se ilumina al hacer focus */
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(214, 163, 84, 0.15); /* Halo dorado o del color primario */
}
textarea.form-control {
    min-height: 100px;
    resize: vertical;
    line-height: 1.5;
}

/* Grid de campos */
.form-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

/* Validación visual */
.form-control:invalid { border-color: var(--danger); }
.form-control:valid { border-color: var(--success); }

/* Barra de acciones */
.action-bar {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
    background: #f8fafc;
    padding: 1.5rem;
    border-radius: 0 0 var(--radius) var(--radius);
    margin: 0 -1.5rem -1.5rem -1.5rem;
}

.form-footer {
    border-top: 1px solid var(--border-color);
    padding-top: 1.5rem;
    margin-top: 1.5rem;
    display: flex;
    justify-content: flex-end;
}

/* ==========================================================
   6. BOTONES
   ========================================================== */
.btn {
    padding: 0.6rem 1.25rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    letter-spacing: 0.01em;
}

.btn-primary {
    background-color: var(--primary);
    color: white;
    box-shadow: 0 2px 4px rgba(44, 85, 48, 0.2);
}

.btn-primary:hover {
    background-color: var(--primary-light);
    transform: translateY(-1px);
    box-shadow: 0 4px 6px rgba(44, 85, 48, 0.3);
}

.btn-secondary {
    background-color: #f1f5f9;
    color: var(--text-dark);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background-color: #e2e8f0;
    border-color: #cbd5e1;
}

/* Tamaños */
.btn-sm { padding: 0.6rem 1rem; font-size: 0.85rem; }

/* Botones de Icono */
.btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 0.9rem;
    transition: var(--transition);
    background: none;
    color: var(--text-muted);
}

.btn-icon:hover {
    background: #f1f5f9;
    color: var(--text-dark);
}

/* Variantes de color para hover */
.btn-rotate:hover { background: #f0fdf4; color: #16a34a; }
.btn-alt:hover { background: #dbeafe; color: #2563eb; }
.btn-delete:hover { background: #fee2e2; color: #ef4444; }

/* ==========================================================
   7. TABLAS Y LISTADOS
   ========================================================== */

/* Barra de herramientas */
.toolbar {
    margin-bottom: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.toolbar-filters {
    display: flex;
    gap: 1rem;
}

.toolbar-filters .form-group { margin-bottom: 0; }
.toolbar-filters input { min-width: 250px; }

/* Tabla base */
table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

th, td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
}

th {
    background: #f8fafc;
    font-size: 0.8rem;
    text-transform: uppercase;
    color: var(--text-muted);
    font-weight: 600;
}

td { font-size: 0.9rem; }

/* Descripción en celdas */
td .item-description {
    font-size: 0.85rem;
    color: var(--text-muted);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 0.25rem;
}

/* Columnas especiales */
.col-thumb { 
    width: 60px; 
    text-align: center; 
}

.col-thumb img {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid var(--border-color);
}

.col-info small { 
    display: block; 
    color: var(--text-muted); 
    margin-top: 2px; 
}

/* Acciones en tabla */
.actions {
    display: flex;
    gap: 0.8rem;
    align-items: center;
}

.actions a {
    color: var(--text-muted);
    display: inline-block;
    padding: 0.25rem;
    transition: color 0.2s;
}

.actions a:hover { color: var(--accent); }
.actions .delete:hover { color: #ef4444; }

/* Toggle de estado */
.action-toggle {
    font-size: 1.3rem;
    text-decoration: none;
    transition: color 0.2s;
}

.action-toggle.toggle-on { color: #10b981; }
.action-toggle.toggle-off { color: #94a3b8; }
.action-toggle.toggle-disabled { 
    color: #f59e0b; 
    opacity: 0.5; 
    cursor: not-allowed; 
}

/* Iconos de acción */
a.action-icon {
    font-size: 1.1rem;
    text-decoration: none;
    transition: transform 0.2s, color 0.2s;
    color: var(--text-muted);
}

a.action-icon:hover { transform: scale(1.1); }
a.action-icon.has-content { color: #10b981; }
a.action-icon.no-content { color: #ef4444; }
a.action-icon.disabled { 
    color: #cbd5e1; 
    cursor: not-allowed; 
    pointer-events: none; 
}

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.25rem 0.6rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-primary { background: #e0f2fe; color: #0369a1; border: 1px solid #bae6fd; }
.badge-purple { background: #f3e8ff; color: #7e22ce; border: 1px solid #d8b4fe; }
.badge-orange { background: #ffedd5; color: #c2410c; border: 1px solid #fed7aa; }
.badge-green { background: #dcfce7; color: #15803d; border: 1px solid #bbf7d0; }
.badge-gray { background: #f1f5f9; color: #475569; border: 1px solid #e2e8f0; }

/* Iconos de tipo */
.type-icon {
    font-size: 1.2rem;
    color: var(--text-muted);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    background: #f8fafc;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    transition: all 0.2s;
}

.type-icon:hover {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
}

/* Enlaces de teléfono */
.tel-link {
    color: var(--text-dark);
    font-weight: 500;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    transition: background 0.2s;
}

.tel-link:hover {
    background: #eef2f6;
    color: var(--accent);
}

.tel-link i { 
    font-size: 0.85rem; 
    color: var(--text-muted); 
}

/* ==========================================================
   8. MÓDULOS ESPECIALES
   ========================================================== */

/* --- Módulo Sub-CRUD (Recetas) --- */
.sub-crud-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

.sub-crud-form {
    background: #f8fafc;
    padding: 1.25rem;
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
}

.sub-crud-form h4,
.sub-crud-list h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-top: 0;
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.5rem;
}

.sub-crud-list {
    max-height: 400px;
    overflow-y: auto;
}

.sub-crud-list ul,
.sub-crud-list ol {
    padding-left: 0;
    margin: 0;
    list-style: none;
}

.sub-crud-list li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 0;
    border-bottom: 1px solid #f1f5f9;
    transition: var(--transition);
}

.sub-crud-list li:hover {
    background-color: #f8fafc;
    border-radius: 4px;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
}

.sub-crud-list li:last-child { border-bottom: 0; }

.sub-crud-list .item-info {
    font-weight: 500;
    flex-grow: 1;
    color: var(--text-dark);
}

.sub-crud-list .item-info span {
    font-weight: 400;
    color: var(--text-muted);
    font-size: 0.85em;
    margin-left: 0.5rem;
}

.sub-crud-list ol {
    list-style: decimal;
    list-style-position: inside;
    padding-left: 0.25rem;
}

.sub-crud-list li.step-item {
    align-items: start;
    gap: 0.5rem;
}

.sub-crud-list .step-description {
    line-height: 1.5;
    color: var(--text-dark);
}

.sub-crud-list .item-actions {
    display: flex;
    gap: 0.5rem;
    padding-left: 1rem;
}

.sub-crud-list .btn-icon-sub {
    background: #fff;
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius);
    cursor: pointer;
    line-height: 1;
    transition: var(--transition);
    font-size: 0.85rem;
}

.sub-crud-list .btn-icon-sub:hover {
    background: #e2e8f0;
    color: var(--text-dark);
    transform: translateY(-1px);
}

.sub-crud-list .btn-icon-sub.delete:hover {
    background: #fee2e2;
    border-color: #ef4444;
    color: #dc2626;
}

/* Scrollbar para listas */
.sub-crud-list::-webkit-scrollbar {
    width: 6px;
}

.sub-crud-list::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 3px;
}

.sub-crud-list::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

.sub-crud-list::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* --- Galería de Imágenes --- */
.gallery-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1.5rem;
    margin-top: 1.5rem;
}

.gallery-card h2 {
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
}

.gallery-admin-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.gallery-admin-card {
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    overflow: hidden;
    background: white;
    transition: var(--transition);
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.gallery-admin-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.gallery-admin-image {
    height: 160px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border-bottom: 1px solid var(--border-color);
}

.gallery-admin-card-body {
    padding: 1rem;
}

.gallery-admin-card .form-group {
    margin-bottom: 1rem;
}

.gallery-admin-card input[type="text"] {
    padding: 0.5rem;
    font-size: 0.85rem;
}

.gallery-admin-actions {
    display: flex;
    justify-content: space-between;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid #f1f5f9;
}

/* Área de carga (Drag & Drop) */
.gallery-upload-area {
    border: 2px dashed #cbd5e1;
    border-radius: var(--radius);
    padding: 2.5rem 1.5rem;
    text-align: center;
    background: #fdfdfd;
    transition: var(--transition);
    margin-bottom: 1.5rem;
}

.gallery-upload-area:hover,
.gallery-upload-area.drag-over {
    border-color: var(--primary);
    background: #f8fcf8;
}

.gallery-upload-area i {
    font-size: 2rem;
    color: var(--primary-light);
    margin-bottom: 1rem;
}

.gallery-upload-area p {
    margin: 0.5rem 0;
    font-weight: 500;
    color: var(--text-dark);
}

.gallery-upload-area .muted {
    font-size: 0.9rem;
}

#upload-form { display: none; }

#browse-link {
    color: var(--primary);
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    background: none;
    border: none;
    font-size: 1rem;
    padding: 0;
    font-family: inherit;
}

#browse-link:hover { text-decoration: underline; }

/* Editor de Mapa */
#map-canvas {
    height: 400px;
    width: 100%;
    border-radius: var(--radius);
    border: 1px solid #d1d5db;
    margin-top: 1rem;
    background-color: #f1f5f9;
}

/* ==========================================================
   9. DASHBOARD Y ESTADÍSTICAS
   ========================================================== */

/* Título moderno */
.admin-page-title.modern {
    background-color: var(--bg-sidebar);
    color: var(--text-light);
    padding: 2rem 1.5rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: none;
    background-image: linear-gradient(135deg, var(--bg-sidebar) 0%, var(--bg-admin) 100%);
}

.admin-page-title.modern h1 {
    margin: 0 0 0.25rem 0;
    color: #fff;
    font-weight: 700;
    font-size: 1.75rem;
}

.admin-page-title.modern h1 i { color: var(--accent); }
.admin-page-title.modern p { 
    margin: 0; 
    color: var(--text-muted); 
    font-size: 1rem; 
}

.admin-page-title.modern .header-stat { 
    text-align: right; 
    border-left: 2px solid var(--accent); 
    padding-left: 1.5rem; 
}

.admin-page-title.modern .header-stat span { 
    font-size: 0.9rem; 
    color: var(--text-muted); 
    display: block; 
}

.admin-page-title.modern .header-stat strong { 
    font-size: 2rem; 
    font-weight: 700; 
    color: #fff; 
    line-height: 1; 
}

/* Layout Grid Bento */
.dashboard-grid.modern-bento {
    display: grid;
    grid-template-columns: 2fr 1fr;
    grid-gap: 1.5rem;
    align-items: flex-start;
}

.dash-col-main { 
    display: grid; 
    gap: 1.5rem; 
}

.dash-col-side { 
    display: grid; 
    gap: 1.5rem; 
    position: sticky; 
    top: 90px; 
}

/* Widget de Prioridad */
.priority-widget.modern { 
    border-color: var(--accent); 
}

.priority-widget.modern .card-header { 
    background: linear-gradient(135deg, #fdfbf7 0%, #fefcf9 100%); 
    border-bottom-color: var(--accent); 
}

.priority-widget.modern .card-header .card-title { 
    color: var(--accent); 
}

/* Grid de Estadísticas de Contenido (6-pack) */
.stat-grid-content {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.stat-card.modern.content-card {
    text-align: center;
    padding: 1.5rem;
}

.stat-card.content-card .stat-icon { 
    font-size: 2.25rem; 
    margin-bottom: 0.75rem; 
}

.stat-card.content-card .stat-value { 
    font-size: 2.5rem; 
    color: var(--accent); 
    line-height: 1; 
}

.stat-card.content-card .stat-label { 
    font-size: 1.1rem; 
    font-weight: 500; 
    color: var(--text-dark); 
    margin-top: 0.25rem; 
}

/* Enlaces de estadísticas */
.stat-links {
    margin-top: 1.25rem;
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    border-top: 1px solid #cbd5e1;
    padding-top: 1.25rem;
}

.stat-link-public,
.stat-link-admin {
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.stat-link-public {
    background-color: #f1f5f9;
    color: var(--text-muted);
    border: 1px solid var(--border-color);
}

.stat-link-public:hover { 
    background-color: #e2e8f0; 
    color: var(--text-dark); 
}

.stat-link-admin { 
    background-color: var(--accent); 
    color: #fff; 
    border: 1px solid var(--accent); 
}

.stat-link-admin:hover { 
    background-color: #b38645; 
    box-shadow: 0 2px 4px rgba(0,0,0,0.1); 
}

.panel-scope .stat-link-admin:hover { 
    background-color: #2563eb; 
}

/* Grid de Estadísticas de Sistema (4-pack) */
.stat-grid-system {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.stat-card.modern {
    background-color: var(--bg-card);
    border-radius: 12px;
    border: 1px solid #cbd5e1;
    padding: 1.25rem;
    position: relative;
    overflow: hidden;
    transition: var(--transition);
}

.stat-card.modern:hover { 
    transform: translateY(-4px); 
    box-shadow: var(--shadow); 
}

.stat-card.modern .stat-icon { 
    font-size: 1.75rem; 
    margin-bottom: 0.75rem; 
}

.stat-card.modern .stat-value { 
    font-size: 2rem; 
    font-weight: 700; 
    color: var(--text-dark); 
    line-height: 1.1; 
}

.stat-card.modern .stat-label { 
    font-size: 0.9rem; 
    color: var(--text-muted); 
    margin-bottom: 0.25rem; 
}

.stat-card.modern .stat-link { 
    font-size: 0.9rem; 
    text-decoration: none; 
    color: var(--accent); 
    font-weight: 600; 
}

.stat-card.modern .stat-link i { 
    font-size: 0.8rem; 
    transition: transform 0.2s ease; 
}

.stat-card.modern:hover .stat-link i { 
    transform: translateX(4px); 
}

/* Variantes destacadas */
.stat-card.modern.highlight-warning { 
    background-color: #fffbeb; 
    border-color: #f59e0b; 
}

.stat-card.modern.highlight-info { 
    background-color: #eff6ff; 
    border-color: #3b82f6; 
}

/* Feed de Actividad */
.activity-widget.modern .card-body { 
    padding: 0.5rem; 
}

.activity-list.modern { 
    list-style: none; 
    padding: 0; 
    margin: 0; 
    max-height: 300px; 
    overflow-y: auto; 
}

.activity-list.modern::-webkit-scrollbar { 
    width: 6px; 
}

.activity-list.modern::-webkit-scrollbar-track { 
    background: #f8f9fa; 
}

.activity-list.modern::-webkit-scrollbar-thumb { 
    background: #cbd5e1; 
    border-radius: 3px; 
}

.activity-list.modern li { 
    display: flex; 
    padding: 0.75rem 1rem; 
    border-bottom: 1px solid #f1f5f9; 
    align-items: flex-start; 
}

.activity-list.modern li:last-child { 
    border-bottom: none; 
}

.activity-list.modern li.empty { 
    color: var(--text-muted); 
    padding: 2rem; 
    text-align: center; 
    justify-content: center; 
    gap: 0.5rem; 
}

.activity-icon-wrapper { 
    flex-shrink: 0; 
    width: 32px; 
    height: 32px; 
    border-radius: 50%; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    color: #fff; 
    margin-right: 0.75rem; 
    margin-top: 0.25rem; 
}

.activity-icon-wrapper[data-state="activo"] { background-color: #10b981; }
.activity-icon-wrapper[data-state="pendiente"] { background-color: #f59e0b; }
.activity-icon-wrapper[data-state="rechazado"] { background-color: #ef4444; }
.activity-icon-wrapper[data-state="edit"] { background-color: #6366f1; }

.activity-list.modern .activity-content { 
    font-size: 0.9rem; 
    color: var(--text-dark); 
}

.activity-list.modern .activity-content strong { 
    color: var(--text-dark); 
}

.activity-list.modern .activity-content span { 
    display: block; 
    line-height: 1.4; 
}

.activity-list.modern .activity-content .date-time { 
    display: block; 
    font-size: 0.8rem; 
    color: var(--text-muted); 
    margin-top: 0.25rem; 
}

/* ==========================================================
   10. MÓDULO DE RECETAS
   ========================================================== */

/* Grid de checkboxes */
.checkbox-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1rem;
}

/* Tarjeta base */
.checkbox-card {
    border-radius: var(--radius);
    background-color: var(--bg-card);
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
    background-size: cover;
    background-position: center;
}

/* --- Recetas Públicas (Seleccionables) --- */
.checkbox-card.visual-check {
    border: 2px solid transparent;
    cursor: pointer;
    min-height: 120px;
    background-image: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), var(--bg-image, none);
}

.checkbox-card.visual-check input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
    z-index: 10;
}

.visual-check-content {
    padding: 1rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 120px;
    position: relative;
    z-index: 2;
}

.visual-check-content strong {
    display: block;
    color: #f8fafc;
    font-weight: 600;
    font-size: 0.95rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7);
}

.visual-check-content small {
    color: var(--accent);
    font-size: 0.85rem;
    font-weight: 500;
}

.visual-check-icon {
    display: block;
    width: 24px;
    height: 24px;
    border: 2px solid rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    margin: 0 auto 0.75rem auto;
    transition: all 0.2s ease;
    color: #fff;
    line-height: 20px;
}

.visual-check-icon i {
    opacity: 0;
    transform: scale(0.5);
    transition: all 0.2s ease;
}

/* Estado Seleccionado */
.checkbox-card.visual-check input:checked + .visual-check-content .visual-check-icon {
    background-color: var(--accent);
    border-color: var(--accent);
}

.checkbox-card.visual-check input:checked + .visual-check-content .visual-check-icon i {
    opacity: 1;
    transform: scale(1);
}

.checkbox-card.visual-check input:checked {
    border-color: var(--accent);
}

.checkbox-card.visual-check:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
}

/* --- Mis Recetas Propias --- */
.checkbox-card.linked-item-v2 {
    display: flex;
    flex-direction: column;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    min-height: 0;
    cursor: default;
}

.linked-item-v2 .visual-check-content {
    min-height: 120px;
    padding: 1rem;
    background-size: cover;
    background-position: center;
    background-image: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), var(--bg-image, none);
}

.linked-item-v2 .btn-full-width {
    width: 100%;
    border-radius: 0 0 7px 7px;
    margin: 0;
    background: #f1f5f9;
    border: none;
    border-top: 1px solid var(--border-color);
    color: var(--text-dark);
    font-weight: 600;
    padding: 0.75rem;
}

.linked-item-v2 .btn-full-width:hover {
    background: #e2e8f0;
    color: var(--text-dark);
}

/* Separadores de categorías */
.category-divider {
    display: flex;
    align-items: center;
    text-transform: uppercase;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-muted);
    letter-spacing: 1px;
    margin-bottom: 1.25rem;
    margin-top: 2rem;
}

.category-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--border-color);
    margin-left: 15px;
}

.category-divider span {
    background: var(--bg-content);
    padding-right: 10px;
}

.empty-state-simple {
    padding: 20px;
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
    border-radius: var(--radius);
    text-align: center;
}

/* ==========================================================
   11. SISTEMA DE PESTAÑAS
   ========================================================== */
.tabs-nav-container {
    position: sticky;
    top: 70px;
    z-index: 1000;
    background: var(--bg-content);
    padding: 10px 0 20px 0;
}

.tabs-nav { 
    display: flex; 
    gap: 5px; 
    background: #e2e8f0; 
    padding: 5px; 
    border-radius: 10px; 
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.tab-btn { 
    flex: 1; 
    padding: 12px; 
    border: none; 
    background: transparent; 
    border-radius: 8px; 
    cursor: pointer; 
    font-weight: 700; 
    color: #64748b; 
    font-size: 0.8rem; 
    text-transform: uppercase; 
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.tab-btn.active { 
    background: white; 
    color: var(--primary); 
    box-shadow: 0 2px 8px rgba(0,0,0,0.1); 
}

.tab-pane { display: none; }
.tab-pane.active { 
    display: block; 
    animation: fadeIn 0.3s ease-out; 
}

.sidebar-sticky { 
    position: sticky; 
    top: 160px; 
    align-self: start; 
}

/* ==========================================================
   12. GESTOR DE ENLACES EXTERNOS
   ========================================================== */
.social-links-vertical-list, 
.video-manager-list {
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
    width: 100% !important;
}

/* Fila Unificada (Pill) */
.social-pill, 
.link-item-row {
    display: flex !important;
    align-items: center !important;
    gap: 15px !important;
    background: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
    padding: 12px 20px !important;
    border-radius: 12px !important;
    width: 100% !important;
    min-height: 60px !important;
    transition: var(--transition);
}

.social-pill:hover, 
.link-item-row:hover { 
    border-color: var(--accent); 
    box-shadow: 0 2px 8px rgba(0,0,0,0.05); 
}

.social-content-wrapper, 
.link-content-wrapper {
    display: flex;
    align-items: center;
    flex: 1;
    min-width: 0;
}

.social-pill i, 
.link-item-icon i {
    font-size: 1.8rem !important;
    width: 45px;
    text-align: center;
    flex-shrink: 0;
}

.social-full-url, 
.link-item-input {
    flex: 1;
    font-size: 0.95rem !important;
    color: var(--text-dark);
    word-break: break-all !important;
    border: none !important;
    background: transparent !important;
    padding: 0 !important;
}

/* Botón Quitar */
.remove-pill, 
.btn-remove-link {
    background: #ef4444 !important;
    color: white !important;
    border: none !important;
    padding: 8px 15px !important;
    border-radius: 6px !important;
    font-size: 0.75rem !important;
    font-weight: 800 !important;
    text-transform: uppercase;
    cursor: pointer;
    flex-shrink: 0;
}

/* ==========================================================
   13. LISTADOS MAESTROS Y CONTROLES
   ========================================================== */

/* Barra de Controles */
.controls-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background-color: var(--bg-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
    border: 1px solid var(--border-color);
}

.sort-options {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sort-options span {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 600;
}

.sort-options a {
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    text-decoration: none;
    font-size: 0.85rem;
    color: var(--text-dark);
    border: 1px solid var(--border-color);
    transition: all 0.2s ease;
    background-color: #fff;
}

.sort-options a:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.sort-options a.active {
    background-color: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

.pagination-info {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.pagination-nav {
    display: flex;
    gap: 0.5rem;
}

.pagination-nav .btn {
    padding: 0.4rem 0.8rem;
    font-size: 0.9rem;
}

.pagination-nav .btn[disabled] {
    opacity: 0.5;
    pointer-events: none;
    background-color: #e2e8f0;
    color: var(--text-muted);
    border: 1px solid #cbd5e1;
}

/* ==========================================================
   14. AUDITORÍA Y CONTROL
   ========================================================== */

/* Tarjetas de Auditoría */
.audit-card {
    border-left: 6px solid var(--text-muted);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.audit-card.is-accepted { border-left-color: var(--success); }
.audit-card.is-rejected { border-left-color: var(--danger); }

/* Semáforo Visual */
.audit-icons {
    display: flex;
    gap: 12px;
    background: rgba(0,0,0,0.03);
    padding: 8px 12px;
    border-radius: 20px;
}

.audit-icons i {
    font-size: 1.1rem;
    transition: transform 0.2s;
}

.audit-icons i:hover { transform: scale(1.3); }

/* Barras de Progreso */
.progress-container { 
    margin: 15px 0; 
}

.progress-label { 
    display: flex; 
    justify-content: space-between; 
    margin-bottom: 6px; 
    font-weight: 600; 
    font-size: 0.85rem; 
    color: var(--text-muted);
}

.progress-bar-bg { 
    height: 8px; 
    background: #e2e8f0; 
    border-radius: 10px; 
    overflow: hidden; 
}

.progress-bar-fill { 
    height: 100%; 
    background: var(--accent); 
    border-radius: 10px; 
    transition: width 1s ease-in-out; 
}

/* Campos de Notas */
textarea.audit-notes {
    background: #fdfcf9;
    border: 1px dashed var(--accent);
    font-size: 0.85rem;
    color: #4a5568;
}

/* ==========================================================
   15. ACCIONES MASIVAS (Banner)
   ========================================================== */
#bulk-actions-container {
    position: fixed;
    top: -100px;
    left: 250px;
    right: 0;
    height: 70px;
    background: var(--bg-sidebar);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 30px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.4);
    z-index: 1100;
    transition: top 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border-bottom: 4px solid var(--accent);
}

#bulk-actions-container.is-visible {
    top: 0;
}

#selected-count-badge {
    font-size: 1rem !important;
    padding: 0.5rem 1rem !important;
    background: var(--accent) !important;
    color: var(--bg-sidebar) !important;
    font-weight: 800 !important;
    border-radius: 4px !important;
    text-transform: uppercase;
}

#bulk-step-select {
    min-width: 300px;
    height: 40px;
    border-radius: 4px;
    font-weight: 600;
    border: 2px solid var(--accent);
}

/* ==========================================================
   16. IA MODULE
   ========================================================== */
.ia-stepper {
    display: flex;
    justify-content: space-between;
    background: #fff;
    padding: 1rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
}

.ia-card {
    border: none !important;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075) !important;
    transition: transform 0.2s ease;
}

.ia-card:hover {
    transform: translateY(-2px);
}

.ia-console {
    background: #0f172a !important;
    border-radius: 12px;
    padding: 1.5rem;
    color: #38bdf8 !important;
    font-family: 'Fira Code', monospace;
    border: 1px solid #1e293b;
}

.btn-ia-magic {
    background: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
    color: white !important;
    border: none;
    font-weight: 600;
}

.btn-ia-magic:hover {
    opacity: 0.9;
    box-shadow: 0 4px 12px rgba(168, 85, 247, 0.4);
}

/* ==========================================================
   17. NOTIFICACIONES
   ========================================================== */
.admin-notifier {
    position: fixed;
    top: 90px;
    right: 1.5rem;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    align-items: flex-end;
}

.admin-notice {
    padding: 0.8rem 1.2rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    font-size: 0.9rem;
    font-weight: 600;
    opacity: 0;
    transform: translateX(20px);
    animation: fadeInSlide 0.3s ease-out forwards;
}

.admin-notice.success {
    background-color: #dcfce7; 
    color: #166534;
}

.admin-notice.error {
    background-color: #fee2e2; 
    color: #991b1b;
}

.admin-notice.loading {
    background-color: #fef9c3; 
    color: #854d0e;
}

/* ==========================================================
   18. CLASES DE VISIBILIDAD (Admin vs Panel)
   ========================================================== */

/* Ocultar en panel de colaborador */
.panel-scope .admin-only {
    display: none !important;
}

/* Ocultar en panel de admin */
.admin-scope .collaborator-only {
    display: none !important;
}

/* Estados de Feedback para Panel */
.panel-scope .card-module.status-feedback {
    border-left: 4px solid var(--accent);
    background: #f8fafc;
}

.panel-scope .card-module.status-feedback.pendiente {
    border-left-color: #f59e0b;
    background: #fffbeb;
}

.panel-scope .card-module.status-feedback.pendiente .card-title {
    color: #b45309;
}

.panel-scope .card-module.status-feedback.rechazado {
    border-left-color: #ef4444;
    background: #fee2e2;
}

.panel-scope .card-module.status-feedback.rechazado .card-title {
    color: #991b1b;
}

.panel-scope .card-module.status-feedback.activo {
    border-left-color: #22c55e;
    background: #f0fdf4;
}

.panel-scope .card-module.status-feedback.activo .card-title {
    color: #15803d;
}

/* ==========================================================
   19. UTILIDADES Y ANIMACIONES
   ========================================================== */
.muted {
    color: var(--text-muted);
    font-size: 0.875rem;
}

.sort-link {
    color: var(--text-dark);
    display: inline-block;
    width: 100%;
}

.sort-link.active {
    color: var(--primary);
    font-weight: bold;
}

.sort-link:hover {
    color: var(--primary);
}

/* Animaciones */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInSlide {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ==========================================================
   20. RESPONSIVE (SANEADO ULTRA-SLIM v2.1.0 - PSTD 2026)
   ========================================================== */

/* 1. ESTADOS GLOBALES */
.view-mobile-only { display: none !important; }

/* 2. REGLAS PARA MÓVILES Y TABLETS */
@media (max-width: 900px) {
    /* --- Layout & Sidebar --- */
    .admin-header { padding-left: 70px !important; }
    .admin-sidebar { position: fixed !important; left: -300px; z-index: 1250; transition: left 0.4s; }
    .admin-sidebar.active { left: 0 !important; }
    .sidebar-mobile-toggle { display: flex !important; z-index: 1300; }
    .admin-main-content { margin-left: 0 !important; }
    .admin-page-content { padding: 10px !important; }

    /* --- Visibilidad de Vistas --- */
    .view-desktop-only, 
    .controls-bar-v2, 
    .toolbar-container, 
    .mobile-hidden { display: none !important; }
    
    .view-mobile-only { display: block !important; visibility: visible !important; }

    /* --- Tarjetas Móviles (Cards) --- */
    .mobile-cards-container { margin-top: 15px; }
    
    .mobile-row-card {
        background: #fff;
        border-radius: 12px;
        border: 1px solid #e2e8f0;
        margin-bottom: 12px;
        padding: 16px;
        box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    }

    /* --- Botonera Minimalista (Target 44px) --- */
    .mob-footer-actions-minimal {
        display: flex;
        justify-content: flex-end;
        gap: 10px;
        margin-top: 15px;
        border-top: 1px solid #f1f5f9;
        padding-top: 15px;
    }

    .btn-mob-minimal {
        width: 44px;
        height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 8px;
        border: 1px solid #e2e8f0;
        background: #f8fafc;
        font-size: 1.1rem;
        cursor: pointer;
        transition: all 0.2s ease;
    }

    /* --- Colores de Estado (Switcher) --- */
    .btn-mob-minimal.edit-btn { color: #475569; }
    
    /* Activo: Verde PSTD */
    .btn-mob-minimal.toggle-btn.active {
        background-color: #10b981; 
        color: white;
        border-color: #059669;
    }

    /* Inactivo: Rojo Alerta */
    .btn-mob-minimal.toggle-btn.inactive {
        background-color: #ef4444; 
        color: white;
        border-color: #dc2626;
    }

    .btn-mob-minimal:active { transform: scale(0.95); }

    /* --- Iconos de Contacto superiores --- */
    .contact-icons-compact { display: flex; gap: 5px; justify-content: flex-start; }
    .contact-icon {
        width: 40px;
        height: 40px;
        border-radius: 6px;
        display: flex;
        align-items: center;
        justify-content: center;
        background: #f1f5f9;
        color: #94a3b8;
        border: 1px solid #e2e8f0;
    }
    .contact-icon.active { background: var(--accent); color: white; border-color: var(--accent); }
}
/* ==========================================================
   21. MÉTRICAS DE LICENCIAS (SaaS B2B)
   ========================================================== */
.license-metrics-list { 
    list-style: none; 
    padding: 0; 
    margin: 0; 
}

.license-metric-item { 
    margin-bottom: 1.5rem; 
}

.license-metric-header { 
    display: flex; 
    justify-content: space-between; 
    align-items: flex-end; 
    margin-bottom: 0.5rem; 
}

.license-metric-title { 
    font-weight: 600; 
    color: var(--text-muted); 
    font-size: 0.95rem; 
}

.license-metric-title i { 
    width: 20px; 
    text-align: center; 
    margin-right: 6px; 
}

.license-metric-stats { 
    text-align: right; 
}

.license-metric-stats .current { 
    font-size: 1.25rem; 
    font-weight: 700; 
}

.license-metric-stats .limit { 
    font-size: 0.85rem; 
    color: var(--text-muted); 
    margin-left: 4px;
}

/* Barra de progreso */
.license-progress-bg { 
    height: 8px; 
    background-color: var(--border-color); 
    border-radius: 10px; 
    overflow: hidden; 
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.05); 
}

.license-progress-fill { 
    height: 100%; 
    border-radius: 10px; 
    transition: width 0.5s ease; 
}

/* Colores de estado semánticos */
.fill-safe { background-color: var(--success); }
.fill-warning { background-color: var(--warning); }
.fill-danger { 
    background-color: var(--danger); 
    background-image: linear-gradient(45deg, rgba(255,255,255,.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,.15) 50%, rgba(255,255,255,.15) 75%, transparent 75%, transparent); 
    background-size: 1rem 1rem; 
}

.text-status-safe { color: var(--text-dark); }
.text-status-warning { color: var(--warning); }
.text-status-danger { color: var(--danger); }

/* Lista de Activos Ilimitados */
.unlimited-assets-list { 
    display: flex; 
    flex-direction: column; 
    gap: 0.75rem; 
    padding: 0; 
    margin: 0; 
    list-style: none; 
}

.unlimited-asset-item { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    padding: 0.85rem 1.25rem; 
    background: var(--bg-content); 
    border: 1px solid var(--border-color); 
    border-radius: var(--radius); 
    transition: var(--transition);
}

.unlimited-asset-item:hover {
    border-color: var(--accent);
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.unlimited-asset-title { 
    font-weight: 600; 
    color: var(--text-dark); 
    font-size: 0.9rem; 
}

.unlimited-asset-title i { 
    color: var(--text-muted); 
    width: 24px; 
    text-align: center; 
    margin-right: 8px; 
}

.unlimited-asset-badge { 
    background: var(--bg-card); 
    color: var(--text-dark); 
    border: 1px solid var(--border-color); 
    font-size: 0.9rem; 
    padding: 4px 12px; 
    border-radius: 20px; 
    font-weight: 600; 
    box-shadow: 0 1px 2px rgba(0,0,0,0.05); 
}
/* ==========================================================
   22. APP DE CAMPO - OPTIMIZACIÓN TÁCTIL (TABLET)
   Uso: Aplicar clase .fieldwork-app al body de field_app.php
   ========================================================== */

/* Alcance específico para no romper el admin estándar */
.fieldwork-app {
    background-color: #f1f5f9; /* Fondo gris muy suave para resaltar tarjetas */
}

/* Tarjetas de auditoría más espaciosas */
.fieldwork-app .field-card {
    background: #ffffff;
    border-radius: 16px;
    border: 1px solid var(--border-color);
    padding: 2rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow);
}

/* Etiquetas de pregunta premium */
.fieldwork-app .field-label {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 1rem;
    display: block;
}

/* Inputs gigantes para dedos (Target: 60px altura) */
.fieldwork-app .app-input {
    height: 60px;
    font-size: 1.2rem;
    padding: 0 1.5rem;
    border-radius: 12px;
    border: 2px solid #cbd5e1;
    width: 100%;
    transition: var(--transition);
}

.fieldwork-app textarea.app-input {
    height: auto;
    min-height: 120px;
    padding: 1.2rem;
}

.fieldwork-app .app-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(214, 163, 84, 0.1);
    outline: none;
}

/* Botones de acción masivos */
.fieldwork-app .app-btn {
    height: 65px;
    border-radius: 14px;
    font-size: 1.3rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    gap: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* Contenedor de firma digital */
.fieldwork-app .signature-wrapper {
    background: #f8fafc;
    border: 2px dashed #cbd5e1;
    border-radius: 12px;
    overflow: hidden;
}

/* Barra inferior flotante (Sticky Footer) */
.fieldwork-app .floating-bottom-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px); /* Efecto cristal moderno */
    border-top: 1px solid var(--border-color);
    z-index: 1000;
}