/* ================= GLOBAL RESET ================= */
* {
    box-sizing: border-box;
}

body {
    background: #000000;
    color: #eee;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    margin: 0;
    padding: 15px;
    font-size: 11px;
}

body.login-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

/* ================= HEADERS & NAVIGATION ================= */
h2 {
    margin: 0;
    font-weight: 600;
    font-size: 16px;
}

.header,
.header-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px;
    gap: 10px;
    flex-wrap: wrap;
}

.top-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.top-actions a {
    text-decoration: none;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
}

/* ================= GRID & CARDS ================= */
.grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.card {
    background: #000000;
    padding: 8px;
    /* Optimized from duplicate section */
    border-radius: 12px;
    border: 1px solid #2a2a2a;
    transition: all 0.25s ease;
}

.card:hover {
    transform: translateY(-3px);
}

.card-latest {
    border: 1px solid #52c41a;
    box-shadow: 0 0 12px rgba(82, 196, 26, 0.35);
}

.card-old {
    border: 1px solid #ff4d4f;
    box-shadow: 0 0 12px rgba(255, 77, 79, 0.35);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px;
    color: #4fc3f7;
}

.card-header h3 {
    margin: 0;
    font-size: 14px;
}

.host-info {
    font-size: 12px;
    margin-bottom: 2px;
    color: #db0;
}

/* ================= TABLE ================= */
.table-wrapper {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
    min-width: 600px;
    background: #000000;
}

th,
td {
    padding: 10px;
    border-bottom: 1px solid #27272a;
    text-align: left;
    font-size: 11px;
    background: #000000;
}

th {
    background: #000000;
    color: #aaa;
    text-transform: uppercase;
}

tr:hover td {
    background: #0d0d0e;
}

table thead th {
    position: sticky;
    top: 0;
    background: #000000;
    z-index: 2;
}

/* ================= FORMS & BUTTONS ================= */
input,
select,
textarea {
    background: #2a2a2a;
    color: #eee;
    border: 1px solid #333;
    border-radius: 6px;
    padding: 8px 10px;
    font-size: 12px;
    outline: none;
    transition: all 0.2s ease;
}

input:focus,
select:focus,
textarea:focus {
    border-color: #28a745;
}

button {
    padding: 6px 12px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    font-size: 11px;
}

.btn-primary,
.btn-save,
.btn-add,
.btn-login {
    background: #28a745;
    color: #fff;
}

.login-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    background: #000000;
}

.login-card {
    background: #1e1e1e;
    padding: 20px;
    border-radius: 10px;
    width: 300px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.login-card h2 {
    margin-bottom: 15px;
    color: #fff;
}

.login-card input {
    width: 100%;
    padding: 10px;
    margin-bottom: 10px;
    border: none;
    border-radius: 6px;
}

.btn-login {
    width: 100%;
    padding: 10px;
    background: #22c55e;
    border: none;
    border-radius: 6px;
    font-weight: bold;
    cursor: pointer;
}

.error-box {
    background: #dc2626;
    padding: 10px;
    border-radius: 6px;
    margin-bottom: 10px;
    color: #fff;
}

.btn-edit,
.btn-refresh {
    background: #17a2b8;
    color: #fff;
}

.btn-delete,
.btn-confirm {
    background: #dc3545;
    color: #fff;
}

.btn-back,
.users-btn,
.back-btn {
    background: #27272a;
    color: #e4e4e7;
    border: 1px solid #3f3f46;
}

.logout-btn {
    background: rgba(239, 68, 68, 0.1);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.25);
}

/* ================= BADGES & STATUS ================= */
.badge {
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 10px;
    background: #333;
}

.badge.active {
    background: #28a745;
    color: #fff;
}

.badge.local {
    background: #6c757d;
}

.badge.remote {
    background: #007bff;
}

.status-badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
}

.online {
    background: #28a745;
    color: #fff;
}

.offline {
    background: #444;
    color: #aaa;
}

/* ================= PORTS & ICONS ================= */
.port-row {
    display: flex;
    gap: 3px;
    /* Beri jarak agak lebar agar badge tidak tabrakan */
    margin-top: 8px;
    align-items: center;
}

