/* ============================================================
   HNC Cloud — Main Stylesheet
   YONET Labs
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

/* ── Design Tokens ── */
:root {
  /* Base */
  --bg:         #FAFAFA;
  --surface:    #FFFFFF;
  --surface-2:  #F5F3FF;
  --border:     #EDE9FE;
  --border-2:   #E5E7EB;

  /* Text */
  --text-1:     #1E1B4B;
  --text-2:     #4B5563;
  --text-3:     #9CA3AF;
  --text-inv:   #FFFFFF;

  /* Brand */
  --purple:     #7C3AED;
  --purple-2:   #6D28D9;
  --purple-lt:  #EDE9FE;
  --purple-xlt: #F5F3FF;
  --blue:       #3B82F6;
  --blue-lt:    #EFF6FF;

  /* Semantic */
  --green:      #10B981;
  --green-lt:   #D1FAE5;
  --red:        #EF4444;
  --red-lt:     #FEE2E2;
  --yellow:     #F59E0B;
  --yellow-lt:  #FEF3C7;

  /* Sidebar */
  --sidebar-w:  240px;
  --sidebar-bg: #1E1B4B;
  --sidebar-hover: rgba(255,255,255,0.08);
  --sidebar-active: rgba(124,58,237,0.6);
  --sidebar-text:  rgba(255,255,255,0.75);
  --sidebar-text-active: #FFFFFF;

  /* Misc */
  --radius-sm:  6px;
  --radius:     10px;
  --radius-lg:  14px;
  --shadow-sm:  0 1px 3px rgba(30,27,75,0.06);
  --shadow:     0 4px 16px rgba(30,27,75,0.08);
  --shadow-lg:  0 8px 32px rgba(30,27,75,0.12);
  --transition: 150ms cubic-bezier(0.4,0,0.2,1);

  /* Topbar */
  --topbar-h:   58px;

  --font: 'Inter', system-ui, sans-serif;
  --mono: 'JetBrains Mono', 'Fira Code', monospace;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 14px; -webkit-font-smoothing: antialiased; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text-1);
  min-height: 100vh;
  overflow-x: hidden;
}
a { text-decoration: none; color: inherit; }
button { font-family: var(--font); cursor: pointer; border: none; background: none; }
input, select, textarea { font-family: var(--font); }
ul { list-style: none; }
img { display: block; max-width: 100%; }

/* ── Layout Shell ── */
.app-shell {
  display: flex;
  min-height: 100vh;
}

/* ── Sidebar ── */
.sidebar {
  width: var(--sidebar-w);
  background: var(--sidebar-bg);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0;
  height: 100vh;
  z-index: 100;
  transition: transform var(--transition);
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 20px 20px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.logo-icon {
  width: 32px; height: 32px;
  background: linear-gradient(135deg, var(--purple), var(--blue));
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.logo-icon svg { color: white; }

.logo-text {
  display: flex; flex-direction: column;
  line-height: 1.1;
}
.logo-name {
  font-weight: 700;
  font-size: 15px;
  color: #FFFFFF;
  letter-spacing: -0.3px;
}
.logo-sub {
  font-size: 9px;
  color: rgba(255,255,255,0.4);
  letter-spacing: 0.5px;
  font-weight: 500;
  text-transform: uppercase;
}

.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 12px 10px;
  scrollbar-width: none;
}
.sidebar-nav::-webkit-scrollbar { display: none; }

.nav-section-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.3);
  padding: 10px 10px 4px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  color: var(--sidebar-text);
  font-size: 13.5px;
  font-weight: 450;
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
  margin-bottom: 1px;
  position: relative;
}
.nav-item:hover {
  background: var(--sidebar-hover);
  color: #FFFFFF;
}
.nav-item.active {
  background: var(--sidebar-active);
  color: var(--sidebar-text-active);
  font-weight: 500;
}
.nav-item.active::before {
  content: '';
  position: absolute;
  left: 0; top: 50%;
  transform: translateY(-50%);
  width: 3px; height: 20px;
  background: var(--purple);
  border-radius: 0 2px 2px 0;
}
.nav-item svg { flex-shrink: 0; opacity: 0.8; }
.nav-item.active svg { opacity: 1; }

.sidebar-footer {
  padding: 12px 10px;
  border-top: 1px solid rgba(255,255,255,0.08);
}
.sidebar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background var(--transition);
}
.sidebar-user:hover { background: var(--sidebar-hover); }
.user-avatar {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--purple), var(--blue));
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 600; color: #fff;
  flex-shrink: 0;
}
.user-info { flex: 1; min-width: 0; }
.user-name {
  font-size: 13px; font-weight: 500;
  color: #fff;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.user-plan {
  font-size: 10px;
  color: rgba(255,255,255,0.4);
}

