:root{
  --primary:#1769e0;
  --primary-dark:#0f55b8;
  --bg:#f5f7fb;
  --card:#fff;
  --text:#172033;
  --muted:#718096;
  --border:#e6eaf0;
  --shadow:0 8px 30px rgba(31,41,55,.06);
}
*{box-sizing:border-box}
body{margin:0;font-family:Inter,Arial,sans-serif;background:var(--bg);color:var(--text)}
button,input,select,textarea{font:inherit}
.app{display:flex;min-height:100vh;position:relative}
.sidebar{
  width:245px;
  background:#fff;
  border-right:1px solid var(--border);
  padding:22px 14px;
  position:fixed;
  left:0;
  top:0;
  bottom:0;
  z-index:50;
  display:flex;
  flex-direction:column;
  transition:transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
  box-sizing:border-box;
}
.brand{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:4px 6px 24px}
.brand-left{display:flex;align-items:center;gap:10px}
.brand-mark{width:38px;height:38px;border-radius:10px;background:var(--primary);color:#fff;display:flex;align-items:center;justify-content:center;font-size:19px;font-weight:800;flex-shrink:0}
.brand-name{font-weight:800;font-size:16px;line-height:1.2}.brand-sub{font-size:11px;color:var(--muted);margin-top:2px}
.sidebar-toggle-btn{
  border:0;
  background:#f3f5f8;
  color:#5b6575;
  width:32px;
  height:32px;
  border-radius:8px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
  transition:all 0.2s ease;
  flex-shrink:0;
}
.sidebar-toggle-btn:hover{background:#edf4ff;color:var(--primary)}
nav{display:flex;flex-direction:column;gap:6px;flex:1}
.nav-btn{
  border:0;
  background:transparent;
  text-align:left;
  padding:11px 14px;
  border-radius:10px;
  cursor:pointer;
  color:#5b6575;
  font-weight:600;
  font-size:13.5px;
  display:flex;
  align-items:center;
  gap:12px;
  transition:all 0.18s ease;
  width:100%;
}
.nav-btn svg{flex-shrink:0;stroke:currentColor}
.nav-btn:hover,.nav-btn.active{background:#edf4ff;color:var(--primary)}
.sidebar-footer{margin-top:auto;padding:12px 10px 4px;color:#a0a8b5;font-size:11px}
.main{
  margin-left:245px;
  width:calc(100% - 245px);
  padding:28px 34px;
  transition:margin-left 0.28s cubic-bezier(0.4, 0, 0.2, 1), width 0.28s cubic-bezier(0.4, 0, 0.2, 1);
  min-height:100vh;
  box-sizing:border-box;
}
.topbar{position:relative;z-index:10;display:flex;align-items:center;justify-content:space-between;margin-bottom:18px;gap:16px}
.topbar-left{display:flex;align-items:center;gap:14px}
.topbar-title-wrap h1{font-size:26px;margin:0 0 4px}
.topbar-title-wrap p{margin:0;color:var(--muted);font-size:13px}
.hamburger-btn{
  border:1px solid var(--border);
  background:#fff;
  color:#374151;
  width:40px;
  height:40px;
  border-radius:10px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
  transition:all 0.2s ease;
  box-shadow:0 1px 3px rgba(0,0,0,0.04);
  flex-shrink:0;
}
.hamburger-btn:hover{
  background:#edf4ff;
  border-color:#8db7f5;
  color:var(--primary);
  transform:translateY(-1px);
}
.hamburger-btn:active{transform:translateY(0)}
.primary,.secondary{border:0;border-radius:9px;padding:10px 15px;cursor:pointer;font-weight:700}
.primary{background:var(--primary);color:#fff}.primary:hover{background:var(--primary-dark)}
.secondary{background:#fff;color:#3d4a5d;border:1px solid var(--border)}
.stats-grid{display:grid;grid-template-columns:repeat(6,1fr);gap:14px;margin-bottom:22px}
.stat-card{background:#fff;border:1px solid var(--border);border-radius:14px;padding:18px;box-shadow:var(--shadow)}
.stat-card span{display:block;color:var(--muted);font-size:12px;margin-bottom:9px}.stat-card strong{font-size:26px}.stat-card.warning strong{color:#d97706}
.panel{background:#fff;border:1px solid var(--border);border-radius:14px;box-shadow:var(--shadow);overflow:hidden}
.panel-head{display:flex;align-items:center;justify-content:space-between;padding:20px 22px;border-bottom:1px solid var(--border)}
.panel-head h2{font-size:17px;margin:0 0 4px}.panel-head p{margin:0;color:var(--muted);font-size:12px}
.toolbar{display:flex;gap:10px;padding:16px;border-bottom:1px solid var(--border);align-items:center;flex-wrap:wrap}
.search{flex:1;min-width:230px}
.toolbar select, .toolbar input[type="date"]{width:auto}
input,select,textarea{width:100%;border:1px solid #dfe4ec;border-radius:8px;padding:10px 11px;background:#fff;color:var(--text);outline:none}
input:focus,select:focus,textarea:focus{border-color:#8db7f5;box-shadow:0 0 0 3px #edf4ff}
.table-wrap{overflow:auto}
table{width:100%;border-collapse:collapse;min-width:950px}
th,td{padding:12px 14px;text-align:left;border-bottom:1px solid #eef1f5;font-size:12px;vertical-align:top}
th{font-size:11px;text-transform:uppercase;letter-spacing:.03em;color:#7b8595;background:#fafbfd;white-space:nowrap}
td strong{display:block}td small{display:block;color:#9aa3b1;margin-top:3px}
.result-cell{max-width:240px;white-space:normal}
.badge{display:inline-block;border-radius:20px;padding:5px 9px;font-size:10px;font-weight:800;white-space:nowrap}
.badge.new{background:#edf4ff;color:#1769e0}.badge.followup{background:#fff7df;color:#a16207}
.badge.waiting{background:#f1f3f5;color:#596273}.badge.offer{background:#f0ebff;color:#6941c6}
.badge.closing{background:#eaf8ef;color:#15803d}.badge.lost{background:#fff0f0;color:#c24141}
.actions{white-space:nowrap}.actions button{border:0;background:none;cursor:pointer;color:var(--primary);font-size:11px;font-weight:700;margin-right:7px}.actions .danger-text{color:#d14b4b}
.empty{text-align:center;color:#9aa3b1;padding:35px!important}
.hidden{display:none!important}
.modal{position:fixed;inset:0;background:rgba(15,23,42,.42);display:flex;align-items:center;justify-content:center;padding:20px;z-index:100}
.modal-box{width:min(760px,100%);max-height:92vh;overflow:auto;background:#fff;border-radius:16px;box-shadow:0 25px 70px rgba(0,0,0,.18)}
.modal-head{display:flex;justify-content:space-between;padding:20px 22px;border-bottom:1px solid var(--border)}.modal-head h2{margin:0 0 4px;font-size:19px}.modal-head p{margin:0;color:var(--muted);font-size:12px}
.icon-btn{border:0;background:#f3f5f8;width:32px;height:32px;border-radius:8px;font-size:20px;cursor:pointer}
form{padding:20px 22px}.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px}
label{font-size:12px;font-weight:700;color:#4b5565;display:grid;gap:7px}.full{grid-column:1/-1}
.modal-actions{display:flex;justify-content:flex-end;gap:9px;margin-top:18px;padding-top:18px;border-top:1px solid var(--border)}
.toast{position:fixed;right:25px;bottom:25px;background:#172033;color:#fff;padding:12px 16px;border-radius:9px;font-size:12px;opacity:0;transform:translateY(10px);pointer-events:none;transition:.25s;z-index:110}
.toast.show{opacity:1;transform:translateY(0)}

/* =========================================================
   SIDEBAR COLLAPSED & HAMBURGER SYSTEM
   ========================================================= */
body.sidebar-collapsed .sidebar {
  transform: translateX(-100%);
}
body.sidebar-collapsed .main {
  margin-left: 0;
  width: 100%;
}
@media(max-width:1100px){.stats-grid{grid-template-columns:repeat(3,1fr)}}
@media(max-width:768px){
  .sidebar{
    width: 260px;
    transform: translateX(-100%);
    box-shadow: 0 10px 40px rgba(0,0,0,0.18);
  }
  body.sidebar-mobile-open .sidebar{
    transform: translateX(0);
  }
  .main{
    margin-left: 0 !important;
    width: 100% !important;
    padding: 18px 14px;
  }
  .topbar{
    align-items: flex-start;
    gap: 12px;
  }
  .topbar-left{
    gap: 10px;
  }
  .topbar .primary{
    font-size: 11px;
    padding: 8px 12px;
    white-space: nowrap;
  }
  .stats-grid{grid-template-columns:repeat(2,1fr)}.form-grid{grid-template-columns:1fr}.full{grid-column:auto}
  .toolbar{gap:8px;padding:12px}
  .search{min-width:100%;flex:none}
  .toolbar select, .toolbar input[type="date"]{flex:1 1 calc(50% - 6px);min-width:120px}
}

/* =========================================================
   CRM GRAFIK - FINAL DESIGN
   ========================================================= */


/* =========================================================
   SECTION GRAFIK
   ========================================================= */

#grafik.grafik-section {

  width: 100%;

  margin: 0;

  padding: 0;

  box-sizing: border-box;

}


/* =========================================================
   CONTAINER
   ========================================================= */

#grafik .grafik-content {

  width: 100%;

  margin: 0;

  padding: 0;

  box-sizing: border-box;

}


/* =========================================================
   GRID 2 KOLOM
   ========================================================= */

#grafik .charts-grid {

  display: grid;

  grid-template-columns:
    minmax(0, 1fr)
    minmax(0, 1fr);

  gap: 20px;

  width: 100%;

  margin: 20px 0 0 0;

  padding: 0;

  box-sizing: border-box;

  align-items: start;

}


/* =========================================================
   CARD
   ========================================================= */

#grafik .chart-panel {

  display: flex;

  flex-direction: column;

  width: 100%;

  min-width: 0;

  height: 560px;

  margin: 0;

  padding: 0;

  background: #ffffff;

  border: 1px solid #e5e7eb;

  border-radius: 16px;

  box-shadow:
    0 2px 8px rgba(15, 23, 42, 0.04);

  overflow: hidden;

  box-sizing: border-box;

}


/* =========================================================
   HEADER CARD
   ========================================================= */

#grafik .chart-panel .panel-head {

  display: flex;

  flex-direction: row;

  align-items: center;

  justify-content: space-between;

  gap: 20px;

  width: 100%;

  min-height: 112px;

  padding:
    20px 24px;

  margin: 0;

  background: #ffffff;

  border-bottom: 1px solid #e5e7eb;

  box-sizing: border-box;

  flex-shrink: 0;

}


/* =========================================================
   JUDUL
   ========================================================= */

#grafik .chart-title {

  flex: 1;

  min-width: 0;

}


#grafik .chart-panel h2 {

  margin: 0 0 6px 0;

  padding: 0;

  font-size: 20px;

  font-weight: 700;

  line-height: 1.3;

  color: #172033;

}


#grafik .chart-panel p {

  margin: 0;

  padding: 0;

  font-size: 13px;

  line-height: 1.5;

  color: #64748b;

}


/* =========================================================
   DROPDOWN
   ========================================================= */

#grafik .chart-filter {

  flex: 0 0 225px;

  width: 225px;

  height: 48px;

  min-width: 0;

  margin: 0;

  padding:
    0 14px;

  font-size: 16px;

  color: #1e293b;

  background: #ffffff;

  border: 1px solid #d8dee9;

  border-radius: 10px;

  outline: none;

  box-sizing: border-box;

}


#grafik .chart-filter:focus {

  border-color: #3b82f6;

  box-shadow:
    0 0 0 3px rgba(59, 130, 246, 0.12);

}


/* =========================================================
   AREA CHART
   ========================================================= */

#grafik .chart-wrap {

  position: relative;

  display: block;

  width: 100%;

  height: 448px;

  min-height: 448px;

  margin: 0;

  padding:
    18px 22px 22px;

  box-sizing: border-box;

  flex: 1 1 auto;

  background: #ffffff;

}


/* =========================================================
   CANVAS CHART.JS
   ========================================================= */

#grafik .chart-wrap canvas {

  display: block !important;

  position: relative !important;

  width: 100% !important;

  height: 100% !important;

  min-width: 0 !important;

  min-height: 0 !important;

  max-width: none !important;

  max-height: none !important;

}


/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 1200px) {

  #grafik .charts-grid {

    grid-template-columns: 1fr;

  }

  #grafik .chart-panel {

    height: 560px;

  }

}


@media (max-width: 768px) {

  #grafik .chart-panel .panel-head {

    flex-direction: column;

    align-items: stretch;

    gap: 12px;

  }


  #grafik .chart-filter {

    width: 100%;

    flex-basis: auto;

  }


  #grafik .chart-panel {

    height: 500px;

  }


  #grafik .chart-wrap {

    height: 388px;

    min-height: 388px;

  }

}

/* =========================================================
   FIX FINAL POSISI GRAFIK CRM
   Grafik harus langsung berada di bawah header halaman
   ========================================================= */


/* Hapus jarak berlebih dari section grafik */
#grafik {
  position: relative !important;

  width: 100% !important;

  margin: 0 !important;

  padding: 0 !important;

  box-sizing: border-box !important;
}


/* Container grafik jangan memberi jarak tambahan */
#grafik .grafik-content {
  position: relative !important;

  width: 100% !important;

  margin: 0 !important;

  padding: 0 !important;

  box-sizing: border-box !important;
}


/* Grid langsung setelah header */
#grafik .charts-grid {

  display: grid !important;

  grid-template-columns:
    minmax(0, 1fr)
    minmax(0, 1fr) !important;

  gap: 20px !important;

  width: 100% !important;

  margin-top: 0 !important;

  margin-right: 0 !important;

  margin-bottom: 0 !important;

  margin-left: 0 !important;

  padding: 0 !important;

  box-sizing: border-box !important;

  align-items: start !important;

}


