body { font-family: system-ui, -apple-system, "Segoe UI", sans-serif; margin: 0; color: #1a1a1a; background: #f6f6f4; }
header { background: #14213d; color: #fff; padding: 16px 24px; }
header h1 { margin: 0; font-size: 22px; }
header .sub { margin: 4px 0 12px; color: #b8c2d6; font-size: 13px; }
nav a { color: #dfe6f2; text-decoration: none; margin-right: 18px; padding-bottom: 4px; }
nav a.active { color: #fff; border-bottom: 2px solid #fca311; font-weight: 600; }
nav .reload-form { display: inline; margin-left: 8px; }
nav .reload-form button { background: #fca311; color: #14213d; padding: 6px 12px; font-weight: 600; }
main { padding: 20px 24px 40px; max-width: 1400px; }
footer { padding: 12px 24px; color: #666; font-size: 12px; border-top: 1px solid #ddd; }
h2 { margin-top: 0; }
h3 { margin-top: 28px; }
a { color: #1d4ed8; }
.muted { color: #666; font-size: 13px; }
.warn { background: #fef3c7; border: 1px solid #f59e0b; padding: 10px 12px; border-radius: 6px; }
.flash { padding: 10px 12px; border-radius: 6px; margin-bottom: 10px; }
.flash.ok { background: #dcfce7; border: 1px solid #22c55e; }
.flash.error { background: #fee2e2; border: 1px solid #ef4444; }
.stats { display: flex; flex-wrap: wrap; gap: 18px; margin: 12px 0; font-size: 14px; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0; align-items: center; }
.filters input, .filters select, .batch-bar select { padding: 7px 9px; border: 1px solid #ccc; border-radius: 5px; font-size: 14px; }
button, .filters button { padding: 8px 14px; background: #14213d; color: #fff; border: none; border-radius: 5px; cursor: pointer; font-size: 14px; }
button.danger { background: #b91c1c; }
.batch-bar { display: flex; gap: 12px; align-items: center; background: #fff; border: 1px solid #ddd; border-radius: 6px; padding: 10px 12px; margin-bottom: 14px; position: sticky; top: 0; z-index: 5; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.card { background: #fff; border: 1px solid #ddd; border-left: 5px solid #94a3b8; border-radius: 8px; padding: 12px 14px; position: relative; }
.card.status-available { border-left-color: #22c55e; }
.card.status-in_use { border-left-color: #2563eb; }
.card.status-reserved { border-left-color: #f59e0b; }
.card.status-suspended { border-left-color: #ef4444; }
.card.role-burned { opacity: 0.75; }
.card-number { font-size: 20px; font-weight: 700; font-variant-numeric: tabular-nums; }
.card-did { font-size: 13px; color: #444; margin: 2px 0 8px; }
.badges { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 8px; }
.badge { display: inline-block; font-size: 11px; padding: 2px 7px; border-radius: 20px; background: #e5e7eb; color: #333; }
.badge.st-available { background: #dcfce7; color: #166534; }
.badge.st-in_use { background: #dbeafe; color: #1e40af; }
.badge.st-reserved { background: #fef3c7; color: #92400e; }
.badge.st-suspended { background: #fee2e2; color: #991b1b; }
.badge.role-direct { background: #dbeafe; }
.badge.role-asr { background: #dcfce7; }
.badge.role-burned { background: #fee2e2; }
.badge.role-spare { background: #f3f4f6; }
.badge.trunk { background: #ede9fe; color: #5b21b6; }
.card-meta { font-size: 12px; color: #555; line-height: 1.5; }
.card-note { font-size: 12px; color: #666; font-style: italic; margin-top: 6px; }
.card-select { position: absolute; top: 10px; right: 12px; }
.card-select input { width: 18px; height: 18px; }
.card.selected { outline: 2px solid #2563eb; outline-offset: -2px; background: #eff6ff; touch-action: none; }
.card.drag-in { outline: 2px solid #2563eb; outline-offset: -2px; background: #dbeafe; }
.cards.dragging { user-select: none; -webkit-user-select: none; }
.drag-hint { margin: -6px 0 12px; }
#drag-marquee { position: fixed; z-index: 50; display: none; background: rgba(37, 99, 235, 0.15); border: 1.5px solid #2563eb; border-radius: 4px; pointer-events: none; }
.members { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.chart { display: flex; align-items: flex-end; gap: 2px; height: 110px; background: #fff; border: 1px solid #ddd; border-radius: 6px; padding: 8px 8px 0; overflow-x: auto; }
.chart-col { flex: 1 1 0; min-width: 10px; display: flex; flex-direction: column; justify-content: flex-end; align-items: stretch; height: 100%; }
.chart-plot { flex: 1; display: flex; align-items: flex-end; width: 100%; min-height: 0; }
.chart-bar { display: flex; flex-direction: column; width: 100%; min-height: 2px; }
.chart-seg { width: 100%; }
.chart-seg-answered { background: #22c55e; }
.chart-seg-other { background: #cbd5e1; }
.chart-seg-unknown { background: #94a3b8; }
.chart-x { font-size: 9px; color: #888; text-align: center; padding-top: 2px; white-space: nowrap; }
.chart-key { display: inline-block; width: 10px; height: 10px; border-radius: 2px; vertical-align: middle; }
.chart-key-answered { background: #22c55e; }
.chart-key-other { background: #cbd5e1; }
.member { background: #eef2ff; border: 1px solid #c7d2fe; border-radius: 5px; padding: 2px 8px; font-size: 13px; font-variant-numeric: tabular-nums; }
.member-remove { background: none; border: none; color: #b91c1c; padding: 0 0 0 4px; font-size: 14px; line-height: 1; cursor: pointer; }
.group-card { border-left-color: #14213d; }
table { border-collapse: collapse; width: 100%; background: #fff; font-size: 14px; }
th, td { border: 1px solid #ddd; padding: 7px 10px; text-align: left; }
th { background: #f1f5f9; }
tr:nth-child(even) td { background: #fafafa; }
table.kv th { width: 160px; background: #f1f5f9; }
ol.steps li { margin-bottom: 6px; }

.log { background: #111827; color: #e5e7eb; border-radius: 6px; padding: 10px 12px; font-size: 12px; line-height: 1.5; max-height: 320px; overflow: auto; white-space: pre-wrap; word-break: break-all; }

/* Compact "+ New group" toggle on the ASR Groups page: the create
   form sits with the group listing and only expands on demand. */
.create-group { margin: 0 0 12px; }
.create-group summary { display: inline-block; padding: 8px 14px; background: #14213d; color: #fff; border: none; border-radius: 5px; cursor: pointer; font-size: 14px; list-style: none; }
.create-group summary::-webkit-details-marker { display: none; }
.create-group summary::marker { content: ""; }
.create-group form { margin-top: 10px; }

/* Small number cards for the free / blocked CID lists on the ASR
   Groups page: a mini version of the Number Pool cards. The status
   is a coloured dot next to the number, not a word; the full reason
   is kept as a hover tooltip on the card. */
.mini-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.mini-card { background: #fff; border: 1px solid #ddd; border-radius: 6px; padding: 7px 10px; display: flex; align-items: center; gap: 7px; font-variant-numeric: tabular-nums; }
.mini-num { font-size: 15px; font-weight: 700; }
.mini-trunk { font-size: 11px; color: #777; margin-left: auto; white-space: nowrap; }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; flex: none; }
.dot-free { background: #22c55e; }
.dot-burned { background: #ef4444; }
.dot-direct { background: #2563eb; }
.dot-group_cid { background: #7c3aed; }
.dot-reserved { background: #f59e0b; }
.legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: 12px; color: #555; margin: 6px 0 10px; }
.legend .dot { vertical-align: -1px; margin-right: 4px; }
