:root {
  --bg: #0b111b;
  --bg-soft: #0f1724;
  --sidebar: #111827;
  --panel: #151d2c;
  --panel-2: #1a2435;

  --border: rgba(148, 163, 184, 0.14);
  --border-strong: rgba(148, 163, 184, 0.24);

  --text: #f8fafc;
  --soft: #b7c3d4;
  --muted: #7f8da3;
  --faint: #5e6c82;

  --blue: #4f8cff;
  --green: #31d178;
  --amber: #f4bd3f;
  --red: #ff5a5f;

  --blue-soft: rgba(79, 140, 255, 0.14);
  --green-soft: rgba(49, 209, 120, 0.13);
  --amber-soft: rgba(244, 189, 63, 0.13);
  --red-soft: rgba(255, 90, 95, 0.13);

  --radius: 16px;
  --sidebar-width: 236px;
  --topbar-height: 68px;
  --ease: cubic-bezier(.2,.8,.2,1);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 42% -18%, rgba(79, 140, 255, 0.11), transparent 34rem),
    var(--bg);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

svg {
  width: 16px;
  height: 16px;
  stroke-width: 1.9;
}

.app {
  min-height: 100vh;
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
}

/* Sidebar */

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 18px 14px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  background: var(--sidebar);
  border-right: 1px solid var(--border);
}

.brand{
    display:flex;
    align-items:center;
    gap:14px;

    padding:8px 10px;
    margin-bottom:6px;
}

.brand strong{
    display:block;
    font-size:15px;
    font-weight:700;
    line-height:1.1;
}

.brand small{
    display:block;
    margin-top:3px;

    color:var(--muted);
    font-size:11px;
}

.brand-logo {
    width:40px;
    height:40px;
    object-fit:contain;
    flex-shrink:0;
}

.sidebar-user strong {
  display: block;
  font-size: 13px;
  line-height: 1.2;
}

.sidebar-user small {
  display: block;
  color: var(--muted);
  font-size: 10px;
}

.workspace {
  height: 36px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 10px;
  color: var(--text);
  background: #172132;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
}

.workspace span:nth-child(2) {
  flex: 1;
  text-align: left;
  font-size: 12px;
  font-weight: 700;
}

.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
}

.dot.online {
  background: var(--green);
}

.nav {
  display: grid;
  gap: 3px;
}

.nav p {
  margin: 14px 8px 6px;
  color: var(--faint);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.nav a {
  min-height: 34px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 10px;
  color: var(--soft);
  border-radius: 9px;
  font-size: 12px;
  transition: background 160ms var(--ease), color 160ms var(--ease);
}

.nav a:hover {
  color: var(--text);
  background: rgba(255, 255, 255, .045);
}

.nav a.active {
  color: var(--blue);
  background: var(--blue-soft);
}

.nav em {
  margin-left: auto;
  min-width: 19px;
  height: 19px;
  display: grid;
  place-items: center;
  color: white;
  background: var(--red);
  border-radius: 999px;
  font-size: 10px;
  font-style: normal;
  font-weight: 800;
}

.sidebar-user {
  margin-top: auto;
  min-height: 48px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px;
  border-radius: 12px;
  background: rgba(255, 255, 255, .035);
}

.avatar {
  width: 31px;
  height: 31px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  color: white;
  border-radius: 50%;
  background: linear-gradient(135deg, #5e7cff, #8e6cff);
  font-size: 12px;
  font-weight: 800;
}

/* Main */

.main {
  min-width: 0;
}

.topbar {
  position: sticky;
  top: 0;
  height: var(--topbar-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 34px;
  background: rgba(11, 17, 27, .9);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(14px);
  z-index: 10;
}

.menu-btn {
  display: none;
}

.search {
  width: min(420px, 35vw);
  height: 38px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0 11px;
  background: #151d2b;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
}

.search input {
  width: 100%;
  min-width: 0;
  color: var(--text);
  background: transparent;
  border: 0;
  outline: 0;
  font-size: 12px;
}

.search input::placeholder {
  color: var(--faint);
}

kbd {
  height: 22px;
  min-width: 38px;
  display: grid;
  place-items: center;
  color: var(--faint);
  background: rgba(255, 255, 255, .045);
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 10px;
  font-family: inherit;
}

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

.system-status {
  height: 36px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  color: var(--muted);
  background: #151d2b;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  font-size: 12px;
}

.top-actions button {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  color: var(--soft);
  background: transparent;
  border: 0;
  border-radius: 9px;
}

.top-actions button:hover {
  background: rgba(255, 255, 255, .045);
}

/* Content */

.content {
  width: min(100%, 1480px);
  margin: 0 auto;
  padding: 34px;
}

.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 22px;
}

.page-header h1 {
  margin: 0 0 6px;
  font-size: 24px;
  line-height: 1.15;
  letter-spacing: -0.045em;
}

.page-header p {
  margin: 0;
  color: var(--soft);
  font-size: 13px;
}

.primary-btn {
  height: 38px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 13px;
  color: white;
  background: var(--blue);
  border: 0;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 800;
}

/* KPI */

.kpi-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}

.kpi {
  min-height: 136px;
  display: grid;
  align-content: space-between;
  padding: 18px;
  background: var(--panel);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
}

.kpi span {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--soft);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.kpi strong {
  margin-top: 16px;
  font-size: 32px;
  line-height: 1;
  letter-spacing: -0.06em;
}

.kpi p {
  margin: 0;
  font-size: 11px;
}

.positive {
  color: var(--green);
}

.negative {
  color: var(--red);
}

.warning {
  color: var(--amber);
}

/* Panels */

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-auto-flow: dense;
  gap: 16px;
}

