/* WEB_TS Panel — Main Stylesheet */
:root {
  --sidebar-w: 240px;
  --sidebar-bg: #0f172a;
  --sidebar-hover: #1e293b;
  --sidebar-active: #1d4ed8;
  --topbar-h: 56px;
  --text-muted: #64748b;
}

/* ── Layout ─────────────────────────────────────────────────────────────── */
body {
  margin: 0;
  font-family: "Segoe UI", Arial, sans-serif;
  background: #f1f5f9;
  color: #1e293b;
}

.sidebar {
  position: fixed;
  top: 0; left: 0; bottom: 0;
  width: var(--sidebar-w);
  background: var(--sidebar-bg);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  z-index: 100;
  transition: transform .25s ease;
}

.main-content {
  margin-left: var(--sidebar-w);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.content-wrap {
  flex: 1;
  padding: 24px;
  max-width: 1400px;
  width: 100%;
}

/* ── Sidebar ─────────────────────────────────────────────────────────────── */
.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 18px 16px 14px;
  border-bottom: 1px solid #1e293b;
}
.sidebar-logo  { width: 28px; height: 28px; border-radius: 5px; }
.sidebar-title { color: #f1f5f9; font-weight: 700; font-size: 1.1rem; letter-spacing: 1px; }
.sidebar-pro   { font-size: .6rem; background: #1d4ed8; color: #fff; padding: 1px 5px; border-radius: 3px; font-weight: 700; }

.sidebar-nav   { list-style: none; padding: 10px 0; margin: 0; flex: 1; }
.sidebar-nav li a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  color: #94a3b8;
  text-decoration: none;
  font-size: .9rem;
  transition: background .15s, color .15s;
  border-radius: 0;
}
.sidebar-nav li a:hover  { background: var(--sidebar-hover); color: #f1f5f9; }
.sidebar-nav li a.active { background: var(--sidebar-active); color: #fff; font-weight: 600; }
.sidebar-nav li a i      { width: 18px; text-align: center; }

.sidebar-section {
  padding: 10px 16px 4px;
  font-size: .7rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #475569;
  cursor: default;
}
.sidebar-footer {
  padding: 10px 16px;
  font-size: .75rem;
  color: #475569;
  border-top: 1px solid #1e293b;
}

/* ── Topbar ──────────────────────────────────────────────────────────────── */
.topbar {
  height: var(--topbar-h);
  background: #fff;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  padding: 0 24px;
  gap: 12px;
  position: sticky;
  top: 0;
  z-index: 90;
}
.sidebar-toggle {
  background: none; border: none;
  color: #64748b; font-size: 1.1rem;
  cursor: pointer; padding: 4px;
}
.topbar-right   { margin-left: auto; display: flex; align-items: center; gap: 16px; }
.topbar-stat    { display: flex; align-items: center; gap: 6px; font-size: .875rem; color: #475569; }

/* ── Stat cards ──────────────────────────────────────────────────────────── */
.stat-card {
  background: #fff;
  border-radius: 10px;
  padding: 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: 0 1px 3px rgba(0,0,0,.06);
  height: 100%;
}
.stat-icon {
  width: 46px; height: 46px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}
.bg-primary-soft { background: #eff6ff; color: #1d4ed8; }
.bg-success-soft { background: #f0fdf4; color: #16a34a; }
.bg-warning-soft { background: #fffbeb; color: #d97706; }
.bg-danger-soft  { background: #fef2f2; color: #dc2626; }
.bg-info-soft    { background: #f0f9ff; color: #0284c7; }

.stat-label { font-size: .8rem; color: var(--text-muted); margin-bottom: 2px; }
.stat-value { font-size: 1.6rem; font-weight: 700; line-height: 1.1; }

/* ── Cards ───────────────────────────────────────────────────────────────── */
.card { border-radius: 10px !important; }
.card-header { border-radius: 10px 10px 0 0 !important; }

/* ── Page header ─────────────────────────────────────────────────────────── */
.page-header h2 { font-size: 1.5rem; margin: 0; }

/* ── Tables ──────────────────────────────────────────────────────────────── */
.table th { font-size: .8rem; text-transform: uppercase; letter-spacing: .5px; color: #64748b; }
.fw-mono   { font-family: "Courier New", monospace; }

/* ── Responsive sidebar ──────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .sidebar      { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .main-content { margin-left: 0; }
  .content-wrap { padding: 16px; }
}
