body {
    font-family: "Poppins", sans-serif !important;
    font-size: 9pt !important;
    margin: 0;
    padding: 0;
    height: 100%;
    overflow-y: auto;
    background: linear-gradient(135deg, #172647 0%, #20314d 50%, #13244d 100%);
    /* background-image: url('../images/background.jpg'); */
    background-size: cover;
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    color: white !important;
}

.mt-15 {
    margin-top: 90px !important;
}

.vh-100-custom {
    height: 90vh !important;
}

.fs-10pt {
    font-size: 10pt !important;
}

/* ==========================================================================
                                    Sidebar
   ========================================================================== */

.offcanvas {
    background-color: rgba(255, 255, 255, 0.2) !important;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    margin: 0.5rem 1rem;
    border-radius: 2rem;
    outline: 1px solid rgba(255, 255, 255, 0.7);
}

.custom-navbar {
    background: linear-gradient(30deg, rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.3));
    border-radius: 3rem;
    border: 2px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-shadow: 0 0px 10px rgba(255, 255, 255, 0.5);
    margin: 0.5rem 1rem;
}

.btn-glass {
    background: linear-gradient(30deg, rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.3));
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    border-radius: 2rem !important;
    padding: 0.5rem 1rem;
    color: white;
    text-decoration: none;
    box-shadow: rgba(255, 255, 255, 0.3) 0px 0px 5px;
    font-weight: bold !important;
    text-shadow: 0 0 5px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease !important;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    font-size: 12pt !important;
}

.btn-glass:hover {
    box-shadow: 0 0px 20px rgba(255, 255, 255, 0.3);
    text-decoration: none;
    color: #fff;
    transition: all 0.3s ease !important;
}

.btn-glass:checked {
    background: rgba(0, 0, 0, 0.6);
    border-color: rgba(0, 0, 0, 0.6);
    color: #fff;
    transition: all 0.3s ease !important;
}

.btn-x {
    padding: 0.25rem 0.7rem !important;
}

.sm-btn {
    padding: 0.3rem 0.7rem;
}

.input {
    width: 100%;
    /* darker, higher contrast while keeping glass vibe */
    background: rgba(15, 23, 42, 0.92);
    color: #EAF2FF;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 2rem;
    padding: 6px 20px;
    box-sizing: border-box;
    transition: all 0.3s ease;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-shadow:
        0 0 0 2px rgba(255, 255, 255, 0.06) inset,
        0 6px 20px rgba(0, 0, 0, 0.35);
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.6);
    font-weight: 500;
}

.input:focus {
    outline: 2px solid #7DD3FC;
    outline-offset: 0;
    box-shadow:
        0 0 0 3px rgba(125, 211, 252, 0.35),
        0 6px 20px rgba(0, 0, 0, 0.35);
    border-color: rgba(255, 255, 255, 0.35);
}

.input::placeholder {
    color: rgba(255, 255, 255, 0.8);
}

.text-shadow {
    text-shadow: 0 0 5px rgba(0, 0, 0, 0.3);
}

.container-fluid {
    margin-top: 20px;
}

h2 {
    text-align: center;
    color: #ffffff;
}

/* =====================================================
   Radio Buttons Set 2
   ===================================================== */
.glass-radio-group-2 {
    --bg: rgba(255, 255, 255, 0.06);
    --text: #e5e5e5;
    display: flex;
    position: relative;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.3));
    border-radius: 3rem;
    backdrop-filter: blur(16px);
    box-shadow:
        inset 1px 1px 4px rgba(255, 255, 255, 0.2),
        inset -1px -1px 6px rgba(0, 0, 0, 0.3),
        0 4px 12px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    width: 100%;
    max-width: 500px;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.glass-radio-group-2 input {
    display: none;
}