/* Card grafik */
#grafik .chart-panel {

  position: relative !important;

  width: 100% !important;

  height: 560px !important;

  min-height: 560px !important;

  margin: 0 !important;

  padding: 0 !important;

  box-sizing: border-box !important;

  overflow: hidden !important;

}


/* Header card grafik */
#grafik .chart-panel .panel-head {

  width: 100% !important;

  min-height: 100px !important;

  height: 100px !important;

  margin: 0 !important;

  padding: 18px 22px !important;

  box-sizing: border-box !important;

}


/* Area grafik */
#grafik .chart-wrap {

  position: relative !important;

  width: 100% !important;

  height: 460px !important;

  min-height: 460px !important;

  margin: 0 !important;

  padding: 18px 22px 22px !important;

  box-sizing: border-box !important;

}


/* Canvas */
#grafik .chart-wrap canvas {

  width: 100% !important;

  height: 100% !important;

}


/* =========================================================
   TOPBAR KHUSUS HALAMAN GRAFIK
   ========================================================= */

body:has(#grafik:not(.hidden)) .topbar {

  margin-bottom: 10px !important;

}


/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 1200px) {

  #grafik .charts-grid {

    grid-template-columns: 1fr !important;

  }

}


@media (max-width: 768px) {

  #grafik .chart-panel {

    height: 500px !important;

    min-height: 500px !important;

  }

  #grafik .chart-panel .panel-head {

    height: auto !important;

    min-height: 110px !important;

    flex-direction: column !important;

    align-items: stretch !important;

    gap: 12px !important;

  }

  #grafik .chart-filter {

    width: 100% !important;

  }

  #grafik .chart-wrap {

    height: 390px !important;

    min-height: 390px !important;

  }

}