.connect-icon {
    position: relative;
    text-decoration: none;
    color: #28a745;
    opacity: 0.8;
    transition: 0.2s;
}

.connect-icon:hover {
    transform: scale(1.2);
    opacity: 1;
}

.connect-icon.active {
    opacity: 1;
    filter: drop-shadow(0 0 5px #52c41a);
}

/* ================= MODAL & TOAST ================= */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(6px);
    justify-content: center;
    align-items: center;
    z-index: 9999;
    animation: fadeIn 0.2s ease forwards;
}

.modal-content {
    background: #000000;
    padding: 28px 30px;
    border-radius: 16px;
    text-align: center;
    width: 90%;
    max-width: 360px;
    border: 1px solid #27272a;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
    animation: popIn 0.2s ease forwards;
}

#toastContainer {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
}

.toast {
    background: #333;
    color: #fff;
    padding: 12px 16px;
    border-radius: 6px;
    margin-top: 10px;
}

.toast.success {
    background: #28a745;
}

.toast.error {
    background: #dc3545;
}

/* ================= RESPONSIVE ================= */
@media (max-width: 1024px) {
    .grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .grid {
        grid-template-columns: 1fr;
    }

    .header,
    .header-bar {
        flex-direction: column;
        align-items: flex-start;
    }

    table {
        min-width: 500px;
    }

    .card {
        padding: 12px;
    }
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes popIn {
    from {
        transform: scale(0.9);
    }

    to {
        transform: scale(1);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.forward-icon {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 16px;
}

.forward-modal-content {
    width: 90vw;
    max-width: 1200px;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    background: #000000;
    border: 1px solid #27272a;
    border-radius: 12px;
    padding: 24px;
    text-align: left;
}

.forward-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.forward-modal-header h3 {
    margin: 0;
    color: #fff;
    font-size: 16px;
    font-weight: 500;
}

.forward-close-icon {
    width: 30px;
    height: 30px;
    padding: 0;
    border: 0.5px solid #444;
    background: transparent;
    color: #aaa;
    font-size: 18px;
    line-height: 1;
}

.forward-close-icon:hover {
    background: #262626;
    color: #fff;
}

.forward-client-row,
.forward-form-row,
.forward-footer-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.forward-client-row {
    margin-bottom: 12px;
}

.forward-form-row {
    margin: 10px 0;
}

.forward-footer-actions {
    justify-content: flex-end;
    margin-top: 12px;
    flex: 0 0 auto;
}

.forward-rules-list {
    flex: 1 1 auto;
    min-height: 160px;
    max-height: 52vh;
    overflow: auto;
    margin-top: 10px;
    border: 0.5px solid #333;
    border-radius: 8px;
}

.forward-rules-list table {
    margin-top: 0 !important;
}

.forward-rules-list thead th {
    top: 0;
}

.forward-client-name {
    width: 300px;
    max-width: 100%;
    font-weight: 700;
    font-size: 12px;
}

.forward-action-btn {
    border: 0.5px solid transparent;
    border-radius: 6px;
    color: #fff;
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.forward-action-btn:hover {
    transform: translateY(-1px);
}

.forward-save-btn,
.forward-add-btn,
.forward-apply-btn {
    background: #3b82f6;
    border-color: #3b82f6;
}

.forward-save-btn:hover,
.forward-add-btn:hover,
.forward-apply-btn:hover {
    background: #2563eb;
    border-color: #2563eb;
}

.forward-tool-btn {
    background: #262626;
    border-color: #444;
    color: #ddd;
}

.forward-tool-btn:hover {
    background: #333;
    color: #fff;
}

.forward-clear-btn,
.forward-close-btn {
    background: transparent;
    border-color: #444;
    color: #aaa;
}

.forward-clear-btn:hover,
.forward-close-btn:hover {
    background: #262626;
    color: #fff;
}

.forward-delete-btn {
    background: #ef4444;
    border-color: #ef4444;
}

.forward-delete-btn:hover {
    background: #dc2626;
    border-color: #dc2626;
}

.users-form-card {
    background: #1a1a1a;
    border: 0.5px solid #333;
    border-radius: 12px;
    padding: 14px;
    margin-bottom: 12px;
}

.users-form-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.users-form-title {
    color: #fff;
    font-size: 13px;
    font-weight: 500;
    margin-right: 4px;
}

.users-action-btn {
    border: 0.5px solid transparent;
    border-radius: 6px;
    color: #fff;
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.users-action-btn:hover {
    transform: translateY(-1px);
}

.users-save-btn,
.users-edit-btn {
    background: #3b82f6;
    border-color: #3b82f6;
}

.users-save-btn:hover,
.users-edit-btn:hover {
    background: #2563eb;
    border-color: #2563eb;
}

.users-map-btn {
    background: #262626;
    border-color: #444;
    color: #ddd;
}

.users-map-btn:hover {
    background: #333;
    color: #fff;
}

.users-otp-btn {
    background: #d97706;
    border-color: #b45309;
    color: #fff;
}

.users-otp-btn:hover {
    background: #f59e0b;
    border-color: #d97706;
}

.users-delete-btn {
    background: #ef4444;
    border-color: #ef4444;
}

.users-delete-btn:hover {
    background: #dc2626;
    border-color: #dc2626;
}

.users-cancel-btn {
    background: transparent;
    border-color: #444;
    color: #aaa;
}

.users-cancel-btn:hover {
    background: #262626;
    color: #fff;
}

.users-row-actions {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.role-badge,
.otp-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    padding: 3px 8px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 600;
}

.role-admin {
    background: rgba(59, 130, 246, 0.16);
    border: 0.5px solid rgba(59, 130, 246, 0.45);
    color: #93c5fd;
}

.role-superadmin {
    background: rgba(14, 165, 233, 0.16);
    border: 0.5px solid rgba(14, 165, 233, 0.45);
    color: #7dd3fc;
}

.role-admingroup {
    background: rgba(217, 119, 6, 0.16);
    border: 0.5px solid rgba(217, 119, 6, 0.45);
    color: #fbbf24;
}

.role-viewer {
    background: rgba(82, 82, 91, 0.35);
    border: 0.5px solid #3f3f46;
    color: #d4d4d8;
}

.otp-on {
    background: rgba(34, 197, 94, 0.14);
    border: 0.5px solid rgba(34, 197, 94, 0.45);
    color: #86efac;
}

.otp-off {
    background: rgba(239, 68, 68, 0.14);
    border: 0.5px solid rgba(239, 68, 68, 0.45);
    color: #fca5a5;
}

.users-map-modal {
    background: #000000;
    border: 1px solid #27272a;
    border-radius: 12px;
    padding: 24px;
    text-align: left;
}

.users-map-modal h3 {
    margin: 0 0 12px;
    color: #fff;
    font-size: 16px;
    font-weight: 500;
}

.mapping-search {
    width: 100%;
    margin-bottom: 8px;
}

.mapping-client-list {
    max-height: 300px;
    overflow: auto;
    margin: 10px 0;
    padding-right: 4px;
}

.mapping-client-item {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 5px 0;
    padding: 6px 8px;
    border-radius: 6px;
    color: #ccc;
    background: #0a0a0a;
    border: 1px solid #27272a;
}

.mapping-client-item:hover {
    background: #18181b;
}

.users-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 14px;
}

/* ================= CLIENT MANAGEMENT UI ================= */
.clients-stats-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.clients-stat-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #000000;
    border: 1px solid #27272a;
    border-radius: 20px;
    padding: 5px 12px;
    font-size: 11px;
    color: #bbb;
    font-weight: 500;
}

.clients-stat-badge strong {
    color: #fff;
    font-weight: 700;
}

.clients-stat-badge.stat-online strong {
    color: #10b981;
}

.clients-stat-badge.stat-offline strong {
    color: #94a3b8;
}

.clients-stat-badge.stat-pending strong {
    color: #f59e0b;
}

.clients-stat-badge.stat-blocked strong {
    color: #ef4444;
}

.clients-filter-card {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    background: #000000;
    border: 1px solid #27272a;
    border-radius: 12px;
    padding: 12px 14px;
    margin-bottom: 12px;
}

.clients-filter-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.clients-filter-icon {
    color: #888;
    font-size: 12px;
}

.clients-search-wrapper {
    position: relative;
    flex: 1;
    min-width: 220px;
    display: flex;
    align-items: center;
}

.clients-search-icon {
    position: absolute;
    left: 10px;
    color: #666;
    font-size: 11px;
    pointer-events: none;
}

.clients-search {
    width: 100%;
    padding-left: 28px !important;
    background: #0a0a0a;
    border: 1px solid #27272a;
    border-radius: 6px;
    color: #eee;
    font-size: 12px;
    transition: all 0.2s ease;
}

.clients-search:focus {
    border-color: #3b82f6;
    background: #0d0d0e;
    outline: none;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

.clients-count-label {
    font-size: 11px;
    color: #888;
    margin-left: auto;
    white-space: nowrap;
}

.clients-no-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #18181b;
    border: 1px solid #27272a;
    color: #888;
    font-size: 11px;
    font-weight: 600;
}

.client-user-cell {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.client-username {
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
}

.client-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.3px;
    width: fit-content;
}

.client-status-pill.online {
    background: rgba(16, 185, 129, 0.15);
    border: 0.5px solid rgba(16, 185, 129, 0.4);
    color: #10b981;
}

.client-status-pill.online::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #10b981;
    box-shadow: 0 0 6px #10b981;
}

.client-status-pill.offline {
    background: rgba(148, 163, 184, 0.1);
    border: 0.5px solid rgba(148, 163, 184, 0.25);
    color: #94a3b8;
}

.client-status-pill.offline::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #64748b;
}

.clients-table-input,
.clients-status-select,
.clients-public-key {
    border: 1px solid #27272a;
    background: #0a0a0a;
    border-radius: 6px;
    color: #eee;
    font-size: 11.5px;
    padding: 6px 8px;
    transition: all 0.2s ease;
}

.clients-table-input:focus,
.clients-status-select:focus,
.clients-public-key:focus {
    border-color: #3b82f6;
    outline: none;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.15);
}