.glass-radio-group-2 label {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 80px;
    font-size: 14px;
    padding: 0.8rem 1.6rem;
    cursor: pointer;
    font-weight: 600;
    letter-spacing: 0.3px;
    position: relative;
    z-index: 2;
    transition: color 0.3s ease-in-out;
    white-space: nowrap;
}

.glass-glider-2 {
    position: absolute;
    top: 0;
    bottom: 0;
    width: calc(100% / 4);
    border-radius: 3rem;
    z-index: 1;
    transition:
        transform 0.5s cubic-bezier(0.37, 1.95, 0.66, 0.56),
        background 0.4s ease-in-out,
        box-shadow 0.4s ease-in-out;
}

/* ==========================================================================
   Radius Table
   ========================================================================== */

.glass-table {
    background: linear-gradient(30deg, rgba(42, 42, 42, 0.3), rgba(42, 42, 42, 0.1), rgba(42, 42, 42, 0.2), rgba(42, 42, 42, 0.1), rgba(42, 42, 42, 0.3)) !important;
    width: 98vw !important;
    max-width: 98vw !important;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 4rem;
    overflow-x: auto !important;
    box-shadow: 0 4px 24px rgba(255, 255, 255, 0.12), 0 1.5px 8px rgba(0, 0, 0, 0.18) !important;
    backdrop-filter: blur(16px) !important;
    -webkit-backdrop-filter: blur(16px) !important;
    color: #ffffff !important;
    border-radius: 1rem !important;
}

.table th,
.glass-table th {
    background: rgba(30, 30, 30, 0.45);
    color: white;
    border-bottom: 2px solid rgba(255, 255, 255, 0.3);
    text-shadow: 0 0 5px rgba(0, 0, 0, 0.3);
    font-size: 12px;
    padding: 1rem !important;
}

.glass-table th,
.glass-table td {
    background: rgba(30, 30, 30, 0.45) !important;
    color: #e0e0e0 !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12) !important;
    text-shadow: 0 0 5px rgba(0, 0, 0, 0.3) !important;
}

thead,
thead tr {
    border-top-left-radius: 1rem !important;
    border-top-right-radius: 1rem !important;
}

thead tr th:first-child {
    border-top-left-radius: 1rem !important;
}

thead tr th:last-child {
    border-top-right-radius: 1rem !important;
}

tbody tr:last-child td:first-child {
    border-bottom-left-radius: 1rem !important;
}

tbody tr:last-child td:last-child {
    border-bottom-right-radius: 1rem !important;
}

.table td,
.glass-table td {
    background: rgba(0, 0, 0, 0.25);
    color: #e0e0e0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    text-shadow: 0 0 3px rgba(0, 0, 0, 0.2);
    font-size: 12px;
    padding-top: 1rem !important;
    padding-bottom: 1rem !important;
}

.glass-table td {
    background: rgba(0, 0, 0, 0.25) !important;
    color: #e0e0e0 !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
    text-shadow: 0 0 3px rgba(0, 0, 0, 0.2) !important;
}

/* Remove Bootstrap's default table background */
.glass-table,
.table-hover {
    background: transparent !important;
}

th,
td {
    white-space: normal;
    padding: 8px;
    text-align: left;
    overflow: hidden;
    text-overflow: ellipsis;
    word-wrap: break-word;
}

.table-wrapper {
    height: 100vh;
    overflow-y: auto;
    padding-bottom: 20px;
    overflow-x: auto;
}

.horizontal-scrollbar {
    overflow-x: auto;
    width: 100%;
    margin-bottom: 10px;
}

.table th:nth-child(1),
.table td:nth-child(1) {
    width: 200px;
}

.table th:nth-child(2),
.table td:nth-child(2) {
    width: 150px;
}

.table th:nth-child(3),
.table td:nth-child(3) {
    width: 100px;
}

.table th:nth-child(4),
.table td:nth-child(4) {
    width: 100px;
}

.table th:nth-child(5),
.table td:nth-child(5) {
    width: 100px;
}