/* ── Main Content ── */
.main-wrap {
  margin-left: var(--sidebar-w);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ── Topbar ── */
.topbar {
  height: var(--topbar-h);
  background: var(--surface);
  border-bottom: 1px solid var(--border-2);
  display: flex;
  align-items: center;
  padding: 0 28px;
  gap: 12px;
  position: sticky;
  top: 0;
  z-index: 50;
}

.breadcrumb {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-3);
}
.breadcrumb-sep { opacity: 0.5; }
.breadcrumb-current {
  color: var(--text-1);
  font-weight: 500;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.icon-btn {
  width: 34px; height: 34px;
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-2);
  transition: background var(--transition), color var(--transition);
  position: relative;
}
.icon-btn:hover { background: var(--surface-2); color: var(--text-1); }
.notif-dot {
  position: absolute;
  top: 7px; right: 7px;
  width: 6px; height: 6px;
  background: var(--red);
  border-radius: 50%;
  border: 2px solid var(--surface);
}

.topbar-avatar {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--purple), var(--blue));
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 600; color: #fff;
  cursor: pointer;
  margin-left: 4px;
}

/* ── Page Content ── */
.page-content {
  flex: 1;
  padding: 28px;
  overflow-y: auto;
}

.page-header {
  margin-bottom: 24px;
}
.page-title {
  font-size: 20px;
  font-weight: 600;
  color: var(--text-1);
  letter-spacing: -0.3px;
}
.page-subtitle {
  font-size: 13px;
  color: var(--text-3);
  margin-top: 3px;
}

/* ── Cards ── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-sm);
}
.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.card-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-1);
}
.card-subtitle {
  font-size: 12px;
  color: var(--text-3);
  margin-top: 2px;
}

/* ── Stat Cards ── */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 20px;
}

.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  box-shadow: var(--shadow-sm);
}
.stat-label {
  font-size: 12px;
  color: var(--text-3);
  font-weight: 500;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.stat-value {
  font-size: 26px;
  font-weight: 700;
  color: var(--text-1);
  letter-spacing: -1px;
  line-height: 1;
}
.stat-meta {
  font-size: 11px;
  color: var(--text-3);
  margin-top: 6px;
}
.stat-icon {
  width: 32px; height: 32px;
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 10px;
}
.stat-icon.purple { background: var(--purple-lt); color: var(--purple); }
.stat-icon.green  { background: var(--green-lt);  color: var(--green); }
.stat-icon.red    { background: var(--red-lt);    color: var(--red); }
.stat-icon.blue   { background: var(--blue-lt);   color: var(--blue); }

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  transition: all var(--transition);
  white-space: nowrap;
}
.btn-primary {
  background: var(--purple);
  color: #fff;
}
.btn-primary:hover { background: var(--purple-2); }
.btn-secondary {
  background: var(--surface);
  color: var(--text-1);
  border: 1px solid var(--border-2);
}
.btn-secondary:hover { background: var(--surface-2); border-color: var(--border); }
.btn-ghost {
  color: var(--text-2);
}
.btn-ghost:hover { background: var(--surface-2); color: var(--text-1); }
.btn-danger {
  background: var(--red-lt);
  color: var(--red);
}
.btn-danger:hover { background: #FCA5A5; }
.btn-sm { padding: 5px 10px; font-size: 12px; }
.btn-icon {
  padding: 7px;
  border-radius: var(--radius-sm);
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--text-2);
  transition: all var(--transition);
}
.btn-icon:hover { background: var(--surface-2); color: var(--text-1); }

