:root {
  --bg: #f5f7fb;
  --fg: #1f2937;
  --muted: #6b7280;
  --primary: #1d4ed8;
  --white: #ffffff;
  --border: #dbe1ea;
  --error: #991b1b;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--fg); font-family: Inter, Arial, sans-serif; line-height: 1.45; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
.container { width: min(1180px, 92vw); margin: 0 auto; }
.site-header, .site-footer { background: var(--white); border-bottom: 1px solid var(--border); }
.site-footer { margin-top: 2rem; border-top: 1px solid var(--border); border-bottom: 0; padding: 1rem 0; }
.header-inner { min-height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.brand { font-size: 1.25rem; font-weight: 700; }
nav { display: flex; gap: 1rem; flex-wrap: wrap; }
.page { padding: 2rem 0; }
.hero, .panel, .card { background: var(--white); border: 1px solid var(--border); border-radius: 18px; padding: 1.25rem; }
.hero { padding: 2rem; }
.stats, .grid, .actions, .two-cols { display: grid; gap: 1rem; }
.stats { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); margin: 1.2rem 0; }
.grid { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.stats-grid { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.actions { grid-template-columns: repeat(auto-fit, minmax(160px, max-content)); align-items: start; margin: 1rem 0; }
.two-cols { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.card strong { display: block; font-size: 1.8rem; }
.card span, .muted { color: var(--muted); }
.button, button { display: inline-flex; align-items: center; justify-content: center; background: var(--primary); color: white; border: 0; border-radius: 10px; padding: 0.7rem 1rem; cursor: pointer; font-weight: 600; }
button:hover, .button:hover { filter: brightness(1.05); text-decoration: none; }
.stack-form { display: grid; gap: 0.9rem; }
.inline-form { display: flex; gap: 0.6rem; flex-wrap: wrap; align-items: center; }
label { display: grid; gap: 0.35rem; font-weight: 600; }
input, select, textarea { width: 100%; padding: 0.7rem 0.8rem; border-radius: 10px; border: 1px solid var(--border); background: white; }
table { width: 100%; border-collapse: collapse; background: white; border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
th, td { padding: 0.75rem; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
thead { background: #eef3fb; }
.narrow { width: min(560px, 100%); margin: 0 auto; }
.alert { padding: 0.8rem 1rem; border-radius: 10px; }
.alert.error { background: #fee2e2; color: var(--error); }
.clean-list { list-style: none; margin: 0; padding: 0; }
.clean-list li { padding: 0.4rem 0; border-bottom: 1px solid var(--border); }

.compact-form { margin: 0; }
.button.secondary, button.secondary { background: #475569; }
code { background: #eef3fb; padding: 0.15rem 0.35rem; border-radius: 6px; }
.button.small, button.small { padding: 0.45rem 0.7rem; border-radius: 8px; font-size: 0.9rem; }
.actions.vertical { display: flex; flex-direction: column; gap: 0.7rem; }
.two-grid { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.release-notes-box { display: grid; gap: 0.35rem; padding: 0.5rem 0; }
.author-photo { max-width: 160px; max-height: 220px; object-fit: cover; border-radius: 12px; border: 1px solid var(--border); margin-bottom: 1rem; }

.three-grid { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.button.danger, button.danger { background: #b91c1c; }
.compact-actions { gap: 0.5rem; }
.compact-actions form { margin: 0; }


.site-footer .footer-text { text-align: center; margin: 0; }
.cover-preview { text-align: center; }
.panel-header { display:flex; justify-content:space-between; align-items:center; gap:1rem; flex-wrap:wrap; }
.subcard { border:1px solid var(--border); padding:1rem; margin-bottom:1rem; border-radius:12px; }
.table-actions { display:flex; flex-direction:column; gap:0.5rem; }
.pagination { display:flex; justify-content:flex-end; gap:0.5rem; align-items:center; margin-top:1rem; }
.pagination a, .pagination span { padding:0.4rem 0.7rem; border:1px solid var(--border); border-radius:8px; background:white; }
.toast-container { position: fixed; right: 1rem; top: 1rem; z-index: 9999; display: grid; gap: 0.75rem; }
.toast { min-width: 280px; max-width: 420px; background: #111827; color: white; padding: 0.9rem 1rem; border-radius: 12px; box-shadow: 0 12px 32px rgba(0,0,0,0.18); opacity: 0; transform: translateY(-8px); transition: opacity .2s ease, transform .2s ease; }
.toast.show { opacity: 1; transform: translateY(0); }
.toast.success { background: #14532d; }
.toast.error { background: #991b1b; }
