/* iframe页面公共样式 - 确保所有iframe页面与主页面背景一致 */

/* 重置默认样式 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* 统一背景色,与主页面content-area保持一致 */
html, body {
  background-color: #0f172a !important; /* 与主页面背景一致 */
  color: #ffffff !important;
  font-family: 'Segoe UI', Arial, sans-serif;
  height: 100%; /* 撑满高度 */
  width: 100%;
  overflow: auto; /* 允许滚动 */
}

/* 确保body撑满内容 */
body {
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
}

/* ========== 深色主题覆盖样式 ========== */

/* 覆盖白色背景为深色卡片背景 */
.bg-white {
  background-color: #1e293b !important; /* 深色卡片背景 */
  color: #ffffff !important;
}

/* 覆盖深色文字为浅色 */
.text-dark {
  color: #ffffff !important;
}

/* 表格样式深色化 */
.data-table {
  background-color: #1e293b !important;
  color: #ffffff !important;
}

.data-table th {
  background-color: #0f172a !important;
  color: #9ca3af !important;
  border-bottom: 1px solid #374151 !important;
}

.data-table td {
  color: #e5e7eb !important;
  border-bottom: 1px solid #374151 !important;
}

.data-table tr:hover {
  background-color: #334155 !important;
}

/* 表单元素深色化 */
.form-input,
.form-select,
.form-textarea {
  background-color: #0f172a !important;
  color: #ffffff !important;
  border: 1px solid #374151 !important;
}

.form-input::placeholder {
  color: #6b7280 !important;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: #00b96b !important;
  outline: none;
}

/* 表单标签深色化 */
.form-label {
  color: #e5e7eb !important;
}

/* 对话框内容深色化 */
.modal-content {
  background-color: #1e293b !important;
  color: #ffffff !important;
}

/* Tab按钮深色化 */
.tab-container {
  border-bottom-color: #374151 !important;
}

.tab-button {
  color: #9ca3af !important;
}

.tab-button:hover {
  color: #ffffff !important;
}

/* 树形结构深色化 */
.tree-group-header {
  color: #e5e7eb !important;
}

.tree-group-header:hover {
  background-color: rgba(255, 255, 255, 0.05) !important;
}

.tree-child-node {
  color: #e5e7eb !important;
}

/* 权限项深色化 */
.permission-item {
  color: #e5e7eb !important;
}

.permission-item.unchecked {
  background-color: #0f172a !important;
  border-color: #374151 !important;
}

.permission-label {
  color: #e5e7eb !important;
}

/* 输入框和选择框的选项深色化 */
select option {
  background-color: #1e293b !important;
  color: #ffffff !important;
}

/* Checkbox和radio按钮样式 */
input[type="checkbox"],
input[type="radio"] {
  accent-color: #00b96b !important;
}

/* 卡片阴影调整为深色主题 */
.card-shadow {
  box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.4) !important;
}