/* =====================================================
   TANGGAL FOLLOW UP BERIKUTNYA
   ===================================================== */

.followup-date {
  display: inline-flex;
  align-items: center;
  gap: 6px;

  padding: 6px 10px;

  border-radius: 8px;

  font-size: 12px;
  font-weight: 600;

  white-space: nowrap;
}


/* Follow up masih akan datang */
.followup-date.upcoming {
  background: #ecfdf5;
  color: #047857;
}


/* Follow up hari ini */
.followup-date.today {
  background: #fffbeb;
  color: #b45309;
}


/* Follow up terlambat */
.followup-date.overdue {
  background: #fef2f2;
  color: #dc2626;
}


/* Tidak ada jadwal */
.followup-date.none {
  background: #f1f5f9;
  color: #64748b;
}

/* =====================================================
   TANGGAL FOLLOW UP BERIKUTNYA
   ===================================================== */

.next-followup {

  display: inline-flex;

  align-items: center;

  gap: 6px;

  padding: 7px 10px;

  border-radius: 8px;

  font-size: 12px;

  font-weight: 600;

  white-space: nowrap;

}


/* ==========================================
   FOLLOW UP MASIH AKAN DATANG
   ========================================== */

.next-followup.upcoming {

  background: #ecfdf5;

  color: #047857;

}


