:root {
    --font:  system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    font-family: var(--font);

    --colour-black: #080B0F;
    --colour-white: #FAFAFF;
    --colour-blue: #3F84E5;
    --colour-dblue: #336cbd;
    --colour-navy: #020912;
    --colour-red: #eb3434;
    --colour-dred: #a92f2d;
    --colour-green: #46af0e;
    --colour-dgreen: #3a9c0b;
    --colour-orange: #F89225;
    --colour-purple: #8034eb;

    --nav-width: 180px;
    --header-height: 95px;
}

body {
    overflow: hidden;
    color: var(--colour-white);
    background-color: var(--colour-navy);
    margin: 0;
    display: flex;
}

/* DEFAULT ELEMENTS */

button {
    outline: none;
    border: none;
    font-family: inherit;
    font-weight: inherit;
    cursor: pointer;
    background: transparent;
    font-size: inherit;
    color: inherit;
}

input {
    border: none;
    outline: none;
    font-weight: inherit;
    font-size: inherit;
    font-family: inherit;
}

select {
    font-weight: inherit;
    font-size: inherit;
    font-family: inherit;
}

textarea {
    border: none;
    outline: none;
    font-weight: inherit;
    font-size: inherit;
    font-family: inherit;
}

.form-checkbox input[type="checkbox"] {
    visibility: hidden;
    display: none;
}

.form-checkbox *,
.form-checkbox ::after,
.form-checkbox ::before {
    box-sizing: border-box;
}

.form-checkbox .switch {
    --size: 20px;
    width: calc(var(--size) * 2);
    height: var(--size);
    position: relative;
    display: inline-block;
}

.form-checkbox {
    padding: 2px;
    display: flex;
    align-items: center;
    height: 100%;
}

.form-checkbox .slider {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    border-radius: var(--size);
    box-shadow: 0 0 0 2px #777, 0 0 4px #777;
    cursor: pointer;
    border: 4px solid transparent;
    overflow: hidden;
    transition: 0.2s;
}

.form-checkbox .slider:before {
    --translate: calc(var(--size) - 2px);
    position: absolute;
    content: "";
    width: 100%;
    height: 100%;
    background-color: #777;
    border-radius: var(--size);
    transform: translateX(calc(0px - var(--translate)));
    transition: 0.2s;
}

  .form-checkbox input:checked + .slider:before {
    transform: translateX(var(--translate));
    background-color: var(--colour-green);
}

.form-checkbox input:checked + .slider {
    box-shadow: 0 0 0 2px var(--colour-green), 0 0 8px var(--colour-green);
}

/* SCROLLBAR STYLING */

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-thumb {
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

/* GENERAL CLASSES */

.heading-large {
    font-size: 24px;
    font-weight: 500;
}

.heading-small {
    font-size: 22px;
    font-weight: 500;
}

.button {
    background-color: var(--colour-blue);
    color: white;
    padding: 8px 12px;
    border-radius: 5px;
    font-weight: 500;
    transition: all 100ms ease-in-out;
}
.button:hover {
    background-color: var(--colour-dblue);
}
.button.red {
    background-color: var(--colour-red);
}
.button.red:hover {
    background-color: var(--colour-dred);
}
.button.green {
    background-color: var(--colour-green);
}
.button.green:hover {
    background-color: var(--colour-dgreen);
}

.clickable-ref {
    cursor: pointer;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 2px;
}

.clickable-ref:hover {
    color: #9fc7ff;
}

.drag-preview-chip {
    position: fixed;
    top: -1000px;
    left: -1000px;
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 5px;
    padding: 5px 9px;
    background: rgba(7, 14, 26, 0.95);
    color: white;
    font-size: 12px;
    font-weight: 500;
    pointer-events: none;
    z-index: 250;
    max-width: 340px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* NOTIFICATIONS */

.notification {
    position: fixed;
    top: 25px;
    left: 50%;
    translate: -50%;
    font-size: 19px;
    padding: 20px;
    border-radius: 5px;
    display: flex;
    gap: 20px;
    align-items: center;
    justify-content: center;
    max-width: 400px;
}

.notification > i {
    font-size: 24px;
}

/* NAV */

#nav {
    width: var(--nav-width);
    flex-shrink: 0;
    height: 100%;
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 10px;
    box-sizing: border-box;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
}

.nav-button {
    display: flex;
    gap: 10px;
    align-items: center;
    border-radius: 5px;
    padding: 14px 10px;
    font-weight: 100;
    width: 100%;
    border-left: 5px solid transparent;
    transition: all 100ms ease-in-out;
    text-align: left;
    text-transform: capitalize;
}
.nav-button:hover {
    background-color: rgba(255, 255, 255, 0.1);
}
.nav-button.active {
    border-color: var(--colour-white);
}

.nav-button > i {
    width: 24px;
    text-align: center;
}

/* MDT HEADER */

#header {
    width: calc(100% - var(--nav-width));
    height: var(--header-height);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
    position: absolute;
    top: 0;
    left: var(--nav-width);
    display: flex;
    justify-content: space-between;
    padding: 20px;
    box-sizing: border-box;
}

