:root {
  --danger: #ff5a5f;
}

.page-card {
  min-height: calc(100vh - 65px);
  padding: 10px;
}

.filter-panel,
.table-panel {
  border: 1px solid var(--line);
  background: var(--panel-bg);
}

.filter-panel {
  padding: 14px 14px 10px;
}

.table-panel {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - 250px);
}

.scene-tabs {
  display: flex;
  align-items: center;
  gap: 26px;
  margin-bottom: 14px;
  padding: 0 2px;
}

.scene-tab {
  position: relative;
  border: 0;
  padding: 0 0 8px;
  background: transparent;
  color: #2c3f57;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
}

.scene-tab.active {
  color: var(--brand);
  font-weight: 600;
}

.scene-tab.active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  border-radius: 999px;
  background: var(--brand);
}

.query-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.search-box {
  position: relative;
  width: 232px;
  height: 34px;
}

.search-input {
  width: 100%;
  height: 100%;
  padding: 0 38px 0 12px;
  border: 1px solid var(--line-deep);
  border-radius: 2px;
  color: var(--text-main);
  background: #fff;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.search-input::placeholder {
  color: #b0bcc9;
}

.search-input:focus {
  outline: none;
  border-color: #97b5ff;
  box-shadow: 0 0 0 3px rgba(77, 119, 234, 0.12);
}

.search-icon {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: #9aa8b8;
  pointer-events: none;
}

.panel-action-row {
  padding: 14px 14px 12px;
  border-bottom: 1px solid #eef2f7;
}

.btn-new {
  min-width: 62px;
  height: 30px;
  padding: 0 18px;
  font-size: 13px;
  border-radius: 3px;
  background: var(--brand);
  color: #fff;
  border: 1px solid var(--brand);
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-new:hover {
  background: var(--brand-deep);
  border-color: var(--brand-deep);
}

.table-wrap {
  flex: 1;
  overflow: auto;
}

.list-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.list-table thead tr {
  background: #f7f9fc;
}

.list-table th,
.list-table td {
  padding: 12px 10px;
  border-bottom: 1px solid #edf2f7;
  font-size: 12px;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.list-table th {
  color: #7788a3;
  font-weight: 600;
}

.list-table td {
  color: #23334d;
}

.list-table tbody tr:hover {
  background: #f9fbff;
}

.cell-center {
  text-align: center !important;
}

.name-link,
.quote-link,
.action-link {
  color: var(--brand);
  transition: color 0.2s ease;
}

.name-link:hover,
.quote-link:hover,
.action-link:hover {
  color: var(--brand-deep);
}

.action-link + .action-link {
  margin-left: 14px;
}

.action-link.delete {
  color: var(--danger);
}

.empty-row td {
  padding: 52px 0;
  color: #9aa8b8;
  text-align: center !important;
}

.switch {
  position: relative;
  display: inline-block;
  width: 34px;
  height: 18px;
  vertical-align: middle;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: #c8d3e2;
  transition: all 0.2s ease;
  cursor: pointer;
}

.slider::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 2px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 39, 74, 0.24);
  transition: transform 0.2s ease;
}

.switch input:checked + .slider {
  background: var(--brand);
}

.switch input:checked + .slider::before {
  transform: translateX(16px);
}

.table-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 16px;
  padding: 16px 14px 18px;
  color: #425670;
  font-size: 12px;
}

.pager {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.pager-group {
  display: flex;
  align-items: center;
  gap: 6px;
}

.page-btn,
.jump-btn,
.page-size {
  height: 30px;
  border: 1px solid #c8d3e2;
  background: #fff;
  color: #30445d;
  border-radius: 4px;
  cursor: pointer;
}

.page-btn {
  min-width: 30px;
  padding: 0 10px;
}

.page-btn:hover,
.jump-btn:hover,
.page-size:hover {
  border-color: #90adff;
  color: var(--brand);
}

.page-btn.active {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}

.page-btn.disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.page-ellipsis {
  width: 24px;
  text-align: center;
  color: #6f8096;
}

.page-size {
  padding: 0 8px;
  min-width: 80px;
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, #5f7290 50%), linear-gradient(135deg, #5f7290 50%, transparent 50%);
  background-position: calc(100% - 14px) 12px, calc(100% - 9px) 12px;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}

.jump-box {
  display: flex;
  align-items: center;
  gap: 6px;
}

.jump-input {
  width: 44px;
  height: 30px;
  padding: 0 8px;
  border: 1px solid #c8d3e2;
  border-radius: 4px;
  color: #30445d;
  text-align: center;
}

.jump-input:focus {
  outline: none;
  border-color: #90adff;
  box-shadow: 0 0 0 3px rgba(77, 119, 234, 0.12);
}

.jump-btn {
  min-width: 44px;
  padding: 0 12px;
}

.toast-stack {
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast {
  min-width: 240px;
  max-width: 320px;
  padding: 12px 14px;
  border-radius: 8px;
  background: rgba(32, 51, 77, 0.95);
  color: #fff;
  box-shadow: 0 12px 28px rgba(17, 30, 50, 0.22);
  transform: translateX(20px);
  opacity: 0;
  transition: all 0.25s ease;
}

.toast.show {
  opacity: 1;
  transform: translateX(0);
}

.toast.success {
  background: rgba(53, 95, 223, 0.96);
}

.toast.warning {
  background: rgba(233, 135, 31, 0.96);
}

.toast.error {
  background: rgba(220, 72, 72, 0.96);
}

.toast-title {
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  margin-bottom: 6px;
}

.toast-desc {
  font-size: 12px;
  line-height: 1.5;
  opacity: 0.92;
}
