:root {
    --bg-dark: #0f172a;
    --bg-panel: #1e293b;
    --bg-card: #ffffff;
    --bg-body: #f1f5f9;
    --text-main: #334155;
    --text-muted: #64748b;
    --text-light: #f8fafc;
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --border-color: #e2e8f0;
    --radius: 8px;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --transition: all 0.3s ease;
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Segoe UI', system-ui, sans-serif; }

body { background-color: var(--bg-body); color: var(--text-main); display: flex; height: 100vh; overflow: hidden; }

/* SIDEBAR */
.sidebar { width: 260px; background-color: var(--bg-dark); color: var(--text-light); display: flex; flex-direction: column; }
.sidebar-brand { padding: 20px; font-size: 1.5rem; font-weight: bold; border-bottom: 1px solid rgba(255,255,255,0.1); display: flex; align-items: center; gap: 10px; color: var(--primary); }
.sidebar-nav { padding: 20px 0; overflow-y: auto; flex: 1; }
.nav-item { padding: 15px 20px; cursor: pointer; display: flex; align-items: center; gap: 12px; transition: var(--transition); border-left: 4px solid transparent; color: #cbd5e1; }
.nav-item:hover { background-color: var(--bg-panel); color: white; }
.nav-item.active { background-color: var(--bg-panel); border-left-color: var(--primary); color: white; font-weight: 600; }

/* MAIN CONTENT */
.main-content { flex: 1; display: flex; flex-direction: column; overflow: hidden; }

/* TOPBAR & TABS */
.topbar { background-color: var(--bg-card); padding: 20px 30px 0; border-bottom: 1px solid var(--border-color); }
.profile-title { font-size: 1.8rem; margin-bottom: 15px; color: var(--bg-dark); }
.tabs-container, .sub-tabs-container { display: flex; gap: 20px; border-bottom: 2px solid var(--border-color); }
.sub-tabs-container { margin-top: 10px; border-bottom: none; }
.tab { padding: 10px 15px; cursor: pointer; font-weight: 500; color: var(--text-muted); border-bottom: 2px solid transparent; margin-bottom: -2px; transition: var(--transition); }
.tab:hover { color: var(--primary); }
.tab.active { color: var(--primary); border-bottom-color: var(--primary); }
.sub-tab { font-size: 0.9rem; padding: 6px 12px; border-radius: 20px; background: var(--bg-body); color: var(--text-muted); cursor: pointer; }
.sub-tab.active { background: var(--primary); color: white; }

/* BOARD & CARDS */
.assistants-board { padding: 30px; flex: 1; overflow-y: auto; }
.board-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.grid-container { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 20px; }

.card { background: var(--bg-card); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 10px; border: 1px solid var(--border-color); transition: var(--transition); }
.card:hover { transform: translateY(-3px); box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1); }
.card-header { display: flex; justify-content: space-between; align-items: flex-start; }
.card-title { font-size: 1.1rem; font-weight: bold; color: var(--bg-dark); }
.card-desc { font-size: 0.9rem; color: var(--text-muted); line-height: 1.4; flex: 1; }
.tag { font-size: 0.75rem; padding: 3px 8px; border-radius: 12px; font-weight: bold; white-space: nowrap; }

/* BUSCADOR EN TIEMPO REAL */
.board-actions { display: flex; gap: 15px; align-items: center; flex-wrap: wrap; }
.search-box { position: relative; }
.search-box i { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--text-muted); font-size: 0.9rem; }
.search-box input { padding: 10px 15px 10px 35px; border: 1px solid var(--border-color); border-radius: var(--radius); outline: none; width: 220px; transition: var(--transition); background-color: var(--bg-body); font-size: 0.9rem; color: var(--text-main); }
.search-box input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37,99,235,0.1); width: 280px; background-color: var(--bg-card); }

/* BOTONES */
.btn-primary, .btn-secondary, .btn-copy { padding: 10px 20px; border-radius: var(--radius); border: none; cursor: pointer; font-weight: 600; display: inline-flex; align-items: center; gap: 8px; transition: var(--transition); font-size: 0.9rem;}
.btn-primary { background-color: var(--primary); color: white; }
.btn-primary:hover { background-color: var(--primary-hover); }
.btn-secondary { background-color: var(--bg-body); color: var(--text-main); border: 1px solid var(--border-color); }
.btn-secondary:hover { background-color: #e2e8f0; }
.btn-copy { background-color: #10b981; color: white; width: 100%; justify-content: center; margin-top: 10px; }
.btn-copy:hover { background-color: #059669; }

/* MODALS */
.modal-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(15, 23, 42, 0.7); backdrop-filter: blur(4px); display: flex; justify-content: center; align-items: center; z-index: 1000; opacity: 1; transition: opacity 0.2s; }
.modal-overlay.hidden { display: none; opacity: 0; }
.modal-content { background: var(--bg-card); width: 90%; max-width: 500px; border-radius: var(--radius); box-shadow: 0 25px 50px -12px rgba(0,0,0,0.25); display: flex; flex-direction: column; max-height: 90vh; }
.modal-lg { max-width: 800px; }
.modal-header { padding: 20px; border-bottom: 1px solid var(--border-color); display: flex; justify-content: space-between; align-items: center; }
.modal-body { padding: 20px; overflow-y: auto; }
.btn-close { background: none; border: none; font-size: 1.5rem; cursor: pointer; color: var(--text-muted); }
.btn-close:hover { color: #ef4444; }

/* FORMS & PROMPTS */
.form-group { margin-bottom: 15px; }
.form-group label { display: block; font-size: 0.85rem; font-weight: 600; margin-bottom: 5px; color: var(--bg-dark); }
.form-group input, .form-group select, .form-group textarea { width: 100%; padding: 10px; border: 1px solid var(--border-color); border-radius: 4px; font-family: inherit; outline: none; }
.form-group input:focus, .form-group textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37,99,235,0.1); }
.prompt-box textarea { width: 100%; height: 250px; padding: 15px; background: var(--bg-body); border: 1px solid var(--border-color); border-radius: var(--radius); font-family: 'Consolas', monospace; font-size: 0.9rem; resize: none; color: var(--text-main); line-height: 1.5; }
.prompt-desc { margin-bottom: 15px; color: var(--text-muted); font-style: italic; }
.form-actions { margin-top: 20px; display: flex; justify-content: flex-end; }


/* CONFIGURACIONES ADICIONALES (GENESIS FIXES) */
.config-btn { color: var(--text-muted); transition: var(--transition); }
.config-btn:hover { color: white; transform: rotate(90deg); }
.card-desc, .prompt-desc { white-space: pre-wrap; /* Mantiene los saltos de línea de tus recetas */ }

/* UTILIDADES DE COLOR PARA LAS ETIQUETAS (TAGS) */
.bg-blue-600 { background-color: #2563eb; }
.bg-green-500 { background-color: #10b981; }
.bg-yellow-500 { background-color: #eab308; }
.bg-red-500 { background-color: #ef4444; }
.bg-purple-500 { background-color: #a855f7; }
.text-white { color: #ffffff; }
.text-black { color: #000000; }

/* EFECTO ENLACE EN TARJETAS */
.card-title-link { text-decoration: none; display: block; flex: 1; padding-right: 10px; }
.hover-link { color: var(--bg-dark); transition: var(--transition); }
.hover-link:hover { color: var(--primary); text-decoration: underline; }