#profile {
    display: flex;
    gap: 20px;
    cursor: pointer;
    padding: 16px 20px;
    box-sizing: border-box;
    margin: -10px;
    border-radius: 5px;
}
#profile:hover {
    background: rgba(255, 255, 255, 0.1);
}
#profile.show {
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    border-bottom: none;
    z-index: 100;
    background-color: var(--colour-navy);
}

#profile > img {
    display: none;
    width: 42px;
    height: 42px;
    border-radius: 100%;
}

#profile-details {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.profile-row {
    display: flex;
    gap: 4px;
}

#profile-edit-back {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 98;
    cursor: pointer;
}
#profile-edit-back.show {
    display: block;
}

#profile-edit {
    position: absolute;
    width: 400px;
    height: fit-content;
    background-color: var(--colour-navy);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-sizing: border-box;
    top: calc(100% - 11px);
    left: 10px;
    z-index: 99;
    padding: 20px;
    display: none;
    flex-direction: column;
    gap: 10px;
    border-radius: 5px;
    border-top-left-radius: 0;
}
#profile-edit.show {
    display: flex;
}

#status-buttons {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 16px;
}

.status-button {
    position: relative;
    border: 1px solid var(--colour);
    color: rgb(180, 180, 180);
    box-sizing: border-box;
    padding: 12px;
    border-radius: 5px;
    width: 120px;
    overflow: hidden;
    transition: all 100ms ease-in-out;
}
.status-button:hover {
    color: white;
    background-color: rgba(255, 255, 255, 0.1);
}
.status-button.active {
    color: white;
    background-color: var(--colour);
}

.unit-status {
    padding: 3px 6px;
    border-radius: 5px;
    background-color: var(--colour);
    width: fit-content;
    height: fit-content;
    color: white;
}

/* MDT MAIN */

#main {
    flex-grow: 1;
    padding: 20px;
    height: calc(100% - var(--header-height));
    margin-top: var(--header-height);
    box-sizing: border-box;
}

.main-cont {
    display: none;
    position: relative;
    width: 100%;
    height: 100%;
    gap: 12px;
}
.main-cont.active {
    display: grid;
}
.main-cont > * {
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 5px;
    padding: 6px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* DISPATCH */

#main-dispatch {
    grid-template-columns: 3fr 4fr;
    grid-template-rows: 5fr 2fr;
}

#dispatch-units-cont {
    display: flex;
    flex-direction: column;
    grid-row-start: 1;
    grid-row-end: 3;
}

#dispatch-units {
    display: flex;
    flex-direction: column;
    gap: 2px;
    overflow-y: auto;
}

#dispatch-units-heading, .dispatch-unit {
    font-size: 14px;
    display: grid;
    gap: 4px;
    padding: 4px;
}
.dispatch-unit {
    font-weight: 300;
    cursor: pointer;
    border-radius: 4px;
    display: none;
}
.dispatch-unit:nth-child(2n) {
    background-color: rgba(255, 255, 255, 0.1);
}
.dispatch-unit.is_active {
    display: grid;
}

.dispatch-unit.union-hidden {
    display: none !important;
}

.dispatch-unit.dispatch-union {
    border-left: 3px solid rgba(248, 146, 37, 0.85);
    padding-left: 8px;
    background-color: rgba(248, 146, 37, 0.12);
}

.dispatch-unit.dispatch-union .union-callsign {
    display: flex;
    align-items: center;
    gap: 8px;
}

.dispatch-unit.dispatch-union .union-expand-toggle {
    cursor: pointer;
    width: 14px;
    text-align: center;
}

.dispatch-unit.dispatch-union > .union-member-list {
    display: none;
    grid-column: 1 / -1;
    border-right: none;
    margin-top: 4px;
    border-radius: 4px;
    border: 1px dashed rgba(255, 255, 255, 0.25);
    background-color: rgba(2, 9, 18, 0.65);
    padding: 8px;
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
}

.dispatch-unit.dispatch-union > .union-member-list.expanded {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.union-member-row {
    display: grid;
    grid-template-columns: 64px 96px 1fr;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    padding: 3px 6px;
    border-radius: 4px;
    background-color: rgba(255, 255, 255, 0.06);
}

.union-member-row .unit-status {
    font-size: 11px;
    padding: 2px 6px;
}

.union-member-callsign {
    font-weight: 500;
}

.union-member-name {
    opacity: 0.9;
}

.union-call-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 1px solid rgba(255, 255, 255, 0.25);
}

.union-call-label {
    line-height: 1;
}

.union-call-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 16px;
    border-radius: 999px;
    padding: 0 6px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.03em;
    background-color: rgba(8, 11, 15, 0.42);
    border: 1px solid rgba(255, 255, 255, 0.35);
}