.clients-table-input {
    width: 140px;
    font-weight: 500;
}

.clients-machine-input {
    width: 150px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 11px;
}

.clients-status-select {
    width: 100px;
    font-weight: 600;
    text-transform: capitalize;
}

.clients-status-select[data-val="active"] {
    color: #10b981;
    border-color: rgba(16, 185, 129, 0.4);
}

.clients-status-select[data-val="pending"] {
    color: #f59e0b;
    border-color: rgba(245, 158, 11, 0.4);
}

.clients-status-select[data-val="blocked"] {
    color: #ef4444;
    border-color: rgba(239, 68, 68, 0.4);
}

.clients-pk-container {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 4px;
}

.clients-public-key {
    width: 180px;
    height: 38px;
    resize: vertical;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 10px;
    line-height: 1.3;
    word-break: break-all;
}

.clients-copy-icon-btn {
    background: #18181b;
    border: 1px solid #27272a;
    color: #aaa;
    border-radius: 4px;
    padding: 4px 6px;
    font-size: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.clients-copy-icon-btn:hover {
    background: #3b82f6;
    color: #fff;
    border-color: #3b82f6;
}

.clients-muted-cell {
    color: #888;
    font-size: 11px;
    white-space: nowrap;
    line-height: 1.4;
}

.clients-row-actions {
    display: inline-flex;
    gap: 5px;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
}

.clients-action-btn {
    border: 0.5px solid transparent;
    border-radius: 6px;
    color: #fff;
    width: 28px;
    height: 28px;
    padding: 0;
    font-size: 11.5px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.18s ease;
    white-space: nowrap;
    flex-shrink: 0;
}

.clients-action-btn:hover {
    transform: translateY(-1px);
}

.clients-action-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
    transform: none;
}