/* ── Status Badges ── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border-radius: 100px;
  font-size: 11px;
  font-weight: 500;
}
.badge-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
}
.badge-online  { background: var(--green-lt);  color: var(--green); }
.badge-online .badge-dot  { background: var(--green); }
.badge-offline { background: var(--border-2);  color: var(--text-3); }
.badge-offline .badge-dot { background: var(--text-3); }
.badge-starting { background: var(--yellow-lt); color: var(--yellow); }
.badge-starting .badge-dot { background: var(--yellow); animation: blink 1s infinite; }
.badge-error   { background: var(--red-lt);    color: var(--red); }
.badge-error .badge-dot   { background: var(--red); }
.badge-purple { background: var(--purple-lt); color: var(--purple); }
.badge-blue   { background: var(--blue-lt);   color: var(--blue); }

@keyframes blink { 0%,100%{opacity:1} 50%{opacity:0.3} }

/* ── Tables ── */
.table-wrap {
  overflow-x: auto;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
thead th {
  background: var(--surface-2);
  color: var(--text-3);
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 0.3px;
  padding: 10px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
tbody tr {
  border-bottom: 1px solid var(--border-2);
  transition: background var(--transition);
}
tbody tr:last-child { border-bottom: none; }
tbody tr:hover { background: var(--surface-2); }
tbody td {
  padding: 12px 16px;
  color: var(--text-1);
  vertical-align: middle;
}

/* ── Progress Bar ── */
.progress-bar {
  width: 100%;
  height: 6px;
  background: var(--border-2);
  border-radius: 100px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  border-radius: 100px;
  transition: width 0.6s ease;
}
.progress-fill.purple { background: linear-gradient(90deg, var(--purple), var(--blue)); }
.progress-fill.green  { background: var(--green); }
.progress-fill.yellow { background: var(--yellow); }
.progress-fill.red    { background: var(--red); }

/* ── Form Elements ── */
.form-group { margin-bottom: 16px; }
.form-label {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-2);
  margin-bottom: 6px;
}
.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--border-2);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text-1);
  font-size: 13px;
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--purple);
  box-shadow: 0 0 0 3px rgba(124,58,237,0.1);
}
.form-textarea { resize: vertical; min-height: 80px; }
.form-hint { font-size: 11px; color: var(--text-3); margin-top: 4px; }

.form-row {
  display: grid;
  gap: 12px;
}
.form-row.cols-2 { grid-template-columns: 1fr 1fr; }
.form-row.cols-3 { grid-template-columns: 1fr 1fr 1fr; }

/* ── Toggle / Switch ── */
.toggle-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}
.toggle {
  position: relative;
  width: 36px; height: 20px;
}
.toggle input { opacity: 0; width: 0; height: 0; position: absolute; }
.toggle-track {
  position: absolute;
  inset: 0;
  background: var(--border-2);
  border-radius: 100px;
  cursor: pointer;
  transition: background var(--transition);
}
.toggle-track::after {
  content: '';
  position: absolute;
  top: 2px; left: 2px;
  width: 16px; height: 16px;
  background: white;
  border-radius: 50%;
  transition: transform var(--transition);
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.toggle input:checked + .toggle-track { background: var(--purple); }
.toggle input:checked + .toggle-track::after { transform: translateX(16px); }
.toggle-label { font-size: 13px; color: var(--text-1); }

/* ── Modals ── */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(30,27,75,0.3);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition);
}
.modal-backdrop.open {
  opacity: 1;
  pointer-events: all;
}
.modal {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 24px;
  width: 480px;
  max-width: calc(100vw - 40px);
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  transform: scale(0.96) translateY(8px);
  transition: transform 200ms cubic-bezier(0.4,0,0.2,1);
}
.modal-backdrop.open .modal {
  transform: scale(1) translateY(0);
}
.modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 20px;
}
.modal-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-1);
}
.modal-close {
  color: var(--text-3);
  padding: 2px;
  transition: color var(--transition);
  margin-top: -2px;
}
.modal-close:hover { color: var(--text-1); }
.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border-2);
}

/* ── Toast Notifications ── */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}
.toast {
  background: var(--text-1);
  color: white;
  padding: 12px 16px;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 450;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: var(--shadow-lg);
  min-width: 260px;
  pointer-events: all;
  animation: slideUp 200ms ease;
}
.toast.success { border-left: 3px solid var(--green); }
.toast.error   { border-left: 3px solid var(--red); }
.toast.info    { border-left: 3px solid var(--blue); }
@keyframes slideUp {
  from { transform: translateY(16px); opacity: 0; }
  to   { transform: translateY(0);   opacity: 1; }
}