.dispatch-unit.dragging,
.character-card.dragging,
.status-button.dragging,
.char-subtable tr.dragging {
    opacity: 0.55;
    outline: 1px dashed rgba(255, 255, 255, 0.5);
}

.dispatch-unit.highlight {
    animation: dispatch-unit-highlight 1.2s ease;
}

@keyframes dispatch-unit-highlight {
    0% {
        background-color: rgba(63, 132, 229, 0.55);
    }
    100% {
        background-color: transparent;
    }
}

#dispatch-units-heading > div {
    cursor: pointer;
}

.dispatch-unit > div {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    border-right: 1px solid rgba(255, 255, 255, 0.2);
}
.dispatch-unit > div:not(:has(div)) {
    line-height: 200%;
}
.dispatch-unit > div:last-child {
    border-right: none;
}

/* MAP */

#main-map {
    grid-template-columns: 1fr 320px;
}

#main-map.main-cont > * {
    padding: 0;
}

#map-viewport {
    position: relative;
    overflow: hidden;
    background-color: rgba(123,174,206,255);
}

#map {
    position: absolute;
    top: 0;
    left: 0;
    transform-origin: top left;
    cursor: grab;
}
#map.selecting {
    cursor: crosshair;
}

/* MAP KEY */

#map-key {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 8px;
    overflow-y: auto;
    background: linear-gradient(180deg, rgba(8, 11, 16, 0.85), rgba(8, 11, 16, 0.7));
    color: var(--colour-white);
    font-size: 13px;
    box-sizing: border-box;
}

#map-key.all-empty::before {
    content: 'No blips on map';
    display: block;
    padding: 12px;
    color: rgba(255, 255, 255, 0.55);
    font-size: 12px;
    text-align: center;
    font-style: italic;
}

.map-key-group {
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 6px;
    background-color: rgba(255, 255, 255, 0.04);
    overflow: hidden;
}

.map-key-group-header {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 6px;
    padding: 6px 8px;
    background-color: rgba(255, 255, 255, 0.06);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.map-key-group.collapsed .map-key-group-header {
    border-bottom: none;
}

.map-key-group-title {
    display: flex;
    align-items: baseline;
    gap: 6px;
    cursor: pointer;
    user-select: none;
    overflow: hidden;
}

.map-key-group-name {
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: var(--colour-white);
}

.map-key-group-count {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.6);
}

.map-key-group.hidden-group .map-key-group-name,
.map-key-group.hidden-group .map-key-group-count {
    color: rgba(255, 255, 255, 0.4);
}

.map-key-icon-btn {
    width: 28px;
    height: 28px;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.78);
    transition: background-color 0.12s ease, color 0.12s ease;
    flex-shrink: 0;
}

.map-key-icon-btn:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--colour-white);
}

.map-key-icon-btn:focus-visible {
    outline: 2px solid var(--colour-blue);
    outline-offset: 1px;
}

.map-key-icon-btn i {
    font-size: 13px;
    pointer-events: none;
}

.map-key-group-body {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 4px;
}

.map-key-row {
    border-radius: 4px;
    border: 1px solid transparent;
    background-color: rgba(255, 255, 255, 0.02);
}

.map-key-row:hover {
    border-color: rgba(255, 255, 255, 0.16);
    background-color: rgba(255, 255, 255, 0.06);
}

.map-key-row.data-hidden {
    display: none;
}

.map-key-group.group-empty {
    opacity: 0.45;
}

.map-key-group.group-empty .map-key-group-body {
    display: none;
}

.map-key-row-summary {
    display: grid;
    grid-template-columns: auto auto 1fr auto;
    align-items: center;
    gap: 6px;
    padding: 4px 6px;
    cursor: pointer;
    user-select: none;
}

.map-key-row-icon {
    font-size: 14px;
    width: 18px;
    text-align: center;
    flex-shrink: 0;
}

.map-key-row-label {
    font-size: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 500;
}

.map-key-row-chevron {
    width: 22px;
    height: 22px;
}

.map-key-row-chevron i {
    font-size: 11px;
}

.map-key-locate {
    width: 26px;
    height: 26px;
}

.map-key-row-body {
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 6px 8px 8px 32px;
    border-top: 1px dashed rgba(255, 255, 255, 0.1);
}

.map-key-row-detail {
    display: grid;
    grid-template-columns: 90px 1fr;
    gap: 8px;
    align-items: baseline;
    font-size: 11.5px;
}

.map-key-row-detail-label {
    color: rgba(255, 255, 255, 0.55);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-size: 10px;
}

.map-key-row-detail-value {
    color: var(--colour-white);
    word-break: break-word;
}

