:root {
  color-scheme: dark;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  background: #06131d;
  color: #e6f7ff;
  --panel: rgba(10, 33, 47, 0.86);
  --panel-strong: #0c2636;
  --line: rgba(148, 215, 238, 0.16);
  --cyan: #4fd1e5;
  --cyan-strong: #1fb6cf;
  --muted: #89a9b7;
  --danger: #ff7b89;
  --warning: #ffc857;
  --success: #62d6a4;
}

* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: radial-gradient(circle at 15% 10%, #123e54 0, transparent 34%), linear-gradient(150deg, #07141e 0%, #061018 70%); }
button, input, select { font: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }

.ocean-glow { position: fixed; border-radius: 999px; filter: blur(90px); opacity: .22; pointer-events: none; }
.ocean-glow-one { width: 360px; height: 360px; background: #08a8c7; right: -110px; top: 12%; }
.ocean-glow-two { width: 300px; height: 300px; background: #3178c6; left: -120px; bottom: 5%; }

.login-shell { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.login-card { width: min(440px, 100%); padding: 42px; border: 1px solid var(--line); border-radius: 28px; background: rgba(7, 27, 39, .88); box-shadow: 0 24px 80px rgba(0,0,0,.4); backdrop-filter: blur(18px); }
.fish-mark { width: 58px; height: 58px; display: grid; place-items: center; font-size: 30px; border-radius: 18px; background: linear-gradient(145deg, rgba(79,209,229,.28), rgba(79,209,229,.08)); margin-bottom: 24px; }
.eyebrow { margin: 0 0 8px; color: var(--cyan); font-size: 11px; font-weight: 800; letter-spacing: .18em; }
h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 8px; font-size: clamp(25px, 4vw, 34px); }
h2 { margin-bottom: 6px; font-size: 20px; }
.muted { color: var(--muted); }
label { display: block; margin: 28px 0 8px; color: #b9d1dc; font-size: 14px; }
input, select { min-height: 44px; color: #eafaff; border: 1px solid var(--line); border-radius: 12px; background: rgba(3, 18, 27, .76); padding: 0 13px; outline: none; }
input:focus, select:focus { border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(79,209,229,.12); }
.login-card input { width: 100%; }

.primary, .secondary, .ghost, .action { border: 0; border-radius: 11px; padding: 10px 14px; color: #eaffff; }
.primary { background: linear-gradient(135deg, var(--cyan-strong), #287db8); font-weight: 750; }
.secondary { background: #17445a; }
.ghost { background: transparent; border: 1px solid var(--line); }
.wide { width: 100%; margin-top: 16px; min-height: 46px; }
.danger-text { color: var(--danger); }
.form-error { min-height: 20px; margin: 12px 0 0; color: var(--danger); font-size: 13px; }

.app-shell { width: min(1380px, calc(100% - 40px)); margin: 0 auto; padding: 32px 0 64px; position: relative; }
.topbar { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-bottom: 30px; }
.topbar h1 { margin: 0; }
.topbar-actions, .filters, .item-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.status-pill { padding: 9px 12px; border-radius: 999px; background: rgba(98,214,164,.1); color: var(--success); font-size: 13px; }

.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 24px; }
.stat-card { padding: 20px; border: 1px solid var(--line); border-radius: 18px; background: var(--panel); }
.stat-card span { display: block; color: var(--muted); font-size: 13px; }
.stat-card strong { display: block; margin-top: 9px; font-size: 30px; }
.stat-card.alert strong { color: var(--warning); }

.tabs { display: flex; gap: 8px; border-bottom: 1px solid var(--line); margin-bottom: 18px; }
.tab { color: var(--muted); border: 0; border-bottom: 2px solid transparent; background: transparent; padding: 13px 16px; }
.tab.active { color: #effcff; border-bottom-color: var(--cyan); }
.badge { display: inline-grid; min-width: 21px; height: 21px; place-items: center; border-radius: 999px; background: rgba(255,200,87,.16); color: var(--warning); font-size: 11px; margin-left: 5px; }

.panel { border: 1px solid var(--line); border-radius: 22px; background: var(--panel); overflow: hidden; }
.panel-heading { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 22px; border-bottom: 1px solid var(--line); }
.panel-heading p { margin-bottom: 0; font-size: 13px; }
.card-list { min-height: 220px; }
.list-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 20px; padding: 20px 22px; border-bottom: 1px solid var(--line); }
.list-item:last-child { border-bottom: 0; }
.item-meta { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; color: var(--muted); font-size: 12px; margin-bottom: 10px; }
.content { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.6; color: #dceff6; }
.detail { color: var(--muted); margin: 8px 0 0; font-size: 13px; }
.tag { padding: 4px 8px; border-radius: 999px; background: rgba(79,209,229,.09); color: #aeeaf4; }
.tag.warning { color: var(--warning); background: rgba(255,200,87,.1); }
.tag.hidden { color: #cbbcff; background: rgba(173,145,255,.1); }
.tag.deleted { color: var(--danger); background: rgba(255,123,137,.1); }
.action { padding: 8px 11px; background: #173a4c; font-size: 13px; }
.action.warn { color: var(--warning); }
.action.danger { color: var(--danger); }
.action.restore { color: var(--success); }
.empty { text-align: center; padding: 68px 20px; color: var(--muted); }
.toast { position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 20px); padding: 12px 17px; border: 1px solid var(--line); border-radius: 12px; background: #102d3d; opacity: 0; pointer-events: none; transition: .2s ease; box-shadow: 0 12px 40px rgba(0,0,0,.32); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 850px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .topbar, .panel-heading { align-items: flex-start; flex-direction: column; }
  .list-item { grid-template-columns: 1fr; }
  .item-actions { justify-content: flex-start; }
}
@media (max-width: 520px) {
  .app-shell { width: min(100% - 22px, 1380px); padding-top: 20px; }
  .login-card { padding: 30px 24px; }
  .stats-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .stat-card { padding: 15px; }
  .stat-card strong { font-size: 24px; }
  .tabs { overflow-x: auto; }
  .tab { white-space: nowrap; padding-inline: 11px; }
  .filters { width: 100%; }
  .filters input { flex: 1; min-width: 150px; }
}
