* { box-sizing: border-box; }
body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; margin: 0; background: #f4f5f7; color: #222; }
.top { display: flex; align-items: center; gap: 1em; padding: .6em 1em; background: #1f2937; color: #fff; flex-wrap: wrap; }
.top .brand { font-weight: 700; font-size: 1.1em; }
.top nav { display: flex; gap: .8em; flex-wrap: wrap; flex: 1; }
.top nav a { color: #cbd5e1; text-decoration: none; padding: .3em .5em; border-radius: 4px; }
.top nav a:hover, .top nav a.active { background: #374151; color: #fff; }
.top .right { display: flex; gap: 1em; align-items: center; }
.top .right .logout { color: #fca5a5; text-decoration: none; }
.content { padding: 1.5em; max-width: 1400px; margin: 0 auto; }
.bottom { padding: 1em; text-align: center; color: #6b7280; font-size: .85em; }
h1 { margin-top: 0; }
h2 { margin-top: 1.5em; border-top: 1px solid #e5e7eb; padding-top: 1em; }
.muted { color: #6b7280; }

/* карточки на дашборде */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1em; margin-bottom: 1em; }
.card { background: #fff; padding: 1em; border-radius: 8px; box-shadow: 0 1px 3px rgba(0,0,0,0.08); }
.card .num { font-size: 2em; font-weight: 700; }
.card .lbl { color: #6b7280; font-size: .9em; }
.card.warn { background: #fef3c7; }
.card.danger { background: #fee2e2; }

/* таблицы */
table { width: 100%; background: #fff; border-collapse: collapse; box-shadow: 0 1px 3px rgba(0,0,0,0.08); margin-top: 1em; }
table th, table td { padding: .6em .8em; text-align: left; border-bottom: 1px solid #e5e7eb; }
table th { background: #f9fafb; font-weight: 600; }
table tr:hover { background: #f9fafb; }

/* формы */
form.form-inline { display: flex; gap: .5em; padding: 1em; background: #fff; border-radius: 8px; flex-wrap: wrap; align-items: center; margin: 1em 0; }
form.form-inline input, form.form-inline select { padding: .5em; border: 1px solid #d1d5db; border-radius: 4px; }
form.form-inline button { padding: .5em 1em; background: #2563eb; color: #fff; border: none; border-radius: 4px; cursor: pointer; font-weight: 600; }
form.form-inline button.danger, button.danger { background: #dc2626; }
form.inline { display: inline; }
form.inline button { padding: .3em .6em; font-size: .85em; }
details summary { cursor: pointer; padding: .5em 0; font-weight: 600; }

/* статусы */
.status { display: inline-block; padding: .15em .5em; border-radius: 4px; font-size: .85em; }
.status-active, .status-posted, .status-verified, .status-resolved, .status-approved { background: #d1fae5; color: #065f46; }
.status-warming, .status-pending, .status-sent, .status-new, .status-ready, .status-pending_approval, .status-draft { background: #dbeafe; color: #1e40af; }
.status-paused, .status-skipped { background: #fef3c7; color: #92400e; }
.status-banned, .status-shadowban, .status-failed, .status-rejected, .status-open { background: #fee2e2; color: #991b1b; }
.status-quarantine, .status-archived { background: #e5e7eb; color: #4b5563; }

.severity { display: inline-block; padding: .15em .5em; border-radius: 4px; font-size: .85em; }
.severity-info { background: #dbeafe; color: #1e40af; }
.severity-warning { background: #fef3c7; color: #92400e; }
.severity-critical { background: #fee2e2; color: #991b1b; }

.platform { display: inline-block; padding: .15em .4em; border-radius: 4px; font-size: .8em; background: #e5e7eb; color: #374151; }
.platform-tiktok { background: #000; color: #fff; }
.platform-instagram { background: #e1306c; color: #fff; }
.platform-youtube { background: #ff0000; color: #fff; }
.platform-vk { background: #4680c2; color: #fff; }
.platform-telegram { background: #229ed9; color: #fff; }
.platform-dzen { background: #2196f3; color: #fff; }

/* фильтры */
.filters { display: flex; gap: .5em; margin: 1em 0; }
.filters a { padding: .3em .8em; background: #fff; border-radius: 4px; text-decoration: none; color: #374151; }
.filters a.active { background: #2563eb; color: #fff; }
.filters a:hover { background: #e5e7eb; }
.filters a.active:hover { background: #1d4ed8; }

/* вход */
.login-box { max-width: 380px; margin: 4em auto; padding: 2em; background: #fff; border-radius: 8px; box-shadow: 0 4px 12px rgba(0,0,0,0.08); }
.login-box h1 { margin-top: 0; }
.login-box label { display: block; margin-bottom: 1em; font-weight: 600; }
.login-box input { width: 100%; padding: .6em; margin-top: .3em; border: 1px solid #d1d5db; border-radius: 4px; font-size: 1em; font-weight: normal; }
.login-box button { width: 100%; padding: .8em; background: #2563eb; color: #fff; border: none; border-radius: 4px; cursor: pointer; font-size: 1em; font-weight: 600; }
.login-box .error { background: #fee2e2; color: #991b1b; padding: .8em; border-radius: 4px; margin-bottom: 1em; }
.login-box .hint { font-size: .85em; color: #6b7280; margin-top: 1em; }

/* решения */
.decision { background: #fff; padding: 1em 1.2em; border-radius: 8px; margin-bottom: 1em; box-shadow: 0 1px 3px rgba(0,0,0,0.08); }
.decision-head { display: flex; gap: 1em; align-items: center; margin-bottom: .5em; }
.decision-head .phase { background: #1f2937; color: #fff; padding: .1em .5em; border-radius: 4px; font-size: .85em; }
.decision-body p { margin: .3em 0; }

.todo-list { list-style: none; padding: 0; }
.todo-list li { padding: .5em .8em; background: #fff; margin-bottom: .3em; border-radius: 4px; box-shadow: 0 1px 2px rgba(0,0,0,0.04); }
.todo-list a { color: #2563eb; text-decoration: none; }

code { background: #f3f4f6; padding: .1em .3em; border-radius: 3px; font-size: .85em; }
