/* ========================================
   Drovio Web 端公共样式
   所有 Web 端页面共享，通过 <link> 引入
   ======================================== */

/* ---- 侧边栏链接 ---- */
.sidebar-link {
  display: flex;
  align-items: center;
  padding: 10px 16px;
  color: #6b7280;
  font-size: 14px;
  border-radius: 8px;
  margin: 2px 8px;
  transition: all 0.2s;
}
.sidebar-link:hover {
  background-color: #f3f4f6;
  color: #374151;
}
.sidebar-link.active {
  background-color: #eff6ff;
  color: #2563eb;
  font-weight: 500;
}
.sidebar-link svg {
  width: 18px;
  height: 18px;
  margin-right: 10px;
}

/* ---- 开关组件 ---- */
.switch {
  position: relative;
  width: 40px;
  height: 22px;
  display: inline-block;
}
.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}
.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: .3s;
  border-radius: 22px;
}
.slider:before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .3s;
  border-radius: 50%;
}
input:checked + .slider {
  background-color: #10B981;
}
input:checked + .slider:before {
  transform: translateX(18px);
}

/* ---- 弹窗遮罩 ---- */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.5);
  z-index: 100;
  align-items: center;
  justify-content: center;
}
.modal-overlay.show {
  display: flex;
}

/* ---- Toast 通知 ---- */
.toast {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 200;
  display: none;
}
.toast.show {
  display: block;
  animation: slideIn 0.3s ease-out;
}
@keyframes slideIn {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* ---- 下拉菜单 ---- */
.dropdown {
  display: none;
  position: absolute;
  right: 0;
  top: 100%;
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1);
  z-index: 10;
  min-width: 160px;
}
.dropdown.show {
  display: block;
}
.dropdown a {
  display: block;
  padding: 8px 16px;
  color: #374151;
  font-size: 14px;
}
.dropdown a:hover {
  background-color: #f3f4f6;
}

/* ---- 分段标签 ---- */
.seg-active {
  background-color: #2563eb;
  color: white;
}
.seg-inactive {
  background-color: #f3f4f6;
  color: #6b7280;
}
.seg-inactive:hover {
  background-color: #e5e7eb;
}