.clients-save-btn {
    background: #2563eb;
    border-color: #3b82f6;
}

.clients-save-btn:hover:not(:disabled) {
    background: #1d4ed8;
    border-color: #2563eb;
}

.clients-refresh-btn {
    background: #262626;
    border-color: #404040;
    color: #ddd;
}

.clients-refresh-btn:hover:not(:disabled) {
    background: #333;
    color: #fff;
    border-color: #555;
}

.clients-rules-btn {
    background: #312e81;
    border-color: #4338ca;
    color: #c7d2fe;
}

.clients-rules-btn:hover {
    background: #3730a3;
    color: #fff;
    border-color: #6366f1;
}

.clients-delete-btn {
    background: #7f1d1d;
    border-color: #991b1b;
    color: #fca5a5;
}

.clients-delete-btn:hover:not(:disabled) {
    background: #991b1b;
    color: #fff;
    border-color: #b91c1c;
}

.clients-disconnect-btn {
    background: #854d0e;
    border-color: #a16207;
    color: #fde047;
}

.clients-disconnect-btn:hover:not(:disabled) {
    background: #a16207;
    color: #fff;
    border-color: #ca8a04;
}

.clients-empty-state {
    padding: 48px 16px;
    text-align: center;
    color: #777;
}

.clients-empty-state i {
    font-size: 32px;
    margin-bottom: 10px;
    color: #555;
}

