/* Hostinger-inspired VPS dashboard */
:root {
  --hp-purple: #673de6;
  --hp-purple-dark: #5025d1;
  --hp-purple-light: #f4f0ff;
  --hp-bg: #f4f5ff;
  --hp-sidebar: #ffffff;
  --hp-card: #ffffff;
  --hp-border: #e8e8ef;
  --hp-text: #1d1e20;
  --hp-muted: #6d7081;
  --hp-green: #00b090;
  --hp-radius: 12px;
  --hp-sidebar-w: 240px;
}

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

body.hp-body {
  font-family: "DM Sans", "Segoe UI", system-ui, sans-serif;
  font-size: 14px;
  color: var(--hp-text);
  background: var(--hp-bg);
}

a { color: var(--hp-purple); text-decoration: none; }
a:hover { text-decoration: underline; }

code {
  font-size: 0.82rem;
  background: #f3f4f6;
  padding: 2px 6px;
  border-radius: 4px;
}

/* Login */
body.hp-body--login {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(160deg, #1a1033 0%, #2d1b69 40%, #673de6 100%);
  padding: 24px;
}

.hp-login-wrap { width: 100%; max-width: 400px; }

.hp-login-brand { text-align: center; color: #fff; margin-bottom: 24px; }
.hp-login-logo { font-size: 1.75rem; font-weight: 800; letter-spacing: 0.08em; }
.hp-login-brand p { opacity: 0.8; margin-top: 8px; font-size: 0.9rem; }

.hp-login-card {
  background: #fff;
  border-radius: var(--hp-radius);
  padding: 32px 28px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
}

.hp-login-panel-icon {
  width: 48px; height: 48px; border-radius: 10px;
  background: linear-gradient(135deg, #00b090, #00856d);
  color: #fff; font-weight: 800; font-size: 1rem;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 16px;
}

.hp-login-card h1 { font-size: 1.35rem; margin-bottom: 4px; }
.hp-login-sub { color: var(--hp-muted); font-size: 0.85rem; margin-bottom: 20px; }
.hp-login-foot { text-align: center; margin-top: 16px; font-size: 0.85rem; }

.hp-field { margin-bottom: 14px; }
.hp-field label { display: block; font-size: 0.82rem; font-weight: 600; color: var(--hp-muted); margin-bottom: 6px; }
.hp-field input {
  width: 100%; padding: 11px 12px; border: 1px solid var(--hp-border);
  border-radius: 8px; font-size: 14px;
}
.hp-field input:focus { outline: none; border-color: var(--hp-purple); box-shadow: 0 0 0 3px var(--hp-purple-light); }

.hp-alert {
  background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca;
  padding: 10px 12px; border-radius: 8px; margin-bottom: 14px; font-size: 0.88rem;
}

/* Buttons */
.hp-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 18px; border-radius: 8px; font-size: 14px; font-weight: 600;
  border: none; cursor: pointer; text-decoration: none !important;
  transition: background 0.15s, box-shadow 0.15s;
}
.hp-btn--primary { background: var(--hp-purple); color: #fff !important; }
.hp-btn--primary:hover { background: var(--hp-purple-dark); text-decoration: none !important; }
.hp-btn--ghost { background: #fff; color: var(--hp-text) !important; border: 1px solid var(--hp-border); }
.hp-btn--ghost:hover { background: #fafafa; }
.hp-btn--disabled { opacity: 0.55; cursor: not-allowed; pointer-events: none; }
.hp-muted { color: var(--hp-muted); font-size: 0.9rem; }
.hp-btn--block { width: 100%; }
.hp-btn--sm { padding: 8px 14px; font-size: 0.82rem; }

/* App shell */
.hp-shell { display: flex; min-height: 100vh; }

.hp-sidebar {
  width: var(--hp-sidebar-w); flex-shrink: 0;
  background: var(--hp-sidebar); border-right: 1px solid var(--hp-border);
  display: flex; flex-direction: column; padding: 20px 0;
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
}

.hp-sidebar-logo {
  font-weight: 800; font-size: 1.1rem; letter-spacing: 0.06em;
  padding: 0 20px 20px; color: var(--hp-text);
}

.hp-nav { display: flex; flex-direction: column; gap: 2px; padding: 0 10px; }
.hp-nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: 8px; color: var(--hp-muted);
  font-weight: 600; font-size: 0.88rem; text-decoration: none !important;
}
.hp-nav-item:hover { background: #f8f8fc; color: var(--hp-text); }
.hp-nav-item--active { background: var(--hp-purple-light); color: var(--hp-purple); }
.hp-nav-item i { width: 18px; text-align: center; }

.hp-subnav {
  margin-top: 16px; padding: 12px 10px 0; border-top: 1px solid var(--hp-border);
  display: flex; flex-direction: column; gap: 2px;
}
.hp-subnav-item {
  padding: 8px 12px 8px 28px; border-radius: 8px;
  color: var(--hp-muted); font-size: 0.85rem; font-weight: 600;
  text-decoration: none !important;
}
.hp-subnav-item:hover { background: #f8f8fc; color: var(--hp-text); }
.hp-subnav-item--active { color: var(--hp-purple); background: var(--hp-purple-light); }

.hp-sidebar-foot {
  margin-top: auto; padding: 16px 20px 0; font-size: 0.82rem; color: var(--hp-muted);
  display: flex; justify-content: space-between; border-top: 1px solid var(--hp-border);
  padding-top: 16px;
}

.hp-main { flex: 1; min-width: 0; }

.hp-page-head {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 12px; padding: 20px 28px; background: #fff; border-bottom: 1px solid var(--hp-border);
}

.hp-breadcrumb {
  display: flex; align-items: center; gap: 8px; font-size: 0.95rem; color: var(--hp-muted);
}
.hp-breadcrumb strong { color: var(--hp-text); font-weight: 700; }
.hp-breadcrumb i { font-size: 0.65rem; }

.hp-head-actions { display: flex; gap: 10px; }

.hp-content { padding: 24px 28px 48px; }

/* Cards */
.hp-card {
  background: var(--hp-card); border: 1px solid var(--hp-border);
  border-radius: var(--hp-radius); padding: 20px;
}

.hp-card-title {
  font-size: 1rem; font-weight: 700; margin-bottom: 16px;
  display: flex; align-items: center; gap: 8px;
}

.hp-grid--top {
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px;
}

.hp-panel-brand, .hp-os-head { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 16px; }

.hp-cp-logo, .hp-os-icon {
  width: 48px; height: 48px; border-radius: 10px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; color: #fff;
}
.hp-cp-logo { background: linear-gradient(135deg, #00b090, #00856d); }
.hp-os-icon { background: #1e293b; font-size: 1.4rem; color: #fff; }

.hp-panel-brand strong, .hp-os-head strong { display: block; font-size: 0.95rem; }
.hp-panel-brand span { font-size: 0.82rem; color: var(--hp-muted); }

.hp-kv { margin-bottom: 16px; }
.hp-kv > div {
  display: flex; justify-content: space-between; gap: 12px;
  padding: 8px 0; border-bottom: 1px solid #f3f4f6; font-size: 0.88rem;
}
.hp-kv dt { color: var(--hp-muted); font-weight: 500; }
.hp-kv dd { font-weight: 600; text-align: right; }

.hp-card-note { margin-top: 12px; font-size: 0.78rem; color: var(--hp-muted); }

.hp-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.hp-tag {
  font-size: 0.72rem; font-weight: 700; padding: 3px 8px;
  background: #f3f4f6; border-radius: 999px; color: var(--hp-muted);
  display: inline-flex; align-items: center; gap: 4px;
}
.hp-tag--green { background: #d1fae5; color: #065f46; }
.hp-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--hp-green); }

/* Metrics row */
.hp-metrics {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px; margin-bottom: 16px;
}

.hp-metric {
  background: #fff; border: 1px solid var(--hp-border); border-radius: var(--hp-radius);
  padding: 14px 14px 10px; min-height: 110px;
}

.hp-metric-label { display: block; font-size: 0.78rem; color: var(--hp-muted); margin-bottom: 6px; }
.hp-metric-val { display: block; font-size: 1.05rem; font-weight: 800; margin-bottom: 8px; line-height: 1.2; }

.hp-spark { height: 32px; }
.hp-spark svg { width: 100%; height: 100%; display: block; }

.hp-ring {
  width: 44px; height: 44px; border-radius: 50%;
  background: conic-gradient(var(--hp-purple) calc(var(--pct) * 1%), #ececf4 0);
  display: flex; align-items: center; justify-content: center;
}
.hp-ring span {
  width: 32px; height: 32px; border-radius: 50%; background: #fff;
}
.hp-ring--thin { width: 40px; height: 40px; }
.hp-ring--thin span { width: 28px; height: 28px; }

/* Quick bar */
.hp-quick {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px;
  background: #fff; border: 1px solid var(--hp-border); border-radius: var(--hp-radius);
  padding: 16px 20px; margin-bottom: 16px; font-size: 0.85rem;
}
.hp-quick > div { display: flex; flex-direction: column; gap: 4px; color: var(--hp-muted); }
.hp-quick i { color: var(--hp-purple); margin-bottom: 2px; }
.hp-quick strong { color: var(--hp-text); font-size: 1rem; }
.hp-quick a { font-weight: 600; }

/* Details */
.hp-grid--details {
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px;
}

.hp-detail-list > div {
  display: flex; justify-content: space-between; gap: 16px;
  padding: 10px 0; border-bottom: 1px solid #f3f4f6; font-size: 0.88rem;
}
.hp-detail-list dt { color: var(--hp-muted); font-weight: 500; flex-shrink: 0; }
.hp-detail-list dd { text-align: right; font-weight: 600; }

/* Projects */
.hp-card--projects { margin-top: 0; }
.hp-projects { display: flex; flex-direction: column; gap: 12px; }
.hp-project {
  display: flex; align-items: center; gap: 14px;
  padding: 14px; background: #fafafa; border-radius: 10px; border: 1px solid var(--hp-border);
}
.hp-project-icon {
  width: 44px; height: 44px; border-radius: 10px; background: var(--hp-purple);
  color: #fff; display: flex; align-items: center; justify-content: center; font-size: 1.1rem;
}
.hp-project-body { flex: 1; min-width: 0; }
.hp-project-body strong { display: block; font-size: 0.95rem; }
.hp-project-body span { font-size: 0.82rem; color: var(--hp-muted); }

@media (max-width: 1200px) {
  .hp-metrics { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 900px) {
  .hp-shell { flex-direction: column; }
  .hp-sidebar { width: 100%; height: auto; position: static; }
  .hp-grid--top, .hp-grid--details, .hp-quick { grid-template-columns: 1fr; }
  .hp-metrics { grid-template-columns: repeat(2, 1fr); }
  .hp-content, .hp-page-head { padding-left: 16px; padding-right: 16px; }
}

@media (max-width: 520px) {
  .hp-metrics { grid-template-columns: 1fr; }
}