.map-blip {
    position: absolute;
    left: -100vw;
    translate: -50% -50%;
    width: fit-content;
    height: fit-content;
    font-size: 28px;
    text-shadow: 3px 3px 0 black;
    -webkit-text-stroke: 1px black;
    cursor: pointer;
    color: var(--blip-colour);
    z-index: 3;
}

.map-blip > * {
    z-index: 3;
    position: relative;
}

.map-blip.show-rotation::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    rotate: var(--blip-rotation, 0);
    translate: -50% -50%;
    width: 18px;
    height: 60px;
    clip-path: polygon(50% 0%, 0% 50%, 100% 50%);
    z-index: 2;
    background-color: black;
    box-shadow: 0 0 0 3px black;
}

.map-blip-trail {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.map-blip-popup {
    position: absolute;
    padding: 10px;
    width: 220px;
    max-width: min(250px, 85vw);
    height: fit-content;
    background: linear-gradient(165deg, rgba(22, 26, 34, 0.97), rgba(10, 13, 18, 0.98));
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 8px;
    bottom: calc(100% + 5px);
    left: 50%;
    translate: -50% 0;
    color: rgba(247, 249, 252, 0.95);
    font-size: 13px;
    overflow: hidden;
    text-shadow: none;
    -webkit-text-stroke: 0;
    font-family: var(--font);
    font-weight: 500;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    display: none;
    flex-direction: column;
    gap: 10px;
}

.blip-popup-card {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.blip-popup-header {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.blip-popup-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 46px;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: #0d1015;
    border: 1px solid rgba(12, 14, 18, 0.9);
    background-color: var(--status-colour, rgb(90, 90, 90));
}

.blip-popup-callsign {
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.03em;
}

.blip-popup-name {
    font-size: 14px;
    line-height: 1.15;
    font-weight: 600;
}

.blip-popup-meta {
    font-size: 12px;
    color: rgba(214, 219, 229, 0.83);
}

.blip-popup-vehicle-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 8px;
    border-radius: 7px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background-color: rgba(255, 255, 255, 0.08);
}

.blip-popup-vehicle-header i {
    font-size: 12px;
}

.blip-popup-vehicle-title {
    font-size: 12px;
    font-weight: 600;
    text-transform: capitalize;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.blip-popup-vehicle-plate {
    margin-left: auto;
    font-size: 11px;
    letter-spacing: 0.04em;
    border-radius: 999px;
    padding: 2px 7px;
    background-color: rgba(8, 11, 16, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.blip-popup-unit-count {
    font-size: 11px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: rgba(226, 230, 239, 0.8);
}

.blip-popup-unit-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
    max-height: 160px;
    overflow-y: auto;
    padding-right: 2px;
}

.blip-popup-unit-row {
    display: grid;
    grid-template-columns: auto auto 1fr;
    align-items: center;
    gap: 8px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.17);
    background-color: rgba(255, 255, 255, 0.06);
    padding: 6px 8px;
    cursor: pointer;
}

.blip-popup-unit-row:hover {
    border-color: rgba(248, 146, 37, 0.58);
    background-color: rgba(248, 146, 37, 0.18);
}

.blip-popup-unit-callsign {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.03em;
}

.blip-popup-unit-name {
    font-size: 12px;
    color: rgba(236, 239, 247, 0.92);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* SETTINGS */

#main-settings {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 50px;
}

.settings-category {
    display: flex;
    flex-direction: column;
}

.settings-buttons {
    grid-column: 1 / -1;
    border: none;
    display: flex;
    flex-direction: row-reverse;
}

/* LOGIN PAGE */

#login-div {
    position: absolute;
    top: 50%;
    left: 50%;
    translate: -50% -50%;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: center;
}

.close-button {
    position: absolute;
    bottom: 20px;
    left: 50%;
    translate: -50%;
    width: fit-content;
    height: fit-content;
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* INPUT POPUP */

.input-back {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 98;
    justify-content: center;
    align-items: center;
}

.input-popup {
    position: absolute;
    width: 400px;
    height: fit-content;
    background-color: var(--colour-navy);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-sizing: border-box;
    top: 50%;
    left: 50%;
    z-index: 99;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    border-radius: 5px;
    translate: -50% -50%;
}

.input-popup-title {
    font-size: 22px;
    margin-bottom: 12px;
}

.input-popup-buttons {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 12px;
}

.input-cont {
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: 100%;
    overflow: hidden;
}

.input-cont-search-select {
    position: relative;
    overflow: visible;
}

.input {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    padding: 8px;
    width: 100%;
    color: inherit;
    transition: all 100ms ease-in-out;
    height: 40px;
}
.input:focus {
    border-color: white;
}
.input[disabled] {
    /* background-color: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.5); */
    cursor: not-allowed;
}
input[type="checkbox"] {
    height: auto;
}

select.input {
    cursor: pointer;
    padding-left: 4px;
}
select.input:focus {
    border-bottom-right-radius: 0;
    border-bottom-left-radius: 0;
}
select.input > option {
    background-color: var(--colour-navy);
}

.input-search-select-options {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    z-index: 50;
    display: none;
    flex-direction: column;
    max-height: 260px;
    overflow-y: auto;
    background-color: var(--colour-navy);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

.input-search-select-option {
    background: transparent;
    border: none;
    color: inherit;
    text-align: left;
    width: 100%;
    padding: 8px 10px;
    cursor: pointer;
}

.input-search-select-option:hover {
    background-color: rgba(255, 255, 255, 0.15);
}

.input-multiselect-option {
    background: transparent;
    border: none;
    color: inherit;
    text-align: left;
    width: 100%;
    padding: 8px 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
}

.input-multiselect-option:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.input-multiselect-option.selected {
    background-color: rgba(255, 255, 255, 0.06);
}

.input-multiselect-checkbox {
    width: 15px;
    height: 15px;
    border: 1.5px solid rgba(255, 255, 255, 0.35);
    border-radius: 3px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.input-multiselect-checkbox.checked {
    background-color: white;
    border-color: white;
}

.input-multiselect-checkbox.checked::after {
    content: '';
    display: block;
    width: 4px;
    height: 7px;
    border: 1.5px solid var(--colour-navy);
    border-top: none;
    border-left: none;
    transform: rotate(45deg) translate(-1px, -1px);
}

textarea.input {
    resize: none;
    height: 100%;
}

div.input {
    box-sizing: border-box;
    height: 100%;
    overflow-y: auto;
}

/* HOVER PROMPT */

.hover-prompt {
    position: absolute;
    background-color: var(--colour-navy);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 4px;
    font-size: 14px;
    width: fit-content;
    height: fit-content;
    padding: 4px 8px;
    translate: -50%;
    text-align: center;
    text-wrap: nowrap;
}

.hover-prompt::after {
    content: '';
    position: absolute;
    background-color: var(--colour-navy);
    width: 10px;
    height: 10px;
    top: 100%;
    left: 50%;
    translate: -50% -50%;
    rotate: 45deg;
    border-bottom: 1px solid rgba(255, 255, 255, 0.5);
    border-right: 1px solid rgba(255, 255, 255, 0.5);
    clip-path: polygon(0 100%, 100% 0, 100% 100%);
}

.hover-prompt.bottom::after {
    border-bottom: none;
    border-right: none;
    border-top: 1px solid rgba(255, 255, 255, 0.5);
    border-left: 1px solid rgba(255, 255, 255, 0.5);
    clip-path: polygon(0 100%, 100% 0, 0 0);
    top: 0;
    bottom: 100%;
}

/* CURRENT CALL */

#current-call {
    width: 100%;
    height: 100%;
    margin-top: 8px;
    display: grid;
    grid-template-rows: repeat(2, 70px) 1fr 40px 50px;
    grid-template-columns: repeat(12, 1fr);
    gap: 8px;
    overflow: hidden;
}

#current-call.drag-over {
    border: 1px dashed rgba(255, 255, 255, 0.45);
    border-radius: 4px;
    background-color: rgba(255, 255, 255, 0.06);
}

#current-call-units {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: row-reverse;
    gap: 10px;
}
#current-call-units:not(:has(div))::after {
    content: 'No units assigned to this call.';
    font-size: 16px;
    color: rgba(255, 255, 255, 0.5);
    text-align: center;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.call-notes-add {
    grid-column: 7 / span 6;
    display: flex;
    gap: 10px;
}
.call-notes-add > button {
    width: fit-content;
    flex-shrink: 0;
    font-weight: 400;
    border-radius: 100%;
    width: 40px;
    height: 40px;
}

.call-buttons {
    grid-column: 1 / -1;
    display: flex;
    gap: 10px;
    height: fit-content;
    align-self: end;
    height: 50px;
}
.call-buttons > button {
    font-weight: 400;
    font-size: 16px;
    margin-top: 10px;
    flex-shrink: 0;
}

.call-buttons > button:first-child {
    background-color: var(--colour-red);
}
.call-buttons > button:first-child:hover {
    background-color: var(--colour-dred);
}

.call-buttons > button:last-child {
    background-color: var(--colour-green);
}
.call-buttons > button:last-child:hover {
    background-color: var(--colour-dgreen);
}

.call-location-button {
    position: fixed;
    translate: -50% -50%;
    cursor: pointer;
    font-size: 22px;
}

/* CALL LOG */

#call-log {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    gap: 2px;
    overflow-y: auto;
}

