body { background-color: #f4f6f9; }

.sidebar { min-height: calc(100vh - 56px); border-right: 1px solid #e0e0e0; }
.sidebar .nav-link { color: #333; }
.sidebar .nav-link.active { color: #0d6efd; font-weight: 600; }

.card { border: none; box-shadow: 0 1px 3px rgba(0,0,0,0.08); }

.login-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background: linear-gradient(145deg, #edf4ff, #f8fafc);
}
.login-card { width: min(420px, 100%); }

.chat-operator-layout { min-height: 560px; }
.chat-session-list { max-height: 600px; overflow-y: auto; }
.chat-session-item { cursor: pointer; }
.chat-session-item.active { background: #e7f1ff; color: #0a58ca; }
.chat-operator-messages {
  min-height: 430px;
  max-height: 540px;
  overflow-y: auto;
  padding: 18px;
  background: #f8f9fa;
}
.operator-message {
  max-width: 80%;
  padding: 10px 12px;
  border-radius: 12px;
  margin-bottom: 10px;
  white-space: pre-wrap;
}
.operator-message.user { background: #fff; border: 1px solid #dee2e6; }
.operator-message.assistant { background: #e7f1ff; }
.operator-message.operator { background: #d1e7dd; margin-left: auto; }
.operator-message .meta { display:block; font-size:.72rem; color:#6c757d; margin-top:4px; }

.nethvoice-bar {
  position: fixed;
  bottom: 16px;
  right: 16px;
  width: 300px;
  background: #1e2a38;
  color: #fff;
  border-radius: 12px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.25);
  z-index: 1050;
  overflow: hidden;
  transition: width 0.2s ease;
}
.nethvoice-bar.collapsed .nethvoice-bar-body { display: none; }
.nethvoice-bar-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  cursor: pointer;
  background: #17212c;
}
.nethvoice-status { color: #6c757d; font-size: 0.7rem; }
.nethvoice-status.online { color: #2ecc71; }
.nethvoice-status.offline { color: #e74c3c; }
.nethvoice-bar-body { padding: 10px 14px 14px; }
.nethvoice-controls { display: flex; gap: 6px; }

@media (max-width: 768px) {
  .sidebar { min-height: auto; }
  .nethvoice-bar { width: calc(100% - 32px); }
}


/* Journey omnicanale operatore v1.0.10 */
.journey-panel { border-bottom: 1px solid #dee2e6; background: #fff; padding: 14px 18px 16px; }
.journey-header { display: flex; gap: 24px; flex-wrap: wrap; margin-bottom: 14px; }
.journey-header > div { display: flex; flex-direction: column; min-width: 130px; }
.journey-label { color: #6c757d; font-size: .72rem; text-transform: uppercase; letter-spacing: .04em; }
.journey-track { display: flex; align-items: flex-start; gap: 0; overflow-x: auto; padding: 3px 3px 10px; }
.journey-node { position: relative; display: grid; grid-template-columns: 38px minmax(130px, 180px); flex: 0 0 auto; min-width: 185px; }
.journey-dot { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: #e9ecef; color: #343a40; border: 2px solid #fff; box-shadow: 0 0 0 1px #ced4da; z-index: 2; }
.journey-line { position: absolute; top: 16px; left: 34px; right: -2px; height: 2px; background: #ced4da; z-index: 1; }
.journey-node-body { padding: 0 10px 0 5px; display: flex; flex-direction: column; line-height: 1.25; }
.journey-node-body strong { font-size: .84rem; }
.journey-node-body span { font-size: .76rem; color: #495057; margin-top: 2px; max-width: 165px; overflow-wrap: anywhere; }
.journey-node-body small { font-size: .68rem; color: #868e96; margin-top: 3px; }
.journey-phone .journey-dot, .journey-call .journey-dot { background: #d1e7dd; color: #0f5132; }
.journey-sms .journey-dot { background: #cff4fc; color: #055160; }
.journey-web .journey-dot { background: #e7f1ff; color: #0a58ca; }
.journey-whatsapp .journey-dot { background: #d1e7dd; color: #146c43; }
.journey-telegram .journey-dot { background: #cfe2ff; color: #084298; }
.journey-chatwoot .journey-dot { background: #fff3cd; color: #664d03; }
.journey-attachment .journey-dot { background: #f8d7da; color: #842029; }
.journey-handoff .journey-dot { background: #e2e3e5; color: #41464b; }
@media (max-width: 768px) {
  .journey-header { gap: 12px; }
  .journey-node { min-width: 165px; grid-template-columns: 36px minmax(115px, 155px); }
}

/* Dashboard Journey + Settings v1.0.12 */
.dashboard-journeys { background: #fff; }
.dashboard-journey-row { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 14px 16px; border-top: 1px solid #edf0f3; }
.dashboard-journey-row:first-child { border-top: 0; }
.dashboard-journey-main { min-width: 0; flex: 1 1 auto; }
.dashboard-journey-track { display: flex; gap: 4px; align-items: center; flex-wrap: wrap; }
.dashboard-journey-step { display: inline-flex; gap: 5px; align-items: center; font-size: .78rem; color: #344054; }
.dashboard-journey-icon { display: inline-grid; place-items: center; width: 27px; height: 27px; border-radius: 50%; background: #eef4ff; color: #0d6efd; }
.dashboard-journey-arrow { color: #98a2b3; margin: 0 2px; }
.dashboard-journey-actions { display: flex; flex-wrap: wrap; gap: 6px; flex: 0 0 auto; }
.settings-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.settings-card { overflow: hidden; }
.settings-card-header { display: flex; justify-content: space-between; align-items: center; gap: 12px; background: #fff; }
.settings-card-header > div:first-child { display: grid; grid-template-columns: 24px 1fr; column-gap: 6px; align-items: center; }
.settings-card-header .small { grid-column: 2; }
.settings-card-header > div > i { grid-row: 1 / span 2; font-size: 1.2rem; color: #0d6efd; }
.settings-test-result { min-height: 20px; padding-top: 4px; }
@media (max-width: 992px) {
  .settings-grid { grid-template-columns: 1fr; }
  .dashboard-journey-row { align-items: flex-start; flex-direction: column; }
}


/* Chatwoot + settings visibility v1.0.12 */
.chatwoot-status-grid dd { overflow-wrap: anywhere; }
.settings-highlight { outline: 3px solid rgba(13,110,253,.25); transition: outline .25s ease; }