/* ==========================================
   FOLLOW UP HARI INI
   ========================================== */

.next-followup.today {

  background: #fffbeb;

  color: #b45309;

}


/* ==========================================
   FOLLOW UP TERLAMBAT
   ========================================== */

.next-followup.overdue {

  background: #fef2f2;

  color: #dc2626;

}


/* ==========================================
   BELUM ADA JADWAL
   ========================================== */

.next-followup.none {

  background: #f1f5f9;

  color: #64748b;

}


.followup-icon {

  font-size: 11px;

}

/* Search */

#searchInput {

  min-width: 280px;

}


/* Date filter */

#chatDateFrom,
#chatDateTo {

  min-width: 150px;

  cursor: pointer;

}


/* ==========================================
   FILTER SUMMARY
   ========================================== */

.filter-summary {

  margin-top: 12px;

  padding: 10px 14px;

  border-radius: 8px;

  background: #f8fafc;

  color: #64748b;

  font-size: 13px;

}


.filter-summary strong {

  color: #1e293b;

  font-weight: 700;

}

/* =====================================================
   NOTIFICATION CARD
   ===================================================== */

.notification-panel {
  border-left: 4px solid #f59e0b !important;
  margin-bottom: 22px !important;
  background-color: #fffbeb !important;
}

.notification-panel .panel-head {
  background-color: #fffbeb !important;
  border-bottom: 1px solid #fde68a !important;
}