.table th:nth-child(6),
.table td:nth-child(6) {
    width: 100px;
}

.table th:nth-child(7),
.table td:nth-child(7) {
    width: 100px;
}

.table th:nth-child(8),
.table td:nth-child(8) {
    width: 100px;
}

.table th:nth-child(9),
.table td:nth-child(9) {
    width: 100px;
}

.table th:nth-child(10),
.table td:nth-child(10) {
    width: 100px;
}

.table th:nth-child(11),
.table td:nth-child(11) {
    width: 100px;
}

.table th:nth-child(12),
.table td:nth-child(12) {
    width: 100px;
}

.table th:nth-child(13),
.table td:nth-child(13) {
    width: 100px;
}

.table th:nth-child(14),
.table td:nth-child(14) {
    width: 100px;
}

.table th:nth-child(15),
.table td:nth-child(15) {
    width: 100px;
}

.clear-btn {
    position: absolute;
    top: 50%;
    right: 6px;
    transform: translateY(-50%);
    border: none;
    background: transparent;
    font-size: 12px;
    cursor: pointer;
    color: #aaa;
    line-height: 1;
}

.clear-btn:hover {
    color: #fff;
}

.button-group {
    display: flex;
    align-items: center;
    padding: 5px;
    min-width: max-content;
}

.button-group .btn {
    margin-left: 5px;
    font-size: 11px;
    padding: 4px 10px;
}

.btn-secondary {
    background-color: #6c757d;
    color: white;
}

/* Glass Checkbox Styling */
.glass-checkbox {
    position: relative;
    display: inline-block;
    padding-left: 28px;
    margin-right: 12px;
    cursor: pointer;
    font-size: 14px;
    color: #e0e0e0;
    user-select: none;
}

.glass-checkbox input[type="checkbox"] {
    opacity: 0;
    position: absolute;
    left: 0;
    top: 0;
    height: 20px;
    width: 20px;
    cursor: pointer;
}

.glass-checkbox .checkmark {
    position: absolute;
    left: 0;
    top: 0;
    height: 20px;
    width: 20px;
    background: linear-gradient(135deg, rgba(42, 42, 42, 0.3), rgba(42, 42, 42, 0.1));
    border-radius: 6px;
    border: 1.5px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 2px 8px rgba(255, 255, 255, 0.15);
    transition: background 0.3s, box-shadow 0.3s;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.glass-checkbox input[type="checkbox"]:checked~.checkmark {
    background: linear-gradient(135deg, rgba(0, 150, 255, 0.4), rgba(42, 42, 42, 0.3));
    box-shadow: 0 0 8px rgba(0, 150, 255, 0.3);
    border-color: #00aaff;
}

.glass-checkbox .checkmark:after {
    content: "";
    position: absolute;
    display: none;
}

.glass-checkbox input[type="checkbox"]:checked~.checkmark:after {
    display: block;
}

.glass-checkbox .checkmark:after {
    left: 6px;
    top: 2px;
    width: 6px;
    height: 12px;
    border: solid #fff;
    border-width: 0 3px 3px 0;
    transform: rotate(45deg);
}

/* Modal Styling */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
}

.modal-content {
    background-color: #1e1e1e;
    margin: 10% auto;
    padding: 25px;
    border-radius: 5px;
    width: 60%;
    max-width: 600px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.close {
    color: #aaa;
    float: right;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover {
    color: #fff;
}

#ping-output {
    font-family: 'Courier New', monospace;
    white-space: pre-wrap;
    background: #2a2a2a;
    padding: 15px;
    border-radius: 4px;
    margin: 15px 0;
    max-height: 300px;
    overflow-y: auto;
    color: #e0e0e0;
}

.modal-footer {
    text-align: right;
    margin-top: 20px;
}

.modal-footer button {
    background-color: #6c757d;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
}

.modal-footer button:hover {
    background-color: #5a6268;
}

/* Page Size Dropdown */
.page-size-container {
    position: fixed;
    bottom: 10px;
    right: 10px;
    background: linear-gradient(30deg, rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.3));
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 5px 10px;
    border-radius: 3rem;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
    z-index: 100;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.page-size-container label {
    margin-right: 5px;
    font-size: 13px;
    color: white;
    text-shadow: 0 0 5px rgba(0, 0, 0, 0.6);
    font-weight: bold;
}

.page-size-container select {
    padding: 0.2rem 0.5rem;
    font-size: 13px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 3rem;
    background: linear-gradient(30deg, rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.3));
    color: white;
    box-shadow: rgba(255, 255, 255, 0.5) 0px 0px 5px;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    font-weight: bold;
    text-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
}