.clients-empty-state p {
    margin: 0;
    font-size: 13px;
}

.forward-rules-form-card {
    background: #1a1a1a;
    border: 0.5px solid #333;
    border-radius: 12px;
    padding: 14px;
    margin-bottom: 12px;
}

.forward-rules-form-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.forward-rules-form-title {
    color: #fff;
    font-size: 13px;
    font-weight: 500;
    margin-right: 4px;
}

.forward-rules-port-input {
    width: 110px;
}

.forward-rules-available-select {
    width: 120px;
}

.forward-rules-host-select {
    width: 140px;
}

.forward-rules-custom-host {
    width: 130px;
    display: none;
}

.forward-rules-port-suggest {
    display: none;
    align-items: center;
    gap: 6px;
}

.forward-rules-action-btn {
    border: 0.5px solid transparent;
    border-radius: 6px;
    color: #fff;
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.forward-rules-action-btn:hover {
    transform: translateY(-1px);
}

.forward-rules-save-btn,
.forward-rules-refresh-btn {
    background: #3b82f6;
    border-color: #3b82f6;
}

.forward-rules-save-btn:hover,
.forward-rules-refresh-btn:hover {
    background: #2563eb;
    border-color: #2563eb;
}

.forward-rules-neutral-btn {
    background: #262626;
    border-color: #444;
    color: #ddd;
}

.forward-rules-neutral-btn:hover {
    background: #333;
    color: #fff;
}

.forward-rules-delete-btn {
    background: #ef4444;
    border-color: #ef4444;
}

.forward-rules-delete-btn:hover {
    background: #dc2626;
    border-color: #dc2626;
}

.forward-rules-table-select,
.forward-rules-table-port,
.forward-rules-table-host,
.forward-rules-table-desc {
    border: 0.5px solid #333;
    background: #202020;
}

.forward-rules-table-select {
    min-width: 130px;
}

.forward-rules-table-port {
    width: 90px;
}

.forward-rules-table-host {
    width: 120px;
}

.forward-rules-table-desc {
    width: 220px;
}

.forward-rules-target-cell {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.forward-rules-row-actions {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.forward-rules-muted-cell {
    color: #888;
    white-space: nowrap;
}

.modern-link {
    text-decoration: none;
    color: #ebebeb;
    /* Abu-abu lebih soft */
    margin: 0 8px;
    font-weight: 500;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
}

.modern-link i {
    margin-right: 5px;
    font-size: 14px;
    transition: transform 0.3s ease;
}

/* Efek Hover Umum */
.modern-link:hover {
    text-decoration: none;
    transform: translateY(-1px);
    /* Efek sedikit naik saat hover */
}

/* Warna Spesifik Saat Hover */

/* Email: Merah lembut */
.modern-link.email-link:hover {
    color: #d93025;
}

.modern-link.email-link i {
    color: #888;
}

.modern-link.email-link:hover i {
    color: #d93025;
}

/* WhatsApp: Hijau Deep */
.modern-link.wa-link:hover {
    color: #128C7E;
}

.modern-link.wa-link i {
    color: #888;
}

.modern-link.wa-link:hover i {
    color: #25D366;
}

/* Telegram: Biru Sky */
.modern-link.tg-link:hover {
    color: #0077b5;
}

.modern-link.tg-link i {
    color: #888;
}

.modern-link.tg-link:hover i {
    color: #0088cc;
}

.icon-btn {
    position: relative;
    /* JANGKAR UNTUK BADGE */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    /* Ukuran kotak tombol yang konsisten */
    height: 28px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.05);
    /* Transparan premium */
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.2s ease;
    text-decoration: none;
}

.icon-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
}

/* Styling Badge Merah */
.port-badge {
    position: absolute;
    top: -6px;
    /* Keluar sedikit ke atas */
    right: -6px;
    /* Keluar sedikit ke kanan */
    background-color: #ff4d4f !important;
    /* Merah menyala */
    color: #ffffff !important;
    /* Tulisan putih */
    font-size: 9px;
    font-weight: bold;
    min-width: 15px;
    height: 15px;
    border-radius: 50%;
    /* Bulat sempurna */
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    z-index: 10;
    line-height: 1;
    padding: 2px;
}

/* Garis bawah icon agar lebih tajam */
.icon-btn i {
    filter: drop-shadow(0 0 2px rgba(0, 0, 0, 0.3));
}

.add-form {
    display: flex;
    flex-wrap: nowrap;
    /* Memaksa tetap 1 baris */
    align-items: center;
    /* Sejajar secara vertikal */
    gap: 10px;
    /* Jarak antar elemen */
    width: 100%;
    overflow-x: auto;
    /* Tambahkan scrollbar jika layar terlalu sempit */
    padding: 10px;
}

/* Pastikan elemen di dalamnya tidak memakan ruang berlebih */
.add-form input,
.add-form select,
.add-form button {
    flex-shrink: 0;
    /* Mencegah elemen menciut */
}

#description {
    flex-grow: 1;
    /* Mengambil sisa ruang yang ada */
    min-width: 150px;
    width: auto !important;
    /* Timpa inline style 100% jika ada */
}

