
/* Used IP Address modal — isolated feature styles */
.used-ip-list-button {
    border-color: #17639b !important;
    background: #17639b !important;
    color: #fff !important;
}

.used-ip-list-button:hover {
    border-color: #0d4f83 !important;
    background: #0d4f83 !important;
}

.used-ip-modal[hidden] {
    display: none !important;
}

.used-ip-modal {
    position: fixed;
    z-index: 3000;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 20px;
}

.used-ip-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 35, 67, .55);
    backdrop-filter: blur(3px);
}

.used-ip-dialog {
    position: relative;
    z-index: 1;
    display: flex;
    width: min(1120px, 96vw);
    max-height: min(760px, 90vh);
    flex-direction: column;
    overflow: hidden;
    border: 1px solid #cbd8e5;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 25px 70px rgba(15, 35, 67, .30);
}

.used-ip-dialog-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 16px 18px;
    border-bottom: 1px solid #dce5ee;
    background: #102447;
    color: #fff;
}

.used-ip-dialog-header h2 {
    margin: 0;
    color: #fff;
    font-size: 20px;
}

.used-ip-dialog-header span {
    display: block;
    margin-top: 3px;
    color: #cbd8e8;
    font-size: 11px;
}

.used-ip-close {
    display: grid;
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    place-items: center;
    padding: 0;
    border: 1px solid rgba(255,255,255,.22);
    border-radius: 9px;
    background: rgba(255,255,255,.08);
    color: #fff;
    font-size: 24px;
    cursor: pointer;
}

.used-ip-close:hover {
    background: rgba(255,255,255,.16);
}

.used-ip-tools {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 14px;
    padding: 12px 16px;
    border-bottom: 1px solid #e0e7ef;
    background: #f8fafc;
}

.used-ip-search {
    display: grid;
    width: min(460px, 100%);
    gap: 5px;
}

.used-ip-search span {
    color: #475467;
    font-size: 10px;
    font-weight: 800;
}

.used-ip-search input {
    width: 100%;
    min-height: 40px;
    padding: 8px 11px;
    border: 1px solid #bdccda;
    border-radius: 8px;
    background: #fff;
    color: #172033;
    font: inherit;
    font-size: 13px;
    outline: none;
}

.used-ip-search input:focus {
    border-color: #438fc2;
    box-shadow: 0 0 0 3px rgba(31,95,153,.12);
}

.used-ip-legend {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.used-ip-legend span {
    padding: 5px 8px;
    border-radius: 999px;
    font-size: 9px;
    font-weight: 850;
}

.used-ip-legend .online {
    background: #dcf8e7;
    color: #08783a;
}

.used-ip-legend .offline {
    background: #ffe0e3;
    color: #c90015;
}

.used-ip-legend .unknown {
    background: #e9edf2;
    color: #52647a;
}

.used-ip-table-wrap {
    overflow: auto;
    flex: 1;
}

.used-ip-table {
    width: 100%;
    min-width: 850px;
    border-collapse: collapse;
    background: #fff;
}

.used-ip-table thead {
    position: sticky;
    z-index: 2;
    top: 0;
}

.used-ip-table th {
    padding: 11px 12px;
    border-bottom: 1px solid #243a5b;
    background: #172e52;
    color: #fff;
    font-size: 10px;
    font-weight: 850;
    text-align: left;
    white-space: nowrap;
}

.used-ip-table td {
    padding: 10px 12px;
    border-bottom: 1px solid #dde6ee;
    color: #263247;
    font-size: 12px;
    vertical-align: middle;
}

.used-ip-table tbody tr:nth-child(even) {
    background: #f8fafc;
}

.used-ip-table tbody tr:hover {
    background: #eef6fc;
}

.used-ip-order {
    width: 50px;
    color: #667085 !important;
    text-align: center;
}

.used-ip-device-name {
    color: #102447 !important;
    font-weight: 800;
}

.used-ip-copy {
    padding: 0;
    border: 0;
    background: transparent;
    color: #075f9b;
    font: inherit;
    font-weight: 850;
    cursor: pointer;
}

.used-ip-copy:hover {
    color: #0a4772;
    text-decoration: underline;
}

.used-ip-copy.copied {
    color: #07883f;
}

.used-ip-status {
    display: inline-flex;
    min-width: 92px;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 5px 8px;
    border-radius: 999px;
    font-size: 9px;
    font-weight: 900;
}

.used-ip-status i {
    width: 7px;
    height: 7px;
    border-radius: 50%;
}

.used-ip-status.online {
    border: 1px solid #0a8d43;
    background: #e9fbf0;
    color: #08783a;
}

.used-ip-status.online i {
    background: #0a8d43;
}

.used-ip-status.offline {
    border: 1px solid #dc1426;
    background: #fff0f1;
    color: #c90015;
}

.used-ip-status.offline i {
    background: #dc1426;
}

.used-ip-status.unknown {
    border: 1px solid #738196;
    background: #f0f3f6;
    color: #52647a;
}

.used-ip-status.unknown i {
    background: #738196;
}

.used-ip-checked {
    color: #526174 !important;
    white-space: nowrap;
}

.used-ip-empty {
    padding: 30px;
    color: #667085;
    text-align: center;
}

.used-ip-dialog-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 11px 16px;
    border-top: 1px solid #dce5ee;
    background: #f8fafc;
}