.call-log-call {
    display: grid;
    font-size: 14px;
    display: grid;
    gap: 4px;
    padding: 4px;
    font-weight: 300;
    cursor: pointer;
    border-radius: 4px;
}
.call-log-call:nth-child(2n) {
    background-color: rgba(255, 255, 255, 0.1);
}

.call-log-call.drag-over {
    border: 1px dashed rgba(255, 255, 255, 0.45);
    background-color: rgba(63, 132, 229, 0.16);
}

.unit-detail-popup-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.45);
    z-index: 120;
    display: flex;
    justify-content: center;
    align-items: center;
}

.unit-detail-popup {
    width: min(460px, calc(100vw - 32px));
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    background-color: var(--colour-navy);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 8px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.45);
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.unit-detail-title {
    font-size: 19px;
    font-weight: 600;
}

.unit-detail-row {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    font-size: 13px;
    padding: 6px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.unit-detail-label {
    color: rgba(255, 255, 255, 0.5);
}

.unit-detail-value {
    text-align: right;
}

.unit-detail-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    margin-top: 6px;
}

/* CONTEXT MENU */

.has-context-menu {
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-bottom-right-radius: 0;
    box-sizing: border-box;
    padding: 3px;
}

.context-menu, .context-submenu {
    position: absolute;
    display: flex;
    flex-direction: column;
    border-radius: 5px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background-color: var(--colour-navy);
    width: fit-content;
    height: fit-content;
    font-weight: 300;
    font-size: 14px;
}