/* Header bar styling */
.d-flex.justify-content-between.align-items-center.p-3.bg-dark.text-white {
    background-color: #1f1f1f !important;
}

.btn-outline-light {
    color: #ddd;
    border-color: #555;
}

.btn-outline-light:hover {
    background-color: #333;
    color: #fff;
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 9999;
}

.modal-content {
    background-color: #1e1e1e;
    margin: 10% auto;
    padding: 20px;
    border-radius: 8px;
    width: 60%;
    max-height: 70vh;
    overflow-y: auto;
    color: white;
    font-family: monospace;
    font-size: 16px;
    font-weight: bold;
}

.modal-pre {
    white-space: pre-wrap;
    word-wrap: break-word;
}

.close-btn {
    float: right;
    font-size: 24px;
    cursor: pointer;
    color: white;
}

/* ----------------------------Radio Button--------------------------------- */

.glass-radio-group {
    --bg: rgba(255, 255, 255, 0.06);
    --text: #e5e5e5;
    display: flex;
    position: relative;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.3));
    border-radius: 3rem;
    backdrop-filter: blur(12px);
    box-shadow:
        inset 1px 1px 4px rgba(255, 255, 255, 0.2),
        inset -1px -1px 6px rgba(0, 0, 0, 0.3),
        0 4px 12px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    width: 100%;
    max-width: 300px;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.glass-radio-group input {
    display: none;
}

.glass-radio-group label {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 80px;
    font-size: 14px;
    padding: 0.8rem 1.6rem;
    cursor: pointer;
    font-weight: 600;
    letter-spacing: 0.3px;
    color: white;
    position: relative;
    z-index: 2;
    transition: color 0.3s ease-in-out;
}

.glass-radio-group label:hover {
    color: white;
}

.glass-radio-group input:checked+label {
    color: #fff;
}

.glass-glider {
    position: absolute;
    top: 0;
    bottom: 0;
    width: calc(100% / 2);
    border-radius: 3rem;
    z-index: 1;
    transition:
        transform 0.5s cubic-bezier(0.37, 1.95, 0.66, 0.56),
        background 0.4s ease-in-out,
        box-shadow 0.4s ease-in-out;
}

.card-glass {
    background: linear-gradient(30deg, rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.3));
    border-radius: 3rem;
    border: 2px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-shadow: 0 0px 10px rgba(255, 255, 255, 0.5);
    color: white !important;
}

/* ---- Select dropdown menu colors (options) ---- */
select.input option {
    background: #0B132B;
    /* very dark navy */
    color: #EAF2FF;
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.6);
}

select.input option:checked,
select.input option:hover {
    background: #1E293B;
    color: #FFFFFF;
}

/* Labels on the glass card a touch clearer */
.card-glass label {
    color: #EAF2FF;
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.6);
}

/* ---- Terminal look for command output ---- */
.terminal {
    background: #0B1020;
    /* near-black navy */
    color: #E6F3FF;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    padding: 14px 16px;
    font: 500 13px/1.45 ui-monospace, SFMono-Regular, Menlo, Monaco,
        Consolas, "Liberation Mono", "Courier New", monospace;
    white-space: pre;
    /* show SSH text exactly */
    overflow: auto;
    max-height: 420px;
    box-shadow:
        inset 0 8px 24px rgba(0, 0, 0, 0.5),
        0 6px 20px rgba(0, 0, 0, 0.35);
}

