* { box-sizing: border-box; }
body { font-family: system-ui, -apple-system, sans-serif; margin: 0; color: #1c1e26; background: #f4f5f8; }
.hidden { display: none !important; }
.muted { color: #707684; }
.err { color: #c0392b; min-height: 1em; }
.center { min-height: 100vh; display: flex; align-items: center; justify-content: center; }
.pad { padding: 24px; }
.card { background: #fff; padding: 28px; border-radius: 14px; box-shadow: 0 6px 24px rgba(0,0,0,.08); width: 320px; }
.card h1 { margin: 0 0 4px; }
input, button, select { font-size: 15px; }
input { display: block; width: 100%; padding: 11px; margin: 8px 0; border: 1px solid #d2d6de; border-radius: 8px; }
button { background: #2d6cdf; color: #fff; border: 0; padding: 11px 16px; border-radius: 8px; cursor: pointer; }
button.small { padding: 7px 12px; font-size: 13px; }
button.link { background: none; color: #2d6cdf; padding: 6px; }
header { display: flex; align-items: center; gap: 12px; padding: 12px 20px; background: #fff; border-bottom: 1px solid #e4e7ee; }
.spacer { flex: 1; }
.layout { display: flex; height: calc(100vh - 53px); }
aside { width: 230px; border-right: 1px solid #e4e7ee; background: #fff; padding: 16px; overflow-y: auto; }
aside ul { list-style: none; padding: 0; margin: 0 0 12px; }
aside li { padding: 10px; border-radius: 8px; cursor: pointer; }
aside li:hover { background: #f0f2f7; }
aside li.active { background: #e7eefc; color: #2d6cdf; font-weight: 600; }
aside li small { display: block; font-weight: 400; color: #8a909e; }
main { flex: 1; overflow-y: auto; }
.tabs { display: flex; gap: 4px; padding: 14px 20px 0; flex-wrap: wrap; }
.tabs button { background: #eceef3; color: #444; }
.tabs button.active { background: #2d6cdf; color: #fff; }
.toolbar { padding: 12px 20px; display: flex; gap: 10px; align-items: center; }
.toolbar input { margin: 0; max-width: 280px; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 9px 20px; border-bottom: 1px solid #eceef3; font-size: 14px; vertical-align: top; }
th { background: #fafbfc; position: sticky; top: 0; color: #707684; font-weight: 600; }
tr:hover td { background: #fafbff; }
.badge { font-size: 11px; padding: 2px 7px; border-radius: 20px; background: #eceef3; }
.badge.in, .badge.INCOMING { background: #e6f5ea; color: #1f8a4c; }
.badge.out, .badge.OUTGOING { background: #e7eefc; color: #2d6cdf; }
.badge.MISSED { background: #fdeaea; color: #c0392b; }
#map { height: calc(100vh - 160px); margin: 0 20px 20px; border-radius: 12px; }
.stat-row { display: flex; gap: 14px; padding: 16px 20px; flex-wrap: wrap; }
.stat { background: #fff; border: 1px solid #e4e7ee; border-radius: 12px; padding: 14px 18px; min-width: 120px; }
.stat b { font-size: 22px; display: block; }
a { color: #2d6cdf; word-break: break-all; }
