:root{--navy:#13213b;--navy2:#1c3158;--blue:#245fda;--blue-soft:#edf4ff;--bg:#f5f7fb;--panel:#fff;--line:#e3e8f0;--text:#172033;--muted:#667085;--danger:#b42318;--success:#067647}*{box-sizing:border-box}body{margin:0;font-family:Inter,Arial,Helvetica,sans-serif;background:var(--bg);color:var(--text)}.topbar{height:76px;background:linear-gradient(90deg,var(--navy),var(--navy2));color:#fff;display:flex;align-items:center;justify-content:space-between;padding:0 28px;position:sticky;top:0;z-index:5;box-shadow:0 2px 12px rgba(16,24,40,.12)}.brand-wrap{display:flex;align-items:center;gap:14px}.brand-mark{font-size:24px;font-weight:900;letter-spacing:.5px}.brand-divider{height:34px;width:1px;background:rgba(255,255,255,.28)}.brand-title{font-size:17px;font-weight:800}.brand-subtitle{font-size:11px;opacity:.75}.top-status{font-size:12px;display:flex;align-items:center;gap:8px}.dot{width:8px;height:8px;border-radius:50%;background:#39d98a;display:inline-block}.shell{display:grid;grid-template-columns:230px minmax(0,1fr);min-height:calc(100vh - 76px)}aside{background:#fff;border-right:1px solid var(--line);padding:18px 12px}aside a{display:block;padding:12px 14px;margin:4px 0;border-radius:9px;color:#344054;text-decoration:none;font-weight:700;font-size:14px}aside a:hover,aside a.active{background:var(--blue-soft);color:#1849a9}main{padding:28px;max-width:1500px;width:100%}h1{margin:0 0 6px;font-size:30px}h2{font-size:18px}.lead{color:var(--muted);margin:0 0 22px}.page-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;flex-wrap:wrap;margin-bottom:20px}.primary-link,.btn{display:inline-flex;align-items:center;justify-content:center;border:0;border-radius:9px;padding:10px 15px;font-weight:800;cursor:pointer;text-decoration:none;font-size:14px}.primary-link,.btn-primary{background:var(--blue);color:#fff}.btn-secondary{background:var(--navy);color:#fff}.btn-danger{background:var(--danger);color:#fff}.cards{display:grid;grid-template-columns:repeat(auto-fit,minmax(170px,1fr));gap:14px;margin-bottom:24px}.card,.panel{background:var(--panel);border:1px solid var(--line);border-radius:14px;padding:18px;margin-bottom:14px;box-shadow:0 2px 8px rgba(16,24,40,.04)}.card.accent{border-top:3px solid var(--blue)}.card strong{font-size:29px;display:block}.card span,.muted,.meta{font-size:12px;color:var(--muted)}label{display:block;font-size:12px;font-weight:800;color:#475467;margin:8px 0 6px}input,textarea,select{width:100%;border:1px solid #d0d5dd;border-radius:9px;padding:10px;font:inherit;background:#fff;color:var(--text)}textarea{resize:vertical;line-height:1.45}.form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.form-grid .wide{grid-column:1/-1}.actions{display:flex;justify-content:flex-end;align-items:end;margin-top:10px}.search{display:grid;grid-template-columns:1fr auto;gap:10px;margin-bottom:16px}.notice{background:#ecfdf3;border:1px solid #abefc6;color:var(--success);padding:10px 12px;border-radius:9px;margin-bottom:14px}.filters{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:18px}.filters a{padding:8px 12px;border:1px solid #d0d5dd;background:#fff;border-radius:9px;text-decoration:none;color:#344054;font-weight:700}.filters a.active{background:var(--navy);color:#fff;border-color:var(--navy)}.conversation-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(310px,1fr));gap:12px}.conversation-card{display:block;background:#fff;border:1px solid var(--line);border-radius:14px;padding:16px;text-decoration:none;color:inherit;box-shadow:0 2px 8px rgba(16,24,40,.035)}.conversation-card:hover{border-color:#b7caf5;box-shadow:0 5px 18px rgba(36,95,218,.10)}.conversation-top,.conversation-bottom{display:flex;align-items:center;justify-content:space-between;gap:10px}.conversation-name{font-weight:850;font-size:16px}.conversation-preview{margin:14px 0;color:#475467;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.conversation-bottom{font-size:11px;color:var(--muted)}.badge{display:inline-block;padding:6px 9px;border-radius:999px;font-size:11px;font-weight:850}.badge.ai{background:#eef4ff;color:#1849a9}.badge.human{background:#fff4ed;color:#b93815}.chat-page{display:flex;flex-direction:column;height:calc(100vh - 132px);min-height:620px;background:#fff;border:1px solid var(--line);border-radius:16px;overflow:hidden;box-shadow:0 3px 16px rgba(16,24,40,.05)}.chat-header{padding:16px 18px;border-bottom:1px solid var(--line);display:flex;justify-content:space-between;gap:16px;align-items:center;background:#fff}.chat-header h1{font-size:22px;margin:3px 0}.back-link{text-decoration:none;color:var(--blue);font-size:12px;font-weight:800}.chat-actions{display:flex;align-items:center;gap:9px;flex-wrap:wrap}.chat-messages{flex:1;overflow-y:auto;padding:22px;background:#eef2f6}.bubble-row{display:flex;margin-bottom:10px}.bubble-row.incoming{justify-content:flex-start}.bubble-row.ai-out,.bubble-row.human-out{justify-content:flex-end}.bubble{max-width:min(72%,720px);border-radius:14px;padding:10px 12px;box-shadow:0 1px 4px rgba(16,24,40,.06)}.incoming .bubble{background:#fff;border:1px solid #dde3ea}.ai-out .bubble{background:#e7efff;border:1px solid #c6d8ff}.human-out .bubble{background:#dff7eb;border:1px solid #bce8d2}.bubble-sender{font-size:11px;font-weight:850;margin-bottom:5px}.bubble-text{font-size:14px;line-height:1.45}.bubble-time{font-size:10px;color:#667085;text-align:right;margin-top:6px}.composer{display:grid;grid-template-columns:1fr auto;gap:10px;padding:14px;border-top:1px solid var(--line);background:#fff}.composer textarea{min-height:52px}.composer.disabled{background:#f8fafc}.chat-note{padding:8px 14px;font-size:11px;color:#667085;background:#fbfcfd;border-top:1px solid #edf0f3}.loading{text-align:center;color:#667085;padding:40px}@media(max-width:800px){.shell{grid-template-columns:1fr}aside{display:flex;overflow:auto;border-right:0;border-bottom:1px solid var(--line)}aside a{white-space:nowrap}main{padding:14px}.topbar{padding:0 14px}.top-status{display:none}.form-grid{grid-template-columns:1fr}.form-grid .wide{grid-column:auto}.chat-page{height:calc(100vh - 170px);min-height:540px}.chat-header{align-items:flex-start}.bubble{max-width:88%}}
/* V4 refinements */
.sidebar .group-title{font-size:10px;font-weight:800;color:#98a2b3;text-transform:uppercase;letter-spacing:.08em;padding:14px 13px 5px}
.top-actions{display:flex;align-items:center;gap:10px;font-size:12px}.status-dot{width:8px;height:8px;border-radius:50%;background:#39d98a;display:inline-block}.notification-btn{border:1px solid rgba(255,255,255,.26);background:rgba(255,255,255,.08);color:#fff;border-radius:8px;padding:8px 10px;cursor:pointer}
.central{height:calc(100vh - 118px);min-height:620px;display:grid;grid-template-columns:330px minmax(420px,1fr) 250px;background:#fff;border:1px solid var(--border);border-radius:15px;overflow:hidden;box-shadow:0 3px 16px rgba(16,24,40,.06)}
.conversation-list{border-right:1px solid var(--border);display:flex;flex-direction:column;min-width:0}.list-head{padding:12px;border-bottom:1px solid var(--border)}.list-scroll{overflow:auto;flex:1}.conv-item{display:grid;grid-template-columns:44px minmax(0,1fr) auto;gap:10px;align-items:center;padding:10px 11px;border-bottom:1px solid #edf0f4;text-decoration:none;color:inherit}.conv-item:hover,.conv-item.active{background:#f0f5ff}.conv-avatar,.chat-avatar{width:42px;height:42px;border-radius:50%;background:#dbe5f4;display:flex;align-items:center;justify-content:center;font-weight:800;color:#355072;overflow:hidden}.conv-avatar img,.chat-avatar img{width:100%;height:100%;object-fit:cover}.conv-main{min-width:0}.conv-name{font-size:13px;font-weight:800;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.conv-preview{font-size:11px;color:#667085;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-top:3px}.conv-time{font-size:9px;color:#98a2b3;margin-bottom:4px}
.chat-column{display:flex;flex-direction:column;min-width:0;background:#eef2f6}.chat-head{height:68px;background:#fff;border-bottom:1px solid var(--border);display:flex;align-items:center;justify-content:space-between;padding:0 14px;gap:9px}.chat-person{display:flex;align-items:center;gap:9px}.chat-name{font-size:14px;font-weight:800}.chat-sub{font-size:10px;color:#667085}.messages{flex:1;overflow:auto;padding:18px;background:#eef2f6}.msg-row{display:flex;margin-bottom:8px}.msg-row.in{justify-content:flex-start}.msg-row.ai,.msg-row.human-out{justify-content:flex-end}.bubble{max-width:72%;padding:9px 11px;border-radius:10px;box-shadow:0 1px 3px rgba(16,24,40,.06);font-size:12px;line-height:1.45}.in .bubble{background:#fff}.ai .bubble{background:#e4eeff}.human-out .bubble{background:#dff7e9}.bubble-role{font-size:9px;font-weight:800;margin-bottom:4px}.bubble-time{font-size:8px;color:#667085;text-align:right;margin-top:5px}.composer{background:#fff;border-top:1px solid var(--border);padding:10px;display:grid;grid-template-columns:1fr auto;gap:8px}.side-info{border-left:1px solid var(--border);background:#fff;padding:16px;overflow:auto}.profile-card{text-align:center;padding-bottom:16px;border-bottom:1px solid #edf0f4}.profile-card .chat-avatar{width:72px;height:72px;margin:0 auto 9px}.profile-name{font-weight:800}.profile-meta{font-size:10px;color:#667085}.info-block{padding:13px 0;border-bottom:1px solid #edf0f4}.info-label{font-size:9px;text-transform:uppercase;color:#98a2b3;font-weight:800}.info-value{font-size:12px;margin-top:4px;word-break:break-word}.table-wrap{overflow:auto}.table{width:100%;border-collapse:collapse}.table th,.table td{padding:10px;border-bottom:1px solid #edf0f4;text-align:left;font-size:12px;vertical-align:top}.table th{font-size:10px;color:#667085;text-transform:uppercase}.btn-light{background:#fff!important;color:#344054!important;border:1px solid #d0d5dd!important}.admin-chat{display:grid;grid-template-rows:1fr auto;height:560px;border:1px solid var(--border);border-radius:13px;overflow:hidden;background:#fff}.admin-chat-log{padding:18px;overflow:auto;background:#f7f9fc}.admin-msg{max-width:78%;margin:0 0 10px;padding:10px 12px;border-radius:11px;font-size:13px;line-height:1.45}.admin-msg.user{margin-left:auto;background:#dfeafe}.admin-msg.ai{background:#fff;border:1px solid #e5e9f0}.admin-compose{display:grid;grid-template-columns:1fr auto;gap:8px;padding:10px;border-top:1px solid var(--border)}
@media(max-width:1100px){.central{grid-template-columns:300px minmax(400px,1fr)}.side-info{display:none}}


/* ===== APPJUD JUD.IA V4.2 — LAYOUT PROFISSIONAL ===== */

:root{
  --navy:#102846;
  --navy-2:#143b68;
  --blue:#1766df;
  --blue-soft:#eaf3ff;
  --chat-bg:#edf4f8;
  --line:#dce5ef;
  --text:#10233f;
  --muted:#6e7e92;
}

html,
body{
  height:100%;
  overflow:hidden;
  background:#eef2f6;
}

.topbar{
  height:64px;
  padding:0 22px;
  background:linear-gradient(90deg,var(--navy),var(--navy-2));
  box-shadow:none;
}

.brand-main{
  font-size:25px;
}

.brand-product{
  font-size:18px;
}

.brand-sub{
  font-size:11px;
}

.top-actions{
  gap:18px;
}

.notification-btn{
  position:relative;
  border:0;
  background:transparent;
  padding:9px 10px;
}

.top-count{
  position:absolute;
  right:0;
  top:0;
  background:#e43e3e;
  color:#fff;
  border-radius:999px;
  padding:1px 5px;
  font-size:9px;
}

.connection-pill{
  display:flex;
  align-items:center;
  gap:7px;
}

.admin-profile{
  display:flex;
  align-items:center;
  gap:9px;
  padding-left:18px;
  border-left:1px solid rgba(255,255,255,.18);
}

.admin-avatar{
  width:38px;
  height:38px;
  border-radius:50%;
  background:#eaf3ff;
  color:#15395f;
  display:flex;
  align-items:center;
  justify-content:center;
  font-weight:900;
}

.admin-copy{
  display:flex;
  flex-direction:column;
}

.admin-copy small{
  opacity:.72;
  margin-top:2px;
}

.shell{
  grid-template-columns:202px minmax(0,1fr);
  height:calc(100vh - 64px);
  overflow:hidden;
}

.sidebar{
  position:relative;
  top:0;
  height:100%;
  background:linear-gradient(180deg,#102846,#0d223d);
  border:0;
  color:#fff;
  padding:16px 10px;
  display:flex;
  flex-direction:column;
}

.sidebar .group-title{
  color:#8fa9c7;
  padding:17px 11px 7px;
}

.sidebar a{
  color:#eef5ff;
  padding:11px 12px;
}

.sidebar a:hover,
.sidebar a.active{
  background:#1b67d9;
  color:#fff;
}

.nav-icon{
  width:22px;
  text-align:center;
  font-size:15px;
}

.sidebar-footer{
  margin-top:auto;
  border-top:1px solid rgba(255,255,255,.1);
  padding:18px 11px;
  display:flex;
  gap:10px;
  align-items:center;
}

.footer-symbol{
  font-size:28px;
}

.sidebar-footer small{
  display:block;
  color:#b9c9db;
  margin-top:5px;
  font-size:9px;
  line-height:1.25;
}

main{
  height:100%;
  max-width:none !important;
  width:100%;
  padding:0 !important;
  overflow:hidden;
}

.central,
.central-shell{
  height:100%;
  width:100%;
  display:grid;
  background:#fff;
  overflow:hidden;
}

.central{
  grid-template-columns:320px minmax(460px,1fr) 310px;
  border:0;
  border-radius:0;
  box-shadow:none;
}

.central-shell{
  grid-template-columns:360px 1fr;
}

.list-only .conversation-list{
  border-right:1px solid var(--line);
}

.empty-chat-state{
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  background:var(--chat-bg);
  color:var(--muted);
}

.empty-chat-icon{
  font-size:44px;
}

.conversation-list{
  height:100%;
  min-height:0;
  background:#fff;
  border-right:1px solid var(--line);
  display:flex;
  flex-direction:column;
}

.list-head{
  padding:14px 12px 10px;
  background:#fff;
  border-bottom:1px solid var(--line);
}

.search-row{
  display:grid;
  grid-template-columns:1fr 38px;
  gap:8px;
}

.search-box{
  height:40px;
  border:1px solid #d4dde8;
  border-radius:9px;
  display:flex;
  align-items:center;
  gap:8px;
  padding:0 11px;
}

.search-box input{
  border:0;
  padding:0;
  outline:none;
}

.filter-icon,
.icon-btn,
.composer-icon{
  border:1px solid #d8e2ed;
  background:#fff;
  color:#52667e;
  border-radius:9px;
  cursor:pointer;
}

.chat-filters{
  display:flex;
  gap:6px;
  margin-top:10px;
  overflow:auto;
}

.chat-filters a{
  white-space:nowrap;
  text-decoration:none;
  color:#52667e;
  font-size:10px;
  font-weight:800;
  padding:6px 9px;
  border-radius:8px;
  background:#f4f7fb;
}

.chat-filters a.active{
  background:#1766df;
  color:#fff;
}

.list-scroll{
  min-height:0;
  overflow-y:auto;
  overflow-x:hidden;
  flex:1;
}

.conv-item{
  grid-template-columns:48px minmax(0,1fr) auto;
  padding:10px 11px;
  gap:9px;
}

.conv-item.active{
  background:#e9f3ff;
  border-left:3px solid #1766df;
}

.conv-avatar{
  width:45px;
  height:45px;
  border:2px solid #d7e7fb;
  background:#edf5ff;
}

.conv-name{
  font-size:12px;
}

.conv-preview{
  font-size:10px;
}

.conv-side{
  display:flex;
  flex-direction:column;
  align-items:flex-end;
  gap:4px;
}

.conv-time{
  font-size:9px;
  white-space:nowrap;
}

.unread{
  margin:0;
}

.chat-column{
  height:100%;
  min-height:0;
  display:grid;
  grid-template-rows:72px minmax(0,1fr) 72px;
  background:var(--chat-bg);
  overflow:hidden;
}

.chat-head{
  height:72px;
  padding:0 15px;
  background:#fff;
  border-bottom:1px solid var(--line);
}

.chat-person{
  gap:10px;
}

.chat-avatar{
  width:44px;
  height:44px;
}

.chat-name{
  font-size:14px;
}

.chat-sub{
  font-size:10px;
}

.chat-actions{
  gap:7px;
}

.wa-mini{
  color:#13a55a;
  font-size:16px;
}

.messages{
  height:auto !important;
  min-height:0 !important;
  overflow-y:auto !important;
  overflow-x:hidden;
  padding:22px 26px 28px;
  background:
    linear-gradient(rgba(239,246,250,.94),rgba(239,246,250,.94)),
    radial-gradient(circle at 20px 20px,rgba(68,111,145,.08) 1px,transparent 1.5px);
  background-size:auto,32px 32px;
}

.date-separator{
  text-align:center;
  margin:5px 0 18px;
}

.date-separator span{
  background:#f5f7fa;
  color:#63758a;
  padding:6px 12px;
  border-radius:999px;
  font-size:9px;
  box-shadow:0 1px 4px rgba(0,0,0,.05);
}

.msg-row{
  margin-bottom:10px;
}

.bubble{
  max-width:74%;
  min-width:140px;
  padding:10px 12px;
  border-radius:11px;
  font-size:12px;
  line-height:1.45;
}

.in .bubble{
  background:#fff;
}

.ai .bubble{
  background:#dcecff;
}

.human-out .bubble{
  background:#d8f6e2;
}

.bubble-role{
  font-size:9px;
  color:#174ea6;
}

.human-out .bubble-role{
  color:#087848;
}

.bubble-time{
  font-size:8px;
}

.composer{
  height:72px;
  display:grid;
  grid-template-columns:34px 34px minmax(0,1fr) 104px;
  gap:7px;
  padding:10px 12px;
  background:#fff;
  border-top:1px solid var(--line);
  position:static !important;
}

.composer textarea{
  min-height:50px !important;
  height:50px !important;
  max-height:50px !important;
  border:1px solid #d4dde8;
  border-radius:9px;
  padding:13px;
  font-size:12px;
}

.composer-icon{
  height:40px;
  align-self:center;
}

.side-info{
  height:100%;
  min-height:0;
  overflow-y:auto;
  background:#fff;
  border-left:1px solid var(--line);
  padding:0;
}

.profile-top{
  text-align:center;
  padding:16px 15px 12px;
}

.chat-avatar.large{
  width:70px !important;
  height:70px !important;
  margin:0 auto 8px;
}

.profile-name{
  font-size:14px;
}

.profile-meta{
  font-size:10px;
}

.profile-actions{
  display:flex;
  justify-content:center;
  gap:8px;
  margin-top:10px;
}

.profile-actions .icon-btn{
  width:36px;
  height:36px;
}

.detail-tabs{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  border-bottom:1px solid var(--line);
}

.detail-tab{
  border:0;
  background:#fff;
  color:#6a7b90;
  padding:10px 3px;
  font-size:10px;
  font-weight:800;
  border-bottom:2px solid transparent;
  cursor:pointer;
}

.detail-tab.active{
  color:#1766df;
  border-bottom-color:#1766df;
}

.tab-panel{
  display:none;
}

.tab-panel.active{
  display:block;
}

.detail-section{
  padding:15px;
  border-bottom:1px solid #edf0f4;
}

.section-title{
  display:flex;
  align-items:center;
  justify-content:space-between;
  font-size:11px;
  margin-bottom:10px;
}

.mini-edit{
  border:0;
  background:#edf4ff;
  color:#1766df;
  border-radius:7px;
  padding:5px 8px;
  font-size:9px;
  font-weight:800;
}

.detail-row{
  display:grid;
  grid-template-columns:100px 1fr;
  gap:8px;
  padding:5px 0;
  font-size:10px;
}

.detail-row span{
  color:#718096;
}

.select-pill{
  display:inline-block;
  background:#edf4ff;
  color:#1766df;
  padding:5px 8px;
  border-radius:7px;
  font-size:9px;
}

.select-pill.purple{
  background:#f2edff;
  color:#6d4ed0;
}

.note-form textarea{
  font-size:10px;
}

.note-form .btn{
  margin-top:6px;
}

.note-empty{
  background:#fff8df;
  border-radius:9px;
  padding:11px;
  font-size:10px;
  color:#805d12;
}

.note-empty span{
  color:#8d7b54;
}

.note-card{
  padding:8px 0;
  border-bottom:1px solid #edf0f4;
  font-size:10px;
}

.note-card p{
  margin:4px 0;
}

.note-card small{
  color:#98a2b3;
}

.quick-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:7px;
}

.quick-action{
  border:1px solid #dde5ee;
  background:#fff;
  color:#33475f;
  border-radius:8px;
  padding:9px 7px;
  text-decoration:none;
  text-align:center;
  font-size:9px;
  font-weight:750;
  cursor:pointer;
}

.quick-action:disabled{
  opacity:.45;
}

.messages::-webkit-scrollbar,
.list-scroll::-webkit-scrollbar,
.side-info::-webkit-scrollbar{
  width:8px;
}

.messages::-webkit-scrollbar-thumb,
.list-scroll::-webkit-scrollbar-thumb,
.side-info::-webkit-scrollbar-thumb{
  background:#b8c7d7;
  border-radius:999px;
}

.messages::-webkit-scrollbar-track,
.list-scroll::-webkit-scrollbar-track,
.side-info::-webkit-scrollbar-track{
  background:#f0f4f8;
}

@media(max-width:1380px){

  .central{
    grid-template-columns:300px minmax(440px,1fr) 275px;
  }

  .admin-copy{
    display:none;
  }

}

@media(max-width:1120px){

  .central{
    grid-template-columns:285px minmax(420px,1fr);
  }

  .side-info{
    display:none;
  }

  .shell{
    grid-template-columns:180px minmax(0,1fr);
  }

}

@media(max-width:820px){

  body{
    overflow:auto;
  }

  .shell{
    grid-template-columns:1fr;
    height:auto;
  }

  .sidebar{
    display:none;
  }

  .central{
    grid-template-columns:1fr;
    height:calc(100vh - 64px);
  }

  .conversation-list{
    display:none;
  }

  .chat-column{
    height:calc(100vh - 64px);
  }

}


/* ===== APPJUD JUD.IA V4.4 ===== */

/* Menu lateral: sempre em coluna, um item abaixo do outro */
.sidebar{
  display:flex !important;
  flex-direction:column !important;
  align-items:stretch !important;
}

.sidebar-nav{
  display:flex !important;
  flex-direction:column !important;
  align-items:stretch !important;
  width:100% !important;
  gap:0 !important;
  overflow-y:auto;
  overflow-x:hidden;
}

.nav-group{
  display:block !important;
  width:100% !important;
  flex:none !important;
}

.nav-group-items{
  display:flex !important;
  flex-direction:column !important;
  align-items:stretch !important;
  width:100% !important;
}

.sidebar .nav-item{
  display:flex !important;
  flex-direction:row !important;
  align-items:center !important;
  justify-content:flex-start !important;
  width:100% !important;
  min-height:40px;
  margin:2px 0 !important;
  gap:10px;
}

.nav-label{
  display:block;
  min-width:0;
}

.sidebar-footer{
  flex:none;
}

/* Tela de login */
.login-body{
  margin:0;
  min-height:100vh;
  overflow:auto;
  background:#eef3f8;
  color:#10233f;
}

.login-shell{
  min-height:100vh;
  display:grid;
  grid-template-columns:minmax(420px,47%) minmax(420px,53%);
}

.login-brand-panel{
  position:relative;
  display:flex;
  flex-direction:column;
  justify-content:space-between;
  min-height:100vh;
  padding:42px 50px;
  color:#fff;
  background:
    radial-gradient(circle at 20% 20%,rgba(49,116,205,.35),transparent 35%),
    radial-gradient(circle at 85% 80%,rgba(37,99,235,.25),transparent 35%),
    linear-gradient(145deg,#0b1d35 0%,#102b4c 48%,#164774 100%);
}

.login-brand-panel:after{
  content:"";
  position:absolute;
  inset:0;
  pointer-events:none;
  opacity:.07;
  background-image:
    linear-gradient(90deg,transparent 49%,#fff 50%,transparent 51%),
    linear-gradient(transparent 49%,#fff 50%,transparent 51%);
  background-size:48px 48px;
}

.login-brand-top{
  position:relative;
  z-index:1;
  display:flex;
  align-items:center;
  gap:18px;
}

.login-appjud{
  font-size:28px;
  font-weight:900;
  letter-spacing:.02em;
}

.login-divider{
  width:1px;
  height:42px;
  background:rgba(255,255,255,.25);
}

.login-judia{
  font-size:22px;
  font-weight:900;
}

.login-subtitle{
  font-size:12px;
  opacity:.78;
  margin-top:2px;
}

.login-brand-content{
  position:relative;
  z-index:1;
  max-width:600px;
}

.login-symbol{
  width:66px;
  height:66px;
  border:1px solid rgba(255,255,255,.25);
  background:rgba(255,255,255,.08);
  border-radius:18px;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:34px;
  margin-bottom:24px;
}

.login-brand-content h1{
  margin:0 0 18px;
  max-width:560px;
  color:#fff;
  font-size:36px;
  line-height:1.15;
  letter-spacing:-.02em;
}

.login-brand-content p{
  max-width:560px;
  margin:0;
  color:#cfdeee;
  font-size:15px;
  line-height:1.7;
}

.login-brand-footer{
  position:relative;
  z-index:1;
  font-size:11px;
  color:#a9bfd7;
  text-transform:uppercase;
  letter-spacing:.12em;
}

.login-form-panel{
  display:flex;
  align-items:center;
  justify-content:center;
  padding:48px;
  background:#f7f9fc;
}

.login-card{
  width:min(430px,100%);
}

.login-mobile-brand{
  display:none;
}

.login-kicker{
  color:#1766df;
  font-size:11px;
  font-weight:900;
  letter-spacing:.12em;
  margin-bottom:12px;
}

.login-card h2{
  font-size:34px;
  line-height:1;
  margin:0 0 12px;
  color:#10233f;
}

.login-help{
  margin:0 0 28px;
  color:#66788e;
  font-size:14px;
  line-height:1.55;
}

.login-error{
  margin-bottom:16px;
  padding:11px 12px;
  border:1px solid #fecaca;
  background:#fff1f2;
  color:#b42318;
  border-radius:9px;
  font-size:12px;
  font-weight:700;
}

.login-form{
  display:grid;
  gap:17px;
}

.login-form label{
  margin:0;
  font-size:12px;
  color:#33475f;
}

.login-input-wrap{
  margin-top:7px;
  min-height:50px;
  display:flex;
  align-items:center;
  gap:9px;
  padding:0 12px;
  border:1px solid #d7e0eb;
  border-radius:10px;
  background:#fff;
  transition:.15s;
}

.login-input-wrap:focus-within{
  border-color:#6ea1ef;
  box-shadow:0 0 0 3px rgba(23,102,223,.1);
}

.login-input-wrap input{
  flex:1;
  width:auto;
  min-width:0;
  border:0;
  outline:0;
  padding:0;
  background:transparent;
  box-shadow:none;
}

.password-toggle{
  border:0;
  background:transparent;
  color:#1766df;
  font-size:11px;
  font-weight:800;
  cursor:pointer;
}

.login-submit{
  width:100%;
  min-height:50px;
  border:0;
  border-radius:10px;
  background:linear-gradient(90deg,#155ecb,#176fe9);
  color:#fff;
  font-size:14px;
  font-weight:900;
  cursor:pointer;
  box-shadow:0 7px 20px rgba(23,102,223,.2);
}

.login-submit:hover{
  filter:brightness(1.04);
}

.login-security{
  margin-top:28px;
  padding-top:19px;
  border-top:1px solid #e1e7ef;
  display:flex;
  gap:11px;
  color:#5f7187;
}

.login-security strong{
  display:block;
  font-size:11px;
  color:#33475f;
}

.login-security small{
  display:block;
  margin-top:3px;
  line-height:1.45;
}

/* Gestão de usuários */
.users-grid{
  display:grid;
  grid-template-columns:minmax(320px,380px) minmax(0,1fr);
  gap:16px;
  align-items:start;
}

.users-form{
  grid-template-columns:1fr 1fr;
}

.user-actions{
  display:flex;
  gap:7px;
  align-items:center;
  flex-wrap:wrap;
}

.password-reset-form{
  display:flex;
  gap:6px;
  align-items:center;
}

.password-reset-form input{
  width:145px;
  padding:8px 9px;
}

.logout-button{
  border:1px solid rgba(255,255,255,.24);
  background:rgba(255,255,255,.08);
  color:#fff;
  border-radius:8px;
  padding:7px 10px;
  font-size:10px;
  font-weight:800;
  cursor:pointer;
}

@media(max-width:1000px){
  .login-shell{
    grid-template-columns:1fr;
  }

  .login-brand-panel{
    display:none;
  }

  .login-form-panel{
    min-height:100vh;
    padding:28px;
  }

  .login-mobile-brand{
    display:flex;
    flex-direction:column;
    gap:3px;
    margin-bottom:30px;
    color:#102846;
  }

  .login-mobile-brand span{
    font-size:11px;
    color:#66788e;
  }

  .users-grid{
    grid-template-columns:1fr;
  }
}

@media(max-width:800px){
  /* não transformar o menu em linha horizontal */
  aside.sidebar{
    display:flex !important;
    flex-direction:column !important;
  }

  .sidebar-nav{
    flex-direction:column !important;
  }

  .sidebar .nav-item{
    white-space:normal !important;
  }
}


/* ===== APPJUD JUD.IA V4.5 — MENSAGENS COMO NO WHATSAPP ===== */
.bubble-text{
  white-space:normal !important;
  overflow-wrap:anywhere;
  word-break:normal;
  line-height:1.55;
}

.bubble-text strong{
  font-weight:800;
}

.bubble-text em{
  font-style:italic;
}

.bubble-text del{
  opacity:.72;
}

.bubble-text br{
  content:"";
}

.bubble-text br + br{
  display:block;
  margin-top:7px;
}