/* nicer scrollbars (Chromium/WebKit) */
.terminal::-webkit-scrollbar {
    height: 8px;
    width: 8px;
}

.terminal::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 8px;
}

/* ----- Form readability upgrades ----- */
.card-glass label {
    display: block;
    /* puts label on its own line */
    font-size: 12pt;
    /* larger label text */
    font-weight: 600;
    margin-bottom: 6px;
    /* space under each label */
    color: #EAF2FF;
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.6);
}

/* consistent vertical rhythm between inputs */
.card-glass .form-group {
    margin-bottom: 16px;
    /* space between stacked fields */
}

/* radio line breathing room */
.card-glass .form-check-inline {
    margin-right: 18px;
    margin-bottom: 8px;
}

.card-glass .form-check-label {
    font-size: 11pt;
}

/* input/select size + padding (works for <input> and <select class="input">) */
.input {
    padding: 10px 18px !important;
    /* taller, wider interior */
    line-height: 1.35;
    /* avoids “crammed” text */
    font-size: 11pt;
    /* match body size */
}

/* clearer placeholder text */
.input::placeholder {
    color: rgba(234, 242, 255, 0.8);
}

#stop-trafw {
    vertical-align: middle;
}

/* Align Run / Stop nicely on one line */
.button-row {
    display: inline-flex;
    gap: 12px;
    align-items: center;
}

/* Align Run / Stop nicely on one line */
.button-row {
    display: inline-flex;
    gap: 12px;
    align-items: center;
}

/* Bigger, clearer terminal just while trafw is active */
.terminal.trafw-mode {
    font-size: 16px;
    /* larger only for trafw */
    line-height: 1.6;
}

/* Colored, readable trafw line styling */
.trafw-line .ts {
    opacity: 0.8;
    margin-right: 6px;
}

.trafw-line .dir.down {
    font-weight: 600;
}

.trafw-line .dir.up {
    font-weight: 600;
}

.trafw-line .down,
.trafw-line .down-val {
    color: #22c55e;
}

/* green */
.trafw-line .up,
.trafw-line .up-val {
    color: #ef4444;
}

/* red */

/* Make the PPP user field look like the big select with an arrow */
.select-combo {
    position: relative;
    /* let the wrapper carry the input styling look */
    border-radius: 9999px;
    /* same rounded pill look */
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.12) inset, 0 8px 30px rgba(0, 0, 0, 0.35);
    background: rgba(12, 18, 34, 0.85);
    /* match your .input background tone */
}

.select-combo .combo-input {
    width: 100%;
    border: none;
    background: transparent;
    /* wrapper provides the look */
    padding-right: 48px;
    /* room for arrow button */
    height: 52px;
    /* match your select height */
    line-height: 52px;
    color: #e6eef7;
}

.select-combo .combo-input:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(64, 181, 255, 0.35) inset;
    border-radius: 9999px;
}

.select-combo .combo-arrow {
    position: absolute;
    top: 50%;
    right: 14px;
    transform: translateY(-50%);
    border: 0;
    background: transparent;
    color: #cfd7e6;
    font-size: 18px;
    /* same visual size as your select caret */
    line-height: 1;
    cursor: pointer;
    padding: 6px 4px;
    border-radius: 8px;
}

.select-combo .combo-arrow:hover {
    background: rgba(255, 255, 255, 0.06);
}

/* keep Run/Stop aligned (already added earlier, repeated for completeness) */
.button-row {
    display: inline-flex;
    gap: 12px;
    align-items: center;
}

/* trafw-only larger terminal styling (already present; safe if repeated) */
.terminal.trafw-mode {
    font-size: 16px;
    line-height: 1.6;
}