.notification-panel .panel-head h2 {
  color: #b45309 !important;
}

.notification-panel th {
  background: #fef3c7 !important;
  color: #92400e !important;
}

/* =====================================================
   AI ASSISTANT
   ===================================================== */
.ai-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  padding: 22px;
}

@media(max-width: 768px) {
  .ai-layout {
    grid-template-columns: 1fr;
  }
}

/* =========================================================
   LOGIN SYSTEM & AUTHENTICATION STYLES (ANTI-INJECTION)
   ========================================================= */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 10% 20%, #f0f4fc 0%, #e9eef8 90%);
  padding: 20px;
  box-sizing: border-box;
  position: relative;
  z-index: 1000;
}

.login-card {
  width: min(420px, 100%);
  background: #ffffff;
  border-radius: 18px;
  box-shadow: 0 20px 45px rgba(23, 32, 51, 0.08), 0 2px 6px rgba(23, 32, 51, 0.04);
  border: 1px solid #e2e8f0;
  padding: 38px 32px 30px;
  box-sizing: border-box;
  animation: fadeInLogin 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes fadeInLogin {
  from { opacity: 0; transform: translateY(12px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.login-header {
  text-align: center;
  margin-bottom: 24px;
}

.login-brand-mark {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: var(--primary);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  font-weight: 800;
  box-shadow: 0 8px 20px rgba(23, 105, 224, 0.28);
  margin-bottom: 14px;
}

.login-title {
  font-size: 22px;
  font-weight: 800;
  color: var(--text);
  margin: 0 0 6px;
  letter-spacing: -0.02em;
}

.login-subtitle {
  font-size: 13px;
  color: var(--muted);
  margin: 0;
}

.login-alert {
  padding: 11px 14px;
  border-radius: 10px;
  font-size: 13px;
  line-height: 1.4;
  margin-bottom: 20px;
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
  display: flex;
  align-items: center;
  word-break: break-word;
}

.login-alert.info {
  background: #eff6ff;
  color: #1e40af;
  border-color: #bfdbfe;
}

.login-alert.hidden {
  display: none !important;
}

.login-form {
  padding: 0;
}

.login-form .form-group {
  margin-bottom: 18px;
}

.login-form label {
  font-size: 12px;
  font-weight: 700;
  color: #334155;
  margin-bottom: 7px;
  display: block;
}

.input-with-icon {
  position: relative;
  display: flex;
  align-items: center;
}

.input-with-icon .input-icon {
  position: absolute;
  left: 12px;
  color: #94a3b8;
  pointer-events: none;
}

.input-with-icon input {
  width: 100%;
  padding: 11px 40px 11px 38px;
  border: 1.5px solid #cbd5e1;
  border-radius: 10px;
  font-size: 14px;
  background: #f8fafc;
  color: var(--text);
  transition: all 0.2s ease;
  box-sizing: border-box;
}

.input-with-icon input:focus {
  background: #fff;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(23, 105, 224, 0.15);
}

.password-toggle-btn {
  position: absolute;
  right: 8px;
  background: none;
  border: none;
  color: #94a3b8;
  padding: 6px;
  cursor: pointer;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.password-toggle-btn:hover {
  color: var(--text);
  background: #f1f5f9;
}

.login-btn {
  width: 100%;
  padding: 13px;
  border: none;
  border-radius: 10px;
  background: var(--primary);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 10px;
  box-shadow: 0 4px 14px rgba(23, 105, 224, 0.25);
}

.login-btn:hover:not(:disabled) {
  background: var(--primary-dark);
  box-shadow: 0 6px 18px rgba(23, 105, 224, 0.35);
  transform: translateY(-1px);
}

.login-btn:disabled {
  opacity: 0.75;
  cursor: not-allowed;
}

.login-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: spinLogin 0.8s linear infinite;
  display: inline-block;
}

@keyframes spinLogin {
  to { transform: rotate(360deg); }
}

.login-footer {
  margin-top: 24px;
  text-align: center;
  padding-top: 18px;
  border-top: 1px solid #f1f5f9;
}

.security-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: #64748b;
  font-weight: 600;
}

.api-config-link-btn {
  background: none;
  border: none;
  color: #64748b;
  font-size: 11px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 8px;
  border-radius: 6px;
  transition: all 0.2s ease;
  margin-bottom: 8px;
}

.api-config-link-btn:hover {
  color: var(--primary);
  background: #f1f5f9;
}

/* User profile & Logout in sidebar */
.user-profile {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 10px;
  background: #f8fafc;
  border-radius: 10px;
  border: 1px solid #eef2f6;
  width: 100%;
  box-sizing: border-box;
}

.user-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-weight: 800;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(23, 105, 224, 0.25);
}

.user-info {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}

.user-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-role {
  font-size: 11px;
  color: var(--muted);
}

.logout-btn {
  background: none;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  padding: 6px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.logout-btn:hover {
  background: #fee2e2;
  color: #dc2626;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logout-topbar-btn {
  display: none;
}

@media(max-width: 768px) {
  .logout-topbar-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ef4444;
  }
}