:root {
  --bg: #f4f6fa;
  --card: #ffffff;
  --sidebar: #121a2b;
  --sidebar-2: #0c1220;
  --primary: #3b82f6;
  --primary-dark: #2563eb;
  --text: #1e293b;
  --muted: #64748b;
  --border: #e2e8f0;
  --green: #10b981;
  --red: #ef4444;
  --amber: #f59e0b;
  --purple: #8b5cf6;
  --radius: 12px;
  --shadow: 0 1px 3px rgba(15, 23, 42, .08);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
}

.layout { display: flex; min-height: 100vh; }

/* ---------- Sidebar ---------- */
.sidebar {
  width: 250px;
  background: linear-gradient(180deg, var(--sidebar) 0%, var(--sidebar-2) 100%);
  color: #cbd5e1;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  flex-shrink: 0;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 20px 18px;
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.brand-logo {
  width: 48px; height: 48px;
  border-radius: 10px;
  padding:10px;
  background: var(--primary);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 16px;
}

.branding-text{font-family: 'seguibli';font-size: 22px!important;}
.branding-text span{font-family: 'seguili';}
 
@font-face {
  font-family: 'seguibli';
  src: url('../fonts/seguibli.ttf');
  font-weight: normal;
  font-style: normal;
}
@font-face {
  font-family: 'seguili';
  src: url('../fonts/seguili.ttf');
  font-weight: normal;
  font-style: normal;
} 
.brand-text strong { display: block; color: #fff; font-size: 15px; }
.brand-text small { color: #8fa3bf; font-size: 11px; }

.nav { padding: 14px 10px; flex: 1; }
.nav-item {
  display: flex; align-items: center; gap: 11px;
  padding: 10px 12px;
  margin-bottom: 4px;
  border-radius: 8px;
  color: #cbd5e1;
  text-decoration: none;
  font-weight: 500;
  transition: background .15s, color .15s;
}
.nav-item:hover { background: rgba(255,255,255,.07); color: #fff; }
.nav-item.active { background: var(--primary); color: #fff; }
.nav-icon { width: 18px; text-align: center; }

.sidebar-foot { padding: 14px; border-top: 1px solid rgba(255,255,255,.06); }
.user-chip { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--purple); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700;
}
.user-chip-text strong { display: block; color: #fff; font-size: 13px; }
.user-chip-text small { color: #8fa3bf; font-size: 11px; }
.logout-link {
  display: block; text-align: center;
  padding: 8px; border-radius: 8px;
  background: rgba(255,255,255,.06);
  color: #fca5a5; text-decoration: none; font-size: 13px;
}
.logout-link:hover { background: rgba(255,255,255,.12); }

/* ---------- Main ---------- */
.main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 28px;
  background: var(--card);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 10;
}
.topbar h1 { margin: 0; font-size: 20px; font-weight: 700; }
.content { padding: 24px 28px; flex: 1; }
.footer { padding: 16px 28px; color: var(--muted); font-size: 12px; border-top: 1px solid var(--border); }

/* ---------- Cards ---------- */
.grid { display: grid; gap: 18px; }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 1000px) { .grid-4 { grid-template-columns: repeat(2, 1fr); } .grid-3 { grid-template-columns: 1fr; } }
@media (max-width: 640px) { .grid-2, .grid-4 { grid-template-columns: 1fr; } .sidebar { display: none; } }

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
}
.card h3 { margin: 0 0 14px; font-size: 15px; font-weight: 700; }

.stat-card { display: flex; align-items: center; gap: 16px; }
.stat-icon {
  width: 52px; height: 52px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; flex-shrink: 0;
}
.stat-icon.blue   { background: #dbeafe; color: var(--primary); }
.stat-icon.green  { background: #d1fae5; color: var(--green); }
.stat-icon.purple { background: #ede9fe; color: var(--purple); }
.stat-icon.amber  { background: #fef3c7; color: var(--amber); }
.stat-card .num { font-size: 26px; font-weight: 800; line-height: 1.1; }
.stat-card .lbl { color: var(--muted); font-size: 13px; }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 11px 12px; border-bottom: 1px solid var(--border); }
th { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .03em; font-weight: 600; }
tr:hover td { background: #f8fafc; }
td .sub { color: var(--muted); font-size: 12px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 16px;
  border-radius: 8px;
  border: 1px solid transparent;
  font-size: 14px; font-weight: 600;
  cursor: pointer; text-decoration: none;
  transition: background .15s, box-shadow .15s;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-outline { background: #fff; color: var(--text); border-color: var(--border); }
.btn-outline:hover { background: #f1f5f9; }
.btn-danger { background: #fee2e2; color: var(--red); }
.btn-danger:hover { background: #fecaca; }
.btn-sm { padding: 5px 10px; font-size: 12px; }
.btn-green { background: var(--green); color: #fff; }
.btn-green:hover { background: #059669; }

.btn-icon { background: none; border: none; cursor: pointer; font-size: 15px; padding: 4px 6px; color: var(--muted); border-radius: 6px; }
.btn-icon:hover { background: #f1f5f9; color: var(--text); }
.btn-icon.danger:hover { color: var(--red); background: #fee2e2; }

.poweredby {color: var(--secondary);text-decoration:none;font-weight:bold;font-family: 'seguibli';font-size: 12px!important;}
.poweredby span{color: var(--secondary);text-decoration:none;font-weight:bold;font-family: 'seguili';}
/* ---------- Badges ---------- */
.badge {
  display: inline-block; padding: 3px 10px; border-radius: 999px;
  font-size: 12px; font-weight: 600;
}
.badge.green { background: #d1fae5; color: #065f46; }
.badge.red   { background: #fee2e2; color: #991b1b; }
.badge.blue  { background: #dbeafe; color: #1e40af; }
.badge.gray  { background: #f1f5f9; color: #475569; }
.badge.purple{ background: #ede9fe; color: #5b21b6; }
.badge.amber { background: #fef3c7; color: #92400e; }

/* ---------- Forms ---------- */
.form-grid { display: grid; gap: 16px; grid-template-columns: 1fr 1fr; }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-weight: 600; font-size: 13px; }
.field .hint { color: var(--muted); font-size: 12px; }
input[type=text], input[type=email], input[type=password], input[type=url], select, textarea {
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
  background: #fff;
  width: 100%;
}
input:focus, select:focus, textarea:focus { outline: 2px solid #bfdbfe; border-color: var(--primary); }
textarea { resize: vertical; min-height: 80px; }

/* ---------- Alerts ---------- */
.alert {
  padding: 12px 16px; border-radius: 10px; margin-bottom: 18px;
  font-weight: 500;
}
.alert-success { background: #d1fae5; color: #065f46; border: 1px solid #a7f3d0; }
.alert-error   { background: #fee2e2; color: #991b1b; border: 1px solid #fecaca; }
.alert-info    { background: #dbeafe; color: #1e40af; border: 1px solid #bfdbfe; }

/* ---------- Code / snippet ---------- */
.snippet {
  background: #0f172a; color: #e2e8f0;
  border-radius: 10px; padding: 16px;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 12.5px; line-height: 1.6;
  overflow-x: auto; white-space: pre; position: relative;
}
.copy-btn { position: absolute; top: 10px; right: 10px; }

/* ---------- Misc ---------- */
.page-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.page-head h2 { margin: 0; font-size: 16px; }
.empty { text-align: center; color: var(--muted); padding: 40px 20px; }
.empty .big { font-size: 40px; margin-bottom: 10px; }
.mt { margin-top: 18px; }
.mb { margin-bottom: 18px; }
.muted { color: var(--muted); }
.chart-bar { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.chart-bar .bar-label { width: 170px; font-size: 13px; flex-shrink: 0; }
.chart-bar .bar-track { flex: 1; background: #f1f5f9; border-radius: 6px; height: 22px; overflow: hidden; }
.chart-bar .bar-fill { height: 100%; background: var(--primary); border-radius: 6px; transition: width .4s; }
.chart-bar .bar-val { width: 60px; text-align: right; font-weight: 700; font-size: 13px; }

.pill-row { display: flex; flex-wrap: wrap; gap: 8px; }
.pill {
  background: #f1f5f9; border: 1px solid var(--border);
  padding: 6px 12px; border-radius: 999px; font-size: 13px;
}
.donut-wrap { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.donut-legend { flex: 1; min-width: 180px; }
.donut-item { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; font-size: 13px; }
.donut-item .dot { width: 10px; height: 10px; border-radius: 3px; flex-shrink: 0; }
.donut-item .lbl { flex: 1; }
.donut-item .val { color: var(--muted); font-weight: 600; }
.report-filters { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }
.report-filters .field { min-width: 160px; }
.chart-card .chart-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.chart-card h3 { margin: 0; }
.funnel { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.funnel-step { background: #f1f5f9; border: 1px solid var(--border); border-radius: 10px; padding: 14px 18px; text-align: center; min-width: 110px; }
.funnel-step .fnum { font-size: 22px; font-weight: 800; }
.funnel-step .flbl { color: var(--muted); font-size: 12px; }
.funnel-arrow { color: var(--muted); font-size: 20px; }
.kv { display: grid; grid-template-columns: 130px 1fr; gap: 6px 12px; font-size: 13.5px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 500; }
pre, code { font-family: "SFMono-Regular", Consolas, Menlo, monospace; }