.context-menu {
    border-top-left-radius: 0;
    border-top-right-radius: 0;
    border-top: none;
}

.context-submenu {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

.context-option {
    display: flex;
    gap: 10px;
    justify-content: space-between;
    align-items: center;
    padding: 4px 8px;
    cursor: pointer;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* TABLE */

.table-cont {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.table-cont.table-infinite-scroll {
    overflow-y: auto;
    max-height: 60vh;
}

.table-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: flex-end;
}

.table-control-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.table-control-group > label {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.65);
}

.table-search > input,
.table-filter-select {
    min-width: 170px;
    padding: 6px 8px;
}

table.table {
    table-layout: fixed;
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.table-heading {
    text-align: left;
}

.table-heading > th {
    padding: 4px 8px;
    cursor: pointer;
}

.table-heading > th.sort-disabled {
    cursor: default;
}

.table-heading i.sort-icon {
    margin-left: 6px;
}

.table-row:nth-child(2n) {
    background-color: rgba(255, 255, 255, 0.1);
}

.table-row > td {
    padding: 2px 8px;
    font-weight: 300;
    border-top: 3px solid transparent;
    border-bottom: 3px solid transparent;
}
.table-row > td:not(:first-child) {
    border-left: 1px solid rgba(255, 255, 255, 0.1);
}

.table-loading-row > td {
    text-align: center;
    color: rgba(255, 255, 255, 0.6);
    font-style: italic;
}

/* ADMIN */

#main-admin.active {
    display: flex;
    flex-direction: column;
}

#admin-tabs {
    display: flex;
    flex-direction: row;
    gap: 8px;
    padding: 0;
    border: none;
    height: fit-content;
}

.admin-tab-button {
    border: 1px solid grey;
    border-bottom-color: var(--colour-white);
    padding: 4px 20px;
    cursor: pointer;
    width: fit-content;
    border-top-left-radius: 5px;
    border-top-right-radius: 5px;
    z-index: 5;
    background-color: var(--colour-navy);
}
.admin-tab-button.active {
    border-color: var(--colour-white);
    border-bottom: none;
}

.admin-tab-content {
    display: none;
    margin-top: -19px;
    border-color: var(--colour-white);
    height: 100%;
    flex-shrink: 1;
}
.admin-tab-content.active {    
    display: block;
}

.admin-log-level {
    display: inline-flex;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.04em;
}

.admin-log-level-verbose {
    background-color: rgba(255, 255, 255, 0.12);
}

.admin-log-level-success {
    background-color: rgba(98, 190, 98, 0.35);
}

.admin-log-level-info {
    background-color: rgba(81, 135, 255, 0.35);
}

.admin-log-level-warn {
    background-color: rgba(255, 177, 55, 0.35);
}

.admin-log-level-error {
    background-color: rgba(236, 80, 80, 0.35);
}

.admin-log-message {
    white-space: pre-wrap;
    word-break: break-word;
}

.admin-unit-id-cell {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.admin-unit-banned-badge {
    display: inline-flex;
    align-items: center;
    padding: 1px 6px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.04em;
    background-color: rgba(236, 80, 80, 0.35);
    border: 1px solid rgba(236, 80, 80, 0.8);
}

.admin-character-description {
    white-space: pre-wrap;
    word-break: break-word;
    max-height: 80px;
    overflow: hidden;
}

.admin-character-flag-badges {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 4px;
}

.admin-character-flag-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 6px;
    border-radius: 999px;
    font-size: 11px;
    background-color: rgba(81, 135, 255, 0.25);
}

.admin-character-flag-badge.muted {
    color: rgba(255, 255, 255, 0.45);
    background-color: rgba(255, 255, 255, 0.08);
}

/* LOOKUP */

#main-lookup {
    grid-template-columns: 1fr 280px;
}