/* Select-like searchable combo for PPP User */
.select-combo.is-selectlike {
    position: relative;
    border-radius: 9999px;
    /* pill */
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.12) inset, 0 8px 30px rgba(0, 0, 0, 0.35);
    background: rgba(12, 18, 34, 0.85);
}

.select-combo.is-selectlike .combo-input {
    width: 100%;
    border: none;
    background: transparent;
    padding: 0 48px 0 18px;
    /* room for arrow */
    height: 52px;
    /* match your big select */
    line-height: 52px;
    color: #e6eef7;
    font-size: 16px;
    /* match Select Command text size */
}

.select-combo.is-selectlike .combo-input:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(64, 181, 255, 0.35) inset;
    border-radius: 9999px;
}

.select-combo.is-selectlike .combo-arrow {
    position: absolute;
    top: 50%;
    right: 14px;
    transform: translateY(-50%);
    border: 0;
    background: transparent;
    color: #cfd7e6;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    padding: 6px 4px;
    border-radius: 8px;
}

.select-combo.is-selectlike .combo-arrow:hover {
    background: rgba(255, 255, 255, 0.06);
}

/* dropdown list */
.select-combo.is-selectlike .combo-list {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 6px);
    display: none;
    /* toggled by JS */
    max-height: 320px;
    overflow: auto;
    border-radius: 18px;
    background: #0e1323;
    /* deep navy like your selects */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.08) inset;
    z-index: 50;
    padding: 6px 0;
}

.select-combo.is-selectlike .combo-item {
    padding: 10px 16px;
    color: #dbe7ff;
    font-size: 16px;
    cursor: pointer;
}

.select-combo.is-selectlike .combo-item:hover {
    background: rgba(255, 255, 255, 0.06);
}

/* keep Run/Stop aligned (already added earlier, safe if duplicated) */
.button-row {
    display: inline-flex;
    gap: 12px;
    align-items: center;
}

/* trafw-only terminal bump (already added earlier) */
.terminal.trafw-mode {
    font-size: 16px;
    line-height: 1.6;
}

/* Tom-select custom styling */
.ts-control {
    background: rgba(15, 23, 42, 0.92) !important;
    color: #ffffff !important;
    border: 1px solid rgba(255, 255, 255, 0.25) !important;
    border-radius: 2rem !important;
    padding: 10px 18px !important;
    box-sizing: border-box !important;
    transition: all 0.3s ease !important;
    backdrop-filter: blur(8px) !important;
    -webkit-backdrop-filter: blur(8px) !important;
    box-shadow:
        0 0 0 2px rgba(255, 255, 255, 0.06) inset,
        0 6px 20px rgba(0, 0, 0, 0.35) !important;
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.6) !important;
    font-weight: 500 !important;
}

.ts-control.plugin-drag.focus,
.ts-control.focus {
    outline: 2px solid #7DD3FC !important;
    outline-offset: 0 !important;
    box-shadow:
        0 0 0 3px rgba(125, 211, 252, 0.35),
        0 6px 20px rgba(0, 0, 0, 0.35) !important;
    border-color: rgba(255, 255, 255, 0.35) !important;
}

.ts-dropdown {
    background: #0B132B !important;
    color: #EAF2FF !important;
    border: 1px solid rgba(255, 255, 255, 0.25) !important;
    border-radius: 1rem !important;
    margin-top: 0.5rem !important;
}

.ts-dropdown .ts-option {
    color: #ffffff !important;
    padding: 10px 18px !important;
}

.ts-dropdown .ts-option:hover,
.ts-dropdown .ts-option.active {
    background: #1E293B !important;
    color: #FFFFFF !important;
}

#username-ts-control {
    font-size: 11pt !important;
    font-weight: 500 !important;
}

#username-ts-control::placeholder {
    color: rgba(255, 255, 255, 0.8);
}

