/* AI 云端应用的本地替代 — management styles (mirrors ai-apps-directory) */
* { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --bg: #f6f8fb; --card: #ffffff; --ink: #1f2a37; --muted: #6b7280;
  --line: #e5e9f0; --brand: #2563eb; --brand-2: #16a34a; --danger: #dc2626;
  --ok-bg: #ecfdf5; --ok-ink: #065f46; --err-bg: #fef2f2; --err-ink: #991b1b;
  --purple: #6d28d9; --warning: #b45309;
}
body { font-family: "PingFang SC","Microsoft YaHei",system-ui,-apple-system,Segoe UI,Roboto,sans-serif; background: var(--bg); color: var(--ink); line-height: 1.55; }
.container { max-width: 1200px; margin: 0 auto; padding: 24px 20px 60px; }
code { background: #eef2ff; color: #3730a3; padding: 1px 6px; border-radius: 4px; font-size: .92em; }

.app-header { margin-bottom: 18px; }
.app-header h1 { font-size: 26px; font-weight: 700; }
.app-header p { color: var(--muted); margin-top: 4px; font-size: 14px; }

.panel { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 18px; margin-bottom: 18px; box-shadow: 0 1px 2px rgba(16,24,40,.03); }

.stats-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px,1fr)); gap: 12px; margin-bottom: 18px; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; display:flex; flex-direction:column; gap:2px; position:relative; overflow:hidden; }
.stat::before { content:""; position:absolute; left:0; top:0; bottom:0; width:4px; background: var(--brand); }
.stat span { color: var(--muted); font-size:12.5px; }
.stat strong { font-size:20px; font-weight:700; }

.toolbar { display:flex; flex-wrap:wrap; gap:12px; align-items:flex-end; }
.toolbar > div { display:flex; flex-direction:column; gap:4px; }
.toolbar label { font-size:12px; color: var(--muted); font-weight:600; }
.toolbar input, .toolbar select { padding:8px 10px; border:1px solid var(--line); border-radius:8px; font-size:14px; background:#fff; min-width:160px; }
.toolbar .search { flex:1 1 240px; }
.toolbar .search input { width:100%; min-width:220px; }

.badge { display:inline-block; padding:2px 8px; border-radius:999px; font-size:11.5px; font-weight:600; border:1px solid transparent; white-space:nowrap; }
.badge.cat { background:#eef2ff; color:#3730a3; }
.badge.img { background:#f3e8ff; color:#6d28d9; }
.badge.voice { background:#fff7ed; color:#c2410c; }
.badge.other { background:#f1f5f9; color:#475569; }
.badge.free { background:#ecfdf5; color:#065f46; }
.badge.paid { background:#fef2f2; color:#991b1b; }
.badge.self { background:#eef2ff; color:#3730a3; }
.badge.host { background:#fff7ed; color:#c2410c; }

.app-table { width:100%; border-collapse:collapse; font-size:14px; }
.app-table th { text-align:left; font-size:12px; text-transform:uppercase; letter-spacing:.04em; color:var(--muted); border-bottom:1px solid var(--line); padding:10px 10px; }
.app-table td { padding:12px 10px; border-bottom:1px solid var(--line); vertical-align:top; }
.app-table tr:hover td { background:#f9fafb; }
.app-name { font-weight:600; color:var(--ink); text-decoration:none; }
.app-name:hover { color:var(--brand); text-decoration:underline; }
.row-actions { white-space:nowrap; text-align:right; }
.row-actions .btn { margin-left:6px; }

.btn { display:inline-block; border:1px solid var(--line); background:#fff; color:var(--ink); padding:8px 14px; border-radius:8px; font-size:14px; cursor:pointer; text-decoration:none; }
.btn:hover { border-color:#cbd5e1; background:#f9fafb; }
.btn-primary { background:var(--brand); color:#fff; border-color:var(--brand); }
.btn-primary:hover { background:#1d4ed8; }
.btn-danger { background:#fff; color:var(--danger); border-color:#fecaca; }
.btn-danger:hover { background:#fef2f2; }
.btn-ghost { background:transparent; }
.btn-sm { padding:5px 10px; font-size:12.5px; }

.form-grid { display:grid; grid-template-columns: repeat(12, 1fr); gap: 12px 14px; }
.field { display:flex; flex-direction:column; gap:5px; }
.field label { font-size:13px; font-weight:600; color:#374151; }
.field label .req { color:var(--danger); }
.field input, .field select, .field textarea { padding:9px 11px; border:1px solid var(--line); border-radius:8px; font-size:14px; background:#fff; font-family:inherit; }
.field textarea { min-height:64px; resize:vertical; }
.field .hint { font-size:12px; color:var(--muted); }
.span-6 { grid-column: span 6; }
.span-12 { grid-column: span 12; }
.span-4 { grid-column: span 4; }
.check-row { display:flex; align-items:center; gap:8px; padding-top:2px; }
.check-row input { width:18px; height:18px; }

.flash { padding:11px 14px; border-radius:10px; font-size:14px; margin-bottom:16px; border:1px solid; }
.flash-ok { background:var(--ok-bg); color:var(--ok-ink); border-color:#bbf7d0; }
.flash-err { background:var(--err-bg); color:var(--err-ink); border-color:#fecaca; }

.empty { text-align:center; padding:48px 20px; color:var(--muted); }
.empty .big { font-size:42px; display:block; margin-bottom:12px; }

.actions-row { display:flex; flex-wrap:wrap; gap:8px; align-items:center; }
.table-wrap { overflow-x:auto; }

footer { text-align:center; color:var(--muted); font-size:12.5px; margin-top:32px; }

@media (max-width: 760px) {
  .span-6, .span-4 { grid-column: span 12; }
  .toolbar > div { flex:1 1 100%; }
  .app-table th:nth-child(4), .app-table td:nth-child(4) { display:none; }
}