#lookup-left, #lookup-right {
    gap: 8px;
}

#lookup-search-bar {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-shrink: 0;
}

#lookup-type-toggle {
    display: flex;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
    flex-shrink: 0;
}

.lookup-type-btn {
    padding: 8px 12px;
    color: rgba(255, 255, 255, 0.5);
    font-size: 13px;
    transition: all 100ms ease-in-out;
}

.lookup-type-btn.active {
    background-color: var(--colour-blue);
    color: white;
}

#lookup-results, #lookup-history {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.lookup-result, .lookup-history-item {
    padding: 8px 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 100ms ease-in-out;
    flex-shrink: 0;
}

.lookup-result:hover, .lookup-history-item:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.lookup-card-name {
    font-size: 14px;
    font-weight: 500;
}

.lookup-card-sub {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
    margin-top: 2px;
}

#lookup-detail {
    display: flex;
    flex-direction: column;
    gap: 8px;
    overflow-y: auto;
}

.lookup-detail-back {
    width: fit-content;
    font-size: 12px;
    padding: 4px 8px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    cursor: pointer;
    flex-shrink: 0;
    color: rgba(255, 255, 255, 0.7);
    transition: all 100ms ease-in-out;
}

.lookup-detail-back:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
}

/* Shared detail section — used by both lookup and characters tabs */

.detail-section {
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    padding: 10px 12px;
    flex-shrink: 0;
}

.detail-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.detail-section-title {
    font-size: 11px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    letter-spacing: 0.6px;
}

.detail-fields {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px 16px;
}

.detail-field {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.detail-field-label {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.4);
}

.detail-field-value {
    font-size: 13px;
}

/* FLAG BADGES */

.flag-badge {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 500;
    background-color: var(--colour-red);
    color: white;
    margin: 2px 2px 2px 0;
}

/* RADIO */

#main-radio.active {
    display: block;
}

#radio-layout {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

#radio-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 8px;
}

#radio-summary {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.6);
}

#radio-channel-grid {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
    gap: 10px;
    overflow-y: auto;
    align-content: start;
}

.radio-channel-card {
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 5px;
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-height: 140px;
    transition: border-color 80ms ease-out, background-color 80ms ease-out;
}

.radio-channel-card.drag-over {
    border-color: rgba(255, 255, 255, 0.4);
    background-color: rgba(255, 255, 255, 0.06);
}

.radio-channel-card.empty {
    opacity: 0.85;
}

.radio-channel-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
}

.radio-channel-title-wrap {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.radio-channel-title {
    font-size: 15px;
    font-weight: 500;
}

.radio-channel-frequency,
.radio-channel-count {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.55);
}

.radio-unit-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    overflow-y: auto;
    max-height: 280px;
}

.radio-unit-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    border-radius: 4px;
    padding: 6px;
    background-color: rgba(255, 255, 255, 0.04);
}

.radio-unit-row[draggable="true"] {
    cursor: grab;
    user-select: none;
}

.radio-unit-row[draggable="true"]:active {
    cursor: grabbing;
}

.radio-unit-row.dragging {
    opacity: 0.6;
}

.radio-unit-meta {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.radio-unit-title {
    font-size: 13px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
}

.radio-unit-title > .unit-status {
    flex-shrink: 0;
}

.radio-unit-name {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.radio-unit-sub,
.radio-readonly {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
}

.radio-select {
    width: 150px;
    height: 34px;
    font-size: 12px;
    padding: 4px;
}

.radio-select[disabled] {
    cursor: not-allowed;
    opacity: 0.7;
}

.radio-empty {
    border: 1px dashed rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    padding: 8px;
    text-align: center;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
}

.radio-drag-preview {
    position: fixed;
    top: -1000px;
    left: -1000px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    padding: 4px 8px;
    background-color: rgba(12, 18, 30, 0.95);
    color: white;
    font-size: 12px;
    font-weight: 500;
    pointer-events: none;
}

/* CHARACTERS TAB */

#main-characters {
    grid-template-columns: 260px 1fr;
}

#characters-left, #characters-right {
    gap: 8px;
}

#characters-list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

#characters-list {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.character-card {
    padding: 8px 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 100ms ease-in-out;
    flex-shrink: 0;
}

.character-card:hover {
    background-color: rgba(255, 255, 255, 0.08);
}

.character-card[draggable="true"] {
    cursor: grab;
}

.character-card[draggable="true"]:active {
    cursor: grabbing;
}

.character-card.active {
    border-color: var(--colour-blue);
    background-color: rgba(63, 132, 229, 0.15);
}

.character-card-name {
    font-size: 14px;
    font-weight: 500;
}

.character-card-sub {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
    margin-top: 2px;
}

#characters-detail {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

#characters-placeholder {
    color: rgba(255, 255, 255, 0.3);
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
}

.char-detail-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-shrink: 0;
}