#name-ts-control::placeholder {
    color: rgba(255, 255, 255, 0.8);
}

.badge {
    padding: 0.3rem 0.5rem !important;
    border-radius: 2rem !important;
    font-weight: 400 !important;
    font-size: 9pt !important
}

.badge.bg-danger {
    background-color: rgba(255, 42, 42, 0.5) !important;
    border: 1px solid rgba(255, 152, 152, 0.5) !important;
}

.badge.bg-warning {
    background-color: rgba(255, 216, 42, 0.5) !important;
    border: 1px solid rgba(255, 232, 131, 0.5) !important;
}

.badge.bg-success {
    background-color: rgba(85, 255, 42, 0.5) !important;
    border: 1px solid rgba(152, 255, 127, 0.5) !important;
}

.badge.bg-secondary {
    background-color: rgba(255, 255, 255, 0.3) !important;
    border: 1px solid rgba(255, 255, 255, 0.5) !important;
}

/* Radius search cells: equal-width flex items, all on one row on desktop */
.radius-search .search-cell {
    flex: 1 1 0;
    min-width: 80px;
}
.radius-search .search-cell .input {
    width: 100%;
}

/* ==========================================================================
   Mobile Responsiveness
   ========================================================================== */

@media (max-width: 767px) {

    /* Navbar: hide title text on small screens, shrink logo */
    .custom-navbar h2 {
        display: none !important;
    }

    .navbar-logo {
        height: 36px !important;
    }

    /* Forms using w-50 are too narrow on phones */
    .card-glass.w-50,
    .w-50.card-glass {
        width: 92% !important;
        max-width: 560px;
    }

    /* Login page w-50 inside flex container */
    .d-flex.vh-100 .w-50 {
        width: 92% !important;
    }

    /* new_user page (container > form.w-50.mx-auto) */
    .container .w-50.mx-auto {
        width: 92% !important;
    }

    /* Tables: block display so overflow-x scrolling works */
    .glass-table {
        display: block !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch;
        width: 100% !important;
        max-width: 100% !important;
    }

    /* Modals */
    .modal-content {
        width: 94% !important;
        margin: 12% auto !important;
        font-size: 14px;
    }

    /* Radio groups: full width on mobile */
    .glass-radio-group,
    .glass-radio-group-2 {
        max-width: 100% !important;
    }

    /* Reduce top spacing — navbar is shorter on mobile */
    .mt-15 {
        margin-top: 65px !important;
    }

    /* Navbar button / glass button size */
    .btn-glass {
        font-size: 10pt !important;
        padding: 0.4rem 0.8rem;
    }

    /* Search/filter forms — stack columns full width on mobile */
    .card-glass .row>[class*="col-md"] {
        flex: 0 0 100% !important;
        max-width: 100% !important;
        width: 100% !important;
    }

    /* Ticket table scroll wrapper */
    .ticket-table-wrapper {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        width: 100%;
    }

    .ticket-table-wrapper .glass-table {
        width: max-content !important;
        max-width: none !important;
        min-width: 100%;
    }

    /* Page size widget */
    .page-size-container {
        padding: 3px 8px;
        font-size: 11px;
    }

    /* Offcanvas sidebar fits smaller screens */
    .offcanvas {
        margin: 0.25rem 0.5rem;
        border-radius: 1.5rem;
    }

    /* Prevent page-level horizontal overflow that breaks fixed navbar */
    body {
        overflow-x: hidden;
        max-width: 100vw;
    }

    /* Navbar: full-width on mobile, rounded only on bottom corners */
    .custom-navbar {
        margin: 0 !important;
        border-radius: 0 0 1.25rem 1.25rem !important;
        padding-left: 0.75rem !important;
        padding-right: 0.75rem !important;
    }

    /* Servers page: reduce card padding */
    .container.card-glass.p-5 {
        padding: 1.25rem !important;
    }

    /* Tickets page: tighten outer margins */
    .mt-5.pt-5 {
        margin-top: 1rem !important;
        padding-top: 4.5rem !important;
    }

    .mb-4.mx-4,
    .me-4 {
        margin-left: 0.5rem !important;
        margin-right: 0.5rem !important;
    }

    /* Grafana: form groups full width */
    .container .form-group {
        width: 100%;
    }

    /* Radius page controls: stack vertically */
    .radius-controls>.glass-radio-group,
    .radius-controls>.glass-radio-group-2 {
        max-width: 100% !important;
        width: 100% !important;
    }

    /* Shrink the 4-option status bar so all labels fit on one line */
    .glass-radio-group-2 label {
        font-size: 11px !important;
        padding: 0.6rem 0.4rem !important;
        min-width: 0 !important;
        letter-spacing: 0 !important;
    }

    /* Kill the min-width that blocks wrapping */
    .radius-controls .button-group,
    .button-group {
        min-width: 0 !important;
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
    }

    /* Action buttons: 2-per-row grid on mobile */
    .radius-controls .button-group .btn-glass {
        flex: 1 1 calc(50% - 0.5rem);
        text-align: center;
        justify-content: center;
    }

    /* Radius search inputs: 2 per row on mobile */
    .radius-search .search-cell {
        flex: 0 0 calc(50% - 0.5rem);
        max-width: calc(50% - 0.5rem);
    }

    .radius-search .search-cell .input {
        width: 100%;
    }

    /* Pagination: wrap and shrink on mobile */
    .pagination {
        flex-wrap: wrap !important;
        justify-content: center !important;
        max-width: 100vw !important;
        padding: 0 0.5rem !important;
        row-gap: 1.5rem !important;
    }

    .pagination .page-item {
        margin-bottom: 0 !important;
    }
}
/* ==========================================================================
                    Customer Picker (General Problem Tickets)
   ========================================================================== */

