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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: #0b0f19;
  color: #f1f5f9;
  min-height: 100vh;
}

a {
  color: #fb923c;
  text-decoration: none;
}

.hidden {
  display: none !important;
}

.auth-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: radial-gradient(circle at top, #1e1b4b 0%, #0b0f19 70%);
}

.card {
  background: #131b2e;
  border: 1px solid #1e293b;
  border-radius: 14px;
  padding: 22px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

.auth-card {
  width: 100%;
  max-width: 410px;
  text-align: center;
}

.logo {
  font-size: 42px;
  margin-bottom: 8px;
}

h1 {
  font-size: 24px;
  margin-bottom: 6px;
}

.sub {
  color: #94a3b8;
  font-size: 14px;
  margin-bottom: 18px;
}

.tabs {
  display: flex;
  background: #0b0f19;
  border-radius: 10px;
  padding: 4px;
  margin-bottom: 18px;
}

.tab {
  flex: 1;
  background: transparent;
  color: #94a3b8;
  border: none;
  padding: 9px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
}

.tab.active {
  background: #f97316;
  color: #fff;
}

.field {
  display: block;
  text-align: left;
  margin-bottom: 14px;
}

.field span {
  display: block;
  font-size: 13px;
  color: #cbd5e1;
  margin-bottom: 6px;
  font-weight: 500;
}

.field input,
.field select {
  width: 100%;
  padding: 10px 12px;
  background: #0b0f19;
  border: 1px solid #334155;
  border-radius: 8px;
  color: #f8fafc;
  font-size: 14px;
}

.field input:focus,
.field select:focus {
  outline: none;
  border-color: #f97316;
}

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.err {
  color: #f87171;
  font-size: 13px;
  margin-bottom: 10px;
  min-height: 18px;
}

button {
  cursor: pointer;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  border-radius: 8px;
  padding: 10px 16px;
  border: none;
  transition: opacity 0.15s, transform 0.1s;
}

button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-primary {
  background: linear-gradient(135deg, #f97316, #ea580c);
  color: #fff;
}

.btn-success {
  background: #10b981;
  color: #fff;
}

.btn-danger {
  background: #ef4444;
  color: #fff;
}

.btn-danger-outline {
  background: transparent;
  border: 1px solid #ef4444;
  color: #f87171;
}

.btn-ghost {
  background: #1e293b;
  color: #cbd5e1;
}

.btn-full {
  width: 100%;
}

.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 28px;
  background: #131b2e;
  border-bottom: 1px solid #1e293b;
}

.nav-brand {
  font-size: 18px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}

.docker-tag {
  background: #0284c7;
  color: #fff;
  font-size: 11px;
  padding: 2px 7px;
  border-radius: 5px;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-user {
  color: #94a3b8;
  font-size: 14px;
}

.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 28px 20px;
}

.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 22px;
}

.servers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 16px;
  margin-bottom: 26px;
}

.server-card {
  background: #131b2e;
  border: 2px solid #1e293b;
  border-radius: 12px;
  padding: 18px;
  cursor: pointer;
  transition: border-color 0.15s;
}

.server-card.selected {
  border-color: #f97316;
}

.server-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.status-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 4px 9px;
  border-radius: 999px;
}

.status-badge.online {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
}

.status-badge.stopped {
  background: rgba(148, 163, 184, 0.18);
  color: #94a3b8;
}

.docker-badge {
  background: rgba(2, 132, 199, 0.2);
  color: #38bdf8;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 9px;
  border-radius: 999px;
}

.server-ip {
  margin-top: 8px;
  background: #0b0f19;
  padding: 7px 10px;
  border-radius: 6px;
  font-family: monospace;
  font-size: 13px;
  color: #fb923c;
}

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

.badge-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.connect-box {
  color: #cbd5e1;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.connect-box code {
  background: #0b0f19;
  padding: 5px 10px;
  border-radius: 6px;
  color: #fb923c;
  font-size: 13px;
}

.btn-copy {
  padding: 5px 10px;
  font-size: 12px;
  background: #1e293b;
  color: #e2e8f0;
}

.action-buttons {
  display: flex;
  gap: 10px;
}

.detail-grid {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 20px;
}

@media (max-width: 860px) {
  .detail-grid {
    grid-template-columns: 1fr;
  }
}

.console-card h4,
.settings-card h4 {
  margin-bottom: 12px;
}

.console-box {
  background: #070a12;
  border: 1px solid #1e293b;
  border-radius: 8px;
  padding: 12px;
  height: 360px;
  overflow-y: auto;
  font-family: 'Consolas', monospace;
  font-size: 12.5px;
  color: #e2e8f0;
  white-space: pre-wrap;
  margin-bottom: 12px;
}

.console-input-row {
  display: flex;
  gap: 8px;
}

.console-input-row input {
  flex: 1;
  padding: 10px 12px;
  background: #0b0f19;
  border: 1px solid #334155;
  border-radius: 8px;
  color: #fff;
}

.sep {
  border: none;
  border-top: 1px solid #1e293b;
  margin: 16px 0;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 100;
}

.modal-card {
  width: 100%;
  max-width: 460px;
}

.modal-card h3 {
  margin-bottom: 16px;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 16px;
}

.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: #f97316;
  color: #fff;
  padding: 12px 18px;
  border-radius: 10px;
  font-weight: 600;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
  z-index: 200;
}
