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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: #0f1117;
  color: #e0e0e0;
  height: 100vh;
  display: flex;
  flex-direction: column;
}

.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  background: #16181f;
  border-bottom: 1px solid #2a2d3a;
}
.title { font-size: 18px; font-weight: 700; color: #fff; letter-spacing: 0.5px; }
.active-badge { font-size: 13px; color: #8b8fa8; }
.active-badge strong { color: #7c6af7; }

.layout {
  display: flex;
  flex: 1;
  overflow: hidden;
}

.sidebar {
  width: 180px;
  background: #13151c;
  border-right: 1px solid #2a2d3a;
  padding: 16px 0;
  flex-shrink: 0;
}
.sidebar-title {
  font-size: 10px;
  font-weight: 700;
  color: #5a5e78;
  letter-spacing: 1px;
  padding: 0 16px 10px;
}
#provider-list { list-style: none; }
#provider-list li {
  padding: 9px 16px;
  cursor: pointer;
  font-size: 14px;
  color: #9097b3;
  border-left: 3px solid transparent;
  transition: all 0.15s;
}
#provider-list li:hover { background: #1c1f2b; color: #e0e0e0; }
#provider-list li.active {
  background: #1c1f2b;
  color: #fff;
  border-left-color: #7c6af7;
}
#provider-list li.has-active::after {
  content: ' ●';
  color: #4ade80;
  font-size: 10px;
}

.main {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.tabs {
  display: flex;
  border-bottom: 1px solid #2a2d3a;
  padding: 0 24px;
  background: #13151c;
}
.tab {
  background: none;
  border: none;
  color: #6b7080;
  padding: 12px 20px;
  font-size: 14px;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: all 0.15s;
}
.tab:hover { color: #e0e0e0; }
.tab.active { color: #7c6af7; border-bottom-color: #7c6af7; }

.tab-content { display: none; flex: 1; overflow-y: auto; padding: 20px 24px; }
.tab-content.active { display: block; }

.hint { color: #5a5e78; font-size: 14px; margin-top: 12px; }

.model-grid { display: flex; flex-direction: column; gap: 8px; }
.model-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: #16181f;
  border: 1px solid #2a2d3a;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s;
}
.model-item:hover { border-color: #7c6af7; background: #1c1f2b; }
.model-item.active-model {
  border-color: #4ade80;
  background: #0f2018;
}
.model-name { font-size: 14px; color: #e0e0e0; }
.model-badge {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 99px;
  background: #1e3a28;
  color: #4ade80;
  font-weight: 600;
}
.set-btn {
  background: #7c6af7;
  color: #fff;
  border: none;
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 12px;
  cursor: pointer;
  transition: background 0.15s;
}
.set-btn:hover { background: #6a58e0; }

.props-card {
  background: #16181f;
  border: 1px solid #2a2d3a;
  border-radius: 10px;
  padding: 20px;
  max-width: 480px;
}
.props-card h3 { font-size: 15px; margin-bottom: 14px; color: #fff; }
.prop-row { display: flex; justify-content: space-between; padding: 7px 0; border-bottom: 1px solid #2a2d3a; font-size: 13px; }
.prop-row:last-child { border-bottom: none; }
.prop-label { color: #6b7080; }
.prop-value { color: #e0e0e0; font-weight: 500; }
.prop-value.good { color: #4ade80; }
.prop-value.warn { color: #fbbf24; }
.prop-value.na { color: #5a5e78; }

.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: #22c55e;
  color: #fff;
  padding: 10px 22px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  transition: opacity 0.3s;
  z-index: 100;
}
.toast.error { background: #ef4444; }
.toast.hidden { opacity: 0; pointer-events: none; }

.modal {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.6);
  display: flex; align-items: center; justify-content: center;
  z-index: 200;
}
.modal.hidden { display: none; }
.modal-box {
  background: #16181f;
  border: 1px solid #2a2d3a;
  border-radius: 12px;
  padding: 28px;
  min-width: 340px;
}
.modal-box p { font-size: 15px; color: #e0e0e0; margin-bottom: 20px; }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; }
.btn-primary { background: #7c6af7; color: #fff; border: none; padding: 8px 20px; border-radius: 7px; cursor: pointer; font-size: 14px; }
.btn-primary:hover { background: #6a58e0; }
.btn-secondary { background: #2a2d3a; color: #9097b3; border: none; padding: 8px 20px; border-radius: 7px; cursor: pointer; font-size: 14px; }
.btn-secondary:hover { background: #363a4f; }

.back-btn {
  color: #6b7080;
  text-decoration: none;
  font-size: 13px;
  margin-right: 16px;
  padding: 5px 10px;
  border: 1px solid #2a2d3a;
  border-radius: 6px;
  transition: all 0.15s;
}
.back-btn:hover { color: #e0e0e0; border-color: #5a5e78; }
.back-btn {
  color: #6b7080;
  text-decoration: none;
  font-size: 13px;
  margin-right: 16px;
  padding: 5px 10px;
  border: 1px solid #2a2d3a;
  border-radius: 6px;
  transition: all 0.15s;
}
.back-btn:hover { color: #e0e0e0; border-color: #5a5e78; }