.customer-picker .ts-wrapper {
    width: 100%;
}

.customer-picker .ts-control {
    background: rgba(15, 23, 42, 0.92) !important;
    color: #EAF2FF !important;
    border: 1px solid rgba(255, 255, 255, 0.25) !important;
    border-radius: 1.5rem !important;
    padding: 6px 20px !important;
    box-shadow:
        0 0 0 2px rgba(255, 255, 255, 0.06) inset,
        0 6px 20px rgba(0, 0, 0, 0.35) !important;
    transition: all 0.3s ease;
}

.customer-picker .ts-wrapper.focus .ts-control {
    outline: 2px solid #7DD3FC;
    border-color: rgba(255, 255, 255, 0.35) !important;
}

.customer-picker .ts-control input,
.customer-picker .ts-control input::placeholder {
    color: rgba(255, 255, 255, 0.8) !important;
}

.customer-picker .ts-control > .item {
    background: linear-gradient(30deg, rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.3)) !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    border-radius: 2rem !important;
    color: #fff !important;
    padding: 2px 10px !important;
    margin: 2px 4px 2px 0 !important;
}

.customer-picker .ts-control > .item small {
    opacity: 0.75;
}

.customer-picker .ts-dropdown {
    background: rgba(15, 23, 42, 0.97);
    color: #EAF2FF;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 1rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
    overflow: hidden;
    margin-top: 4px;
}

.customer-picker .ts-dropdown .option {
    padding: 8px 16px;
    cursor: pointer;
}

.customer-picker .ts-dropdown .active {
    background: rgba(125, 211, 252, 0.25);
    color: #fff;
}

.customer-picker .customer-option {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.customer-picker .customer-option .customer-username {
    font-weight: 600;
}

.customer-picker .customer-option .customer-name {
    opacity: 0.75;
    font-size: 10pt;
    text-align: right;
}

.customer-picker .ts-dropdown .no-results,
.customer-picker .ts-dropdown .ts-loading {
    padding: 8px 16px;
    opacity: 0.75;
}
