:root { --red: #c8102e; --navy: #0e1428; --bg: #f5f1ea; --line: #e2ddd3; --muted: #6b7280; }
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: #111; font: 15px/1.8 "Segoe UI", Tahoma, "Noto Naskh Arabic", system-ui, sans-serif; }
a { color: var(--red); }
.top { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; padding: 10px 20px; background: var(--navy); color: #fff; }
.top .brand { font-family: system-ui, sans-serif; }
.top nav { display: flex; flex-wrap: wrap; gap: 4px; }
.top nav a { color: #fff; text-decoration: none; padding: 4px 12px; border-radius: 4px; }
.top nav a.on, .top nav a:hover { background: var(--red); }
.wrap { max-width: 1150px; margin: 0 auto; padding: 20px 16px 60px; }
h1 { margin: 0 0 16px; font-size: 26px; }
h2 { font-size: 19px; margin: 24px 0 10px; }
.card { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 18px; margin: 0 0 18px; }
.narrow { max-width: 420px; margin-inline: auto; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px 18px; }
.grid h2 { margin: 6px 0 0; }
.wide { grid-column: 1 / -1; }
label { display: flex; flex-direction: column; gap: 4px; font-weight: 600; font-size: 14px; }
label.check { flex-direction: row; align-items: center; gap: 8px; font-weight: 400; }
input, select, textarea { font: inherit; padding: 7px 10px; border: 1px solid #cfc8bb; border-radius: 6px; background: #fff; width: 100%; }
input[type=checkbox] { width: auto; }
textarea { min-height: 90px; }
button, .btn { display: inline-block; font: inherit; cursor: pointer; border: 0; border-radius: 6px; padding: 8px 18px; background: var(--red); color: #fff; text-decoration: none; }
button.secondary { background: var(--navy); }
button[disabled] { opacity: .5; cursor: not-allowed; }
button.link { background: none; color: var(--red); padding: 0; }
button.danger, .danger { color: #b91c1c; }
table { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; margin-bottom: 18px; }
th, td { padding: 8px 10px; border-bottom: 1px solid var(--line); text-align: start; vertical-align: top; }
th { background: #faf7f2; font-size: 13px; }
td.actions { display: flex; gap: 12px; align-items: center; }
td.actions form { margin: 0; }
.thumb { max-width: 120px; max-height: 50px; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; }
.stat b { display: block; font-size: 30px; color: var(--navy); font-family: system-ui, sans-serif; }
.stat span { color: var(--muted); }
.tag { display: inline-block; padding: 0 10px; border-radius: 999px; font-size: 13px; }
.tag.active { background: #dcfce7; color: #166534; }
.tag.expired { background: #fef3c7; color: #92400e; }
.tag.suspended { background: #fee2e2; color: #991b1b; }
.flash { background: #ecfdf5; border: 1px solid #a7f3d0; padding: 10px 14px; border-radius: 6px; margin-bottom: 16px; }
.err { background: #fef2f2; border: 1px solid #fecaca; color: #991b1b; padding: 10px 14px; border-radius: 6px; }
.note { background: #fffbeb; border: 1px solid #fde68a; padding: 10px 14px; border-radius: 6px; }
.muted { color: var(--muted); }
.keybox code { display: block; font-size: 22px; letter-spacing: 1px; padding: 12px; background: #f6f7f7; border-radius: 6px; user-select: all; text-align: center; }
pre { direction: ltr; text-align: left; background: #111827; color: #e5e7eb; padding: 12px; border-radius: 6px; overflow-x: auto; user-select: all; }
.search { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.search input[name=q] { flex: 1; min-width: 200px; }
.filters a { margin: 0 4px; }
@media (max-width: 640px) { th, td { padding: 6px; font-size: 13px; } }
.features { border: 1px solid var(--line); border-radius: 6px; padding: 10px 14px; display: flex; flex-wrap: wrap; gap: 6px 22px; }
.features legend { font-weight: 600; padding: 0 6px; }
.features .presets { width: 100%; margin: 0; }
.providers input { min-width: 0; }
.providers select { width: auto; min-width: 150px; }
.providers td { padding: 6px; }
@media (max-width: 900px) { .providers { display: block; overflow-x: auto; } }
