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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: #0f1117;
  color: #e2e8f0;
  font-size: 13px;
}

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

/* Sidebar */
.sidebar {
  width: 200px;
  min-width: 200px;
  background: #161b22;
  border-right: 1px solid #21262d;
  padding: 16px 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  margin-bottom: 16px;
}

.logo-icon {
  width: 32px;
  height: 32px;
  background: #16a34a;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 12px;
}

.logo-text {
  font-size: 14px;
  font-weight: 600;
  color: #f0f6fc;
}

.logo-sub {
  font-size: 10px;
  color: #6e7681;
}

.nav-item {
  display: block;
  padding: 8px 12px;
  border-radius: 6px;
  cursor: pointer;
  color: #8b949e;
  text-decoration: none;
  transition: background 0.1s, color 0.1s;
  font-size: 13px;
}

.nav-item:hover {
  background: #21262d;
  color: #f0f6fc;
}

.nav-item.active {
  background: #21262d;
  color: #f0f6fc;
  font-weight: 500;
}

/* Main */
.main {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
}

.page {
  display: none;
}

.page.active {
  display: block;
}

.page-title {
  font-size: 20px;
  font-weight: 600;
  color: #f0f6fc;
  margin-bottom: 20px;
}

.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.section-title {
  font-size: 14px;
  font-weight: 500;
  color: #8b949e;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 20px 0 12px;
}

/* Stats */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}

.stat-card {
  background: #161b22;
  border: 1px solid #21262d;
  border-radius: 8px;
  padding: 16px;
}

.stat-label {
  font-size: 11px;
  color: #8b949e;
  margin-bottom: 6px;
}

.stat-value {
  font-size: 24px;
  font-weight: 600;
  color: #f0f6fc;
  font-family: monospace;
}

/* Server Cards */
.server-card {
  background: #161b22;
  border: 1px solid #21262d;
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 16px;
  cursor: pointer;
  transition: border-color 0.1s;
}

.server-card:hover {
  border-color: #388bfd;
}

.server-name {
  font-weight: 500;
  color: #f0f6fc;
  font-size: 14px;
}

.server-meta {
  font-size: 11px;
  color: #8b949e;
  margin-top: 3px;
}

.server-actions {
  margin-left: auto;
  display: flex;
  gap: 8px;
}

/* Status */
.status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
}

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

.dot-online { background: #22c55e; }
.dot-offline { background: #ef4444; }

/* Buttons */
.btn {
  padding: 6px 14px;
  border-radius: 6px;
  border: 1px solid #21262d;
  background: transparent;
  color: #e2e8f0;
  font-size: 12px;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.1s;
}

.btn:hover { background: #21262d; }

.btn.primary {
  background: #16a34a;
  border-color: #16a34a;
  color: #fff;
}

.btn.primary:hover { background: #15803d; }

.btn.red {
  background: #dc2626;
  border-color: #dc2626;
  color: #fff;
}

.btn.red:hover { background: #b91c1c; }

/* Modal */
.modal-bg {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
}

.modal {
  background: #161b22;
  border: 1px solid #21262d;
  border-radius: 12px;
  padding: 24px;
  width: 360px;
}

.modal-title {
  font-size: 16px;
  font-weight: 600;
  color: #f0f6fc;
  margin-bottom: 16px;
}

.form-field {
  margin-bottom: 14px;
}

.form-label {
  display: block;
  font-size: 11px;
  color: #8b949e;
  font-weight: 500;
  margin-bottom: 5px;
}

.form-input {
  width: 100%;
  padding: 8px 10px;
  border-radius: 6px;
  border: 1px solid #21262d;
  background: #0f1117;
  color: #e2e8f0;
  font-size: 13px;
  font-family: inherit;
}

.form-input:focus {
  outline: none;
  border-color: #16a34a;
}

.modal-footer {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid #21262d;
}
/* Login */
#login-screen, #setup-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #0f1117;
}

.login-box {
  background: #161b22;
  border: 1px solid #21262d;
  border-radius: 12px;
  padding: 28px;
  width: 360px;
}

.login-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}

.error-msg {
  background: #3d1515;
  border: 1px solid #dc2626;
  color: #f87171;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 12px;
  margin-bottom: 14px;
}

.dot-booting {
  background: #f59e0b;
  animation: blink 1s ease-in-out infinite;
}

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

#change-password-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #0f1117;
}