
/* ===== Obrero Portal: Asistente Documental ===== */
.obrero-ai-page{min-height:100vh;background:#111;color:#eee;padding:24px;font-family:inherit}.obrero-ai-header{max-width:1380px;margin:auto;display:grid;grid-template-columns:auto 58px 1fr auto;align-items:center;gap:14px;padding:14px 18px;border:1px solid #343434;border-radius:20px;background:#191919}.obrero-ai-header img{width:58px;height:58px;object-fit:contain}.obrero-ai-header p,.obrero-ai-header h1{margin:0}.obrero-ai-header p{font-size:.78rem;letter-spacing:.14em;text-transform:uppercase;color:#b99b58}.obrero-ai-header h1{font-size:1.35rem}.obrero-ai-header button,.obrero-ai-back{border:1px solid #6f5b31;border-radius:999px;padding:10px 15px;background:#211c13;color:#e6cf98;text-decoration:none;cursor:pointer}.obrero-ai-intro{max-width:1380px;margin:24px auto;padding:30px;border:1px solid #303030;border-radius:24px;background:linear-gradient(135deg,#1d1d1d,#151515)}.obrero-ai-intro h2{font-size:clamp(1.8rem,4vw,3.2rem);margin:12px 0}.obrero-ai-intro p{max-width:800px;color:#bdbdbd;line-height:1.65}.obrero-ai-badge{display:inline-block;border:1px solid #725e34;color:#e2c785;border-radius:999px;padding:7px 12px;font-size:.78rem}.obrero-ai-layout{max-width:1380px;margin:auto;display:grid;grid-template-columns:280px 1fr;gap:20px}.obrero-ai-sidebar,.obrero-ai-chat{border:1px solid #303030;border-radius:24px;background:#181818}.obrero-ai-sidebar{padding:20px;height:max-content}.obrero-ai-sidebar label{display:grid;gap:8px;margin-bottom:18px;color:#ddd}.obrero-ai-sidebar select{width:100%;padding:12px;border-radius:12px;border:1px solid #3d3d3d;background:#111;color:#eee}.obrero-ai-check{grid-template-columns:auto 1fr!important;align-items:center}.obrero-ai-rules{margin-top:20px;padding:16px;border-radius:16px;background:#111;border:1px solid #2e2e2e}.obrero-ai-rules p{color:#aaa;line-height:1.5}.obrero-ai-admin-link{width:100%;margin-top:16px;padding:11px;border-radius:12px;border:1px solid #725e34;background:#241f16;color:#e6cf98}.obrero-ai-chat{display:grid;grid-template-rows:auto minmax(420px,65vh) auto;overflow:hidden}.obrero-ai-status{padding:12px 18px;border-bottom:1px solid #303030;color:#aaa;font-size:.9rem}.obrero-ai-status[data-type="success"]{color:#afcfad}.obrero-ai-status[data-type="error"]{color:#e5a8a8}.obrero-ai-messages{padding:22px;overflow:auto}.obrero-ai-message{display:flex;gap:12px;margin:0 0 20px;align-items:flex-start}.obrero-ai-message.is-user{flex-direction:row-reverse}.obrero-ai-avatar{width:38px;height:38px;flex:0 0 38px;border-radius:50%;display:grid;place-items:center;background:#2a2316;border:1px solid #776238;color:#e4ca88;font-weight:700}.obrero-ai-bubble{max-width:min(780px,85%);padding:15px 17px;border-radius:18px;background:#222;border:1px solid #343434;line-height:1.65}.is-user .obrero-ai-bubble{background:#2a2418;border-color:#68562f}.obrero-ai-bubble p{margin:0;white-space:pre-wrap}.obrero-ai-citations{display:grid;gap:8px;margin-top:14px;padding-top:14px;border-top:1px solid #3a3a3a}.obrero-ai-citation{display:block;padding:9px 11px;border-radius:10px;background:#151515;color:#d9c48e;text-decoration:none;font-size:.87rem}.obrero-ai-form{padding:18px;border-top:1px solid #303030;background:#151515}.obrero-ai-form textarea{width:100%;resize:vertical;box-sizing:border-box;padding:14px;border-radius:15px;border:1px solid #424242;background:#0f0f0f;color:#fff;font:inherit}.obrero-ai-form>div{display:flex;justify-content:space-between;gap:14px;align-items:center;margin-top:10px}.obrero-ai-form small{color:#8f8f8f}.obrero-ai-form button{padding:12px 18px;border:1px solid #806b3c;border-radius:999px;background:#2b2417;color:#ecd79e;font-weight:700}.obrero-ai-gate{min-height:100vh;background:#111;color:#eee;display:grid;place-content:center;text-align:center;padding:30px}.obrero-ai-gate img{width:110px;margin:auto}.obrero-ai-nav-card{border-color:#705c34!important;background:linear-gradient(135deg,rgba(91,72,36,.28),rgba(26,26,26,.95))!important}
@media(max-width:800px){.obrero-ai-page{padding:10px}.obrero-ai-header{grid-template-columns:auto 44px 1fr}.obrero-ai-header img{width:44px;height:44px}.obrero-ai-header>button{display:none}.obrero-ai-header h1{font-size:1rem}.obrero-ai-intro{padding:22px 18px}.obrero-ai-layout{grid-template-columns:1fr}.obrero-ai-sidebar{display:none}.obrero-ai-chat{grid-template-rows:auto minmax(52vh,1fr) auto}.obrero-ai-form>div{align-items:stretch;flex-direction:column}.obrero-ai-form button{width:100%}.obrero-ai-bubble{max-width:88%}}

/* Ministry GPT v4 enhancements */
.obrero-ai-header-actions{display:flex;gap:.55rem;align-items:center}.obrero-ai-header-actions button{white-space:nowrap}
.obrero-ai-header-actions [hidden]{display:none!important}
.obrero-ai-message-tools{display:flex;gap:.45rem;margin-top:.7rem}.obrero-ai-message-tools button{border:1px solid rgba(145,112,35,.25);background:rgba(255,255,255,.65);border-radius:999px;padding:.35rem .7rem;font-size:.78rem;cursor:pointer}
.obrero-ai-citations{display:grid;gap:.55rem;margin-top:.85rem}.obrero-ai-citation{display:flex;gap:.7rem;align-items:flex-start;text-decoration:none;border:1px solid rgba(145,112,35,.2);background:rgba(255,252,243,.8);padding:.7rem;border-radius:14px;color:inherit}.obrero-ai-citation>span{display:grid;place-items:center;min-width:1.65rem;height:1.65rem;border-radius:50%;background:#9a7830;color:white;font-weight:700}.obrero-ai-citation div{display:grid;gap:.15rem}.obrero-ai-citation small{opacity:.72}.obrero-ai-citation:hover{transform:translateY(-1px);box-shadow:0 8px 20px rgba(60,45,15,.08)}

@media(max-width:800px){
  .obrero-ai-page{min-height:100svh;padding:8px!important}
  .obrero-ai-header{grid-template-columns:auto 38px 1fr!important;gap:10px!important;border-radius:14px!important;padding:10px!important}
  .obrero-ai-header-actions{grid-column:1/-1;display:flex!important;width:100%;gap:8px}
  .obrero-ai-header-actions button{flex:1;display:inline-flex!important;justify-content:center}
  .obrero-ai-intro{display:none}
  .obrero-ai-layout{display:grid!important;grid-template-columns:1fr!important;gap:10px!important;margin-top:10px!important}
  .obrero-ai-sidebar{display:grid!important;grid-template-columns:1fr!important;gap:10px!important;padding:12px!important;border-radius:14px!important}
  .obrero-ai-sidebar label{margin:0!important}
  .obrero-ai-rules{display:none!important}
  .obrero-ai-admin-link{margin-top:0!important}
  .obrero-ai-chat{min-height:calc(100svh - 280px)!important;grid-template-rows:auto minmax(300px,1fr) auto!important;border-radius:14px!important}
  .obrero-ai-messages{padding:12px!important}
  .obrero-ai-bubble{max-width:92%!important;padding:12px!important}
  .obrero-ai-form{padding:12px!important;position:sticky;bottom:0;z-index:3}
  .obrero-ai-form textarea{min-height:96px!important;font-size:16px!important}
  .obrero-ai-form small{display:block;line-height:1.35}
}
@media(max-width:720px){.obrero-ai-header-actions{width:100%;justify-content:flex-end}.obrero-ai-header-actions button{font-size:.78rem;padding:.55rem .7rem}}

/* Zona Ministry Research AI 4.0 */
.obrero-ai-confidence{margin:0 0 14px;padding:12px 14px;border-radius:15px;border:1px solid #4a412d;background:linear-gradient(135deg,#1e1b14,#151515)}
.obrero-ai-confidence>div:first-child{display:flex;justify-content:space-between;gap:12px;align-items:center}.obrero-ai-confidence span{font-size:.75rem;text-transform:uppercase;letter-spacing:.1em;color:#bba66f}.obrero-ai-confidence strong{font-size:.88rem;color:#ead69f}.obrero-ai-confidence small{display:block;margin-top:7px;color:#a9a9a9}.obrero-ai-confidence-bar{height:6px!important;margin-top:9px;border-radius:999px;background:#333;overflow:hidden}.obrero-ai-confidence-bar i{display:block;height:100%;border-radius:inherit;background:linear-gradient(90deg,#8f6d24,#ead18f)}
.obrero-ai-confidence.is-high{border-color:#456b4c}.obrero-ai-confidence.is-medium{border-color:#776232}.obrero-ai-confidence.is-low{border-color:#704242}
.obrero-ai-evidence{display:flex;flex-wrap:wrap;gap:9px;margin-top:14px;padding:12px;border:1px solid #333;border-radius:14px;background:#171717}.obrero-ai-evidence>div{display:flex;gap:5px;align-items:baseline}.obrero-ai-evidence strong{color:#e2c781}.obrero-ai-evidence small{color:#999}.obrero-ai-evidence-collections{flex:1;justify-content:flex-end;flex-wrap:wrap}.obrero-ai-evidence-collections span{font-size:.72rem;padding:4px 8px;border-radius:999px;background:#242016;color:#cdb77d}
.obrero-ai-citations>strong{font-size:.82rem;color:#cbb576}.obrero-ai-citation{display:block!important;padding:0!important;background:#151515!important;color:#ddd!important;border:1px solid #333!important;overflow:hidden}.obrero-ai-citation summary{display:grid;grid-template-columns:auto 1fr auto;gap:10px;align-items:center;padding:11px;cursor:pointer;list-style:none}.obrero-ai-citation summary::-webkit-details-marker{display:none}.obrero-ai-citation summary>span{display:grid;place-items:center;width:28px;height:28px;border-radius:50%;background:#80662c;color:#fff}.obrero-ai-citation summary div{display:grid}.obrero-ai-citation summary small{color:#999}.obrero-ai-citation summary b{font-size:.72rem;color:#c9b274}.obrero-ai-citation-body{padding:0 12px 12px;border-top:1px solid #2b2b2b}.obrero-ai-citation-body p{margin:12px 0!important;color:#bbb;font-size:.88rem;line-height:1.55}.obrero-ai-citation-body a{display:inline-block;color:#e0c47c;text-decoration:none;font-size:.82rem}.obrero-ai-related{display:grid;gap:8px;margin-top:14px}.obrero-ai-related>strong{font-size:.82rem;color:#cbb576}.obrero-ai-related button{width:100%;text-align:left;border:1px solid #38332a;background:#1b1915;color:#d6d0c1;border-radius:12px;padding:10px 12px;cursor:pointer}.obrero-ai-related button:hover{border-color:#806b3c;background:#242017}
@media(max-width:700px){.obrero-ai-confidence>div:first-child{align-items:flex-start;flex-direction:column;gap:3px}.obrero-ai-citation summary{grid-template-columns:auto 1fr}.obrero-ai-citation summary b{grid-column:2}.obrero-ai-evidence-collections{justify-content:flex-start;flex-basis:100%}}
.obrero-ai-artifact-tools{display:flex;flex-wrap:wrap;gap:10px;margin-top:14px;padding-top:12px;border-top:1px solid rgba(200,162,74,.25)}.obrero-ai-artifact-tools button,.obrero-ai-artifact-download{appearance:none;border:1px solid rgba(200,162,74,.58);border-radius:8px;background:linear-gradient(135deg,#3b260f,#201306);color:#f2d68a;padding:10px 14px;font:800 .78rem/1 Arial,sans-serif;letter-spacing:.04em;cursor:pointer;text-decoration:none}.obrero-ai-artifact-tools button:hover,.obrero-ai-artifact-tools button:focus-visible,.obrero-ai-artifact-download:hover,.obrero-ai-artifact-download:focus-visible{border-color:#f2d68a;background:#4a331e;color:#fff}.obrero-ai-artifact-note{display:block;margin-top:7px;color:#75664d;font-size:.74rem}
.obrero-ai-source-actions{display:flex;flex-wrap:wrap;gap:8px}.obrero-ai-source-actions a{padding:8px 11px;border:1px solid #806b3c;border-radius:999px;background:#211c12}
