/* ============================================================
   LIVEHELP.LT – Global Styles
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=Outfit:wght@400;500;600;700;800;900&display=swap');

:root {
  --bg-base:      #080c14;
  --bg-card:      #0d1320;
  --bg-card-2:    #111927;
  --bg-glass:     rgba(255,255,255,0.04);
  --border:       rgba(255,255,255,0.08);
  --border-hover: rgba(99,179,237,0.35);

  --blue:         #3b82f6;
  --blue-light:   #60a5fa;
  --violet:       #8b5cf6;
  --violet-light: #a78bfa;
  --cyan:         #06b6d4;
  --green:        #22c55e;
  --red:          #ef4444;
  --orange:       #f59e0b;

  --grad-main:    linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
  --grad-card:    linear-gradient(135deg, rgba(59,130,246,0.12) 0%, rgba(139,92,246,0.08) 100%);
  --grad-glow:    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(99,102,241,0.25), transparent);

  --text-1: #f1f5f9;
  --text-2: #94a3b8;
  --text-3: #475569;

  --font:  'Plus Jakarta Sans', sans-serif;
  --font-h:'Outfit', sans-serif;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;

  --shadow-card: 0 1px 0 rgba(255,255,255,0.06) inset, 0 4px 24px rgba(0,0,0,0.4);
  --shadow-glow: 0 0 40px rgba(99,102,241,0.2);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg-base);
  color: var(--text-1);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--blue-light); text-decoration: none; transition: color .2s; }
a:hover { color: #fff; }

img { max-width: 100%; display: block; }

/* ── Typography ── */
h1,h2,h3,h4,h5 { font-family: var(--font-h); line-height: 1.15; letter-spacing: -.02em; }

.gradient-text {
  background: var(--grad-main);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Layout ── */
.container { max-width: 1140px; margin: 0 auto; padding: 0 24px; }
.container-sm { max-width: 780px; margin: 0 auto; padding: 0 24px; }

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 24px;
  border-radius: var(--radius-md);
  font-family: var(--font);
  font-size: .9rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all .22s cubic-bezier(.34,1.56,.64,1);
  text-decoration: none;
  white-space: nowrap;
}
.btn-primary {
  background: var(--grad-main);
  color: #fff;
  box-shadow: 0 4px 20px rgba(99,102,241,0.35);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(99,102,241,0.5);
  color: #fff;
}
.btn-secondary {
  background: var(--bg-glass);
  color: var(--text-1);
  border: 1px solid var(--border);
}
.btn-secondary:hover {
  background: rgba(255,255,255,0.08);
  border-color: var(--border-hover);
  color: #fff;
}
.btn-ghost {
  background: transparent;
  color: var(--text-2);
  border: 1px solid transparent;
}
.btn-ghost:hover { color: var(--text-1); background: var(--bg-glass); }
.btn-danger {
  background: rgba(239,68,68,.15);
  color: #fca5a5;
  border: 1px solid rgba(239,68,68,.25);
}
.btn-danger:hover { background: rgba(239,68,68,.25); color: #fff; }
.btn-sm { padding: 7px 14px; font-size: .8rem; border-radius: var(--radius-sm); }
.btn-lg { padding: 15px 34px; font-size: 1rem; border-radius: var(--radius-lg); }
.btn[disabled], .btn:disabled { opacity: .5; pointer-events: none; }
.btn-full { width: 100%; }

/* ── Cards ── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-card);
}
.card-sm { padding: 16px; border-radius: var(--radius-md); }

/* ── Forms ── */
.form-group { margin-bottom: 18px; }
.form-label {
  display: block;
  font-size: .82rem;
  font-weight: 600;
  color: var(--text-2);
  margin-bottom: 7px;
  letter-spacing: .03em;
  text-transform: uppercase;
}
.form-control {
  width: 100%;
  background: var(--bg-glass);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 11px 15px;
  color: var(--text-1);
  font-family: var(--font);
  font-size: .9rem;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
}
.form-control:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(59,130,246,.18);
}
.form-control::placeholder { color: var(--text-3); }
textarea.form-control { resize: vertical; min-height: 100px; }