/* ── Console / Terminal ── */
.console-wrap {
  background: #0F0E1A;
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 480px;
}
.console-header {
  background: #1A1830;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  flex-shrink: 0;
}
.console-dots { display: flex; gap: 6px; }
.console-dot {
  width: 10px; height: 10px; border-radius: 50%;
}
.console-dot.red    { background: #FF5F57; }
.console-dot.yellow { background: #FEBC2E; }
.console-dot.green  { background: #28C840; }
.console-title {
  font-family: var(--mono);
  font-size: 11px;
  color: rgba(255,255,255,0.4);
  flex: 1;
}
.console-status {
  display: flex; align-items: center; gap: 6px;
  font-size: 11px;
  font-family: var(--mono);
}
.conn-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--green);
  animation: pulse 2s infinite;
}
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:0.4} }
.console-output {
  flex: 1;
  overflow-y: auto;
  padding: 14px 16px;
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.65;
  color: #C8C8D4;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.1) transparent;
}
.console-output::-webkit-scrollbar { width: 4px; }
.console-output::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 4px; }
.log-line { padding: 1px 0; }
.log-info  { color: #C8C8D4; }
.log-success { color: #4ADE80; }
.log-warn  { color: #FCD34D; }
.log-error { color: #F87171; }
.log-time  { color: rgba(255,255,255,0.25); margin-right: 8px; }
.log-prefix-ok   { color: #4ADE80; }
.log-prefix-err  { color: #F87171; }
.log-prefix-warn { color: #FCD34D; }
.log-prefix-info { color: #60A5FA; }
.console-input-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-top: 1px solid rgba(255,255,255,0.06);
  background: #1A1830;
  flex-shrink: 0;
}
.console-prompt {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--purple);
  flex-shrink: 0;
}
.console-input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  font-family: var(--mono);
  font-size: 12px;
  color: white;
  caret-color: var(--purple);
}
.console-input::placeholder { color: rgba(255,255,255,0.2); }

/* ── File Manager ── */
.file-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}
.file-path {
  flex: 1;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-2);
  padding: 5px 10px;
  background: var(--surface);
  border: 1px solid var(--border-2);
  border-radius: var(--radius-sm);
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.file-list {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.file-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border-2);
  cursor: pointer;
  transition: background var(--transition);
  font-size: 13px;
}
.file-item:last-child { border-bottom: none; }
.file-item:hover { background: var(--surface-2); }
.file-item.selected { background: var(--purple-xlt); }
.file-icon { flex-shrink: 0; }
.file-name { flex: 1; color: var(--text-1); font-weight: 450; }
.file-size  { color: var(--text-3); font-size: 12px; }
.file-date  { color: var(--text-3); font-size: 12px; min-width: 80px; text-align: right; }
.file-actions {
  display: flex; gap: 4px;
  opacity: 0;
  transition: opacity var(--transition);
}
.file-item:hover .file-actions { opacity: 1; }

/* ── Code Editor ── */
.code-editor-wrap {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.code-editor-header {
  background: var(--surface-2);
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid var(--border);
}
.code-editor-filename {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-2);
  flex: 1;
}
.code-editor {
  font-family: var(--mono);
  font-size: 12.5px;
  color: #C8C8D4;
  background: #0F0E1A;
  padding: 16px;
  min-height: 320px;
  line-height: 1.6;
  overflow: auto;
  outline: none;
  resize: vertical;
  width: 100%;
  border: none;
}

/* ── Env Variables ── */
.env-row {
  display: grid;
  grid-template-columns: 1fr 1.5fr auto auto;
  gap: 8px;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid var(--border-2);
}
.env-row:last-child { border-bottom: none; }
.env-key {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--purple);
  font-weight: 500;
}
.env-value {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-2);
}
.env-value.masked { letter-spacing: 2px; color: var(--text-3); }

/* ── Charts (SVG-based) ── */
.chart-container {
  position: relative;
  width: 100%;
}
.mini-chart {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 40px;
}
.mini-bar {
  flex: 1;
  background: var(--purple-lt);
  border-radius: 2px 2px 0 0;
  transition: background var(--transition);
}
.mini-bar:hover { background: var(--purple); }
.mini-bar.active { background: var(--purple); }

/* ── Resource Gauge ── */
.gauge-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}
.gauge-label {
  font-size: 12px;
  color: var(--text-2);
  width: 56px;
  flex-shrink: 0;
}
.gauge-bar { flex: 1; }
.gauge-value {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-1);
  width: 60px;
  text-align: right;
  flex-shrink: 0;
  font-family: var(--mono);
}

/* ── Activity Feed ── */
.activity-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-2);
}
.activity-item:last-child { border-bottom: none; }
.activity-icon {
  width: 30px; height: 30px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.activity-icon.start   { background: var(--green-lt); color: var(--green); }
.activity-icon.stop    { background: var(--red-lt);   color: var(--red); }
.activity-icon.deploy  { background: var(--purple-lt); color: var(--purple); }
.activity-icon.backup  { background: var(--blue-lt);  color: var(--blue); }
.activity-icon.env     { background: var(--yellow-lt); color: var(--yellow); }
.activity-body { flex: 1; min-width: 0; }
.activity-text {
  font-size: 13px;
  color: var(--text-1);
}
.activity-text strong { font-weight: 500; }
.activity-time {
  font-size: 11px;
  color: var(--text-3);
  margin-top: 2px;
}

/* ── Server Card (Grid) ── */
.server-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}
.server-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
}
.server-card:hover {
  border-color: var(--purple);
  box-shadow: var(--shadow);
  transform: translateY(-1px);
}
.server-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 14px;
}
.server-card-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-1);
}
.server-card-runtime {
  font-size: 11px;
  color: var(--text-3);
  font-family: var(--mono);
  margin-top: 2px;
}
.server-card-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 12px;
}
.server-stat {
  background: var(--surface-2);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
}
.server-stat-label { font-size: 10px; color: var(--text-3); margin-bottom: 4px; }
.server-stat-value { font-size: 13px; font-weight: 500; color: var(--text-1); font-family: var(--mono); }
.server-actions {
  display: flex;
  gap: 6px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--border-2);
}

