@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Exo+2:wght@700;800&display=swap');

/* ══════════════════════════════════════════
   VARIABLES CELESTE AGUA / TEAL
══════════════════════════════════════════ */
:root {
  --integra-primary:   #0097A7;
  --integra-light:     #B2EBF2;
  --integra-dark:      #006064;
  --integra-accent:    #00BCD4;
  --integra-bg:        linear-gradient(135deg,#e0f7fa 0%,#b2ebf2 50%,#e0f7fa 100%);
  --integra-hover:     #fce4ec20;
}

/* RESET & BASE */
.gad-wrap * { box-sizing:border-box; margin:0; padding:0; }
.gad-wrap { font-family:'Inter',sans-serif; font-size:14px; color:#333; min-height:100vh; background:var(--integra-bg); }
#wpcontent { padding-left:0 !important; }
#wpbody-content { padding-bottom:0; }

/* TOPBAR */
.gad-topbar { display:flex; align-items:center; background:var(--integra-primary); padding:0 20px; height:48px; gap:16px; box-shadow:0 2px 8px rgba(0,0,0,.2); position:sticky; top:32px; z-index:100; }
.gad-logo { font-family:'Exo 2',sans-serif; color:#fff; font-size:22px; letter-spacing:2px; margin-right:12px; font-weight:800; text-transform:uppercase; }
.gad-topbar-nav { display:flex; gap:4px; flex:1; }
.gad-nav-item { color:#fff; text-decoration:none; padding:6px 14px; border-radius:4px; font-size:13px; font-weight:500; transition:background .2s; position:relative; cursor:pointer; }
.gad-nav-item:hover { background:rgba(255,255,255,.2); color:#fff; }
.gad-nav-dropdown { position:relative; }
.gad-dropdown-menu { display:none; position:absolute; top:100%; left:0; background:#fff; border-radius:6px; box-shadow:0 4px 20px rgba(0,0,0,.15); min-width:160px; z-index:200; overflow:hidden; }
.gad-nav-dropdown:hover .gad-dropdown-menu { display:block; }
.gad-dropdown-menu a { display:block; padding:10px 16px; color:#333; text-decoration:none; font-size:13px; transition:background .15s; }
.gad-dropdown-menu a:hover { background:#e0f7fa; }
.gad-topbar-right { display:flex; align-items:center; gap:12px; margin-left:auto; overflow:visible; }
.gad-search-input { border:none; border-radius:20px; padding:5px 14px; font-size:13px; background:rgba(255,255,255,.9); width:200px; outline:none; }
.gad-search-input:focus { background:#fff; box-shadow:0 0 0 2px rgba(255,255,255,.5); }
.gad-user-name { color:#fff; font-size:13px; font-weight:500; }
.gad-logout-btn { color:#fff; text-decoration:none; font-size:13px; opacity:.8; transition:opacity .2s; }
.gad-logout-btn:hover { opacity:1; color:#fff; }

/* CONTENT */
.gad-content { padding:20px; max-width:1600px; }
.gad-detalle-layout { display:grid; grid-template-columns:1fr 280px; gap:20px; align-items:start; }

/* CARDS & STATS */
.gad-stats-row { display:flex; gap:16px; margin-bottom:20px; flex-wrap:wrap; }
.gad-stats-card { background:#fff; border-radius:12px; padding:20px; flex:2; box-shadow:0 2px 12px rgba(0,0,0,.08); }
.gad-agregar-card,.gad-filtros-card { background:#fff; border-radius:12px; padding:20px; flex:1; box-shadow:0 2px 12px rgba(0,0,0,.08); }
.gad-agregar-card h4,.gad-filtros-card h4 { font-size:14px; color:#666; margin-bottom:12px; font-weight:600; }
.gad-counters { display:flex; gap:24px; justify-content:center; align-items:center; }
.gad-counter-item { display:flex; flex-direction:column; align-items:center; gap:8px; }
.gad-counter-label { font-size:12px; color:#888; font-weight:500; }
.gad-donut { width:80px; height:80px; }
.gad-donut-sm { width:50px; height:50px; }
.gad-expand-btn { text-align:center; color:#bbb; cursor:pointer; margin-top:10px; font-size:18px; transition:transform .2s; }
.gad-expand-btn.open { transform:rotate(180deg); }
.gad-estados-bar { display:flex; gap:20px; flex-wrap:wrap; background:#fff; border-radius:12px; padding:16px 20px; margin-bottom:20px; box-shadow:0 2px 12px rgba(0,0,0,.08); }
.gad-estado-chip { display:flex; flex-direction:column; align-items:center; gap:4px; font-size:12px; color:#666; }

/* FILTROS */
.gad-filter-row { display:flex; align-items:center; gap:10px; margin-bottom:10px; }
.gad-filter-row label { font-size:12px; color:#888; min-width:55px; }

/* TABLA */
.gad-table-wrap { background:#fff; border-radius:12px; overflow:auto; box-shadow:0 2px 12px rgba(0,0,0,.08); margin-bottom:12px; }
.gad-table { width:100%; border-collapse:collapse; font-size:13px; }
.gad-table thead tr { background:linear-gradient(90deg,var(--integra-accent),var(--integra-primary)); }
.gad-table thead th { color:#fff; padding:10px 14px; text-align:left; font-weight:600; font-size:12px; white-space:nowrap; }
.gad-table tbody tr { border-bottom:1px solid #e0f7fa; transition:background .15s; }
.gad-table tbody tr:hover { background:#e0f7fa; }
.gad-table tbody td { padding:9px 14px; color:#444; white-space:nowrap; }
.gad-table-sm .gad-table tbody td { padding:7px 10px; font-size:12px; }
.gad-row-clickable { cursor:pointer; }
.gad-nombre-cliente { font-weight:500; color:var(--integra-primary); }
.gad-table-controls { display:flex; justify-content:space-between; align-items:center; margin-bottom:10px; font-size:13px; color:#666; }

/* BADGES & ESTADOS */
.gad-estado-badge { display:inline-block; padding:3px 10px; border-radius:20px; font-size:11px; font-weight:700; letter-spacing:.5px; background:#e0f7fa; color:#006064; }
.gad-estado-REV { background:#fff9c4; color:#f57f17; }
.gad-estado-VER { background:#e3f2fd; color:#1565c0; }
.gad-estado-ANA { background:#f3e5f5; color:#7b1fa2; }
.gad-estado-FIR { background:#e8f5e9; color:#2e7d32; }
.gad-estado-LIQ { background:#e0f7fa; color:#00695c; }
.gad-estado-DES { background:#fce4ec; color:#c62828; }
.gad-estado-DESC { background:#f5f5f5; color:#757575; }
.gad-estado-INI { background:#fff3e0; color:#e65100; }
.gad-estado-sin { background:#f5f5f5; color:#9e9e9e; }
.gad-badge { display:inline-block; padding:3px 10px; border-radius:20px; font-size:11px; font-weight:600; }
.gad-badge-success { background:#e8f5e9; color:#388e3c; }
.gad-badge-danger  { background:#fce4ec; color:#c62828; }
.gad-dot { display:inline-block; width:12px; height:12px; border-radius:50%; }
.gad-dot-green { background:#4CAF50; }
.gad-dot-red   { background:#F44336; }

/* PAGINACIÓN */
.gad-pagination { display:flex; align-items:center; gap:8px; padding:10px 0; font-size:13px; }
#gad-pag-info { color:#888; font-size:13px; }

/* FORMULARIOS */
.gad-input { border:1px solid #e0e0e0; border-radius:6px; padding:7px 12px; font-size:13px; width:100%; color:#333; transition:border-color .2s,box-shadow .2s; background:#fff; font-family:'Inter',sans-serif; }
.gad-input:focus { outline:none; border-color:var(--integra-primary); box-shadow:0 0 0 3px rgba(0,151,167,.15); }
.gad-input[readonly] { background:#f5f5f5; color:#888; }
.gad-input-required { border-color:#ef9a9a !important; }
.gad-input-sm { width:200px; }
.gad-select { border:1px solid #e0e0e0; border-radius:6px; padding:7px 12px; font-size:13px; color:#333; background:#fff; width:100%; cursor:pointer; font-family:'Inter',sans-serif; }
.gad-select:focus { outline:none; border-color:var(--integra-primary); }
.gad-select-sm { width:auto; min-width:120px; }
.gad-textarea { border:1px solid #e0e0e0; border-radius:6px; padding:8px 12px; font-size:13px; width:100%; min-height:80px; resize:vertical; font-family:'Inter',sans-serif; }
.gad-textarea:focus { outline:none; border-color:var(--integra-primary); }
.gad-form-row { margin-bottom:12px; }
.gad-form-row label { display:block; font-size:12px; color:#888; margin-bottom:4px; font-weight:500; }
.gad-form-grid { display:grid; grid-template-columns:1fr 1fr; gap:16px 24px; }
.gad-edit-grid { display:grid; grid-template-columns:1fr 1fr; gap:24px; margin-bottom:20px; }
.gad-edit-col {}
.gad-checkbox-group { display:flex; flex-wrap:wrap; gap:10px; }
.gad-checkbox-group label { font-size:12px; display:flex; align-items:center; gap:4px; cursor:pointer; }

/* BOTONES */
.gad-btn { display:inline-flex; align-items:center; gap:5px; padding:7px 18px; border-radius:6px; font-size:13px; font-weight:600; cursor:pointer; border:none; transition:all .2s; font-family:'Inter',sans-serif; text-decoration:none; }
.gad-btn:hover { transform:translateY(-1px); box-shadow:0 4px 12px rgba(0,0,0,.15); }
.gad-btn:active { transform:translateY(0); }
.gad-btn-primary  { background:#0097A7; color:#fff; }
.gad-btn-primary:hover  { background:#00838F; color:#fff; }
.gad-btn-success  { background:#4CAF50; color:#fff; }
.gad-btn-success:hover  { background:#388E3C; color:#fff; }
.gad-btn-danger   { background:#F44336; color:#fff; }
.gad-btn-danger:hover   { background:#D32F2F; color:#fff; }
.gad-btn-secondary{ background:#9E9E9E; color:#fff; }
.gad-btn-secondary:hover{ background:#757575; color:#fff; }
.gad-btn-warning  { background:#FF9800; color:#fff; }
.gad-btn-warning:hover  { background:#F57C00; color:#fff; }
.gad-btn-cyan     { background:#00BCD4; color:#fff; }
.gad-btn-cyan:hover     { background:#0097A7; color:#fff; }
.gad-btn-sm { padding:5px 12px; font-size:12px; }
.gad-btn-xs { padding:3px 8px; font-size:11px; }

/* MODALES */
.gad-modal { position:fixed; inset:0; z-index:9999; display:flex; align-items:center; justify-content:center; }
.gad-modal-overlay { position:absolute; inset:0; background:rgba(0,0,0,.5); backdrop-filter:blur(2px); }
.gad-modal-box { position:relative; background:#fff; border-radius:16px; padding:32px; max-width:520px; width:90%; box-shadow:0 20px 60px rgba(0,0,0,.3); animation:gadModalIn .25s ease; }
@keyframes gadModalIn { from { opacity:0; transform:scale(.9) translateY(-20px); } to { opacity:1; transform:scale(1) translateY(0); } }
.gad-modal-box h3 { font-size:18px; margin-bottom:20px; color:#333; font-weight:700; }
.gad-modal-close { position:absolute; top:14px; right:14px; background:none; border:none; font-size:18px; cursor:pointer; color:#999; }
.gad-modal-close:hover { color:#F44336; }
.gad-modal-confirm { background:#e0f7fa; border:1px solid #00BCD4; border-radius:8px; padding:12px; font-size:13px; margin:16px 0; color:#006064; }
.gad-modal-actions { display:flex; gap:10px; margin-top:16px; }
.gad-loading { text-align:center; color:var(--integra-primary); padding:20px; font-size:14px; }

/* TABS */
.gad-tabs { display:flex; gap:2px; border-bottom:2px solid #e0f7fa; margin-bottom:16px; }
.gad-tab { background:none; border:none; padding:10px 20px; font-size:13px; font-weight:600; color:#aaa; cursor:pointer; border-bottom:3px solid transparent; margin-bottom:-2px; transition:all .2s; font-family:'Inter',sans-serif; }
.gad-tab.active { color:var(--integra-primary); border-bottom-color:var(--integra-primary); }
.gad-tab:hover { color:var(--integra-dark); background:rgba(0,151,167,.05); border-radius:6px 6px 0 0; }
.gad-tab-content { display:none; }
.gad-tab-content.active { display:block; }

/* PANEL DETALLE CLIENTE */
.gad-panel-main { background:#fff; border-radius:12px; padding:24px; box-shadow:0 2px 12px rgba(0,0,0,.08); }
.gad-panel-lateral { background:#fff; border-radius:12px; padding:20px; box-shadow:0 2px 12px rgba(0,0,0,.08); font-size:13px; position:sticky; top:90px; }
.gad-cliente-header { display:flex; align-items:center; justify-content:space-between; margin-bottom:16px; }
.gad-cliente-title { font-size:15px; font-weight:600; color:#444; display:flex; align-items:center; gap:8px; }
.gad-toggle-btn,.gad-edit-icon { cursor:pointer; color:var(--integra-primary); font-size:16px; }
.gad-toggle-btn:hover,.gad-edit-icon:hover { color:var(--integra-dark); }
.gad-cliente-info-panel { background:#e0f7fa20; border:1px solid #e0f7fa; border-radius:8px; padding:16px; margin-bottom:16px; display:grid; grid-template-columns:1fr 1fr; gap:12px; }
.gad-info-row { display:flex; gap:8px; align-items:center; font-size:13px; margin-bottom:4px; }
.gad-info-row label { color:#888; min-width:70px; font-weight:500; }
.gad-label-estado { font-weight:700; color:var(--integra-primary); font-size:14px; }
.gad-proyecto-selector-bar { display:flex; align-items:center; gap:10px; margin-bottom:16px; font-size:13px; color:#666; }
.gad-proyecto-panel { display:grid; grid-template-columns:1fr 1fr; gap:24px; margin-bottom:20px; padding:16px; background:#fafafa; border-radius:8px; }
.gad-indicadores { display:flex; gap:20px; margin-bottom:12px; }
.gad-indicador { display:flex; flex-direction:column; align-items:center; gap:4px; font-size:12px; font-weight:700; }
.gad-indicador .gad-dot { width:16px; height:16px; }
.gad-indicador.ok { color:#4CAF50; }
.gad-indicador.nok { color:#F44336; }
.gad-indicador small { font-weight:400; color:inherit; }
.gad-docs-solicitados-link { font-size:12px; color:#888; text-decoration:none; display:block; margin-bottom:12px; }
.gad-docs-solicitados-link:hover { color:var(--integra-primary); }
.gad-estado-selector { display:flex; flex-direction:column; gap:8px; }
.gad-sin-proyecto { text-align:center; padding:40px; color:#aaa; }

/* PANEL LATERAL FINANCIERO */
.gad-lateral-row { display:flex; justify-content:space-between; padding:4px 0; font-size:12px; }
.gad-lateral-head { font-size:13px; border-bottom:1px solid #e0f7fa; padding-bottom:8px; margin-bottom:8px; }
.gad-lateral-section { border-bottom:1px solid #f5f5f5; padding:10px 0; }
.gad-lateral-title { font-weight:600; color:#666; font-size:11px; text-transform:uppercase; letter-spacing:.5px; }
.gad-lateral-resumen .gad-lateral-row { font-size:13px; font-weight:600; }
.gad-color-success { color:#F44336; }
.gad-label-estado-sm { color:var(--integra-primary); font-weight:700; }

/* ARCHIVOS */
.gad-archivos-layout { display:grid; grid-template-columns:200px 1fr; gap:16px; align-items:start; }
.gad-archivos-sidebar { display:flex; flex-direction:column; gap:2px; }
.gad-archivo-grupo { padding:8px 12px; border-radius:6px; cursor:pointer; font-size:13px; color:#555; transition:background .15s; }
.gad-archivo-grupo:hover,.gad-archivo-grupo.active { background:#e0f7fa; color:#006064; font-weight:600; }
.gad-upload-panel { background:#e0f7fa; border:1px solid #80DEEA; border-radius:8px; padding:16px; margin-bottom:12px; position:relative; }
.gad-upload-close { position:absolute; top:8px; right:8px; background:none; border:none; cursor:pointer; color:#999; font-size:16px; }
.gad-upload-inner { display:flex; flex-direction:column; gap:10px; }
.gad-file-row { display:flex; align-items:center; gap:10px; }
.gad-file-label { background:#fff; border:1px solid #ddd; border-radius:6px; padding:6px 12px; cursor:pointer; font-size:12px; color:#555; white-space:nowrap; transition:background .15s; }
.gad-file-label:hover { background:#f5f5f5; }
.gad-file-name-hint { font-size:12px; color:#999; flex:1; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.gad-upload-progress { margin-top:8px; }
.gad-progress-bar { background:#f5f5f5; border-radius:10px; height:8px; overflow:hidden; margin-bottom:4px; }
.gad-progress-fill { background:linear-gradient(90deg,var(--integra-accent),var(--integra-primary)); height:100%; border-radius:10px; transition:width .3s; width:0%; }
.gad-archivos-main { display:flex; flex-direction:column; gap:12px; }
.gad-doc-link { color:#0097A7; text-decoration:none; font-size:12px; }
.gad-doc-link:hover { text-decoration:underline; }
.gad-doc-preview { background:#fff; border:1px solid #e0e0e0; border-radius:8px; overflow:hidden; }
.gad-preview-header { display:flex; justify-content:space-between; align-items:center; padding:10px 14px; background:#f5f5f5; border-bottom:1px solid #e0e0e0; }
#gad-preview-content { padding:16px; max-height:600px; overflow:auto; text-align:center; }
#gad-preview-content img { max-width:100%; border-radius:4px; }
#gad-preview-content iframe { width:100%; height:550px; border:none; }

/* EDIT CARD */
.gad-edit-card { background:#fff; border-radius:12px; padding:28px; box-shadow:0 2px 12px rgba(0,0,0,.08); max-width:1000px; margin:0 auto; }
.gad-edit-header { display:flex; justify-content:space-between; align-items:center; margin-bottom:24px; border-bottom:2px solid #e0f7fa; padding-bottom:16px; }
.gad-edit-header h2 { font-size:18px; font-weight:700; color:#444; }

/* MENSAJES */
.gad-mensajes-list { max-height:300px; overflow-y:auto; padding:12px; background:#fafafa; border-radius:8px; margin-bottom:12px; display:flex; flex-direction:column; gap:10px; }
.gad-mensaje-item { background:#fff; border-radius:8px; padding:10px 14px; border-left:3px solid #80DEEA; }
.gad-mensaje-item strong { font-size:12px; color:var(--integra-primary); }
.gad-msg-fecha { font-size:11px; color:#bbb; margin-left:8px; }
.gad-mensaje-item p { margin-top:4px; font-size:13px; color:#444; }
.gad-mensaje-form { display:flex; gap:10px; align-items:flex-end; }
.gad-mensaje-form .gad-textarea { flex:1; min-height:60px; }

/* ALERTS */
.gad-alert { padding:12px 16px; border-radius:8px; margin-bottom:16px; font-size:13px; }
.gad-alert-success { background:#e8f5e9; color:#2e7d32; border:1px solid #a5d6a7; }
.gad-alert-error   { background:#fce4ec; color:#c62828; border:1px solid #ef9a9a; }

/* TOAST */
#gad-toast { position:fixed; bottom:24px; right:24px; z-index:99999; display:flex; flex-direction:column; gap:8px; }
.gad-toast-item { padding:12px 20px; border-radius:10px; font-size:13px; font-weight:600; color:#fff; box-shadow:0 4px 20px rgba(0,0,0,.2); animation:gadToastIn .3s ease; min-width:240px; }
.gad-toast-success { background:linear-gradient(135deg,#4CAF50,#388E3C); }
.gad-toast-error   { background:linear-gradient(135deg,#F44336,#D32F2F); }
.gad-toast-info    { background:linear-gradient(135deg,#0097A7,#006064); }
@keyframes gadToastIn { from { opacity:0; transform:translateX(40px); } to { opacity:1; transform:translateX(0); } }

/* LOGIN PAGE (index.php — responsive, sin desbordes) */
.integra-login-root,
.integra-login-root * ,
.integra-login-root *::before,
.integra-login-root *::after { box-sizing:border-box; }
html.integra-login-root {
  height:100%;
  -webkit-text-size-adjust:100%;
}
body.integra-login-root {
  min-height:100vh;
  min-height:100dvh;
  margin:0;
  padding:0;
  overflow-x:hidden;
  overflow-x:clip;
  max-width:100%;
}
.login-bg {
  --login-pad-x:clamp(12px,4vw,24px);
  --login-pad-y:clamp(12px,4vh,28px);
  min-height:100vh;
  min-height:100dvh;
  width:100%;
  max-width:100vw;
  display:grid;
  place-items:center;
  align-content:center;
  padding:max(var(--login-pad-y),env(safe-area-inset-top,0))
    max(var(--login-pad-x),env(safe-area-inset-right,0))
    max(var(--login-pad-y),env(safe-area-inset-bottom,0))
    max(var(--login-pad-x),env(safe-area-inset-left,0));
  background:linear-gradient(135deg,#e0f7fa 0%,#b2ebf2 50%,#e0f7fa 100%);
}
.login-card {
  width:100%;
  max-width:min(420px,calc(100vw - 2 * var(--login-pad-x)));
  min-width:0;
  margin-inline:auto;
  background:#fff;
  border-radius:clamp(14px,3vw,20px);
  padding:clamp(20px,4.5vw,48px) clamp(16px,3.5vw,40px);
  box-shadow:0 20px 60px rgba(0,151,167,.2);
  text-align:center;
  overflow-wrap:break-word;
  word-wrap:break-word;
}
.login-logo {
  font-family:'Exo 2',sans-serif;
  font-size:clamp(26px,5.5vw,34px);
  color:var(--integra-primary);
  font-weight:800;
  letter-spacing:clamp(1px,.5vw,3px);
  margin-bottom:8px;
  line-height:1.15;
}
.login-sub {
  color:#888;
  font-size:clamp(13px,2.8vw,14px);
  margin-bottom:22px;
  line-height:1.35;
  padding-inline:2px;
}
.login-form {
  width:100%;
  min-width:0;
  text-align:left;
}
.login-form .gad-form-row { margin-bottom:14px; }
.login-form .gad-input {
  display:block;
  width:100%;
  max-width:100%;
  min-width:0;
  font-size:14px;
  padding:10px 14px;
}
.login-btn { width:100%; max-width:100%; padding:12px; font-size:15px; margin-top:8px; justify-content:center; text-align:center; }
.login-error {
  background:#fce4ec;
  color:#c62828;
  border-radius:8px;
  padding:10px 14px;
  font-size:clamp(12px,3.2vw,13px);
  margin-bottom:16px;
  text-align:left;
  overflow-wrap:anywhere;
  word-break:break-word;
  hyphens:auto;
  max-height:min(50vh,280px);
  overflow-y:auto;
  -webkit-overflow-scrolling:touch;
}
.integra-login-footer {
  margin-top:22px;
  font-size:clamp(11px,2.8vw,12px);
  color:#bbb;
  line-height:1.4;
}
@media (min-width:481px) and (max-width:1024px) {
  .login-card { max-width:min(440px,calc(100vw - 32px)); }
}
@media (max-width:480px) {
  .login-bg { --login-pad-x:12px; --login-pad-y:max(10px,env(safe-area-inset-top,0)); }
  .login-card { padding:18px 14px; }
  .login-form .gad-input { font-size:16px; }
}
@media (max-height:520px) and (orientation:landscape) {
  .login-bg { align-content:start; padding-top:max(8px,env(safe-area-inset-top,0)); place-items:start center; }
  .login-card { margin-block:8px; padding:14px 16px; }
  .login-sub { margin-bottom:12px; }
  .login-error { max-height:min(35vh,160px); }
}

.integra-login-wrap { min-height:100vh; background:var(--integra-bg); display:flex; align-items:center; justify-content:center; }
.integra-login-box { background:#fff; border-radius:20px; padding:48px 40px; max-width:420px; width:90%; box-shadow:0 20px 60px rgba(0,151,167,.2); }
.integra-login-logo { font-family:'Exo 2',sans-serif; font-size:36px; font-weight:800; color:var(--integra-primary); text-align:center; letter-spacing:3px; margin-bottom:6px; }
.integra-login-subtitle { text-align:center; font-size:13px; color:#888; margin-bottom:32px; }
.integra-login-box .gad-input { margin-bottom:0; }
.integra-login-btn { width:100%; padding:12px; font-size:15px; font-weight:700; margin-top:8px; background:linear-gradient(135deg,var(--integra-accent),var(--integra-primary)); color:#fff; border:none; border-radius:8px; cursor:pointer; transition:all .2s; letter-spacing:1px; }
.integra-login-btn:hover { transform:translateY(-2px); box-shadow:0 8px 24px rgba(0,151,167,.4); }
.integra-login-error { background:#fce4ec; color:#c62828; border:1px solid #ef9a9a; border-radius:8px; padding:10px 14px; font-size:13px; margin-bottom:16px; }
.integra-login-info { background:#e0f7fa; color:#006064; border:1px solid #80DEEA; border-radius:8px; padding:10px 14px; font-size:12px; margin-top:20px; text-align:center; }

/* GESTORES ADMIN */
.gad-gestores-list { display:grid; grid-template-columns:repeat(auto-fill,minmax(260px,1fr)); gap:16px; margin-top:20px; }
.gad-gestor-card { background:#fff; border-radius:12px; padding:20px; box-shadow:0 2px 12px rgba(0,0,0,.08); border-left:4px solid var(--integra-primary); cursor:pointer; transition:all .2s; }
.gad-gestor-card:hover { transform:translateY(-2px); box-shadow:0 6px 20px rgba(0,151,167,.2); }
.gad-gestor-name { font-weight:700; color:#333; font-size:15px; }
.gad-gestor-meta { font-size:12px; color:#888; margin-top:4px; }
.gad-gestor-stats { display:flex; gap:12px; margin-top:12px; }
.gad-gestor-stat { text-align:center; flex:1; }
.gad-gestor-stat strong { display:block; font-size:18px; color:var(--integra-primary); }
.gad-gestor-stat span { font-size:11px; color:#aaa; }

/* RESPONSIVE */
@media (max-width:1024px) {
  .gad-detalle-layout { grid-template-columns:1fr; }
  .gad-panel-lateral { position:static; }
  .gad-edit-grid,.gad-proyecto-panel { grid-template-columns:1fr; }
  .gad-archivos-layout { grid-template-columns:1fr; }
  .gad-topbar { top:0; }
  .gad-content { max-width:100%; }
  .gad-table-wrap { overflow-x:auto; -webkit-overflow-scrolling:touch; }
}
@media (max-width:768px) {
  .gad-wrap { font-size:13px; }
  .gad-topbar {
    height:auto;
    min-height:48px;
    padding:10px 12px;
    flex-wrap:wrap;
    gap:8px;
  }
  .gad-logo { font-size:18px; margin-right:0; }
  .gad-topbar-nav {
    order:3;
    width:100%;
    overflow-x:auto;
    white-space:nowrap;
    padding-bottom:2px;
  }
  .gad-nav-item { padding:6px 10px; font-size:12px; display:inline-block; }
  .gad-topbar-right { margin-left:0; width:100%; justify-content:space-between; }
  .gad-user-name { font-size:12px; max-width:55vw; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
  .gad-content { padding:10px; }
  .gad-stats-row { flex-direction:column; gap:10px; }
  .gad-counters { gap:10px; flex-wrap:wrap; }
  .gad-counter-item { min-width:80px; }
  .gad-table-controls { flex-direction:column; align-items:stretch; gap:8px; }
  .gad-input-sm { width:100%; }
  .gad-pagination { justify-content:space-between; }
  .gad-modal-box { width:95%; padding:18px; max-height:90vh; overflow:auto; }
  .gad-modal-actions { flex-direction:column; }
  .gad-modal-actions .gad-btn { width:100%; justify-content:center; }
  .gad-proyecto-selector-bar { flex-direction:column; align-items:stretch; }
  .gad-file-row { flex-direction:column; align-items:stretch; }
  .gad-file-name-hint { max-width:100%; }
  .gad-btn { min-height:36px; }
  .gad-tabs { overflow-x:auto; white-space:nowrap; }
  .gad-tab { padding:10px 14px; }
  #gad-toast { right:10px; left:10px; bottom:10px; }
  .gad-toast-item { min-width:auto; max-width:none; }
}

@media (max-width:640px) {
  .gad-table-cards thead {
    display:none;
  }
  .gad-table-cards,
  .gad-table-cards tbody,
  .gad-table-cards tr,
  .gad-table-cards td {
    display:block;
    width:100%;
  }
  .gad-table-cards tbody tr {
    background:#fff;
    border:1px solid #dff2f5;
    border-radius:12px;
    margin:0 0 10px 0;
    padding:10px 12px;
    box-shadow:0 1px 8px rgba(0,0,0,.06);
  }
  .gad-table-cards tbody td {
    border:none;
    border-bottom:1px dashed #eaf6f8;
    padding:7px 0;
    white-space:normal;
    display:flex;
    justify-content:space-between;
    align-items:flex-start;
    gap:8px;
    text-align:right;
  }
  .gad-table-cards tbody td:last-child {
    border-bottom:none;
  }
  .gad-table-cards tbody td::before {
    content:attr(data-label);
    color:#607d8b;
    font-size:11px;
    font-weight:700;
    letter-spacing:.3px;
    text-transform:uppercase;
    text-align:left;
  }
  .gad-table-cards .gad-estado-badge {
    margin-left:auto;
  }
}


/* ── EXTRAS STANDALONE ─────────────────────── */
.gad-edit-card { background:#fff; border-radius:12px; padding:24px; box-shadow:0 2px 12px rgba(0,0,0,.08); margin-bottom:20px; }
.gad-edit-header { display:flex; justify-content:space-between; align-items:center; margin-bottom:20px; }
.gad-edit-header h2 { font-size:17px; color:#444; font-weight:700; margin:0; }
.gad-gestores-list { display:grid; grid-template-columns:repeat(auto-fill,minmax(280px,1fr)); gap:16px; margin-top:16px; }
.gad-gestor-card { background:#f9fdfe; border:1px solid #e0f7fa; border-radius:12px; padding:20px; }
.gad-gestor-name { font-size:15px; font-weight:700; color:#333; }
.gad-gestor-meta { font-size:12px; color:#888; margin-top:2px; }
.gad-gestor-stats { display:flex; gap:20px; margin-top:14px; padding:12px 0; border-top:1px solid #e0f7fa; }
.gad-gestor-stat { display:flex; flex-direction:column; align-items:center; gap:2px; }
.gad-gestor-stat strong { font-size:20px; color:#333; }
.gad-gestor-stat span { font-size:11px; color:#888; }
.gad-archivos-main { flex:1; min-width:0; }
.gad-progress-bar { height:6px; background:#e0e0e0; border-radius:3px; overflow:hidden; margin-bottom:4px; }
.gad-progress-fill { height:100%; background:#0097A7; width:0%; transition:width .3s; }
.gad-mensaje-item { padding:10px 12px; background:#f5f5f5; border-radius:8px; margin-bottom:8px; }
.gad-mensaje-item strong { color:#0097A7; margin-right:8px; }
.gad-msg-fecha { font-size:11px; color:#aaa; }
.gad-mensaje-item p { margin:4px 0 0; font-size:13px; color:#444; }
.gad-alert { padding:12px 16px; border-radius:8px; font-size:13px; margin-bottom:16px; }
.gad-alert-success { background:#e8f5e9; color:#2e7d32; }
.gad-alert-error   { background:#fce4ec; color:#c62828; }
#gad-toast { position:fixed; bottom:24px; right:24px; z-index:99999; display:flex; flex-direction:column; gap:8px; }
.gad-toast-item { padding:12px 20px; border-radius:10px; font-size:14px; font-weight:500; box-shadow:0 4px 20px rgba(0,0,0,.18); animation:gadToastIn .3s ease; max-width:320px; }
.gad-toast-success { background:#4CAF50; color:#fff; }
.gad-toast-error   { background:#F44336; color:#fff; }
.gad-toast-warn    { background:#FF9800; color:#fff; }
@keyframes gadToastIn { from { opacity:0; transform:translateY(20px); } to { opacity:1; transform:translateY(0); } }
.gad-nav-item.active { background:rgba(255,255,255,.25); }
body { margin:0; padding:0; }
@media (max-width:768px) {
  .gad-detalle-layout { grid-template-columns:1fr !important; }
  .gad-stats-row { flex-direction:column; }
  .gad-gestores-list { grid-template-columns:1fr; }
  .gad-edit-header { flex-direction:column; align-items:flex-start; gap:10px; }
  .gad-edit-header .gad-btn { width:100%; justify-content:center; }
}