select.form-control {
  cursor: pointer;
  background: #10182b;
  color: #ffffff;
  border-color: rgba(59,130,246,.65);
}
select.form-control option {
  background: #ffffff;
  color: #111827;
}
select.form-control:focus {
  border-color: #8b5cf6;
  box-shadow: 0 0 15px rgba(139,92,246,.35);
}


/* ── Alerts ── */
.alert {
  padding: 12px 16px;
  border-radius: var(--radius-md);
  font-size: .875rem;
  margin-bottom: 16px;
  border: 1px solid transparent;
}
.alert-success { background: rgba(34,197,94,.12); border-color: rgba(34,197,94,.25); color: #86efac; }
.alert-error   { background: rgba(239,68,68,.12);  border-color: rgba(239,68,68,.25);  color: #fca5a5; }
.alert-warning { background: rgba(245,158,11,.12); border-color: rgba(245,158,11,.25); color: #fde68a; }
.alert-info    { background: rgba(59,130,246,.12);  border-color: rgba(59,130,246,.25);  color: #93c5fd; }

/* ── Badge ── */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px; border-radius: 100px;
  font-size: .72rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
}
.badge-green  { background: rgba(34,197,94,.15);  color: #4ade80; }
.badge-blue   { background: rgba(59,130,246,.15); color: #93c5fd; }
.badge-red    { background: rgba(239,68,68,.15);  color: #fca5a5; }
.badge-orange { background: rgba(245,158,11,.15); color: #fde68a; }
.badge-gray   { background: rgba(148,163,184,.1); color: var(--text-2); }
.badge-dot::before {
  content: ''; width: 6px; height: 6px;
  border-radius: 50%; background: currentColor;
}

/* ── Table ── */
.table-wrap { overflow-x: auto; border-radius: var(--radius-lg); border: 1px solid var(--border); }
table { width: 100%; border-collapse: collapse; }
th {
  background: var(--bg-card-2);
  padding: 12px 16px;
  text-align: left;
  font-size: .77rem;
  font-weight: 700;
  color: var(--text-2);
  letter-spacing: .06em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--border);
}
td {
  padding: 13px 16px;
  font-size: .875rem;
  color: var(--text-1);
  border-bottom: 1px solid var(--border);
}
tr:last-child td { border-bottom: none; }
tbody tr:hover { background: rgba(255,255,255,.025); }

/* ── Divider ── */
.divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 24px 0;
}

/* ── Dashboard shell ── */
.dash-layout { display: flex; min-height: 100vh; }

.sidebar {
  width: 280px;
  flex-shrink: 0;
  background: linear-gradient(180deg, #0d1320 0%, #08101d 100%);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  z-index: 100;
}
.sidebar-logo {
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--border);
}
.sidebar-logo a {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-h);
  font-size: 1.05rem;
  font-weight: 800;
  color: #fff;
}
.logo-icon {
  width: 34px; height: 34px;
  background: var(--grad-main);
  border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem;
}
.sidebar-nav { padding: 14px 14px; flex: 1; overflow-y: auto; min-height: 0; scrollbar-width: thin; scrollbar-color: rgba(148,163,184,.35) transparent; }
.sidebar-nav::-webkit-scrollbar { width: 6px; }
.sidebar-nav::-webkit-scrollbar-track { background: transparent; }
.sidebar-nav::-webkit-scrollbar-thumb { background: rgba(148,163,184,.35); border-radius: 999px; }
.nav-section-label {
  font-size: .68rem;
  font-weight: 700;
  color: var(--text-3);
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: 14px 10px 6px;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 12px;
  border-radius: 10px;
  color: var(--text-2);
  font-size: .875rem;
  font-weight: 500;
  transition: all .18s;
  margin-bottom: 2px;
}
.nav-item:hover { background: var(--bg-glass); color: var(--text-1); }
.nav-item.active {
  background: var(--grad-card);
  color: var(--blue-light);
  border: 1px solid rgba(59,130,246,.2);
}
.nav-item .nav-icon { font-size: 1rem; width: 20px; text-align: center; }
.nav-badge {
  margin-left: auto;
  background: var(--red);
  color: #fff;
  border-radius: 100px;
  padding: 1px 7px;
  font-size: .68rem;
  font-weight: 700;
}
.sidebar-bottom {
  padding: 14px 14px 16px;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
  background: rgba(8,12,20,.72);
}
.sidebar-user {
  display: flex; align-items: center; gap: 10px;
  padding: 10px;
  border-radius: var(--radius-sm);
  background: var(--bg-glass);
  margin-bottom: 8px;
}
.user-avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--grad-main);
  display: flex; align-items: center; justify-content: center;
  font-size: .85rem;
  font-weight: 700;
  flex-shrink: 0;
}
.user-info { min-width: 0; }
.user-name { font-size: .8rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-role { font-size: .7rem; color: var(--text-3); }

.main-content { margin-left: 280px; flex: 1; min-height: 100vh; }
.page-header {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  padding: 20px 32px;
  display: flex; align-items: center; gap: 16px;
}
.page-title { font-family: var(--font-h); font-size: 1.35rem; font-weight: 700; }
.page-subtitle { font-size: .85rem; color: var(--text-2); margin-top: 2px; }
.page-actions { margin-left: auto; display: flex; gap: 8px; }
.page-body { padding: 28px 32px; }

/* Dashboard welcome hero */
.dashboard-welcome-card {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(280px, .95fr);
  gap: 26px;
  align-items: center;
  margin-bottom: 24px;
  padding: 34px 38px;
  border: 1px solid rgba(99,102,241,.22);
  background:
    radial-gradient(circle at 78% 20%, rgba(139,92,246,.22), transparent 30%),
    radial-gradient(circle at 15% 0%, rgba(59,130,246,.18), transparent 30%),
    linear-gradient(135deg, rgba(255,255,255,.98), rgba(245,248,255,.94));
  color: #101828;
  border-radius: 24px;
  box-shadow: 0 18px 60px rgba(15,23,42,.12);
}
.dashboard-welcome-card h2 { font-size: clamp(1.65rem, 3vw, 2.45rem); margin-bottom: 12px; color: #0f172a; }
.dashboard-welcome-card p { color: #475569; max-width: 620px; margin-bottom: 18px; }
.dashboard-checks { display: grid; gap: 9px; margin: 18px 0 24px; }
.dashboard-checks span { display: flex; align-items: center; gap: 10px; font-weight: 700; color: #334155; }
.dashboard-checks span::before { content: '✓'; display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; border-radius: 999px; background: #4ade80; color: #fff; font-size: .76rem; }
.dashboard-hero-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; }
.dashboard-mini-note { display: inline-flex; align-items: center; gap: 8px; margin-top: 14px; font-size: .82rem; color: #64748b; }
.dashboard-mini-note b { color: #047857; background: #dcfce7; padding: 4px 9px; border-radius: 999px; }
.dashboard-bot-visual { position: relative; min-height: 250px; display: flex; align-items: center; justify-content: center; }
.dashboard-bot-core { width: 168px; height: 168px; border-radius: 42% 42% 48% 48%; background: linear-gradient(180deg,#fff,#dbeafe); border: 1px solid rgba(59,130,246,.18); box-shadow: 0 22px 55px rgba(99,102,241,.28); display: flex; align-items: center; justify-content: center; font-size: 4rem; }
.dashboard-bubble { position: absolute; left: 0; top: 36px; background: #fff; color: #0f172a; padding: 14px 18px; border-radius: 18px; box-shadow: 0 15px 45px rgba(15,23,42,.12); font-weight: 800; }
.dashboard-orbit { position: absolute; display: grid; place-items: center; width: 58px; height: 58px; border-radius: 18px; background: rgba(255,255,255,.86); box-shadow: 0 12px 30px rgba(99,102,241,.16); font-size: 1.55rem; }
.dashboard-orbit.o1 { right: 44px; top: 18px; }
.dashboard-orbit.o2 { right: 6px; top: 112px; }
.dashboard-orbit.o3 { right: 66px; bottom: 16px; }
@media (max-width: 980px) { .dashboard-welcome-card { grid-template-columns: 1fr; } .dashboard-bot-visual { min-height: 190px; } }
@media (max-width: 768px) { .dashboard-welcome-card { padding: 24px 18px; } .dashboard-hero-actions .btn { width: 100%; } }

/* Stats grid */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin-bottom: 28px; }
.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
}
.stat-label { font-size: .75rem; color: var(--text-2); font-weight: 600; letter-spacing: .05em; text-transform: uppercase; }
.stat-value { font-family: var(--font-h); font-size: 2rem; font-weight: 800; margin: 6px 0 4px; }
.stat-change { font-size: .78rem; color: var(--text-3); }

/* Upload zone */
.upload-zone {
  border: 2px dashed var(--border);
  border-radius: var(--radius-lg);
  padding: 48px 24px;
  text-align: center;
  cursor: pointer;
  transition: all .25s;
}
.upload-zone:hover, .upload-zone.dragover {
  border-color: var(--blue);
  background: rgba(59,130,246,.05);
}
.upload-zone input[type=file] { display: none; }
.upload-icon { font-size: 2.8rem; margin-bottom: 12px; }
.upload-title { font-size: 1.05rem; font-weight: 600; margin-bottom: 6px; }
.upload-hint { font-size: .82rem; color: var(--text-2); }

/* Code block */
.code-block {
  background: #020408;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  font-family: 'Fira Code', 'Consolas', monospace;
  font-size: .82rem;
  color: #7dd3fc;
  overflow-x: auto;
  white-space: pre;
  line-height: 1.7;
  position: relative;
}
.code-copy-btn {
  position: absolute;
  top: 10px; right: 10px;
}

/* Toggle switch */
.toggle-wrap { display: flex; align-items: center; gap: 12px; }
.toggle {
  position: relative;
  width: 44px; height: 24px;
  flex-shrink: 0;
}
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
  position: absolute; inset: 0;
  background: var(--bg-card-2);
  border: 1px solid var(--border);
  border-radius: 100px;
  cursor: pointer;
  transition: .25s;
}
.toggle-slider::before {
  content: '';
  position: absolute;
  left: 3px; top: 50%;
  transform: translateY(-50%);
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--text-3);
  transition: .25s cubic-bezier(.34,1.56,.64,1);
}
.toggle input:checked + .toggle-slider { background: var(--blue); border-color: var(--blue); }
.toggle input:checked + .toggle-slider::before { left: calc(100% - 19px); background: #fff; }

/* Color picker */
.color-picker-row { display: flex; gap: 8px; flex-wrap: wrap; }
.color-swatch {
  width: 32px; height: 32px;
  border-radius: 50%;
  cursor: pointer;
  border: 3px solid transparent;
  transition: transform .2s, border-color .2s;
}
.color-swatch:hover, .color-swatch.active { transform: scale(1.15); border-color: #fff; }

/* Responsive */
@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); transition: transform .3s; }
  .sidebar.open { transform: translateX(0); }
  .main-content { margin-left: 0; }
  .page-body { padding: 20px 16px; }
  .page-header { padding: 16px; }
  .stats-grid { grid-template-columns: repeat(2,1fr); }
}


/* LIVEHELP fix: sidebar elementai neturi išlįsti iš meniu */
.sidebar, .sidebar-nav, .nav-item { overflow-wrap: normal; word-break: normal; }
.nav-item { position: relative; display: flex; align-items: center; gap: 10px; min-width: 0; }
.nav-item .nav-icon { flex: 0 0 auto; }
.nav-item > span:not(.nav-icon):not(.nav-badge) { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-badge { margin-left: auto; flex: 0 0 auto; }
.sidebar-user { min-width: 0; }
.user-info { min-width: 0; overflow: hidden; }