.used-ip-dialog-footer span {
    color: #667085;
    font-size: 10px;
}

.used-ip-dialog-footer button {
    min-height: 36px;
    padding: 0 15px;
    border: 1px solid #17639b;
    border-radius: 8px;
    background: #17639b;
    color: #fff;
    font-weight: 850;
    cursor: pointer;
}

body.used-ip-modal-open {
    overflow: hidden;
}

@media (max-width: 700px) {
    .used-ip-modal {
        align-items: end;
        padding: 0;
    }

    .used-ip-dialog {
        width: 100%;
        max-height: 88vh;
        border-right: 0;
        border-bottom: 0;
        border-left: 0;
        border-radius: 18px 18px 0 0;
    }

    .used-ip-dialog-header {
        padding: 13px 14px;
    }

    .used-ip-dialog-header h2 {
        font-size: 16px;
    }

    .used-ip-tools {
        display: block;
        padding: 10px 12px;
    }

    .used-ip-legend {
        margin-top: 8px;
    }

    .used-ip-table {
        min-width: 760px;
    }

    .used-ip-dialog-footer span {
        display: none;
    }

    .used-ip-dialog-footer button {
        width: 100%;
    }
}


/* =========================================================
   IP range allocation states: 192.168.140.150 - .254
   ========================================================= */

.used-ip-legend .available {
    background: #dff3ff;
    color: #075f9b;
}

.used-ip-legend .conflict {
    background: #f3e5ff;
    color: #7a2ca6;
}

.used-ip-status.available {
    border: 1px solid #1888c9;
    background: #e8f6ff;
    color: #075f9b;
}

.used-ip-status.available i {
    background: #1888c9;
}

.used-ip-status.conflict {
    border: 1px solid #8b3fbd;
    background: #f7edff;
    color: #7629a4;
}

.used-ip-status.conflict i {
    background: #8b3fbd;
}

.ip-allocation-row.available {
    background: #f0f9ff !important;
}

.ip-allocation-row.available:hover {
    background: #e2f4ff !important;
}

.ip-allocation-row.available .used-ip-copy {
    color: #1476ad;
}

.ip-allocation-row.available .used-ip-device-name {
    color: #1476ad !important;
    font-weight: 800;
}

.ip-allocation-row.online {
    background: #f1fcf5 !important;
}

.ip-allocation-row.online:hover {
    background: #e5f8ec !important;
}

.ip-allocation-row.offline {
    background: #fff1f2 !important;
}

.ip-allocation-row.offline:hover {
    background: #ffe3e6 !important;
}

.ip-allocation-row.unknown {
    background: #f5f7fa !important;
}

.ip-allocation-row.conflict {
    background: #fbf2ff !important;
}

.ip-allocation-row.conflict:hover {
    background: #f4e3fc !important;
}

.ip-conflict-count {
    display: inline-block;
    margin-left: 6px;
    padding: 2px 6px;
    border-radius: 999px;
    background: #8b3fbd;
    color: #fff;
    font-size: 8px;
    font-weight: 900;
}


.used-ip-legend .occupied {
    background: #fff0cc;
    color: #8a5100;
}

.used-ip-legend .unchecked {
    background: #eceff3;
    color: #4c596b;
}

.used-ip-status.occupied {
    border: 1px solid #d98300;
    background: #fff4d9;
    color: #8a5100;
}

.used-ip-status.occupied i {
    background: #d98300;
}

.used-ip-status.unchecked {
    border: 1px solid #7b8798;
    background: #f1f3f6;
    color: #4c596b;
}

.used-ip-status.unchecked i {
    background: #7b8798;
}

.ip-allocation-row.occupied {
    background: #fff9e9 !important;
}

.ip-allocation-row.occupied:hover {
    background: #fff1c8 !important;
}

.ip-allocation-row.unchecked {
    background: #f5f7fa !important;
}

.ip-allocation-row.unchecked:hover {
    background: #e9edf2 !important;
}

.used-ip-latency {
    color: #40516a !important;
    white-space: nowrap;
}
