/* 前台补充样式（Tailwind 之外的少量定制） */
:root { --brand: #4f46e5; }
html[dir="rtl"] body { text-align: right; }
html[dir="rtl"] .rtl\:rotate-180 { transform: rotate(180deg); }

/* 工具卡片悬浮 */
.tool-card { transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; }
.tool-card:hover { transform: translateY(-3px); box-shadow: 0 10px 25px -5px rgba(16,24,40,.12); border-color: #c7d2fe; }

/* 工具 iframe 自适应高度容器 */
.tool-frame-wrap { background: #fff; border: 1px solid #e5e7eb; border-radius: 16px; overflow: hidden; }
.tool-frame-wrap iframe { width: 100%; border: 0; min-height: 640px; display: block; }

/* 分类图标底色轮换 */
.cat-icon { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; }

/* 后台侧边栏当前项 */
.admin-nav a.active { background: #eef2ff; color: #4338ca; font-weight: 600; }

/* 简单淡入 */
@keyframes fadeUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.fade-up { animation: fadeUp .35s ease both; }

/* 表格 */
.table-wrap { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; font-size: 14px; }
table.data th, table.data td { padding: 10px 12px; border-bottom: 1px solid #eef0f4; text-align: start; }
table.data th { background: #f8fafc; color: #475569; font-weight: 600; white-space: nowrap; }
table.data tr:hover td { background: #fafbff; }

/* 表单控件 */
.form-label { display: block; font-size: 13px; font-weight: 600; color: #334155; margin-bottom: 6px; }
.form-input, .form-textarea, .form-select {
  width: 100%; border: 1px solid #d8dee9; border-radius: 10px; padding: 9px 12px; font-size: 14px;
  background: #fff; color: #1e293b; outline: none; transition: border-color .15s, box-shadow .15s;
}
.form-input:focus, .form-textarea:focus, .form-select:focus {
  border-color: #818cf8; box-shadow: 0 0 0 3px rgba(79,70,229,.12);
}
.form-textarea { min-height: 96px; resize: vertical; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.hint { font-size: 12px; color: #94a3b8; margin-top: 4px; }
.badge { display: inline-flex; align-items: center; padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 600; }
.badge-green { background: #dcfce7; color: #15803d; }
.badge-gray { background: #f1f5f9; color: #64748b; }
.badge-amber { background: #fef3c7; color: #b45309; }
.badge-brand { background: #eef2ff; color: #4338ca; }
