/* TopChoice 管理控制台共享样式（工业金 / 深色风格，移植自参考模板） */
::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #3f3f46; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #52525b; }

* { transition: all 0.15s ease-in-out; }

html, body { height: 100dvh; }
body {
  overscroll-behavior-y: none;
  -webkit-tap-highlight-color: transparent;
}

.safe-top { padding-top: env(safe-area-inset-top); }
.safe-bottom { padding-bottom: env(safe-area-inset-bottom); }

/* 移动端：侧边栏 → 滑出抽屉 */
@media (max-width: 767px) {
  #sidebar {
    position: fixed;
    top: 0; bottom: 0; left: 0;
    transform: translateX(-100%);
    transition: transform 0.25s ease;
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.6);
  }
  body.drawer-open #sidebar { transform: translateX(0); }
  body.drawer-open #drawer-backdrop { opacity: 1; pointer-events: auto; }
}

/* 表格 → 卡片堆叠（≤1023px） */
@media (max-width: 1023px) {
  .responsive-table thead { display: none; }
  .responsive-table tbody,
  .responsive-table tr,
  .responsive-table td { display: block; width: 100%; }
  .responsive-table tbody { padding: 0.75rem; }

  .responsive-table tr {
    background: #181818;
    border: 1px solid #27272a;
    border-radius: 3px;
    margin-bottom: 0.75rem;
    padding: 0.25rem 0;
  }

  .responsive-table td {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.625rem 1rem !important;
    text-align: right !important;
    border: none !important;
  }
  .responsive-table td::before {
    content: attr(data-label);
    flex-shrink: 0;
    font-size: 0.65rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #71717a;
    text-align: left;
  }
  .responsive-table td.cell-progress > div { flex: 1; justify-content: flex-end; }

  .responsive-table td.cell-actions {
    justify-content: stretch;
    gap: 0.75rem;
    margin-top: 0.25rem;
    padding-top: 0.75rem !important;
    border-top: 1px solid #27272a !important;
  }
  .responsive-table td.cell-actions::before { display: none; }
  .responsive-table td.cell-actions button {
    flex: 1;
    padding: 0.6rem 0;
    border: 1px solid #3f3f46;
    border-radius: 3px;
    text-align: center;
  }
}

/* 表单控件统一风格 */
.tc-input,
.tc-select,
.tc-textarea {
  width: 100%;
  background: #181818;
  border: 1px solid #3f3f46;
  border-radius: 3px;
  color: #e4e4e7;
  font-size: 0.875rem;
  padding: 0.6rem 0.75rem;
  outline: none;
}
.tc-input:focus,
.tc-select:focus,
.tc-textarea:focus {
  border-color: #f59e0b;
}
.tc-label {
  display: block;
  font-size: 0.75rem;
  color: #a1a1aa;
  margin-bottom: 0.4rem;
  letter-spacing: 0.03em;
}
.tc-btn-primary {
  background: #f59e0b;
  color: #000;
  font-weight: 500;
}
.tc-btn-primary:hover { background: #fbbf24; }
.tc-btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }

.tc-badge-todo {
  font-size: 0.6rem;
  padding: 0.05rem 0.4rem;
  border: 1px solid #52525b;
  border-radius: 3px;
  color: #a1a1aa;
  letter-spacing: 0.05em;
}