.info-row {
    display: flex;
    align-items: flex-start;
    /* penting */
    gap: 6px;
}

.info-icon {
    flex-shrink: 0;
    /* icon tidak ikut geser */
}

.info-text {
    line-height: 1.4;
}

/* ================= HOST CONNECT BUTTONS ================= */
.host-actions-bar {
    display: flex;
    align-items: center;
    gap: 6px;
    padding-top: 8px;
    border-top: 1px solid #2a2a2a;
    width: 100%;
}
.host-connect-btn {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 6px 0;
    border-radius: 6px;
    text-decoration: none;
    font-size: 11px;
    font-weight: 600;
    transition: all 0.2s ease;
    position: relative;
    background: #252525;
    border: 1px solid #383838;
}
.host-connect-btn:hover {
    transform: translateY(-1px);
}
.btn-vnc {
    color: #38bdf8 !important;
    background: rgba(56, 189, 248, 0.12) !important;
    border: 1px solid rgba(56, 189, 248, 0.28) !important;
}
.btn-vnc:hover {
    background: rgba(56, 189, 248, 0.22) !important;
    border-color: rgba(56, 189, 248, 0.55) !important;
}
.btn-vnc i {
    color: #38bdf8 !important;
}
.btn-shell {
    color: #22c55e !important;
    background: rgba(34, 197, 94, 0.12) !important;
    border: 1px solid rgba(34, 197, 94, 0.28) !important;
}
.btn-shell:hover {
    background: rgba(34, 197, 94, 0.22) !important;
    border-color: rgba(34, 197, 94, 0.55) !important;
}
.btn-shell i {
    color: #22c55e !important;
}
.btn-file {
    color: #f59e0b !important;
    background: rgba(245, 158, 11, 0.12) !important;
    border: 1px solid rgba(245, 158, 11, 0.28) !important;
}
.btn-file:hover {
    background: rgba(245, 158, 11, 0.22) !important;
    border-color: rgba(245, 158, 11, 0.55) !important;
}
.btn-file i {
    color: #f59e0b !important;
}