.panel {
  min-width: 0;
  padding: 18px;
  background: var(--panel);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
}

.panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}

.panel-head h2 {
  margin: 0 0 4px;
  font-size: 15px;
  line-height: 1.2;
  letter-spacing: -0.025em;
}

.panel-head p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

/* Grid sizing */

.performance-panel {
  grid-column: span 8;
  min-height: 430px;
}

.activity-panel {
  grid-column: span 4;
  min-height: 430px;
}

.tickets-panel,
.health-panel,
.website-panel,
.backup-panel,
.security-panel {
  grid-column: span 4;
}

.quick-panel {
  grid-column: span 12;
}

/* Tabs */

.tabs {
  display: flex;
  gap: 4px;
  padding: 3px;
  background: rgba(255, 255, 255, .04);
  border: 1px solid var(--border);
  border-radius: 10px;
}

.tabs button {
  height: 28px;
  padding: 0 10px;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 800;
}

.tabs button.active {
  color: var(--text);
  background: rgba(255, 255, 255, .08);
}

/* Chart */

.line-chart {
  width: 100%;
  height: 250px;
  margin-top: 10px;
}

.grid-line {
  stroke: rgba(148, 163, 184, .12);
  stroke-width: 1;
}

.area {
  fill: rgba(79, 140, 255, .12);
}

.line {
  fill: none;
  stroke-width: 3;
  stroke-linecap: round;
}

.line.blue {
  stroke: var(--blue);
}

.line.green {
  stroke: var(--green);
  opacity: .85;
}

.metric-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.metric-strip div {
  padding: 13px;
  background: rgba(255, 255, 255, .035);
  border: 1px solid var(--border);
  border-radius: 12px;
}

.metric-strip span {
  display: block;
  color: var(--muted);
  font-size: 11px;
}

.metric-strip strong {
  display: block;
  margin-top: 6px;
  font-size: 17px;
}

/* Activity */

.activity-list {
  display: grid;
  gap: 0;
}

.activity-list div {
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: 12px;
  padding: 13px 0;
  border-bottom: 1px solid var(--border);
}

.activity-list div:first-child {
  padding-top: 0;
}

.activity-list div:last-child {
  border-bottom: 0;
}

.activity-list i {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  color: var(--blue);
  background: var(--blue-soft);
  border-radius: 9px;
}

.activity-list strong,
.ticket-list strong {
  display: block;
  margin-bottom: 3px;
  font-size: 12px;
}

.activity-list small,
.ticket-list small {
  color: var(--muted);
  font-size: 11px;
}

/* Tickets */

.ticket-list {
  display: grid;
  gap: 13px;
}

.ticket-list div {
  display: grid;
  grid-template-columns: 10px 1fr auto;
  align-items: center;
  gap: 10px;
  padding-bottom: 13px;
  border-bottom: 1px solid var(--border);
}

.ticket-list div:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.priority {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.priority.red {
  background: var(--red);
}

.priority.amber {
  background: var(--amber);
}

.priority.blue {
  background: var(--blue);
}

/* Badges */

.badge {
  min-height: 22px;
  display: inline-flex;
  align-items: center;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
}

.badge.green {
  color: var(--green);
  background: var(--green-soft);
}

.badge.red {
  color: var(--red);
  background: var(--red-soft);
}

/* Bars */

.bars {
  display: grid;
  gap: 14px;
}

.bars > div {
  display: grid;
  grid-template-columns: 92px 1fr 42px;
  align-items: center;
  gap: 10px;
}

.bars span,
.status-list span {
  color: var(--soft);
  font-size: 12px;
}

.bars strong,
.status-list strong {
  text-align: right;
  font-size: 12px;
}

.bars div div {
  height: 6px;
  overflow: hidden;
  background: rgba(255, 255, 255, .08);
  border-radius: 999px;
}

.bars em {
  display: block;
  height: 100%;
  background: var(--blue);
  border-radius: inherit;
}

/* Status list */

.status-list {
  display: grid;
  gap: 13px;
}

.status-list div {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.status-list strong {
  color: var(--green);
}

/* Backup / Security */

.large-value {
  display: block;
  font-size: 32px;
  line-height: 1;
  letter-spacing: -0.05em;
}

.panel-note {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.security-score {
  display: grid;
  grid-template-columns: 74px 1fr;
  align-items: center;
  gap: 14px;
}

.donut {
  width: 70px;
  height: 70px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background:
    radial-gradient(circle, var(--panel) 56%, transparent 58%),
    conic-gradient(var(--green) 0 91%, rgba(255, 255, 255, .08) 91% 100%);
}

.donut span {
  font-size: 15px;
  font-weight: 900;
}

.security-score p {
  margin: 0;
  color: var(--soft);
  font-size: 12px;
  line-height: 1.5;
}

/* Quick actions */

.quick-actions {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 10px;
}

.quick-actions button {
  min-height: 74px;
  display: grid;
  place-items: center;
  gap: 8px;
  color: var(--soft);
  background: rgba(255, 255, 255, .035);
  border: 1px solid var(--border);
  border-radius: 12px;
  font-size: 11px;
  font-weight: 800;
}

.quick-actions button:hover {
  color: var(--text);
  background: var(--blue-soft);
  border-color: rgba(79, 140, 255, .34);
}