/* ── Empty State ── */
.empty-state {
  text-align: center;
  padding: 48px 24px;
  color: var(--text-3);
}
.empty-icon {
  width: 48px; height: 48px;
  border-radius: var(--radius);
  background: var(--surface-2);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 12px;
  color: var(--text-3);
}
.empty-title { font-size: 14px; font-weight: 500; color: var(--text-2); margin-bottom: 6px; }
.empty-desc  { font-size: 12px; }

/* ── Tabs ── */
.tabs {
  display: flex;
  gap: 2px;
  border-bottom: 1px solid var(--border-2);
  margin-bottom: 20px;
}
.tab-btn {
  padding: 9px 16px;
  font-size: 13px;
  font-weight: 450;
  color: var(--text-3);
  border-bottom: 2px solid transparent;
  transition: color var(--transition), border-color var(--transition);
  margin-bottom: -1px;
}
.tab-btn:hover { color: var(--text-1); }
.tab-btn.active {
  color: var(--purple);
  border-bottom-color: var(--purple);
  font-weight: 500;
}
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ── Package Manager ── */
.pkg-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-2);
}
.pkg-row:last-child { border-bottom: none; }
.pkg-name { flex: 1; font-size: 13px; color: var(--text-1); font-weight: 450; }
.pkg-version { font-family: var(--mono); font-size: 11px; color: var(--text-3); }

/* ── Search bar ── */
.search-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.search-wrap svg {
  position: absolute;
  left: 10px;
  color: var(--text-3);
  pointer-events: none;
}
.search-input {
  padding: 7px 12px 7px 34px;
  border: 1px solid var(--border-2);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text-1);
  font-size: 13px;
  outline: none;
  transition: border-color var(--transition);
  width: 220px;
}
.search-input:focus { border-color: var(--purple); }

/* ── Sidebar mobile toggle ── */
.sidebar-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 34px; height: 34px;
  border-radius: var(--radius-sm);
  color: var(--text-2);
  transition: background var(--transition);
}
.sidebar-toggle:hover { background: var(--surface-2); }

/* ── Responsive ── */
@media (max-width: 1100px) {
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 860px) {
  .sidebar {
    transform: translateX(-100%);
  }
  .sidebar.open {
    transform: translateX(0);
    box-shadow: var(--shadow-lg);
  }
  .main-wrap {
    margin-left: 0;
  }
  .sidebar-toggle { display: flex; }
  .page-content { padding: 16px; }
  .topbar { padding: 0 16px; }
  .server-grid { grid-template-columns: 1fr; }
  .form-row.cols-2, .form-row.cols-3 { grid-template-columns: 1fr; }
}

@media (max-width: 540px) {
  .stat-grid { grid-template-columns: 1fr; }
  .modal { padding: 18px; }
}

/* ── Overlay (mobile sidebar) ── */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.3);
  z-index: 90;
}
.sidebar-overlay.open { display: block; }

/* ── Misc utils ── */
.text-sm   { font-size: 12px; }
.text-xs   { font-size: 11px; }
.text-muted { color: var(--text-3); }
.text-purple { color: var(--purple); }
.text-green  { color: var(--green); }
.text-red    { color: var(--red); }
.mono        { font-family: var(--mono); }
.flex        { display: flex; }
.flex-center { display: flex; align-items: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.gap-2  { gap: 8px; }
.gap-3  { gap: 12px; }
.mt-1   { margin-top: 4px; }
.mt-2   { margin-top: 8px; }
.mt-3   { margin-top: 12px; }
.mt-4   { margin-top: 16px; }
.mb-2   { margin-bottom: 8px; }
.mb-3   { margin-bottom: 12px; }
.mb-4   { margin-bottom: 16px; }
.w-full { width: 100%; }
.hidden { display: none !important; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px; }