.char-detail-name {
    font-size: 20px;
    font-weight: 500;
}

.char-detail-actions {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}

/* .detail-section and friends are defined in the LOOKUP section above */

.char-subtable {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.char-subtable th {
    text-align: left;
    padding: 4px 8px;
    color: rgba(255, 255, 255, 0.5);
    font-weight: 400;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.char-subtable td {
    padding: 5px 8px;
    vertical-align: middle;
}

.char-subtable tr:nth-child(2n) td {
    background-color: rgba(255, 255, 255, 0.05);
}

.char-subtable tr[draggable="true"] {
    cursor: grab;
}

.char-subtable tr[draggable="true"]:active {
    cursor: grabbing;
}

.char-subtable .row-actions {
    display: flex;
    gap: 4px;
    justify-content: flex-end;
}

.char-subtable-empty {
    color: rgba(255, 255, 255, 0.3);
    font-size: 13px;
    padding: 8px;
    text-align: center;
}

/* REPORTS TAB */

#main-reports {
    grid-template-columns: 340px 1fr;
}

#reports-left,
#reports-right {
    gap: 8px;
}

#reports-list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

#reports-filters {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    flex-shrink: 0;
}

.report-filter {
    height: 36px;
    font-size: 12px;
}

.report-filter-search {
    grid-column: 1 / -1;
}

#reports-list {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

#reports-detail {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

#reports-placeholder {
    color: rgba(255, 255, 255, 0.3);
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
}

.report-card {
    padding: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
    transition: background-color 100ms ease-in-out, border-color 100ms ease-in-out;
    flex-shrink: 0;
}

.report-card:hover {
    background-color: rgba(255, 255, 255, 0.08);
}

.report-card.active {
    border-color: var(--colour-blue);
    background-color: rgba(63, 132, 229, 0.15);
}

.report-card-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 8px;
}

.report-card-title {
    font-size: 14px;
    font-weight: 500;
    line-height: 1.2;
}

.report-card-id {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.45);
    white-space: nowrap;
}

.report-card-sub {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.55);
}

.report-card-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.report-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 500;
}

.report-badge.blue {
    background-color: rgba(63, 132, 229, 0.22);
    color: #9fc7ff;
}

.report-badge.red {
    background-color: rgba(235, 52, 52, 0.22);
    color: #ffb0b0;
}

.report-badge.orange {
    background-color: rgba(248, 146, 37, 0.22);
    color: #ffd3a3;
}

.report-badge.green {
    background-color: rgba(70, 175, 14, 0.22);
    color: #bff7a0;
}

.report-badge.yellow {
    background-color: rgba(241, 196, 15, 0.2);
    color: #ffe68f;
}

.report-badge.purple {
    background-color: rgba(128, 52, 235, 0.24);
    color: #d0b4ff;
}

.report-badge.neutral {
    background-color: rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.72);
}

.report-card-lookup {
    padding: 8px;
}

.report-detail-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
}

.report-detail-title {
    font-size: 20px;
    font-weight: 500;
    margin-bottom: 6px;
}

.report-linked-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.report-linked-row {
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    padding: 7px 8px;
    font-size: 13px;
}

.report-text-content {
    white-space: pre-wrap;
    font-size: 13px;
    line-height: 1.45;
}

.report-charge-list {
    margin: 0;
    padding-left: 18px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 13px;
}

.report-editor-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.report-editor-grid .input-cont {
    min-width: 0;
}

.report-editor-grid textarea.input {
    min-height: 120px;
}

.report-editor-stack {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.report-unit-checkboxes {
    display: flex;
    flex-direction: column;
    gap: 4px;
    max-height: 140px;
    overflow-y: auto;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    padding: 6px;
}

.report-unit-option {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
}

.report-inline-search {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 6px;
}

.report-inline-links {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 2px;
}

.report-location-controls {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.report-location-controls .button {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
}

.report-search-results {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.report-search-result {
    text-align: left;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    padding: 6px 8px;
    font-size: 12px;
    background: transparent;
    color: inherit;
}

.report-search-result:hover {
    background-color: rgba(255, 255, 255, 0.08);
}

.report-token-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.report-token {
    padding: 4px 8px;
    border-radius: 999px;
    background-color: rgba(255, 255, 255, 0.12);
    font-size: 12px;
}

.report-drop-zone {
    border: 1px dashed transparent;
    border-radius: 6px;
    transition: border-color 80ms ease-out, background-color 80ms ease-out;
}

.report-drop-zone.drag-over {
    border-color: rgba(255, 255, 255, 0.45);
    background-color: rgba(255, 255, 255, 0.06);
}

@media (max-width: 1100px) {
    #main-reports {
        grid-template-columns: 1fr;
        grid-template-rows: 45% 1fr;
    }

    .report-editor-grid {
        grid-template-columns: 1fr;
    }

    #reports-filters {
        grid-template-columns: 1fr;
    }
}